From d66fdd3b070aaaeb7d9dff5e5fd3b960462cd2e6 Mon Sep 17 00:00:00 2001 From: erKam Date: Sat, 7 Nov 2026 18:53:06 +0000 Subject: [PATCH 01/25] feat(router): report the Router of each Angular app on a page The router collector assumed one Router per page, so a page that bootstraps several apps (several bootstrapApplication roots or micro-frontends) only showed the first one. The overlay now finds the Router of every app root, keys each app by a stable id kept in a WeakMap per root, watches the other apps' navigations and adds an `apps` list to the router report. The server validates the list, the router RPCs and page actions take an optional `app`, and the router agent tools take an `app` argument. A page with one app reports exactly what it did before. Refs #368 --- packages/devtools/CHANGELOG.md | 1 + .../src/__tests__/router-apps-overlay.test.ts | 188 +++++++++++ .../src/__tests__/router-apps.test.ts | 311 ++++++++++++++++++ packages/devtools/src/devframe.ts | 190 +++++++---- packages/devtools/src/overlay.ts | 38 ++- packages/devtools/src/router-apps.ts | 247 ++++++++++++++ packages/devtools/src/router.ts | 30 +- packages/devtools/src/rpc/router-apps.ts | 105 ++++++ packages/devtools/src/rpc/router-tools.ts | 55 +++- 9 files changed, 1088 insertions(+), 77 deletions(-) create mode 100644 packages/devtools/src/__tests__/router-apps-overlay.test.ts create mode 100644 packages/devtools/src/__tests__/router-apps.test.ts create mode 100644 packages/devtools/src/router-apps.ts create mode 100644 packages/devtools/src/rpc/router-apps.ts diff --git a/packages/devtools/CHANGELOG.md b/packages/devtools/CHANGELOG.md index e53ef448..8dafa311 100644 --- a/packages/devtools/CHANGELOG.md +++ b/packages/devtools/CHANGELOG.md @@ -192,6 +192,7 @@ What remains: `/config` exports `DEFAULT_POPUP_HOTKEY`, `PANGULAR_ACTIONS`, `PAN - **Three router lint rules.** `always-run-parent` flags `runGuardsAndResolvers: 'always'` on a parent route with guards or resolvers. `lazy-component-eager` flags a `loadComponent` route whose component another route already imports eagerly. The `resolver-refetch` rule is a timing heuristic: from the SSR & HTTP inspector's calls, it flags a `GET` the page made while a navigation's resolvers ran and again after the navigation ended, which suggests the routed component fetches what a resolver already loaded. A guard can make the first `GET` too, so the rule does not prove the resolver made it. Turn any of them off with `lint.rules`. - **Follow navigations from an agent.** `pangular:follow-navigations` returns the navigations that are new or changed since a cursor, across pages, and can wait up to 30 seconds for the next one, so an agent can follow a login and redirect flow without polling. - **What happens if I go to a URL.** The **Config** view has a **What happens** button, and agents a `pangular:preview-navigation` tool, that predict a navigation from the live route config without navigating: the redirects it follows, the route chain and params, and in order the guards, lazy chunks, resolvers and components that run, with each route's source file and the render mode. +- **Several apps on one page.** A page that bootstraps more than one Angular app with its own Router, such as several `bootstrapApplication()` roots or micro-frontends, reports each app's route, navigations, config and setup under a stable app id. The Routes tab shows an **App** picker on such a page, and the router agent tools take an optional `app` argument. A page with one app reports and shows exactly what it did before (#368). #### CLI diff --git a/packages/devtools/src/__tests__/router-apps-overlay.test.ts b/packages/devtools/src/__tests__/router-apps-overlay.test.ts new file mode 100644 index 00000000..ae6c2698 --- /dev/null +++ b/packages/devtools/src/__tests__/router-apps-overlay.test.ts @@ -0,0 +1,188 @@ +// @vitest-environment jsdom +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; +import { PANGULAR_INSPECTORS } from '../config.ts'; + +const reports: Record[] = []; +const actions: unknown[] = []; +let routerAction: ((message: unknown) => void) | undefined; + +vi.mock('devframe/client', () => ({ + connectDevframe: async () => ({ + connectionMeta: { + backend: 'websocket', + configs: { + pangular: { + inspectors: Object.fromEntries(PANGULAR_INSPECTORS.map((key) => [key, key === 'router'])), + limits: { refreshMs: 500 }, + }, + }, + }, + scope: () => ({ + rpc: { + call: async (name: string, arg: unknown) => { + if (name === 'push-router') reports.push(JSON.parse(JSON.stringify(arg))); + if (name === 'router-action-result') actions.push(arg); + return undefined; + }, + register: (definition: { name: string; handler: (message: unknown) => void }) => { + if (definition.name === 'router-action') routerAction = definition.handler; + }, + }, + }), + }), +})); + +type Listener = (event: Record) => void; + +function fakeRouter(url: string, paths: string[]) { + const listeners = new Set(); + const navigated: string[] = []; + return { + listeners, + navigated, + url, + config: paths.map((path) => ({ path })), + routerState: { + snapshot: { + root: { url: [], params: {}, data: {}, queryParams: {}, fragment: null, children: [] }, + }, + }, + navigateByUrl: (next: string) => { + navigated.push(next); + return Promise.resolve(true); + }, + events: { + subscribe(listener: Listener) { + listeners.add(listener); + return { unsubscribe: () => listeners.delete(listener) }; + }, + }, + }; +} + +function emit(router: ReturnType, event: Record) { + for (const listener of router.listeners) listener(event); +} + +function install(routers: Map>) { + (window as { ng?: unknown }).ng = { + getComponent: () => ({}), + getInjector: (el: Element) => ({ tag: el.localName }), + ɵgetRouterInstance: (injector: { tag: string }) => routers.get(injector.tag) ?? null, + }; +} + +describe('overlay router report with several apps', () => { + beforeEach(() => { + reports.length = 0; + actions.length = 0; + vi.stubGlobal('BroadcastChannel', undefined); + vi.stubGlobal( + 'fetch', + vi.fn(async () => new Response('', { status: 404 })), + ); + vi.useFakeTimers({ toFake: ['setTimeout', 'clearTimeout', 'setInterval', 'clearInterval'] }); + }); + + afterEach(() => { + vi.useRealTimers(); + vi.unstubAllGlobals(); + vi.restoreAllMocks(); + delete (window as { ng?: unknown }).ng; + document.body.innerHTML = ''; + }); + + it('reports each app with a stable id and runs actions on the app they name', async () => { + document.body.innerHTML = + ''; + const shell = fakeRouter('/home', ['home']); + const cart = fakeRouter('/cart', ['cart', 'checkout']); + install( + new Map([ + ['app-root', shell], + ['cart-widget', cart], + ]), + ); + const { initOverlay } = await import('../overlay.ts'); + const dispose = await initOverlay(); + try { + await vi.advanceTimersByTimeAsync(2_000); + emit(cart, { type: 0, id: 1, url: '/checkout' }); + emit(cart, { type: 1, id: 1, url: '/checkout', urlAfterRedirects: '/checkout' }); + await vi.advanceTimersByTimeAsync(2_000); + const last = reports.at(-1)! as { + pageId: string; + snapshot: { url: string }; + navigations: unknown[]; + apps: { + id: string; + primary?: boolean; + snapshot?: { url: string }; + navigations?: { url: string }[]; + }[]; + }; + expect(last.pageId).toEqual(expect.any(String)); + expect(last.snapshot.url).toBe('/home'); + expect(last.navigations).toEqual([]); + expect(last.apps.map((app) => [app.id, app.primary ?? false])).toEqual([ + ['app-root', true], + ['cart-widget', false], + ]); + expect(last.apps[1].snapshot?.url).toBe('/cart'); + expect(last.apps[1].navigations?.map((nav) => nav.url)).toEqual(['/checkout']); + + routerAction?.({ + requestId: 'r1', + pageId: last.pageId, + app: 'cart-widget', + request: { action: 'navigate', url: '/cart' }, + }); + routerAction?.({ + requestId: 'r2', + pageId: last.pageId, + app: 'nope', + request: { action: 'navigate', url: '/x' }, + }); + await vi.advanceTimersByTimeAsync(100); + expect(cart.navigated).toEqual(['/cart']); + expect(shell.navigated).toEqual([]); + expect(actions).toContainEqual( + expect.objectContaining({ + requestId: 'r2', + result: { error: expect.stringContaining('no app') }, + }), + ); + } finally { + dispose(); + } + }); + + it('keeps the report of a page with one app as it was', async () => { + document.body.innerHTML = ''; + install(new Map([['app-root', fakeRouter('/home', ['home'])]])); + const { initOverlay } = await import('../overlay.ts'); + const dispose = await initOverlay(); + try { + await vi.advanceTimersByTimeAsync(2_000); + expect(reports.length).toBeGreaterThan(0); + for (const report of reports) expect(report).not.toHaveProperty('apps'); + expect(Object.keys(reports[0]).sort()).toEqual( + [ + 'activeIds', + 'config', + 'generation', + 'instrumented', + 'links', + 'navigations', + 'outlets', + 'pageId', + 'preloads', + 'setup', + 'snapshot', + ].sort(), + ); + } finally { + dispose(); + } + }); +}); diff --git a/packages/devtools/src/__tests__/router-apps.test.ts b/packages/devtools/src/__tests__/router-apps.test.ts new file mode 100644 index 00000000..ff9d7132 --- /dev/null +++ b/packages/devtools/src/__tests__/router-apps.test.ts @@ -0,0 +1,311 @@ +// @vitest-environment jsdom +import { createHostContext } from 'devframe/node'; +import { afterEach, describe, expect, it } from 'vitest'; +import pangular from '../devframe.ts'; +import { RouterApps, appIdOf, type RouterAppReport } from '../router-apps.ts'; +import { findRouters, type RouterDebugApi } from '../router.ts'; +import { routerStateForApp } from '../rpc/router-apps.ts'; +import { isRouterReport, type RouterPage } from '../rpc/router-tools.ts'; +import { answerText } from './tool-answer.ts'; + +type Listener = (event: Record) => void; + +/** A Router as the overlay reads it: routes, state, events. */ +function fakeRouter(url: string, paths: string[]) { + const listeners = new Set(); + const root = { + url: [], + params: {}, + data: {}, + queryParams: {}, + fragment: null, + outlet: 'primary', + routeConfig: null, + children: [], + }; + return { + listeners, + url, + navigated: true, + config: paths.map((path) => ({ path })), + routerState: { snapshot: { root } }, + navigateByUrl: () => Promise.resolve(true), + events: { + subscribe(listener: Listener) { + listeners.add(listener); + return { unsubscribe: () => listeners.delete(listener) }; + }, + }, + emit(event: Record) { + for (const listener of listeners) listener(event); + }, + }; +} + +class ShellApp {} +class CartWidget {} + +/** A fake `ng` whose roots each have their own injector and Router. */ +function fakeNg(routers: Map, components = new Map()) { + return { + getInjector: (el: Element) => ({ el }), + getComponent: (el: Element) => components.get(el) ?? null, + ɵgetRouterInstance: (injector: unknown) => routers.get((injector as { el: Element }).el), + } as RouterDebugApi; +} + +afterEach(() => { + document.body.innerHTML = ''; +}); + +describe('router apps on one page', () => { + it('reports each app with its own route and navigations, keyed by a stable id', () => { + document.body.innerHTML = + ''; + const [shell, cart] = Array.from(document.querySelectorAll('[ng-version]')); + const shellRouter = fakeRouter('/home', ['home', 'about']); + const cartRouter = fakeRouter('/cart', ['cart', 'checkout']); + const ng = fakeNg( + new Map([ + [shell, shellRouter], + [cart, cartRouter], + ]), + new Map([ + [shell, new ShellApp()], + [cart, new CartWidget()], + ]), + ); + const roots = [shell, cart]; + const primary = findRouters(ng, roots)[0]; + expect(primary).toBe(shellRouter); + + let changes = 0; + const apps = new RouterApps(() => changes++); + apps.scan(ng, roots, primary); + expect(apps.count).toBe(2); + expect(apps.primaryRoot(null)).toBe(shell); + expect(cartRouter.listeners.size).toBe(1); + expect(shellRouter.listeners.size).toBe(0); + + cartRouter.emit({ type: 0, id: 1, url: '/checkout' }); + cartRouter.emit({ type: 1, id: 1, url: '/checkout', urlAfterRedirects: '/checkout' }); + expect(changes).toBeGreaterThan(0); + + const report = apps.report(ng, 2)!; + expect( + report.map(({ id, name, selector, primary }) => ({ id, name, selector, primary })), + ).toEqual([ + { id: 'app-root', name: 'ShellApp', selector: 'app-root', primary: true }, + { id: 'cart-widget', name: 'CartWidget', selector: 'cart-widget', primary: undefined }, + ]); + const other = report[1]; + expect(other.snapshot?.url).toBe('/cart'); + expect(other.config?.map((node) => node.path)).toEqual(['cart', 'checkout']); + expect(other.navigations?.map(({ id, url, outcome }) => ({ id, url, outcome }))).toEqual([ + { id: 1, url: '/checkout', outcome: 'succeeded' }, + ]); + // The first app's entry carries no data of its own: the report's top level has it. + expect(report[0].navigations).toBeUndefined(); + + // The same root keeps its id; a scan with the same roots does not look again. + apps.scan(ng, roots, primary); + expect(apps.report(ng, 2)!.map((app) => app.id)).toEqual(['app-root', 'cart-widget']); + expect(cartRouter.listeners.size).toBe(1); + expect(apps.target('cart-widget')?.router).toBe(cartRouter); + expect(apps.target('app-root')).toBeNull(); + expect(apps.isPrimary('app-root')).toBe(true); + expect(apps.isPrimary(undefined)).toBe(true); + expect(apps.isPrimary('nope')).toBe(false); + + apps.reset(); + expect(cartRouter.listeners.size).toBe(0); + }); + + it('reports no app list on a page with one app', () => { + document.body.innerHTML = ''; + const shell = document.querySelector('app-root')!; + const router = fakeRouter('/home', ['home']); + const ng = fakeNg(new Map([[shell, router]])); + const apps = new RouterApps(() => {}); + apps.scan(ng, [shell], router); + expect(apps.report(ng, 1)).toBeUndefined(); + expect(apps.primaryRoot(shell)).toBe(shell); + expect(router.listeners.size).toBe(0); + }); + + it('counts two roots that share one Router as one app', () => { + document.body.innerHTML = + ''; + const roots = Array.from(document.querySelectorAll('[ng-version]')); + const router = fakeRouter('/', ['home']); + const ng = fakeNg(new Map(roots.map((root) => [root, router]))); + const apps = new RouterApps(() => {}); + apps.scan(ng, roots, router); + expect(apps.report(ng, 1)).toBeUndefined(); + }); + + it('drops an app whose root left the page and gives a replacement root the same id', () => { + document.body.innerHTML = + ''; + const [shell, cart] = Array.from(document.querySelectorAll('[ng-version]')); + const shellRouter = fakeRouter('/home', ['home']); + const cartRouter = fakeRouter('/cart', ['cart']); + const routers = new Map([ + [shell, shellRouter], + [cart, cartRouter], + ]); + const ng = fakeNg(routers); + const apps = new RouterApps(() => {}); + apps.scan(ng, [shell, cart], shellRouter); + expect(apps.count).toBe(2); + cart.remove(); + expect(apps.report(ng, 2)).toBeUndefined(); + expect(cartRouter.listeners.size).toBe(0); + + const again = document.createElement('cart-widget'); + document.body.append(again); + const nextRouter = fakeRouter('/cart', ['cart']); + routers.set(again, nextRouter); + apps.scan(ng, [shell, again], shellRouter); + expect(appIdOf(again)).toBe('cart-widget'); + expect(apps.report(ng, 2)!.map((app) => app.id)).toEqual(['app-root', 'cart-widget']); + }); + + it('numbers two live roots with the same tag', () => { + document.body.innerHTML = ''; + const [a, b] = Array.from(document.querySelectorAll('mfe-root')); + expect(appIdOf(a)).toBe('mfe-root'); + expect(appIdOf(b)).toBe('mfe-root-2'); + expect(appIdOf(a)).toBe('mfe-root'); + }); +}); + +const appsList: RouterAppReport[] = [ + { id: 'app-root', name: 'ShellApp', selector: 'app-root', primary: true }, + { + id: 'cart-widget', + name: 'CartWidget', + selector: 'cart-widget', + snapshot: { + url: '/checkout', + queryParams: {}, + fragment: null, + root: { path: '', url: '', outlet: 'primary', params: {}, data: {}, children: [] }, + }, + navigations: [ + { + id: 1, + url: '/checkout', + trigger: 'imperative', + startedAt: 1, + endedAt: 2, + outcome: 'succeeded', + }, + ], + generation: 1, + config: [ + { + id: '0', + path: 'checkout', + fullPath: '/checkout', + kind: 'component', + component: 'Checkout', + }, + ], + activeIds: ['0'], + }, +]; + +function routerReport(extra: Record = {}) { + return { + pageId: 'p1', + generation: 1, + config: [{ id: '0', path: 'home', fullPath: '/home', kind: 'component', component: 'Home' }], + activeIds: ['0'], + snapshot: { + url: '/home', + queryParams: {}, + fragment: null, + root: { path: '', url: '', outlet: 'primary', params: {}, data: {}, children: [] }, + }, + navigations: [ + { + id: 1, + url: '/home', + trigger: 'imperative', + startedAt: 1, + endedAt: 2, + outcome: 'succeeded', + }, + ], + ...extra, + }; +} + +describe('router apps on the server', () => { + it('accepts a report with an app list and refuses a malformed one', () => { + expect(isRouterReport(routerReport({ apps: appsList }))).toBe(true); + expect(isRouterReport(routerReport({ apps: [{ id: 3 }] }))).toBe(false); + expect(isRouterReport(routerReport({ apps: new Array(9).fill(appsList[0]) }))).toBe(false); + }); + + it('shows the page as the asked-for app and leaves single-app pages alone', () => { + const page = { ...routerReport({ apps: appsList }), reportedAt: 1, changedAt: 1 } as RouterPage; + const single = { ...routerReport({ pageId: 'p2' }), reportedAt: 1, changedAt: 1 } as RouterPage; + const state = { pages: [page, single] }; + + const cart = routerStateForApp(state, { page: 'p1', app: 'CartWidget' }); + expect('error' in cart).toBe(false); + if ('error' in cart) return; + const view = cart.state.pages.find((p) => p.pageId === 'p1')!; + expect(view.appId).toBe('cart-widget'); + expect(view.snapshot?.url).toBe('/checkout'); + expect(view.config?.[0].component).toBe('Checkout'); + expect(cart.note).toContain('`app-root`'); + + const plain = routerStateForApp(state, { page: 'p2' }); + expect(plain).toEqual({ state, note: '' }); + expect(routerStateForApp(state, { page: 'p2', app: 'x' })).toHaveProperty('error'); + expect(routerStateForApp(state, { page: 'p1', app: 'nope' })).toHaveProperty('error'); + }); +}); + +describe('router agent tools with several apps', () => { + async function boot() { + const host = { + mountStatic: () => {}, + resolveOrigin: () => 'http://localhost', + getStorageDir: () => '', + }; + const ctx = await createHostContext({ cwd: process.cwd(), mode: 'dev', host: host as never }); + await pangular.setup(ctx as never); + const push = (name: string, payload: unknown) => + ctx.rpc.invokeLocal(`pangular:${name}` as never, ...([payload] as never)); + const call = async (tool: string, args: Record = {}) => + await answerText(ctx.agent.invoke(`pangular:${tool}`, args)); + return { push, call }; + } + + it('answers for the app named by `app` and names the others', async () => { + const { push, call } = await boot(); + await push('push-router', routerReport({ apps: appsList })); + const first = await call('inspect-route'); + expect(first).toContain('/home'); + expect(first).toContain('Pass `app` to read another'); + const cart = await call('inspect-route', { app: 'cart-widget' }); + expect(cart).toContain('/checkout'); + expect(cart).toContain('**URL** `/checkout`'); + expect(cart).not.toContain('**URL** `/home`'); + const routes = await call('list-routes', { app: 'cart-widget' }); + expect(routes).toContain('Checkout'); + expect(await call('list-routes', { app: 'nope' })).toContain('has no app'); + }); + + it('answers a single-app page exactly as before', async () => { + const { push, call } = await boot(); + await push('push-router', routerReport()); + const text = await call('inspect-route'); + expect(text).not.toContain('Pass `app`'); + expect(await call('inspect-route', { app: 'x' })).toContain('one Angular app'); + }); +}); diff --git a/packages/devtools/src/devframe.ts b/packages/devtools/src/devframe.ts index 585ca4c9..a6e6f423 100644 --- a/packages/devtools/src/devframe.ts +++ b/packages/devtools/src/devframe.ts @@ -337,6 +337,7 @@ import { diffNavigationsText, navigationDiffResult } from './rpc/router-diff.ts' import { callsForNavigation, nextNavigation } from './rpc/router-http.ts'; import { MAX_WAIT_MS, NavigationStream, streamText } from './rpc/router-stream.ts'; import { previewNavigationText, routePreviewResult } from './rpc/router-preview.ts'; +import { APP_ARGUMENT, routerStateForApp } from './rpc/router-apps.ts'; import { nameStoreTokens } from './rpc/store-tokens.ts'; import { notAProjectText, readsSource, refusingTool } from './rpc/project-root.ts'; import { STATE_READ_BY, stateReadTool } from './rpc/state-read-tool.ts'; @@ -1103,14 +1104,14 @@ const pangular = defineDevframe({ ?.pageId; }; - const requestRouterAction = (page: string | undefined, request: unknown) => { + const requestRouterAction = (page: string | undefined, request: unknown, app?: string) => { const action = (request as { action?: unknown } | undefined)?.action; return !config.actions.router && ROUTER_WRITE_ACTIONS.includes(action as string) ? Promise.resolve({ error: actionBlockedMessage('router') }) - : sendRouterAction(page, request); + : sendRouterAction(page, request, app); }; - const sendRouterAction = (page: string | undefined, request: unknown) => + const sendRouterAction = (page: string | undefined, request: unknown, app?: string) => new Promise((resolve) => { const pageId = page || defaultPageId(); // No page could answer: say so now instead of after the 15 s wait. @@ -1144,7 +1145,8 @@ const pangular = defineDevframe({ }); void my.rpc.broadcast({ method: 'router-action', - args: [{ requestId, pageId, request }], + // `app` picks one app on a page that runs several (`router-apps.ts`). + args: [{ requestId, pageId, request, ...(app ? { app } : {}) }], optional: true, }); }); @@ -1164,15 +1166,26 @@ const pangular = defineDevframe({ name: 'request-router-action', type: 'action', jsonSerializable: true, - handler: (message: { pageId?: string; request?: unknown }) => + handler: (message: { pageId?: string; app?: unknown; request?: unknown }) => requestRouterAction( typeof message?.pageId === 'string' ? message.pageId : undefined, message?.request, + typeof message?.app === 'string' ? message.app.slice(0, 60) : undefined, ), }); - const pageFor = (pageId: unknown) => { + /** The router state with one page shown as one of its apps, for the panel's app picker. */ + const routerStateFor = (pageId: unknown, app: unknown): RouterState => { const state = routerState.value() as RouterState; + if (typeof app !== 'string' || !app) return state; + const scoped = routerStateForApp(state, { + page: typeof pageId === 'string' ? pageId : undefined, + app, + }); + return 'error' in scoped ? state : scoped.state; + }; + const pageFor = (pageId: unknown, app?: unknown) => { + const state = routerStateFor(pageId, app); return typeof pageId === 'string' ? state.pages.find((p) => p.pageId === pageId) : (defaultPage(state.pages.filter((p) => p.snapshot)) ?? defaultPage(state.pages)); @@ -1182,19 +1195,25 @@ const pangular = defineDevframe({ name: 'router-lint', type: 'query', jsonSerializable: true, - handler: (pageId: unknown) => - routerLintResult(pageFor(pageId), { - rules: config.lint.rules, - httpFor: routerHttpCalls, - }), + // A page id, or `{ pageId, app }` for one app of a page that runs several. + handler: (target: unknown) => + routerLintResult( + target && typeof target === 'object' + ? pageFor((target as { pageId?: unknown }).pageId, (target as { app?: unknown }).app) + : pageFor(target), + { + rules: config.lint.rules, + httpFor: routerHttpCalls, + }, + ), }); register({ name: 'router-match', type: 'query', jsonSerializable: true, - handler: (message: { pageId?: unknown; url?: unknown }) => { - const page = pageFor(message?.pageId); + handler: (message: { pageId?: unknown; app?: unknown; url?: unknown }) => { + const page = pageFor(message?.pageId, message?.app); if (!page?.config || typeof message?.url !== 'string') return null; return matchUrl(page.config, message.url.slice(0, 2000)); }, @@ -1208,8 +1227,8 @@ const pangular = defineDevframe({ name: 'router-http', type: 'query', jsonSerializable: true, - handler: (message: { pageId?: unknown; id?: unknown }) => { - const page = pageFor(message?.pageId); + handler: (message: { pageId?: unknown; app?: unknown; id?: unknown }) => { + const page = pageFor(message?.pageId, message?.app); const nav = page?.navigations.find((n) => n.id === message?.id); if (!page || !nav) return null; return callsForNavigation( @@ -1241,10 +1260,10 @@ const pangular = defineDevframe({ name: 'router-preview', type: 'query', jsonSerializable: true, - handler: (message: { pageId?: unknown; url?: unknown }) => { + handler: (message: { pageId?: unknown; app?: unknown; url?: unknown }) => { const { sources, serverRoutes } = previewScans(); return routePreviewResult( - routerState.value() as RouterState, + routerStateFor(message?.pageId, message?.app), { page: typeof message?.pageId === 'string' ? message.pageId : undefined, url: typeof message?.url === 'string' ? message.url : undefined, @@ -1259,8 +1278,8 @@ const pangular = defineDevframe({ name: 'router-diff', type: 'query', jsonSerializable: true, - handler: (message: { pageId?: unknown; a?: unknown; b?: unknown }) => - navigationDiffResult(routerState.value() as RouterState, { + handler: (message: { pageId?: unknown; app?: unknown; a?: unknown; b?: unknown }) => + navigationDiffResult(routerStateFor(message?.pageId, message?.app), { page: typeof message?.pageId === 'string' ? message.pageId : undefined, a: typeof message?.a === 'number' ? message.a : undefined, b: typeof message?.b === 'number' ? message.b : undefined, @@ -1271,8 +1290,8 @@ const pangular = defineDevframe({ name: 'router-export', type: 'query', jsonSerializable: true, - handler: (message: { pageId?: unknown; id?: unknown }) => - exportNavigationText(routerState.value() as RouterState, { + handler: (message: { pageId?: unknown; app?: unknown; id?: unknown }) => + exportNavigationText(routerStateFor(message?.pageId, message?.app), { page: typeof message?.pageId === 'string' ? message.pageId : undefined, id: typeof message?.id === 'number' ? message.id : undefined, }), @@ -3814,6 +3833,12 @@ const pangular = defineDevframe({ }, }); + /** The router state for a tool's `page` and `app`, with a line naming the page's other apps. */ + const routerFor = (args: { page?: string; app?: unknown }) => { + const scoped = routerStateForApp(routerState.value() as RouterState, args); + if ('error' in scoped) return { error: { markdown: refusal(scoped.error) } }; + return { state: scoped.state, page: scoped.page ?? args.page, note: scoped.note }; + }; const noRouter = `No router state has been reported. Live data needs a page: connect through the MCP endpoint of the server that runs the app, with the app open in a browser. The stdio MCP server has no page, so there it always answers this.`; const pageProperty = PAGE_ARGUMENT; @@ -3826,6 +3851,7 @@ const pangular = defineDevframe({ type: 'object', properties: { page: pageProperty, + app: APP_ARGUMENT, component: { type: 'string', description: @@ -3833,10 +3859,13 @@ const pangular = defineDevframe({ }, }, }, - handler: async (args: { page?: string; component?: string }) => { - const state = routerState.value() as RouterState; - if (!state.pages.length) return { markdown: noRouter }; - return { markdown: inspectRouteText(state, args) }; + handler: async (args: { page?: string; app?: string; component?: string }) => { + if (!(routerState.value() as RouterState).pages.length) return { markdown: noRouter }; + const scoped = routerFor(args); + if ('error' in scoped) return scoped.error; + return { + markdown: inspectRouteText(scoped.state, { ...args, page: scoped.page }) + scoped.note, + }; }, }); @@ -3849,6 +3878,7 @@ const pangular = defineDevframe({ type: 'object', properties: { page: pageProperty, + app: APP_ARGUMENT, url: { type: 'string', description: 'Only navigations whose URL or final URL contains this text.', @@ -3874,26 +3904,30 @@ const pangular = defineDevframe({ }, handler: async (args: { page?: string; + app?: string; url?: string; limit?: number; perf?: boolean; id?: number; format?: 'explain' | 'repro'; }) => { - const state = routerState.value() as RouterState; - if (!state.pages.length) return { markdown: noRouter }; + if (!(routerState.value() as RouterState).pages.length) return { markdown: noRouter }; + const scoped = routerFor(args); + if ('error' in scoped) return scoped.error; + const { state, page, note } = scoped; if (args.format === 'repro') { if (args.perf) return { markdown: refusal('Pass either `perf` or `format: "repro"`.') }; - return { markdown: exportNavigationText(state, { page: args.page, id: args.id }) }; + return { markdown: exportNavigationText(state, { page, id: args.id }) + note }; } return { - markdown: explainNavigationText( - state, - args, - Date.now(), - limits.navigations, - routerHttpCalls, - ), + markdown: + explainNavigationText( + state, + { ...args, page }, + Date.now(), + limits.navigations, + routerHttpCalls, + ) + note, }; }, }); @@ -3907,14 +3941,18 @@ const pangular = defineDevframe({ type: 'object', properties: { page: pageProperty, + app: APP_ARGUMENT, a: { type: 'integer', description: 'Id of the earlier navigation.' }, b: { type: 'integer', description: 'Id of the later navigation.' }, }, }, - handler: async (args: { page?: string; a?: number; b?: number }) => { - const state = routerState.value() as RouterState; - if (!state.pages.length) return { markdown: noRouter }; - return { markdown: diffNavigationsText(state, args) }; + handler: async (args: { page?: string; app?: string; a?: number; b?: number }) => { + if (!(routerState.value() as RouterState).pages.length) return { markdown: noRouter }; + const scoped = routerFor(args); + if ('error' in scoped) return scoped.error; + return { + markdown: diffNavigationsText(scoped.state, { ...args, page: scoped.page }) + scoped.note, + }; }, }); @@ -3967,18 +4005,28 @@ const pangular = defineDevframe({ type: 'object', properties: { page: pageProperty, + app: APP_ARGUMENT, url: { type: 'string', description: 'A path such as /admin/users?tab=roles.' }, }, required: ['url'], }, - handler: async (args: { page?: string; url?: string }) => { - const state = routerState.value() as RouterState; - if (!state.pages.length) return { markdown: noRouter }; + handler: async (args: { page?: string; app?: string; url?: string }) => { + if (!(routerState.value() as RouterState).pages.length) return { markdown: noRouter }; if (typeof args.url !== 'string' || !args.url) { return { markdown: refusal('Pass `url`, such as /users/42.') }; } + const scoped = routerFor(args); + if ('error' in scoped) return scoped.error; const { sources, serverRoutes } = previewScans(); - return { markdown: previewNavigationText(state, args, sources, serverRoutes) }; + return { + markdown: + previewNavigationText( + scoped.state, + { ...args, page: scoped.page }, + sources, + serverRoutes, + ) + scoped.note, + }; }, }); @@ -3991,6 +4039,7 @@ const pangular = defineDevframe({ type: 'object', properties: { page: pageProperty, + app: APP_ARGUMENT, match: { type: 'string', description: 'A URL such as /users/42 to match against the config.', @@ -4009,33 +4058,41 @@ const pangular = defineDevframe({ }, handler: async (args: { page?: string; + app?: string; match?: string; audit?: boolean; filter?: string; resolveLazy?: string; }) => { - let state = routerState.value() as RouterState; - if (!state.pages.length) return { markdown: noRouter }; + if (!(routerState.value() as RouterState).pages.length) return { markdown: noRouter }; + let scoped = routerFor(args); + if ('error' in scoped) return scoped.error; let resolved = ''; if (args.resolveLazy !== undefined) { const target = routerTarget(args.page); if (!('pageId' in target)) return target; - const result = await requestRouterAction(target.pageId, { - action: 'resolve-lazy', - id: args.resolveLazy, - }); + const appId = scoped.state.pages.find((p) => p.pageId === target.pageId)?.appId; + const result = await requestRouterAction( + target.pageId, + { action: 'resolve-lazy', id: args.resolveLazy }, + appId, + ); const answer = routerActionAnswer('resolve-lazy', target.pageId, result, []); if (refusalOf(answer) !== undefined) return { markdown: answer }; resolved = `${answer}\n\n`; - state = routerState.value() as RouterState; + scoped = routerFor(args); + if ('error' in scoped) return scoped.error; } + const { state, note } = scoped; let sources: ReturnType = []; try { sources = extractRoutes(ctx.cwd); } catch { sources = []; } - return { markdown: `${resolved}${listRoutesText(state, args, sources)}` }; + return { + markdown: `${resolved}${listRoutesText(state, { ...args, page: scoped.page }, sources)}${note}`, + }; }, }); @@ -4044,15 +4101,17 @@ const pangular = defineDevframe({ title: 'Lint routes', description: "Checks the live route config: routes after '**', shadowed params, empty paths without pathMatch full, redirect loops, deprecated guards, title and security issues, and the first 100 RouterLinks on the page.", - inputSchema: { type: 'object', properties: { page: pageProperty } }, - handler: async (args: { page?: string }) => { - const state = routerState.value() as RouterState; - if (!state.pages.length) return { markdown: noRouter }; + inputSchema: { type: 'object', properties: { page: pageProperty, app: APP_ARGUMENT } }, + handler: async (args: { page?: string; app?: string }) => { + if (!(routerState.value() as RouterState).pages.length) return { markdown: noRouter }; + const scoped = routerFor(args); + if ('error' in scoped) return scoped.error; return { - markdown: lintRoutesText(state, args, undefined, { - rules: config.lint.rules, - httpFor: routerHttpCalls, - }), + markdown: + lintRoutesText(scoped.state, { ...args, page: scoped.page }, undefined, { + rules: config.lint.rules, + httpFor: routerHttpCalls, + }) + scoped.note, }; }, }); @@ -4062,11 +4121,14 @@ const pangular = defineDevframe({ title: 'Show the router setup', description: 'How the router is set up: provideRouter or forRoot, effective options (set or default), features, strategies, base href, hydration and whether guard instrumentation is on.', - inputSchema: { type: 'object', properties: { page: pageProperty } }, - handler: async (args: { page?: string }) => { - const state = routerState.value() as RouterState; - if (!state.pages.length) return { markdown: noRouter }; - return { markdown: routerConfigText(state, args) }; + inputSchema: { type: 'object', properties: { page: pageProperty, app: APP_ARGUMENT } }, + handler: async (args: { page?: string; app?: string }) => { + if (!(routerState.value() as RouterState).pages.length) return { markdown: noRouter }; + const scoped = routerFor(args); + if ('error' in scoped) return scoped.error; + return { + markdown: routerConfigText(scoped.state, { ...args, page: scoped.page }) + scoped.note, + }; }, }); diff --git a/packages/devtools/src/overlay.ts b/packages/devtools/src/overlay.ts index 5c451fde..47731f76 100644 --- a/packages/devtools/src/overlay.ts +++ b/packages/devtools/src/overlay.ts @@ -104,6 +104,7 @@ import { import { attachChangeDetection } from './cd-overlay.ts'; import { attachAngularInfo } from './ng-capabilities.ts'; import { createScanBackoff } from './router-attach.ts'; +import { RouterApps } from './router-apps.ts'; import { capturePlatformNavigations, navigationApi, @@ -627,6 +628,8 @@ async function startOverlay( let setup: RouterSetup | undefined; let sentGeneration = -1; const routerScan = createScanBackoff(); + // The other Angular apps on the page that have a Router (`router-apps.ts`). + const routerApps = new RouterApps(onRouterChange); let lastRouterPayload = ''; let lastRouterPushAt = 0; let routerPushTimer: ReturnType | undefined; @@ -686,7 +689,8 @@ async function startOverlay( routerScan.reset(); router = routers[0]; routerCount = routers.length; - routerRoot = candidates[0] ?? null; + routerApps.scan(ng, candidates, router); + routerRoot = routerApps.primaryRoot(candidates[0] ?? null); const stop = watchRouter(router, navigations, onRouterChange); if (stop) routerCleanup.push(stop); routerCleanup.push(onGuardsCheckStart(router, instrumentLoadedRoutes)); @@ -708,6 +712,7 @@ async function startOverlay( function detachRouter() { for (const cleanup of routerCleanup) cleanup(); routerCleanup = []; + routerApps.reset(); stopInstrument?.(); stopInstrument = null; router = null; @@ -755,6 +760,11 @@ async function startOverlay( if (configTruncated) report['configTruncated'] = configTruncated; report['activeIds'] = activeIds(router); report['setup'] = setup; + if (routerDomDirty) { + routerApps.scan(ng, Array.from(document.querySelectorAll('[ng-version]')), router); + } + const apps = routerApps.report(ng, routerCount); + if (apps) report['apps'] = apps; if (routerDomDirty) { routerDomDirty = false; outlets = outletsOf(router); @@ -916,7 +926,12 @@ async function startOverlay( name: 'router-action', type: 'event', jsonSerializable: true, - handler: (message: { requestId?: string; pageId?: string; request?: unknown }) => { + handler: (message: { + requestId?: string; + pageId?: string; + app?: unknown; + request?: unknown; + }) => { if (!message || typeof message.requestId !== 'string') return; if (message.pageId && message.pageId !== pageId) return; const respond = (result: unknown) => @@ -925,9 +940,20 @@ async function startOverlay( .catch(() => {}); if (!router) return respond({ error: 'This page has no Router.' }); if (!isRouterAction(message.request)) return respond({ error: 'Unknown action.' }); - runAction(router, navigations, message.request, setInstrumented).then(respond, (error) => - respond({ error: String((error as Error)?.message ?? error) }), - ); + // An action for another app on the page runs on that app's Router. + const app = routerApps.target(message.app); + if (!app && !routerApps.isPrimary(message.app)) { + return respond({ error: `This page has no app \`${String(message.app).slice(0, 40)}\`.` }); + } + if (app && message.request.action === 'instrument') { + return respond({ error: 'Guard recording runs in the first app only.' }); + } + runAction( + app?.router ?? router, + app?.navigations ?? navigations, + message.request, + setInstrumented, + ).then(respond, (error) => respond({ error: String((error as Error)?.message ?? error) })); }, }); @@ -938,6 +964,7 @@ async function startOverlay( handler: (message: { pageId?: unknown } | undefined) => { if (!on.router || message?.pageId !== pageId) return; clearNavigations(navigations); + routerApps.clearNavigations(); platformNavigations.length = 0; lastRouterPayload = ''; scheduleRouterPush(); @@ -1150,6 +1177,7 @@ async function startOverlay( stopAnalog(); for (const cleanup of routerCleanup) cleanup(); routerCleanup = []; + routerApps.reset(); stopInstrument?.(); stopInstrument = null; routerDomObserver?.disconnect(); diff --git a/packages/devtools/src/router-apps.ts b/packages/devtools/src/router-apps.ts new file mode 100644 index 00000000..5e81bee7 --- /dev/null +++ b/packages/devtools/src/router-apps.ts @@ -0,0 +1,247 @@ +import { + clearNavigations, + componentName, + droppedNavigations, + findRouterRoots, + read, + snapshotRouter, + watchRouter, + type AnyRecord, + type NavigationRecord, + type RouterDebugApi, + type RouterSnapshot, +} from './router.ts'; +import { ConfigTracker, activeIds, walkConfig, type RouteNode } from './router-config.ts'; +import { detectSetup, type RouterSetup } from './router-setup.ts'; + +/** + * One Angular app on the page with its own Router, as the router report + * lists it when a page bootstraps more than one (several + * `bootstrapApplication` roots or micro-frontends). The first app, the one + * the rest of the report describes, has only its id and name; every other + * app carries its own route, navigations and config. + */ +export interface RouterAppReport { + /** Stable for the life of its root element: its tag, with `-2`, `-3` ... for repeats. */ + id: string; + /** The root component's class name, else the tag. */ + name: string; + /** The root element's tag, such as `app-root`. */ + selector: string; + /** The app the top level of the router report describes. */ + primary?: true; + snapshot?: RouterSnapshot | null; + navigations?: NavigationRecord[]; + dropped?: number; + generation?: number; + config?: RouteNode[]; + configTruncated?: number; + activeIds?: string[]; + setup?: RouterSetup; +} + +/** Most apps one page reports. */ +export const MAX_ROUTER_APPS = 8; + +const appIds = new WeakMap(); +// The root that holds each id, so a root that replaces a removed one (HMR, +// re-bootstrap) gets the same id back and the panel keeps its selection. +const holders = new Map | Element>(); + +function holderOf(id: string): Element | undefined { + const held = holders.get(id); + if (!held) return undefined; + return typeof WeakRef === 'function' && held instanceof WeakRef + ? held.deref() + : (held as Element); +} + +/** The id of an app root, kept in a `WeakMap`, so the app's DOM is never written to. */ +export function appIdOf(root: Element): string { + const known = appIds.get(root); + if (known) return known; + const base = (read(() => root.localName, '') || 'app').slice(0, 40); + let id = base; + for (let n = 2; ; n++) { + const holder = holderOf(id); + if (!holder || holder === root || !holder.isConnected) break; + id = `${base}-${n}`; + } + holders.set(id, typeof WeakRef === 'function' ? new WeakRef(root) : root); + appIds.set(root, id); + return id; +} + +function appNameOf(ng: RouterDebugApi, root: Element): string { + const component = read(() => ng.getComponent?.(root) as AnyRecord | null, null); + const name = component ? read(() => componentName(component['constructor']), '') : ''; + return (name && name !== 'Object' ? name : read(() => root.localName, '')) || 'App'; +} + +interface WatchedApp { + id: string; + name: string; + selector: string; + root: Element; + router: AnyRecord; + navigations: NavigationRecord[]; + stop: (() => void) | null; + tracker: ConfigTracker; + config?: RouteNode[]; + configTruncated: number; + setup?: RouterSetup; +} + +/** + * The apps on a page that each have a Router. The overlay keeps watching the + * first app as before; this watches every other app's router events and + * describes each one in the report's `apps` list. A page with one app + * reports no list, so its report stays as it was. + */ +export class RouterApps { + private primary: { id: string; name: string; selector: string; root: Element } | null = null; + private others: WatchedApp[] = []; + private roots: Element[] = []; + + private readonly onChange: () => void; + + constructor(onChange: () => void) { + this.onChange = onChange; + } + + /** + * Finds the app of each Router reachable from `roots` and starts watching + * the ones other than `primary`. Cheap when the roots did not change. + */ + scan(ng: RouterDebugApi, roots: Element[], primary: AnyRecord, force = false): void { + const live = roots.filter((root) => read(() => root.isConnected, false)); + this.dropGone(); + if (!force && sameList(live, this.roots)) return; + this.roots = live; + const found = findRouterRoots(ng, live).slice(0, MAX_ROUTER_APPS); + const main = found.find((entry) => entry.router === primary); + if (!main) { + for (const app of [...this.others]) this.drop(app); + this.primary = null; + return; + } + this.primary = { + id: appIdOf(main.root), + name: appNameOf(ng, main.root), + selector: read(() => main.root.localName, ''), + root: main.root, + }; + const keep = new Set(); + for (const { router, root } of found) { + if (router === primary) continue; + keep.add(router); + if (this.others.some((app) => app.router === router)) continue; + const navigations: NavigationRecord[] = []; + this.others.push({ + id: appIdOf(root), + name: appNameOf(ng, root), + selector: read(() => root.localName, ''), + root, + router, + navigations, + stop: watchRouter(router, navigations, this.onChange), + tracker: new ConfigTracker(), + configTruncated: 0, + }); + } + for (const app of this.others.filter((other) => !keep.has(other.router))) this.drop(app); + } + + /** The root element of the first app, or `fallback` on a page with one app. */ + primaryRoot(fallback: Element | null): Element | null { + return this.others.length && this.primary ? this.primary.root : fallback; + } + + /** How many apps with a Router the page has; 1 or 0 means no `apps` list. */ + get count(): number { + return (this.primary ? 1 : 0) + this.others.length; + } + + /** The `apps` list of the router report, or undefined on a page with one app. */ + report(ng: RouterDebugApi, routers: number): RouterAppReport[] | undefined { + this.dropGone(); + if (!this.primary || !this.others.length) return undefined; + const list: RouterAppReport[] = [ + { + id: this.primary.id, + name: this.primary.name, + selector: this.primary.selector, + primary: true, + }, + ]; + for (const app of this.others) { + if (app.tracker.update(app.router) || !app.config) { + const cut = { routes: 0 }; + app.config = walkConfig(app.router, cut); + app.configTruncated = cut.routes; + app.setup = read(() => detectSetup(ng, app.router, routers, app.root), undefined); + } + const entry: RouterAppReport = { + id: app.id, + name: app.name, + selector: app.selector, + snapshot: read(() => snapshotRouter(app.router), null), + navigations: app.navigations, + generation: app.tracker.generation, + config: app.config, + activeIds: read(() => activeIds(app.router), []), + }; + const dropped = droppedNavigations(app.navigations); + if (dropped) entry.dropped = dropped; + if (app.configTruncated) entry.configTruncated = app.configTruncated; + if (app.setup) entry.setup = app.setup; + list.push(entry); + } + return list; + } + + /** The router and navigations of an app other than the first, for a page action. */ + target(appId: unknown): { router: AnyRecord; navigations: NavigationRecord[] } | null { + if (typeof appId !== 'string') return null; + const app = this.others.find((other) => other.id === appId); + return app ? { router: app.router, navigations: app.navigations } : null; + } + + /** True when `appId` names the first app, or no app at all is named. */ + isPrimary(appId: unknown): boolean { + return appId === undefined || appId === null || appId === this.primary?.id; + } + + /** Clears the navigations of every app other than the first. */ + clearNavigations(): void { + for (const app of this.others) clearNavigations(app.navigations); + } + + /** Stops watching every app, after the first app's router went away. */ + reset(): void { + for (const app of this.others) app.stop?.(); + this.others = []; + this.primary = null; + this.roots = []; + } + + private dropGone(): void { + for (const app of this.others.filter( + (other) => + !read(() => other.root.isConnected, false) || + read(() => other.router['disposed'] === true, false), + )) { + this.drop(app); + this.roots = []; + } + } + + private drop(app: WatchedApp): void { + app.stop?.(); + this.others = this.others.filter((other) => other !== app); + } +} + +function sameList(a: Element[], b: Element[]): boolean { + return a.length === b.length && a.every((item, index) => item === b[index]); +} diff --git a/packages/devtools/src/router.ts b/packages/devtools/src/router.ts index bfe05b3b..ea6268d8 100644 --- a/packages/devtools/src/router.ts +++ b/packages/devtools/src/router.ts @@ -321,23 +321,39 @@ function inUse(router: AnyRecord): boolean { } /** - * Every Router reachable from the given roots, routers that have routes or - * have navigated first. + * Every Router reachable from the given roots with the first root that + * reaches it, routers that have routes or have navigated first. */ -export function findRouters(ng: RouterDebugApi, roots: Iterable): AnyRecord[] { - const candidates: AnyRecord[] = []; +export function findRouterRoots( + ng: RouterDebugApi, + roots: Iterable, +): { router: AnyRecord; root: Element }[] { + const candidates: { router: AnyRecord; root: Element }[] = []; const elements = [...roots]; for (const el of elements) { const injector = read(() => ng.getInjector?.(el), undefined); const router = injector ? routerOf(ng, injector) : null; - if (router && !candidates.includes(router)) candidates.push(router); + if (router && !candidates.some((c) => c.router === router)) { + candidates.push({ router, root: el }); + } } // Angular before 16.2 can't look the Router up by name (`router-fallback.ts`). if (!candidates.length && typeof ng.ɵgetInjectorProviders !== 'function') { const held = routerHeldOnPage(ng, elements, isRouter); - if (held) candidates.push(held); + if (held) candidates.push({ router: held, root: elements[0] }); } - return [...candidates.filter(inUse), ...candidates.filter((r) => !inUse(r))]; + return [ + ...candidates.filter((c) => inUse(c.router)), + ...candidates.filter((c) => !inUse(c.router)), + ]; +} + +/** + * Every Router reachable from the given roots, routers that have routes or + * have navigated first. + */ +export function findRouters(ng: RouterDebugApi, roots: Iterable): AnyRecord[] { + return findRouterRoots(ng, roots).map((c) => c.router); } /** diff --git a/packages/devtools/src/rpc/router-apps.ts b/packages/devtools/src/rpc/router-apps.ts new file mode 100644 index 00000000..bb13f336 --- /dev/null +++ b/packages/devtools/src/rpc/router-apps.ts @@ -0,0 +1,105 @@ +import type { RouterAppReport } from '../router-apps.ts'; +import { code } from './forms-tools.ts'; +import { detectLoops } from './router-loops.ts'; +import { pickPage, type RouterPage, type RouterState } from './router-tools.ts'; + +/** The `app` argument of the router agent tools. */ +export const APP_ARGUMENT = { + type: 'string', + description: + 'On a page that runs several Angular apps with a Router, the app to read: its id or root component name, as the answer lists them. Defaults to the first app.', +} as const; + +/** The apps of a page that runs more than one Angular app with a Router, else none. */ +export function routerAppsOf(page: RouterPage | undefined): RouterAppReport[] { + return page?.apps && page.apps.length > 1 ? page.apps : []; +} + +function label(app: RouterAppReport): string { + return app.name && app.name !== app.selector + ? `${code(app.id)} (${code(app.name)} in ${code(`<${app.selector}>`)})` + : `${code(app.id)} (${code(`<${app.selector}>`)})`; +} + +/** Finds an app by id, root component name or tag, ignoring case. */ +export function findRouterApp(page: RouterPage, app: string): RouterAppReport | undefined { + const apps = routerAppsOf(page); + const needle = app.trim().toLowerCase(); + return ( + apps.find((a) => a.id.toLowerCase() === needle) ?? + apps.find((a) => a.name.toLowerCase() === needle) ?? + apps.find((a) => a.selector.toLowerCase() === needle) + ); +} + +/** + * The page as one of its apps sees it: that app's route, navigations, config + * and setup in place of the first app's, with the page-wide parts the + * overlay reads for the first app only (outlets, links, preloads, guard + * recording) left out. The first app's own entry gives the page unchanged. + */ +export function routerAppPage(page: RouterPage, app: RouterAppReport): RouterPage { + if (app.primary) return { ...page, appId: app.id }; + const navigations = app.navigations ?? []; + const view: RouterPage = { + pageId: page.pageId, + reportedAt: page.reportedAt, + changedAt: page.changedAt, + snapshot: app.snapshot ?? null, + navigations, + apps: page.apps, + appId: app.id, + }; + if (app.dropped) view.dropped = app.dropped; + if (app.generation !== undefined) view.generation = app.generation; + if (app.config) view.config = app.config; + if (app.configTruncated) view.configTruncated = app.configTruncated; + if (app.activeIds) view.activeIds = app.activeIds; + if (app.setup) view.setup = app.setup; + view.loops = detectLoops(navigations, app.config); + return view; +} + +/** One line naming a page's apps, for an answer about one of them. */ +export function routerAppsNote(page: RouterPage | undefined): string { + const apps = routerAppsOf(page); + if (!apps.length) return ''; + const current = apps.find((a) => a.id === page?.appId) ?? apps[0]; + const others = apps.filter((a) => a !== current); + return `\n\nThis page runs ${apps.length} Angular apps with a Router. This answer is about ${label(current)}; the others are ${others.map(label).join(', ')}. Pass \`app\` to read another.`; +} + +/** + * The router state with the asked-for page replaced by the view of one of its + * apps, for the router tools' `app` argument. Without `app` the state is + * unchanged, and the note names the other apps on a page that has several. + */ +export function routerStateForApp( + state: RouterState, + args: { page?: string; app?: unknown }, +): { state: RouterState; page?: string; note: string } | { error: string } { + const page = pickPage(state, args.page); + if (args.app === undefined || args.app === null || args.app === '') { + return { state, note: routerAppsNote(page) }; + } + if (typeof args.app !== 'string') return { error: 'Pass `app` as a string.' }; + if (!page) return { state, note: '' }; + const apps = routerAppsOf(page); + if (!apps.length) { + return { + error: `Page ${code(page.pageId)} runs one Angular app with a Router, so there is no app to pick. Leave \`app\` out.`, + }; + } + const app = findRouterApp(page, args.app); + if (!app) { + return { + error: `Page ${code(page.pageId)} has no app ${code(args.app.slice(0, 60))}. Its apps are ${apps.map(label).join(', ')}.`, + }; + } + const view = routerAppPage(page, app); + return { + state: { pages: state.pages.map((p) => (p === page ? view : p)) }, + page: page.pageId, + note: routerAppsNote(view), + }; +} diff --git a/packages/devtools/src/rpc/router-tools.ts b/packages/devtools/src/rpc/router-tools.ts index 4a6f25b1..d27c03da 100644 --- a/packages/devtools/src/rpc/router-tools.ts +++ b/packages/devtools/src/rpc/router-tools.ts @@ -5,6 +5,7 @@ import type { RouterSetup } from '../router-setup.ts'; import type { LinkInfo, OutletInfo } from '../router-links.ts'; import type { PreloadRecord } from '../router-actions.ts'; import type { PlatformNavigation } from '../router-platform-nav.ts'; +import { MAX_ROUTER_APPS, type RouterAppReport } from '../router-apps.ts'; import type { HttpCall } from '../http-rules.ts'; import { callsForNavigation, @@ -51,12 +52,19 @@ export interface RouterReport { instrumented?: boolean; /** The browser Navigation API's `navigate` events, newest last. */ platformNavigations?: PlatformNavigation[]; + /** + * Every Angular app on the page with a Router, when there is more than one + * (`router-apps.ts`). The rest of the report describes the `primary` one. + */ + apps?: RouterAppReport[]; } export interface RouterPage extends RouterReport { reportedAt: number; changedAt: number; loops?: NavigationLoop[]; + /** Set on the view of one app of a page that runs several (`rpc/router-apps.ts`). */ + appId?: string; } export interface RouterState { @@ -415,10 +423,43 @@ export function isRouterReport( optional( report.platformNavigations, (v) => Array.isArray(v) && v.length <= 30 && v.every(isPlatformNavigation), + ) && + optional( + report.apps, + (v) => + Array.isArray(v) && + v.length <= MAX_ROUTER_APPS && + v.every((app) => isRouterApp(app, maxNavigations)), ) ); } +function isRouterApp(value: unknown, maxNavigations: number): boolean { + if (!isRecord(value)) return false; + const app: Partial = value; + const nodes = { n: 0 }; + return ( + isText(app.id, 60) && + isText(app.name, 200) && + isText(app.selector, 60) && + optional(app.primary, (v) => v === true) && + optional(app.snapshot, (v) => v === null || isSnapshot(v)) && + optional( + app.navigations, + (v) => Array.isArray(v) && v.length <= maxNavigations && v.every(isNavigation), + ) && + optional(app.dropped, isNumber) && + optional(app.generation, isNumber) && + optional( + app.config, + (v) => Array.isArray(v) && v.length <= MAX_CHILDREN && v.every((node) => isNode(node, nodes)), + ) && + optional(app.configTruncated, isNumber) && + optional(app.activeIds, (v) => isNames(v, MAX_ROUTES)) && + optional(app.setup, (v) => isRecord(v) && isPlain(v, { n: 500 })) + ); +} + function stateOf(pages: Pages): RouterState { return { pages: Array.from(pages.values()).sort( @@ -428,7 +469,12 @@ function stateOf(pages: Pages): RouterState { } function contentOf(report: RouterReport): string { - return JSON.stringify([report.snapshot, report.navigations, report.platformNavigations]); + return JSON.stringify([ + report.snapshot, + report.navigations, + report.platformNavigations, + report.apps?.map((app) => [app.id, app.snapshot, app.navigations]), + ]); } export function currentRouter(pages: Pages): RouterState { @@ -469,6 +515,13 @@ export function clearRouterNavigations(pages: Pages, pageId: string, now = Date. const next: RouterPage = { ...page, navigations, changedAt: now }; delete next.dropped; delete next.platformNavigations; + if (page.apps) { + next.apps = page.apps.map((app) => { + if (!app.navigations) return app; + const { dropped: _dropped, ...rest } = app; + return { ...rest, navigations: app.navigations.filter((nav) => nav.outcome === 'pending') }; + }); + } next.loops = detectLoops(navigations, next.config); pages.set(pageId, next); return true; From 09ceaf681f1c1f8d604f767e8deff6e4a3838cb9 Mon Sep 17 00:00:00 2001 From: erKam Date: Sat, 7 Nov 2026 18:53:19 +0000 Subject: [PATCH 02/25] feat(router): add an app picker to the Live router view On a page that runs several Angular apps with a Router, the Live router heading shows an App picker next to the Page picker. The views show the picked app's route, navigations, config, setup and lint, and send the app id with their RPC calls and page actions. A page with one app shows no picker and the same views as before. Refs #368 --- app/src/__tests__/live-route-apps.test.ts | 114 ++++++++++++++++++++++ app/src/pages/live-route.ts | 91 ++++++++++++----- app/src/pages/route-current.ts | 2 +- app/src/pages/route-diff.ts | 1 + app/src/pages/route-lint.ts | 6 +- app/src/pages/route-timeline.ts | 24 +++-- app/src/pages/route-tree.ts | 40 +++++--- app/src/pages/router-types.ts | 55 +++++++++++ 8 files changed, 289 insertions(+), 44 deletions(-) create mode 100644 app/src/__tests__/live-route-apps.test.ts diff --git a/app/src/__tests__/live-route-apps.test.ts b/app/src/__tests__/live-route-apps.test.ts new file mode 100644 index 00000000..0789e11b --- /dev/null +++ b/app/src/__tests__/live-route-apps.test.ts @@ -0,0 +1,114 @@ +import { TestBed, type ComponentFixture } from '@angular/core/testing'; +import type { DevframeRpcClient } from 'devframe/client'; +import { afterEach, describe, expect, it } from 'vitest'; +import { LiveRoute } from '../pages/live-route'; +import type { RouterApp, RouterPage } from '../pages/router-types'; + +const root = { path: '', url: '', outlet: 'primary', params: {}, data: {}, children: [] }; + +function routerPage(extra: Partial = {}): RouterPage { + return { + pageId: 'p1', + reportedAt: 1, + snapshot: { url: '/home', queryParams: {}, fragment: null, root }, + navigations: [ + { + id: 1, + url: '/home', + trigger: 'imperative', + startedAt: 1, + endedAt: 2, + outcome: 'succeeded', + }, + ], + ...extra, + }; +} + +const apps: RouterApp[] = [ + { id: 'app-root', name: 'ShellApp', selector: 'app-root', primary: true }, + { + id: 'cart-widget', + name: 'CartWidget', + selector: 'cart-widget', + snapshot: { url: '/checkout', queryParams: {}, fragment: null, root }, + navigations: [ + { + id: 4, + url: '/checkout', + trigger: 'imperative', + startedAt: 3, + endedAt: 4, + outcome: 'failed', + }, + ], + }, +]; + +function fakeClient(pages: RouterPage[]) { + const calls: { name: string; arg: unknown }[] = []; + const rpc = { + call: (name: string, arg: unknown) => { + calls.push({ name, arg }); + return Promise.resolve(null); + }, + callEvent: () => Promise.resolve(), + sharedState: () => + Promise.resolve({ + value: () => ({ pages }), + on: () => () => {}, + }), + }; + const client = { connectionMeta: {}, scope: () => ({ rpc }) } as unknown as DevframeRpcClient; + return { client, calls }; +} + +async function settle(fixture: ComponentFixture) { + for (let i = 0; i < 3; i++) { + await new Promise((resolve) => setTimeout(resolve)); + await fixture.whenStable(); + } +} + +afterEach(() => { + document.body.innerHTML = ''; +}); + +describe('LiveRoute on a page with several apps', () => { + it('offers an app picker and shows the picked app', async () => { + const { client } = fakeClient([routerPage({ apps })]); + const fixture = TestBed.createComponent(LiveRoute); + fixture.componentRef.setInput('rpc', client); + document.body.append(fixture.nativeElement); + await settle(fixture); + const host = fixture.nativeElement as HTMLElement; + expect(host.querySelector('#live-route-app-label')?.textContent).toBe('App'); + expect(fixture.componentInstance.appId()).toBe('app-root'); + expect(fixture.componentInstance.page()?.snapshot?.url).toBe('/home'); + expect(fixture.componentInstance.appOptions().map((o) => o.label)).toEqual([ + 'ShellApp ', + 'CartWidget ', + ]); + + fixture.componentInstance.appId.set('cart-widget'); + await settle(fixture); + const view = fixture.componentInstance.page(); + expect(view?.appId).toBe('cart-widget'); + expect(view?.pageId).toBe('p1'); + expect(view?.snapshot?.url).toBe('/checkout'); + expect(fixture.componentInstance.problems()).toBe(1); + }); + + it('shows no app picker on a page with one app', async () => { + const page = routerPage(); + const { client } = fakeClient([page]); + const fixture = TestBed.createComponent(LiveRoute); + fixture.componentRef.setInput('rpc', client); + document.body.append(fixture.nativeElement); + await settle(fixture); + const host = fixture.nativeElement as HTMLElement; + expect(host.querySelector('#live-route-app-label')).toBeNull(); + expect(fixture.componentInstance.appId()).toBeNull(); + expect(fixture.componentInstance.page()).toBe(page); + }); +}); diff --git a/app/src/pages/live-route.ts b/app/src/pages/live-route.ts index fbcf32cf..302156ac 100644 --- a/app/src/pages/live-route.ts +++ b/app/src/pages/live-route.ts @@ -18,7 +18,7 @@ import { RouteLint } from './route-lint'; import { RouteSetup } from './route-setup'; import { RouteTimeline } from './route-timeline'; import { RouteTree } from './route-tree'; -import type { RouterPage, SourceRoute } from './router-types'; +import { routerAppView, routerAppsOf, type RouterPage, type SourceRoute } from './router-types'; import { Select } from '../ui/select'; import type { ComponentFocus } from '../types/component-focus.types'; @@ -51,6 +51,17 @@ type TabId = (typeof TABS)[number]['id']; /> } + @if (appOptions().length > 1) { +
+ App + +
+ } } @if (failed()) { @@ -89,28 +100,31 @@ type TabId = (typeof TABS)[number]['id']; [id]="'router-panel-' + selected()" [attr.aria-labelledby]="'router-tab-' + selected()" > - @switch (selected()) { - @case ('current') { - - } - @case ('navigations') { - - } - @case ('compare') { - - } - @case ('routes') { - - } - @case ('setup') { - - } - @case ('lint') { - + + @for (key of viewKey(); track key) { + @switch (selected()) { + @case ('current') { + + } + @case ('navigations') { + + } + @case ('compare') { + + } + @case ('routes') { + + } + @case ('setup') { + + } + @case ('lint') { + + } } } @@ -303,7 +317,36 @@ export class LiveRoute { private unsubscribe: (() => void) | null = null; private readonly destroyRef = inject(DestroyRef); - readonly page = computed(() => this.pages().find((p) => p.pageId === this.pageId()) ?? null); + /** The picked page as it reported, before an app is picked on it. */ + private readonly reported = computed( + () => this.pages().find((p) => p.pageId === this.pageId()) ?? null, + ); + /** + * On a page that runs several Angular apps with a Router, the app picked + * here, else the first one. Kept while the page still has that app. + */ + readonly appId = linkedSignal({ + source: this.reported, + computation: (page, previous) => { + const apps = routerAppsOf(page); + if (!apps.length) return null; + const kept = previous?.value; + return apps.some((app) => app.id === kept) ? kept! : apps[0].id; + }, + }); + /** The picked page, as the picked app sees it. */ + readonly page = computed(() => { + const page = this.reported(); + return page ? routerAppView(page, this.appId()) : null; + }); + readonly viewKey = computed(() => [`${this.pageId() ?? ''} ${this.appId() ?? ''}`]); + readonly appOptions = computed(() => + routerAppsOf(this.reported()).map((app) => ({ + value: app.id, + label: app.name === app.selector ? `<${app.selector}>` : `${app.name} <${app.selector}>`, + hint: (app.primary ? this.reported()?.snapshot?.url : app.snapshot?.url) ?? app.id, + })), + ); readonly problems = computed( () => diff --git a/app/src/pages/route-current.ts b/app/src/pages/route-current.ts index e637090c..169b70fa 100644 --- a/app/src/pages/route-current.ts +++ b/app/src/pages/route-current.ts @@ -421,7 +421,7 @@ export class RouteCurrent { async abort() { const pageId = this.pageId(); - const result = await routerAction(this.rpc(), pageId, { action: 'abort' }); + const result = await routerAction(this.rpc(), pageId, { action: 'abort' }, this.page().appId); if (pageId !== this.pageId()) return; this.message.set( result['error'] ? String(result['error']) : `Aborted navigation #${result['aborted']}.`, diff --git a/app/src/pages/route-diff.ts b/app/src/pages/route-diff.ts index f6b2909a..0110ad57 100644 --- a/app/src/pages/route-diff.ts +++ b/app/src/pages/route-diff.ts @@ -238,6 +238,7 @@ export class RouteDiff { } const result = await routerCall(this.rpc(), 'router-diff', { pageId, + app: this.page().appId, a: Number(a), b: Number(b), }); diff --git a/app/src/pages/route-lint.ts b/app/src/pages/route-lint.ts index c7b93d33..e9e4aaa3 100644 --- a/app/src/pages/route-lint.ts +++ b/app/src/pages/route-lint.ts @@ -277,7 +277,11 @@ export class RouteLint { const pageId = this.page().pageId; if (pageId !== this.checkedPage) this.result.set(null); this.checking.set(true); - const result = await routerCall(this.rpc(), 'router-lint', pageId); + const result = await routerCall( + this.rpc(), + 'router-lint', + this.page().appId ? { pageId, app: this.page().appId } : pageId, + ); if (seq !== this.seq) return; this.checking.set(false); this.failed.set(!result); diff --git a/app/src/pages/route-timeline.ts b/app/src/pages/route-timeline.ts index 87cdf932..dd8662a8 100644 --- a/app/src/pages/route-timeline.ts +++ b/app/src/pages/route-timeline.ts @@ -901,6 +901,7 @@ export class RouteTimeline { this.http.update((all) => ({ ...all, [nav.id]: 'loading' })); const result = await routerCall(this.rpc(), 'router-http', { pageId, + app: this.page().appId, id: nav.id, }); if (pageId !== this.pageId()) return; @@ -915,7 +916,12 @@ export class RouteTimeline { const on = checkbox.checked; const pageId = this.pageId(); const seq = ++this.instrumentSeq; - const result = await routerAction(this.rpc(), pageId, { action: 'instrument', on }); + const result = await routerAction( + this.rpc(), + pageId, + { action: 'instrument', on }, + this.page().appId, + ); // A newer toggle owns the checkbox now; this late answer must not undo it. if (seq !== this.instrumentSeq) return; if (pageId !== this.pageId()) { @@ -945,10 +951,12 @@ export class RouteTimeline { async replay(nav: NavigationRecord) { this.message.set(`Replaying #${nav.id}…`); const pageId = this.pageId(); - const result = await routerAction(this.rpc(), pageId, { - action: 'replay', - id: nav.id, - }); + const result = await routerAction( + this.rpc(), + pageId, + { action: 'replay', id: nav.id }, + this.page().appId, + ); if (pageId !== this.pageId()) return; if (result['error']) { this.message.set(String(result['error'])); @@ -962,7 +970,11 @@ export class RouteTimeline { async copy(nav: NavigationRecord) { const pageId = this.pageId(); - const text = await routerCall(this.rpc(), 'router-export', { pageId, id: nav.id }); + const text = await routerCall(this.rpc(), 'router-export', { + pageId, + app: this.page().appId, + id: nav.id, + }); if (pageId !== this.pageId()) return; if (!text) { this.message.set('Could not build the repro.'); diff --git a/app/src/pages/route-tree.ts b/app/src/pages/route-tree.ts index 16ec5a05..31d1f964 100644 --- a/app/src/pages/route-tree.ts +++ b/app/src/pages/route-tree.ts @@ -603,7 +603,11 @@ export class RouteTree { return; } const pageId = this.pageId(); - const result = await routerCall(this.rpc(), 'router-match', { pageId, url }); + const result = await routerCall(this.rpc(), 'router-match', { + pageId, + app: this.page().appId, + url, + }); if (seq !== this.predictSeq || pageId !== this.pageId()) return; this.preview.set(null); this.match.set(result && { url, result }); @@ -627,7 +631,7 @@ export class RouteTree { const result = await routerCall( this.rpc(), 'router-preview', - { pageId, url }, + { pageId, app: this.page().appId, url }, ); if (seq !== this.predictSeq || pageId !== this.pageId()) return; if (!result || 'error' in result) { @@ -653,7 +657,12 @@ export class RouteTree { } this.message.set('Running the real matcher in the app…'); const pageId = this.pageId(); - const result = await routerAction(this.rpc(), pageId, { action: 'probe', url }); + const result = await routerAction( + this.rpc(), + pageId, + { action: 'probe', url }, + this.page().appId, + ); if (seq !== this.probeSeq || pageId !== this.pageId()) return; if (result['error']) { this.message.set(String(result['error'])); @@ -684,11 +693,16 @@ export class RouteTree { this.checkedRow.set(null); this.rowResult.set({ id: node.id, text: `Navigating to ${node.fullPath}…` }); const pageId = this.pageId(); - const result = await routerAction(this.rpc(), pageId, { - action: 'navigate', - pattern: node.fullPath, - params: this.paramValues()[node.id] ?? {}, - }); + const result = await routerAction( + this.rpc(), + pageId, + { + action: 'navigate', + pattern: node.fullPath, + params: this.paramValues()[node.id] ?? {}, + }, + this.page().appId, + ); if (pageId !== this.pageId()) return; this.rowResult.set({ id: node.id, @@ -700,10 +714,12 @@ export class RouteTree { async resolveLazy(node: RouteNode) { const pageId = this.pageId(); - const result = await routerAction(this.rpc(), pageId, { - action: 'resolve-lazy', - id: node.id, - }); + const result = await routerAction( + this.rpc(), + pageId, + { action: 'resolve-lazy', id: node.id }, + this.page().appId, + ); if (pageId !== this.pageId()) return; if (result['error']) { this.rowResult.set({ id: node.id, text: String(result['error']) }); diff --git a/app/src/pages/router-types.ts b/app/src/pages/router-types.ts index f8435569..1944a6c3 100644 --- a/app/src/pages/router-types.ts +++ b/app/src/pages/router-types.ts @@ -207,6 +207,58 @@ export interface RouterPage { instrumented?: boolean; loops?: NavigationLoop[]; platformNavigations?: PlatformNavigation[]; + /** Every Angular app on the page with a Router, when there is more than one. */ + apps?: RouterApp[]; + /** Set on the view of one app of a page that runs several (`routerAppView`). */ + appId?: string; +} + +/** One Angular app with its own Router on a page that runs several. */ +export interface RouterApp { + id: string; + name: string; + selector: string; + /** The app the top level of the page describes. */ + primary?: true; + snapshot?: RouterPage['snapshot']; + navigations?: NavigationRecord[]; + dropped?: number; + generation?: number; + config?: RouteNode[]; + configTruncated?: number; + activeIds?: string[]; + setup?: RouterSetup; +} + +/** The apps of a page that runs more than one Angular app with a Router, else none. */ +export function routerAppsOf(page: RouterPage | null | undefined): RouterApp[] { + return page?.apps && page.apps.length > 1 ? page.apps : []; +} + +/** + * The page as one of its apps sees it, as the server builds it for the agent + * tools: that app's route, navigations, config and setup in place of the first + * app's. Outlets, links, preloads and guard recording belong to the first app. + */ +export function routerAppView(page: RouterPage, appId: string | null): RouterPage { + const app = routerAppsOf(page).find((a) => a.id === appId); + if (!app) return page; + if (app.primary) return { ...page, appId: app.id }; + return { + pageId: page.pageId, + reportedAt: page.reportedAt, + changedAt: page.changedAt, + snapshot: app.snapshot ?? null, + navigations: app.navigations ?? [], + dropped: app.dropped, + generation: app.generation, + config: app.config, + configTruncated: app.configTruncated, + activeIds: app.activeIds, + setup: app.setup, + apps: page.apps, + appId: app.id, + }; } export interface LintFinding { @@ -307,9 +359,12 @@ export async function routerAction( client: DevframeRpcClient | null, pageId: string | undefined, request: Record, + /** One app of a page that runs several (`RouterPage.appId`). */ + app?: string, ): Promise> { const result = await routerCall>(client, 'request-router-action', { pageId, + ...(app ? { app } : {}), request, }); return result ?? { error: PAGE_UNREACHABLE }; From 1a984ef0d079ee2e1b4992a0015ef9a86b1e8c15 Mon Sep 17 00:00:00 2001 From: erKam Date: Sat, 7 Nov 2026 18:53:22 +0000 Subject: [PATCH 03/25] docs(docs): document several Angular apps on one page in the router docs --- apps/docs/src/content/agents/tools.md | 2 ++ apps/docs/src/content/inspectors/router.md | 23 ++++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/apps/docs/src/content/agents/tools.md b/apps/docs/src/content/agents/tools.md index 8b9eacd9..d665001d 100644 --- a/apps/docs/src/content/agents/tools.md +++ b/apps/docs/src/content/agents/tools.md @@ -629,6 +629,8 @@ Stores that report through the Redux DevTools extension API, such as NGXS, Elf a All router tools read the page, except `scan-render-mode`, which also reads your `*.routes.server.ts` files. +On a page that runs more than one Angular app with a Router, `inspect-route`, `explain-navigation`, `diff-navigations`, `preview-navigation`, `list-routes`, `lint-routes` and `router-config` take an optional `app`: the app's id (the tag of its root, such as `app-root`) or its root component name. Without `app` they answer for the first app, and the answer ends with a line that names the other apps. An unknown `app` is refused with the list of apps. See [Several apps on one page](../inspectors/router.md#several-apps-on-one-page). + ### Read the current route | Tool | What it answers | Arguments | diff --git a/apps/docs/src/content/inspectors/router.md b/apps/docs/src/content/inspectors/router.md index 723937cc..d2094260 100644 --- a/apps/docs/src/content/inspectors/router.md +++ b/apps/docs/src/content/inspectors/router.md @@ -9,7 +9,7 @@ description: The live route, every navigation as a story, the live route config, # Router -The Routes tab reads the running app's Router. The top section, **Live router**, has six views. The bottom section, **Source route config**, lists the routes your files declare. When more than one page is connected, a **Page** picker chooses which one you see. +The Routes tab reads the running app's Router. The top section, **Live router**, has six views. The bottom section, **Source route config**, lists the routes your files declare. When more than one page is connected, a **Page** picker chooses which one you see. When the page runs more than one Angular app with a Router, an **App** picker chooses the app; see [Several apps on one page](#several-apps-on-one-page). @@ -169,7 +169,24 @@ Components rendered by the router show their route and outlet in the [Components ### Finding the Router -The overlay reads the helper `provideRouter()` publishes (`ng.ɵgetRouterInstance`). For `RouterModule.forRoot()` apps, and on Angular 20.0 to 20.3.4 (which lack the helper), it looks for the `Router` token in the injectors instead. With several app roots, the router that has routes or has navigated wins. Before Angular 16.2 neither lookup exists; see [On older Angular](#on-older-angular). +The overlay reads the helper `provideRouter()` publishes (`ng.ɵgetRouterInstance`). For `RouterModule.forRoot()` apps, and on Angular 20.0 to 20.3.4 (which lack the helper), it looks for the `Router` token in the injectors instead. With several app roots that share one Router, the router that has routes or has navigated wins. Before Angular 16.2 neither lookup exists; see [On older Angular](#on-older-angular). + +### Several apps on one page + +A page can bootstrap more than one Angular app, with several `bootstrapApplication()` calls or micro-frontends. Each app root (an element with `ng-version`) that has its own Router counts as an app. Roots that share one Router count once. + +When a page has more than one, the **Live router** heading shows an **App** picker. Each app is listed by its root component and tag, such as `ShellApp `. The first app is the one the router views showed before: the router that has routes or has navigated, else the first root. Pick another app to see its route, navigations, config, setup and lint. The buttons that act on the router (**Go**, **Read lazy**, **Abort**, **Probe in app** and **Replay**) run on the app you picked. A page with one app shows no picker. + +Each app has an id: the tag of its root, with `-2`, `-3` and so on for a second root with the same tag. The id stays the same while the root is on the page, and a root that replaces a removed one with the same tag gets the same id back. The router agent tools take that id, or the root component name, as `app`. + +Some parts stay with the first app: + +| What | Why | +| ------------------ | --------------------------------------------------------------------------------------------------- | +| Outlets and links | The overlay reads them from the whole page. They show on the first app only. | +| Preloads | The overlay watches the first app's preloader. | +| Guard recording | It wraps the first app's guards. On another app, **Record each guard and resolver** shows an error. | +| Follow navigations | `follow-navigations` streams the first app's navigations. | ### Development builds @@ -252,6 +269,8 @@ Without that recording, the guards listed for a navigation are candidates: the ` | `pangular:record-guards` | Turns per-guard and per-resolver recording on or off. | | `pangular:router` (resource) | The active route tree and recent navigations of each page. | +On a page that runs several apps, `inspect-route`, `explain-navigation`, `diff-navigations`, `preview-navigation`, `list-routes`, `lint-routes` and `router-config` take an optional `app`: the app's id or root component name. Without it they answer for the first app and name the others. + `navigate` and `probe-route` only accept same-origin relative URLs that start with `/`. With [`actions.router`](../getting-started/configuration.md#actions) set to `false`, the server drops `navigate` and `probe-route`, and keeps `record-guards` and `list-routes` with `resolveLazy`. See [Tools](../agents/tools.md). ## Limits and gotchas From 0c7f0662fdebfc5c40d3a4d5733dd6f143269bc3 Mon Sep 17 00:00:00 2001 From: erKam Date: Sat, 7 Nov 2026 19:08:04 +0000 Subject: [PATCH 04/25] feat(overlay): report Ionic ion-router-outlet page stacks Decision Q51 puts Ionic support in the Capacitor tab. A new collector (ionic-collector.ts) reads each ion-router-outlet's stack through the IonRouterOutlet directive of @ionic/angular (ng.getDirectives), or its .ion-page children in the DOM without it: the pages, the active one, whether it can go back, and the direction of the last navigation from the outlet's stackDidChange output or inferred from the stack. Ids come from element-id.ts, URLs are redacted, unchanged reports are skipped, and reports carry the pageId. The server keeps one entry per page in the `ionic` shared state through push-ionic and forget-ionic-page, part of the Capacitor inspector, and drops it after the page TTL. --- packages/devtools/CHANGELOG.md | 1 + .../src/__tests__/ionic-collector.test.ts | 322 +++++++++++++++ packages/devtools/src/config.ts | 3 + packages/devtools/src/devframe.ts | 7 + packages/devtools/src/ionic-collector.ts | 376 ++++++++++++++++++ packages/devtools/src/overlay.ts | 7 + packages/devtools/src/rpc/ionic-register.ts | 194 +++++++++ 7 files changed, 910 insertions(+) create mode 100644 packages/devtools/src/__tests__/ionic-collector.test.ts create mode 100644 packages/devtools/src/ionic-collector.ts create mode 100644 packages/devtools/src/rpc/ionic-register.ts diff --git a/packages/devtools/CHANGELOG.md b/packages/devtools/CHANGELOG.md index 8dafa311..b8d517c2 100644 --- a/packages/devtools/CHANGELOG.md +++ b/packages/devtools/CHANGELOG.md @@ -152,6 +152,7 @@ What remains: `/config` exports `DEFAULT_POPUP_HOTKEY`, `PANGULAR_ACTIONS`, `PAN - **Timeline:** one time axis with layers for the router, HTTP, NgRx, change detection, forms and signals. - **Audit:** one ranked list of findings across the inspectors, an axe pass, and before and after sessions. - **Capacitor:** a tab for the platform, plugins, plugin calls and listeners of a Capacitor app. +- **Ionic in the Capacitor tab:** an **Ionic page stacks** section with a card per `ion-router-outlet`: the pages in its stack, the active one, the direction of the last navigation and whether it can go back, read from `@ionic/angular`'s outlet directive or from the DOM. Hovering a page outlines it in the app. - **Forms, Router, Pipes and Analog:** filters, lint navigation, **Clear filters**, a route count, routed components in the **Components** tab, and search and a failed filter for Analog server calls. - **Plugin API:** a library can add its own tab, agent tools and shared state. - **Pipes:** while recording, a pipe that returns an equal result 20 calls in a row is marked **churning**, in the panel and in `explain-pipe`. **Sort pipes** orders the list by calls or by time in `transform`, and **Called while recording** shows only the recorded pipes (#369). diff --git a/packages/devtools/src/__tests__/ionic-collector.test.ts b/packages/devtools/src/__tests__/ionic-collector.test.ts new file mode 100644 index 00000000..66620840 --- /dev/null +++ b/packages/devtools/src/__tests__/ionic-collector.test.ts @@ -0,0 +1,322 @@ +// @vitest-environment jsdom +import { createHostContext } from 'devframe/node'; +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; +import { RPC_INSPECTOR, SHARED_STATE_INSPECTOR } from '../config.ts'; +import { createPangular } from '../devframe.ts'; +import { elementById } from '../element-id.ts'; +import { IonicStacks, attachIonic, type IonicReport } from '../ionic-collector.ts'; +import { toIonicPage, type IonicState } from '../rpc/ionic-register.ts'; + +const JWT = ['eyJhbGciOiJIUzI1NiJ9', 'eyJzdWIiOiIxMjM0NSJ9', 'c2lnbmF0dXJlc2ln'].join('.'); + +class HomePage {} +class DetailPage {} +class SettingsPage {} + +type Listener = (event: Record) => void; + +/** An `EventEmitter` as far as the collector reads it. */ +function emitter() { + const listeners = new Set(); + return { + listeners, + subscribe(listener: Listener) { + listeners.add(listener); + return { unsubscribe: () => listeners.delete(listener) }; + }, + emit(event: Record) { + for (const listener of listeners) listener(event); + }, + }; +} + +/** + * A fake `IonRouterOutlet` directive with the fields of @ionic/angular's + * `common/directives/navigation/router-outlet.js` and `stack-controller.js`: + * `name`, `tabsPrefix`, `stackDidChange`, and `stackCtrl.views` and + * `stackCtrl.activeView`, whose views hold `id`, `url`, `stackId`, `element` + * and `ref`. + */ +function fakeOutlet(outletEl: Element) { + let nextId = 0; + const views: Record[] = []; + const outlet = { + name: 'primary', + tabsPrefix: undefined as string | undefined, + stackDidChange: emitter(), + stackCtrl: { views, activeView: undefined as Record | undefined }, + }; + const view = (tag: string, type: unknown, url: string) => { + const element = document.createElement(tag); + element.classList.add('ion-page'); + outletEl.append(element); + return { + id: nextId++, + url, + stackId: undefined, + element, + ref: { componentType: type, instance: {} }, + }; + }; + return { outlet, view }; +} + +function fakeNg(directives: Map) { + return { getDirectives: (el: Element) => directives.get(el) ?? [] }; +} + +afterEach(() => { + document.body.innerHTML = ''; + document.documentElement.removeAttribute('mode'); +}); + +describe('Ionic page stacks', () => { + it('reads each page of an ion-router-outlet stack with the active one and stable ids', () => { + document.documentElement.setAttribute('mode', 'ios'); + document.body.innerHTML = ''; + const outletEl = document.querySelector('ion-router-outlet')!; + const { outlet, view } = fakeOutlet(outletEl); + const home = view('app-home', HomePage, '/home'); + const detail = view('app-detail', DetailPage, `/detail/7?token=${JWT}`); + outlet.stackCtrl.views.push(home, detail); + outlet.stackCtrl.activeView = detail; + const stacks = new IonicStacks(() => {}); + const ng = fakeNg(new Map([[outletEl, [{ other: true }, outlet]]])); + + const report = stacks.read(ng, document)!; + expect(report.framework).toBe('@ionic/angular'); + expect(report.mode).toBe('ios'); + expect(report.outlets).toHaveLength(1); + const [first] = report.outlets; + expect(first.source).toBe('angular'); + expect(first.name).toBe('primary'); + expect(first.canGoBack).toBe(true); + expect(first.pages.map(({ component, tag, active }) => ({ component, tag, active }))).toEqual([ + { component: 'HomePage', tag: 'app-home', active: false }, + { component: 'DetailPage', tag: 'app-detail', active: true }, + ]); + expect(first.pages[0].url).toBe('/home'); + expect(JSON.stringify(report)).not.toContain(JWT); + expect(elementById(first.pages[1].elementId)).toBe(detail.element); + expect(elementById(first.id)).toBe(outletEl); + // Never writes to the app's DOM. + expect(outletEl.outerHTML).not.toMatch(/data-|pangular/); + + const again = stacks.read(ng, document)!; + expect(again.outlets[0].id).toBe(first.id); + expect(again.outlets[0].pages.map((page) => page.elementId)).toEqual( + first.pages.map((page) => page.elementId), + ); + }); + + it('infers forward, back and root from how the stack changed', () => { + document.body.innerHTML = ''; + const outletEl = document.querySelector('ion-router-outlet')!; + const { outlet, view } = fakeOutlet(outletEl); + delete (outlet as Partial).stackDidChange; + const ng = fakeNg(new Map([[outletEl, [outlet]]])); + const stacks = new IonicStacks(() => {}); + const home = view('app-home', HomePage, '/home'); + outlet.stackCtrl.views.push(home); + outlet.stackCtrl.activeView = home; + expect(stacks.read(ng, document)!.outlets[0].direction).toBeUndefined(); + + const detail = view('app-detail', DetailPage, '/detail'); + outlet.stackCtrl.views.push(detail); + outlet.stackCtrl.activeView = detail; + const forward = stacks.read(ng, document)!.outlets[0]; + expect([forward.direction, forward.directionSource]).toEqual(['forward', 'inferred']); + + outlet.stackCtrl.views.pop(); + outlet.stackCtrl.activeView = home; + expect(stacks.read(ng, document)!.outlets[0].direction).toBe('back'); + + const settings = view('app-settings', SettingsPage, '/settings'); + outlet.stackCtrl.views.splice(0, outlet.stackCtrl.views.length, settings); + outlet.stackCtrl.activeView = settings; + expect(stacks.read(ng, document)!.outlets[0].direction).toBe('root'); + }); + + it('takes the direction from stackDidChange and stops listening on stop', () => { + vi.useFakeTimers(); + try { + document.body.innerHTML = ''; + const outletEl = document.querySelector('ion-router-outlet')!; + const { outlet, view } = fakeOutlet(outletEl); + outlet.tabsPrefix = '/tabs/tab1'; + const ng = fakeNg(new Map([[outletEl, [outlet]]])); + const changed = vi.fn(); + const stacks = new IonicStacks(changed); + const home = view('app-home', HomePage, '/tabs/tab1'); + const detail = view('app-detail', DetailPage, '/tabs/tab1/detail'); + outlet.stackCtrl.views.push(home, detail); + outlet.stackCtrl.activeView = detail; + expect(stacks.read(ng, document)!.outlets[0].tabs).toBe('/tabs/tab1'); + expect(outlet.stackDidChange.listeners.size).toBe(1); + + // Ionic emits after the transition: the stack already changed when it comes. + outlet.stackCtrl.views.pop(); + outlet.stackCtrl.activeView = home; + expect(stacks.read(ng, document)!.outlets[0].directionSource).toBe('inferred'); + outlet.stackDidChange.emit({ + enteringView: home, + direction: 'root', + animation: undefined, + tabSwitch: true, + }); + vi.runAllTimers(); + expect(changed).toHaveBeenCalled(); + const after = stacks.read(ng, document)!.outlets[0]; + expect(after).toMatchObject({ + direction: 'root', + directionSource: 'event', + animated: false, + tabSwitch: true, + }); + + stacks.stop(); + expect(outlet.stackDidChange.listeners.size).toBe(0); + } finally { + vi.useRealTimers(); + } + }); + + it('falls back to the outlet pages in the DOM without the Angular directive', () => { + document.body.innerHTML = ` + + + +
+
`; + const report = new IonicStacks(() => {}).read({}, document)!; + expect(report.framework).toBe('@ionic/core'); + const [outlet] = report.outlets; + expect(outlet).toMatchObject({ name: 'menu', source: 'dom', canGoBack: true }); + expect(outlet.pages.map(({ tag, active, url }) => ({ tag, active, url }))).toEqual([ + { tag: 'app-home', active: false, url: undefined }, + { tag: 'app-detail', active: true, url: undefined }, + ]); + }); + + it('reports nothing on a page without Ionic', () => { + document.body.innerHTML = ''; + expect(new IonicStacks(() => {}).read({}, document)).toBeNull(); + }); +}); + +describe('attachIonic', () => { + beforeEach(() => { + document.body.innerHTML = ''; + }); + + it('pushes with the pageId, skips an unchanged report and forgets the page on leave', async () => { + const calls: [string, unknown][] = []; + const my = { + rpc: { + call: async (name: string, arg: unknown) => { + calls.push([name, arg]); + return undefined; + }, + }, + }; + const ionic = attachIonic(my, 'tab1', () => ({}), { tickMs: () => 500 }); + await ionic.push(); + await ionic.push(); + expect(calls.map(([name]) => name)).toEqual(['push-ionic']); + const report = calls[0][1] as IonicReport; + expect(report.pageId).toBe('tab1'); + expect(report.outlets[0].source).toBe('dom'); + + document + .querySelector('ion-router-outlet')! + .append(Object.assign(document.createElement('app-home'), { className: 'ion-page' })); + await ionic.push(); + expect(calls.filter(([name]) => name === 'push-ionic')).toHaveLength(2); + + ionic.leave(); + expect(calls.at(-1)).toEqual(['forget-ionic-page', 'tab1']); + await ionic.push(); + expect(calls.at(-1)?.[0]).toBe('forget-ionic-page'); + ionic.stop(); + }); + + it('sends nothing on a page without Ionic', async () => { + document.body.innerHTML = ''; + const call = vi.fn(async () => undefined); + const ionic = attachIonic({ rpc: { call } }, 'tab1', () => ({})); + await ionic.push(); + ionic.leave(); + expect(call).not.toHaveBeenCalled(); + }); +}); + +describe('Ionic on the server', () => { + async function boot() { + const host = { + mountStatic: () => {}, + resolveOrigin: () => 'http://localhost', + getStorageDir: () => '', + }; + const ctx = await createHostContext({ cwd: process.cwd(), mode: 'dev', host: host as never }); + await createPangular({}).setup(ctx as never); + const call = (name: string, payload: unknown) => + ctx.rpc.invokeLocal(`pangular:${name}` as never, ...([payload] as never)); + const state = async () => + ( + await ( + ctx.rpc as unknown as { + sharedState: { get: (key: string) => Promise<{ value: () => IonicState }> }; + } + ).sharedState.get('pangular:ionic') + ).value(); + return { call, state }; + } + + const report = (pageId = 'tab1') => ({ + pageId, + url: `/home?token=${JWT}`, + title: 'Ionic app', + framework: '@ionic/angular', + mode: 'md', + outlets: [ + { + id: 'c1-1', + name: 'primary', + source: 'angular', + canGoBack: false, + direction: 'forward', + directionSource: 'event', + animated: true, + pages: [ + { component: 'HomePage', tag: 'app-home', url: '/home', active: true, elementId: 'c1-2' }, + { component: 'Bad', tag: 'x', active: false, elementId: 'not valid!' }, + ], + }, + ], + }); + + it('keeps the known fields, masks the URL and drops malformed pages', () => { + const page = toIonicPage({ ...report(), outlets: [...report().outlets, { id: 3 }] }, 5)!; + expect(page.reportedAt).toBe(5); + expect(page.outlets).toHaveLength(1); + expect(page.outlets[0].pages.map((p) => p.component)).toEqual(['HomePage']); + expect(JSON.stringify(page)).not.toContain(JWT); + expect(toIonicPage({ pageId: 'tab1' })).toBeNull(); + expect(toIonicPage({ ...report(), framework: 'other' })?.framework).toBe('@ionic/core'); + }); + + it('stores one entry per page and forgets it', async () => { + const { call, state } = await boot(); + await call('push-ionic', report('tab1')); + await call('push-ionic', report('tab2')); + expect(Object.keys((await state()).pages).sort()).toEqual(['tab1', 'tab2']); + await call('forget-ionic-page', 'tab1'); + expect(Object.keys((await state()).pages)).toEqual(['tab2']); + }); + + it('belongs to the Capacitor inspector', () => { + expect(RPC_INSPECTOR['push-ionic']).toBe('capacitor'); + expect(RPC_INSPECTOR['forget-ionic-page']).toBe('capacitor'); + expect(SHARED_STATE_INSPECTOR['ionic']).toBe('capacitor'); + }); +}); diff --git a/packages/devtools/src/config.ts b/packages/devtools/src/config.ts index 06255ba8..97f5bab2 100644 --- a/packages/devtools/src/config.ts +++ b/packages/devtools/src/config.ts @@ -1490,6 +1490,8 @@ export const RPC_INSPECTOR: Record = { 'clear-http-calls': 'http', 'push-capacitor': 'capacitor', 'forget-capacitor-page': 'capacitor', + 'push-ionic': 'capacitor', + 'forget-ionic-page': 'capacitor', 'push-errors': 'errors', 'forget-errors-page': 'errors', 'push-analog': 'analog', @@ -1540,6 +1542,7 @@ export const SHARED_STATE_INSPECTOR: Record = { http: 'http', 'http-payloads': 'http', capacitor: 'capacitor', + ionic: 'capacitor', analog: 'analog', errors: 'errors', startup: 'injectors', diff --git a/packages/devtools/src/devframe.ts b/packages/devtools/src/devframe.ts index a6e6f423..85ff4fc5 100644 --- a/packages/devtools/src/devframe.ts +++ b/packages/devtools/src/devframe.ts @@ -29,6 +29,7 @@ import { registerReduxStores } from './rpc/redux-stores-register.ts'; import { registerTanstackQuery } from './rpc/query-register.ts'; import { registerPlugins } from './rpc/plugins-register.ts'; import { registerStartup } from './rpc/startup-register.ts'; +import { registerIonic } from './rpc/ionic-register.ts'; import type { PangularServerPlugin } from './plugin.ts'; import { registerAudit } from './rpc/audit-register.ts'; import { inspectProvidersText } from './rpc/injector-tools.ts'; @@ -975,6 +976,10 @@ const pangular = defineDevframe({ ttl: liveTtl, }) : null; + // The `ion-router-outlet` stacks of Ionic pages, shown in the Capacitor tab. + const ionicInspector = on.capacitor + ? await registerIonic({ my, rpcHost: ctx.rpc, register, owns, mayForget, ttl: liveTtl }) + : null; // A plugin tool's tier comes from the plugin; `pluginToolAllowed` checks it against the config. const pluginsInspector = on.plugins ? await registerPlugins({ @@ -1596,6 +1601,7 @@ const pangular = defineDevframe({ reduxStores?.expire(now); tanstackQuery?.expire(now); startupInspector?.expire(now); + ionicInspector?.expire(now); pluginsInspector?.expire(now); componentDeltas.prune((id) => componentPages.has(id)); injectorDeltas.prune((id) => injectorPages.has(id)); @@ -4925,6 +4931,7 @@ const pangular = defineDevframe({ capacitor: withUrl(capacitorPages.values()), errors: withUrl(errorsInspector?.pages() ?? []), startup: withUrl(startupInspector?.pages() ?? []), + ionic: withUrl(ionicInspector?.pages() ?? []), plugins: withUrl(pluginsInspector?.pages() ?? []), analog: withUrl(on.analog ? analogPages() : []), }, diff --git a/packages/devtools/src/ionic-collector.ts b/packages/devtools/src/ionic-collector.ts new file mode 100644 index 00000000..53561b03 --- /dev/null +++ b/packages/devtools/src/ionic-collector.ts @@ -0,0 +1,376 @@ +import { keepaliveDue } from './change-detection.ts'; +import { elementId } from './element-id.ts'; +import { setTimeoutOutside } from './outside-angular.ts'; +import { componentName, read, redactMessage, redactUrl, type AnyRecord } from './router.ts'; + +/** One page in an `ion-router-outlet` stack. */ +export interface IonicStackPage { + /** The page's root component class, else its tag. */ + component: string; + /** The page element's tag, such as `app-home`. */ + tag: string; + /** The URL Ionic stored for the page, redacted. Missing when read from the DOM. */ + url?: string; + /** The page shown now. */ + active: boolean; + /** Stable id of the page element, for the panel's highlight (`element-id.ts`). */ + elementId: string; +} + +export type IonicDirection = 'forward' | 'back' | 'root'; + +/** One `ion-router-outlet` and its page stack, oldest page first. */ +export interface IonicOutlet { + /** Stable id of the outlet element (`element-id.ts`). */ + id: string; + /** The outlet's `name` (`primary` by default). */ + name: string; + /** The tab URL prefix of an outlet inside `ion-tabs`. */ + tabs?: string; + /** + * `angular`: read from the `IonRouterOutlet` directive's stack controller. + * `dom`: read from the outlet's `.ion-page` children, without URLs. + */ + source: 'angular' | 'dom'; + pages: IonicStackPage[]; + /** Pages past the first `MAX_PAGES` that were left out. */ + truncated?: number; + /** True when a back navigation is possible within the active page's stack. */ + canGoBack?: boolean; + /** The direction of the last navigation in this outlet, when it is known. */ + direction?: IonicDirection; + /** + * `event`: from the outlet's `stackDidChange` output. `inferred`: from how + * the stack changed between two reads. + */ + directionSource?: 'event' | 'inferred'; + /** The last navigation animated. Only with `directionSource: 'event'`. */ + animated?: boolean; + /** The last navigation switched tabs. Only with `directionSource: 'event'`. */ + tabSwitch?: boolean; +} + +/** What the page reports about Ionic, as `push-ionic`. */ +export interface IonicReport { + pageId: string; + url: string; + title: string; + /** `@ionic/angular` when an outlet has the Angular directive, else `@ionic/core`. */ + framework: '@ionic/angular' | '@ionic/core'; + /** Ionic's mode, from the `mode` attribute it sets on ``. */ + mode?: string; + outlets: IonicOutlet[]; + /** Outlets past the first `MAX_OUTLETS` that were left out. */ + truncatedOutlets?: number; +} + +export const MAX_OUTLETS = 20; +export const MAX_PAGES = 50; + +interface IonicDebugApi { + getDirectives?(el: Element): unknown[]; +} + +interface Remembered { + views: unknown[]; + active: unknown; + direction?: IonicDirection; + directionSource?: 'event' | 'inferred'; + animated?: boolean; + tabSwitch?: boolean; + /** The view the last `stackDidChange` event entered. */ + eventView?: unknown; + unsubscribe?: () => void; +} + +const DIRECTIONS: readonly string[] = ['forward', 'back', 'root']; + +/** The `IonRouterOutlet` directive on an outlet element: the one with a stack controller. */ +function outletDirective(ng: IonicDebugApi | undefined, el: Element): AnyRecord | null { + const directives = read(() => ng?.getDirectives?.(el) ?? [], [] as unknown[]); + for (const directive of directives) { + const views = read(() => (directive as AnyRecord)['stackCtrl']?.['views'], undefined); + if (Array.isArray(views)) return directive as AnyRecord; + } + return null; +} + +function tagOf(el: unknown): string { + return read(() => String((el as Element).localName ?? ''), '') || 'unknown'; +} + +/** + * Reads the page stack of every `ion-router-outlet` on the page. Remembers + * each outlet's last stack in a `WeakMap`, so the direction of the last + * navigation can be inferred when no `stackDidChange` event was seen, and + * never writes to the page's DOM. + */ +export class IonicStacks { + private readonly remembered = new WeakMap(); + private readonly subscribed = new Set(); + private readonly onChange: () => void; + + constructor(onChange: () => void) { + this.onChange = onChange; + } + + /** The report body for this page, or null when the page has no Ionic. */ + read( + ng: IonicDebugApi | undefined, + doc: Document, + ): Omit | null { + const elements = read(() => Array.from(doc.querySelectorAll('ion-router-outlet')), []); + if (!elements.length && !read(() => !!doc.querySelector('ion-app'), false)) return null; + let angular = false; + const outlets: IonicOutlet[] = []; + for (const el of elements.slice(0, MAX_OUTLETS)) { + const directive = outletDirective(ng, el); + if (directive) angular = true; + outlets.push(directive ? this.fromDirective(el, directive) : this.fromDom(el)); + } + const report: Omit = { + framework: angular ? '@ionic/angular' : '@ionic/core', + outlets, + }; + const mode = read(() => doc.documentElement.getAttribute('mode'), null); + if (mode) report.mode = redactMessage(mode).slice(0, 20); + if (elements.length > MAX_OUTLETS) report.truncatedOutlets = elements.length - MAX_OUTLETS; + return report; + } + + /** Stops listening to every outlet's `stackDidChange`. */ + stop(): void { + for (const memory of this.subscribed) memory.unsubscribe?.(); + this.subscribed.clear(); + } + + private memoryOf(key: object): Remembered { + let memory = this.remembered.get(key); + if (!memory) { + memory = { views: [], active: null }; + this.remembered.set(key, memory); + } + return memory; + } + + private fromDirective(el: Element, directive: AnyRecord): IonicOutlet { + const stack = directive['stackCtrl'] as AnyRecord; + const views = read(() => [...(stack['views'] as AnyRecord[])], [] as AnyRecord[]); + const active = read(() => stack['activeView'] as AnyRecord | undefined, undefined) ?? null; + const memory = this.memoryOf(directive); + this.listen(directive, memory); + this.infer(memory, views, active); + const shown = views.slice(0, MAX_PAGES); + const outlet: IonicOutlet = { + id: elementId(el), + name: redactMessage(read(() => String(directive['name'] ?? 'primary'), 'primary')).slice( + 0, + 100, + ), + source: 'angular', + pages: shown.map((view) => { + const element = read(() => view['element'] as Element | undefined, undefined); + const ref = read(() => view['ref'] as AnyRecord | undefined, undefined); + const type = read( + () => ref?.['componentType'] ?? ref?.['instance']?.['constructor'], + undefined, + ); + const tag = tagOf(element); + const name = type ? read(() => componentName(type), '') : ''; + const page: IonicStackPage = { + component: (name && name !== 'Object' ? name : tag).slice(0, 200), + tag, + active: view === active, + elementId: element ? elementId(element) : elementId(view), + }; + const url = read(() => view['url'] as unknown, undefined); + if (typeof url === 'string') page.url = redactUrl(url); + return page; + }), + }; + const tabs = read(() => directive['tabsPrefix'] as unknown, undefined); + if (typeof tabs === 'string' && tabs) outlet.tabs = redactUrl(tabs); + if (views.length > MAX_PAGES) outlet.truncated = views.length - MAX_PAGES; + if (active) { + const stackId = read(() => active['stackId'] as unknown, undefined); + outlet.canGoBack = views.filter((view) => view['stackId'] === stackId).length > 1; + } + this.describeDirection(outlet, memory); + return outlet; + } + + private fromDom(el: Element): IonicOutlet { + const children = read( + () => Array.from(el.children).filter((child) => child.classList.contains('ion-page')), + [] as Element[], + ); + const visible = children.filter((child) => !child.classList.contains('ion-page-hidden')); + const active = visible[visible.length - 1] ?? null; + const memory = this.memoryOf(el); + this.infer(memory, children, active); + const outlet: IonicOutlet = { + id: elementId(el), + name: redactMessage(read(() => el.getAttribute('name') ?? 'primary', 'primary')).slice( + 0, + 100, + ), + source: 'dom', + pages: children.slice(0, MAX_PAGES).map((child) => ({ + component: tagOf(child), + tag: tagOf(child), + active: child === active, + elementId: elementId(child), + })), + }; + if (children.length > MAX_PAGES) outlet.truncated = children.length - MAX_PAGES; + outlet.canGoBack = children.length > 1; + this.describeDirection(outlet, memory); + return outlet; + } + + /** + * Listens to the outlet's `stackDidChange` output, which carries the + * direction Ionic used. It only reads the event; the callback runs in the + * app's zone, so the push it asks for is scheduled outside it. + */ + private listen(directive: AnyRecord, memory: Remembered): void { + if (memory.unsubscribe) return; + const output = read(() => directive['stackDidChange'] as AnyRecord | undefined, undefined); + if (!output || typeof output['subscribe'] !== 'function') return; + const subscription = read( + () => + output['subscribe']((event: AnyRecord) => { + const direction = read(() => event?.['direction'] as unknown, undefined); + if (typeof direction !== 'string' || !DIRECTIONS.includes(direction)) return; + memory.direction = direction as IonicDirection; + memory.directionSource = 'event'; + memory.eventView = read(() => event['enteringView'] as unknown, undefined); + memory.animated = read(() => !!event['animation'], false); + memory.tabSwitch = read(() => event['tabSwitch'] === true, false); + setTimeoutOutside(this.onChange, 0); + }) as { unsubscribe(): void }, + null, + ); + if (!subscription) return; + memory.unsubscribe = () => read(() => subscription.unsubscribe(), undefined); + this.subscribed.add(memory); + } + + /** Infers the direction of a navigation from how the stack changed since the last read. */ + private infer(memory: Remembered, views: unknown[], active: unknown): void { + const previous = memory.views; + const before = memory.active; + memory.views = views; + memory.active = active; + if (!previous.length || !active || active === before) return; + // The event for this navigation already said which way it went. + if (memory.directionSource === 'event' && memory.eventView === active) return; + const was = previous.indexOf(before); + const now = views.indexOf(active); + let direction: IonicDirection; + if (!previous.includes(active)) direction = views.length === 1 ? 'root' : 'forward'; + else direction = now < was ? 'back' : 'forward'; + memory.direction = direction; + memory.directionSource = 'inferred'; + memory.animated = undefined; + memory.tabSwitch = undefined; + } + + private describeDirection(outlet: IonicOutlet, memory: Remembered): void { + if (!memory.direction) return; + outlet.direction = memory.direction; + if (memory.directionSource) outlet.directionSource = memory.directionSource; + if (memory.directionSource === 'event') { + if (memory.animated !== undefined) outlet.animated = memory.animated; + if (memory.tabSwitch) outlet.tabSwitch = true; + } + } +} + +interface Rpc { + rpc: { call(name: string, ...args: unknown[]): Promise }; +} + +export interface IonicOptions { + /** How often the overlay refreshes (`limits.refreshMs`), for the keepalive. */ + tickMs?: () => number; + doc?: Document; +} + +/** + * Reports the `ion-router-outlet` stacks of an Ionic page as `push-ionic`, + * part of the Capacitor inspector. A page without Ionic sends nothing. An + * unchanged report goes again only when the keepalive is due. + */ +export function attachIonic( + my: Rpc, + pageId: string, + getNg: () => unknown, + options: IonicOptions = {}, +) { + const tickMs = options.tickMs ?? (() => 0); + let lastJson = ''; + let sentAt = 0; + let sent = false; + let left = false; + let stopped = false; + let timer: ReturnType | undefined; + + const push = async (force = false): Promise => { + if (left || stopped) return; + const doc = options.doc ?? (typeof document === 'undefined' ? undefined : document); + if (!doc) return; + const body = stacks.read(getNg() as IonicDebugApi | undefined, doc); + if (!body) { + // Ionic left the page (an app torn down): the server forgets it. + if (sent) forget(); + return; + } + const report: IonicReport = { + pageId, + url: redactUrl(read(() => location.pathname + location.search, '')), + title: redactMessage(read(() => doc.title, '')), + ...body, + }; + const json = JSON.stringify(report); + if (!force && json === lastJson && !keepaliveDue(sentAt, tickMs())) return; + lastJson = json; + sentAt = Date.now(); + try { + await my.rpc.call('push-ionic', report); + sent = true; + } catch { + lastJson = ''; + } + }; + + const stacks = new IonicStacks(() => { + clearTimeout(timer); + timer = setTimeoutOutside(() => void push(), 50); + }); + + const forget = () => { + sent = false; + lastJson = ''; + void my.rpc.call('forget-ionic-page', pageId).catch(() => {}); + }; + + return { + push, + leave() { + if (left) return; + left = true; + clearTimeout(timer); + if (sent) forget(); + }, + resume() { + left = false; + lastJson = ''; + }, + stop() { + stopped = true; + clearTimeout(timer); + stacks.stop(); + }, + }; +} diff --git a/packages/devtools/src/overlay.ts b/packages/devtools/src/overlay.ts index 47731f76..a38fd197 100644 --- a/packages/devtools/src/overlay.ts +++ b/packages/devtools/src/overlay.ts @@ -18,6 +18,7 @@ import { attachErrors } from './errors-collector.ts'; import { attachLeaks } from './leaks-collector.ts'; import { attachPlugins } from './plugins-collector.ts'; import { attachStartup } from './startup-timing.ts'; +import { attachIonic } from './ionic-collector.ts'; import { attachBrowserTools } from './browser-tools.ts'; import { attachAxe, axeOwnerNg } from './axe-runner.ts'; import { createRecentWrites } from './error-explain.ts'; @@ -599,6 +600,8 @@ async function startOverlay( }) : null; const startup = on.injectors ? attachStartup(my, pageId, getNg, { tickMs }) : null; + // Ionic's `ion-router-outlet` stacks, shown in the Capacitor tab. + const ionic = on.capacitor ? attachIonic(my, pageId, getNg, { tickMs }) : null; // Runs axe-core only when the panel or an agent asks; it loads axe-core then. // The component owning each element is component data: only with that inspector on. const axe = attachAxe(my, pageId, axeOwnerNg(on.components, getNg)); @@ -839,6 +842,7 @@ async function startOverlay( }), plugins && paced(() => void plugins.push().catch(() => {})), startup && paced(() => void startup.push().catch(() => {})), + ionic && paced(() => void ionic.push().catch(() => {})), ].filter((collect) => typeof collect === 'function'); const pushAll = () => collectors.forEach((run) => run()); pushAll(); @@ -1113,6 +1117,7 @@ async function startOverlay( leaks?.leave(); plugins?.leave(); startup?.leave(); + ionic?.leave(); angularInfo.leave(); browserTools.leave(); }; @@ -1127,6 +1132,7 @@ async function startOverlay( leaks?.resume(); plugins?.resume(); startup?.resume(); + ionic?.resume(); browserTools.resume(); void lease.refresh(); left = false; @@ -1170,6 +1176,7 @@ async function startOverlay( leaks?.stop(); plugins?.stop(); startup?.stop(); + ionic?.stop(); browserTools.stop(); axe.stop(); cd?.stop(); diff --git a/packages/devtools/src/rpc/ionic-register.ts b/packages/devtools/src/rpc/ionic-register.ts new file mode 100644 index 00000000..9bf5af23 --- /dev/null +++ b/packages/devtools/src/rpc/ionic-register.ts @@ -0,0 +1,194 @@ +import { createSharedState } from 'devframe/utils/shared-state'; +import { + MAX_OUTLETS, + MAX_PAGES, + type IonicDirection, + type IonicOutlet, + type IonicReport, + type IonicStackPage, +} from '../ionic-collector.ts'; +import { redactMessage, redactUrl } from '../router.ts'; +import { trackPageSessions } from './page-sessions.ts'; +import type { PageTtl } from './page-ttl.ts'; + +type AnyRecord = Record; + +export interface IonicPage extends IonicReport { + reportedAt: number; +} + +/** The `ionic` shared state, part of the Capacitor inspector. */ +export interface IonicState { + pages: Record; +} + +const DIRECTIONS: readonly string[] = ['forward', 'back', 'root']; + +function record(value: unknown): AnyRecord { + return value && typeof value === 'object' && !Array.isArray(value) ? (value as AnyRecord) : {}; +} + +function text(value: unknown, max: number): string | undefined { + return typeof value === 'string' && value ? redactMessage(value).slice(0, max) : undefined; +} + +function id(value: unknown): string | undefined { + return typeof value === 'string' && /^[\w-]{1,60}$/.test(value) ? value : undefined; +} + +function count(value: unknown): number | undefined { + return typeof value === 'number' && Number.isInteger(value) && value > 0 ? value : undefined; +} + +function toStackPage(value: unknown): IonicStackPage | null { + const page = record(value); + const elementId = id(page['elementId']); + const tag = text(page['tag'], 100); + if (!elementId || !tag) return null; + const out: IonicStackPage = { + component: text(page['component'], 200) ?? tag, + tag, + active: page['active'] === true, + elementId, + }; + if (typeof page['url'] === 'string') out.url = redactUrl(page['url'].slice(0, 2000)); + return out; +} + +function toOutlet(value: unknown): IonicOutlet | null { + const outlet = record(value); + const outletId = id(outlet['id']); + if (!outletId) return null; + const pages = (Array.isArray(outlet['pages']) ? outlet['pages'] : []) + .slice(0, MAX_PAGES) + .map(toStackPage) + .filter((page): page is IonicStackPage => page !== null); + const out: IonicOutlet = { + id: outletId, + name: text(outlet['name'], 100) ?? 'primary', + source: outlet['source'] === 'dom' ? 'dom' : 'angular', + pages, + }; + if (typeof outlet['tabs'] === 'string' && outlet['tabs']) { + out.tabs = redactUrl(outlet['tabs'].slice(0, 2000)); + } + const truncated = count(outlet['truncated']); + if (truncated) out.truncated = truncated; + if (typeof outlet['canGoBack'] === 'boolean') out.canGoBack = outlet['canGoBack']; + if (DIRECTIONS.includes(outlet['direction'])) { + out.direction = outlet['direction'] as IonicDirection; + if (outlet['directionSource'] === 'event' || outlet['directionSource'] === 'inferred') { + out.directionSource = outlet['directionSource']; + } + if (typeof outlet['animated'] === 'boolean') out.animated = outlet['animated']; + if (outlet['tabSwitch'] === true) out.tabSwitch = true; + } + return out; +} + +/** Reads a `push-ionic` report; `null` when it is not one. Every string is redacted again. */ +export function toIonicPage(message: unknown, now = Date.now()): IonicPage | null { + const report = record(message); + const pageId = report['pageId']; + if (typeof pageId !== 'string' || !pageId || pageId.length >= 50) return null; + if (!Array.isArray(report['outlets'])) return null; + const outlets = report['outlets'] + .slice(0, MAX_OUTLETS) + .map(toOutlet) + .filter((outlet): outlet is IonicOutlet => outlet !== null); + const page: IonicPage = { + pageId, + url: typeof report['url'] === 'string' ? redactUrl(report['url'].slice(0, 2000)) : '', + title: text(report['title'], 200) ?? '', + framework: report['framework'] === '@ionic/angular' ? '@ionic/angular' : '@ionic/core', + outlets, + reportedAt: now, + }; + const mode = text(report['mode'], 20); + if (mode) page.mode = mode; + const truncated = count(report['truncatedOutlets']); + if (truncated) page.truncatedOutlets = truncated; + return page; +} + +interface Scoped { + rpc: { sharedState(name: string, options: AnyRecord): Promise }; +} + +export interface IonicHost { + my: Scoped; + rpcHost: unknown; + register(definition: AnyRecord): void; + owns(pageId: unknown): pageId is string; + mayForget(pageId: unknown): pageId is string; + ttl: PageTtl; +} + +export interface IonicRegistration { + pages(): { pageId: string; reportedAt: number; url?: string; title?: string }[]; + expire(now?: number): void; +} + +/** + * Ionic page stacks on the server, part of the Capacitor inspector: the + * `ionic` shared state and the `push-ionic` and `forget-ionic-page` RPC + * functions. One entry per page, dropped after the page TTL. + */ +export async function registerIonic(host: IonicHost): Promise { + const shared = await host.my.rpc.sharedState('ionic', { + sharedState: createSharedState({ + initialValue: { pages: {} }, + enablePatches: true, + }), + }); + const state = () => shared['value']() as IonicState; + const drop = (pageIds: readonly string[]) => { + const present = pageIds.filter((pageId) => state().pages[pageId]); + if (!present.length) return; + shared['mutate']((draft: IonicState) => { + for (const pageId of present) delete draft.pages[pageId]; + }); + }; + const sessions = trackPageSessions(host.rpcHost, drop); + + host.register({ + name: 'push-ionic', + type: 'action', + jsonSerializable: true, + handler: (message: unknown) => { + const page = toIonicPage(message); + if (!page || !host.owns(page.pageId)) return; + sessions.bind(page.pageId); + shared['mutate']((draft: IonicState) => { + draft.pages[page.pageId] = page; + }); + }, + }); + + host.register({ + name: 'forget-ionic-page', + type: 'action', + jsonSerializable: true, + handler: (pageId: unknown) => { + if (!host.mayForget(pageId)) return; + sessions.unbind(pageId); + drop([pageId]); + }, + }); + + return { + pages: () => + Object.values(state().pages).map((page) => ({ + pageId: page.pageId, + reportedAt: page.reportedAt, + url: page.url, + title: page.title, + })), + expire: (now = Date.now()) => + drop( + Object.values(state().pages) + .filter((page) => now - page.reportedAt > host.ttl(page.pageId)) + .map((page) => page.pageId), + ), + }; +} From cbdc8e2a4d58491e2f9ab688f9cff3b7f1cee56b Mon Sep 17 00:00:00 2001 From: erKam Date: Sat, 7 Nov 2026 19:08:08 +0000 Subject: [PATCH 05/25] feat: show Ionic page stacks in the Capacitor tab The Capacitor tab gets an Ionic page stacks section with a card per ion-router-outlet of the page it shows: the pages in the stack oldest first, the active one, the last navigation direction and whether it can go back. Hovering or focusing a page outlines it in the app. --- app/src/__tests__/capacitor-ionic.test.ts | 123 ++++++++ app/src/pages/capacitor-inspector.ts | 5 +- app/src/pages/capacitor-ionic.ts | 352 ++++++++++++++++++++++ 3 files changed, 479 insertions(+), 1 deletion(-) create mode 100644 app/src/__tests__/capacitor-ionic.test.ts create mode 100644 app/src/pages/capacitor-ionic.ts diff --git a/app/src/__tests__/capacitor-ionic.test.ts b/app/src/__tests__/capacitor-ionic.test.ts new file mode 100644 index 00000000..8fe6f2eb --- /dev/null +++ b/app/src/__tests__/capacitor-ionic.test.ts @@ -0,0 +1,123 @@ +import { TestBed, type ComponentFixture } from '@angular/core/testing'; +import type { DevframeRpcClient } from 'devframe/client'; +import { afterEach, describe, expect, it } from 'vitest'; +import { CapacitorIonic, directionText, type IonicPage } from '../pages/capacitor-ionic'; + +function ionicPage(pageId = 'tab1'): IonicPage { + return { + pageId, + url: '/tabs/tab1/detail', + title: 'Ionic app', + framework: '@ionic/angular', + mode: 'ios', + reportedAt: 1, + outlets: [ + { + id: 'c1-1', + name: 'primary', + tabs: '/tabs/tab1', + source: 'angular', + canGoBack: true, + direction: 'back', + directionSource: 'event', + animated: true, + pages: [ + { + component: 'HomePage', + tag: 'app-home', + url: '/tabs/tab1', + active: true, + elementId: 'e1', + }, + { + component: 'DetailPage', + tag: 'app-detail', + url: '/tabs/tab1/detail', + active: false, + elementId: 'e2', + }, + ], + }, + ], + }; +} + +function fakeClient(pages: IonicPage[]) { + const calls: { name: string; arg: unknown }[] = []; + const rpc = { + call: (name: string, arg: unknown) => { + calls.push({ name, arg }); + return Promise.resolve(null); + }, + callEvent: () => Promise.resolve(), + sharedState: (name: string) => + Promise.resolve({ + value: () => + name === 'ionic' ? { pages: Object.fromEntries(pages.map((p) => [p.pageId, p])) } : {}, + on: () => () => {}, + }), + }; + const client = { connectionMeta: {}, scope: () => ({ rpc }) } as unknown as DevframeRpcClient; + return { client, calls }; +} + +async function settle(fixture: ComponentFixture) { + for (let i = 0; i < 3; i++) { + await new Promise((resolve) => setTimeout(resolve)); + await fixture.whenStable(); + } +} + +afterEach(() => { + document.body.innerHTML = ''; +}); + +describe('CapacitorIonic', () => { + it('lists the page stack of each outlet with the active page and the last direction', async () => { + const { client, calls } = fakeClient([ionicPage()]); + const fixture = TestBed.createComponent(CapacitorIonic); + fixture.componentRef.setInput('rpc', client); + fixture.componentRef.setInput('pageId', 'tab1'); + document.body.append(fixture.nativeElement); + await settle(fixture); + const host = fixture.nativeElement as HTMLElement; + expect(host.querySelector('h2')?.textContent).toBe('Ionic page stacks'); + const rows = Array.from(host.querySelectorAll('.stack-page')); + expect(rows.map((row) => row.querySelector('.component')?.textContent)).toEqual([ + 'HomePage', + 'DetailPage', + ]); + expect(rows[0].getAttribute('aria-current')).toBe('page'); + expect(rows[1].getAttribute('aria-current')).toBeNull(); + expect(host.textContent).toContain('/tabs/tab1'); + expect(host.textContent).toContain('Back'); + + rows[1].dispatchEvent(new Event('focus')); + expect(calls.at(-1)).toEqual({ + name: 'request-page-highlight', + arg: { pageId: 'tab1', id: 'e2', reveal: false }, + }); + rows[1].dispatchEvent(new Event('blur')); + expect(calls.at(-1)).toEqual({ name: 'request-page-highlight', arg: null }); + }); + + it('shows nothing for a page that does not use Ionic', async () => { + const { client } = fakeClient([ionicPage('other')]); + const fixture = TestBed.createComponent(CapacitorIonic); + fixture.componentRef.setInput('rpc', client); + fixture.componentRef.setInput('pageId', 'tab1'); + await settle(fixture); + expect((fixture.nativeElement as HTMLElement).querySelector('section')).toBeNull(); + }); + + it('words the direction with its source', () => { + const outlet = ionicPage().outlets[0]; + expect(directionText({ ...outlet, direction: undefined })).toBe('Not seen yet'); + expect(directionText({ ...outlet, directionSource: 'inferred', direction: 'forward' })).toBe( + 'Forward (from the stack)', + ); + expect(directionText({ ...outlet, direction: 'root', tabSwitch: true, animated: false })).toBe( + 'Root (tab switch, no animation)', + ); + }); +}); diff --git a/app/src/pages/capacitor-inspector.ts b/app/src/pages/capacitor-inspector.ts index 6218ea55..020beb43 100644 --- a/app/src/pages/capacitor-inspector.ts +++ b/app/src/pages/capacitor-inspector.ts @@ -19,6 +19,7 @@ import { LimitNote } from '../ui/limit-note'; import { Select, type SelectOption } from '../ui/select'; import { panelConfig } from '../devtools-config'; import { CapacitorCallDetail } from './capacitor-call-detail'; +import { CapacitorIonic } from './capacitor-ionic'; import { CapacitorState, pluginStateCards } from './capacitor-state'; import { SLOW_MS, @@ -53,7 +54,7 @@ const FILTER_LABELS: Record = { @Component({ selector: 'app-capacitor-inspector', - imports: [LimitNote, Select, CapacitorCallDetail, CapacitorState], + imports: [LimitNote, Select, CapacitorCallDetail, CapacitorIonic, CapacitorState], template: ` @if (!loaded()) {

Loading Capacitor data…

@@ -163,6 +164,8 @@ const FILTER_LABELS: Record = { } + +

Plugin calls

@if (!page.info.bridge && !page.info.webCalls) { diff --git a/app/src/pages/capacitor-ionic.ts b/app/src/pages/capacitor-ionic.ts new file mode 100644 index 00000000..b256128f --- /dev/null +++ b/app/src/pages/capacitor-ionic.ts @@ -0,0 +1,352 @@ +import { Component, DestroyRef, computed, effect, inject, input, signal } from '@angular/core'; +import type { DevframeRpcClient } from 'devframe/client'; + +/** One page in an `ion-router-outlet` stack, as `push-ionic` reports it. */ +export interface IonicStackPage { + component: string; + tag: string; + url?: string; + active: boolean; + elementId: string; +} + +/** One `ion-router-outlet` and its page stack, oldest page first. */ +export interface IonicOutlet { + id: string; + name: string; + tabs?: string; + source: 'angular' | 'dom'; + pages: IonicStackPage[]; + truncated?: number; + canGoBack?: boolean; + direction?: 'forward' | 'back' | 'root'; + directionSource?: 'event' | 'inferred'; + animated?: boolean; + tabSwitch?: boolean; +} + +/** One page's Ionic report in the `ionic` shared state. */ +export interface IonicPage { + pageId: string; + url: string; + title: string; + framework: '@ionic/angular' | '@ionic/core'; + mode?: string; + outlets: IonicOutlet[]; + truncatedOutlets?: number; + reportedAt: number; +} + +/** The Ionic pages in the `ionic` shared state. */ +export function ionicPages(value: unknown): IonicPage[] { + const pages = (value as { pages?: Record } | undefined)?.pages; + return pages && typeof pages === 'object' ? Object.values(pages) : []; +} + +const DIRECTION_LABELS: Record, string> = { + forward: 'Forward', + back: 'Back', + root: 'Root', +}; + +/** The direction of an outlet's last navigation, in words. */ +export function directionText(outlet: IonicOutlet): string { + if (!outlet.direction) return 'Not seen yet'; + const label = DIRECTION_LABELS[outlet.direction]; + if (outlet.directionSource === 'inferred') return `${label} (from the stack)`; + const notes = [ + outlet.tabSwitch ? 'tab switch' : null, + outlet.animated === false ? 'no animation' : null, + ].filter(Boolean); + return notes.length ? `${label} (${notes.join(', ')})` : label; +} + +/** + * The page stack of each `ion-router-outlet` of one page, in the Capacitor + * tab. It reads the `ionic` shared state only; hovering a page outlines it in + * the app. + */ +@Component({ + selector: 'app-capacitor-ionic', + template: ` + @if (page(); as page) { +
+

Ionic page stacks

+

+ Each ion-router-outlet keeps the pages it has shown in a stack, oldest first. + Read through {{ page.framework }}{{ page.mode ? ' in ' + page.mode + ' mode' : '' }}. The panel changes nothing in the + app. +

+ @if (!page.outlets.length) { +

This page has no ion-router-outlet.

+ } @else { +
+ @for (outlet of page.outlets; track outlet.id) { +
+

+ ion-router-outlet + @if (outlet.name !== 'primary') { + {{ outlet.name }} + } + @if (outlet.tabs) { + in tabs {{ outlet.tabs }} + } +

+
+
+
Pages
+
{{ outlet.pages.length + (outlet.truncated ?? 0) }}
+
+
+
Last navigation
+
{{ directionText(outlet) }}
+
+ @if (outlet.canGoBack !== undefined) { +
+
Can go back
+
{{ outlet.canGoBack ? 'Yes' : 'No' }}
+
+ } +
+ @if (outlet.pages.length) { +
    + @for (item of outlet.pages; track item.elementId; let i = $index) { +
  1. + +
  2. + } +
+ } @else { +

No page in this outlet yet.

+ } + @if (outlet.truncated) { +

{{ outlet.truncated }} older pages are not listed.

+ } + @if (outlet.source === 'dom') { +

+ Read from the outlet's pages in the DOM, without URLs. The Angular directive was + not found: the app may not use @ionic/angular, or it is not a + development build. +

+ } +
+ } +
+ @if (page.truncatedOutlets) { +

{{ page.truncatedOutlets }} more outlets are not listed.

+ } + } +
+ } + `, + styles: ` + @use 'mixins' as m; + + :host { + display: block; + } + section { + margin: 0 0 24px; + } + h2 { + margin: 0 0 12px; + color: var(--text-strong); + font-size: 15px; + } + .lead, + .note, + .empty { + margin: 0 0 12px; + color: var(--text-2); + line-height: 1.5; + } + .note { + margin: 8px 0 0; + font-size: 12px; + } + code { + font-family: var(--font-mono); + font-size: 12px; + overflow-wrap: anywhere; + } + .cards { + display: grid; + gap: 12px; + } + .card { + @include m.panel; + padding: 12px; + min-width: 0; + } + h3 { + display: flex; + flex-wrap: wrap; + gap: 4px 8px; + align-items: baseline; + margin: 0 0 8px; + color: var(--text-strong); + font-size: 14px; + } + .tabs { + color: var(--text-2); + font-size: 12px; + font-weight: 400; + } + dl { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); + gap: 8px 16px; + margin: 0 0 10px; + } + dl > div { + min-width: 0; + } + dt { + @include m.label; + margin: 0 0 2px; + } + dd { + margin: 0; + color: var(--text-strong); + overflow-wrap: anywhere; + } + .stack { + display: grid; + gap: 4px; + margin: 0; + padding: 0; + list-style: none; + } + .stack-page { + display: flex; + flex-wrap: wrap; + gap: 4px 8px; + align-items: center; + width: 100%; + min-height: var(--control-h); + padding: 6px 10px; + border: 1px solid var(--border); + border-radius: var(--radius-sm); + background: var(--surface); + color: var(--text); + font: inherit; + text-align: left; + cursor: pointer; + transition: background-color 150ms var(--ease); + } + .stack-page:hover { + background: var(--surface-2); + } + .stack-page.active { + border-color: var(--accent-line); + background: var(--accent-soft); + } + .stack-page:focus-visible { + @include m.focus-ring(-2px); + } + .index { + min-width: 18px; + color: var(--text-2); + font-size: 12px; + font-variant-numeric: tabular-nums; + } + .component { + color: var(--text-strong); + } + .url { + flex: 1 1 160px; + min-width: 0; + color: var(--text-2); + } + .chip { + margin-left: auto; + padding: 1px 8px; + border: 1px solid transparent; + border-radius: 99px; + font-size: 11px; + font-weight: 600; + @include m.tint(accent); + } + @media (prefers-reduced-motion: reduce) { + .stack-page { + transition: none; + } + } + `, +}) +export class CapacitorIonic { + readonly rpc = input(null); + /** The page the Capacitor tab shows. */ + readonly pageId = input(null); + + readonly pages = signal([]); + readonly page = computed(() => { + const id = this.pageId(); + return id ? (this.pages().find((page) => page.pageId === id) ?? null) : null; + }); + protected readonly directionText = directionText; + + private readonly destroyRef = inject(DestroyRef); + private unsubscribe: (() => void) | null = null; + + constructor() { + effect(() => { + const client = this.rpc(); + if (client) void this.load(client); + }); + this.destroyRef.onDestroy(() => { + this.unsubscribe?.(); + this.highlight(null); + }); + } + + private async load(client: DevframeRpcClient) { + try { + const state = await client.scope('pangular').rpc.sharedState('ionic'); + if (this.destroyRef.destroyed) return; + const apply = (value: unknown) => this.pages.set(ionicPages(value)); + apply(state.value()); + this.unsubscribe?.(); + this.unsubscribe = state.on('updated', apply); + } catch { + this.pages.set([]); + } + } + + outletLabel(outlet: IonicOutlet): string { + return outlet.name === 'primary' ? 'the primary outlet' : `outlet ${outlet.name}`; + } + + /** Outlines a page of the stack in the app, or clears the outline. */ + highlight(item: IonicStackPage | null, reveal = false) { + const client = this.rpc(); + if (!client) return; + const target = item ? { pageId: this.pageId(), id: item.elementId, reveal } : null; + void client + .scope('pangular') + .rpc.call('request-page-highlight', target) + .catch(() => {}); + } +} From 99f4fbbcc0065c4fecd05ee34afbe160f73fa4fc Mon Sep 17 00:00:00 2001 From: erKam Date: Sat, 7 Nov 2026 19:08:10 +0000 Subject: [PATCH 06/25] docs(docs): document Ionic page stacks on the Capacitor page --- apps/docs/src/content/inspectors/capacitor.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/apps/docs/src/content/inspectors/capacitor.md b/apps/docs/src/content/inspectors/capacitor.md index 27e10ee2..a3c692c4 100644 --- a/apps/docs/src/content/inspectors/capacitor.md +++ b/apps/docs/src/content/inspectors/capacitor.md @@ -118,6 +118,22 @@ The card shows when the page has the plugin. One plugin has a card: `Foldable`, | **Active display** | `activeDisplay` of `getFoldState()` and `foldStateChange` | | **Size class** | `widthClass` and `heightClass` of `getSizeClass()` and `sizeClassChange` | +### Ionic page stacks + +When the page uses Ionic, the tab shows an **Ionic page stacks** section with a card for each `ion-router-outlet`. An outlet keeps the pages it has shown in a stack, so the card lists them oldest first and marks the page shown now as **Active**. + +| Field | What it is | +| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Pages** | How many pages the stack holds. | +| **Last navigation** | **Forward**, **Back** or **Root**: the direction of the outlet's last navigation, with **tab switch** or **no animation** when Ionic said so. **(from the stack)** marks a direction the overlay inferred. **Not seen yet** before the first navigation. | +| **Can go back** | Whether the stack of the active page has a page to go back to. | + +Each row shows the page's component and, with `@ionic/angular`, the URL Ionic stored for it. Hover or focus a row to outline the page in the app, and select it to scroll to it. A page Ionic hid in the stack can show no outline. An outlet inside `ion-tabs` shows its tab URL, and a named outlet shows its name. + +The overlay reads the stack through the `IonRouterOutlet` directive of `@ionic/angular`, from `ng.getDirectives()`, so it needs a development build. Without the directive, the card reads the outlet's `.ion-page` children from the DOM: the active page is the last one without `ion-page-hidden`, and there are no URLs. The direction comes from the outlet's `stackDidChange` output, which the overlay listens to without changing it. Before the first event, the overlay infers it from how the stack changed. It changes nothing in the app. + +The section shows when the page the tab shows has an `ion-app` or an `ion-router-outlet`. It lists up to 20 outlets with up to 50 pages each, and says how many it left out. URLs are masked like router URLs. + ## Where the data comes from A plugin's native calls go through `Capacitor.nativePromise` and `Capacitor.nativeCallback`. The overlay wraps both on the page to watch the calls, and passes every argument and result through unchanged. It never adds plugin listeners of its own. This works with plugins the app registered before the overlay loaded, in Capacitor 6, 7 and 8. @@ -183,7 +199,7 @@ See [Tools](../agents/tools.md#capacitor) for their arguments. The page and the server keep the latest [`limits.capacitorCalls`](../getting-started/configuration.md#limits) calls, 200 by default. When older calls are dropped, the tab says how many. -To turn the inspector off, set `inspectors.capacitor` to `false`. The tab, the dock, the page collector and both agent tools go away. See [Inspectors and agent tools](../getting-started/configuration.md#inspectors-and-agent-tools). +To turn the inspector off, set `inspectors.capacitor` to `false`. The tab, the dock, the page collectors (Capacitor and Ionic) and both agent tools go away. See [Inspectors and agent tools](../getting-started/configuration.md#inspectors-and-agent-tools). ## FAQ From 32776ce7dd04557ff52843755a54001857887ddd Mon Sep 17 00:00:00 2001 From: erKam Date: Sat, 7 Nov 2026 19:19:29 +0000 Subject: [PATCH 07/25] test: seed Ionic page stacks in the panel axe run --- scripts/panel-axe.mjs | 51 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/scripts/panel-axe.mjs b/scripts/panel-axe.mjs index c8afef2a..6867ec0f 100644 --- a/scripts/panel-axe.mjs +++ b/scripts/panel-axe.mjs @@ -474,8 +474,58 @@ function encodeRecord(value) { return JSON.stringify(out); } +// The Ionic page stacks of the seeded Capacitor device page. +const IONIC_SEED = { + pages: { + device: { + pageId: 'device', + url: '/tabs/trips/detail', + title: 'Trips', + framework: '@ionic/angular', + mode: 'md', + reportedAt: now, + outlets: [ + { + id: 'c-ionic-1', + name: 'primary', + tabs: '/tabs/trips', + source: 'angular', + canGoBack: true, + direction: 'forward', + directionSource: 'event', + animated: true, + pages: [ + { + component: 'TripsPage', + tag: 'app-trips', + url: '/tabs/trips', + active: false, + elementId: 'c-ionic-2', + }, + { + component: 'TripDetailPage', + tag: 'app-trip-detail', + url: '/tabs/trips/detail', + active: true, + elementId: 'c-ionic-3', + }, + ], + }, + { + id: 'c-ionic-4', + name: 'menu', + source: 'dom', + canGoBack: false, + pages: [{ component: 'app-menu', tag: 'app-menu', active: true, elementId: 'c-ionic-5' }], + }, + ], + }, + }, +}; + const SEEDS = { 'pangular:capacitor': CAPACITOR_SEED, + 'pangular:ionic': IONIC_SEED, 'pangular:errors': ERRORS_SEED, 'pangular:component-tree': COMPONENTS_SEED, 'pangular:http': HTTP_SEED, @@ -670,6 +720,7 @@ try { await capacitor.locator('.calls .call').nth(1).click(); await capacitor.locator('#cap-detail').waitFor(); await capacitor.locator('app-capacitor-state article').waitFor(); + await capacitor.locator('app-capacitor-ionic article').first().waitFor(); await capacitor.getByText('possible leak').first().waitFor(); await check(capacitor, `${colorScheme} view=capacitor with an app reporting`); await mustFilter(capacitor, `${colorScheme} view=capacitor`); From 0d287045ea35ccf1555a07b4835709b6a5619dac Mon Sep 17 00:00:00 2001 From: erKam Date: Sat, 7 Nov 2026 19:23:54 +0000 Subject: [PATCH 08/25] build(extension): rebuild extension/ui with the app picker and Ionic page stacks --- ...=> browser-agent-rpc-KH4HHvHf-yqPCd0Qs.js} | 2 +- .../{index-CQR2JOj6.js => index-QbWlsi0R.js} | 329 +++++++++++++----- extension/ui/index.html | 2 +- 3 files changed, 247 insertions(+), 86 deletions(-) rename extension/ui/assets/{browser-agent-rpc-KH4HHvHf-bRoSxJvJ.js => browser-agent-rpc-KH4HHvHf-yqPCd0Qs.js} (95%) rename extension/ui/assets/{index-CQR2JOj6.js => index-QbWlsi0R.js} (81%) diff --git a/extension/ui/assets/browser-agent-rpc-KH4HHvHf-bRoSxJvJ.js b/extension/ui/assets/browser-agent-rpc-KH4HHvHf-yqPCd0Qs.js similarity index 95% rename from extension/ui/assets/browser-agent-rpc-KH4HHvHf-bRoSxJvJ.js rename to extension/ui/assets/browser-agent-rpc-KH4HHvHf-yqPCd0Qs.js index 26c9445d..8ea19527 100644 --- a/extension/ui/assets/browser-agent-rpc-KH4HHvHf-bRoSxJvJ.js +++ b/extension/ui/assets/browser-agent-rpc-KH4HHvHf-yqPCd0Qs.js @@ -1 +1 @@ -import{t as e}from"./index-CQR2JOj6.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(){let e=typeof document>`u`?void 0:document;return{url:e?.location?.href??``,title:e?.title??``,visible:!e||e.visibilityState===`visible`,focused:e?.hasFocus()??!0}}function u(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a,l()).catch(()=>{}))}))},s=a(o),u=e.events.on(`connection:status`,e=>{e===`connected`&&o()}),d=typeof window>`u`?void 0:window;return d?.addEventListener(`focus`,o),d?.addEventListener(`blur`,o),d?.document.addEventListener(`visibilitychange`,o),o(),()=>{n=!0,s(),u(),d?.removeEventListener(`focus`,o),d?.removeEventListener(`blur`,o),d?.document.removeEventListener(`visibilitychange`,o)}}export{u as setupBrowserAgentRpcBridge}; \ No newline at end of file +import{t as e}from"./index-QbWlsi0R.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(){let e=typeof document>`u`?void 0:document;return{url:e?.location?.href??``,title:e?.title??``,visible:!e||e.visibilityState===`visible`,focused:e?.hasFocus()??!0}}function u(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a,l()).catch(()=>{}))}))},s=a(o),u=e.events.on(`connection:status`,e=>{e===`connected`&&o()}),d=typeof window>`u`?void 0:window;return d?.addEventListener(`focus`,o),d?.addEventListener(`blur`,o),d?.document.addEventListener(`visibilitychange`,o),o(),()=>{n=!0,s(),u(),d?.removeEventListener(`focus`,o),d?.removeEventListener(`blur`,o),d?.document.removeEventListener(`visibilitychange`,o)}}export{u as setupBrowserAgentRpcBridge}; \ No newline at end of file diff --git a/extension/ui/assets/index-CQR2JOj6.js b/extension/ui/assets/index-QbWlsi0R.js similarity index 81% rename from extension/ui/assets/index-CQR2JOj6.js rename to extension/ui/assets/index-QbWlsi0R.js index 154d7cc5..24ecf04e 100644 --- a/extension/ui/assets/index-CQR2JOj6.js +++ b/extension/ui/assets/index-QbWlsi0R.js @@ -3,12 +3,12 @@ \r \v ᠎ - \u2028\u2029   `;`${Gt}`,`${Gt}`;var Kt=(function(e){return e[e.Character=0]=`Character`,e[e.Identifier=1]=`Identifier`,e[e.PrivateIdentifier=2]=`PrivateIdentifier`,e[e.Keyword=3]=`Keyword`,e[e.String=4]=`String`,e[e.Operator=5]=`Operator`,e[e.Number=6]=`Number`,e[e.RegExpBody=7]=`RegExpBody`,e[e.RegExpFlags=8]=`RegExpFlags`,e[e.Error=9]=`Error`,e})(Kt||{}),qt=(function(e){return e[e.Plain=0]=`Plain`,e[e.TemplateLiteralPart=1]=`TemplateLiteralPart`,e[e.TemplateLiteralEnd=2]=`TemplateLiteralEnd`,e})(qt||{});Kt.Character,x.StyleMap,x.ClassMap,x.StyleProp,x.ClassProp,x.Attribute,x.Property,x.Attribute,x.Control,x.DomProperty,x.DomProperty,x.Attribute,x.StyleMap,x.ClassMap,x.StyleProp,x.ClassProp,x.Listener,x.TwoWayListener,x.AnimationListener,x.StyleMap,x.ClassMap,x.StyleProp,x.ClassProp,x.Property,x.TwoWayProperty,x.DomProperty,x.Attribute,x.Animation,x.Control,Bt.Idle,b.deferOnIdle,b.deferPrefetchOnIdle,b.deferHydrateOnIdle,Bt.Immediate,b.deferOnImmediate,b.deferPrefetchOnImmediate,b.deferHydrateOnImmediate,Bt.Timer,b.deferOnTimer,b.deferPrefetchOnTimer,b.deferHydrateOnTimer,Bt.Hover,b.deferOnHover,b.deferPrefetchOnHover,b.deferHydrateOnHover,Bt.Interaction,b.deferOnInteraction,b.deferPrefetchOnInteraction,b.deferHydrateOnInteraction,Bt.Viewport,b.deferOnViewport,b.deferPrefetchOnViewport,b.deferHydrateOnViewport,Bt.Never,b.deferHydrateNever,b.deferHydrateNever,b.deferHydrateNever,b.pipeBind1,b.pipeBind2,b.pipeBind3,b.pipeBind4,b.textInterpolate,b.textInterpolate1,b.textInterpolate2,b.textInterpolate3,b.textInterpolate4,b.textInterpolate5,b.textInterpolate6,b.textInterpolate7,b.textInterpolate8,b.textInterpolateV,b.interpolate,b.interpolate1,b.interpolate2,b.interpolate3,b.interpolate4,b.interpolate5,b.interpolate6,b.interpolate7,b.interpolate8,b.interpolateV,b.pureFunction0,b.pureFunction1,b.pureFunction2,b.pureFunction3,b.pureFunction4,b.pureFunction5,b.pureFunction6,b.pureFunction7,b.pureFunction8,b.pureFunctionV,b.resolveWindow,b.resolveDocument,b.resolveBody,nt.HTML,b.sanitizeHtml,nt.RESOURCE_URL,b.sanitizeResourceUrl,nt.SCRIPT,b.sanitizeScript,nt.STYLE,b.sanitizeStyle,nt.URL,b.sanitizeUrl,nt.ATTRIBUTE_NO_BINDING,b.validateAttribute,nt.HTML,b.trustConstantHtml,nt.RESOURCE_URL,b.trustConstantResourceUrl;var Jt=(function(e){return e[e.None=0]=`None`,e[e.ViewContextRead=1]=`ViewContextRead`,e[e.ViewContextWrite=2]=`ViewContextWrite`,e[e.SideEffectful=4]=`SideEffectful`,e})(Jt||{});S.Tmpl,S.Tmpl,S.Both,S.Host,S.Tmpl,S.Tmpl,S.Tmpl,S.Both,S.Both,S.Both,S.Tmpl,S.Both,S.Both,S.Tmpl,S.Both,S.Tmpl,S.Both,S.Both,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Both,S.Both,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Both,S.Both,S.Both,S.Tmpl,S.Tmpl,S.Both,S.Tmpl,S.Tmpl,S.Tmpl,S.Both,S.Both,S.Tmpl,S.Both,S.Both,S.Both,S.Both,S.Both,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Both,S.Tmpl,S.Both,S.Tmpl,S.Both,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Both,S.Both,S.Both,wt.Property,Ft.Property,wt.TwoWay,Ft.TwoWayProperty,wt.Attribute,Ft.Attribute,wt.Class,Ft.ClassName,wt.Style,Ft.StyleProperty,wt.LegacyAnimation,Ft.LegacyAnimation,wt.Animation,Ft.Animation;var Yt=`%COMP%`;`${Yt}`,`${Yt}`,class e{static SINGLETON=new e;static veWillInferAnyFor(t){let n=e.SINGLETON;return t instanceof Ct?t.visit(n):t.receiver.visit(n)}visitUnary(e){return e.expr.visit(this)}visitBinary(e){return e.left.visit(this)||e.right.visit(this)}visitChain(){return!1}visitConditional(e){return e.condition.visit(this)||e.trueExp.visit(this)||e.falseExp.visit(this)}visitCall(){return!0}visitSafeCall(){return!1}visitImplicitReceiver(){return!1}visitThisReceiver(){return!1}visitInterpolation(e){return e.expressions.some(e=>e.visit(this))}visitKeyedRead(){return!1}visitLiteralArray(){return!0}visitLiteralMap(){return!0}visitLiteralPrimitive(){return!1}visitPipe(){return!0}visitPrefixNot(e){return e.expression.visit(this)}visitTypeofExpression(e){return e.expression.visit(this)}visitVoidExpression(e){return e.expression.visit(this)}visitNonNullAssert(e){return e.expression.visit(this)}visitPropertyRead(){return!1}visitSafePropertyRead(){return!1}visitSafeKeyedRead(){return!1}visitTemplateLiteral(){return!1}visitTemplateLiteralElement(){return!1}visitTaggedTemplateLiteral(){return!1}visitParenthesizedExpression(e){return e.expression.visit(this)}visitRegularExpressionLiteral(){return!1}visitSpreadElement(e){return e.expression.visit(this)}visitArrowFunction(e,t){return!1}};var Xt=null,Zt=!1,Qt=1,$t=null,en=Symbol(`SIGNAL`);function tn(e){let t=Xt;return Xt=e,t}function nn(){return Xt}var rn={version:0,lastCleanEpoch:0,dirty:!1,producers:void 0,producersTail:void 0,consumers:void 0,consumersTail:void 0,recomputing:!1,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:`unknown`,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function an(e){if(Zt)throw Error(``);if(Xt===null)return;Xt.consumerOnSignalRead(e);let t=Xt.producersTail;if(t!==void 0&&t.producer===e)return;let n,r=Xt.recomputing;if(r&&(n=t===void 0?Xt.producers:t.nextProducer,n!==void 0&&n.producer===e)){Xt.producersTail=n,n.lastReadVersion=e.version,n.knownValidAtEpoch=Qt;return}let i=e.consumersTail;if(i!==void 0&&i.consumer===Xt&&(!r||i.knownValidAtEpoch===Qt))return;let a=bn(Xt),o={producer:e,consumer:Xt,nextProducer:n,prevConsumer:void 0,knownValidAtEpoch:Qt,lastReadVersion:e.version,nextConsumer:void 0};Xt.producersTail=o,t===void 0?Xt.producers=o:t.nextProducer=o,a&&vn(e,o)}function on(){Qt++}function sn(e){if((!bn(e)||e.dirty)&&(e.dirty||e.lastCleanEpoch!==Qt)){if(!e.producerMustRecompute(e)&&!gn(e)){dn(e);return}e.producerRecomputeValue(e),dn(e)}}function cn(e){if(e.consumers===void 0)return;let t=Zt;Zt=!0;try{for(let t=e.consumers;t!==void 0;t=t.nextConsumer){let e=t.consumer;e.dirty||un(e)}}finally{Zt=t}}function ln(){return Xt?.consumerAllowSignalWrites!==!1}function un(e){e.dirty=!0,cn(e),e.consumerMarkedDirty?.(e)}function dn(e){e.dirty=!1,e.lastCleanEpoch=Qt}function fn(e){return e&&pn(e),tn(e)}function pn(e){if(e.producersTail?.knownValidAtEpoch===Qt){let t=e.producers;for(;t!==void 0;)t.knownValidAtEpoch=null,t=t.nextProducer}e.producersTail=void 0,e.recomputing=!0}function mn(e,t){tn(t),e&&hn(e)}function hn(e){e.recomputing=!1;let t=e.producersTail,n=t===void 0?e.producers:t.nextProducer;if(n!==void 0){if(bn(e))do n=yn(n);while(n!==void 0);t===void 0?e.producers=void 0:t.nextProducer=void 0}}function gn(e){for(let t=e.producers;t!==void 0;t=t.nextProducer){let e=t.producer,n=t.lastReadVersion;if(n!==e.version||(sn(e),n!==e.version))return!0}return!1}function _n(e){if(bn(e)){let t=e.producers;for(;t!==void 0;)t=yn(t)}e.producers=void 0,e.producersTail=void 0,e.consumers=void 0,e.consumersTail=void 0}function vn(e,t){let n=e.consumersTail,r=bn(e);if(n===void 0?(t.nextConsumer=void 0,e.consumers=t):(t.nextConsumer=n.nextConsumer,n.nextConsumer=t),t.prevConsumer=n,e.consumersTail=t,!r)for(let t=e.producers;t!==void 0;t=t.nextProducer)vn(t.producer,t)}function yn(e){let t=e.producer,n=e.nextProducer,r=e.nextConsumer,i=e.prevConsumer;if(e.nextConsumer=void 0,e.prevConsumer=void 0,r===void 0?t.consumersTail=i:r.prevConsumer=i,i!==void 0)i.nextConsumer=r;else if(t.consumers=r,!bn(t)){let e=t.producers;for(;e!==void 0;)e=yn(e)}return n}function bn(e){return e.consumerIsAlwaysLive||e.consumers!==void 0}function xn(e){$t?.(e)}function Sn(e,t){return Object.is(e,t)}function Cn(e,t){let n=Object.create(Dn);n.computation=e,t!==void 0&&(n.equal=t);let r=()=>{if(sn(n),an(n),n.value===En)throw n.error;return n.value};return r[en]=n,xn(n),r}var wn=Symbol(`UNSET`),Tn=Symbol(`COMPUTING`),En=Symbol(`ERRORED`),Dn={...rn,value:wn,dirty:!0,error:null,equal:Sn,kind:`computed`,producerMustRecompute(e){return e.value===wn||e.value===Tn},producerRecomputeValue(e){if(e.value===Tn)throw Error(``);let t=e.value;e.value=Tn;let n=fn(e),r,i=!1;try{r=e.computation(),tn(null),i=t!==wn&&t!==En&&r!==En&&e.equal(t,r)}catch(t){r=En,e.error=t}finally{mn(e,n)}if(i){e.value=t;return}e.value=r,e.version++}};function On(){throw Error()}var kn=On;function An(e){kn(e)}function jn(e){kn=e}var Mn=null;function Nn(e,t){let n=Object.create(Ln);n.value=e,t!==void 0&&(n.equal=t);let r=()=>Pn(n);return r[en]=n,xn(n),[r,e=>Fn(n,e),e=>In(n,e)]}function Pn(e){return an(e),e.value}function Fn(e,t){ln()||An(e),e.equal(e.value,t)||(e.value=t,Rn(e))}function In(e,t){ln()||An(e),Fn(e,t(e.value))}var Ln={...rn,equal:Sn,value:void 0,kind:`signal`};function Rn(e){e.version++,on(),cn(e),Mn?.(e)}var zn={...rn,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:`effect`};function Bn(e){if(e.dirty=!1,e.version>0&&!gn(e))return;e.version++;let t=fn(e);try{e.cleanup(),e.fn()}finally{mn(e,t)}}var Vn=void 0;function Hn(){return Vn}function Un(e){let t=Vn;return Vn=e,t}var Wn=Symbol(`NotFound`);function Gn(e){return e===Wn||e?.name===`ɵNotFound`}function Kn(e,t,n){let r=Object.create(Yn);r.source=e,r.computation=t,n!=null&&(r.equal=n);let i=()=>{if(sn(r),an(r),r.value===En)throw r.error;return r.value};return i[en]=r,xn(r),i}function qn(e,t){sn(e),Fn(e,t),dn(e)}function Jn(e,t){if(sn(e),e.value===En)throw e.error;In(e,t),dn(e)}var Yn={...rn,value:wn,dirty:!0,error:null,equal:Sn,kind:`linkedSignal`,producerMustRecompute(e){return e.value===wn||e.value===Tn},producerRecomputeValue(e){if(e.value===Tn)throw Error(``);let t=e.value;e.value=Tn;let n=fn(e),r,i=!1;try{let n=e.source(),a=t!==wn&&t!==En,o=a?{source:e.sourceValue,value:t}:void 0;r=e.computation(n,o),e.sourceValue=n,tn(null),i=a&&r!==En&&e.equal(t,r)}catch(t){r=En,e.error=t}finally{mn(e,n)}if(i){e.value=t;return}e.value=r,e.version++}};function Xn(e){let t=tn(null);try{return e()}finally{tn(t)}}var Zn=function(e,t){return Zn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Zn(e,t)};function Qn(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);Zn(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function $n(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function er(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator==`function`?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function nr(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function rr(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof ir?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function or(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof tr==`function`?tr(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}function sr(e){return typeof e==`function`}function cr(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var lr=cr(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription: `+t.map(function(e,t){return t+1+`) `+e.toString()}).join(` `):``,this.name=`UnsubscriptionError`,this.errors=t}});function ur(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var dr=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a){if(this._parentage=null,Array.isArray(a))try{for(var o=tr(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this)}var c=this.initialTeardown;if(sr(c))try{c()}catch(e){i=e instanceof lr?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=tr(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{mr(f)}catch(e){i??=[],e instanceof lr?i=rr(rr([],nr(i)),nr(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new lr(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)mr(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&ur(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&ur(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),fr=dr.EMPTY;function pr(e){return e instanceof dr||e&&`closed`in e&&sr(e.remove)&&sr(e.add)&&sr(e.unsubscribe)}function mr(e){sr(e)?e():e.unsubscribe()}var hr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},gr={setTimeout:function(e,t){var n=[...arguments].slice(2),r=gr.delegate;return r?.setTimeout?r.setTimeout.apply(r,rr([e,t],nr(n))):setTimeout.apply(void 0,rr([e,t],nr(n)))},clearTimeout:function(e){return(gr.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function _r(e){gr.setTimeout(function(){var t=hr.onUnhandledError;if(t)t(e);else throw e})}function vr(){}var yr=(function(){return Sr(`C`,void 0,void 0)})();function br(e){return Sr(`E`,void 0,e)}function xr(e){return Sr(`N`,e,void 0)}function Sr(e,t,n){return{kind:e,value:t,error:n}}var Cr=null;function wr(e){if(hr.useDeprecatedSynchronousErrorHandling){var t=!Cr;if(t&&(Cr={errorThrown:!1,error:null}),e(),t){var n=Cr,r=n.errorThrown,i=n.error;if(Cr=null,r)throw i}}else e()}function Tr(e){hr.useDeprecatedSynchronousErrorHandling&&Cr&&(Cr.errorThrown=!0,Cr.error=e)}var Er=function(e){Qn(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,pr(t)&&t.add(n)):n.destination=Pr,n}return t.create=function(e,t,n){return new Ar(e,t,n)},t.prototype.next=function(e){this.isStopped?Nr(xr(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?Nr(br(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?Nr(yr,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(dr),Dr=Function.prototype.bind;function Or(e,t){return Dr.call(e,t)}var kr=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){jr(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){jr(e)}else jr(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){jr(e)}},e}(),Ar=function(e){Qn(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(sr(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&hr.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&Or(t.next,o),error:t.error&&Or(t.error,o),complete:t.complete&&Or(t.complete,o)}):a=t}return i.destination=new kr(a),i}return t}(Er);function jr(e){hr.useDeprecatedSynchronousErrorHandling?Tr(e):_r(e)}function Mr(e){throw e}function Nr(e,t){var n=hr.onStoppedNotification;n&&gr.setTimeout(function(){return n(e,t)})}var Pr={closed:!0,next:vr,error:Mr,complete:vr},Fr=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function Ir(e){return e}function Lr(e){return e.length===0?Ir:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var Rr=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=Vr(e)?e:new Ar(e,t,n);return wr(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=zr(t),new t(function(t,r){var i=new Ar({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){return this.source?.subscribe(e)},e.prototype[Fr]=function(){return this},e.prototype.pipe=function(){return Lr([...arguments])(this)},e.prototype.toPromise=function(e){var t=this;return e=zr(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function zr(e){return e??hr.Promise??Promise}function Br(e){return e&&sr(e.next)&&sr(e.error)&&sr(e.complete)}function Vr(e){return e&&e instanceof Er||Br(e)&&pr(e)}function Hr(e){return sr(e?.lift)}function Ur(e){return function(t){if(Hr(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function Wr(e,t,n,r,i){return new Gr(e,t,n,r,i)}var Gr=function(e){Qn(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t}(Er),Kr=cr(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),qr=function(e){Qn(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new Jr(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Kr},t.prototype.next=function(e){var t=this;wr(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=tr(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;wr(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;wr(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?fr:(this.currentObservers=null,a.push(e),new dr(function(){t.currentObservers=null,ur(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new Rr;return e.source=this,e},t.create=function(e,t){return new Jr(e,t)},t}(Rr),Jr=function(e){Qn(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)},t.prototype._subscribe=function(e){return this.source?.subscribe(e)??fr},t}(qr),Yr=function(e){Qn(t,e);function t(t){var n=e.call(this)||this;return n._value=t,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(qr);function Xr(e){return e[e.length-1]}function Zr(e){return sr(Xr(e))?e.pop():void 0}var Qr=(function(e){return e&&typeof e.length==`number`&&typeof e!=`function`});function $r(e){return sr(e?.then)}function ei(e){return sr(e[Fr])}function ti(e){return Symbol.asyncIterator&&sr(e?.[Symbol.asyncIterator])}function ni(e){return TypeError(`You provided `+(typeof e==`object`&&e?`an invalid object`:`'`+e+`'`)+` where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function ri(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}var ii=ri();function ai(e){return sr(e?.[ii])}function oi(e){return ar(this,arguments,function(){var t,n,r,i;return er(this,function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,ir(t.read())];case 3:return n=a.sent(),r=n.value,i=n.done,i?[4,ir(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,ir(r)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function si(e){return sr(e?.getReader)}function ci(e){if(e instanceof Rr)return e;if(e!=null){if(ei(e))return dee(e);if(Qr(e))return fee(e);if($r(e))return pee(e);if(ti(e))return li(e);if(ai(e))return mee(e);if(si(e))return hee(e)}throw ni(e)}function dee(e){return new Rr(function(t){var n=e[Fr]();if(sr(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}function fee(e){return new Rr(function(t){for(var n=0;n=0?n.slice(0,r):n}function Si(e,t){return e?t?`${e} ${t}`:e:t||``}var Ci=yi({__forward_ref__:yi});function wi(e){return e.__forward_ref__=wi,e}function Ti(e){return Ei(e)?e():e}function Ei(e){return typeof e==`function`&&Object.hasOwn(e,Ci)&&e.__forward_ref__===wi}function Di(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Oi(e){return ki(e,Mi)}function ki(e,t){return Object.hasOwn(e,t)&&e[t]||null}function Ai(e){return(e?.[Mi]??null)||null}function ji(e){return e&&Object.hasOwn(e,Ni)?e[Ni]:null}var Mi=yi({ɵprov:yi}),Ni=yi({ɵinj:yi}),Pi=class{_desc;ngMetadataName=`InjectionToken`;ɵprov;constructor(e,t){this._desc=e,this.ɵprov=void 0,typeof t==`number`?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.ɵprov=Di({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Fi(e){return e&&!!e.ɵproviders}var Ii=yi({ɵcmp:yi}),Li=yi({ɵdir:yi}),Ri=yi({ɵpipe:yi}),zi=yi({ɵfac:yi}),Bi=yi({__NG_ELEMENT_ID__:yi}),Vi=yi({__NG_ENV_ID__:yi});function Hi(e){return Gi(e,`@Component`),e[Ii]||null}function Ui(e){return Gi(e,`@Directive`),e[Li]||null}function Wi(e){return Gi(e,`@Pipe`),e[Ri]||null}function Gi(e,t){if(e==null)throw new gi(-919,!1)}function Ki(e){return typeof e==`string`?e:e==null?``:String(e)}var qi=yi({ngErrorCode:yi}),Ji=yi({ngErrorMessage:yi}),Yi=yi({ngTokenPath:yi});function Xi(e,t){return Qi(``,-200,t)}function Zi(e,t){throw new gi(-201,!1)}function Qi(e,t,n){let r=new gi(t,e);return r[qi]=t,r[Ji]=e,n&&(r[Yi]=n),r}function $i(e){return e[qi]}var ea;function ta(){return ea}function na(e){let t=ea;return ea=e,t}function ra(e,t,n){let r=Oi(e);if(r&&r.providedIn==`root`)return r.value===void 0?r.value=r.factory():r.value;if(n&8)return null;if(t!==void 0)return t;Zi(e,``)}var ia=globalThis,aa={},oa=`__NG_DI_FLAG__`,sa=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=ua(t)||0;try{return this.injector.get(e,n&8?null:aa,n)}catch(e){if(Gn(e))return e;throw e}}};function ca(e,t=0){let n=Hn();if(n===void 0)throw new gi(-203,!1);if(n===null)return ra(e,void 0,t);{let r=da(t),i=n.retrieve(e,r);if(Gn(i)){if(r.optional)return null;throw i}return i}}function la(e,t=0){return(ta()||ca)(Ti(e),t)}function C(e,t){return la(e,ua(t))}function ua(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function da(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function fa(e){let t=[];for(let n=0;nArray.isArray(e)?_a(e,t):t(e))}function va(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function ya(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function ba(e,t){let n=[];for(let r=0;rt;){let t=i-2;e[i]=e[t],i--}e[t]=n,e[t+1]=r}}function Sa(e,t,n){let r=wa(e,t);return r>=0?e[r|1]=n:(r=~r,xa(e,r,t,n)),r}function Ca(e,t){let n=wa(e,t);if(n>=0)return e[n|1]}function wa(e,t){return Ta(e,t,1)}function Ta(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){let a=r+(i-r>>1),o=e[a<t?i=a:r=a+1}return~(i<{n.push(e)};return _a(t,e=>{let t=e;Fa(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&Pa(i,a),n}function Pa(e,t){for(let n=0;n{t(e,r)})}}function Fa(e,t,n,r){if(e=Ti(e),!e)return!1;let i=null,a=ji(e),o=!a&&Hi(e);if(!a&&!o){let t=e.ngModule;if(a=ji(t),a)i=t;else return!1}else if(o&&!o.standalone)return!1;else i=e;let s=r.has(i);if(o){if(s)return!1;if(r.add(i),o.dependencies){let e=typeof o.dependencies==`function`?o.dependencies():o.dependencies;for(let i of e)Fa(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{_a(a.imports,i=>{Fa(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&Pa(e,t)}if(!s){let e=ma(i)||(()=>new i);t({provide:i,useFactory:e,deps:Da},i),t({provide:Aa,useValue:i,multi:!0},i),t({provide:Oa,useValue:()=>la(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;Ia(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function Ia(e,t){for(let n of e)Fi(n)&&(n=n.ɵproviders),Array.isArray(n)?Ia(n,t):t(n)}var La=yi({provide:String,useValue:yi});function Ra(e){return typeof e==`object`&&!!e&&La in e}function za(e){return!!(e&&e.useExisting)}function Ba(e){return!!(e&&e.useFactory)}function Va(e){return typeof e==`function`}function Ha(e){return!!e.useClass}var Ua=new Pi(``),Wa={},Ga={},Ka=void 0;function qa(){return Ka===void 0&&(Ka=new ja),Ka}var Ja=class{},Ya=class extends Ja{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,ao(e,e=>this.processProvider(e)),this.records.set(ka,to(void 0,this)),r.has(`environment`)&&this.records.set(Ja,to(void 0,this));let i=this.records.get(Ua);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Aa,Da,{self:!0}))}retrieve(e,t){let n=ua(t)||0;try{return this.get(e,aa,n)}catch(e){if(Gn(e))return e;throw e}}destroy(){eo(this),this._destroyed=!0;let e=tn(null);try{for(let e of this._ngOnDestroyHooks)e.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let t of e)t()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),tn(e)}}onDestroy(e){return eo(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){eo(this);let t=Un(this),n=na(void 0);try{return e()}finally{Un(t),na(n)}}get(e,t=aa,n){if(eo(this),Object.hasOwn(e,Vi))return e[Vi](this);let r=ua(n),i=Un(this),a=na(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=io(e)&&Oi(e);t=n&&this.injectableDefInScope(n)?to(Xa(e),Wa):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?qa():this.parent;return t=r&8&&t===aa?null:t,n.get(e,t)}catch(e){let t=$i(e);throw t===-200||t===-201?new gi(t,null):e}finally{na(a),Un(i)}}resolveInjectorInitializers(){let e=tn(null),t=Un(this),n=na(void 0);try{let e=this.get(Oa,Da,{self:!0});for(let t of e)t()}finally{Un(t),na(n),tn(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=Ti(e);let t=Va(e)?e:Ti(e&&e.provide),n=Qa(e);if(!Va(e)&&e.multi===!0){let n=this.records.get(t);n||(n=to(void 0,Wa,!0),n.factory=()=>fa(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=tn(null);try{if(t.value===Ga)throw Xi(``);return t.value===Wa&&(t.value=Ga,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&ro(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{tn(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=Ti(e.providedIn);return typeof t==`string`?t===`any`||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function Xa(e){let t=Oi(e),n=t===null?ma(e):t.factory;if(n!==null)return n;if(e instanceof Pi)throw new gi(-204,!1);if(e instanceof Function)return Za(e);throw new gi(-204,!1)}function Za(e){if(e.length>0)throw new gi(-204,!1);let t=Ai(e);return t===null?()=>new e:()=>t.factory(e)}function Qa(e){return Ra(e)?to(void 0,e.useValue):to($a(e),Wa)}function $a(e,t,n){let r;if(Va(e)){let t=Ti(e);return ma(t)||Xa(t)}if(Ra(e))r=()=>Ti(e.useValue);else if(Ba(e))r=()=>e.useFactory(...fa(e.deps||[]));else if(za(e))r=(t,n)=>la(Ti(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=Ti(e&&(e.useClass||e.provide));if(no(e))r=()=>new t(...fa(e.deps));else return ma(t)||Xa(t)}return r}function eo(e){if(e.destroyed)throw new gi(-205,!1)}function to(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function no(e){return!!e.deps}function ro(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function io(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function ao(e,t){for(let n of e)Array.isArray(n)?ao(n,t):n&&Fi(n)?ao(n.ɵproviders,t):t(n)}function oo(e,t){let n;e instanceof Ya?(eo(e),n=e):n=new sa(e);let r=Un(n),i=na(void 0);try{return t()}finally{Un(r),na(i)}}function so(){return ta()!==void 0||Hn()!=null}var co=1;function lo(e){return Array.isArray(e)&&typeof e[co]==`object`}function uo(e){return Array.isArray(e)&&e[co]===!0}function fo(e){return!!(e.flags&4)}function po(e){return e.componentOffset>-1}function mo(e){return(e.flags&1)==1}function ho(e){return!!e.template}function go(e){return!!(e[2]&512)}function _o(e){return(e[2]&256)==256}var vo=(function(e){return e[e.NONE=0]=`NONE`,e[e.HTML=1]=`HTML`,e[e.STYLE=2]=`STYLE`,e[e.SCRIPT=3]=`SCRIPT`,e[e.URL=4]=`URL`,e[e.RESOURCE_URL=5]=`RESOURCE_URL`,e[e.ATTRIBUTE_NO_BINDING=6]=`ATTRIBUTE_NO_BINDING`,e})(vo||{}),yo=`math`;function bo(e){for(;Array.isArray(e);)e=e[0];return e}function xo(e,t){return bo(t[e])}function So(e,t){return bo(t[e.index])}function Co(e,t){return e.data[t]}function wo(e,t){return e[t]}function To(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function Eo(e,t){let n=t[e];return lo(n)?n:n[0]}function Do(e){return(e[2]&128)==128}function Fee(e){return uo(e[3])}function Oo(e,t){return t==null?null:e[t]}function ko(e){e[17]=0}function Ao(e){e[2]&1024||(e[2]|=1024,Do(e)&&No(e))}function Iee(e,t){for(;e>0;)t=t[14],e--;return t}function jo(e){return!!(e[2]&9216||e[24]?.dirty)}function Mo(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),jo(e)&&No(e)}function No(e){e[10].changeDetectionScheduler?.notify(0);let t=Fo(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!Do(t)));)t=Fo(t)}function Po(e,t){if(_o(e))throw new gi(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function Lee(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function Fo(e){let t=e[3];return uo(t)?t[3]:t}function Io(e){return e[7]??=[]}function Lo(e){return e.cleanup??=[]}function Ree(e,t,n,r){let i=Io(t);i.push(n),e.firstCreatePass&&Lo(e).push(r,i.length-1)}var Ro={lFrame:us(null),bindingsEnabled:!0,skipHydrationRootTNode:null},zo=!1;function zee(){return Ro.lFrame.elementDepthCount}function Bee(){Ro.lFrame.elementDepthCount++}function Bo(){Ro.lFrame.elementDepthCount--}function Vo(){return Ro.bindingsEnabled}function Ho(){return Ro.skipHydrationRootTNode!==null}function Uo(e){return Ro.skipHydrationRootTNode===e}function Wo(){Ro.skipHydrationRootTNode=null}function Go(){return Ro.lFrame.lView}function Ko(){return Ro.lFrame.tView}function w(e){return Ro.lFrame.contextLView=e,e[8]}function T(e){return Ro.lFrame.contextLView=null,e}function qo(){let e=Jo();for(;e!==null&&e.type===64;)e=e.parent;return e}function Jo(){return Ro.lFrame.currentTNode}function Vee(){let e=Ro.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Yo(e,t){let n=Ro.lFrame;n.currentTNode=e,n.isParent=t}function Xo(){return Ro.lFrame.isParent}function Zo(){Ro.lFrame.isParent=!1}function Qo(){return Ro.lFrame.contextLView}function $o(){return zo}function es(e){let t=zo;return zo=e,t}function ts(){let e=Ro.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function ns(){return Ro.lFrame.bindingIndex}function Hee(e){return Ro.lFrame.bindingIndex=e}function rs(){return Ro.lFrame.bindingIndex++}function is(e){let t=Ro.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function Uee(){return Ro.lFrame.inI18n}function Wee(e,t){let n=Ro.lFrame;n.bindingIndex=n.bindingRootIndex=e,as(t)}function Gee(){return Ro.lFrame.currentDirectiveIndex}function as(e){Ro.lFrame.currentDirectiveIndex=e}function Kee(e){let t=Ro.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function qee(){return Ro.lFrame.currentQueryIndex}function os(e){Ro.lFrame.currentQueryIndex=e}function Jee(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function ss(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=Jee(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=Ro.lFrame=ls();return r.currentTNode=t,r.lView=e,!0}function cs(e){let t=ls(),n=e[1];Ro.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function ls(){let e=Ro.lFrame,t=e===null?null:e.child;return t===null?us(e):t}function us(e){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function ds(){let e=Ro.lFrame;return Ro.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var fs=ds;function ps(){let e=ds();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function ms(e){return(Ro.lFrame.contextLView=Iee(e,Ro.lFrame.contextLView))[8]}function hs(){return Ro.lFrame.selectedIndex}function gs(e){Ro.lFrame.selectedIndex=e}function _s(){let e=Ro.lFrame;return Co(e.tView,e.selectedIndex)}function E(){Ro.lFrame.currentNamespace=`svg`}function vs(){ys()}function ys(){Ro.lFrame.currentNamespace=null}function bs(){return Ro.lFrame.currentNamespace}var xs=!0;function Ss(){return xs}function Cs(e){xs=e}function ws(e,t=null,n=null,r){let i=Ts(e,t,n,r);return i.resolveInjectorInitializers(),i}function Ts(e,t=null,n=null,r,i=new Set){return new Ya([n||Da,Ma(e)],t||qa(),null,i)}var Es=class e{static THROW_IF_NOT_FOUND=aa;static NULL=new ja;static create(e,t){if(Array.isArray(e))return ws({name:``},t,e,``);{let t=e.name??``;return ws({name:t},e.parent,e.providers,t)}}static ɵprov=Di({token:e,providedIn:`any`,factory:()=>la(ka)});static __NG_ELEMENT_ID__=-1},Ds=new Pi(``),Os=class{static __NG_ELEMENT_ID__=As;static __NG_ENV_ID__=e=>e},ks=class extends Os{_lView;constructor(e){super(),this._lView=e}get destroyed(){return _o(this._lView)}onDestroy(e){let t=this._lView;return Po(t,e),()=>Lee(t,e)}};function As(){return new ks(Go())}var js=new Pi(``),Ms=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Yr(!1);debugTaskTracker=C(js,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Rr(e=>{e.next(!1),e.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let e=this.taskId++;return this.pendingTasks.add(e),this.debugTaskTracker?.add(e),e}has(e){return this.pendingTasks.has(e)}remove(e){this.pendingTasks.delete(e),this.debugTaskTracker?.remove(e),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static ɵprov=Di({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Ns=class extends qr{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,so()&&(this.destroyRef=C(Os,{optional:!0})??void 0,this.pendingTasks=C(Ms,{optional:!0})??void 0)}emit(e){let t=tn(null);try{super.next(e)}finally{tn(t)}}subscribe(e,t,n){let r=e,i=t||(()=>null),a=n;if(e&&typeof e==`object`){let t=e;r=t.next?.bind(t),i=t.error?.bind(t),a=t.complete?.bind(t)}this.__isAsync&&(i=this.wrapInTimeout(i),r&&=this.wrapInTimeout(r),a&&=this.wrapInTimeout(a));let o=super.subscribe({next:r,error:i,complete:a});return e instanceof dr&&e.add(o),o}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{try{e(t)}finally{n!==void 0&&this.pendingTasks?.remove(n)}})}}};function Ps(...e){}function Fs(e){let t,n;function r(){e=Ps;try{n!==void 0&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(n),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame==`function`&&(n=requestAnimationFrame(()=>{e(),r()})),()=>r()}function Is(e){return queueMicrotask(()=>e()),()=>{e=Ps}}var Ls=`isAngularZone`,Rs=`isAngularZone_ID`,zs=0,Bs=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Ns(!1);onMicrotaskEmpty=new Ns(!1);onStable=new Ns(!1);onError=new Ns(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new gi(908,!1);Zone.assertZonePatched();let a=this;a._nesting=0,a._outer=a._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(a._inner=a._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(a._inner=a._inner.fork(Zone.longStackTraceZoneSpec)),a.shouldCoalesceEventChangeDetection=!r&&n,a.shouldCoalesceRunChangeDetection=r,a.callbackScheduled=!1,a.scheduleInRootZone=i,Ws(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(Ls)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new gi(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new gi(909,!1)}run(e,t,n){return this._inner.run(e,t,n)}runTask(e,t,n,r){let i=this._inner,a=i.scheduleEventTask(`NgZoneEvent: `+r,e,Vs,Ps,Ps);try{return i.runTask(a,t,n)}finally{i.cancelTask(a)}}runGuarded(e,t,n){return this._inner.runGuarded(e,t,n)}runOutsideAngular(e){return this._outer.run(e)}},Vs={};function Hs(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function Us(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Fs(()=>{e.callbackScheduled=!1,Gs(e),e.isCheckStableRunning=!0,Hs(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Gs(e)}function Ws(e){let t=()=>{Us(e)},n=zs++;e._inner=e._inner.fork({name:`angular`,properties:{[Ls]:!0,[Rs]:n,[Rs+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(Ys(s))return n.invokeTask(i,a,o,s);try{return Ks(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),qs(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return Ks(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!Xs(s)&&t(),qs(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,Gs(e),Hs(e)):i.change==`macroTask`&&(e.hasPendingMacrotasks=i.macroTask))},onHandleError:(t,n,r,i)=>(t.handleError(r,i),e.runOutsideAngular(()=>e.onError.emit(i)),!1)})}function Gs(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function Ks(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function qs(e){e._nesting--,Hs(e)}var Js=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Ns;onMicrotaskEmpty=new Ns;onStable=new Ns;onError=new Ns;run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function Ys(e){return Zs(e,`__ignore_ng_zone__`)}function Xs(e){return Zs(e,`__scheduler_tick__`)}function Zs(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Qs=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},$s=new Pi(``,{factory:()=>{let e=C(Bs),t=C(Ja),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Qs),n.handleError(r))})}}}),ec={provide:Oa,useValue:()=>{C(Qs,{optional:!0})},multi:!0};function D(e,t){let[n,r,i]=Nn(e,t?.equal),a=n;return a[en],a.set=r,a.update=i,a.asReadonly=tc.bind(a),a}function tc(){let e=this[en];if(e.readonlyFn===void 0){let t=()=>this();t[en]=e,e.readonlyFn=t}return e.readonlyFn}var nc=new Pi(``,{factory:()=>rc}),rc=`ng`,ic=new Pi(``),ac=new Pi(``,{providedIn:`platform`,factory:()=>`unknown`}),oc=new Pi(``,{factory:()=>C(Ds).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),sc=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=cc}return e})();function cc(){return new sc(Go(),qo())}var lc=class{},uc=new Pi(``,{factory:()=>!0}),dc=new Pi(``),fc=(()=>{class e{static ɵprov=Di({token:e,providedIn:`root`,factory:()=>new pc})}return e})(),pc=class{dirtyEffectCount=0;queues=new Map;add(e){this.enqueue(e),this.schedule(e)}schedule(e){e.dirty&&this.dirtyEffectCount++}remove(e){let t=e.zone,n=this.queues.get(t);n.has(e)&&(n.delete(e),e.dirty&&this.dirtyEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let n=this.queues.get(t);n.has(e)||n.add(e)}flush(){for(;this.dirtyEffectCount>0;){let e=!1;for(let[t,n]of this.queues)e||=t===null?this.flushQueue(n):t.run(()=>this.flushQueue(n));e||(this.dirtyEffectCount=0)}}flushQueue(e){let t=!1;for(let n of e)n.dirty&&(this.dirtyEffectCount--,t=!0,n.run());return t}},mc=class{[en];constructor(e){this[en]=e}destroy(){this[en].destroy()}};function hc(e,t){let n=t?.injector??C(Es),r=t?.manualCleanup===!0?null:n.get(Os),i,a=n.get(sc,null,{optional:!0}),o=n.get(lc);return a===null?i=bc(e,n.get(fc),o):(i=yc(a.view,o,e),r instanceof ks&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new mc(i)}var gc={...zn,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=es(!1);try{Bn(this)}finally{es(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=tn(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],tn(e)}}},_c={...gc,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(_n(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},vc={...gc,consumerMarkedDirty(){this.view[2]|=8192,No(this.view),this.notifier.notify(13)},destroy(){if(_n(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[23]?.delete(this)}};function yc(e,t,n){let r=Object.create(vc);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=xc(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function bc(e,t,n){let r=Object.create(_c);return r.fn=xc(r,e),r.scheduler=t,r.notifier=n,r.zone=typeof Zone<`u`?Zone.current:null,r.scheduler.add(r),r.notifier.notify(12),r}function xc(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}function Sc(e){return typeof e==`function`&&e[en]!==void 0}function Cc(e){return Sc(e)&&typeof e.set==`function`}var wc=Symbol(`InputSignalNode#UNSET`),Tc={...Ln,transformFn:void 0,applyValueToInputSignal(e,t){Fn(e,t)}};function Ec(e){return{toString:e}.toString()}var Dc=(function(e){return e[e.TemplateCreateStart=0]=`TemplateCreateStart`,e[e.TemplateCreateEnd=1]=`TemplateCreateEnd`,e[e.TemplateUpdateStart=2]=`TemplateUpdateStart`,e[e.TemplateUpdateEnd=3]=`TemplateUpdateEnd`,e[e.LifecycleHookStart=4]=`LifecycleHookStart`,e[e.LifecycleHookEnd=5]=`LifecycleHookEnd`,e[e.OutputStart=6]=`OutputStart`,e[e.OutputEnd=7]=`OutputEnd`,e[e.BootstrapApplicationStart=8]=`BootstrapApplicationStart`,e[e.BootstrapApplicationEnd=9]=`BootstrapApplicationEnd`,e[e.BootstrapComponentStart=10]=`BootstrapComponentStart`,e[e.BootstrapComponentEnd=11]=`BootstrapComponentEnd`,e[e.ChangeDetectionStart=12]=`ChangeDetectionStart`,e[e.ChangeDetectionEnd=13]=`ChangeDetectionEnd`,e[e.ChangeDetectionSyncStart=14]=`ChangeDetectionSyncStart`,e[e.ChangeDetectionSyncEnd=15]=`ChangeDetectionSyncEnd`,e[e.AfterRenderHooksStart=16]=`AfterRenderHooksStart`,e[e.AfterRenderHooksEnd=17]=`AfterRenderHooksEnd`,e[e.ComponentStart=18]=`ComponentStart`,e[e.ComponentEnd=19]=`ComponentEnd`,e[e.DeferBlockStateStart=20]=`DeferBlockStateStart`,e[e.DeferBlockStateEnd=21]=`DeferBlockStateEnd`,e[e.DynamicComponentStart=22]=`DynamicComponentStart`,e[e.DynamicComponentEnd=23]=`DynamicComponentEnd`,e[e.HostBindingsUpdateStart=24]=`HostBindingsUpdateStart`,e[e.HostBindingsUpdateEnd=25]=`HostBindingsUpdateEnd`,e})(Dc||{}),Oc=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function kc(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var Ac=null,jc=(()=>{Ac=Nc;let e=()=>Nc;return e.ngInherit=!0,e})();function Mc(){return Ac}function Nc(e){return e.type.prototype.ngOnChanges&&(e.setInput=Fc),Pc}function Pc(){let e=Lc(this),t=e?.current;if(t){let n=e.previous;if(n===Ea)e.previous=t;else for(let e in t)n[e]=t[e];e.current=null,this.ngOnChanges(t)}}function Fc(e,t,n,r,i){let a=this.declaredInputs[r],o=Lc(e)||Rc(e,{previous:Ea,current:null}),s=o.current||={},c=o.previous,l=c[a];s[a]=new Oc(l&&l.currentValue,n,c===Ea),kc(e,t,i,n)}var Ic=`__ngSimpleChanges__`;function Lc(e){return Object.hasOwn(e,Ic)&&e[Ic]||null}function Rc(e,t){return e[Ic]=t}var zc=[],Bc=function(e,t=null,n){for(let r=0;r=r)break}else t[c]<0&&(e[17]+=65536),(s>14>16&&(e[2]&3)===t&&(e[2]+=16384,qc(o,a)):qc(o,a)}var Yc=-1,Xc=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,n,r){this.factory=e,this.name=r,this.canSeeViewProviders=t,this.injectImpl=n}};function Zc(e){return!!(e.flags&8)}function Qc(e){return!!(e.flags&16)}function $c(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function sl(e,t){let n=ol(e),r=t;for(;n>0;)r=r[14],n--;return r}var cl=!0;function ll(e){let t=cl;return cl=e,t}var ul=255,dl=5,fl=0,pl={};function ml(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,Bi)&&(r=n[Bi]),r??=n[Bi]=fl++;let i=r&ul,a=1<>dl)]|=a}function hl(e,t){let n=_l(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,gl(r.data,e),gl(t,null),gl(r.blueprint,null));let i=vl(e,t),a=e.injectorIndex;if(il(i)){let e=al(i),n=sl(i,t),r=n[1].data;for(let i=0;i<8;i++)t[a+i]=n[e+i]|r[e+i]}return t[a+8]=i,a}function gl(e,t){e.push(0,0,0,0,0,0,0,0,t)}function _l(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function vl(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,i=t;for(;i!==null;){if(r=Fl(i),r===null)return Yc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return Yc}function yl(e,t,n){ml(e,t,n)}function bl(e,t,n){if(n&8||e!==void 0)return e;Zi(t,`NodeInjector`)}function xl(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=na(void 0);try{return i?i.get(t,r,n&8):ra(t,r,n&8)}finally{na(a)}}return bl(r,t,n)}function Sl(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=Pl(e,t,n,r,pl);if(i!==pl)return i}let i=Cl(e,t,n,r,pl);if(i!==pl)return i}return xl(t,n,r,i)}function Cl(e,t,n,r,i){let a=Dl(n);if(typeof a==`function`){if(!ss(t,e,r))return r&1?bl(i,n,r):xl(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))Zi(n);else return e}finally{fs()}}else if(typeof a==`number`){let i=null,o=_l(e,t),s=Yc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?vl(e,t):t[o+8],s===Yc||!kl(r,!1)?o=-1:(i=t[1],o=al(s),t=sl(s,t)));o!==-1;){let e=t[1];if(Ol(a,o,e.data)){let e=wl(o,t,n,i,r,c);if(e!==pl)return e}s=t[o+8],s!==Yc&&kl(r,t[1].data[o+8]===c)&&Ol(a,o,t)?(i=e,o=al(s),t=sl(s,t)):o=-1}}return i}function wl(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=Tl(s,o,n,r==null?po(s)&&cl:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?pl:El(t,o,c,s,i)}function Tl(e,t,n,r,i){let a=e.providerIndexes,o=t.data,s=a&1048575,c=e.directiveStart,l=e.directiveEnd,u=a>>20,d=r?s:s+u,f=i?s+u:l;for(let e=d;e=c&&t.type===n)return e}if(i){let e=o[c];if(e&&ho(e)&&e.type===n)return c}return null}function El(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof Xc){let s=a;if(s.resolving)throw Xi(``);let c=ll(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?na(s.injectImpl):null;ss(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&Vc(n,o[n],t)}finally{l!==null&&na(l),ll(c),s.resolving=!1,fs()}}return a}function Dl(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,Bi)?e[Bi]:void 0;return typeof t==`number`?t>=0?t&ul:jl:t}function Ol(e,t,n){let r=1<>dl)]&r)}function kl(e,t){return!(e&2)&&!(e&1&&t)}var Al=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return Sl(this._tNode,this._lView,e,ua(n),t)}};function jl(){return new Al(qo(),Go())}function Ml(e){return Ec(()=>{let t=e.prototype.constructor,n=t[zi]||Nl(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let e=i[zi]||Nl(i);if(e&&e!==n)return e;i=Object.getPrototypeOf(i)}return e=>new e})}function Nl(e){return Ei(e)?()=>{let t=Nl(Ti(e));return t&&t()}:ma(e)}function Pl(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!go(o);){let e=Cl(a,o,n,r|2,pl);if(e!==pl)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,pl,r);if(t!==pl)return t}t=Fl(o),o=o[14]}a=t}return i}function Fl(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}function Il(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function Ll(){return Rl(qo(),Go())}function Rl(e,t){return new zl(So(e,t))}var zl=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=Ll}return e})();function Bl(e){return e instanceof zl?e.nativeElement:e}function Vl(){return this._results[Symbol.iterator]()}var Hl=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new qr}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let n=ga(e);(this._changesDetected=!ha(this._results,n,t))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=Vl};function Ul(e){return(e.flags&128)==128}var Wl=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Wl||{}),Gl=new Map,Kl=0;function ql(){return Kl++}function Jl(e){Gl.set(e[19],e)}function Yl(e){Gl.delete(e[19])}var Xl=`__ngContext__`;function Zl(e,t){lo(t)?(e[Xl]=t[19],Jl(t)):e[Xl]=t}function Ql(e){return eu(e[12])}function $l(e){return eu(e[4])}function eu(e){for(;e!==null&&!uo(e);)e=e[4];return e}var tu=void 0;function nu(e){tu=e}function ru(){if(tu!==void 0)return tu;if(typeof document<`u`)return document;throw new gi(210,!1)}var iu=!1,au=new Pi(``,{factory:()=>iu}),ou=new WeakMap;function su(e,t){if(typeof e!=`object`||!e)return;let n=ou.get(e);n||(n=new WeakSet,ou.set(e,n)),n.add(t)}function cu(e){return(e.flags&32)==32}var lu=()=>null;function uu(e,t,n=!1){return lu(e,t,n)}function du(e,t){let n=e.contentQueries;if(n!==null){let r=tn(null);try{for(let r=0;r|^->||--!>|)/g,Cu=`​$1​`;function wu(e){return e.replace(xu,e=>e.replace(Su,Cu))}function Tu(e,t){return e.createText(t)}function Eu(e,t,n){e.setValue(t,n)}function Yee(e,t){return e.createComment(wu(t))}function Du(e,t,n){return e.createElement(t,n)}function Ou(e,t,n,r,i){e.insertBefore(t,n,r,i)}function ku(e,t,n){e.appendChild(t,n)}function Au(e,t,n,r,i){r===null?ku(e,t,n):Ou(e,t,n,r,i)}function ju(e,t,n,r){e.removeChild(null,t,n,r)}function Xee(e,t,n){e.setAttribute(t,`style`,n)}function Zee(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function Mu(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&$c(e,t,r),i!==null&&Zee(e,t,i),a!==null&&Xee(e,t,a)}function Nu(e){let t=Qee();return t?t.sanitize(vo.URL,e)||``:_u(e,`URL`)?gu(e):bu(Ki(e))}function Qee(){let e=Go();return e&&e[10].sanitizer}function Pu(e){return e.ownerDocument.defaultView}function Fu(e){return e.ownerDocument}function $ee(e,t,n){let r=e.length;for(;;){let i=e.indexOf(t,n);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let n=t.length;if(i+n===r||e.charCodeAt(i+n)<=32)return i}n=i+1}}var Iu=`ng-template`;function ete(e,t,n,r){let i=0;if(r){for(;i-1){let e;for(;++ia?``:i[u+1].toLowerCase(),r&2&&l!==e){if(Ru(r))return!1;o=!0}}}}}return Ru(r)||o}function Ru(e){return!(e&1)}function rte(e,t,n,r){if(t===null)return-1;let i=0;if(r||!n){let n=!1;for(;i-1)for(n++;n0?`="`+t+`"`:``)+`]`}else r&8?i+=`.`+o:r&4&&(i+=` `+o)}else i!==``&&!Ru(o)&&(t+=Bu(a,i),i=``),r=o,a||=!Ru(r);n++}return i!==``&&(t+=Bu(a,i)),t}function lte(e){return e.map(cte).join(`,`)}function ute(e){let t=[],n=[],r=1,i=2;for(;r!1});function Wu(e){if(!e)return 0;let t=e.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(e)*t}function Gu(e,t){return e.getPropertyValue(t).split(`,`).map(e=>e.trim())}function pte(e){let t=Gu(e,`transition-property`),n=Gu(e,`transition-duration`),r=Gu(e,`transition-delay`),i={propertyName:``,duration:0,animationName:void 0};for(let e=0;ei.duration&&(i.propertyName=t[e],i.duration=a)}return i}function mte(e){let t=Gu(e,`animation-name`),n=Gu(e,`animation-delay`),r=Gu(e,`animation-duration`),i=Gu(e,`animation-iteration-count`),a={animationName:``,propertyName:void 0,duration:0};for(let e=0;ea.duration&&s!==`infinite`&&(a.animationName=t[e],a.duration=o)}return a}function Ku(e,t){return e!==void 0&&e.duration>t.duration}function qu(e){return(e.animationName!=null||e.propertyName!=null)&&e.duration>0}function Ju(e){let t=e.effect?.getTiming();if(t===void 0)return;let n=typeof t.duration==`number`?t.duration:0,r=(t.delay??0)+n,i=e.playbackRate;return i!==void 0&&i!==0&&i!==1&&(r/=Math.abs(i)),r}function hte(e,t){let n=getComputedStyle(e),r=mte(n),i=pte(n),a=r.duration>i.duration?r:i;Ku(t.get(e),a)||qu(a)&&t.set(e,a)}function gte(e,t,n){if(!n)return;let r=e.getAnimations();return r.length===0?hte(e,t):_te(e,t,r)}function _te(e,t,n){let r={animationName:void 0,propertyName:void 0,duration:0};for(let e of n){if(e.effect?.getTiming()?.iterations===1/0)continue;let t=Ju(e)??0,n,i;e.animationName?i=e.animationName:n=e.transitionProperty,t>=r.duration&&(r={animationName:i,propertyName:n,duration:t})}Ku(t.get(e),r)||qu(r)&&t.set(e,r)}var Yu=new Set,vte=!1,yte=1,Xu=typeof document<`u`&&typeof document?.documentElement?.getAnimations==`function`;function bte(e){return e[9].get(fte,vte)}function xte(e,t,n){let r=Qu.get(e);if(r){for(let e of t)r.classList.push(e);for(let e of n)r.cleanupFns.push(e)}else Qu.set(e,{classList:t,cleanupFns:n})}function Zu(e){let t=Qu.get(e);if(t){for(let e of t.cleanupFns)e();Qu.delete(e)}$u.delete(e)}var Qu=new WeakMap,$u=new WeakMap,ed=new WeakMap;function td(e){return e?e[14]??e:null}var nd=new WeakSet;function Ste(e,t,n){let r=ed.get(e);if(!r||r.length===0)return;let i=t.parentNode,a=t.previousSibling,o=td(n);for(let e=r.length-1;e>=0;e--){let{el:n,declarationView:s}=r[e],c=n.parentNode;n===t?(r.splice(e,1),nd.add(n),n.dispatchEvent(new CustomEvent(`animationend`,{detail:{cancel:!0}}))):(a&&n===a||c&&i&&c!==i&&(o===null||s===null||o===s))&&(r.splice(e,1),n.dispatchEvent(new CustomEvent(`animationend`,{detail:{cancel:!0}})),n.parentNode?.removeChild(n))}}function Cte(e,t,n){let r=td(n),i=ed.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):ed.set(e,[{el:t,declarationView:r}])}function rd(e){let t=e[26]??={};return t.enter??=new Map}function wte(e){let t=typeof e==`function`?e():e,n=Array.isArray(t)?t:null;return typeof t==`string`&&(n=t.trim().split(/\s+/).filter(e=>e)),n}function id(e){return e.composedPath?e.composedPath()[0]:e.target}function ad(e,t){let n=$u.get(t);if(n===void 0)return!0;if(t!==id(e))return!1;let r=e.animation;if(r){let e=Ju(r);if(e!==void 0&&e+yte{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=Di({token:e,providedIn:`root`,factory:()=>new e})}return e})(),dd=[0,1,2,3],fd=(()=>{class e{ngZone=C(Bs);scheduler=C(lc);errorHandler=C(Qs,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){C(sd,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Bc(Dc.AfterRenderHooksStart),this.executing=!0;for(let e of dd)for(let t of this.sequences)if(!t.erroredOrDestroyed&&t.hooks[e])try{t.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let n=t.hooks[e];return n(t.pipelinedValue)},t.snapshot))}catch(e){t.erroredOrDestroyed=!0,this.errorHandler?.handleError(e)}this.executing=!1;for(let e of this.sequences)e.afterRun(),e.once&&(this.sequences.delete(e),e.destroy());for(let e of this.deferredRegistrations)this.sequences.add(e);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),e&&Bc(Dc.AfterRenderHooksEnd)}register(e){let{view:t}=e;t===void 0?this.executing?this.deferredRegistrations.add(e):this.addSequence(e):((t[25]??=[]).push(e),No(t),t[2]|=8192)}addSequence(e){this.sequences.add(e),this.scheduler.notify(7)}unregister(e){this.executing&&this.sequences.has(e)?(e.erroredOrDestroyed=!0,e.pipelinedValue=void 0,e.once=!0):(this.sequences.delete(e),this.deferredRegistrations.delete(e))}maybeTrace(e,t){return t?t.run(od.AFTER_NEXT_RENDER,e):e()}static ɵprov=Di({token:e,providedIn:`root`,factory:()=>new e})}return e})(),pd=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,n,r,i,a=null){this.impl=e,this.hooks=t,this.view=n,this.once=r,this.snapshot=a,this.unregisterOnDestroy=i?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[25];e&&(this.view[25]=e.filter(e=>e!==this))}};function md(e,t){let n=t?.injector??C(Es);return ld(`NgAfterNextRender`),Dte(e,n,t,!0)}function Ete(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function Dte(e,t,n,r){let i=t.get(ud);i.impl??=t.get(fd);let a=t.get(sd,null,{optional:!0}),o=n?.manualCleanup===!0?null:t.get(Os),s=t.get(sc,null,{optional:!0}),c=new pd(i.impl,Ete(e),s?.view,r,o,a?.snapshot(null));return i.impl.register(c),c}var hd=new Pi(``,{factory:()=>{let e=C(Ja),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function gd(e,t,n){let r=e.get(hd);if(Array.isArray(t))for(let e of t)r.queue.add(e),n?.detachedLeaveAnimationFns?.push(e);else r.queue.add(t),n?.detachedLeaveAnimationFns?.push(t);r.scheduler&&r.scheduler(e)}function Ote(e,t){let n=e.get(hd);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function kte(e,t){let n=e.get(hd);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function Ate(e){let t=e.get(hd);t.isScheduled||=(md(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:t.injector}),!0)}function jte(e){let t=e.get(hd);t.scheduler=Ate,t.scheduler(e)}function _d(e,t){for(let[n,r]of t)gd(e,r.animateFns)}function vd(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&_d(r,i)}function yd(e,t,n,r){try{n.get(ka)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&Ote(n,i.enter.get(t.index).animateFns);let a=Mte(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];bd(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&Yu.add(e[19]),gd(n,()=>Nte(e,t,i||void 0,a,r),i||void 0)}function Mte(e,t,n){let r=new Map,i=n?.leave;if(i&&i.has(t.index)&&r.set(t.index,i.get(t.index)),e&&i)for(let[n,a]of i){if(r.has(n))continue;let i=e[1].data[n].parent;for(;i;){if(i===t){r.set(n,a);break}i=i.parent}}return r}function Nte(e,t,n,r,i){let a=[];if(n&&n.leave)for(let[e]of r){if(!n.leave.has(e))continue;let t=n.leave.get(e);for(let e of t.animateFns){let{promise:t}=e();a.push(t)}n.detachedLeaveAnimationFns=void 0}if(e&&bd(e,t,a),a.length>0){let t=n||e?.[26];if(t){let n=t.running;n&&a.push(n),t.running=Promise.allSettled(a),Fte(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&Yu.delete(e[19]),i(!0)})}else e&&Yu.delete(e[19]),i(!1)}function bd(e,t,n){if(t.type&12){let r=e[t.index];if(uo(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,Yu.delete(e[19])),n(!0)})}function xd(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;uo(i)?c=i:lo(i)&&(l=!0,i=i[0]);let u=bo(i);e===0&&r!==null?(vd(s,r,a,n),o==null?ku(t,r,u):Ou(t,r,u,o||null,!0)):e===1&&r!==null?(vd(s,r,a,n),Ou(t,r,u,o||null,!0),Ste(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&Cte(a,u,s),nd.delete(u),yd(s,a,n,e=>{if(nd.has(u)){nd.delete(u);return}ju(t,u,l,e)})):e===3&&(nd.delete(u),yd(s,a,n,()=>{t.destroyNode(u)})),c!=null&&Gd(t,e,n,c,a,r,o)}}function Sd(e,t){wd(e,t),t[0]=null,t[5]=null}function Cd(e,t,n,r,i,a){r[0]=i,r[5]=t,Vd(e,r,n,1,i,a)}function wd(e,t){t[10].changeDetectionScheduler?.notify(9),Vd(e,t,t[11],2,null,null)}function Td(e){let t=e[12];if(!t)return Od(e[1],e);for(;t;){let n=null;if(lo(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)lo(t)&&Od(t[1],t),t=t[3];t===null&&(t=e),lo(t)&&Od(t[1],t),n=t&&t[4]}t=n}}function Ed(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function Dd(e,t){if(_o(t))return;let n=t[11];n.destroyNode&&Vd(e,t,n,3,null,null),Td(t)}function Od(e,t){if(_o(t))return;let n=tn(null);try{t[2]&=-129,t[2]|=256,t[24]&&_n(t[24]),Ad(e,t),kd(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&uo(t[3])){n!==t[3]&&Ed(n,t);let r=t[18];r!==null&&r.detachView(e)}Yl(t)}finally{tn(n)}}function kd(e,t){let n=e.cleanup,r=t[7];if(n!==null)for(let e=0;e=0?r[t]():r[-t].unsubscribe(),e+=2}else{let t=r[n[e+1]];n[e].call(t)}r!==null&&(t[7]=null);let i=t[21];if(i!==null){t[21]=null;for(let e=0;e27&&tf(e,t,27,!1),Bc(o?Dc.TemplateUpdateStart:Dc.TemplateCreateStart,i,n),n(r,i)}finally{gs(a),Bc(o?Dc.TemplateUpdateEnd:Dc.TemplateCreateEnd,i,n)}}function of(e,t,n){pf(e,t,n),(n.flags&64)==64&&mf(e,t,n)}function sf(e,t,n=So){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a=s&&i<=c){let o=t.data[i],s=r[e+1];rf(o,n[i],s,a),l=!0}else if(i>c)break}}return o!==null&&Object.hasOwn(r.inputs,i)&&(rf(r,n[o],i,a),l=!0),l}function Tf(e,t){let n=Eo(t,e),r=n[1];Ef(r,n);let i=n[0];i!==null&&n[6]===null&&(n[6]=uu(i,n[9])),Bc(Dc.ComponentStart);try{Df(r,n,n[8])}finally{Bc(Dc.ComponentEnd,n[8])}}function Ef(e,t){for(let n=t.length;n{No(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function zf(e){let t=e[24]??Object.create(Bf);return t.lView=e,t}var Bf={...rn,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=Fo(e.lView);for(;t&&!Vf(t[1]);)t=Fo(t);t&&Ao(t)},consumerOnSignalRead(){this.lView[24]=this}};function Vf(e){return e.type!==2}function Hf(e){if(e[23]===null)return;let t=!0;for(;t;){let n=!1;for(let t of e[23])if(t.dirty&&(n=!0,t.zone===null||Zone.current===t.zone?t.run():t.zone.run(()=>t.run()),e[23]===null))return;t=n&&!!(e[2]&8192)}}var Uf=100;function Wf(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{Gf(e,t)}finally{n.end?.()}}function Gf(e,t){let n=$o();try{es(!0),Zf(e,t);let n=0;for(;jo(e);){if(n===Uf)throw new gi(103,!1);n++,Zf(e,1)}}finally{es(n)}}function Kf(e,t,n,r){if(_o(t))return;let i=t[2];cs(t);let a=!0,o=null,s=null;Vf(e)?(s=Ff(t),o=fn(s)):nn()===null?(a=!1,s=zf(t),o=fn(s)):t[24]&&=(_n(t[24]),null);try{ko(t),Hee(e.bindingStartIndex),n!==null&&af(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&Uc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&Wc(t,n,0,null),Gc(t,0)}if(Jf(t),Hf(t),qf(t,0),e.contentQueries!==null&&du(e,t),a){let n=e.contentCheckHooks;n!==null&&Uc(t,n)}else{let n=e.contentHooks;n!==null&&Wc(t,n,1),Gc(t,1)}$f(e,t);let o=e.components;o!==null&&Qf(t,o,0);let s=e.viewQuery;if(s!==null&&fu(2,s,r),a){let n=e.viewCheckHooks;n!==null&&Uc(t,n)}else{let n=e.viewHooks;n!==null&&Wc(t,n,2),Gc(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}Nf(t),t[2]&=-73}catch(e){throw No(t),e}finally{s!==null&&(mn(s,o),a&&Lf(s)),ps()}}function qf(e,t){for(let n=Ql(e);n!==null;n=$l(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=ya(e,10+t);Sd(r[1],r);let o=a[18];o!==null&&o.detachView(a[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}function op(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(ap(e,n),ya(t,n))}this._attachedToViewContainer=!1}Dd(this._lView[1],this._lView)}onDestroy(e){Po(this._lView,e)}markForCheck(){ep(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){Mo(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,Wf(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new gi(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=go(this._lView),t=this._lView[16];t!==null&&!e&&Ed(t,this._lView),wd(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new gi(902,!1);this._appRef=e;let t=go(this._lView),n=this._lView[16];n!==null&&!t&&sp(n,this._lView),Mo(this._lView)}},lp=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=up;constructor(e,t,n){this._declarationLView=e,this._declarationTContainer=t,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,n){return new cp(kf(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n}))}}return e})();function up(){return dp(qo(),Go())}function dp(e,t){return e.type&4?new lp(t,e,Rl(e,t)):null}function fp(e,t,n,r,i){let a=e.data[t];if(a===null)a=pp(e,t,n,r,i),Uee()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Vee();a.injectorIndex=e===null?-1:e.injectorIndex}return Yo(a,!0),a}function pp(e,t,n,r,i){let a=Jo(),o=Xo(),s=o?a:a&&a.parent,c=e.data[t]=hp(e,s,n,t,r,i);return mp(e,c,a,o),c}function mp(e,t,n,r){e.firstChild===null&&(e.firstChild=t),n!==null&&(r?n.child==null&&t.parent!==null&&(n.child=t):n.next===null&&(n.next=t,t.prev=n))}function hp(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return Ho()&&(s|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:o,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,controlDirectiveIndex:-1,customControlIndex:-1,propertyBindings:null,flags:s,providerIndexes:0,value:i,namespace:bs(),attrs:a,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function gp(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?_p(e,n):r.push(e);e[6]=r}function _p(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,yp=()=>null;function bp(e,t){return vp(e,t)}function xp(e,t,n){return yp(e,t,n)}var Sp=class{},Cp=class{},wp=class{destroyNode=null;static __NG_ELEMENT_ID__=()=>Tp()};function Tp(){let e=Go(),t=Eo(qo().index,e);return(lo(t)?t:e)[11]}var Ep=(()=>{class e{static ɵprov=Di({token:e,providedIn:`root`,factory:()=>null})}return e})();function Dp(e){return e.debugInfo?.className||e.type.name||null}var Op={},kp=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,Op,n);return r!==Op||t===Op?r:this.parentInjector.get(e,t,n)}};function Ap(e,t,n){return e[t]=n}function jp(e,t){return e[t]}function Mp(e,t,n){if(n===Vu)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function Np(e,t,n,r){let i=Mp(e,t,n);return Mp(e,t+1,r)||i}function Pp(e,t,n,r,i){let a=Np(e,t,n,r);return Mp(e,t+2,i)||a}function Fp(e,t,n,r,i,a){let o=Np(e,t,n,r);return Np(e,t+2,i,a)||o}function Ip(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&su(i,a),ep(po(e)?Eo(e.index,t):t,5);let o=t[8],s=Lp(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=Lp(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function Lp(e,t,n,r){let i=tn(null);try{return Bc(Dc.OutputStart,t,n),n(r)!==!1}catch(t){return Sf(e,t),!1}finally{Bc(Dc.OutputEnd,t,n),tn(i)}}function Rp(e,t,n,r,i,a,o,s){let c=mo(e),l=!1,u=null;if(!r&&c&&(u=Bp(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=So(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);zp(a)||Vp(r?t=>r(bo(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function zp(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function Bp(e,t,n,r){let i=e.cleanup;if(i!=null)for(let e=0;er?n[r]:null}typeof a==`string`&&(e+=2)}return null}function Vp(e,t,n,r,i,a,o){let s=t.firstCreatePass?Lo(t):null,c=Io(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function Hp(e,t,n,r,i){let a=null,o=null,s=null,c=!1,l=e.directiveToIndex.get(n.type);if(typeof l==`number`?a=l:[a,o,s]=l,o!==null&&s!==null&&e.hostDirectiveOutputs&&Object.hasOwn(e.hostDirectiveOutputs,r)){let n=e.hostDirectiveOutputs[r];for(let a=0;a=o&&l<=s)c=!0,Up(e,t,l,n[a+1],r,i);else if(l>s)break}}return Object.hasOwn(n.outputs,r)&&(c=!0,Up(e,t,a,r,r,i)),c}function Up(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);Vp(e.index,s,t,i,a,c,!0)}function Wp(){Gp()}function Gp(){let e=Go(),t=Ko(),n=qo();if(t.firstCreatePass&&Zp(t,n),n.controlDirectiveIndex===-1)return;ld(`NgSignalForms`);let r=e[n.controlDirectiveIndex];t.data[n.controlDirectiveIndex].controlDef.create(r,new Jp(e,t,n))}function Kp(){qp()}function qp(){let e=Go(),t=Ko(),n=_s();if(n.controlDirectiveIndex===-1)return;let r=t.data[n.controlDirectiveIndex].controlDef,i=e[n.controlDirectiveIndex];r.update(i,new Jp(e,t,n))}var Jp=class{lView;tView;tNode;hasPassThrough;constructor(e,t,n){this.lView=e,this.tView=t,this.tNode=n,this.hasPassThrough=!!(n.flags&4096)}get customControl(){return this.tNode.customControlIndex===-1?void 0:this.lView[this.tNode.customControlIndex]}get nativeElement(){return So(this.tNode,this.lView)}get descriptor(){return`<${this.tNode.value}>`}listenToCustomControlOutput(e,t){let n=this.tView.data[this.tNode.customControlIndex];Hp(this.tNode,this.lView,n,e,Ip(this.tNode,this.lView,t))}listenToCustomControlModel(e){let t=this.tNode.flags&1024?`valueChange`:`checkedChange`,n=this.tView.data[this.tNode.customControlIndex];Hp(this.tNode,this.lView,n,t,Ip(this.tNode,this.lView,e))}listenToDom(e,t){Rp(this.tNode,this.tView,this.lView,void 0,this.lView[11],e,t,Ip(this.tNode,this.lView,t))}setInputOnDirectives(e,t,n){let r=this.tNode.inputs?.[e],i=this.tNode.hostDirectiveInputs?.[e];if(!r&&!i)return!1;let a=!1;if(r)for(let i of r){if(i===this.tNode.controlDirectiveIndex)continue;let r=this.lView[i],o=this.tView.data[i];(!n||n(Xp(r,o,e)))&&(rf(o,r,e,t),a=!0)}if(i)for(let r=0;r0;){let e=n.shift();if(typeof e!=`function`){for(let n in e.inputs)t[e.inputs[n]]=!0;let r=Yp(e.directive);r!==null&&n.push(...r);continue}for(let r of e()){if(typeof r==`function`)continue;if(r.inputs)for(let e=0;e1){t.flags|=4096;return}Qp(e,t)}function Qp(e,t){for(let n=t.directiveStart;n{let r=t.hostDirectiveInputs[e],i=t.hostDirectiveOutputs[e+`Change`];if(!r||!i)return!1;for(let e=0;e=i&&a<=o)return t.flags|=n,t.customControlIndex=r,!0}}return!1};if(e(`value`,1024)||e(`checked`,2048))return}}function $p(e,t){return em(e,t)&&tm(e,t+`Change`)}function em(e,t){return t in e.inputs}function tm(e,t){return t in e.outputs}var nm=Symbol(`BINDING`),rm=new Pi(``);function im(e,t,n){let r=n?e.styles:null,i=n?e.classes:null,a=0;if(t!==null)for(let e=0;e0&&(n.directiveToIndex=new Map);for(let c=0;c0;){let n=e[--t];if(typeof n==`number`&&n<0)return n}return 0}function vm(e,t,n){if(n){if(t.exportAs)for(let r=0;r{let[n,r,i]=e[t],a={propName:n,templateName:t,isSignal:(r&nf.SignalBased)!==0};return i&&(a.transform=i),a})}function Em(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function Dm(e,t,n){let r=t instanceof Ja?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new kp(n,r):n}function Om(e){let t=e.get(Cp,null);if(t===null)throw new gi(407,!1);return{rendererFactory:t,sanitizer:e.get(Ep,null),changeDetectionScheduler:e.get(lc,null),ngReflect:!1,tracingService:e.get(sd,null,{optional:!0})}}function km(e,t,n){let r=jm(e);return Du(t,r,r===`svg`?`svg`:r===`math`?yo:n)}function Am(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new gi(905,!1)}function jm(e){return(e.selectors[0][0]||`div`).toLowerCase()}var Mm=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=Tm(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=Em(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=lte(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){Bc(Dc.DynamicComponentStart);let s=tn(null);try{let s=this.componentDef,c=Dm(s,r||this.ngModule,e),l=Om(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(Dp(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{tn(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=Nm(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?cf(l,r,s.encapsulation,t):km(s,l,o??null);Am(u);let d=t.get(rm,null),f=Pm(u,()=>t.get(Ds,null)??ru());d&&d.addHost(f);let p=a?.some(Im)||i?.some(e=>typeof e!=`function`&&e.bindings.some(Im)),m=Xd(null,c,null,512|Qd(s),null,null,e,l,t,null,uu(u,t,!0));d&&Cm&&f instanceof ShadowRoot&&Po(m,()=>{d.removeHost(f)}),m[27]=u,cs(m);let h=null;try{let e=bm(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);Mu(l,u,e),Zl(u,m),of(c,m,e),pu(c,e,m),xm(c,e),n!==void 0&&Rm(e,this.ngContentSelectors,n),h=Eo(e.index,m),m[8]=h[8],Df(c,m,null)}catch(e){throw h!==null&&Yl(h),Yl(m),e}finally{Bc(Dc.DynamicComponentEnd),ps()}return new Lm(this.componentType,m,!!p)}};function Nm(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:ute(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[nm].requiredVars,e.create&&(e.targetIdx=0,(a??=[]).push(e)),e.update&&(e.targetIdx=0,(o??=[]).push(e));if(r)for(let e=0;e{if(n&1&&e)for(let t of e)t.create();if(n&2&&t)for(let e of t)e.update()}}function Im(e){let t=e[nm].kind;return t===`input`||t===`twoWay`}var Lm=class extends Sp{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=Co(t[1],27),this.location=Rl(this._tNode,t),this.instance=Eo(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new cp(t,void 0),this.componentType=e}setInput(e,t){this._hasInputBindings;let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView;Cf(n,r[1],r,e,t),this.previousInputValues.set(e,t),ep(Eo(n.index,r),1)}get injector(){return new Al(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function Rm(e,t,n){let r=e.projection=[];for(let e=0;e{class e{static __NG_ELEMENT_ID__=Bm}return e})();function Bm(){return Wm(qo(),Go())}var Vm=class e extends zm{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Rl(this._hostTNode,this._hostLView)}get injector(){return new Al(this._hostTNode,this._hostLView)}get parentInjector(){let e=vl(this._hostTNode,this._hostLView);if(il(e)){let t=sl(e,this._hostLView),n=al(e),r=t[1].data[n+8];return new Al(r,t)}return new Al(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=Hm(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-10}createEmbeddedView(e,t,n){let r,i;typeof n==`number`?r=n:n!=null&&(r=n.index,i=n.injector);let a=bp(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,Af(this._hostTNode,a)),o}createComponent(e,t,n,r,i,a,o){let s,c=t||{};s=c.index,n=c.injector,r=c.projectableNodes,i=c.environmentInjector||c.ngModuleRef,a=c.directives,o=c.bindings;let l=new Mm(Hi(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(Ja,null);e&&(i=e)}let d=Hi(l.componentType??{}),f=bp(this._lContainer,d?.id??null),p=f?.firstChild??null,m=l.create(u,r,p,i,a,o,this._getHostElementNamespace());return this.insertImpl(m.hostView,s,Af(this._hostTNode,f)),m}_getHostElementNamespace(){if(this._hostTNode.type&2){let e=this._hostTNode.parent??this._hostLView[5];return e!==null&&e.type&2&&typeof e.value==`string`&&e.value.toLowerCase()===`foreignobject`?null:e?.namespace??null}return this._hostTNode.namespace}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(t,n,r){let i=t._lView;if(Fee(i)){let n=this.indexOf(t);if(n!==-1)this.detach(n);else{let n=i[3],r=new e(n,n[5],n[3]);r.detach(r.indexOf(t))}}let a=this._adjustIndex(n),o=this._lContainer;return rp(o,i,a,r),t.attachToViewContainerRef(),va(Um(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=Hm(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=ap(this._lContainer,t);n&&(ya(Um(this._lContainer),t),Dd(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=ap(this._lContainer,t);return n&&ya(Um(this._lContainer),t)!=null?new cp(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function Hm(e){return e[8]}function Um(e){return e[8]||=[]}function Wm(e,t){let n,r=t[e.index];return uo(r)?n=r:(n=tp(r,t,null,e),t[e.index]=n,ef(t,n)),Km(n,t,e,r),new Vm(n,e,t)}function Gm(e,t){let n=e[11],r=n.createComment(``),i=So(t,e);return Ou(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var Km=Ym,qm=()=>!1;function Jm(e,t,n){return qm(e,t,n)}function Ym(e,t,n,r){if(e[7])return;let i;i=n.type&8?bo(r):Gm(t,n),e[7]=i}var Xm=class e{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},Zm=class e{queries;constructor(e=[]){this.queries=e}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries===null?n.length:t.contentQueries[0],i=[];for(let e=0;e0)r.push(o[e/2]);else{let i=a[e+1],o=t[-n];for(let e=10;ee.trim())}function dh(e,t,n){e.queries===null&&(e.queries=new $m),e.queries.track(new eh(t,n))}function fh(e,t){return e.queries.getByIndex(t)}function ph(e,t){let n=e[1],r=fh(n,t);return r.crossesNgTemplate?oh(n,e,t,[]):ah(n,e,r,t)}function mh(e,t,n){let r,i=Cn(()=>{r._dirtyCounter();let n=vh(r,e);if(t&&n===void 0)throw new gi(-951,!1);return n});return r=i[en],r._dirtyCounter=D(0),r._flatValue=void 0,i}function hh(e){return mh(!0,!1,e)}function gh(e){return mh(!0,!0,e)}function _h(e,t){let n=e[en];n._lView=Go(),n._queryIndex=t,n._queryList=sh(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(e=>e+1))}function vh(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[2]&4)return t?void 0:Da;let i=sh(n,r),a=ph(n,r);return i.reset(a,Bl),t?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}function yh(e){return!!e&&typeof e.then==`function`}function bh(e){return!!e&&typeof e.subscribe==`function`}var xh=class{},Sh=class extends xh{injector;instance=null;constructor(e){super();let t=new Ya([...e.providers,{provide:xh,useValue:this}],e.parent||qa(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function Ch(e,t,n=null){return new Sh({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var wh=(()=>{class e{_injector;cachedInjectors=new Map;constructor(e){this._injector=e}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){let t=Na(!1,e.type),n=t.length>0?Ch([t],this._injector,``):null;this.cachedInjectors.set(e,n)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static ɵprov=Di({token:e,providedIn:`environment`,factory:()=>new e(la(Ja))})}return e})();function k(e){return Ec(()=>{let t=Ah(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Wl.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(wh).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||mu.Emulated,styles:e.styles||Da,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&ld(`NgStandalone`),jh(n);let r=e.dependencies;return n.directiveDefs=Mh(r,Th),n.pipeDefs=Mh(r,Wi),n.id=Nh(n),n})}function Th(e){return Hi(e)||Ui(e)}function Eh(e,t){if(e==null)return Ea;let n={};for(let r in e)if(Object.hasOwn(e,r)){let i=e[r],a,o,s,c;Array.isArray(i)?(s=i[0],a=i[1],o=i[2]??a,c=i[3]||null):(a=i,o=i,s=nf.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function Dh(e){if(e==null)return Ea;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function Oh(e){return Ec(()=>{let t=Ah(e);return jh(t),t})}function kh(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function Ah(e){let t={};return{type:e.type,providersResolver:null,viewProvidersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||Ea,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||Da,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:Eh(e.inputs,t),outputs:Dh(e.outputs),debugInfo:null}}function jh(e){e.features?.forEach(t=>t(e))}function Mh(e,t){return e?()=>{let n=typeof e==`function`?e():e,r=[];for(let e of n){let n=t(e);n!==null&&r.push(n)}return r}:null}function Nh(e){let t=0,n=typeof e.consts==`function`?``:e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let e of r.join(`|`))t=Math.imul(31,t)+e.charCodeAt(0)<<0;return t+=2147483648,`c`+t}var Ph=new Pi(``),Fh=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=C(Ph,{optional:!0})??[];injector=C(Es);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=oo(this.injector,t);if(yh(n))e.push(n);else if(bh(n)){let t=new Promise((e,t)=>{n.subscribe({complete:e,error:t})});e.push(t)}}let t=()=>{this.done=!0,this.resolve()};Promise.all(e).then(()=>{t()}).catch(e=>{this.reject(e)}),e.length===0&&t(),this.initialized=!0}static ɵfac=function(t){return new(t||e)};static ɵprov=Il({token:e,factory:e.ɵfac})}return e})();function Ih(e){return t=>{t.controlDef={create:(e,t)=>{e?.ɵngControlCreate(t)},update:(e,t)=>{e?.ɵngControlUpdate?.(t)},passThroughInput:e}}}function Lh(e){return Object.getPrototypeOf(e.prototype).constructor}function Rh(e){let t=Lh(e.type),n=!0,r=[e];for(;t&&t!==Function.prototype&&t!==Object.prototype;){let i,a=Object.hasOwn(t,Ii)?t[Ii]:void 0,o=Object.hasOwn(t,Li)?t[Li]:void 0;if(ho(e))i=a??o;else{if(a)throw new gi(903,!1);i=o}if(i){if(n){r.push(i);let t=e;t.inputs=Vh(e.inputs),t.declaredInputs=Vh(e.declaredInputs),t.outputs=Vh(e.outputs);let n=i.hostBindings;n&&Wh(e,n);let a=i.viewQuery,o=i.contentQueries;if(a&&Hh(e,a),o&&Uh(e,o),zh(e,i),bi(e.outputs,i.outputs),ho(i)&&i.data.animation){let t=e.data;t.animation=(t.animation||[]).concat(i.data.animation)}}let t=i.features;if(t)for(let r=0;r=0;r--){let i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=nl(i.hostAttrs,n=nl(n,i.hostAttrs))}}function Vh(e){return e===Ea?{}:e===Da?[]:e}function Hh(e,t){let n=e.viewQuery;e.viewQuery=n?(e,r)=>{t(e,r),n(e,r)}:t}function Uh(e,t){let n=e.contentQueries;e.contentQueries=n?(e,r,i)=>{t(e,r,i),n(e,r,i)}:t}function Wh(e,t){let n=e.hostBindings;e.hostBindings=n?(e,r)=>{t(e,r),n(e,r)}:t}function Gh(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=nl(e.mergedAttrs,e.attrs);let t=e.tView=qd(2,e,i,a,o,n.directiveRegistry,n.pipeRegistry,null,n.schemas,n.consts,null);n.queries!==null&&(n.queries.template(n,e),t.queries=n.queries.embeddedTView(e))}s&&(e.flags|=s),Yo(e,!1);let c=Yh(n,t,e,r);Ss()&&Id(n,t,c,e),Zl(c,t);let l=tp(c,t,c,e);t[r+27]=l,ef(t,l),Jm(l,e,t)}function Kh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;return t.firstCreatePass?(f=fp(t,d,4,o||null,s||null),Vo()&&om(t,e,f,Oo(t.consts,l),gf),Hc(t,f)):f=t.data[d],Gh(f,e,t,n,r,i,a,c),mo(f)&&of(t,e,f),l!=null&&sf(e,f,u),f}function qh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=fp(t,d,4,o||null,s||null),l!=null){let e=Oo(t.consts,l);f.localNames=[];for(let t=0;t{throw new gi(600,``)})}var eg=10,tg=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=C($s);afterRenderManager=C(ud);zonelessEnabled=C(uc);rootEffectScheduler=C(fc);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new qr;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=C(Ms);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(mi(e=>!e))}constructor(){C(sd,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=C(Ja);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=Es.NULL){return this._injector.get(Bs).run(()=>{if(Bc(Dc.BootstrapComponentStart),!this._injector.get(Fh).done)throw new gi(405,``);let r=Hi(e),i=this._injector.get(xh),a=new Mm(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=ng(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(Zh,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),rg(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),Bc(Dc.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Bc(Dc.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(od.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw Bc(Dc.ChangeDetectionEnd),new gi(101,!1);let e=tn(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,tn(e),this.afterTick.next(),Bc(Dc.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Cp,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++jo(e))){this.dirtyFlags|=2;return}this.dirtyFlags&=-8}attachView(e){let t=e;this._views.push(t),t.attachToAppRef(this)}detachView(e){let t=e;rg(this._views,t),t.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView);try{this.tick()}catch(e){this.internalErrorHandler(e)}this.components.push(e),this._injector.get(Qh,[]).forEach(t=>t(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>rg(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new gi(406,!1);let e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}static ɵfac=function(t){return new(t||e)};static ɵprov=Il({token:e,factory:e.ɵfac})}return e})();function ng(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function rg(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function A(e,t,n,r){let i=Go();return Mp(i,rs(),t)&&(Ko(),_f(_s(),i,e,t,n,r)),A}function ig(e){if(ld(`NgAnimateEnter`),!Xu)return ig;let t=Go();if(bte(t))return ig;let n=qo(),r=t[9].get(Bs);return Tte(rd(t),n,()=>ag(t,n,e,r)),jte(t[9]),_d(t[9],rd(t)),ig}function ag(e,t,n,r){let i=So(t,e),a=e[11],o=wte(n),s=[],c=!1,l=e=>{if(id(e)!==i)return;let t=e instanceof AnimationEvent?`animationend`:`transitionend`;r.runOutsideAngular(()=>{a.listen(i,t,u)})},u=e=>{id(e)===i&&(ad(e,i)&&(c=!0),og(e,i,a))};if(o&&o.length>0){r.runOutsideAngular(()=>{s.push(a.listen(i,`animationstart`,l)),s.push(a.listen(i,`transitionstart`,l))}),xte(i,o,s);for(let e of o)a.addClass(i,e);r.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(!c&&(gte(i,$u,Xu),!$u.has(i))){for(let e of o)a.removeClass(i,e);Zu(i)}})})}}function og(e,t,n){let r=Qu.get(t);if(id(e)===t&&r&&ad(e,t)){e.stopPropagation();for(let e of r.classList)n.removeClass(t,e);Zu(t)}}var sg=class{destroy(e){}updateValue(e,t){}swap(e,t){let n=Math.min(e,t),r=Math.max(e,t),i=this.detach(r);if(r-n>1){let e=this.detach(n);this.attach(n,i),this.attach(r,e)}else this.attach(n,i)}move(e,t){this.attach(t,this.detach(e))}};function cg(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function lg(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){tn(r);let c=t.length-1;for(tn(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=cg(o,r,o,l,n);if(u!==0){u<0&&e.updateValue(o,l),o++;continue}let d=e.at(s),f=t[c],p=cg(s,d,c,f,n);if(p!==0){p<0&&e.updateValue(s,f),s--,c--;continue}let m=n(o,r),h=n(s,d),g=n(o,l);if(Object.is(g,h)){let t=n(c,f);Object.is(t,m)?(e.swap(o,s),e.updateValue(s,f),c--,s--):e.move(s,o),e.updateValue(o,l),o++;continue}if(i??=new pg,a??=fg(e,o,s,n),ug(e,i,o,g))e.updateValue(o,l),o++,s++;else if(a.has(g))i.set(m,e.detach(o)),s--;else{let n=e.create(o,t[o]);e.attach(o,n),o++,s++}}for(;o<=c;)dg(e,i,n,o,t[o]),o++}else if(t!=null){tn(r);let c=t[Symbol.iterator]();tn(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=cg(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new pg,a??=fg(e,o,s,n);let u=n(o,r);if(ug(e,i,o,u))e.updateValue(o,r),o++,s++,l=c.next();else if(!a.has(u))e.attach(o,e.create(o,r)),o++,s++,l=c.next();else{let r=n(o,t);i.set(r,e.detach(o)),s--}}}for(;!l.done;)dg(e,i,n,e.length,l.value),l=c.next()}for(;o<=s;)e.destroy(e.detach(s--));i?.forEach(t=>{e.destroy(t)})}function ug(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function dg(e,t,n,r,i){if(ug(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function fg(e,t,n,r){let i=new Set;for(let a=t;a<=n;a++)i.add(r(a,e.at(a)));return i}var pg=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function j(e,t,n,r,i,a,o,s){ld(`NgControlFlow`);let c=Go(),l=Ko();return qh(c,l,e,t,n,r,i,Oo(l.consts,a),256,o,s),mg}function mg(e,t,n,r,i,a,o,s){ld(`NgControlFlow`);let c=Go(),l=Ko();return qh(c,l,e,t,n,r,i,Oo(l.consts,a),512,o,s),mg}function M(e,t){ld(`NgControlFlow`);let n=Go(),r=rs(),i=n[r]===Vu?-1:n[r],a=i===-1?void 0:bg(n,27+i);if(Mp(n,r,e)){let r=tn(null);try{if(a!==void 0&&ip(a,0),e!==-1){let r=27+e,i=bg(n,r),a=Tg(n[1],r),o=xp(i,a,n);rp(i,kf(n,a,t,{dehydratedView:o}),0,Af(a,o))}}finally{tn(r)}}else if(a!==void 0){let e=np(a,0);e!==void 0&&(e[8]=t)}}var hg=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-10}};function gg(e){return e}function _g(e,t){return t}var vg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function N(e,t,n,r,i,a,o,s,c,l,u,d,f){ld(`NgControlFlow`);let p=Go(),m=Ko(),h=c!==void 0,g=Go(),_=new vg(h,s?o.bind(g[15][8]):o);g[27+e]=_,qh(p,m,e+1,t,n,r,i,Oo(m.consts,a),256),h&&qh(p,m,e+2,c,l,u,d,Oo(m.consts,f),512)}var yg=class extends sg{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n}get length(){return this.lContainer.length-10}at(e){return this.getLView(e)[8].$implicit}attach(e,t){let n=t[6];this.needsIndexUpdate||=e!==this.length,rp(this.lContainer,t,e,Af(this.templateTNode,n)),xg(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,Sg(this.lContainer,e),Cg(this.lContainer,e)}create(e,t){let n=bp(this.lContainer,this.templateTNode.tView.ssrId);return kf(this.hostLView,this.templateTNode,new hg(this.lContainer,t,e),{dehydratedView:n})}destroy(e){Dd(e[1],e)}updateValue(e,t){this.getLView(e)[8].$implicit=t}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e0){let e=n[9];kte(e,r),Yu.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function Sg(e,t){if(e.length<=10)return;let n=e[10+t],r=n?n[26]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function Cg(e,t){return ap(e,t)}function wg(e,t){return np(e,t)}function Tg(e,t){return Co(e,t)}function F(e,t,n){let r=Go();return Mp(r,rs(),t)&&(Ko(),uf(_s(),r,e,t,r[11],n)),F}function Eg(e,t,n,r,i){Cf(t,e,n,i?`class`:`style`,r)}function I(e,t,n,r){let i=Go(),a=i[1],o=e+27,s=a.firstCreatePass?bm(o,i,2,t,gf,Vo(),n,r):a.data[o];if(po(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(Dp(o),()=>(Dg(e,t,i,s,r),I))}}return Dg(e,t,i,s,r),I}function Dg(e,t,n,r,i){if(bf(r,n,e,t,kg),mo(r)){let e=n[1];of(e,n,r),pu(e,r,n)}i!=null&&sf(n,r)}function L(){let e=Ko(),t=xf(qo());return e.firstCreatePass&&xm(e,t),Uo(t)&&Wo(),Bo(),t.classesWithoutHost!=null&&Zc(t)&&Eg(e,t,Go(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&Qc(t)&&Eg(e,t,Go(),t.stylesWithoutHost,!1),L}function R(e,t,n,r){return I(e,t,n,r),L(),R}function z(e,t,n,r){let i=Go(),a=i[1],o=e+27,s=a.firstCreatePass?Sm(o,a,2,t,n,r):a.data[o];return bf(s,i,e,t,kg),r!=null&&sf(i,s),z}function B(){return Uo(xf(qo()))&&Wo(),Bo(),B}function Og(e,t,n,r){return z(e,t,n,r),B(),Og}var kg=(e,t,n,r,i)=>(Cs(!0),Du(t[11],r,bs()));function Ag(e,t,n){let r=Go(),i=r[1],a=e+27,o=i.firstCreatePass?bm(a,r,8,`ng-container`,gf,Vo(),t,n):i.data[a];if(bf(o,r,e,`ng-container`,Ng),mo(o)){let e=r[1];of(e,r,o),pu(e,o,r)}return n!=null&&sf(r,o),Ag}function jg(){let e=Ko(),t=xf(qo());return e.firstCreatePass&&xm(e,t),jg}function Mg(e,t,n){return Ag(e,t,n),jg(),Mg}var Ng=(e,t,n,r,i)=>(Cs(!0),Yee(t[11],``));function V(){return Go()}function Pg(e,t,n){let r=Go();return Mp(r,rs(),t)&&(Ko(),df(_s(),r,e,t,r[11],n)),Pg}var Fg=void 0;function Ig(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var Lg=[`en`,[[`a`,`p`],[`AM`,`PM`]],[[`AM`,`PM`]],[[`S`,`M`,`T`,`W`,`T`,`F`,`S`],[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`]],Fg,[[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]],Fg,[[`B`,`A`],[`BC`,`AD`],[`Before Christ`,`Anno Domini`]],0,[6,0],[`M/d/yy`,`MMM d, y`,`MMMM d, y`,`EEEE, MMMM d, y`],[`h:mm a`,`h:mm:ss a`,`h:mm:ss a z`,`h:mm:ss a zzzz`],[`{1}, {0}`,Fg,Fg,Fg],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`×`,`‰`,`∞`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,Ig],Rg=Object.create(null);function zg(e){let t=Hg(e),n=Bg(t);if(n)return n;let r=t.split(`-`)[0];if(n=Bg(r),n)return n;if(r===`en`)return Lg;throw new gi(701,!1)}function Bg(e){if(!(e in Rg)){let t=ia.ng&&ia.ng.common&&ia.ng.common.locales&&ia.ng.common.locales[e];return t!==void 0&&(Rg[e]=t),t}return Rg[e]}var Vg={LocaleId:0,DayPeriodsFormat:1,DayPeriodsStandalone:2,DaysFormat:3,DaysStandalone:4,MonthsFormat:5,MonthsStandalone:6,Eras:7,FirstDayOfWeek:8,WeekendRange:9,DateFormat:10,TimeFormat:11,DateTimeFormat:12,NumberSymbols:13,NumberFormats:14,CurrencyCode:15,CurrencySymbol:16,CurrencyName:17,Currencies:18,Directionality:19,PluralCase:20,ExtraData:21};function Hg(e){return e.toLowerCase().replace(/_/g,`-`)}var Ug=`en-US`;function Wg(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function H(e,t,n){let r=Go(),i=Ko(),a=qo();return Gg(i,r,r[11],a,e,t,n),H}function U(e,t,n){let r=Go(),i=Ko(),a=qo();return(a.type&3||n)&&Rp(a,i,r,n,r[11],e,t,Ip(a,r,t)),U}function Gg(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=Ip(r,t,a),Rp(r,e,t,o,n,i,a,c)&&(s=!1)),s){let e=r.outputs?.[i],n=r.hostDirectiveOutputs?.[i];if(n&&n.length)for(let e=0;e>17&32767}function t_(e){return(e&2)==2}function n_(e,t){return e&131071|t<<17}function r_(e){return e|2}function i_(e){return(e&131068)>>2}function a_(e,t){return e&-131069|t<<2}function o_(e){return(e&1)==1}function s_(e){return e|1}function c_(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=e_(o),c=i_(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||wa(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=e_(e[s+1]);e[r+1]=$g(t,s),t!==0&&(e[t+1]=a_(e[t+1],r)),e[s+1]=n_(e[s+1],r)}else e[r+1]=$g(s,0),s!==0&&(e[s+1]=a_(e[s+1],r)),s=r}else e[r+1]=$g(c,0),s===0?s=r:e[c+1]=a_(e[c+1],r),c=r;l&&(e[r+1]=r_(e[r+1])),u_(e,u,r,!0),u_(e,u,r,!1),l_(t,u,e,r,a),o=$g(s,c),a?t.classBindings=o:t.styleBindings=o}function l_(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&wa(a,t)>=0&&(n[r+1]=s_(n[r+1]))}function u_(e,t,n,r){let i=e[n+1],a=t===null,o=r?e_(i):i_(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];d_(n,t)&&(s=!0,e[o+1]=r?s_(i):r_(i)),o=r?e_(i):i_(i)}s&&(e[n+1]=r?r_(i):s_(i))}function d_(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?wa(e,t)>=0:!1}var f_={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function p_(e){return e.substring(f_.key,f_.keyEnd)}function m_(e){return g_(e),h_(e,__(e,0,f_.textEnd))}function h_(e,t){let n=f_.textEnd;return n===t?-1:(t=f_.keyEnd=v_(e,f_.key=t,n),__(e,t,n))}function g_(e){f_.key=0,f_.keyEnd=0,f_.value=0,f_.valueEnd=0,f_.textEnd=e.length}function __(e,t,n){for(;t32;)t++;return t}function y_(e,t,n){return S_(e,t,n,!1),y_}function G(e,t){return S_(e,t,null,!0),G}function b_(e){C_(N_,x_,e,!0)}function x_(e,t){for(let n=m_(t);n>=0;n=h_(t,n))Sa(e,p_(t),!0)}function S_(e,t,n,r){let i=Go(),a=Ko(),o=is(2);if(a.firstUpdatePass&&T_(a,e,o,r),t!==Vu&&Mp(i,o,t)){let s=a.data[hs()];F_(a,s,i,i[11],e,i[o+1]=R_(t,n),r,o)}}function C_(e,t,n,r){let i=Ko(),a=is(2);i.firstUpdatePass&&T_(i,null,a,r);let o=Go();if(n!==Vu&&Mp(o,a,n)){let s=i.data[hs()];if(z_(s,r)&&!w_(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=Si(e,n||``)),Eg(i,s,o,n,r)}else P_(i,s,o,o[11],o[a+1],o[a+1]=M_(e,t,n),r,a)}}function w_(e,t){return t>=e.expandoStartIndex}function T_(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[hs()],o=w_(e,n);z_(a,r)&&t===null&&!o&&(t=!1),t=E_(i,a,t,r),c_(i,a,t,n,o,r)}}function E_(e,t,n,r){let i=Kee(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=A_(null,e,t,n,r),n=j_(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=A_(i,e,t,n,r),a===null){let n=D_(e,t,r);n!==void 0&&Array.isArray(n)&&(n=A_(null,e,t,n[1],r),n=j_(n,t.attrs,r),O_(e,t,r,n))}else a=k_(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function D_(e,t,n){let r=n?t.classBindings:t.styleBindings;if(i_(r)!==0)return e[e_(r)]}function O_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[e_(i)]=r}function k_(e,t,n){let r,i=t.directiveEnd;for(let a=1+t.directiveStylingLast;a0;){let t=e[i],a=Array.isArray(t),c=a?t[1]:t,l=c===null,u=n[i+1];u===Vu&&(u=l?Da:void 0);let d=l?Ca(u,r):c===r?u:void 0;if(a&&!L_(d)&&(d=Ca(t,r)),L_(d)&&(s=d,o))return s;let f=e[i+1];i=o?e_(f):i_(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=Ca(e,r))}return s}function L_(e){return e!==void 0}function R_(e,t){return e==null||e===``||(typeof t==`string`?e=gu(e)+t:typeof e==`object`&&(e=xi(gu(e)))),e}function z_(e,t){return!!(e.flags&(t?8:16))}function K(e,t=``){let n=Go(),r=Ko(),i=e+27,a=r.firstCreatePass?fp(r,i,1,t,null):r.data[i],o=B_(r,n,a,t);n[i]=o,Ss()&&Id(r,n,o,a),Yo(a,!1)}var B_=(e,t,n,r)=>(Cs(!0),Tu(t[11],r));function V_(e,t,n,r=``){return Mp(e,rs(),n)?t+Ki(n)+r:Vu}function Ite(e,t,n,r,i,a=``){let o=Np(e,ns(),n,i);return is(2),o?t+Ki(n)+r+Ki(i)+a:Vu}function Lte(e,t,n,r,i,a,o,s=``){let c=Pp(e,ns(),n,i,o);return is(3),c?t+Ki(n)+r+Ki(i)+a+Ki(o)+s:Vu}function Rte(e,t,n,r,i,a,o,s,c,l=``){let u=Fp(e,ns(),n,i,o,c);return is(4),u?t+Ki(n)+r+Ki(i)+a+Ki(o)+s+Ki(c)+l:Vu}function q(e){return J(``,e),q}function J(e,t,n){let r=Go(),i=V_(r,e,t,n);return i!==Vu&&W_(r,hs(),i),J}function Y(e,t,n,r,i){let a=Go(),o=Ite(a,e,t,n,r,i);return o!==Vu&&W_(a,hs(),o),Y}function H_(e,t,n,r,i,a,o){let s=Go(),c=Lte(s,e,t,n,r,i,a,o);return c!==Vu&&W_(s,hs(),c),H_}function U_(e,t,n,r,i,a,o,s,c){let l=Go(),u=Rte(l,e,t,n,r,i,a,o,s,c);return u!==Vu&&W_(l,hs(),u),U_}function W_(e,t,n){let r=xo(t,e);Eu(e[11],r,n)}function G_(e,t,n){Cc(t)&&(t=t());let r=Go();return Mp(r,rs(),t)&&(Ko(),uf(_s(),r,e,t,r[11],n)),G_}function K_(e,t){let n=Cc(e);return n&&e.set(t),n}function q_(e,t){let n=Go(),r=Ko(),i=qo();return Gg(r,n,n[11],i,e,t),q_}var J_={};function Y_(e){ld(`NgLet`);let t=Ko(),n=Go(),r=e+27;return Yo(fp(t,r,128,null,null),!1),To(t,n,r,J_),Y_}function X_(e){return To(Ko(),Go(),hs(),e),e}function Z_(e){let t=wo(Qo(),27+e);if(t===J_)throw new gi(314,!1);return t}function Q_(e,t,n=``){return V_(Go(),e,t,n)}function $_(e,t,n){let r=Ko();r.firstCreatePass&&ev(t,r.data,r.blueprint,ho(e),n)}function ev(e,t,n,r,i){if(e=Ti(e),Array.isArray(e))for(let a=0;a>20;if(Va(e)||!e.multi){let r=new Xc(l,i,am,null),p=rv(c,t,i?u:u+f,d);p===-1?(yl(hl(s,o),a,c),tv(a,e,t.length),t.push(c),s.directiveStart++,s.directiveEnd++,i&&(s.providerIndexes+=1048576),n.push(r),o.push(r)):(n[p]=r,o[p]=r)}else{let p=rv(c,t,u+f,d),m=rv(c,t,u,u+f),h=p>=0&&n[p],g=m>=0&&n[m];if(i&&!g||!i&&!h){yl(hl(s,o),a,c);let u=Vte(i?Bte:zte,n.length,i,r,l,e);!i&&g&&(n[m].providerFactory=u),tv(a,e,t.length,0),t.push(c),s.directiveStart++,s.directiveEnd++,i&&(s.providerIndexes+=1048576),n.push(u),o.push(u)}else{let t=nv(n[i?m:p],l,!i&&r);tv(a,e,p>-1?p:m,t)}!i&&r&&g&&n[m].componentProviders++}}}function tv(e,t,n,r){let i=Va(t),a=Ha(t);if(i||a){let o=(a?Ti(t.useClass):t).prototype.ngOnDestroy;if(o){let a=e.destroyHooks||=[];if(!i&&t.multi){let e=a.indexOf(n);e===-1?a.push(n,[r,o]):a[e+1].push(r,o)}else a.push(n,o)}}}function nv(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function rv(e,t,n,r){for(let i=n;i{n.providersResolver=(t,n)=>$_(t,n?n(e):e,!1),t&&(n.viewProvidersResolver=(e,n)=>$_(e,n?n(t):t,!0))}}function ov(e,t){let n=ts()+e,r=Go();return r[n]===Vu?Ap(r,n,t()):jp(r,n)}function sv(e,t,n){return uv(Go(),ts(),e,t,n)}function cv(e,t,n,r){return dv(Go(),ts(),e,t,n,r)}function Hte(e,t,n,r,i,a,o){return Ute(Go(),ts(),e,t,n,r,i,a)}function lv(e,t){let n=e[t];return n===Vu?void 0:n}function uv(e,t,n,r,i,a){let o=t+n;return Mp(e,o,i)?Ap(e,o+1,a?r.call(a,i):r(i)):lv(e,o+1)}function dv(e,t,n,r,i,a,o){let s=t+n;return Np(e,s,i,a)?Ap(e,s+2,o?r.call(o,i,a):r(i,a)):lv(e,s+2)}function Ute(e,t,n,r,i,a,o,s,c){let l=t+n;return Fp(e,l,i,a,o,s)?Ap(e,l+4,c?r.call(c,i,a,o,s):r(i,a,o,s)):lv(e,l+4)}function fv(e,t){let n=Ko(),r,i=e+27;n.firstCreatePass?(r=Wte(t,n.pipeRegistry),n.data[i]=r,r.onDestroy&&(n.destroyHooks??=[]).push(i,r.onDestroy)):r=n.data[i];let a=r.factory||(r.factory=ma(r.type,!0)),o=na(am);try{let e=ll(!1),t=a();return ll(e),To(n,Go(),i,t),t}finally{na(o)}}function Wte(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function pv(e,t,n){let r=e+27,i=Go(),a=wo(i,r);return hv(i,r)?uv(i,ts(),t,a.transform,n,a):a.transform(n)}function mv(e,t,n,r){let i=e+27,a=Go(),o=wo(a,i);return hv(a,i)?dv(a,ts(),t,o.transform,n,r,o):o.transform(n,r)}function hv(e,t){return e[1].data[t].pure}function gv(e,t){return dp(e,t)}var Gte=(()=>{class e{applicationErrorHandler=C($s);appRef=C(tg);taskService=C(Ms);ngZone=C(Bs);zonelessEnabled=C(uc);tracing=C(sd,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new dr;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Rs):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(C(dc,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{let e=this.taskService.add();if(!this.runningTick&&(this.cleanup(),!this.zonelessEnabled||this.appRef.includeAllTestViews)){this.taskService.remove(e);return}this.switchToMicrotaskScheduler(),this.taskService.remove(e)})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()}))}switchToMicrotaskScheduler(){this.ngZone.runOutsideAngular(()=>{let e=this.taskService.add();this.useMicrotaskScheduler=!0,queueMicrotask(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(e)})})}notify(e){if(!this.zonelessEnabled&&e===5)return;switch(e){case 0:case 2:this.appRef.dirtyFlags|=2;break;case 3:case 4:case 5:case 1:this.appRef.dirtyFlags|=4;break;case 6:this.appRef.dirtyFlags|=2;break;case 12:this.appRef.dirtyFlags|=16;break;case 13:this.appRef.dirtyFlags|=2;break;case 11:break;default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick())return;let t=this.useMicrotaskScheduler?Is:Fs;this.pendingRenderTaskId=this.taskService.add(),this.cancelScheduledCallback=this.scheduleInRootZone?Zone.root.run(()=>t(()=>this.tick())):this.ngZone.runOutsideAngular(()=>t(()=>this.tick()))}shouldScheduleTick(){return!(this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(`isAngularZone_ID`+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let e=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(e){this.applicationErrorHandler(e)}finally{this.taskService.remove(e),this.cleanup()}}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let e=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(e)}}static ɵfac=function(t){return new(t||e)};static ɵprov=Il({token:e,factory:e.ɵfac})}return e})();function Kte(){return[{provide:lc,useExisting:Gte},{provide:Bs,useClass:Js},{provide:uc,useValue:!0}]}function qte(){return typeof $localize<`u`&&$localize.locale||`en-US`}var _v=new Pi(``,{factory:()=>C(_v,{optional:!0,skipSelf:!0})||qte()}),vv=class{destroyed=!1;listeners=null;errorHandler=C(Qs,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=C(Os);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new gi(953,!1);return(this.listeners??=[]).push(e),{unsubscribe:()=>{let t=this.listeners?this.listeners.indexOf(e):-1;t>-1&&(this.isEmitting?(this.hasNullListeners=!0,this.listeners[t]=null):this.listeners.splice(t,1))}}}emit(e){if(this.destroyed){console.warn(vi(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let t=tn(null);try{for(let t of this.listeners)try{t!==null&&t(e)}catch(e){this.errorHandler?.handleError(e)}}finally{this.hasNullListeners&&(this.hasNullListeners=!1,this.listeners&&Jte(this.listeners)),tn(t),this.isEmitting=!1}}};function Jte(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function X(e,t){return Cn(e,t?.equal)}function Z(e){return Xn(e)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var Yte=e=>e;function Q(e,t){return typeof e==`function`?yv(Kn(e,Yte,t?.equal),t?.debugName,t?.set):yv(Kn(e.source,e.computation,e.equal),e.debugName,e.set)}function yv(e,t,n){let r=e[en],i=e;if(n!==void 0){let t=e=>qn(r,e);i.set=e=>n(e,t),i.update=r=>n(r(Z(e)),t)}else i.set=e=>qn(r,e),i.update=e=>Jn(r,e);return i.asReadonly=tc.bind(e),i}var bv=!1;function Xte(){return bv}function xv(e){bv=e}function Sv(e,t){let n=Object.create(Tc);n.value=e,n.transformFn=t?.transform;function r(){if(an(n),n.value===wc)throw new gi(-950,null);return n.value}return r[en]=n,r}function Cv(e){return new vv}function wv(e,t){return Sv(e,t)}function Zte(e){return Sv(wc,e)}var $=(wv.required=Zte,wv);function Tv(e,t){let n=Object.create(Tc),r=new vv;n.value=e;function i(){return an(n),Ev(n.value),n.value}return i[en]=n,i.asReadonly=tc.bind(i),i.set=e=>{n.equal(n.value,e)||(Fn(n,e),r.emit(e))},i.update=e=>{Ev(n.value),i.set(e(n.value))},i.subscribe=r.subscribe.bind(r),i.destroyRef=r.destroyRef,i}function Ev(e){if(e===wc)throw new gi(952,!1)}function Dv(e,t){return Tv(e,t)}function Qte(e){return Tv(wc,e)}var Ov=(Dv.required=Qte,Dv);function kv(e,t){return hh(t)}function $te(e,t){return gh(t)}var Av=(kv.required=$te,kv),ene=(()=>{class e{static __NG_ELEMENT_ID__=tne}return e})();function tne(e){return nne(qo(),Go(),(e&16)==16)}function nne(e,t,n){if(po(e)&&!n){let n=Eo(e.index,t);return new cp(n,n)}if(e.type&175){let e=t[15];return new cp(e,t)}return null}var jv=new Pi(``),rne=new Pi(``);function Mv(e){return!e.moduleRef}function ine(e){let t=Mv(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Bs);return n.run(()=>{Mv(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get($s),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),Mv(e)){let n=()=>t.destroy(),r=e.platformInjector.get(jv);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(jv);n.add(t),e.moduleRef.onDestroy(()=>{rg(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return one(r,n,()=>{let n=t.get(Ms),r=n.add(),i=t.get(Fh);return i.runInitializers(),i.donePromise.then(()=>{if(Wg(t.get(_v,Ug)||`en-US`),!t.get(rne,!0))return Mv(e)?t.get(tg):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Mv(e)){let n=t.get(tg);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return ane?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var ane;function one(e,t,n){try{let r=n();return yh(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var Nv=null;function sne(e=[],t){return Es.create({name:t,providers:[{provide:Ua,useValue:`platform`},{provide:jv,useValue:new Set([()=>Nv=null])},...e]})}function cne(e=[]){if(Nv)return Nv;let t=sne(e);return Nv=t,$h(),lne(t),t}function lne(e){let t=e.get(ic,null);oo(e,()=>{t?.forEach(e=>e())})}function une(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;Bc(Dc.BootstrapApplicationStart);try{let e=i?.injector??cne(r);return ine({r3Injector:new Sh({providers:[Kte(),ec,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{Bc(Dc.BootstrapApplicationEnd)}}function Pv(e){return typeof e==`boolean`?e:e!=null&&e!==`false`}var Fv=Symbol(`NOT_SET`),Iv=new Set,dne={...Ln,kind:`afterRenderEffectPhase`,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:Fv,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(an(r),r.value),r.signal[en]=r,r.registerCleanupFn=e=>(r.cleanup??=new Set).add(e),this.nodes[e]=r,this.hooks[e]=e=>r.phaseFn(e)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){if(this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();super.destroy();for(let e of this.nodes)if(e)try{for(let t of e.cleanup??Iv)t()}finally{_n(e)}}};function Lv(e,t){let n=t?.injector??C(Es),r=n.get(lc),i=n.get(ud),a=n.get(sd,null,{optional:!0});i.impl??=n.get(fd);let o=e;typeof o==`function`&&(o={mixedReadWrite:e});let s=n.get(sc,null,{optional:!0}),c=new fne(i.impl,[o.earlyRead,o.write,o.mixedReadWrite,o.read],s?.view,r,n,a?.snapshot(null));return i.impl.register(c),c}var Rv=null;function zv(){return Rv}function pne(e){Rv??=e}var mne=class{},Bv=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(Bv||{}),Vv=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(Vv||{}),Hv=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(Hv||{}),Uv={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function hne(e){return zg(e)[Vg.LocaleId]}function gne(e,t,n){let r=zg(e);return Yv(Yv([r[Vg.DayPeriodsFormat],r[Vg.DayPeriodsStandalone]],t),n)}function _ne(e,t,n){let r=zg(e);return Yv(Yv([r[Vg.DaysFormat],r[Vg.DaysStandalone]],t),n)}function vne(e,t,n){let r=zg(e);return Yv(Yv([r[Vg.MonthsFormat],r[Vg.MonthsStandalone]],t),n)}function yne(e,t){let n=zg(e)[Vg.Eras];return Yv(n,t)}function Wv(e,t){return Yv(zg(e)[Vg.DateFormat],t)}function Gv(e,t){return Yv(zg(e)[Vg.TimeFormat],t)}function Kv(e,t){let n=zg(e)[Vg.DateTimeFormat];return Yv(n,t)}function qv(e,t){let n=zg(e),r=n[Vg.NumberSymbols][t];if(r===void 0){if(t===Uv.CurrencyDecimal)return n[Vg.NumberSymbols][Uv.Decimal];if(t===Uv.CurrencyGroup)return n[Vg.NumberSymbols][Uv.Group]}return r}function Jv(e){if(!e[Vg.ExtraData])throw new gi(2303,!1)}function bne(e){let t=zg(e);return Jv(t),(t[Vg.ExtraData][2]||[]).map(e=>typeof e==`string`?Xv(e):[Xv(e[0]),Xv(e[1])])}function xne(e,t,n){let r=zg(e);return Jv(r),Yv(Yv([r[Vg.ExtraData][0],r[Vg.ExtraData][1]],t)||[],n)||[]}function Yv(e,t){for(let n=t;n>-1;n--)if(e[n]!==void 0)return e[n];throw new gi(2304,!1)}function Xv(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var Sne=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Zv=Object.create(null),Cne=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,wne=256;function Tne(e,t,n,r){let i=Fne(e);Ene(t),t=$v(n,t)||t;let a=[],o;for(;t;)if(o=Cne.exec(t),o){a=a.concat(o.slice(1));let e=a.pop();if(!e)break;t=e}else{a.push(t);break}let s=i.getTimezoneOffset();r&&(s=uy(r,s),i=Pne(i,r));let c=``;return a.forEach(e=>{let t=Mne(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function Ene(e){if(e.length>wne)throw new gi(2300,!1)}function Qv(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function $v(e,t){let n=hne(e);if(Zv[n]??=Object.create(null),Zv[n][t])return Zv[n][t];let r=``;switch(t){case`shortDate`:r=Wv(e,Hv.Short);break;case`mediumDate`:r=Wv(e,Hv.Medium);break;case`longDate`:r=Wv(e,Hv.Long);break;case`fullDate`:r=Wv(e,Hv.Full);break;case`shortTime`:r=Gv(e,Hv.Short);break;case`mediumTime`:r=Gv(e,Hv.Medium);break;case`longTime`:r=Gv(e,Hv.Long);break;case`fullTime`:r=Gv(e,Hv.Full);break;case`short`:let t=$v(e,`shortTime`),n=$v(e,`shortDate`);r=ey(Kv(e,Hv.Short),[t,n]);break;case`medium`:let i=$v(e,`mediumTime`),a=$v(e,`mediumDate`);r=ey(Kv(e,Hv.Medium),[i,a]);break;case`long`:let o=$v(e,`longTime`),s=$v(e,`longDate`);r=ey(Kv(e,Hv.Long),[o,s]);break;case`full`:let c=$v(e,`fullTime`),l=$v(e,`fullDate`);r=ey(Kv(e,Hv.Full),[c,l])}return r&&(Zv[n][t]=r),r}function ey(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return Object.hasOwn(t,n)?t[n]:e})),e}function ty(e,t,n=`-`,r,i){let a=``;(e<0||i&&e<=0)&&(i?e=-e+1:(e=-e,a=n));let o=String(e);for(;o.length0||s>-n)&&(s+=n),e===3)s===0&&n===-12&&(s=12);else if(e===6)return Dne(s,t);let c=qv(o,Uv.MinusSign);return ty(s,t,c,r,i)}}function One(e,t){switch(e){case 0:return t.getFullYear();case 1:return t.getMonth();case 2:return t.getDate();case 3:return t.getHours();case 4:return t.getMinutes();case 5:return t.getSeconds();case 6:return t.getMilliseconds();case 7:return t.getDay();default:throw new gi(2301,!1)}}function ry(e,t,n=Bv.Format,r=!1){return function(i,a){return kne(i,a,e,t,n,r)}}function kne(e,t,n,r,i,a){switch(n){case 2:return vne(t,i,r)[e.getMonth()];case 1:return _ne(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=bne(t),a=xne(t,i,r),s=e.findIndex(e=>{if(Array.isArray(e)){let[t,r]=e,i=n>=t.hours&&o>=t.minutes,a=n0?Math.floor(i/60):Math.ceil(i/60);switch(e){case 0:return(i>=0?`+`:``)+ty(o,2,a)+ty(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+ty(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+ty(o,2,a)+`:`+ty(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+ty(o,2,a)+`:`+ty(Math.abs(i%60),2,a);default:throw new gi(2310,!1)}}}var Ane=0,ay=4;function jne(e){let t=Qv(e,Ane,1).getDay();return Qv(e,0,1+(t<=ay?ay:11)-t)}function oy(e){let t=e.getDay(),n=t===0?-3:ay-t;return Qv(e.getFullYear(),e.getMonth(),e.getDate()+n)}function sy(e,t=!1){return function(n,r){let i;if(t){let e=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,t=n.getDate();i=1+Math.floor((t+e)/7)}else{let e=oy(n),t=jne(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return ty(i,e,qv(r,Uv.MinusSign))}}function cy(e,t=!1){return function(n,r){return ty(oy(n).getFullYear(),e,qv(r,Uv.MinusSign),t)}}var ly=Object.create(null);function Mne(e){if(ly[e])return ly[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=ry(3,Vv.Abbreviated);break;case`GGGG`:t=ry(3,Vv.Wide);break;case`GGGGG`:t=ry(3,Vv.Narrow);break;case`y`:t=ny(0,1,0,!1,!0);break;case`yy`:t=ny(0,2,0,!0,!0);break;case`yyy`:t=ny(0,3,0,!1,!0);break;case`yyyy`:t=ny(0,4,0,!1,!0);break;case`Y`:t=cy(1);break;case`YY`:t=cy(2,!0);break;case`YYY`:t=cy(3);break;case`YYYY`:t=cy(4);break;case`M`:case`L`:t=ny(1,1,1);break;case`MM`:case`LL`:t=ny(1,2,1);break;case`MMM`:t=ry(2,Vv.Abbreviated);break;case`MMMM`:t=ry(2,Vv.Wide);break;case`MMMMM`:t=ry(2,Vv.Narrow);break;case`LLL`:t=ry(2,Vv.Abbreviated,Bv.Standalone);break;case`LLLL`:t=ry(2,Vv.Wide,Bv.Standalone);break;case`LLLLL`:t=ry(2,Vv.Narrow,Bv.Standalone);break;case`w`:t=sy(1);break;case`ww`:t=sy(2);break;case`W`:t=sy(1,!0);break;case`d`:t=ny(2,1);break;case`dd`:t=ny(2,2);break;case`c`:case`cc`:t=ny(7,1);break;case`ccc`:t=ry(1,Vv.Abbreviated,Bv.Standalone);break;case`cccc`:t=ry(1,Vv.Wide,Bv.Standalone);break;case`ccccc`:t=ry(1,Vv.Narrow,Bv.Standalone);break;case`cccccc`:t=ry(1,Vv.Short,Bv.Standalone);break;case`E`:case`EE`:case`EEE`:t=ry(1,Vv.Abbreviated);break;case`EEEE`:t=ry(1,Vv.Wide);break;case`EEEEE`:t=ry(1,Vv.Narrow);break;case`EEEEEE`:t=ry(1,Vv.Short);break;case`a`:case`aa`:case`aaa`:t=ry(0,Vv.Abbreviated);break;case`aaaa`:t=ry(0,Vv.Wide);break;case`aaaaa`:t=ry(0,Vv.Narrow);break;case`b`:case`bb`:case`bbb`:t=ry(0,Vv.Abbreviated,Bv.Standalone,!0);break;case`bbbb`:t=ry(0,Vv.Wide,Bv.Standalone,!0);break;case`bbbbb`:t=ry(0,Vv.Narrow,Bv.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=ry(0,Vv.Abbreviated,Bv.Format,!0);break;case`BBBB`:t=ry(0,Vv.Wide,Bv.Format,!0);break;case`BBBBB`:t=ry(0,Vv.Narrow,Bv.Format,!0);break;case`h`:t=ny(3,1,-12);break;case`hh`:t=ny(3,2,-12);break;case`H`:t=ny(3,1);break;case`HH`:t=ny(3,2);break;case`m`:t=ny(4,1);break;case`mm`:t=ny(4,2);break;case`s`:t=ny(5,1);break;case`ss`:t=ny(5,2);break;case`S`:t=ny(6,1);break;case`SS`:t=ny(6,2);break;case`SSS`:t=ny(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=iy(0);break;case`ZZZZZ`:t=iy(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=iy(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=iy(2);break;default:return null}return ly[e]=t,t}function uy(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function Nne(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function Pne(e,t,n){let r=e.getTimezoneOffset();return Nne(e,-1*(uy(t,r)-r))}function Fne(e){if(dy(e))return e;if(typeof e==`number`&&!isNaN(e))return new Date(e);if(typeof e==`string`){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){let[t,n=1,r=1]=e.split(`-`).map(e=>+e);return Qv(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(Sne))return Ine(n)}let t=new Date(e);if(!dy(t))throw new gi(2311,!1);return t}function Ine(e){let t=new Date(0),n=0,r=0,i=e[8]?t.setUTCFullYear:t.setFullYear,a=e[8]?t.setUTCHours:t.setHours;e[9]&&(n=Number(e[9]+e[10]),r=Number(e[9]+e[11])),i.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));let o=Number(e[4]||0)-n,s=Number(e[5]||0)-r,c=Number(e[6]||0),l=Math.floor(parseFloat(`0.`+(e[7]||0))*1e3);return a.call(t,o,s,c,l),t}function dy(e){return e instanceof Date&&!isNaN(e.valueOf())}var fy=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=C(Es);constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let e=this._viewContainerRef;if(this._viewRef&&e.remove(e.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let t=this._createContextForwardProxy();this._viewRef=e.createEmbeddedView(this.ngTemplateOutlet,t,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector===`outlet`?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,t,n)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,t,n):!1,get:(e,t,n)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,t,n)}})}static ɵfac=function(t){return new(t||e)(am(zm))};static ɵdir=Oh({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[jc]})}return e})();function Lne(e,t){return new gi(2100,!1)}var Rne=`mediumDate`,zne=new Pi(``),Bne=new Pi(``),py=(()=>{class e{locale;defaultTimezone;defaultOptions;constructor(e,t,n){this.locale=e,this.defaultTimezone=t,this.defaultOptions=n}transform(t,n,r,i){if(t==null||t===``||t!==t)return null;try{let e=n??this.defaultOptions?.dateFormat??Rne,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Tne(t,e,i||this.locale,a)}catch(t){throw Lne(e,t.message)}}static ɵfac=function(t){return new(t||e)(am(_v,16),am(zne,24),am(Bne,24))};static ɵpipe=kh({name:`date`,type:e,pure:!0})}return e})(),my=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=kh({name:`json`,type:e,pure:!1})}return e})();function Vne(e,t){t=encodeURIComponent(t);for(let n of e.split(`;`)){let e=n.indexOf(`=`),[r,i]=e==-1?[n,``]:[n.slice(0,e),n.slice(e+1)];if(r.trim()!==t)continue;let a=i;try{a=decodeURIComponent(i)}catch{}return a.length>1&&a[0]===`"`&&a[a.length-1]===`"`&&(a=a.slice(1,-1)),a}return null}var Hne=`browser`,hy=class{_doc;constructor(e){this._doc=e}manager},gy=(()=>{class e extends hy{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,n,r){return e.addEventListener(t,n,r),()=>this.removeEventListener(e,t,n,r)}removeEventListener(e,t,n,r){return e.removeEventListener(t,n,r)}static ɵfac=function(t){return new(t||e)(la(Ds))};static ɵprov=Di({token:e,factory:e.ɵfac})}return e})(),_y=new Pi(``),vy=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(e=>{e.manager=this});let n=e.filter(e=>!(e instanceof gy));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof gy);r&&this._plugins.push(r)}addEventListener(e,t,n,r){return this._findPluginFor(t).addEventListener(e,t,n,r)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(t=>t.supports(e)),!t)throw new gi(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(la(_y),la(Bs))};static ɵprov=Di({token:e,factory:e.ɵfac})}return e})(),yy=`ng-app-id`;function by(e){for(let t of e)t.remove()}function xy(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function Sy(e,t,n,r){let i=e.head?.querySelectorAll(`style[${yy}="${t}"],link[${yy}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(yy),e instanceof HTMLLinkElement?r.set(e.href.slice(e.href.lastIndexOf(`/`)+1),{usage:0,elements:[e]}):e.textContent&&n.set(e.textContent,{usage:0,elements:[e]});return!0}function Cy(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var wy=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,t,n,r={}){this.doc=e,this.appId=t,this.nonce=n,Sy(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,xy);t?.forEach(e=>this.addUsage(e,this.external,Cy))}removeStyles(e,t){for(let t of e)this.removeUsage(t,this.inline);t?.forEach(e=>this.removeUsage(e,this.external))}addUsage(e,t,n){let r=t.get(e);r?r.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(t=>this.addElement(t,n(e,this.doc)))})}removeUsage(e,t){let n=t.get(e);n&&(n.usage--,n.usage<=0&&(by(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])by(e);this.hosts.clear()}addHost(e){if(!this.hosts.has(e)){this.hosts.add(e);for(let[t,{elements:n}]of this.inline)n.push(this.addElement(e,xy(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,Cy(t,this.doc)))}}removeHost(e){this.hosts.delete(e);for(let t of[...this.inline.values(),...this.external.values()]){let n=[];for(let r of t.elements)r.parentNode===e?r.remove():n.push(r);t.elements=n}}addElement(e,t){return this.nonce&&t.setAttribute(`nonce`,this.nonce),e.appendChild(t)}static ɵfac=function(t){return new(t||e)(la(Ds),la(nc),la(oc,8),la(ac))};static ɵprov=Di({token:e,factory:e.ɵfac})}return e})(),Ty={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`,math:`http://www.w3.org/1998/Math/MathML`},Ey=/%COMP%/g,Dy=`%COMP%`,Oy=`_nghost-${Dy}`,ky=`_ngcontent-${Dy}`,Ay=!0,jy=new Pi(``,{factory:()=>Ay}),My=new Pi(``);function Ny(e){return ky.replace(Ey,e)}function Py(e){return Oy.replace(Ey,e)}function Fy(e,t){return t.map(t=>t.replace(Ey,e))}var Iy=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;cssVarNamespace;constructor(e,t,n,r,i,a,o=null,s=null,c=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=n,this.removeStylesOnCompDestroy=r,this.doc=i,this.ngZone=a,this.nonce=o,this.tracingService=s,this.cssVarNamespace=c??``,this.defaultRenderer=new Ly(e,i,a,this.tracingService,this.cssVarNamespace)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;let n=this.getOrCreateRenderer(e,t);return n instanceof Vy?n.applyToHost(e):n instanceof By&&n.applyStyles(),n}getOrCreateRenderer(e,t){let n=this.rendererByCompId,r=n.get(t.id);if(!r){let i=this.doc,a=this.ngZone,o=this.eventManager,s=this.sharedStylesHost,c=this.removeStylesOnCompDestroy,l=this.tracingService;switch(t.encapsulation){case mu.Emulated:r=new Vy(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case mu.ShadowDom:return new zy(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case mu.ExperimentalIsolatedShadowDom:return new zy(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new By(o,s,t,c,i,a,l,this.cssVarNamespace)}n.set(t.id,r)}return r}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static ɵfac=function(t){return new(t||e)(la(vy),la(rm),la(nc),la(jy),la(Ds),la(Bs),la(oc),la(sd,8),la(My,8))};static ɵprov=Di({token:e,factory:e.ɵfac})}return e})(),Ly=class{eventManager;doc;ngZone;tracingService;cssVarNamespace;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r,i=``){this.eventManager=e,this.doc=t,this.ngZone=n,this.tracingService=r,this.cssVarNamespace=i}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(Ty[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(Ry(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=Ry(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new gi(-5106,!1);r.insertBefore(t,n)}}removeChild(e,t){t.remove()}selectRootElement(e,t){let n=typeof e==`string`?this.doc.querySelector(e):e;if(!n)throw new gi(-5104,!1);return t||(n.textContent=``),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+`:`+t;let i=Ty[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Ty[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){let i=t.startsWith(`--`);i&&(t=t.replace(`%NS%`,this.cssVarNamespace)),i||r&(Hu.DashCase|Hu.Important)?e.style.setProperty(t,n,r&Hu.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&Hu.DashCase?e.style.removeProperty(t):e.style[t]=``}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n,r){if(typeof e==`string`&&(e=zv().getGlobalEventTarget(this.doc,e),!e))throw new gi(-5102,!1);let i=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(i=this.tracingService.wrapEventListener(e,t,i)),this.eventManager.addEventListener(e,t,i,r)}decoratePreventDefault(e){return t=>{if(t===`__ngUnwrap__`)return e;e(t)===!1&&t.preventDefault()}}};function Ry(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var zy=class extends Ly{hostEl;sharedStylesHost;shadowRoot;constructor(e,t,n,r,i,a,o,s,c){super(e,r,i,o,s),this.hostEl=t,this.sharedStylesHost=c,this.shadowRoot=t.attachShadow({mode:`open`}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let l=n.styles;l=Fy(n.id,l).map(e=>e.replace(/%NS%/g,s));for(let e of l){let t=document.createElement(`style`);a&&t.setAttribute(`nonce`,a),t.textContent=e,this.shadowRoot.appendChild(t)}let u=n.getExternalStyles?.();if(u)for(let e of u){let t=Cy(e,r);a&&t.setAttribute(`nonce`,a),this.shadowRoot.appendChild(t)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},By=class extends Ly{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,i,a,o,s,c){super(e,i,a,o,s),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let l=n.styles,u=c?Fy(c,l):l;this.styles=u.map(e=>e.replace(/%NS%/g,s)),this.styleUrls=n.getExternalStyles?.(c)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Yu.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Vy=class extends By{contentAttr;hostAttr;constructor(e,t,n,r,i,a,o,s,c){let l=r+`-`+n.id;super(e,t,n,i,a,o,s,c,l),this.contentAttr=Ny(l),this.hostAttr=Py(l)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,``)}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,``),n}},Hy=class e extends mne{supportsDOMEvents=!0;static makeCurrent(){pne(new e)}onAndCancel(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.remove()}createElement(e,t){return t||=this.getDefaultDocument(),t.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument(`fakeTitle`)}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return t===`window`?window:t===`document`?e:t===`body`?e.body:null}getBaseHref(e){let t=Wy();return t==null?null:Gy(t)}resetBaseElement(){Uy=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return Vne(document.cookie,e)}},Uy=null;function Wy(){return Uy||=document.head.querySelector(`base`),Uy?Uy.getAttribute(`href`):null}function Gy(e){return new URL(e,document.baseURI).pathname}var Ky=[`alt`,`control`,`meta`,`shift`],qy={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},Jy={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},Yy=(()=>{class e extends hy{constructor(e){super(e)}supports(t){return e.parseEventName(t)!=null}addEventListener(t,n,r,i){let a=e.parseEventName(n),o=e.eventCallback(a.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>zv().onAndCancel(t,a.domEventName,o,i))}static parseEventName(t){let n=t.toLowerCase().split(`.`),r=n.shift();if(n.length===0||r!==`keydown`&&r!==`keyup`)return null;let i=e._normalizeKey(n.pop()),a=``,o=n.indexOf(`code`);if(o>-1&&(n.splice(o,1),a=`code.`),Ky.forEach(e=>{let t=n.indexOf(e);t>-1&&(n.splice(t,1),a+=e+`.`)}),a+=i,n.length!=0||i.length===0)return null;let s={};return s.domEventName=r,s.fullKey=a,s}static matchEventFullKeyCode(e,t){let n=qy[e.key]||e.key,r=``;return t.indexOf(`code.`)>-1&&(n=e.code,r=`code.`),n==null||!n?!1:(n=n.toLowerCase(),n===` `?n=`space`:n===`.`&&(n=`dot`),Ky.forEach(t=>{if(t!==n){let n=Jy[t];n(e)&&(r+=t+`.`)}}),r+=n,r===t)}static eventCallback(t,n,r){return i=>{e.matchEventFullKeyCode(i,t)&&r.runGuarded(()=>n(i))}}static _normalizeKey(e){return e===`esc`?`escape`:e}static ɵfac=function(t){return new(t||e)(la(Ds))};static ɵprov=Di({token:e,factory:e.ɵfac})}return e})();async function Xy(e,t,n){return une({rootComponent:e,...Zy(t,n)})}function Zy(e,t){return{platformRef:t?.platformRef,appProviders:[...nb,...e?.providers??[]],platformProviders:tb}}function Qy(){Hy.makeCurrent()}function $y(){return new Qs}function eb(){return nu(document),document}var tb=[{provide:ac,useValue:Hne},{provide:ic,useValue:Qy,multi:!0},{provide:Ds,useFactory:eb}],nb=[{provide:Ua,useValue:`root`},{provide:Qs,useFactory:$y},{provide:_y,useClass:gy,multi:!0},{provide:_y,useClass:Yy,multi:!0},Iy,{provide:rm,useClass:wy},{provide:wy,useExisting:rm},vy,{provide:Cp,useExisting:Iy},[]];function rb(e,t){let n=`\x1B[${e}m`,r=`\x1B[${t}m`;return((e,...t)=>{if(Array.isArray(e)&&`raw`in e){let i=e,a=``;for(let e=0;e{let r=new sb({code:i,why:ab(a.why,e),fix:ab(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:ab(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function ub(e){return t=>{let n=`${e.bold(e.red(`[${t.name}]`))} ${t.message}`,r=[];return t.fix&&r.push(`${e.dim(`fix:`)} ${t.fix}`),t.sources?.length&&r.push(`${e.dim(`sources:`)} ${t.sources.join(`, `)}`),t.docs&&r.push(`${e.dim(`see:`)} ${e.cyan(t.docs)}`),r.length===0?n:[n,...r.map((t,n)=>`${e.dim(n=0?n.slice(0,r):n}function Si(e,t){return e?t?`${e} ${t}`:e:t||``}var Ci=yi({__forward_ref__:yi});function wi(e){return e.__forward_ref__=wi,e}function Ti(e){return Ei(e)?e():e}function Ei(e){return typeof e==`function`&&Object.hasOwn(e,Ci)&&e.__forward_ref__===wi}function Di(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Oi(e){return ki(e,Mi)}function ki(e,t){return Object.hasOwn(e,t)&&e[t]||null}function Ai(e){return(e?.[Mi]??null)||null}function ji(e){return e&&Object.hasOwn(e,Ni)?e[Ni]:null}var Mi=yi({ɵprov:yi}),Ni=yi({ɵinj:yi}),Pi=class{_desc;ngMetadataName=`InjectionToken`;ɵprov;constructor(e,t){this._desc=e,this.ɵprov=void 0,typeof t==`number`?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.ɵprov=Di({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Fi(e){return e&&!!e.ɵproviders}var Ii=yi({ɵcmp:yi}),Li=yi({ɵdir:yi}),Ri=yi({ɵpipe:yi}),zi=yi({ɵfac:yi}),Bi=yi({__NG_ELEMENT_ID__:yi}),Vi=yi({__NG_ENV_ID__:yi});function Hi(e){return Gi(e,`@Component`),e[Ii]||null}function Ui(e){return Gi(e,`@Directive`),e[Li]||null}function Wi(e){return Gi(e,`@Pipe`),e[Ri]||null}function Gi(e,t){if(e==null)throw new gi(-919,!1)}function Ki(e){return typeof e==`string`?e:e==null?``:String(e)}var qi=yi({ngErrorCode:yi}),Ji=yi({ngErrorMessage:yi}),Yi=yi({ngTokenPath:yi});function Xi(e,t){return Qi(``,-200,t)}function Zi(e,t){throw new gi(-201,!1)}function Qi(e,t,n){let r=new gi(t,e);return r[qi]=t,r[Ji]=e,n&&(r[Yi]=n),r}function $i(e){return e[qi]}var ea;function ta(){return ea}function na(e){let t=ea;return ea=e,t}function ra(e,t,n){let r=Oi(e);if(r&&r.providedIn==`root`)return r.value===void 0?r.value=r.factory():r.value;if(n&8)return null;if(t!==void 0)return t;Zi(e,``)}var ia=globalThis,aa={},oa=`__NG_DI_FLAG__`,sa=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=ua(t)||0;try{return this.injector.get(e,n&8?null:aa,n)}catch(e){if(Gn(e))return e;throw e}}};function ca(e,t=0){let n=Hn();if(n===void 0)throw new gi(-203,!1);if(n===null)return ra(e,void 0,t);{let r=da(t),i=n.retrieve(e,r);if(Gn(i)){if(r.optional)return null;throw i}return i}}function la(e,t=0){return(ta()||ca)(Ti(e),t)}function C(e,t){return la(e,ua(t))}function ua(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function da(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function fa(e){let t=[];for(let n=0;nArray.isArray(e)?_a(e,t):t(e))}function va(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function ya(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function ba(e,t){let n=[];for(let r=0;rt;){let t=i-2;e[i]=e[t],i--}e[t]=n,e[t+1]=r}}function Sa(e,t,n){let r=wa(e,t);return r>=0?e[r|1]=n:(r=~r,xa(e,r,t,n)),r}function Ca(e,t){let n=wa(e,t);if(n>=0)return e[n|1]}function wa(e,t){return Ta(e,t,1)}function Ta(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){let a=r+(i-r>>1),o=e[a<t?i=a:r=a+1}return~(i<{n.push(e)};return _a(t,e=>{let t=e;Fa(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&Pa(i,a),n}function Pa(e,t){for(let n=0;n{t(e,r)})}}function Fa(e,t,n,r){if(e=Ti(e),!e)return!1;let i=null,a=ji(e),o=!a&&Hi(e);if(!a&&!o){let t=e.ngModule;if(a=ji(t),a)i=t;else return!1}else if(o&&!o.standalone)return!1;else i=e;let s=r.has(i);if(o){if(s)return!1;if(r.add(i),o.dependencies){let e=typeof o.dependencies==`function`?o.dependencies():o.dependencies;for(let i of e)Fa(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{_a(a.imports,i=>{Fa(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&Pa(e,t)}if(!s){let e=ma(i)||(()=>new i);t({provide:i,useFactory:e,deps:Da},i),t({provide:Aa,useValue:i,multi:!0},i),t({provide:Oa,useValue:()=>la(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;Ia(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function Ia(e,t){for(let n of e)Fi(n)&&(n=n.ɵproviders),Array.isArray(n)?Ia(n,t):t(n)}var La=yi({provide:String,useValue:yi});function Ra(e){return typeof e==`object`&&!!e&&La in e}function za(e){return!!(e&&e.useExisting)}function Ba(e){return!!(e&&e.useFactory)}function Va(e){return typeof e==`function`}function Ha(e){return!!e.useClass}var Ua=new Pi(``),Wa={},Ga={},Ka=void 0;function qa(){return Ka===void 0&&(Ka=new ja),Ka}var Ja=class{},Ya=class extends Ja{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,ao(e,e=>this.processProvider(e)),this.records.set(ka,to(void 0,this)),r.has(`environment`)&&this.records.set(Ja,to(void 0,this));let i=this.records.get(Ua);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Aa,Da,{self:!0}))}retrieve(e,t){let n=ua(t)||0;try{return this.get(e,aa,n)}catch(e){if(Gn(e))return e;throw e}}destroy(){eo(this),this._destroyed=!0;let e=tn(null);try{for(let e of this._ngOnDestroyHooks)e.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let t of e)t()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),tn(e)}}onDestroy(e){return eo(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){eo(this);let t=Un(this),n=na(void 0);try{return e()}finally{Un(t),na(n)}}get(e,t=aa,n){if(eo(this),Object.hasOwn(e,Vi))return e[Vi](this);let r=ua(n),i=Un(this),a=na(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=io(e)&&Oi(e);t=n&&this.injectableDefInScope(n)?to(Xa(e),Wa):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?qa():this.parent;return t=r&8&&t===aa?null:t,n.get(e,t)}catch(e){let t=$i(e);throw t===-200||t===-201?new gi(t,null):e}finally{na(a),Un(i)}}resolveInjectorInitializers(){let e=tn(null),t=Un(this),n=na(void 0);try{let e=this.get(Oa,Da,{self:!0});for(let t of e)t()}finally{Un(t),na(n),tn(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=Ti(e);let t=Va(e)?e:Ti(e&&e.provide),n=Qa(e);if(!Va(e)&&e.multi===!0){let n=this.records.get(t);n||(n=to(void 0,Wa,!0),n.factory=()=>fa(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=tn(null);try{if(t.value===Ga)throw Xi(``);return t.value===Wa&&(t.value=Ga,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&ro(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{tn(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=Ti(e.providedIn);return typeof t==`string`?t===`any`||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function Xa(e){let t=Oi(e),n=t===null?ma(e):t.factory;if(n!==null)return n;if(e instanceof Pi)throw new gi(-204,!1);if(e instanceof Function)return Za(e);throw new gi(-204,!1)}function Za(e){if(e.length>0)throw new gi(-204,!1);let t=Ai(e);return t===null?()=>new e:()=>t.factory(e)}function Qa(e){return Ra(e)?to(void 0,e.useValue):to($a(e),Wa)}function $a(e,t,n){let r;if(Va(e)){let t=Ti(e);return ma(t)||Xa(t)}if(Ra(e))r=()=>Ti(e.useValue);else if(Ba(e))r=()=>e.useFactory(...fa(e.deps||[]));else if(za(e))r=(t,n)=>la(Ti(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=Ti(e&&(e.useClass||e.provide));if(no(e))r=()=>new t(...fa(e.deps));else return ma(t)||Xa(t)}return r}function eo(e){if(e.destroyed)throw new gi(-205,!1)}function to(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function no(e){return!!e.deps}function ro(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function io(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function ao(e,t){for(let n of e)Array.isArray(n)?ao(n,t):n&&Fi(n)?ao(n.ɵproviders,t):t(n)}function oo(e,t){let n;e instanceof Ya?(eo(e),n=e):n=new sa(e);let r=Un(n),i=na(void 0);try{return t()}finally{Un(r),na(i)}}function so(){return ta()!==void 0||Hn()!=null}var co=1;function lo(e){return Array.isArray(e)&&typeof e[co]==`object`}function uo(e){return Array.isArray(e)&&e[co]===!0}function fo(e){return!!(e.flags&4)}function po(e){return e.componentOffset>-1}function mo(e){return(e.flags&1)==1}function ho(e){return!!e.template}function go(e){return!!(e[2]&512)}function _o(e){return(e[2]&256)==256}var vo=(function(e){return e[e.NONE=0]=`NONE`,e[e.HTML=1]=`HTML`,e[e.STYLE=2]=`STYLE`,e[e.SCRIPT=3]=`SCRIPT`,e[e.URL=4]=`URL`,e[e.RESOURCE_URL=5]=`RESOURCE_URL`,e[e.ATTRIBUTE_NO_BINDING=6]=`ATTRIBUTE_NO_BINDING`,e})(vo||{}),yo=`math`;function bo(e){for(;Array.isArray(e);)e=e[0];return e}function xo(e,t){return bo(t[e])}function So(e,t){return bo(t[e.index])}function Co(e,t){return e.data[t]}function wo(e,t){return e[t]}function To(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function Eo(e,t){let n=t[e];return lo(n)?n:n[0]}function Do(e){return(e[2]&128)==128}function Fee(e){return uo(e[3])}function Oo(e,t){return t==null?null:e[t]}function ko(e){e[17]=0}function Ao(e){e[2]&1024||(e[2]|=1024,Do(e)&&No(e))}function Iee(e,t){for(;e>0;)t=t[14],e--;return t}function jo(e){return!!(e[2]&9216||e[24]?.dirty)}function Mo(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),jo(e)&&No(e)}function No(e){e[10].changeDetectionScheduler?.notify(0);let t=Fo(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!Do(t)));)t=Fo(t)}function Po(e,t){if(_o(e))throw new gi(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function Lee(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function Fo(e){let t=e[3];return uo(t)?t[3]:t}function Io(e){return e[7]??=[]}function Lo(e){return e.cleanup??=[]}function Ree(e,t,n,r){let i=Io(t);i.push(n),e.firstCreatePass&&Lo(e).push(r,i.length-1)}var Ro={lFrame:us(null),bindingsEnabled:!0,skipHydrationRootTNode:null},zo=!1;function zee(){return Ro.lFrame.elementDepthCount}function Bee(){Ro.lFrame.elementDepthCount++}function Bo(){Ro.lFrame.elementDepthCount--}function Vo(){return Ro.bindingsEnabled}function Ho(){return Ro.skipHydrationRootTNode!==null}function Uo(e){return Ro.skipHydrationRootTNode===e}function Wo(){Ro.skipHydrationRootTNode=null}function Go(){return Ro.lFrame.lView}function Ko(){return Ro.lFrame.tView}function w(e){return Ro.lFrame.contextLView=e,e[8]}function T(e){return Ro.lFrame.contextLView=null,e}function qo(){let e=Jo();for(;e!==null&&e.type===64;)e=e.parent;return e}function Jo(){return Ro.lFrame.currentTNode}function Vee(){let e=Ro.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Yo(e,t){let n=Ro.lFrame;n.currentTNode=e,n.isParent=t}function Xo(){return Ro.lFrame.isParent}function Zo(){Ro.lFrame.isParent=!1}function Qo(){return Ro.lFrame.contextLView}function $o(){return zo}function es(e){let t=zo;return zo=e,t}function ts(){let e=Ro.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function ns(){return Ro.lFrame.bindingIndex}function Hee(e){return Ro.lFrame.bindingIndex=e}function rs(){return Ro.lFrame.bindingIndex++}function is(e){let t=Ro.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function Uee(){return Ro.lFrame.inI18n}function Wee(e,t){let n=Ro.lFrame;n.bindingIndex=n.bindingRootIndex=e,as(t)}function Gee(){return Ro.lFrame.currentDirectiveIndex}function as(e){Ro.lFrame.currentDirectiveIndex=e}function Kee(e){let t=Ro.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function qee(){return Ro.lFrame.currentQueryIndex}function os(e){Ro.lFrame.currentQueryIndex=e}function Jee(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function ss(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=Jee(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=Ro.lFrame=ls();return r.currentTNode=t,r.lView=e,!0}function cs(e){let t=ls(),n=e[1];Ro.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function ls(){let e=Ro.lFrame,t=e===null?null:e.child;return t===null?us(e):t}function us(e){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function ds(){let e=Ro.lFrame;return Ro.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var fs=ds;function ps(){let e=ds();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function ms(e){return(Ro.lFrame.contextLView=Iee(e,Ro.lFrame.contextLView))[8]}function hs(){return Ro.lFrame.selectedIndex}function gs(e){Ro.lFrame.selectedIndex=e}function _s(){let e=Ro.lFrame;return Co(e.tView,e.selectedIndex)}function E(){Ro.lFrame.currentNamespace=`svg`}function vs(){ys()}function ys(){Ro.lFrame.currentNamespace=null}function bs(){return Ro.lFrame.currentNamespace}var xs=!0;function Ss(){return xs}function Cs(e){xs=e}function ws(e,t=null,n=null,r){let i=Ts(e,t,n,r);return i.resolveInjectorInitializers(),i}function Ts(e,t=null,n=null,r,i=new Set){return new Ya([n||Da,Ma(e)],t||qa(),null,i)}var Es=class e{static THROW_IF_NOT_FOUND=aa;static NULL=new ja;static create(e,t){if(Array.isArray(e))return ws({name:``},t,e,``);{let t=e.name??``;return ws({name:t},e.parent,e.providers,t)}}static ɵprov=Di({token:e,providedIn:`any`,factory:()=>la(ka)});static __NG_ELEMENT_ID__=-1},Ds=new Pi(``),Os=class{static __NG_ELEMENT_ID__=As;static __NG_ENV_ID__=e=>e},ks=class extends Os{_lView;constructor(e){super(),this._lView=e}get destroyed(){return _o(this._lView)}onDestroy(e){let t=this._lView;return Po(t,e),()=>Lee(t,e)}};function As(){return new ks(Go())}var js=new Pi(``),Ms=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Yr(!1);debugTaskTracker=C(js,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Rr(e=>{e.next(!1),e.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let e=this.taskId++;return this.pendingTasks.add(e),this.debugTaskTracker?.add(e),e}has(e){return this.pendingTasks.has(e)}remove(e){this.pendingTasks.delete(e),this.debugTaskTracker?.remove(e),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static ɵprov=Di({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Ns=class extends qr{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,so()&&(this.destroyRef=C(Os,{optional:!0})??void 0,this.pendingTasks=C(Ms,{optional:!0})??void 0)}emit(e){let t=tn(null);try{super.next(e)}finally{tn(t)}}subscribe(e,t,n){let r=e,i=t||(()=>null),a=n;if(e&&typeof e==`object`){let t=e;r=t.next?.bind(t),i=t.error?.bind(t),a=t.complete?.bind(t)}this.__isAsync&&(i=this.wrapInTimeout(i),r&&=this.wrapInTimeout(r),a&&=this.wrapInTimeout(a));let o=super.subscribe({next:r,error:i,complete:a});return e instanceof dr&&e.add(o),o}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{try{e(t)}finally{n!==void 0&&this.pendingTasks?.remove(n)}})}}};function Ps(...e){}function Fs(e){let t,n;function r(){e=Ps;try{n!==void 0&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(n),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame==`function`&&(n=requestAnimationFrame(()=>{e(),r()})),()=>r()}function Is(e){return queueMicrotask(()=>e()),()=>{e=Ps}}var Ls=`isAngularZone`,Rs=`isAngularZone_ID`,zs=0,Bs=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Ns(!1);onMicrotaskEmpty=new Ns(!1);onStable=new Ns(!1);onError=new Ns(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new gi(908,!1);Zone.assertZonePatched();let a=this;a._nesting=0,a._outer=a._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(a._inner=a._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(a._inner=a._inner.fork(Zone.longStackTraceZoneSpec)),a.shouldCoalesceEventChangeDetection=!r&&n,a.shouldCoalesceRunChangeDetection=r,a.callbackScheduled=!1,a.scheduleInRootZone=i,Ws(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(Ls)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new gi(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new gi(909,!1)}run(e,t,n){return this._inner.run(e,t,n)}runTask(e,t,n,r){let i=this._inner,a=i.scheduleEventTask(`NgZoneEvent: `+r,e,Vs,Ps,Ps);try{return i.runTask(a,t,n)}finally{i.cancelTask(a)}}runGuarded(e,t,n){return this._inner.runGuarded(e,t,n)}runOutsideAngular(e){return this._outer.run(e)}},Vs={};function Hs(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function Us(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Fs(()=>{e.callbackScheduled=!1,Gs(e),e.isCheckStableRunning=!0,Hs(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Gs(e)}function Ws(e){let t=()=>{Us(e)},n=zs++;e._inner=e._inner.fork({name:`angular`,properties:{[Ls]:!0,[Rs]:n,[Rs+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(Ys(s))return n.invokeTask(i,a,o,s);try{return Ks(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),qs(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return Ks(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!Xs(s)&&t(),qs(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,Gs(e),Hs(e)):i.change==`macroTask`&&(e.hasPendingMacrotasks=i.macroTask))},onHandleError:(t,n,r,i)=>(t.handleError(r,i),e.runOutsideAngular(()=>e.onError.emit(i)),!1)})}function Gs(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function Ks(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function qs(e){e._nesting--,Hs(e)}var Js=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Ns;onMicrotaskEmpty=new Ns;onStable=new Ns;onError=new Ns;run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function Ys(e){return Zs(e,`__ignore_ng_zone__`)}function Xs(e){return Zs(e,`__scheduler_tick__`)}function Zs(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Qs=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},$s=new Pi(``,{factory:()=>{let e=C(Bs),t=C(Ja),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Qs),n.handleError(r))})}}}),ec={provide:Oa,useValue:()=>{C(Qs,{optional:!0})},multi:!0};function D(e,t){let[n,r,i]=Nn(e,t?.equal),a=n;return a[en],a.set=r,a.update=i,a.asReadonly=tc.bind(a),a}function tc(){let e=this[en];if(e.readonlyFn===void 0){let t=()=>this();t[en]=e,e.readonlyFn=t}return e.readonlyFn}var nc=new Pi(``,{factory:()=>rc}),rc=`ng`,ic=new Pi(``),ac=new Pi(``,{providedIn:`platform`,factory:()=>`unknown`}),oc=new Pi(``,{factory:()=>C(Ds).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),sc=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=cc}return e})();function cc(){return new sc(Go(),qo())}var lc=class{},uc=new Pi(``,{factory:()=>!0}),dc=new Pi(``),fc=(()=>{class e{static ɵprov=Di({token:e,providedIn:`root`,factory:()=>new pc})}return e})(),pc=class{dirtyEffectCount=0;queues=new Map;add(e){this.enqueue(e),this.schedule(e)}schedule(e){e.dirty&&this.dirtyEffectCount++}remove(e){let t=e.zone,n=this.queues.get(t);n.has(e)&&(n.delete(e),e.dirty&&this.dirtyEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let n=this.queues.get(t);n.has(e)||n.add(e)}flush(){for(;this.dirtyEffectCount>0;){let e=!1;for(let[t,n]of this.queues)e||=t===null?this.flushQueue(n):t.run(()=>this.flushQueue(n));e||(this.dirtyEffectCount=0)}}flushQueue(e){let t=!1;for(let n of e)n.dirty&&(this.dirtyEffectCount--,t=!0,n.run());return t}},mc=class{[en];constructor(e){this[en]=e}destroy(){this[en].destroy()}};function hc(e,t){let n=t?.injector??C(Es),r=t?.manualCleanup===!0?null:n.get(Os),i,a=n.get(sc,null,{optional:!0}),o=n.get(lc);return a===null?i=bc(e,n.get(fc),o):(i=yc(a.view,o,e),r instanceof ks&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new mc(i)}var gc={...zn,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=es(!1);try{Bn(this)}finally{es(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=tn(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],tn(e)}}},_c={...gc,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(_n(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},vc={...gc,consumerMarkedDirty(){this.view[2]|=8192,No(this.view),this.notifier.notify(13)},destroy(){if(_n(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[23]?.delete(this)}};function yc(e,t,n){let r=Object.create(vc);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=xc(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function bc(e,t,n){let r=Object.create(_c);return r.fn=xc(r,e),r.scheduler=t,r.notifier=n,r.zone=typeof Zone<`u`?Zone.current:null,r.scheduler.add(r),r.notifier.notify(12),r}function xc(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}function Sc(e){return typeof e==`function`&&e[en]!==void 0}function Cc(e){return Sc(e)&&typeof e.set==`function`}var wc=Symbol(`InputSignalNode#UNSET`),Tc={...Ln,transformFn:void 0,applyValueToInputSignal(e,t){Fn(e,t)}};function Ec(e){return{toString:e}.toString()}var Dc=(function(e){return e[e.TemplateCreateStart=0]=`TemplateCreateStart`,e[e.TemplateCreateEnd=1]=`TemplateCreateEnd`,e[e.TemplateUpdateStart=2]=`TemplateUpdateStart`,e[e.TemplateUpdateEnd=3]=`TemplateUpdateEnd`,e[e.LifecycleHookStart=4]=`LifecycleHookStart`,e[e.LifecycleHookEnd=5]=`LifecycleHookEnd`,e[e.OutputStart=6]=`OutputStart`,e[e.OutputEnd=7]=`OutputEnd`,e[e.BootstrapApplicationStart=8]=`BootstrapApplicationStart`,e[e.BootstrapApplicationEnd=9]=`BootstrapApplicationEnd`,e[e.BootstrapComponentStart=10]=`BootstrapComponentStart`,e[e.BootstrapComponentEnd=11]=`BootstrapComponentEnd`,e[e.ChangeDetectionStart=12]=`ChangeDetectionStart`,e[e.ChangeDetectionEnd=13]=`ChangeDetectionEnd`,e[e.ChangeDetectionSyncStart=14]=`ChangeDetectionSyncStart`,e[e.ChangeDetectionSyncEnd=15]=`ChangeDetectionSyncEnd`,e[e.AfterRenderHooksStart=16]=`AfterRenderHooksStart`,e[e.AfterRenderHooksEnd=17]=`AfterRenderHooksEnd`,e[e.ComponentStart=18]=`ComponentStart`,e[e.ComponentEnd=19]=`ComponentEnd`,e[e.DeferBlockStateStart=20]=`DeferBlockStateStart`,e[e.DeferBlockStateEnd=21]=`DeferBlockStateEnd`,e[e.DynamicComponentStart=22]=`DynamicComponentStart`,e[e.DynamicComponentEnd=23]=`DynamicComponentEnd`,e[e.HostBindingsUpdateStart=24]=`HostBindingsUpdateStart`,e[e.HostBindingsUpdateEnd=25]=`HostBindingsUpdateEnd`,e})(Dc||{}),Oc=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function kc(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var Ac=null,jc=(()=>{Ac=Nc;let e=()=>Nc;return e.ngInherit=!0,e})();function Mc(){return Ac}function Nc(e){return e.type.prototype.ngOnChanges&&(e.setInput=Fc),Pc}function Pc(){let e=Lc(this),t=e?.current;if(t){let n=e.previous;if(n===Ea)e.previous=t;else for(let e in t)n[e]=t[e];e.current=null,this.ngOnChanges(t)}}function Fc(e,t,n,r,i){let a=this.declaredInputs[r],o=Lc(e)||Rc(e,{previous:Ea,current:null}),s=o.current||={},c=o.previous,l=c[a];s[a]=new Oc(l&&l.currentValue,n,c===Ea),kc(e,t,i,n)}var Ic=`__ngSimpleChanges__`;function Lc(e){return Object.hasOwn(e,Ic)&&e[Ic]||null}function Rc(e,t){return e[Ic]=t}var zc=[],Bc=function(e,t=null,n){for(let r=0;r=r)break}else t[c]<0&&(e[17]+=65536),(s>14>16&&(e[2]&3)===t&&(e[2]+=16384,qc(o,a)):qc(o,a)}var Yc=-1,Xc=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,n,r){this.factory=e,this.name=r,this.canSeeViewProviders=t,this.injectImpl=n}};function Zc(e){return!!(e.flags&8)}function Qc(e){return!!(e.flags&16)}function $c(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function sl(e,t){let n=ol(e),r=t;for(;n>0;)r=r[14],n--;return r}var cl=!0;function ll(e){let t=cl;return cl=e,t}var ul=255,dl=5,fl=0,pl={};function ml(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,Bi)&&(r=n[Bi]),r??=n[Bi]=fl++;let i=r&ul,a=1<>dl)]|=a}function hl(e,t){let n=_l(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,gl(r.data,e),gl(t,null),gl(r.blueprint,null));let i=vl(e,t),a=e.injectorIndex;if(il(i)){let e=al(i),n=sl(i,t),r=n[1].data;for(let i=0;i<8;i++)t[a+i]=n[e+i]|r[e+i]}return t[a+8]=i,a}function gl(e,t){e.push(0,0,0,0,0,0,0,0,t)}function _l(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function vl(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,i=t;for(;i!==null;){if(r=Fl(i),r===null)return Yc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return Yc}function yl(e,t,n){ml(e,t,n)}function bl(e,t,n){if(n&8||e!==void 0)return e;Zi(t,`NodeInjector`)}function xl(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=na(void 0);try{return i?i.get(t,r,n&8):ra(t,r,n&8)}finally{na(a)}}return bl(r,t,n)}function Sl(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=Pl(e,t,n,r,pl);if(i!==pl)return i}let i=Cl(e,t,n,r,pl);if(i!==pl)return i}return xl(t,n,r,i)}function Cl(e,t,n,r,i){let a=Dl(n);if(typeof a==`function`){if(!ss(t,e,r))return r&1?bl(i,n,r):xl(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))Zi(n);else return e}finally{fs()}}else if(typeof a==`number`){let i=null,o=_l(e,t),s=Yc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?vl(e,t):t[o+8],s===Yc||!kl(r,!1)?o=-1:(i=t[1],o=al(s),t=sl(s,t)));o!==-1;){let e=t[1];if(Ol(a,o,e.data)){let e=wl(o,t,n,i,r,c);if(e!==pl)return e}s=t[o+8],s!==Yc&&kl(r,t[1].data[o+8]===c)&&Ol(a,o,t)?(i=e,o=al(s),t=sl(s,t)):o=-1}}return i}function wl(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=Tl(s,o,n,r==null?po(s)&&cl:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?pl:El(t,o,c,s,i)}function Tl(e,t,n,r,i){let a=e.providerIndexes,o=t.data,s=a&1048575,c=e.directiveStart,l=e.directiveEnd,u=a>>20,d=r?s:s+u,f=i?s+u:l;for(let e=d;e=c&&t.type===n)return e}if(i){let e=o[c];if(e&&ho(e)&&e.type===n)return c}return null}function El(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof Xc){let s=a;if(s.resolving)throw Xi(``);let c=ll(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?na(s.injectImpl):null;ss(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&Vc(n,o[n],t)}finally{l!==null&&na(l),ll(c),s.resolving=!1,fs()}}return a}function Dl(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,Bi)?e[Bi]:void 0;return typeof t==`number`?t>=0?t&ul:jl:t}function Ol(e,t,n){let r=1<>dl)]&r)}function kl(e,t){return!(e&2)&&!(e&1&&t)}var Al=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return Sl(this._tNode,this._lView,e,ua(n),t)}};function jl(){return new Al(qo(),Go())}function Ml(e){return Ec(()=>{let t=e.prototype.constructor,n=t[zi]||Nl(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let e=i[zi]||Nl(i);if(e&&e!==n)return e;i=Object.getPrototypeOf(i)}return e=>new e})}function Nl(e){return Ei(e)?()=>{let t=Nl(Ti(e));return t&&t()}:ma(e)}function Pl(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!go(o);){let e=Cl(a,o,n,r|2,pl);if(e!==pl)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,pl,r);if(t!==pl)return t}t=Fl(o),o=o[14]}a=t}return i}function Fl(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}function Il(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function Ll(){return Rl(qo(),Go())}function Rl(e,t){return new zl(So(e,t))}var zl=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=Ll}return e})();function Bl(e){return e instanceof zl?e.nativeElement:e}function Vl(){return this._results[Symbol.iterator]()}var Hl=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new qr}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let n=ga(e);(this._changesDetected=!ha(this._results,n,t))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=Vl};function Ul(e){return(e.flags&128)==128}var Wl=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Wl||{}),Gl=new Map,Kl=0;function ql(){return Kl++}function Jl(e){Gl.set(e[19],e)}function Yl(e){Gl.delete(e[19])}var Xl=`__ngContext__`;function Zl(e,t){lo(t)?(e[Xl]=t[19],Jl(t)):e[Xl]=t}function Ql(e){return eu(e[12])}function $l(e){return eu(e[4])}function eu(e){for(;e!==null&&!uo(e);)e=e[4];return e}var tu=void 0;function nu(e){tu=e}function ru(){if(tu!==void 0)return tu;if(typeof document<`u`)return document;throw new gi(210,!1)}var iu=!1,au=new Pi(``,{factory:()=>iu}),ou=new WeakMap;function su(e,t){if(typeof e!=`object`||!e)return;let n=ou.get(e);n||(n=new WeakSet,ou.set(e,n)),n.add(t)}function cu(e){return(e.flags&32)==32}var lu=()=>null;function uu(e,t,n=!1){return lu(e,t,n)}function du(e,t){let n=e.contentQueries;if(n!==null){let r=tn(null);try{for(let r=0;r|^->||--!>|)/g,Cu=`​$1​`;function wu(e){return e.replace(xu,e=>e.replace(Su,Cu))}function Tu(e,t){return e.createText(t)}function Eu(e,t,n){e.setValue(t,n)}function Yee(e,t){return e.createComment(wu(t))}function Du(e,t,n){return e.createElement(t,n)}function Ou(e,t,n,r,i){e.insertBefore(t,n,r,i)}function ku(e,t,n){e.appendChild(t,n)}function Au(e,t,n,r,i){r===null?ku(e,t,n):Ou(e,t,n,r,i)}function ju(e,t,n,r){e.removeChild(null,t,n,r)}function Xee(e,t,n){e.setAttribute(t,`style`,n)}function Zee(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function Mu(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&$c(e,t,r),i!==null&&Zee(e,t,i),a!==null&&Xee(e,t,a)}function Nu(e){let t=Qee();return t?t.sanitize(vo.URL,e)||``:_u(e,`URL`)?gu(e):bu(Ki(e))}function Qee(){let e=Go();return e&&e[10].sanitizer}function Pu(e){return e.ownerDocument.defaultView}function Fu(e){return e.ownerDocument}function $ee(e,t,n){let r=e.length;for(;;){let i=e.indexOf(t,n);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let n=t.length;if(i+n===r||e.charCodeAt(i+n)<=32)return i}n=i+1}}var Iu=`ng-template`;function ete(e,t,n,r){let i=0;if(r){for(;i-1){let e;for(;++ia?``:i[u+1].toLowerCase(),r&2&&l!==e){if(Ru(r))return!1;o=!0}}}}}return Ru(r)||o}function Ru(e){return!(e&1)}function rte(e,t,n,r){if(t===null)return-1;let i=0;if(r||!n){let n=!1;for(;i-1)for(n++;n0?`="`+t+`"`:``)+`]`}else r&8?i+=`.`+o:r&4&&(i+=` `+o)}else i!==``&&!Ru(o)&&(t+=Bu(a,i),i=``),r=o,a||=!Ru(r);n++}return i!==``&&(t+=Bu(a,i)),t}function lte(e){return e.map(cte).join(`,`)}function ute(e){let t=[],n=[],r=1,i=2;for(;r!1});function Wu(e){if(!e)return 0;let t=e.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(e)*t}function Gu(e,t){return e.getPropertyValue(t).split(`,`).map(e=>e.trim())}function pte(e){let t=Gu(e,`transition-property`),n=Gu(e,`transition-duration`),r=Gu(e,`transition-delay`),i={propertyName:``,duration:0,animationName:void 0};for(let e=0;ei.duration&&(i.propertyName=t[e],i.duration=a)}return i}function mte(e){let t=Gu(e,`animation-name`),n=Gu(e,`animation-delay`),r=Gu(e,`animation-duration`),i=Gu(e,`animation-iteration-count`),a={animationName:``,propertyName:void 0,duration:0};for(let e=0;ea.duration&&s!==`infinite`&&(a.animationName=t[e],a.duration=o)}return a}function Ku(e,t){return e!==void 0&&e.duration>t.duration}function qu(e){return(e.animationName!=null||e.propertyName!=null)&&e.duration>0}function Ju(e){let t=e.effect?.getTiming();if(t===void 0)return;let n=typeof t.duration==`number`?t.duration:0,r=(t.delay??0)+n,i=e.playbackRate;return i!==void 0&&i!==0&&i!==1&&(r/=Math.abs(i)),r}function hte(e,t){let n=getComputedStyle(e),r=mte(n),i=pte(n),a=r.duration>i.duration?r:i;Ku(t.get(e),a)||qu(a)&&t.set(e,a)}function gte(e,t,n){if(!n)return;let r=e.getAnimations();return r.length===0?hte(e,t):_te(e,t,r)}function _te(e,t,n){let r={animationName:void 0,propertyName:void 0,duration:0};for(let e of n){if(e.effect?.getTiming()?.iterations===1/0)continue;let t=Ju(e)??0,n,i;e.animationName?i=e.animationName:n=e.transitionProperty,t>=r.duration&&(r={animationName:i,propertyName:n,duration:t})}Ku(t.get(e),r)||qu(r)&&t.set(e,r)}var Yu=new Set,vte=!1,yte=1,Xu=typeof document<`u`&&typeof document?.documentElement?.getAnimations==`function`;function bte(e){return e[9].get(fte,vte)}function xte(e,t,n){let r=Qu.get(e);if(r){for(let e of t)r.classList.push(e);for(let e of n)r.cleanupFns.push(e)}else Qu.set(e,{classList:t,cleanupFns:n})}function Zu(e){let t=Qu.get(e);if(t){for(let e of t.cleanupFns)e();Qu.delete(e)}$u.delete(e)}var Qu=new WeakMap,$u=new WeakMap,ed=new WeakMap;function td(e){return e?e[14]??e:null}var nd=new WeakSet;function Ste(e,t,n){let r=ed.get(e);if(!r||r.length===0)return;let i=t.parentNode,a=t.previousSibling,o=td(n);for(let e=r.length-1;e>=0;e--){let{el:n,declarationView:s}=r[e],c=n.parentNode;n===t?(r.splice(e,1),nd.add(n),n.dispatchEvent(new CustomEvent(`animationend`,{detail:{cancel:!0}}))):(a&&n===a||c&&i&&c!==i&&(o===null||s===null||o===s))&&(r.splice(e,1),n.dispatchEvent(new CustomEvent(`animationend`,{detail:{cancel:!0}})),n.parentNode?.removeChild(n))}}function Cte(e,t,n){let r=td(n),i=ed.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):ed.set(e,[{el:t,declarationView:r}])}function rd(e){let t=e[26]??={};return t.enter??=new Map}function wte(e){let t=typeof e==`function`?e():e,n=Array.isArray(t)?t:null;return typeof t==`string`&&(n=t.trim().split(/\s+/).filter(e=>e)),n}function id(e){return e.composedPath?e.composedPath()[0]:e.target}function ad(e,t){let n=$u.get(t);if(n===void 0)return!0;if(t!==id(e))return!1;let r=e.animation;if(r){let e=Ju(r);if(e!==void 0&&e+yte{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=Di({token:e,providedIn:`root`,factory:()=>new e})}return e})(),dd=[0,1,2,3],fd=(()=>{class e{ngZone=C(Bs);scheduler=C(lc);errorHandler=C(Qs,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){C(sd,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Bc(Dc.AfterRenderHooksStart),this.executing=!0;for(let e of dd)for(let t of this.sequences)if(!t.erroredOrDestroyed&&t.hooks[e])try{t.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let n=t.hooks[e];return n(t.pipelinedValue)},t.snapshot))}catch(e){t.erroredOrDestroyed=!0,this.errorHandler?.handleError(e)}this.executing=!1;for(let e of this.sequences)e.afterRun(),e.once&&(this.sequences.delete(e),e.destroy());for(let e of this.deferredRegistrations)this.sequences.add(e);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),e&&Bc(Dc.AfterRenderHooksEnd)}register(e){let{view:t}=e;t===void 0?this.executing?this.deferredRegistrations.add(e):this.addSequence(e):((t[25]??=[]).push(e),No(t),t[2]|=8192)}addSequence(e){this.sequences.add(e),this.scheduler.notify(7)}unregister(e){this.executing&&this.sequences.has(e)?(e.erroredOrDestroyed=!0,e.pipelinedValue=void 0,e.once=!0):(this.sequences.delete(e),this.deferredRegistrations.delete(e))}maybeTrace(e,t){return t?t.run(od.AFTER_NEXT_RENDER,e):e()}static ɵprov=Di({token:e,providedIn:`root`,factory:()=>new e})}return e})(),pd=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,n,r,i,a=null){this.impl=e,this.hooks=t,this.view=n,this.once=r,this.snapshot=a,this.unregisterOnDestroy=i?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[25];e&&(this.view[25]=e.filter(e=>e!==this))}};function md(e,t){let n=t?.injector??C(Es);return ld(`NgAfterNextRender`),Dte(e,n,t,!0)}function Ete(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function Dte(e,t,n,r){let i=t.get(ud);i.impl??=t.get(fd);let a=t.get(sd,null,{optional:!0}),o=n?.manualCleanup===!0?null:t.get(Os),s=t.get(sc,null,{optional:!0}),c=new pd(i.impl,Ete(e),s?.view,r,o,a?.snapshot(null));return i.impl.register(c),c}var hd=new Pi(``,{factory:()=>{let e=C(Ja),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function gd(e,t,n){let r=e.get(hd);if(Array.isArray(t))for(let e of t)r.queue.add(e),n?.detachedLeaveAnimationFns?.push(e);else r.queue.add(t),n?.detachedLeaveAnimationFns?.push(t);r.scheduler&&r.scheduler(e)}function Ote(e,t){let n=e.get(hd);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function kte(e,t){let n=e.get(hd);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function Ate(e){let t=e.get(hd);t.isScheduled||=(md(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:t.injector}),!0)}function jte(e){let t=e.get(hd);t.scheduler=Ate,t.scheduler(e)}function _d(e,t){for(let[n,r]of t)gd(e,r.animateFns)}function vd(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&_d(r,i)}function yd(e,t,n,r){try{n.get(ka)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&Ote(n,i.enter.get(t.index).animateFns);let a=Mte(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];bd(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&Yu.add(e[19]),gd(n,()=>Nte(e,t,i||void 0,a,r),i||void 0)}function Mte(e,t,n){let r=new Map,i=n?.leave;if(i&&i.has(t.index)&&r.set(t.index,i.get(t.index)),e&&i)for(let[n,a]of i){if(r.has(n))continue;let i=e[1].data[n].parent;for(;i;){if(i===t){r.set(n,a);break}i=i.parent}}return r}function Nte(e,t,n,r,i){let a=[];if(n&&n.leave)for(let[e]of r){if(!n.leave.has(e))continue;let t=n.leave.get(e);for(let e of t.animateFns){let{promise:t}=e();a.push(t)}n.detachedLeaveAnimationFns=void 0}if(e&&bd(e,t,a),a.length>0){let t=n||e?.[26];if(t){let n=t.running;n&&a.push(n),t.running=Promise.allSettled(a),Fte(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&Yu.delete(e[19]),i(!0)})}else e&&Yu.delete(e[19]),i(!1)}function bd(e,t,n){if(t.type&12){let r=e[t.index];if(uo(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,Yu.delete(e[19])),n(!0)})}function xd(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;uo(i)?c=i:lo(i)&&(l=!0,i=i[0]);let u=bo(i);e===0&&r!==null?(vd(s,r,a,n),o==null?ku(t,r,u):Ou(t,r,u,o||null,!0)):e===1&&r!==null?(vd(s,r,a,n),Ou(t,r,u,o||null,!0),Ste(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&Cte(a,u,s),nd.delete(u),yd(s,a,n,e=>{if(nd.has(u)){nd.delete(u);return}ju(t,u,l,e)})):e===3&&(nd.delete(u),yd(s,a,n,()=>{t.destroyNode(u)})),c!=null&&Wd(t,e,n,c,a,r,o)}}function Ite(e,t){Cd(e,t),t[0]=null,t[5]=null}function Sd(e,t,n,r,i,a){r[0]=i,r[5]=t,Bd(e,r,n,1,i,a)}function Cd(e,t){t[10].changeDetectionScheduler?.notify(9),Bd(e,t,t[11],2,null,null)}function wd(e){let t=e[12];if(!t)return Dd(e[1],e);for(;t;){let n=null;if(lo(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)lo(t)&&Dd(t[1],t),t=t[3];t===null&&(t=e),lo(t)&&Dd(t[1],t),n=t&&t[4]}t=n}}function Td(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function Ed(e,t){if(_o(t))return;let n=t[11];n.destroyNode&&Bd(e,t,n,3,null,null),wd(t)}function Dd(e,t){if(_o(t))return;let n=tn(null);try{t[2]&=-129,t[2]|=256,t[24]&&_n(t[24]),kd(e,t),Od(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&uo(t[3])){n!==t[3]&&Td(n,t);let r=t[18];r!==null&&r.detachView(e)}Yl(t)}finally{tn(n)}}function Od(e,t){let n=e.cleanup,r=t[7];if(n!==null)for(let e=0;e=0?r[t]():r[-t].unsubscribe(),e+=2}else{let t=r[n[e+1]];n[e].call(t)}r!==null&&(t[7]=null);let i=t[21];if(i!==null){t[21]=null;for(let e=0;e27&&ef(e,t,27,!1),Bc(o?Dc.TemplateUpdateStart:Dc.TemplateCreateStart,i,n),n(r,i)}finally{gs(a),Bc(o?Dc.TemplateUpdateEnd:Dc.TemplateCreateEnd,i,n)}}function af(e,t,n){ff(e,t,n),(n.flags&64)==64&&pf(e,t,n)}function of(e,t,n=So){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a=s&&i<=c){let o=t.data[i],s=r[e+1];nf(o,n[i],s,a),l=!0}else if(i>c)break}}return o!==null&&Object.hasOwn(r.inputs,i)&&(nf(r,n[o],i,a),l=!0),l}function wf(e,t){let n=Eo(t,e),r=n[1];Tf(r,n);let i=n[0];i!==null&&n[6]===null&&(n[6]=uu(i,n[9])),Bc(Dc.ComponentStart);try{Ef(r,n,n[8])}finally{Bc(Dc.ComponentEnd,n[8])}}function Tf(e,t){for(let n=t.length;n{No(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function Rf(e){let t=e[24]??Object.create(zf);return t.lView=e,t}var zf={...rn,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=Fo(e.lView);for(;t&&!Bf(t[1]);)t=Fo(t);t&&Ao(t)},consumerOnSignalRead(){this.lView[24]=this}};function Bf(e){return e.type!==2}function Vf(e){if(e[23]===null)return;let t=!0;for(;t;){let n=!1;for(let t of e[23])if(t.dirty&&(n=!0,t.zone===null||Zone.current===t.zone?t.run():t.zone.run(()=>t.run()),e[23]===null))return;t=n&&!!(e[2]&8192)}}var Hf=100;function Uf(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{Wf(e,t)}finally{n.end?.()}}function Wf(e,t){let n=$o();try{es(!0),Xf(e,t);let n=0;for(;jo(e);){if(n===Hf)throw new gi(103,!1);n++,Xf(e,1)}}finally{es(n)}}function Gf(e,t,n,r){if(_o(t))return;let i=t[2];cs(t);let a=!0,o=null,s=null;Bf(e)?(s=Pf(t),o=fn(s)):nn()===null?(a=!1,s=Rf(t),o=fn(s)):t[24]&&=(_n(t[24]),null);try{ko(t),Hee(e.bindingStartIndex),n!==null&&rf(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&Uc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&Wc(t,n,0,null),Gc(t,0)}if(qf(t),Vf(t),Kf(t,0),e.contentQueries!==null&&du(e,t),a){let n=e.contentCheckHooks;n!==null&&Uc(t,n)}else{let n=e.contentHooks;n!==null&&Wc(t,n,1),Gc(t,1)}Qf(e,t);let o=e.components;o!==null&&Zf(t,o,0);let s=e.viewQuery;if(s!==null&&fu(2,s,r),a){let n=e.viewCheckHooks;n!==null&&Uc(t,n)}else{let n=e.viewHooks;n!==null&&Wc(t,n,2),Gc(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}Mf(t),t[2]&=-73}catch(e){throw No(t),e}finally{s!==null&&(mn(s,o),a&&If(s)),ps()}}function Kf(e,t){for(let n=Ql(e);n!==null;n=$l(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=ya(e,10+t);Ite(r[1],r);let o=a[18];o!==null&&o.detachView(a[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}function ap(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(ip(e,n),ya(t,n))}this._attachedToViewContainer=!1}Ed(this._lView[1],this._lView)}onDestroy(e){Po(this._lView,e)}markForCheck(){$f(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){Mo(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,Uf(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new gi(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=go(this._lView),t=this._lView[16];t!==null&&!e&&Td(t,this._lView),Cd(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new gi(902,!1);this._appRef=e;let t=go(this._lView),n=this._lView[16];n!==null&&!t&&op(n,this._lView),Mo(this._lView)}},cp=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=lp;constructor(e,t,n){this._declarationLView=e,this._declarationTContainer=t,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,n){return new sp(Of(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n}))}}return e})();function lp(){return up(qo(),Go())}function up(e,t){return e.type&4?new cp(t,e,Rl(e,t)):null}function dp(e,t,n,r,i){let a=e.data[t];if(a===null)a=fp(e,t,n,r,i),Uee()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Vee();a.injectorIndex=e===null?-1:e.injectorIndex}return Yo(a,!0),a}function fp(e,t,n,r,i){let a=Jo(),o=Xo(),s=o?a:a&&a.parent,c=e.data[t]=mp(e,s,n,t,r,i);return pp(e,c,a,o),c}function pp(e,t,n,r){e.firstChild===null&&(e.firstChild=t),n!==null&&(r?n.child==null&&t.parent!==null&&(n.child=t):n.next===null&&(n.next=t,t.prev=n))}function mp(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return Ho()&&(s|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:o,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,controlDirectiveIndex:-1,customControlIndex:-1,propertyBindings:null,flags:s,providerIndexes:0,value:i,namespace:bs(),attrs:a,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function hp(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?gp(e,n):r.push(e);e[6]=r}function gp(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,vp=()=>null;function yp(e,t){return _p(e,t)}function bp(e,t,n){return vp(e,t,n)}var xp=class{},Sp=class{},Cp=class{destroyNode=null;static __NG_ELEMENT_ID__=()=>wp()};function wp(){let e=Go(),t=Eo(qo().index,e);return(lo(t)?t:e)[11]}var Tp=(()=>{class e{static ɵprov=Di({token:e,providedIn:`root`,factory:()=>null})}return e})();function Ep(e){return e.debugInfo?.className||e.type.name||null}var Dp={},Op=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,Dp,n);return r!==Dp||t===Dp?r:this.parentInjector.get(e,t,n)}};function kp(e,t,n){return e[t]=n}function Ap(e,t){return e[t]}function jp(e,t,n){if(n===Vu)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function Mp(e,t,n,r){let i=jp(e,t,n);return jp(e,t+1,r)||i}function Np(e,t,n,r,i){let a=Mp(e,t,n,r);return jp(e,t+2,i)||a}function Pp(e,t,n,r,i,a){let o=Mp(e,t,n,r);return Mp(e,t+2,i,a)||o}function Fp(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&su(i,a),$f(po(e)?Eo(e.index,t):t,5);let o=t[8],s=Ip(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=Ip(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function Ip(e,t,n,r){let i=tn(null);try{return Bc(Dc.OutputStart,t,n),n(r)!==!1}catch(t){return xf(e,t),!1}finally{Bc(Dc.OutputEnd,t,n),tn(i)}}function Lp(e,t,n,r,i,a,o,s){let c=mo(e),l=!1,u=null;if(!r&&c&&(u=zp(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=So(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);Rp(a)||Bp(r?t=>r(bo(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function Rp(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function zp(e,t,n,r){let i=e.cleanup;if(i!=null)for(let e=0;er?n[r]:null}typeof a==`string`&&(e+=2)}return null}function Bp(e,t,n,r,i,a,o){let s=t.firstCreatePass?Lo(t):null,c=Io(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function Vp(e,t,n,r,i){let a=null,o=null,s=null,c=!1,l=e.directiveToIndex.get(n.type);if(typeof l==`number`?a=l:[a,o,s]=l,o!==null&&s!==null&&e.hostDirectiveOutputs&&Object.hasOwn(e.hostDirectiveOutputs,r)){let n=e.hostDirectiveOutputs[r];for(let a=0;a=o&&l<=s)c=!0,Hp(e,t,l,n[a+1],r,i);else if(l>s)break}}return Object.hasOwn(n.outputs,r)&&(c=!0,Hp(e,t,a,r,r,i)),c}function Hp(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);Bp(e.index,s,t,i,a,c,!0)}function Up(){Wp()}function Wp(){let e=Go(),t=Ko(),n=qo();if(t.firstCreatePass&&Xp(t,n),n.controlDirectiveIndex===-1)return;ld(`NgSignalForms`);let r=e[n.controlDirectiveIndex];t.data[n.controlDirectiveIndex].controlDef.create(r,new qp(e,t,n))}function Gp(){Kp()}function Kp(){let e=Go(),t=Ko(),n=_s();if(n.controlDirectiveIndex===-1)return;let r=t.data[n.controlDirectiveIndex].controlDef,i=e[n.controlDirectiveIndex];r.update(i,new qp(e,t,n))}var qp=class{lView;tView;tNode;hasPassThrough;constructor(e,t,n){this.lView=e,this.tView=t,this.tNode=n,this.hasPassThrough=!!(n.flags&4096)}get customControl(){return this.tNode.customControlIndex===-1?void 0:this.lView[this.tNode.customControlIndex]}get nativeElement(){return So(this.tNode,this.lView)}get descriptor(){return`<${this.tNode.value}>`}listenToCustomControlOutput(e,t){let n=this.tView.data[this.tNode.customControlIndex];Vp(this.tNode,this.lView,n,e,Fp(this.tNode,this.lView,t))}listenToCustomControlModel(e){let t=this.tNode.flags&1024?`valueChange`:`checkedChange`,n=this.tView.data[this.tNode.customControlIndex];Vp(this.tNode,this.lView,n,t,Fp(this.tNode,this.lView,e))}listenToDom(e,t){Lp(this.tNode,this.tView,this.lView,void 0,this.lView[11],e,t,Fp(this.tNode,this.lView,t))}setInputOnDirectives(e,t,n){let r=this.tNode.inputs?.[e],i=this.tNode.hostDirectiveInputs?.[e];if(!r&&!i)return!1;let a=!1;if(r)for(let i of r){if(i===this.tNode.controlDirectiveIndex)continue;let r=this.lView[i],o=this.tView.data[i];(!n||n(Yp(r,o,e)))&&(nf(o,r,e,t),a=!0)}if(i)for(let r=0;r0;){let e=n.shift();if(typeof e!=`function`){for(let n in e.inputs)t[e.inputs[n]]=!0;let r=Jp(e.directive);r!==null&&n.push(...r);continue}for(let r of e()){if(typeof r==`function`)continue;if(r.inputs)for(let e=0;e1){t.flags|=4096;return}Zp(e,t)}function Zp(e,t){for(let n=t.directiveStart;n{let r=t.hostDirectiveInputs[e],i=t.hostDirectiveOutputs[e+`Change`];if(!r||!i)return!1;for(let e=0;e=i&&a<=o)return t.flags|=n,t.customControlIndex=r,!0}}return!1};if(e(`value`,1024)||e(`checked`,2048))return}}function Qp(e,t){return $p(e,t)&&em(e,t+`Change`)}function $p(e,t){return t in e.inputs}function em(e,t){return t in e.outputs}var tm=Symbol(`BINDING`),nm=new Pi(``);function rm(e,t,n){let r=n?e.styles:null,i=n?e.classes:null,a=0;if(t!==null)for(let e=0;e0&&(n.directiveToIndex=new Map);for(let c=0;c0;){let n=e[--t];if(typeof n==`number`&&n<0)return n}return 0}function _m(e,t,n){if(n){if(t.exportAs)for(let r=0;r{let[n,r,i]=e[t],a={propName:n,templateName:t,isSignal:(r&tf.SignalBased)!==0};return i&&(a.transform=i),a})}function Tm(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function Em(e,t,n){let r=t instanceof Ja?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new Op(n,r):n}function Dm(e){let t=e.get(Sp,null);if(t===null)throw new gi(407,!1);return{rendererFactory:t,sanitizer:e.get(Tp,null),changeDetectionScheduler:e.get(lc,null),ngReflect:!1,tracingService:e.get(sd,null,{optional:!0})}}function Om(e,t,n){let r=Am(e);return Du(t,r,r===`svg`?`svg`:r===`math`?yo:n)}function km(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new gi(905,!1)}function Am(e){return(e.selectors[0][0]||`div`).toLowerCase()}var jm=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=wm(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=Tm(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=lte(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){Bc(Dc.DynamicComponentStart);let s=tn(null);try{let s=this.componentDef,c=Em(s,r||this.ngModule,e),l=Dm(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(Ep(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{tn(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=Mm(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?sf(l,r,s.encapsulation,t):Om(s,l,o??null);km(u);let d=t.get(nm,null),f=Nm(u,()=>t.get(Ds,null)??ru());d&&d.addHost(f);let p=a?.some(Fm)||i?.some(e=>typeof e!=`function`&&e.bindings.some(Fm)),m=Yd(null,c,null,512|Zd(s),null,null,e,l,t,null,uu(u,t,!0));d&&Sm&&f instanceof ShadowRoot&&Po(m,()=>{d.removeHost(f)}),m[27]=u,cs(m);let h=null;try{let e=ym(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);Mu(l,u,e),Zl(u,m),af(c,m,e),pu(c,e,m),bm(c,e),n!==void 0&&Lm(e,this.ngContentSelectors,n),h=Eo(e.index,m),m[8]=h[8],Ef(c,m,null)}catch(e){throw h!==null&&Yl(h),Yl(m),e}finally{Bc(Dc.DynamicComponentEnd),ps()}return new Im(this.componentType,m,!!p)}};function Mm(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:ute(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[tm].requiredVars,e.create&&(e.targetIdx=0,(a??=[]).push(e)),e.update&&(e.targetIdx=0,(o??=[]).push(e));if(r)for(let e=0;e{if(n&1&&e)for(let t of e)t.create();if(n&2&&t)for(let e of t)e.update()}}function Fm(e){let t=e[tm].kind;return t===`input`||t===`twoWay`}var Im=class extends xp{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=Co(t[1],27),this.location=Rl(this._tNode,t),this.instance=Eo(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new sp(t,void 0),this.componentType=e}setInput(e,t){this._hasInputBindings;let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView;Sf(n,r[1],r,e,t),this.previousInputValues.set(e,t),$f(Eo(n.index,r),1)}get injector(){return new Al(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function Lm(e,t,n){let r=e.projection=[];for(let e=0;e{class e{static __NG_ELEMENT_ID__=zm}return e})();function zm(){return Um(qo(),Go())}var Bm=class e extends Rm{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Rl(this._hostTNode,this._hostLView)}get injector(){return new Al(this._hostTNode,this._hostLView)}get parentInjector(){let e=vl(this._hostTNode,this._hostLView);if(il(e)){let t=sl(e,this._hostLView),n=al(e),r=t[1].data[n+8];return new Al(r,t)}return new Al(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=Vm(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-10}createEmbeddedView(e,t,n){let r,i;typeof n==`number`?r=n:n!=null&&(r=n.index,i=n.injector);let a=yp(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,kf(this._hostTNode,a)),o}createComponent(e,t,n,r,i,a,o){let s,c=t||{};s=c.index,n=c.injector,r=c.projectableNodes,i=c.environmentInjector||c.ngModuleRef,a=c.directives,o=c.bindings;let l=new jm(Hi(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(Ja,null);e&&(i=e)}let d=Hi(l.componentType??{}),f=yp(this._lContainer,d?.id??null),p=f?.firstChild??null,m=l.create(u,r,p,i,a,o,this._getHostElementNamespace());return this.insertImpl(m.hostView,s,kf(this._hostTNode,f)),m}_getHostElementNamespace(){if(this._hostTNode.type&2){let e=this._hostTNode.parent??this._hostLView[5];return e!==null&&e.type&2&&typeof e.value==`string`&&e.value.toLowerCase()===`foreignobject`?null:e?.namespace??null}return this._hostTNode.namespace}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(t,n,r){let i=t._lView;if(Fee(i)){let n=this.indexOf(t);if(n!==-1)this.detach(n);else{let n=i[3],r=new e(n,n[5],n[3]);r.detach(r.indexOf(t))}}let a=this._adjustIndex(n),o=this._lContainer;return np(o,i,a,r),t.attachToViewContainerRef(),va(Hm(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=Vm(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=ip(this._lContainer,t);n&&(ya(Hm(this._lContainer),t),Ed(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=ip(this._lContainer,t);return n&&ya(Hm(this._lContainer),t)!=null?new sp(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function Vm(e){return e[8]}function Hm(e){return e[8]||=[]}function Um(e,t){let n,r=t[e.index];return uo(r)?n=r:(n=ep(r,t,null,e),t[e.index]=n,$d(t,n)),Gm(n,t,e,r),new Bm(n,e,t)}function Wm(e,t){let n=e[11],r=n.createComment(``),i=So(t,e);return Ou(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var Gm=Jm,Km=()=>!1;function qm(e,t,n){return Km(e,t,n)}function Jm(e,t,n,r){if(e[7])return;let i;i=n.type&8?bo(r):Wm(t,n),e[7]=i}var Ym=class e{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},Xm=class e{queries;constructor(e=[]){this.queries=e}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries===null?n.length:t.contentQueries[0],i=[];for(let e=0;e0)r.push(o[e/2]);else{let i=a[e+1],o=t[-n];for(let e=10;ee.trim())}function uh(e,t,n){e.queries===null&&(e.queries=new Qm),e.queries.track(new $m(t,n))}function dh(e,t){return e.queries.getByIndex(t)}function fh(e,t){let n=e[1],r=dh(n,t);return r.crossesNgTemplate?ah(n,e,t,[]):ih(n,e,r,t)}function ph(e,t,n){let r,i=Cn(()=>{r._dirtyCounter();let n=_h(r,e);if(t&&n===void 0)throw new gi(-951,!1);return n});return r=i[en],r._dirtyCounter=D(0),r._flatValue=void 0,i}function mh(e){return ph(!0,!1,e)}function hh(e){return ph(!0,!0,e)}function gh(e,t){let n=e[en];n._lView=Go(),n._queryIndex=t,n._queryList=oh(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(e=>e+1))}function _h(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[2]&4)return t?void 0:Da;let i=oh(n,r),a=fh(n,r);return i.reset(a,Bl),t?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}function vh(e){return!!e&&typeof e.then==`function`}function yh(e){return!!e&&typeof e.subscribe==`function`}var bh=class{},xh=class extends bh{injector;instance=null;constructor(e){super();let t=new Ya([...e.providers,{provide:bh,useValue:this}],e.parent||qa(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function Sh(e,t,n=null){return new xh({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var Ch=(()=>{class e{_injector;cachedInjectors=new Map;constructor(e){this._injector=e}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){let t=Na(!1,e.type),n=t.length>0?Sh([t],this._injector,``):null;this.cachedInjectors.set(e,n)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static ɵprov=Di({token:e,providedIn:`environment`,factory:()=>new e(la(Ja))})}return e})();function k(e){return Ec(()=>{let t=kh(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Wl.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(Ch).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||mu.Emulated,styles:e.styles||Da,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&ld(`NgStandalone`),Ah(n);let r=e.dependencies;return n.directiveDefs=jh(r,wh),n.pipeDefs=jh(r,Wi),n.id=Mh(n),n})}function wh(e){return Hi(e)||Ui(e)}function Th(e,t){if(e==null)return Ea;let n={};for(let r in e)if(Object.hasOwn(e,r)){let i=e[r],a,o,s,c;Array.isArray(i)?(s=i[0],a=i[1],o=i[2]??a,c=i[3]||null):(a=i,o=i,s=tf.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function Eh(e){if(e==null)return Ea;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function Dh(e){return Ec(()=>{let t=kh(e);return Ah(t),t})}function Oh(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function kh(e){let t={};return{type:e.type,providersResolver:null,viewProvidersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||Ea,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||Da,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:Th(e.inputs,t),outputs:Eh(e.outputs),debugInfo:null}}function Ah(e){e.features?.forEach(t=>t(e))}function jh(e,t){return e?()=>{let n=typeof e==`function`?e():e,r=[];for(let e of n){let n=t(e);n!==null&&r.push(n)}return r}:null}function Mh(e){let t=0,n=typeof e.consts==`function`?``:e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let e of r.join(`|`))t=Math.imul(31,t)+e.charCodeAt(0)<<0;return t+=2147483648,`c`+t}var Nh=new Pi(``),Ph=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=C(Nh,{optional:!0})??[];injector=C(Es);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=oo(this.injector,t);if(vh(n))e.push(n);else if(yh(n)){let t=new Promise((e,t)=>{n.subscribe({complete:e,error:t})});e.push(t)}}let t=()=>{this.done=!0,this.resolve()};Promise.all(e).then(()=>{t()}).catch(e=>{this.reject(e)}),e.length===0&&t(),this.initialized=!0}static ɵfac=function(t){return new(t||e)};static ɵprov=Il({token:e,factory:e.ɵfac})}return e})();function Fh(e){return t=>{t.controlDef={create:(e,t)=>{e?.ɵngControlCreate(t)},update:(e,t)=>{e?.ɵngControlUpdate?.(t)},passThroughInput:e}}}function Ih(e){return Object.getPrototypeOf(e.prototype).constructor}function Lh(e){let t=Ih(e.type),n=!0,r=[e];for(;t&&t!==Function.prototype&&t!==Object.prototype;){let i,a=Object.hasOwn(t,Ii)?t[Ii]:void 0,o=Object.hasOwn(t,Li)?t[Li]:void 0;if(ho(e))i=a??o;else{if(a)throw new gi(903,!1);i=o}if(i){if(n){r.push(i);let t=e;t.inputs=Bh(e.inputs),t.declaredInputs=Bh(e.declaredInputs),t.outputs=Bh(e.outputs);let n=i.hostBindings;n&&Uh(e,n);let a=i.viewQuery,o=i.contentQueries;if(a&&Vh(e,a),o&&Hh(e,o),Rh(e,i),bi(e.outputs,i.outputs),ho(i)&&i.data.animation){let t=e.data;t.animation=(t.animation||[]).concat(i.data.animation)}}let t=i.features;if(t)for(let r=0;r=0;r--){let i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=nl(i.hostAttrs,n=nl(n,i.hostAttrs))}}function Bh(e){return e===Ea?{}:e===Da?[]:e}function Vh(e,t){let n=e.viewQuery;e.viewQuery=n?(e,r)=>{t(e,r),n(e,r)}:t}function Hh(e,t){let n=e.contentQueries;e.contentQueries=n?(e,r,i)=>{t(e,r,i),n(e,r,i)}:t}function Uh(e,t){let n=e.hostBindings;e.hostBindings=n?(e,r)=>{t(e,r),n(e,r)}:t}function Wh(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=nl(e.mergedAttrs,e.attrs);let t=e.tView=Kd(2,e,i,a,o,n.directiveRegistry,n.pipeRegistry,null,n.schemas,n.consts,null);n.queries!==null&&(n.queries.template(n,e),t.queries=n.queries.embeddedTView(e))}s&&(e.flags|=s),Yo(e,!1);let c=Jh(n,t,e,r);Ss()&&Fd(n,t,c,e),Zl(c,t);let l=ep(c,t,c,e);t[r+27]=l,$d(t,l),qm(l,e,t)}function Gh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;return t.firstCreatePass?(f=dp(t,d,4,o||null,s||null),Vo()&&am(t,e,f,Oo(t.consts,l),hf),Hc(t,f)):f=t.data[d],Wh(f,e,t,n,r,i,a,c),mo(f)&&af(t,e,f),l!=null&&of(e,f,u),f}function Kh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=dp(t,d,4,o||null,s||null),l!=null){let e=Oo(t.consts,l);f.localNames=[];for(let t=0;t{throw new gi(600,``)})}var $h=10,eg=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=C($s);afterRenderManager=C(ud);zonelessEnabled=C(uc);rootEffectScheduler=C(fc);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new qr;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=C(Ms);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(mi(e=>!e))}constructor(){C(sd,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=C(Ja);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=Es.NULL){return this._injector.get(Bs).run(()=>{if(Bc(Dc.BootstrapComponentStart),!this._injector.get(Ph).done)throw new gi(405,``);let r=Hi(e),i=this._injector.get(bh),a=new jm(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=tg(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(Xh,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),ng(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),Bc(Dc.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Bc(Dc.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(od.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw Bc(Dc.ChangeDetectionEnd),new gi(101,!1);let e=tn(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,tn(e),this.afterTick.next(),Bc(Dc.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Sp,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++<$h;){Bc(Dc.ChangeDetectionSyncStart);try{this.synchronizeOnce()}finally{Bc(Dc.ChangeDetectionSyncEnd)}}}synchronizeOnce(){this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush());let e=!1;if(this.dirtyFlags&7){let t=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:n}of this.allViews)(t||jo(n))&&(Uf(n,t&&!this.zonelessEnabled?0:1),e=!0);if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}e||(this._rendererFactory?.begin?.(),this._rendererFactory?.end?.()),this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:e})=>jo(e))){this.dirtyFlags|=2;return}this.dirtyFlags&=-8}attachView(e){let t=e;this._views.push(t),t.attachToAppRef(this)}detachView(e){let t=e;ng(this._views,t),t.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView);try{this.tick()}catch(e){this.internalErrorHandler(e)}this.components.push(e),this._injector.get(Zh,[]).forEach(t=>t(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>ng(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new gi(406,!1);let e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}static ɵfac=function(t){return new(t||e)};static ɵprov=Il({token:e,factory:e.ɵfac})}return e})();function tg(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function ng(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function A(e,t,n,r){let i=Go();return jp(i,rs(),t)&&(Ko(),gf(_s(),i,e,t,n,r)),A}function rg(e){if(ld(`NgAnimateEnter`),!Xu)return rg;let t=Go();if(bte(t))return rg;let n=qo(),r=t[9].get(Bs);return Tte(rd(t),n,()=>ig(t,n,e,r)),jte(t[9]),_d(t[9],rd(t)),rg}function ig(e,t,n,r){let i=So(t,e),a=e[11],o=wte(n),s=[],c=!1,l=e=>{if(id(e)!==i)return;let t=e instanceof AnimationEvent?`animationend`:`transitionend`;r.runOutsideAngular(()=>{a.listen(i,t,u)})},u=e=>{id(e)===i&&(ad(e,i)&&(c=!0),ag(e,i,a))};if(o&&o.length>0){r.runOutsideAngular(()=>{s.push(a.listen(i,`animationstart`,l)),s.push(a.listen(i,`transitionstart`,l))}),xte(i,o,s);for(let e of o)a.addClass(i,e);r.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(!c&&(gte(i,$u,Xu),!$u.has(i))){for(let e of o)a.removeClass(i,e);Zu(i)}})})}}function ag(e,t,n){let r=Qu.get(t);if(id(e)===t&&r&&ad(e,t)){e.stopPropagation();for(let e of r.classList)n.removeClass(t,e);Zu(t)}}var og=class{destroy(e){}updateValue(e,t){}swap(e,t){let n=Math.min(e,t),r=Math.max(e,t),i=this.detach(r);if(r-n>1){let e=this.detach(n);this.attach(n,i),this.attach(r,e)}else this.attach(n,i)}move(e,t){this.attach(t,this.detach(e))}};function sg(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function cg(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){tn(r);let c=t.length-1;for(tn(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=sg(o,r,o,l,n);if(u!==0){u<0&&e.updateValue(o,l),o++;continue}let d=e.at(s),f=t[c],p=sg(s,d,c,f,n);if(p!==0){p<0&&e.updateValue(s,f),s--,c--;continue}let m=n(o,r),h=n(s,d),g=n(o,l);if(Object.is(g,h)){let t=n(c,f);Object.is(t,m)?(e.swap(o,s),e.updateValue(s,f),c--,s--):e.move(s,o),e.updateValue(o,l),o++;continue}if(i??=new fg,a??=dg(e,o,s,n),lg(e,i,o,g))e.updateValue(o,l),o++,s++;else if(a.has(g))i.set(m,e.detach(o)),s--;else{let n=e.create(o,t[o]);e.attach(o,n),o++,s++}}for(;o<=c;)ug(e,i,n,o,t[o]),o++}else if(t!=null){tn(r);let c=t[Symbol.iterator]();tn(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=sg(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new fg,a??=dg(e,o,s,n);let u=n(o,r);if(lg(e,i,o,u))e.updateValue(o,r),o++,s++,l=c.next();else if(!a.has(u))e.attach(o,e.create(o,r)),o++,s++,l=c.next();else{let r=n(o,t);i.set(r,e.detach(o)),s--}}}for(;!l.done;)ug(e,i,n,e.length,l.value),l=c.next()}for(;o<=s;)e.destroy(e.detach(s--));i?.forEach(t=>{e.destroy(t)})}function lg(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function ug(e,t,n,r,i){if(lg(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function dg(e,t,n,r){let i=new Set;for(let a=t;a<=n;a++)i.add(r(a,e.at(a)));return i}var fg=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function j(e,t,n,r,i,a,o,s){ld(`NgControlFlow`);let c=Go(),l=Ko();return Kh(c,l,e,t,n,r,i,Oo(l.consts,a),256,o,s),pg}function pg(e,t,n,r,i,a,o,s){ld(`NgControlFlow`);let c=Go(),l=Ko();return Kh(c,l,e,t,n,r,i,Oo(l.consts,a),512,o,s),pg}function M(e,t){ld(`NgControlFlow`);let n=Go(),r=rs(),i=n[r]===Vu?-1:n[r],a=i===-1?void 0:yg(n,27+i);if(jp(n,r,e)){let r=tn(null);try{if(a!==void 0&&rp(a,0),e!==-1){let r=27+e,i=yg(n,r),a=wg(n[1],r),o=bp(i,a,n);np(i,Of(n,a,t,{dehydratedView:o}),0,kf(a,o))}}finally{tn(r)}}else if(a!==void 0){let e=tp(a,0);e!==void 0&&(e[8]=t)}}var mg=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-10}};function hg(e){return e}function gg(e,t){return t}var _g=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function N(e,t,n,r,i,a,o,s,c,l,u,d,f){ld(`NgControlFlow`);let p=Go(),m=Ko(),h=c!==void 0,g=Go(),_=new _g(h,s?o.bind(g[15][8]):o);g[27+e]=_,Kh(p,m,e+1,t,n,r,i,Oo(m.consts,a),256),h&&Kh(p,m,e+2,c,l,u,d,Oo(m.consts,f),512)}var vg=class extends og{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n}get length(){return this.lContainer.length-10}at(e){return this.getLView(e)[8].$implicit}attach(e,t){let n=t[6];this.needsIndexUpdate||=e!==this.length,np(this.lContainer,t,e,kf(this.templateTNode,n)),bg(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,xg(this.lContainer,e),Sg(this.lContainer,e)}create(e,t){let n=yp(this.lContainer,this.templateTNode.tView.ssrId);return Of(this.hostLView,this.templateTNode,new mg(this.lContainer,t,e),{dehydratedView:n})}destroy(e){Ed(e[1],e)}updateValue(e,t){this.getLView(e)[8].$implicit=t}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e0){let e=n[9];kte(e,r),Yu.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function xg(e,t){if(e.length<=10)return;let n=e[10+t],r=n?n[26]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function Sg(e,t){return ip(e,t)}function Cg(e,t){return tp(e,t)}function wg(e,t){return Co(e,t)}function F(e,t,n){let r=Go();return jp(r,rs(),t)&&(Ko(),lf(_s(),r,e,t,r[11],n)),F}function Tg(e,t,n,r,i){Sf(t,e,n,i?`class`:`style`,r)}function I(e,t,n,r){let i=Go(),a=i[1],o=e+27,s=a.firstCreatePass?ym(o,i,2,t,hf,Vo(),n,r):a.data[o];if(po(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(Ep(o),()=>(Eg(e,t,i,s,r),I))}}return Eg(e,t,i,s,r),I}function Eg(e,t,n,r,i){if(yf(r,n,e,t,Og),mo(r)){let e=n[1];af(e,n,r),pu(e,r,n)}i!=null&&of(n,r)}function L(){let e=Ko(),t=bf(qo());return e.firstCreatePass&&bm(e,t),Uo(t)&&Wo(),Bo(),t.classesWithoutHost!=null&&Zc(t)&&Tg(e,t,Go(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&Qc(t)&&Tg(e,t,Go(),t.stylesWithoutHost,!1),L}function R(e,t,n,r){return I(e,t,n,r),L(),R}function z(e,t,n,r){let i=Go(),a=i[1],o=e+27,s=a.firstCreatePass?xm(o,a,2,t,n,r):a.data[o];return yf(s,i,e,t,Og),r!=null&&of(i,s),z}function B(){return Uo(bf(qo()))&&Wo(),Bo(),B}function Dg(e,t,n,r){return z(e,t,n,r),B(),Dg}var Og=(e,t,n,r,i)=>(Cs(!0),Du(t[11],r,bs()));function kg(e,t,n){let r=Go(),i=r[1],a=e+27,o=i.firstCreatePass?ym(a,r,8,`ng-container`,hf,Vo(),t,n):i.data[a];if(yf(o,r,e,`ng-container`,Mg),mo(o)){let e=r[1];af(e,r,o),pu(e,o,r)}return n!=null&&of(r,o),kg}function Ag(){let e=Ko(),t=bf(qo());return e.firstCreatePass&&bm(e,t),Ag}function jg(e,t,n){return kg(e,t,n),Ag(),jg}var Mg=(e,t,n,r,i)=>(Cs(!0),Yee(t[11],``));function V(){return Go()}function Ng(e,t,n){let r=Go();return jp(r,rs(),t)&&(Ko(),uf(_s(),r,e,t,r[11],n)),Ng}var Pg=void 0;function Fg(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var Ig=[`en`,[[`a`,`p`],[`AM`,`PM`]],[[`AM`,`PM`]],[[`S`,`M`,`T`,`W`,`T`,`F`,`S`],[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`]],Pg,[[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]],Pg,[[`B`,`A`],[`BC`,`AD`],[`Before Christ`,`Anno Domini`]],0,[6,0],[`M/d/yy`,`MMM d, y`,`MMMM d, y`,`EEEE, MMMM d, y`],[`h:mm a`,`h:mm:ss a`,`h:mm:ss a z`,`h:mm:ss a zzzz`],[`{1}, {0}`,Pg,Pg,Pg],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`×`,`‰`,`∞`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,Fg],Lg=Object.create(null);function Rg(e){let t=Vg(e),n=zg(t);if(n)return n;let r=t.split(`-`)[0];if(n=zg(r),n)return n;if(r===`en`)return Ig;throw new gi(701,!1)}function zg(e){if(!(e in Lg)){let t=ia.ng&&ia.ng.common&&ia.ng.common.locales&&ia.ng.common.locales[e];return t!==void 0&&(Lg[e]=t),t}return Lg[e]}var Bg={LocaleId:0,DayPeriodsFormat:1,DayPeriodsStandalone:2,DaysFormat:3,DaysStandalone:4,MonthsFormat:5,MonthsStandalone:6,Eras:7,FirstDayOfWeek:8,WeekendRange:9,DateFormat:10,TimeFormat:11,DateTimeFormat:12,NumberSymbols:13,NumberFormats:14,CurrencyCode:15,CurrencySymbol:16,CurrencyName:17,Currencies:18,Directionality:19,PluralCase:20,ExtraData:21};function Vg(e){return e.toLowerCase().replace(/_/g,`-`)}var Hg=`en-US`;function Ug(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function H(e,t,n){let r=Go(),i=Ko(),a=qo();return Wg(i,r,r[11],a,e,t,n),H}function U(e,t,n){let r=Go(),i=Ko(),a=qo();return(a.type&3||n)&&Lp(a,i,r,n,r[11],e,t,Fp(a,r,t)),U}function Wg(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=Fp(r,t,a),Lp(r,e,t,o,n,i,a,c)&&(s=!1)),s){let e=r.outputs?.[i],n=r.hostDirectiveOutputs?.[i];if(n&&n.length)for(let e=0;e>17&32767}function e_(e){return(e&2)==2}function t_(e,t){return e&131071|t<<17}function n_(e){return e|2}function r_(e){return(e&131068)>>2}function i_(e,t){return e&-131069|t<<2}function a_(e){return(e&1)==1}function o_(e){return e|1}function s_(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=$g(o),c=r_(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||wa(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=$g(e[s+1]);e[r+1]=Qg(t,s),t!==0&&(e[t+1]=i_(e[t+1],r)),e[s+1]=t_(e[s+1],r)}else e[r+1]=Qg(s,0),s!==0&&(e[s+1]=i_(e[s+1],r)),s=r}else e[r+1]=Qg(c,0),s===0?s=r:e[c+1]=i_(e[c+1],r),c=r;l&&(e[r+1]=n_(e[r+1])),l_(e,u,r,!0),l_(e,u,r,!1),c_(t,u,e,r,a),o=Qg(s,c),a?t.classBindings=o:t.styleBindings=o}function c_(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&wa(a,t)>=0&&(n[r+1]=o_(n[r+1]))}function l_(e,t,n,r){let i=e[n+1],a=t===null,o=r?$g(i):r_(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];u_(n,t)&&(s=!0,e[o+1]=r?o_(i):n_(i)),o=r?$g(i):r_(i)}s&&(e[n+1]=r?n_(i):o_(i))}function u_(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?wa(e,t)>=0:!1}var d_={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function f_(e){return e.substring(d_.key,d_.keyEnd)}function p_(e){return h_(e),m_(e,g_(e,0,d_.textEnd))}function m_(e,t){let n=d_.textEnd;return n===t?-1:(t=d_.keyEnd=__(e,d_.key=t,n),g_(e,t,n))}function h_(e){d_.key=0,d_.keyEnd=0,d_.value=0,d_.valueEnd=0,d_.textEnd=e.length}function g_(e,t,n){for(;t32;)t++;return t}function v_(e,t,n){return x_(e,t,n,!1),v_}function G(e,t){return x_(e,t,null,!0),G}function y_(e){S_(M_,b_,e,!0)}function b_(e,t){for(let n=p_(t);n>=0;n=m_(t,n))Sa(e,f_(t),!0)}function x_(e,t,n,r){let i=Go(),a=Ko(),o=is(2);if(a.firstUpdatePass&&w_(a,e,o,r),t!==Vu&&jp(i,o,t)){let s=a.data[hs()];P_(a,s,i,i[11],e,i[o+1]=L_(t,n),r,o)}}function S_(e,t,n,r){let i=Ko(),a=is(2);i.firstUpdatePass&&w_(i,null,a,r);let o=Go();if(n!==Vu&&jp(o,a,n)){let s=i.data[hs()];if(R_(s,r)&&!C_(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=Si(e,n||``)),Tg(i,s,o,n,r)}else N_(i,s,o,o[11],o[a+1],o[a+1]=j_(e,t,n),r,a)}}function C_(e,t){return t>=e.expandoStartIndex}function w_(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[hs()],o=C_(e,n);R_(a,r)&&t===null&&!o&&(t=!1),t=T_(i,a,t,r),s_(i,a,t,n,o,r)}}function T_(e,t,n,r){let i=Kee(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=k_(null,e,t,n,r),n=A_(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=k_(i,e,t,n,r),a===null){let n=E_(e,t,r);n!==void 0&&Array.isArray(n)&&(n=k_(null,e,t,n[1],r),n=A_(n,t.attrs,r),D_(e,t,r,n))}else a=O_(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function E_(e,t,n){let r=n?t.classBindings:t.styleBindings;if(r_(r)!==0)return e[$g(r)]}function D_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[$g(i)]=r}function O_(e,t,n){let r,i=t.directiveEnd;for(let a=1+t.directiveStylingLast;a0;){let t=e[i],a=Array.isArray(t),c=a?t[1]:t,l=c===null,u=n[i+1];u===Vu&&(u=l?Da:void 0);let d=l?Ca(u,r):c===r?u:void 0;if(a&&!I_(d)&&(d=Ca(t,r)),I_(d)&&(s=d,o))return s;let f=e[i+1];i=o?$g(f):r_(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=Ca(e,r))}return s}function I_(e){return e!==void 0}function L_(e,t){return e==null||e===``||(typeof t==`string`?e=gu(e)+t:typeof e==`object`&&(e=xi(gu(e)))),e}function R_(e,t){return!!(e.flags&(t?8:16))}function K(e,t=``){let n=Go(),r=Ko(),i=e+27,a=r.firstCreatePass?dp(r,i,1,t,null):r.data[i],o=z_(r,n,a,t);n[i]=o,Ss()&&Fd(r,n,o,a),Yo(a,!1)}var z_=(e,t,n,r)=>(Cs(!0),Tu(t[11],r));function B_(e,t,n,r=``){return jp(e,rs(),n)?t+Ki(n)+r:Vu}function V_(e,t,n,r,i,a=``){let o=Mp(e,ns(),n,i);return is(2),o?t+Ki(n)+r+Ki(i)+a:Vu}function Lte(e,t,n,r,i,a,o,s=``){let c=Np(e,ns(),n,i,o);return is(3),c?t+Ki(n)+r+Ki(i)+a+Ki(o)+s:Vu}function Rte(e,t,n,r,i,a,o,s,c,l=``){let u=Pp(e,ns(),n,i,o,c);return is(4),u?t+Ki(n)+r+Ki(i)+a+Ki(o)+s+Ki(c)+l:Vu}function q(e){return J(``,e),q}function J(e,t,n){let r=Go(),i=B_(r,e,t,n);return i!==Vu&&W_(r,hs(),i),J}function Y(e,t,n,r,i){let a=Go(),o=V_(a,e,t,n,r,i);return o!==Vu&&W_(a,hs(),o),Y}function H_(e,t,n,r,i,a,o){let s=Go(),c=Lte(s,e,t,n,r,i,a,o);return c!==Vu&&W_(s,hs(),c),H_}function U_(e,t,n,r,i,a,o,s,c){let l=Go(),u=Rte(l,e,t,n,r,i,a,o,s,c);return u!==Vu&&W_(l,hs(),u),U_}function W_(e,t,n){let r=xo(t,e);Eu(e[11],r,n)}function G_(e,t,n){Cc(t)&&(t=t());let r=Go();return jp(r,rs(),t)&&(Ko(),lf(_s(),r,e,t,r[11],n)),G_}function K_(e,t){let n=Cc(e);return n&&e.set(t),n}function q_(e,t){let n=Go(),r=Ko(),i=qo();return Wg(r,n,n[11],i,e,t),q_}var J_={};function Y_(e){ld(`NgLet`);let t=Ko(),n=Go(),r=e+27;return Yo(dp(t,r,128,null,null),!1),To(t,n,r,J_),Y_}function X_(e){return To(Ko(),Go(),hs(),e),e}function Z_(e){let t=wo(Qo(),27+e);if(t===J_)throw new gi(314,!1);return t}function Q_(e,t,n=``){return B_(Go(),e,t,n)}function $_(e,t,n){let r=Ko();r.firstCreatePass&&ev(t,r.data,r.blueprint,ho(e),n)}function ev(e,t,n,r,i){if(e=Ti(e),Array.isArray(e))for(let a=0;a>20;if(Va(e)||!e.multi){let r=new Xc(l,i,im,null),p=rv(c,t,i?u:u+f,d);p===-1?(yl(hl(s,o),a,c),tv(a,e,t.length),t.push(c),s.directiveStart++,s.directiveEnd++,i&&(s.providerIndexes+=1048576),n.push(r),o.push(r)):(n[p]=r,o[p]=r)}else{let p=rv(c,t,u+f,d),m=rv(c,t,u,u+f),h=p>=0&&n[p],g=m>=0&&n[m];if(i&&!g||!i&&!h){yl(hl(s,o),a,c);let u=Vte(i?Bte:zte,n.length,i,r,l,e);!i&&g&&(n[m].providerFactory=u),tv(a,e,t.length,0),t.push(c),s.directiveStart++,s.directiveEnd++,i&&(s.providerIndexes+=1048576),n.push(u),o.push(u)}else{let t=nv(n[i?m:p],l,!i&&r);tv(a,e,p>-1?p:m,t)}!i&&r&&g&&n[m].componentProviders++}}}function tv(e,t,n,r){let i=Va(t),a=Ha(t);if(i||a){let o=(a?Ti(t.useClass):t).prototype.ngOnDestroy;if(o){let a=e.destroyHooks||=[];if(!i&&t.multi){let e=a.indexOf(n);e===-1?a.push(n,[r,o]):a[e+1].push(r,o)}else a.push(n,o)}}}function nv(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function rv(e,t,n,r){for(let i=n;i{n.providersResolver=(t,n)=>$_(t,n?n(e):e,!1),t&&(n.viewProvidersResolver=(e,n)=>$_(e,n?n(t):t,!0))}}function ov(e,t){let n=ts()+e,r=Go();return r[n]===Vu?kp(r,n,t()):Ap(r,n)}function sv(e,t,n){return uv(Go(),ts(),e,t,n)}function cv(e,t,n,r){return dv(Go(),ts(),e,t,n,r)}function Hte(e,t,n,r,i,a,o){return Ute(Go(),ts(),e,t,n,r,i,a)}function lv(e,t){let n=e[t];return n===Vu?void 0:n}function uv(e,t,n,r,i,a){let o=t+n;return jp(e,o,i)?kp(e,o+1,a?r.call(a,i):r(i)):lv(e,o+1)}function dv(e,t,n,r,i,a,o){let s=t+n;return Mp(e,s,i,a)?kp(e,s+2,o?r.call(o,i,a):r(i,a)):lv(e,s+2)}function Ute(e,t,n,r,i,a,o,s,c){let l=t+n;return Pp(e,l,i,a,o,s)?kp(e,l+4,c?r.call(c,i,a,o,s):r(i,a,o,s)):lv(e,l+4)}function fv(e,t){let n=Ko(),r,i=e+27;n.firstCreatePass?(r=Wte(t,n.pipeRegistry),n.data[i]=r,r.onDestroy&&(n.destroyHooks??=[]).push(i,r.onDestroy)):r=n.data[i];let a=r.factory||(r.factory=ma(r.type,!0)),o=na(im);try{let e=ll(!1),t=a();return ll(e),To(n,Go(),i,t),t}finally{na(o)}}function Wte(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function pv(e,t,n){let r=e+27,i=Go(),a=wo(i,r);return hv(i,r)?uv(i,ts(),t,a.transform,n,a):a.transform(n)}function mv(e,t,n,r){let i=e+27,a=Go(),o=wo(a,i);return hv(a,i)?dv(a,ts(),t,o.transform,n,r,o):o.transform(n,r)}function hv(e,t){return e[1].data[t].pure}function gv(e,t){return up(e,t)}var Gte=(()=>{class e{applicationErrorHandler=C($s);appRef=C(eg);taskService=C(Ms);ngZone=C(Bs);zonelessEnabled=C(uc);tracing=C(sd,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new dr;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Rs):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(C(dc,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{let e=this.taskService.add();if(!this.runningTick&&(this.cleanup(),!this.zonelessEnabled||this.appRef.includeAllTestViews)){this.taskService.remove(e);return}this.switchToMicrotaskScheduler(),this.taskService.remove(e)})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()}))}switchToMicrotaskScheduler(){this.ngZone.runOutsideAngular(()=>{let e=this.taskService.add();this.useMicrotaskScheduler=!0,queueMicrotask(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(e)})})}notify(e){if(!this.zonelessEnabled&&e===5)return;switch(e){case 0:case 2:this.appRef.dirtyFlags|=2;break;case 3:case 4:case 5:case 1:this.appRef.dirtyFlags|=4;break;case 6:this.appRef.dirtyFlags|=2;break;case 12:this.appRef.dirtyFlags|=16;break;case 13:this.appRef.dirtyFlags|=2;break;case 11:break;default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick())return;let t=this.useMicrotaskScheduler?Is:Fs;this.pendingRenderTaskId=this.taskService.add(),this.cancelScheduledCallback=this.scheduleInRootZone?Zone.root.run(()=>t(()=>this.tick())):this.ngZone.runOutsideAngular(()=>t(()=>this.tick()))}shouldScheduleTick(){return!(this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(`isAngularZone_ID`+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let e=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(e){this.applicationErrorHandler(e)}finally{this.taskService.remove(e),this.cleanup()}}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let e=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(e)}}static ɵfac=function(t){return new(t||e)};static ɵprov=Il({token:e,factory:e.ɵfac})}return e})();function Kte(){return[{provide:lc,useExisting:Gte},{provide:Bs,useClass:Js},{provide:uc,useValue:!0}]}function qte(){return typeof $localize<`u`&&$localize.locale||`en-US`}var _v=new Pi(``,{factory:()=>C(_v,{optional:!0,skipSelf:!0})||qte()}),vv=class{destroyed=!1;listeners=null;errorHandler=C(Qs,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=C(Os);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new gi(953,!1);return(this.listeners??=[]).push(e),{unsubscribe:()=>{let t=this.listeners?this.listeners.indexOf(e):-1;t>-1&&(this.isEmitting?(this.hasNullListeners=!0,this.listeners[t]=null):this.listeners.splice(t,1))}}}emit(e){if(this.destroyed){console.warn(vi(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let t=tn(null);try{for(let t of this.listeners)try{t!==null&&t(e)}catch(e){this.errorHandler?.handleError(e)}}finally{this.hasNullListeners&&(this.hasNullListeners=!1,this.listeners&&Jte(this.listeners)),tn(t),this.isEmitting=!1}}};function Jte(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function X(e,t){return Cn(e,t?.equal)}function Z(e){return Xn(e)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var Yte=e=>e;function Q(e,t){return typeof e==`function`?yv(Kn(e,Yte,t?.equal),t?.debugName,t?.set):yv(Kn(e.source,e.computation,e.equal),e.debugName,e.set)}function yv(e,t,n){let r=e[en],i=e;if(n!==void 0){let t=e=>qn(r,e);i.set=e=>n(e,t),i.update=r=>n(r(Z(e)),t)}else i.set=e=>qn(r,e),i.update=e=>Jn(r,e);return i.asReadonly=tc.bind(e),i}var bv=!1;function Xte(){return bv}function xv(e){bv=e}function Sv(e,t){let n=Object.create(Tc);n.value=e,n.transformFn=t?.transform;function r(){if(an(n),n.value===wc)throw new gi(-950,null);return n.value}return r[en]=n,r}function Cv(e){return new vv}function wv(e,t){return Sv(e,t)}function Zte(e){return Sv(wc,e)}var $=(wv.required=Zte,wv);function Tv(e,t){let n=Object.create(Tc),r=new vv;n.value=e;function i(){return an(n),Ev(n.value),n.value}return i[en]=n,i.asReadonly=tc.bind(i),i.set=e=>{n.equal(n.value,e)||(Fn(n,e),r.emit(e))},i.update=e=>{Ev(n.value),i.set(e(n.value))},i.subscribe=r.subscribe.bind(r),i.destroyRef=r.destroyRef,i}function Ev(e){if(e===wc)throw new gi(952,!1)}function Dv(e,t){return Tv(e,t)}function Qte(e){return Tv(wc,e)}var Ov=(Dv.required=Qte,Dv);function kv(e,t){return mh(t)}function $te(e,t){return hh(t)}var Av=(kv.required=$te,kv),ene=(()=>{class e{static __NG_ELEMENT_ID__=tne}return e})();function tne(e){return nne(qo(),Go(),(e&16)==16)}function nne(e,t,n){if(po(e)&&!n){let n=Eo(e.index,t);return new sp(n,n)}if(e.type&175){let e=t[15];return new sp(e,t)}return null}var jv=new Pi(``),rne=new Pi(``);function Mv(e){return!e.moduleRef}function ine(e){let t=Mv(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Bs);return n.run(()=>{Mv(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get($s),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),Mv(e)){let n=()=>t.destroy(),r=e.platformInjector.get(jv);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(jv);n.add(t),e.moduleRef.onDestroy(()=>{ng(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return one(r,n,()=>{let n=t.get(Ms),r=n.add(),i=t.get(Ph);return i.runInitializers(),i.donePromise.then(()=>{if(Ug(t.get(_v,Hg)||`en-US`),!t.get(rne,!0))return Mv(e)?t.get(eg):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Mv(e)){let n=t.get(eg);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return ane?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var ane;function one(e,t,n){try{let r=n();return vh(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var Nv=null;function sne(e=[],t){return Es.create({name:t,providers:[{provide:Ua,useValue:`platform`},{provide:jv,useValue:new Set([()=>Nv=null])},...e]})}function cne(e=[]){if(Nv)return Nv;let t=sne(e);return Nv=t,Qh(),lne(t),t}function lne(e){let t=e.get(ic,null);oo(e,()=>{t?.forEach(e=>e())})}function une(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;Bc(Dc.BootstrapApplicationStart);try{let e=i?.injector??cne(r);return ine({r3Injector:new xh({providers:[Kte(),ec,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{Bc(Dc.BootstrapApplicationEnd)}}function Pv(e){return typeof e==`boolean`?e:e!=null&&e!==`false`}var Fv=Symbol(`NOT_SET`),Iv=new Set,dne={...Ln,kind:`afterRenderEffectPhase`,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:Fv,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(an(r),r.value),r.signal[en]=r,r.registerCleanupFn=e=>(r.cleanup??=new Set).add(e),this.nodes[e]=r,this.hooks[e]=e=>r.phaseFn(e)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){if(this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();super.destroy();for(let e of this.nodes)if(e)try{for(let t of e.cleanup??Iv)t()}finally{_n(e)}}};function Lv(e,t){let n=t?.injector??C(Es),r=n.get(lc),i=n.get(ud),a=n.get(sd,null,{optional:!0});i.impl??=n.get(fd);let o=e;typeof o==`function`&&(o={mixedReadWrite:e});let s=n.get(sc,null,{optional:!0}),c=new fne(i.impl,[o.earlyRead,o.write,o.mixedReadWrite,o.read],s?.view,r,n,a?.snapshot(null));return i.impl.register(c),c}var Rv=null;function zv(){return Rv}function pne(e){Rv??=e}var mne=class{},Bv=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(Bv||{}),Vv=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(Vv||{}),Hv=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(Hv||{}),Uv={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function hne(e){return Rg(e)[Bg.LocaleId]}function gne(e,t,n){let r=Rg(e);return Yv(Yv([r[Bg.DayPeriodsFormat],r[Bg.DayPeriodsStandalone]],t),n)}function _ne(e,t,n){let r=Rg(e);return Yv(Yv([r[Bg.DaysFormat],r[Bg.DaysStandalone]],t),n)}function vne(e,t,n){let r=Rg(e);return Yv(Yv([r[Bg.MonthsFormat],r[Bg.MonthsStandalone]],t),n)}function yne(e,t){let n=Rg(e)[Bg.Eras];return Yv(n,t)}function Wv(e,t){return Yv(Rg(e)[Bg.DateFormat],t)}function Gv(e,t){return Yv(Rg(e)[Bg.TimeFormat],t)}function Kv(e,t){let n=Rg(e)[Bg.DateTimeFormat];return Yv(n,t)}function qv(e,t){let n=Rg(e),r=n[Bg.NumberSymbols][t];if(r===void 0){if(t===Uv.CurrencyDecimal)return n[Bg.NumberSymbols][Uv.Decimal];if(t===Uv.CurrencyGroup)return n[Bg.NumberSymbols][Uv.Group]}return r}function Jv(e){if(!e[Bg.ExtraData])throw new gi(2303,!1)}function bne(e){let t=Rg(e);return Jv(t),(t[Bg.ExtraData][2]||[]).map(e=>typeof e==`string`?Xv(e):[Xv(e[0]),Xv(e[1])])}function xne(e,t,n){let r=Rg(e);return Jv(r),Yv(Yv([r[Bg.ExtraData][0],r[Bg.ExtraData][1]],t)||[],n)||[]}function Yv(e,t){for(let n=t;n>-1;n--)if(e[n]!==void 0)return e[n];throw new gi(2304,!1)}function Xv(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var Sne=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Zv=Object.create(null),Cne=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,wne=256;function Tne(e,t,n,r){let i=Fne(e);Ene(t),t=$v(n,t)||t;let a=[],o;for(;t;)if(o=Cne.exec(t),o){a=a.concat(o.slice(1));let e=a.pop();if(!e)break;t=e}else{a.push(t);break}let s=i.getTimezoneOffset();r&&(s=uy(r,s),i=Pne(i,r));let c=``;return a.forEach(e=>{let t=Mne(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function Ene(e){if(e.length>wne)throw new gi(2300,!1)}function Qv(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function $v(e,t){let n=hne(e);if(Zv[n]??=Object.create(null),Zv[n][t])return Zv[n][t];let r=``;switch(t){case`shortDate`:r=Wv(e,Hv.Short);break;case`mediumDate`:r=Wv(e,Hv.Medium);break;case`longDate`:r=Wv(e,Hv.Long);break;case`fullDate`:r=Wv(e,Hv.Full);break;case`shortTime`:r=Gv(e,Hv.Short);break;case`mediumTime`:r=Gv(e,Hv.Medium);break;case`longTime`:r=Gv(e,Hv.Long);break;case`fullTime`:r=Gv(e,Hv.Full);break;case`short`:let t=$v(e,`shortTime`),n=$v(e,`shortDate`);r=ey(Kv(e,Hv.Short),[t,n]);break;case`medium`:let i=$v(e,`mediumTime`),a=$v(e,`mediumDate`);r=ey(Kv(e,Hv.Medium),[i,a]);break;case`long`:let o=$v(e,`longTime`),s=$v(e,`longDate`);r=ey(Kv(e,Hv.Long),[o,s]);break;case`full`:let c=$v(e,`fullTime`),l=$v(e,`fullDate`);r=ey(Kv(e,Hv.Full),[c,l])}return r&&(Zv[n][t]=r),r}function ey(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return Object.hasOwn(t,n)?t[n]:e})),e}function ty(e,t,n=`-`,r,i){let a=``;(e<0||i&&e<=0)&&(i?e=-e+1:(e=-e,a=n));let o=String(e);for(;o.length0||s>-n)&&(s+=n),e===3)s===0&&n===-12&&(s=12);else if(e===6)return Dne(s,t);let c=qv(o,Uv.MinusSign);return ty(s,t,c,r,i)}}function One(e,t){switch(e){case 0:return t.getFullYear();case 1:return t.getMonth();case 2:return t.getDate();case 3:return t.getHours();case 4:return t.getMinutes();case 5:return t.getSeconds();case 6:return t.getMilliseconds();case 7:return t.getDay();default:throw new gi(2301,!1)}}function ry(e,t,n=Bv.Format,r=!1){return function(i,a){return kne(i,a,e,t,n,r)}}function kne(e,t,n,r,i,a){switch(n){case 2:return vne(t,i,r)[e.getMonth()];case 1:return _ne(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=bne(t),a=xne(t,i,r),s=e.findIndex(e=>{if(Array.isArray(e)){let[t,r]=e,i=n>=t.hours&&o>=t.minutes,a=n0?Math.floor(i/60):Math.ceil(i/60);switch(e){case 0:return(i>=0?`+`:``)+ty(o,2,a)+ty(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+ty(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+ty(o,2,a)+`:`+ty(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+ty(o,2,a)+`:`+ty(Math.abs(i%60),2,a);default:throw new gi(2310,!1)}}}var Ane=0,ay=4;function jne(e){let t=Qv(e,Ane,1).getDay();return Qv(e,0,1+(t<=ay?ay:11)-t)}function oy(e){let t=e.getDay(),n=t===0?-3:ay-t;return Qv(e.getFullYear(),e.getMonth(),e.getDate()+n)}function sy(e,t=!1){return function(n,r){let i;if(t){let e=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,t=n.getDate();i=1+Math.floor((t+e)/7)}else{let e=oy(n),t=jne(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return ty(i,e,qv(r,Uv.MinusSign))}}function cy(e,t=!1){return function(n,r){return ty(oy(n).getFullYear(),e,qv(r,Uv.MinusSign),t)}}var ly=Object.create(null);function Mne(e){if(ly[e])return ly[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=ry(3,Vv.Abbreviated);break;case`GGGG`:t=ry(3,Vv.Wide);break;case`GGGGG`:t=ry(3,Vv.Narrow);break;case`y`:t=ny(0,1,0,!1,!0);break;case`yy`:t=ny(0,2,0,!0,!0);break;case`yyy`:t=ny(0,3,0,!1,!0);break;case`yyyy`:t=ny(0,4,0,!1,!0);break;case`Y`:t=cy(1);break;case`YY`:t=cy(2,!0);break;case`YYY`:t=cy(3);break;case`YYYY`:t=cy(4);break;case`M`:case`L`:t=ny(1,1,1);break;case`MM`:case`LL`:t=ny(1,2,1);break;case`MMM`:t=ry(2,Vv.Abbreviated);break;case`MMMM`:t=ry(2,Vv.Wide);break;case`MMMMM`:t=ry(2,Vv.Narrow);break;case`LLL`:t=ry(2,Vv.Abbreviated,Bv.Standalone);break;case`LLLL`:t=ry(2,Vv.Wide,Bv.Standalone);break;case`LLLLL`:t=ry(2,Vv.Narrow,Bv.Standalone);break;case`w`:t=sy(1);break;case`ww`:t=sy(2);break;case`W`:t=sy(1,!0);break;case`d`:t=ny(2,1);break;case`dd`:t=ny(2,2);break;case`c`:case`cc`:t=ny(7,1);break;case`ccc`:t=ry(1,Vv.Abbreviated,Bv.Standalone);break;case`cccc`:t=ry(1,Vv.Wide,Bv.Standalone);break;case`ccccc`:t=ry(1,Vv.Narrow,Bv.Standalone);break;case`cccccc`:t=ry(1,Vv.Short,Bv.Standalone);break;case`E`:case`EE`:case`EEE`:t=ry(1,Vv.Abbreviated);break;case`EEEE`:t=ry(1,Vv.Wide);break;case`EEEEE`:t=ry(1,Vv.Narrow);break;case`EEEEEE`:t=ry(1,Vv.Short);break;case`a`:case`aa`:case`aaa`:t=ry(0,Vv.Abbreviated);break;case`aaaa`:t=ry(0,Vv.Wide);break;case`aaaaa`:t=ry(0,Vv.Narrow);break;case`b`:case`bb`:case`bbb`:t=ry(0,Vv.Abbreviated,Bv.Standalone,!0);break;case`bbbb`:t=ry(0,Vv.Wide,Bv.Standalone,!0);break;case`bbbbb`:t=ry(0,Vv.Narrow,Bv.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=ry(0,Vv.Abbreviated,Bv.Format,!0);break;case`BBBB`:t=ry(0,Vv.Wide,Bv.Format,!0);break;case`BBBBB`:t=ry(0,Vv.Narrow,Bv.Format,!0);break;case`h`:t=ny(3,1,-12);break;case`hh`:t=ny(3,2,-12);break;case`H`:t=ny(3,1);break;case`HH`:t=ny(3,2);break;case`m`:t=ny(4,1);break;case`mm`:t=ny(4,2);break;case`s`:t=ny(5,1);break;case`ss`:t=ny(5,2);break;case`S`:t=ny(6,1);break;case`SS`:t=ny(6,2);break;case`SSS`:t=ny(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=iy(0);break;case`ZZZZZ`:t=iy(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=iy(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=iy(2);break;default:return null}return ly[e]=t,t}function uy(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function Nne(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function Pne(e,t,n){let r=e.getTimezoneOffset();return Nne(e,-1*(uy(t,r)-r))}function Fne(e){if(dy(e))return e;if(typeof e==`number`&&!isNaN(e))return new Date(e);if(typeof e==`string`){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){let[t,n=1,r=1]=e.split(`-`).map(e=>+e);return Qv(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(Sne))return Ine(n)}let t=new Date(e);if(!dy(t))throw new gi(2311,!1);return t}function Ine(e){let t=new Date(0),n=0,r=0,i=e[8]?t.setUTCFullYear:t.setFullYear,a=e[8]?t.setUTCHours:t.setHours;e[9]&&(n=Number(e[9]+e[10]),r=Number(e[9]+e[11])),i.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));let o=Number(e[4]||0)-n,s=Number(e[5]||0)-r,c=Number(e[6]||0),l=Math.floor(parseFloat(`0.`+(e[7]||0))*1e3);return a.call(t,o,s,c,l),t}function dy(e){return e instanceof Date&&!isNaN(e.valueOf())}var fy=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=C(Es);constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let e=this._viewContainerRef;if(this._viewRef&&e.remove(e.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let t=this._createContextForwardProxy();this._viewRef=e.createEmbeddedView(this.ngTemplateOutlet,t,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector===`outlet`?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,t,n)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,t,n):!1,get:(e,t,n)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,t,n)}})}static ɵfac=function(t){return new(t||e)(im(Rm))};static ɵdir=Dh({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[jc]})}return e})();function Lne(e,t){return new gi(2100,!1)}var Rne=`mediumDate`,zne=new Pi(``),Bne=new Pi(``),py=(()=>{class e{locale;defaultTimezone;defaultOptions;constructor(e,t,n){this.locale=e,this.defaultTimezone=t,this.defaultOptions=n}transform(t,n,r,i){if(t==null||t===``||t!==t)return null;try{let e=n??this.defaultOptions?.dateFormat??Rne,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Tne(t,e,i||this.locale,a)}catch(t){throw Lne(e,t.message)}}static ɵfac=function(t){return new(t||e)(im(_v,16),im(zne,24),im(Bne,24))};static ɵpipe=Oh({name:`date`,type:e,pure:!0})}return e})(),my=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=Oh({name:`json`,type:e,pure:!1})}return e})();function Vne(e,t){t=encodeURIComponent(t);for(let n of e.split(`;`)){let e=n.indexOf(`=`),[r,i]=e==-1?[n,``]:[n.slice(0,e),n.slice(e+1)];if(r.trim()!==t)continue;let a=i;try{a=decodeURIComponent(i)}catch{}return a.length>1&&a[0]===`"`&&a[a.length-1]===`"`&&(a=a.slice(1,-1)),a}return null}var Hne=`browser`,hy=class{_doc;constructor(e){this._doc=e}manager},gy=(()=>{class e extends hy{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,n,r){return e.addEventListener(t,n,r),()=>this.removeEventListener(e,t,n,r)}removeEventListener(e,t,n,r){return e.removeEventListener(t,n,r)}static ɵfac=function(t){return new(t||e)(la(Ds))};static ɵprov=Di({token:e,factory:e.ɵfac})}return e})(),_y=new Pi(``),vy=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(e=>{e.manager=this});let n=e.filter(e=>!(e instanceof gy));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof gy);r&&this._plugins.push(r)}addEventListener(e,t,n,r){return this._findPluginFor(t).addEventListener(e,t,n,r)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(t=>t.supports(e)),!t)throw new gi(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(la(_y),la(Bs))};static ɵprov=Di({token:e,factory:e.ɵfac})}return e})(),yy=`ng-app-id`;function by(e){for(let t of e)t.remove()}function xy(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function Sy(e,t,n,r){let i=e.head?.querySelectorAll(`style[${yy}="${t}"],link[${yy}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(yy),e instanceof HTMLLinkElement?r.set(e.href.slice(e.href.lastIndexOf(`/`)+1),{usage:0,elements:[e]}):e.textContent&&n.set(e.textContent,{usage:0,elements:[e]});return!0}function Cy(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var wy=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,t,n,r={}){this.doc=e,this.appId=t,this.nonce=n,Sy(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,xy);t?.forEach(e=>this.addUsage(e,this.external,Cy))}removeStyles(e,t){for(let t of e)this.removeUsage(t,this.inline);t?.forEach(e=>this.removeUsage(e,this.external))}addUsage(e,t,n){let r=t.get(e);r?r.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(t=>this.addElement(t,n(e,this.doc)))})}removeUsage(e,t){let n=t.get(e);n&&(n.usage--,n.usage<=0&&(by(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])by(e);this.hosts.clear()}addHost(e){if(!this.hosts.has(e)){this.hosts.add(e);for(let[t,{elements:n}]of this.inline)n.push(this.addElement(e,xy(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,Cy(t,this.doc)))}}removeHost(e){this.hosts.delete(e);for(let t of[...this.inline.values(),...this.external.values()]){let n=[];for(let r of t.elements)r.parentNode===e?r.remove():n.push(r);t.elements=n}}addElement(e,t){return this.nonce&&t.setAttribute(`nonce`,this.nonce),e.appendChild(t)}static ɵfac=function(t){return new(t||e)(la(Ds),la(nc),la(oc,8),la(ac))};static ɵprov=Di({token:e,factory:e.ɵfac})}return e})(),Ty={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`,math:`http://www.w3.org/1998/Math/MathML`},Ey=/%COMP%/g,Dy=`%COMP%`,Oy=`_nghost-${Dy}`,ky=`_ngcontent-${Dy}`,Ay=!0,jy=new Pi(``,{factory:()=>Ay}),My=new Pi(``);function Ny(e){return ky.replace(Ey,e)}function Py(e){return Oy.replace(Ey,e)}function Fy(e,t){return t.map(t=>t.replace(Ey,e))}var Iy=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;cssVarNamespace;constructor(e,t,n,r,i,a,o=null,s=null,c=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=n,this.removeStylesOnCompDestroy=r,this.doc=i,this.ngZone=a,this.nonce=o,this.tracingService=s,this.cssVarNamespace=c??``,this.defaultRenderer=new Ly(e,i,a,this.tracingService,this.cssVarNamespace)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;let n=this.getOrCreateRenderer(e,t);return n instanceof Vy?n.applyToHost(e):n instanceof By&&n.applyStyles(),n}getOrCreateRenderer(e,t){let n=this.rendererByCompId,r=n.get(t.id);if(!r){let i=this.doc,a=this.ngZone,o=this.eventManager,s=this.sharedStylesHost,c=this.removeStylesOnCompDestroy,l=this.tracingService;switch(t.encapsulation){case mu.Emulated:r=new Vy(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case mu.ShadowDom:return new zy(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case mu.ExperimentalIsolatedShadowDom:return new zy(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new By(o,s,t,c,i,a,l,this.cssVarNamespace)}n.set(t.id,r)}return r}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static ɵfac=function(t){return new(t||e)(la(vy),la(nm),la(nc),la(jy),la(Ds),la(Bs),la(oc),la(sd,8),la(My,8))};static ɵprov=Di({token:e,factory:e.ɵfac})}return e})(),Ly=class{eventManager;doc;ngZone;tracingService;cssVarNamespace;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r,i=``){this.eventManager=e,this.doc=t,this.ngZone=n,this.tracingService=r,this.cssVarNamespace=i}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(Ty[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(Ry(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=Ry(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new gi(-5106,!1);r.insertBefore(t,n)}}removeChild(e,t){t.remove()}selectRootElement(e,t){let n=typeof e==`string`?this.doc.querySelector(e):e;if(!n)throw new gi(-5104,!1);return t||(n.textContent=``),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+`:`+t;let i=Ty[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Ty[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){let i=t.startsWith(`--`);i&&(t=t.replace(`%NS%`,this.cssVarNamespace)),i||r&(Hu.DashCase|Hu.Important)?e.style.setProperty(t,n,r&Hu.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&Hu.DashCase?e.style.removeProperty(t):e.style[t]=``}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n,r){if(typeof e==`string`&&(e=zv().getGlobalEventTarget(this.doc,e),!e))throw new gi(-5102,!1);let i=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(i=this.tracingService.wrapEventListener(e,t,i)),this.eventManager.addEventListener(e,t,i,r)}decoratePreventDefault(e){return t=>{if(t===`__ngUnwrap__`)return e;e(t)===!1&&t.preventDefault()}}};function Ry(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var zy=class extends Ly{hostEl;sharedStylesHost;shadowRoot;constructor(e,t,n,r,i,a,o,s,c){super(e,r,i,o,s),this.hostEl=t,this.sharedStylesHost=c,this.shadowRoot=t.attachShadow({mode:`open`}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let l=n.styles;l=Fy(n.id,l).map(e=>e.replace(/%NS%/g,s));for(let e of l){let t=document.createElement(`style`);a&&t.setAttribute(`nonce`,a),t.textContent=e,this.shadowRoot.appendChild(t)}let u=n.getExternalStyles?.();if(u)for(let e of u){let t=Cy(e,r);a&&t.setAttribute(`nonce`,a),this.shadowRoot.appendChild(t)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},By=class extends Ly{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,i,a,o,s,c){super(e,i,a,o,s),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let l=n.styles,u=c?Fy(c,l):l;this.styles=u.map(e=>e.replace(/%NS%/g,s)),this.styleUrls=n.getExternalStyles?.(c)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Yu.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Vy=class extends By{contentAttr;hostAttr;constructor(e,t,n,r,i,a,o,s,c){let l=r+`-`+n.id;super(e,t,n,i,a,o,s,c,l),this.contentAttr=Ny(l),this.hostAttr=Py(l)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,``)}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,``),n}},Hy=class e extends mne{supportsDOMEvents=!0;static makeCurrent(){pne(new e)}onAndCancel(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.remove()}createElement(e,t){return t||=this.getDefaultDocument(),t.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument(`fakeTitle`)}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return t===`window`?window:t===`document`?e:t===`body`?e.body:null}getBaseHref(e){let t=Wy();return t==null?null:Gy(t)}resetBaseElement(){Uy=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return Vne(document.cookie,e)}},Uy=null;function Wy(){return Uy||=document.head.querySelector(`base`),Uy?Uy.getAttribute(`href`):null}function Gy(e){return new URL(e,document.baseURI).pathname}var Ky=[`alt`,`control`,`meta`,`shift`],qy={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},Jy={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},Yy=(()=>{class e extends hy{constructor(e){super(e)}supports(t){return e.parseEventName(t)!=null}addEventListener(t,n,r,i){let a=e.parseEventName(n),o=e.eventCallback(a.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>zv().onAndCancel(t,a.domEventName,o,i))}static parseEventName(t){let n=t.toLowerCase().split(`.`),r=n.shift();if(n.length===0||r!==`keydown`&&r!==`keyup`)return null;let i=e._normalizeKey(n.pop()),a=``,o=n.indexOf(`code`);if(o>-1&&(n.splice(o,1),a=`code.`),Ky.forEach(e=>{let t=n.indexOf(e);t>-1&&(n.splice(t,1),a+=e+`.`)}),a+=i,n.length!=0||i.length===0)return null;let s={};return s.domEventName=r,s.fullKey=a,s}static matchEventFullKeyCode(e,t){let n=qy[e.key]||e.key,r=``;return t.indexOf(`code.`)>-1&&(n=e.code,r=`code.`),n==null||!n?!1:(n=n.toLowerCase(),n===` `?n=`space`:n===`.`&&(n=`dot`),Ky.forEach(t=>{if(t!==n){let n=Jy[t];n(e)&&(r+=t+`.`)}}),r+=n,r===t)}static eventCallback(t,n,r){return i=>{e.matchEventFullKeyCode(i,t)&&r.runGuarded(()=>n(i))}}static _normalizeKey(e){return e===`esc`?`escape`:e}static ɵfac=function(t){return new(t||e)(la(Ds))};static ɵprov=Di({token:e,factory:e.ɵfac})}return e})();async function Xy(e,t,n){return une({rootComponent:e,...Zy(t,n)})}function Zy(e,t){return{platformRef:t?.platformRef,appProviders:[...nb,...e?.providers??[]],platformProviders:tb}}function Qy(){Hy.makeCurrent()}function $y(){return new Qs}function eb(){return nu(document),document}var tb=[{provide:ac,useValue:Hne},{provide:ic,useValue:Qy,multi:!0},{provide:Ds,useFactory:eb}],nb=[{provide:Ua,useValue:`root`},{provide:Qs,useFactory:$y},{provide:_y,useClass:gy,multi:!0},{provide:_y,useClass:Yy,multi:!0},Iy,{provide:nm,useClass:wy},{provide:wy,useExisting:nm},vy,{provide:Sp,useExisting:Iy},[]];function rb(e,t){let n=`\x1B[${e}m`,r=`\x1B[${t}m`;return((e,...t)=>{if(Array.isArray(e)&&`raw`in e){let i=e,a=``;for(let e=0;e{let r=new sb({code:i,why:ab(a.why,e),fix:ab(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:ab(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function ub(e){return t=>{let n=`${e.bold(e.red(`[${t.name}]`))} ${t.message}`,r=[];return t.fix&&r.push(`${e.dim(`fix:`)} ${t.fix}`),t.sources?.length&&r.push(`${e.dim(`sources:`)} ${t.sources.join(`, `)}`),t.docs&&r.push(`${e.dim(`see:`)} ${e.cyan(t.docs)}`),r.length===0?n:[n,...r.map((t,n)=>`${e.dim(n{e=n,t=r}),resolve:e,reject:t}}var gb=Math.random.bind(Math),_b=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function vb(e=21){let t=``,n=e;for(;n--;)t+=_b[gb()*64|0];return t}var yb=6e4,bb=e=>e,xb=bb,{clearTimeout:Sb,setTimeout:Cb}=globalThis;function wb(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=bb,deserialize:s=xb,resolver:c,bind:l=`rpc`,timeout:u=yb,proxify:d=!0}=t,f=!1,p=new Map,m,h;async function g(e,r,i,a){if(f)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let s={m:e,a:r,t:`q`};a&&(s.o=!0);let c=async e=>n(o(e));if(i){await c(s);return}if(m)try{await m}finally{m=void 0}let{promise:l,resolve:d,reject:g}=hb(),_=vb();s.i=_;let ee;async function te(n=s){return u>=0&&(ee=Cb(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof ee==`object`&&(ee=ee.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:ee,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,te,d):await te()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{Sb(ee),p.delete(_)}return l}let _={$call:(e,...t)=>g(e,t,!1),$callOptional:(e,...t)=>g(e,t,!1,!0),$callEvent:(e,...t)=>g(e,t,!0),$callRaw:e=>g(e.method,e.args,e.event,e.optional),$rejectPendingCalls:te,get $closed(){return f},get $meta(){return t.meta},$close:ee,$functions:e};h=d?new Proxy({},{get(t,n){if(Object.hasOwn(_,n))return _[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>g(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>g(n,e,!1);return i.asEvent=r,i}}):_;function ee(e){f=!0,p.forEach(({reject:t,method:n})=>{let r=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=r,t(e);t(r)}),p.clear(),i(ne)}function te(e){let t=Array.from(p.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return p.clear(),t}async function ne(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}if(a.t===`q`){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(h,r,e[r]):e[r]);if(u&&(p||=()=>void 0),!p)f=Error(`[birpc] function "${r}" not found`);else try{d=await p.apply(l===`rpc`?h:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(h,f,r,s)===!0)return;if(!f)try{await n(o({t:`s`,i:a.i,r:d}),...i);return}catch(e){if(f=e,t.onGeneralError?.call(h,e,r,s)!==!0)throw e}try{await n(o({t:`s`,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(h,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(Sb(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(ne),h}function Tb(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var Eb=Object.freeze({type:`object`,additionalProperties:!0});function Db(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return Eb}return Eb}function Ob(e){if(!e||e.length===0)return{type:`object`,properties:{}};let t={},n=[];for(let r=0;rn[`arg${t}`]);if(`arg0`in n){let e=[];for(;`arg${e.length}`in n;)e.push(n[`arg${e.length}`]);return e}return Object.keys(n).length===0?[]:void 0}function Ab(e,t){return kb(e,t)??[e]}function jb(e){return typeof e==`string`?`'${e}'`:new Fb().serialize(e)}var Mb=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Nb=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Mb.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Pb(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length),r=0;for(let i=0;ia?-1:1)}return e.length===t.length?r:e.lengththis.compare(e[0],t[0])),r=`${e}{`;for(let e=0;ethis.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e})(),Ib=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Lb=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],Rb=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,zb=[],Bb=class{_data=new Vb;_hash=new Vb([...Ib]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);let t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,t){let n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7];for(let n=0;n<64;n++){if(n<16)zb[n]=e[t+n]|0;else{let e=zb[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=zb[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;zb[n]=t+zb[n-7]+i+zb[n-16]}let d=s&c^~s&l,f=r&i^r&a^i&a,p=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),h=u+m+d+Lb[n]+zb[n],g=p+f;u=l,l=c,c=s,s=o+h|0,o=a,a=i,i=r,r=h+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+u|0}_append(e){typeof e==`string`&&(e=Vb.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64;n=e?Math.ceil(n):Math.max((n|0)-this._minBufferSize,0);let r=n*16,i=Math.min(r*4,this._data.sigBytes);if(r){for(let e=0;e>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(i,r)}toBase64(){let e=[];for(let t=0;t>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,i=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,a=n<<16|r<<8|i;for(let n=0;n<4&&t*8+n*6>>6*(3-n)&63))}return e.join(``)}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function Hb(e){return new Bb().finalize(e).toBase64()}function Ub(e){return Hb(jb(e))}function Wb(e){return Ub(e)}function Gb(){let e={};function t(t,...n){let r=e[t]||[];for(let e=0,t=r.length;e{e[t]=e[t]?.filter(e=>n!==e)}}function i(e,t){let n=r(e,((...e)=>(n(),t(...e))));return n}return{_listeners:e,emit:t,emitOnce:n,on:r,once:i}}var Kb=/^[\w+.-]{2,}:\/\//;function qb(e){return e.endsWith(`/`)?e:`${e}/`}function Jb(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function Yb(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?qb(n)+e.replace(/^\.?\//,``):e);return n}function Xb(e,t){if(!t||t===`/`||Kb.test(e))return e;let n=Jb(t);return e.startsWith(n)?e:Yb(n,e)}function Zb(e,t){let n=e.match(Kb);return t+(n?e.slice(n[0].length):e)}var Qb=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function $b(e=21){let t=``,n=e;for(;n--;)t+=Qb[Math.random()*64|0];return t}var ex=Symbol.for(`immer-nothing`),tx=Symbol.for(`immer-draftable`),nx=Symbol.for(`immer-state`),rx=[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},`This object has been frozen and should not be mutated`,function(e){return`Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? `+e},`An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.`,`Immer forbids circular references`,"The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},`Object.defineProperty() cannot be used on an Immer draft`,`Object.setPrototypeOf() cannot be used on an Immer draft`,`Immer only supports deleting array indices`,`Immer only supports setting array indices and the 'length' property`,function(e){return`'original' expects a draft, got: ${e}`}];function ix(e,...t){{let n=rx[e],r=Ox(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var ax=Object,ox=ax.getPrototypeOf,sx=`constructor`,cx=`prototype`,lx=`configurable`,ux=`enumerable`,dx=`writable`,fx=`value`,px=e=>!!e&&!!e[nx];function mx(e){return e?_x(e)||wx(e)||!!e[tx]||!!e[sx]?.[tx]||Tx(e)||Ex(e):!1}var hx=ax[cx][sx].toString(),gx=new WeakMap;function _x(e){if(!e||!Dx(e))return!1;let t=ox(e);if(t===null||t===ax[cx])return!0;let n=ax.hasOwnProperty.call(t,sx)&&t[sx];if(n===Object)return!0;if(!Ox(n))return!1;let r=gx.get(n);return r===void 0&&(r=Function.toString.call(n),gx.set(n,r)),r===hx}function vx(e,t,n=!0){yx(e)===0?(n?Reflect.ownKeys(e):ax.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function yx(e){let t=e[nx];return t?t.type_:wx(e)?1:Tx(e)?2:Ex(e)?3:0}var bx=(e,t,n=yx(e))=>n===2?e.has(t):ax[cx].hasOwnProperty.call(e,t),xx=(e,t,n=yx(e))=>n===2?e.get(t):e[t],Sx=(e,t,n,r=yx(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Cx(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var wx=Array.isArray,Tx=e=>e instanceof Map,Ex=e=>e instanceof Set,Dx=e=>typeof e==`object`,Ox=e=>typeof e==`function`,kx=e=>typeof e==`boolean`;function Ax(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var jx=e=>Dx(e)?e?.[nx]:null,Mx=e=>e.copy_||e.base_,Nx=e=>e.modified_?e.copy_:e.base_;function Px(e,t){if(Tx(e))return new Map(e);if(Ex(e))return new Set(e);if(wx(e))return Array[cx].slice.call(e);let n=_x(e);if(t===!0||t===`class_only`&&!n){let t=ax.getOwnPropertyDescriptors(e);delete t[nx];let n=Reflect.ownKeys(t);for(let r=0;r1&&ax.defineProperties(e,{set:Lx,add:Lx,clear:Lx,delete:Lx}),ax.freeze(e),t&&vx(e,(e,t)=>{Fx(t,!0)},!1),e)}function Ix(){ix(2)}var Lx={[fx]:Ix};function Rx(e){return e===null||!Dx(e)||ax.isFrozen(e)}var zx=`MapSet`,Bx=`Patches`,Vx=`ArrayMethods`,Hx={};function Ux(e){let t=Hx[e];return t||ix(0,e),t}var Wx=e=>!!Hx[e];function Gx(e,t){Hx[e]||(Hx[e]=t)}var Kx,qx=()=>Kx,Jx=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Wx(zx)?Ux(zx):void 0,arrayMethodsPlugin_:Wx(Vx)?Ux(Vx):void 0});function Yx(e,t){t&&(e.patchPlugin_=Ux(Bx),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Xx(e){Zx(e),e.drafts_.forEach($x),e.drafts_=null}function Zx(e){e===Kx&&(Kx=e.parent_)}var Qx=e=>Kx=Jx(Kx,e);function $x(e){let t=e[nx];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function eS(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[nx].modified_&&(Xx(t),ix(4)),mx(e)&&(e=tS(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[nx].base_,e,t)}else e=tS(t,n);return nS(t,e,!0),Xx(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===ex?void 0:e}function tS(e,t){if(Rx(t))return t;let n=t[nx];if(!n)return uS(t,e.handledSet_,e);if(!iS(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);cS(n,e)}return n.copy_}function nS(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Fx(t,n)}function rS(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var iS=(e,t)=>e.scope_===t,aS=[];function oS(e,t,n,r){let i=Mx(e),a=e.type_;if(r!==void 0&&xx(i,r,a)===t){Sx(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;vx(i,(e,n)=>{if(px(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??aS;for(let e of o)Sx(i,e,n,a)}function sS(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!iS(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Nx(i);oS(e,i.draft_??i,a,n),cS(i,r)})}function cS(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}rS(e)}}function lS(e,t,n){let{scope_:r}=e;if(px(n)){let i=n[nx];iS(i,r)&&i.callbacks_.push(function(){yS(e),oS(e,n,Nx(i),t)})}else mx(n)&&e.callbacks_.push(function(){let i=Mx(e);e.type_===3?i.has(n)&&uS(n,r.handledSet_,r):xx(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&uS(xx(e.copy_,t,e.type_),r.handledSet_,r)})}function uS(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||px(e)||t.has(e)||!mx(e)||Rx(e)?e:(t.add(e),vx(e,(r,i)=>{if(px(i)){let t=i[nx];iS(t,n)&&(Sx(e,r,Nx(t),e.type_),rS(t))}else mx(i)&&uS(i,t,n)}),e)}function dS(e,t){let n=wx(e),r={type_:+!!n,scope_:t?t.scope_:qx(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=fS;n&&(i=[r],a=pS);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var fS={get(e,t){if(t===nx)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=Mx(e);if(!bx(i,t,e.type_))return gS(e,i,t);let a=i[t];if(e.finalized_||!mx(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Ax(t))return a;if(a===mS(e.base_,t)||hS(e,t,a)){yS(e);let n=e.type_===1?+t:t,r=xS(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in Mx(e)},ownKeys(e){return Reflect.ownKeys(Mx(e))},set(e,t,n){let r=_S(Mx(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=mS(Mx(e),t),i=r?.[nx];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(Cx(n,r)&&(n!==void 0||bx(e.base_,t,e.type_)))return!0;yS(e),vS(e)}return e.copy_[t]===n&&(n!==void 0||bx(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),lS(e,t,n),!0)},deleteProperty(e,t){return yS(e),mS(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),vS(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Mx(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[dx]:!0,[lx]:e.type_!==1||t!==`length`,[ux]:r[ux],[fx]:n[t]}},defineProperty(){ix(11)},getPrototypeOf(e){return ox(e.base_)},setPrototypeOf(){ix(12)}},pS={};for(let e in fS){let t=fS[e];pS[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}pS.deleteProperty=function(e,t){return isNaN(parseInt(t))&&ix(13),pS.set.call(this,e,t,void 0)},pS.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&ix(14),fS.set.call(this,e[0],t,n,e[0])};function mS(e,t){let n=e[nx];return(n?Mx(n):e)[t]}function hS(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!mx(n)||n[nx]?!1:e.baseRefs_.has(n)}function gS(e,t,n){let r=_S(t,n);return r?fx in r?r[fx]:r.get?.call(e.draft_):void 0}function _S(e,t){if(!(t in e))return;let n=ox(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=ox(n)}}function vS(e){e.modified_||(e.modified_=!0,e.parent_&&vS(e.parent_))}function yS(e){e.copy_||=(e.assigned_=new Map,Px(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var bS=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Ox(e)&&!Ox(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Ox(t)||ix(6),n!==void 0&&!Ox(n)&&ix(7);let r;if(mx(e)){let i=Qx(this),a=xS(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?Xx(i):Zx(i)}return Yx(i,n),eS(r,i)}if(!e||!Dx(e)){if(r=t(e),r===void 0&&(r=e),r===ex&&(r=void 0),this.autoFreeze_&&Fx(r,!0),n){let t=[],i=[];Ux(Bx).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}ix(1,e)},this.produceWithPatches=(e,t)=>{if(Ox(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},kx(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),kx(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),kx(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){mx(e)||ix(8),px(e)&&(e=SS(e));let t=Qx(this),n=xS(t,e,void 0);return n[nx].isManual_=!0,Zx(t),n}finishDraft(e,t){let n=e&&e[nx];(!n||!n.isManual_)&&ix(9);let{scope_:r}=n;return Yx(r,t),eS(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=Ux(Bx).applyPatches_;return px(e)?r(e,t):this.produce(e,e=>r(e,t))}};function xS(e,t,n,r){let[i,a]=Tx(t)?Ux(zx).proxyMap_(t,n):Ex(t)?Ux(zx).proxySet_(t,n):dS(t,n);return(n?.scope_??qx()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?sS(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function SS(e){return px(e)||ix(10,e),CS(e)}function CS(e){if(!mx(e)||Rx(e))return e;let t=e[nx],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Px(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Px(e,!0);let i=n;return Ex(n)&&(n=new Set),vx(i,(e,t)=>{Sx(n,e,CS(t))},r),t&&(t.finalized_=!1),n}function wS(){rx.push(`Sets cannot have "replace" patches.`,function(e){return`Unsupported patch operation: `+e},function(e){return`Cannot apply patch, path doesn't resolve: `+e},`Patching reserved attributes like __proto__, prototype and constructor is not allowed`);function e(n,r=[]){if(n.key_!==void 0){let e=n.parent_.copy_??n.parent_.base_,t=jx(xx(e,n.key_)),i=xx(e,n.key_);if(i===void 0||i!==n.draft_&&i!==n.base_&&i!==n.copy_||t!=null&&t.base_!==n.base_)return null;let a=n.parent_.type_===3,o;if(a){let e=n.parent_;o=Array.from(e.drafts_.keys()).indexOf(n.key_)}else o=n.key_;if(!(a&&e.size>o||bx(e,o))||n.parent_.type_===1&&n.parent_.allIndicesReassigned_)return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e{let u=xx(o,e,c),f=xx(s,e,c),p=l?bx(o,e)?n:`add`:r;if(u===f&&p===n)return;let m=t.concat(e);i.push(p===r?{op:p,path:m}:{op:p,path:m,value:d(f)}),a.push(p===`add`?{op:r,path:m}:p===r?{op:`add`,path:m,value:d(u)}:{op:n,path:m,value:d(u)})})}function s(e,t,n,i){let{base_:a,copy_:o}=e,s=0;a.forEach(e=>{if(!o.has(e)){let a=t.concat([s]);n.push({op:r,path:a,value:e}),i.unshift({op:`add`,path:a,value:e})}s++}),s=0,o.forEach(e=>{if(!a.has(e)){let a=t.concat([s]);n.push({op:`add`,path:a,value:e}),i.unshift({op:r,path:a,value:e})}s++})}function c(e,t,r){let{patches_:i,inversePatches_:a}=r;i.push({op:n,path:[],value:t===ex?void 0:t}),a.push({op:n,path:[],value:e})}function l(e,t){return t.forEach(t=>{let{path:i,op:a}=t,o=e;for(let e=0;e[e,u(t)]));if(Ex(e))return new Set(Array.from(e).map(u));let t=Object.create(ox(e));for(let n in e)t[n]=u(e[n]);return bx(e,tx)&&(t[tx]=e[tx]),t}function d(e){return px(e)?u(e):e}Gx(Bx,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var TS=new bS,ES=TS.produce,DS=TS.produceWithPatches.bind(TS),OS=TS.applyPatches.bind(TS),kS=1e3;function AS(e,t){if(e.add(t),e.size>kS){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function jS(e){let{enablePatches:t=!1}=e;t&&wS();let n=Gb(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=$b())=>{i.has(t)||(wS(),r=OS(r,e),AS(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=$b())=>{if(!i.has(a)){if(AS(i,a),t){let[t,i]=DS(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=ES(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var MS=typeof self==`object`?self:globalThis,NS=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),PS=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function FS(e,t){let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o,r=NS.has(e)?MS[e]:void 0;return n(new(r??MS.Error)(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}if(typeof a==`string`&&PS.has(a))return n(new MS[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function IS(e){return FS(new Map,e)(0)}var LS=``,{toString:RS}={},{keys:zS}=Object;function BS(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=RS.call(e).slice(8,-1);switch(n){case`Array`:return[1,LS];case`Object`:return[2,LS];case`Date`:return[3,LS];case`RegExp`:return[4,LS];case`Map`:return[5,LS];case`Set`:return[6,LS];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function VS([e,t]){return e===0&&(t===`function`||t===`symbol`)}function HS(e,t,n,r){let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=BS(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize ${s}`);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of zS(r))(e||!VS(BS(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(VS(BS(n))||VS(BS(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!VS(BS(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function US(e,t={}){let n=[];return HS(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:WS,stringify:GS}=JSON,KS={json:!0,lossy:!0};function qS(e){return IS(WS(e))}function JS(e){return GS(US(e,KS))}function YS(e){return IS(e)}function XS(e){return JS(e)}function ZS(e){return qS(e)}var QS=256,$S=class extends Error{name=`StreamClosedError`};function eC(e={}){let t=e.id??$b(),n=Math.max(0,e.replayWindow??0),r=Gb(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new $S(`Cannot write to a closed stream "${t}"`);s+=1,n>0&&(a.push({seq:s,chunk:e}),a.length>n&&(a.length-n===1?a.shift():a.splice(0,a.length-n))),r.emit(`chunk`,s,e)}function l(e){if(o)return;o=!0;let t=nC(e);i.abort(e),r.emit(`end`,t)}function u(){o||(o=!0,i.signal.aborted||i.abort(`stream closed`),r.emit(`end`,void 0))}function d(e){o||i.signal.aborted||i.abort(e??`aborted`)}let f=new WritableStream({write(e){c(e)},close(){u()},abort(e){l(e)}});return{id:t,signal:i.signal,get closed(){return o},get lastSeq(){return s},write:c,error:l,close:u,abort:d,writable:f,events:r,buffer:a}}function tC(e={}){let t=e.id??$b(),n=Math.max(1,e.highWaterMark??QS),r=[],i=0,a=!1,o=!1,s,c,l,u;function d(){if(c){if(r.length>0){let e=r.shift(),t=c;c=void 0,t.resolve({value:e,done:!1});return}if(a){let e=c;if(c=void 0,s){let t=Error(s.message);t.name=s.name,e.reject(t)}else e.resolve({value:void 0,done:!0})}}}function f(){if(l){for(;r.length>0;){let e=r.shift();try{l.enqueue(e)}catch{break}}if(a&&l){try{if(s){let e=Error(s.message);e.name=s.name,l.error(e)}else l.close()}catch{}l=void 0}}}function p(t,s){if(!(a||o)&&!(t<=i)){if(i=t,r.push(s),r.length>n){let t=r.length-n;r.splice(0,t),e.onOverflow?.(t)}d(),u&&f()}}function m(e){a||(a=!0,s=e,d(),u&&f())}function h(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function g(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){h()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return g()},cancel:h,_push:p,_end:m,[Symbol.asyncIterator](){return{next(){if(r.length>0)return Promise.resolve({value:r.shift(),done:!1});if(a){if(s){let e=Error(s.message);return e.name=s.name,Promise.reject(e)}return Promise.resolve({value:void 0,done:!0})}return new Promise((e,t)=>{c={resolve:e,reject:t}})},return(){return h(),Promise.resolve({value:void 0,done:!0})}}}}}function nC(e){if(e instanceof Error)return{name:e.name||`Error`,message:e.message};if(typeof e==`string`)return{name:`Error`,message:e};try{return{name:`Error`,message:JSON.stringify(e)}}catch{return{name:`Error`,message:String(e)}}}var rC=128;function iC(e){return e.replace(/[^\w-]+/g,`_`).slice(0,rC)}var aC=`modulepreload`,oC=function(e,t){return new URL(e,t).href},sC={},cC=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=oC(t,n),t=s(t),t in sC)return;sC[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:aC,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},lC=`__connection.json`,uC=`__DEVFRAME_CONNECTION__`,dC=`x-birpc-session`,fC=`__rpc-dump/index.json`,pC=`devframe:services`,mC=`devframe_otp`,hC=`devframe_auth_token`;db.postMessage.remoteAssetsError;var gC=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>Wb(e))}updateOptions(e){this.options={...this.options,...e}}cached(e,t){let n=this.cacheMap.get(e);if(n)return n.get(this.keySerializer(t))}has(e,t){return this.cacheMap.get(e)?.has(this.keySerializer(t))??!1}apply(e,t){let n=this.cacheMap.get(e.m)||new Map;n.set(this.keySerializer(e.a),t),this.cacheMap.set(e.m,n)}validate(e){return this.options.functions.includes(e)}clear(e){e?this.cacheMap.delete(e):this.cacheMap.clear()}},_C=mb({docsBase:`https://devfra.me/errors`,codes:{DF0019:{why:e=>`RPC function "${e.name}" has \`agent\` set but \`jsonSerializable\` is \`false\`; MCP requires JSON-serializable data.`,fix:"Remove `jsonSerializable: false`, or remove `agent` to keep it RPC-only."},DF0020:{why:e=>`RPC function "${e.name}" declares \`jsonSerializable: true\` but the value at "${e.path}" is a ${e.type}.`,fix:"Either drop `jsonSerializable: true` (falls back to structured-clone) or change the value to a JSON-safe shape."},DF0021:{why:e=>`RPC function "${e.name}" is already registered`,fix:"Use the `force` parameter to overwrite an existing registration."},DF0022:{why:e=>`RPC function "${e.name}" is not registered. Use register() to add new functions.`},DF0023:{why:e=>`RPC function "${e.name}" is not registered`},DF0024:{why:e=>`Either handler or setup function must be provided for RPC function "${e.name}"`},DF0025:{why:e=>`Function "${e.name}" not found in dump store`},DF0026:{why:e=>`No dump match for "${e.name}" with args: ${e.args}`},DF0027:{why:e=>`Function "${e.name}" with type "${e.type}" cannot have dump configuration. Only "static" and "query" types support dumps.`},DF0028:{why:e=>`Function "${e.name}" with type "${e.type}" cannot use \`snapshot: true\`. Only "query" functions support this sugar; "static" functions have equivalent default behavior already.`,fix:"Remove `snapshot: true`, or change the function type to `query`."},DF0043:{why:e=>`RPC function "${e.name}" received an invalid argument at position ${e.index}: ${e.issues}`,fix:"Pass a value that satisfies the `args` schema declared for this function."},DF0044:{why:e=>`RPC function "${e.name}" returned a value that failed its \`returns\` schema: ${e.issues}`,fix:"Make the handler return a value that satisfies the `returns` schema, or relax the schema."}}});function vC(e){if(e.agent&&e.jsonSerializable===!1)throw _C.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function yC(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function bC(e){return e.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `)}async function xC(e,t,n){let r=n.slice();if(!t||t.length===0)return r;for(let r=0;r{n.get(t)===r&&n.delete(t)}),n.set(t,r)),await r}if(!e.__promise){let n=Promise.resolve(e.setup(t));n.catch(()=>{e.__promise===n&&(e.__promise=void 0)}),e.__promise=n}return await e.__promise}async function wC(e,t){let n=e.handler;if(!n){let r=await CC(e,t);if(!r.handler)throw _C.DF0024({name:e.name});n=r.handler}let r=e.args,i=e.returns;if(!r&&!i)return n;let a=n;return async(...t)=>{let n=await xC(e.name,r,t),o=await a(...n);return await SC(e.name,i,o)}}var TC=class{context;definitions=new Map;functions;_onChanged=[];constructor(e){this.context=e;let t=this.definitions,n=this;this.functions=new Proxy({},{get(e,r){let i=t.get(r);if(i)return wC(i,n.context)},has(e,n){return t.has(n)},getOwnPropertyDescriptor(e,n){return{value:t.get(n)?.handler,configurable:!0,enumerable:!0}},ownKeys(){return Array.from(t.keys())}})}register(e,t=!1){if(this.definitions.has(e.name)&&!t)throw _C.DF0021({name:e.name});vC(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}update(e,t=!1){if(!this.definitions.has(e.name)&&!t)throw _C.DF0022({name:e.name});vC(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}onChanged(e){return this._onChanged.push(e),()=>{let t=this._onChanged.indexOf(e);t!==-1&&this._onChanged.splice(t,1)}}async getHandler(e){return await wC(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw _C.DF0023({name:String(e)});return{args:t.args,returns:t.returns}}has(e){return this.definitions.has(e)}get(e){return this.definitions.get(e)}list(){return Array.from(this.definitions.keys())}};function EC(e,t=``){return JSON.stringify(e,function(e,n){let r=this,i=r==null?n:r[e];if(i===void 0){if(Array.isArray(r))throw OC(t,`undefined`,r,e);return n}return i!==null&&DC(i,r,e,t),n})}function DC(e,t,n,r){if(typeof e==`bigint`)throw OC(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw OC(r,`Map`,t,n);if(e instanceof Set)throw OC(r,`Set`,t,n);if(e instanceof Date)throw OC(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw OC(r,e.constructor?.name??`class instance`,t,n)}function OC(e,t,n,r){let i=kC(n,r);return _C.DF0020({name:e||``,type:t,path:i})}function kC(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var AC=`__DEVFRAME_CONNECTION_META__`,jC=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function MC(e){let t=[()=>window?.[e],()=>globalThis?.[e],()=>parent.window?.[e]];for(let e of t)try{let t=e();if(t)return t}catch{}}function NC(){return MC(uC)}function PC(){return MC(AC)}function FC(e){if(e)return e;try{let e=localStorage.getItem(jC);if(e)return e}catch{}return MC(jC)}function IC(e){globalThis[uC]=e,globalThis[AC]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&LC(e.authToken)}function LC(e){try{localStorage.setItem(jC,e)}catch{}globalThis[jC]=e;let t=NC();t&&(globalThis[uC]={...t,authToken:e})}function RC(e){let t=Xb(lC,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function zC(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function BC(){let e=NC();if(e)return zC(e,FC()??e.authToken??e.connectionMeta.authToken);let t=PC();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??RC(`./`),authToken:FC(t.authToken)}}async function VC(e={}){if(e.connection){let t=zC(e.connection,FC(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return IC(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:RC(t[0]??`./`),authToken:FC(e.authToken??e.connectionMeta.authToken)};return IC(n),n}let n=BC();if(n){let t=zC(n,FC(e.authToken??n.authToken??n.connectionMeta.authToken));return IC(t),t}let r=[];for(let n of t){let t=Xb(lC,n),i=RC(n);try{let n=await fetch(t);if(!n.ok)throw Error(`Failed to fetch connection meta from ${i}: ${n.status}`);let r=await n.json(),a=n.url||i,o={connectionMeta:r,metaBaseUrl:r.baseUrl?new URL(r.baseUrl,a).href:a,authToken:FC(e.authToken??r.authToken)};return IC(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var HC=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function UC(e=mC){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function WC(e){try{let t=new URL(globalThis.location.href),n=new URLSearchParams(t.hash.replace(/^#/,``));if(!n.has(e))return;n.delete(e),t.hash=n.toString(),globalThis.history?.replaceState(globalThis.history.state,``,t.href)}catch{}}function GC(e=mC){let t=UC(e);return t&&WC(e),t}async function KC(e,t={}){let n=GC(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function qC(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(pC,{initialValue:{}}).then(e=>(t=e.value(),e.on(`updated`,e=>{t=e}),e)),r);return i(),{state:i,has:e=>e in t,keys:()=>Object.keys(t),get:r=>{let i=t[r];if(!i)return;let a=n.get(i);return a||(a={...i,rpc:e.scope(i.scope).rpc},n.set(i,a)),a}}}function JC(e){let t=new Map,n=new Map,r=new Map,i=new Set,a=e.connectionMeta.backend===`static`;function o(e,t){let n=r.get(e);return n&&typeof n==`object`&&!Array.isArray(n)&&typeof t==`object`&&!Array.isArray(t)?{...n,...t}:t}e.client.register({name:db.broadcast.clientStateUpdated,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.mutate(()=>o(e,n),r)}}),e.client.register({name:db.broadcast.clientStatePatch,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.patch(n,r)}});function s(t,n){let r=[];return r.push(n.on(`updated`,(n,r,i)=>{a||(r?e.callEvent(`devframe:rpc:server-state:patch`,t,r,i):e.callEvent(`devframe:rpc:server-state:set`,t,n,i))})),()=>{for(let e of r)e()}}return{keys:()=>Array.from(t.keys()),onKeyAdded(e){return i.add(e),()=>{i.delete(e)}},delete(e){let i=n.get(e);n.delete(e);let a=t.delete(e);return r.delete(e),i?.(),a},get:async(c,l)=>{if(l?.initialValue!==void 0&&r.set(c,l.initialValue),t.has(c))return t.get(c);let u=jS({initialValue:l?.initialValue,enablePatches:!1});async function d(){if(a||e.callEvent(`devframe:rpc:server-state:subscribe`,c),l?.initialValue!==void 0){t.set(c,u);for(let e of i)e(c);return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&u.mutate(()=>o(c,e))}).catch(e=>{console.error(`Error getting server state`,e)}),n.set(c,s(c,u)),u}{let r=await e.call(`devframe:rpc:server-state:get`,c);u.mutate(()=>o(c,r)),t.set(c,u);for(let e of i)e(c);return n.set(c,s(c,u)),u}}return new Promise((t,n)=>{if(e.isTrusted)d().then(t,n);else{t(u);let n=!1;e.events.on(db.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var YC=new Map;function XC(e=YC){let t=new Map;return{serialize:n=>{let r;return n.t===`q`?r=n.m:(r=t.get(n.i),t.delete(n.i)),!(n.t===`s`&&`e`in n)&&r&&e.get(r)?.jsonSerializable===!0?EC(n,r??``):`s:${XS(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?ZS(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function ZC(){}function QC(e){let t=e.search(/\n\n|\r\n\r\n/);if(!(t<0))return{frame:e.slice(0,t),rest:e.slice(t+(e[t]===`\r`?4:2))}}function $C(e){let t=`message`,n=[];for(let r of e.split(/\r?\n/))r.startsWith(`:`)||(r.startsWith(`event:`)?t=r.slice(6).trimStart():r.startsWith(`data:`)&&n.push(r.slice(5).replace(/^ /,``)));return{event:t,data:n}}function ew(e){let{onConnected:t=ZC,onError:n=ZC,onDisconnected:r=ZC,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${hC}=${encodeURIComponent(e.authToken)}`);let s=XC(i),c=new AbortController,l=!1,u,d,f,p,m=new Promise((e,t)=>{f=e,p=t});m.catch(()=>{});function h(e){l||(l=!0,p(e),n(e),r())}function g(){l||(l=!0,p(Error(`Devframe SSE stream closed`)),r())}function _(e,n){if(e===`session`){f(n),t();return}u?.(n)}async function ee(e){let t=e.getReader();d=t;let n=new TextDecoder,r=``;for(;;){let{done:e,value:i}=await t.read();if(e)break;for(r+=n.decode(i,{stream:!0});;){let e=QC(r);if(!e)break;r=e.rest;let{event:t,data:n}=$C(e.frame);n.length>0&&_(t,n.join(` -`))}}g()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await ee(e.body)}catch(e){if(c.signal.aborted){g();return}h(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l){n(Error(`Devframe SSE channel is closed; message dropped`));return}try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[dC]:t},body:e});if(n.status===200){let e=await n.text();e&&u?.(e);return}if(!n.ok)throw Error(`Devframe SSE POST failed: ${n.status}`)}catch(e){n(e instanceof Error?e:Error(String(e)))}},serialize:s.serialize,deserialize:s.deserialize}}function tw(e,t){let{channel:n,rpcOptions:r={}}=t;return wb(e,{...n,timeout:-1,...r,proxify:!1})}function nw(e){let{transport:t,authToken:n,connectionMeta:r,events:i,clientRpc:a,rpcOptions:o={},callTimeout:s=0}=e,c=!1,l=`connecting`,u=null,d=Promise.withResolvers();function f(e,t=null){if(t?u=t:e===`connected`&&(u=null),e===l)return;let n=l;l=e,i.emit(db.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function h(){return l===`disconnected`||l===`error`?new HC(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new HC(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function g(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(db.client.error,e,t),r(e))}};function l(){a=!0,p.delete(c),o&&clearTimeout(o)}p.add(c),s>0&&(o=setTimeout(()=>{c.reject(new HC(`timeout`,`[devframe] RPC call "${t}" timed out after ${s}ms`))},s)),e.then(e=>{a||(l(),n(e))},e=>{if(a)return;l();let n=e instanceof Error?e:Error(String(e));i.emit(db.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let ee=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(db.client.connectionError,e),m(new HC(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new HC(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),te=tw(a.functions,{channel:ee,rpcOptions:o});a.register({name:db.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new HC(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(db.client.connectionError,e),m(e),i.emit(db.client.isTrustedUpdated,!1)}});let ne=n;async function re(e){ne=e;let t=await te.$call(`anonymous:devframe:auth`,{authToken:e,ua:navigator.userAgent,origin:location.origin});if(c=t.isTrusted,c)d.resolve(!0),f(`connected`);else{let e=new HC(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(db.client.connectionError,e)}return i.emit(db.client.isTrustedUpdated,c),t.isTrusted}async function ie(e){let t=(await te.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(ne=t,c=!0,d.resolve(!0),f(`connected`),i.emit(db.client.isTrustedUpdated,!0)),t}async function ae(e={}){await te.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function oe(){return c?!0:re(ne??``)}async function se(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t;try{return await Promise.race([d.promise,new Promise((n,r)=>{t=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e)})]),c}finally{clearTimeout(t)}}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:oe,requestTrustWithToken:re,requestTrustWithCode:ie,requestAuthCode:ae,ensureTrusted:se,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(db.client.error,n,t),Promise.reject(n)):g(te.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(db.client.error,t,String(e[0]));return}return te.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(db.client.error,n,t),Promise.reject(n)):g(te.$callOptional(...e),t)},close:()=>{ee.close()}}}function rw(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})();if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`;return new URL(e.path??`/`,`${r.protocol}//${t}`).href}return new URL(e.path??``,r).href}let i=e??``;return/^https?:\/\//i.test(i)?i:new URL(i,r).href}function iw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=rw(n.sse,r??`./`,location);return nw({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>ew({url:l,authToken:t,definitions:e.definitions,...s,onConnected(){s.onConnected?.()},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(){e.onDisconnected(),s.onDisconnected?.()}})})}function aw(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:ow(r)?aw(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function ow(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function sw(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function cw(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function lw(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function uw(e){if(e.error)throw aw(e.error);return e.output}function dw(e){return e.some(e=>e!=null)}function fw(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function pw(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?YS(e):e}function a(e,t){return i(fw(e),t)}async function o(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>a(t,e.serialization)));let r=await n.get(e.path);return lw(r)?uw(r):r}async function s(e,n){return r.has(e)||r.set(e,t(e).then(e=>a(e,n))),await r.get(e)}async function c(t,n){if(!(t in e))throw Error(`[devframe-rpc] Function "${t}" not found in dump store`);let r=e[t];if(sw(r)){if(dw(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(cw(r)){let e=Wb(n),i=r.records[e];if(i)return uw(await s(i,r.serialization));if(r.fallback)return uw(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!dw(n))return r;throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}return{call:async(e,t)=>await c(e,t),callOptional:async(t,n)=>{if(t in e)return await c(t,n)},callEvent:async(e,t)=>{}}}async function mw(e){let t=pw(await e.fetchJsonFromBases(fC),e.fetchJsonFromBases);return{transport:`static`,isTrusted:!0,status:`connected`,connectionError:null,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,requestAuthCode:async()=>{},ensureTrusted:async()=>!0,call:(...e)=>t.call(e[0],e.slice(1)),callEvent:(...e)=>t.callEvent(e[0],e.slice(1)),callOptional:(...e)=>t.callOptional(e[0],e.slice(1)),close:()=>{}}}var hw=``;function gw(e,t){return`${e}${hw}${t}`}function _w(e){let t=new Map,n=new Map;e.client.register({name:db.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(gw(e,n))?._push(r,i)}}),e.client.register({name:db.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=gw(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:db.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=gw(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(db.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(hw);if(t<0)continue;let i=n.slice(0,t),a=n.slice(t+1);e.callEvent(`devframe:streaming:subscribe`,i,a,{afterSeq:r.lastSeenSeq})}});function r(n,r,i={}){let a=gw(n,r),o=t.get(a);if(o)return o;let s=tC({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(db.client.isTrustedUpdated,o=>{o&&(i(),t.has(a)&&!s.cancelled&&!s.done&&e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:s.lastSeenSeq}))})}return s}function i(t,r){let i=gw(t,r),a=n.get(i);if(a)return a;let o=eC({id:r});return o.events.on(`chunk`,(n,i)=>{e.callEvent(`devframe:streaming:upload-chunk`,t,r,n,i)}),o.events.on(`end`,a=>{e.callEvent(`devframe:streaming:upload-end`,t,r,a),n.delete(i)}),n.set(i,o),o}return{subscribe:r,upload:i}}function vw(){}var yw=new Map;function bw(e){let t=e.url;e.authToken&&(t=`${t}?${hC}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=vw,onError:i=vw,onDisconnected:a=vw,definitions:o=yw}=e;n.addEventListener(`open`,e=>{r(e)}),n.addEventListener(`error`,e=>{let t=e instanceof Error?e:Error(e.type);i(t)}),n.addEventListener(`close`,e=>{a(e)});let s=XC(o);return{close:()=>{n.close()},on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN){n.send(e);return}if(n.readyState===WebSocket.CONNECTING){let t=()=>{i(),n.readyState===WebSocket.OPEN&&n.send(e)},r=()=>i();function i(){n.removeEventListener(`open`,t),n.removeEventListener(`close`,r)}n.addEventListener(`open`,t),n.addEventListener(`close`,r);return}i(Error(`Devframe WebSocket is not open; message dropped`))},serialize:s.serialize,deserialize:s.deserialize}}function xw(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})(),i=r.protocol===`https:`?`wss:`:`ws:`;if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`,n=new URL(e.path??`/`,`${i}//${t}`);return n.protocol=i,n.href}let t=new URL(e.path??``,r);return t.protocol=i,t.href}if(typeof e==`number`)return`${i}//${r.hostname}:${e}`;let a=e??``;if(/^wss?:\/\//i.test(a))return a;if(/^https?:\/\//i.test(a))return Zb(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function Sw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=xw(n.websocket,r??`./`,location);return nw({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>bw({url:l,authToken:t,definitions:e.definitions,...s,onConnected(e){s.onConnected?.(e)},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(t){e.onDisconnected(),s.onDisconnected?.(t)}})})}function Cw(e){return e.includes(`:`)}function ww(e,t){return Cw(t)?t:`${e}:${t}`}function Tw(e){return{async get(t){return(await e()).value()?.[t]},async set(t,n){(await e()).mutate(e=>{if(e===void 0)return{[t]:n};e[t]=n})},async delete(t){(await e()).mutate(e=>{e!==void 0&&delete e[t]})},async all(){return(await e()).value()??{}},async onChange(t){return(await e()).on(`updated`,e=>t(e??{}))}}}function Ew(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=(async()=>(await e.ensureTrusted(),e.sharedState.get(r)))().catch(e=>{throw i=void 0,e}),i}return Tw(a)}function Dw(e,t){return{global:Ew(e,t,`global`),project:Ew(e,t,`project`)}}function Ow(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(Cw(n.name))throw Error(`[devframe] Scoped client RPC registration for namespace "${t}" received an already-namespaced function name "${n.name}". Pass a bare name without a ":" separator.`);e.client.register({...n,name:`${t}:${n.name}`})},call:((n,...r)=>e.call(ww(t,n),...r)),callEvent:((n,...r)=>e.callEvent(ww(t,n),...r)),callOptional:((n,...r)=>e.callOptional(ww(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(ww(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(ww(t,n),r,i),upload:(n,r)=>e.streaming.upload(ww(t,n),r)}},settings:Dw(e,t),scope:e.scope}}function kw(){if(typeof document<`u`){let e=document.modelContext;if(e)return e}if(typeof navigator<`u`){let e=navigator.modelContext;if(e)return e}}function Aw(e,t={}){let n=t.modelContext??kw();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=iC(t.name),s=a.get(o);if(s&&s!==t.name){console.warn(`[devframe] WebMCP tool name "${o}" (from "${t.name}") collides with "${s}"; keeping the first registration.`);return}let c=new AbortController,l=Tb(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Ob(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>jw(t,e.context,n)},{signal:c.signal});u&&`then`in u&&u.then(()=>{},()=>{}),a.set(o,t.name),i.set(t.name,()=>{c.abort(),u&&`unregister`in u&&typeof u.unregister==`function`&&u.unregister(),a.delete(o)})}function s(t){let n=t?[t]:[...e.definitions.keys()];for(let t of n){i.get(t)?.(),i.delete(t);let n=e.definitions.get(t),r=n?.agent;n&&r&&o(n,r)}}s();let c=e.onChanged(e=>s(e));return()=>{c();for(let e of i.values())e();i.clear()}}async function jw(e,t,n){try{let r=Ab(n,e.args?.length);return{content:[{type:`text`,text:Mw(await(await wC(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:Nw(e)}]}}}function Mw(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function Nw(e){if(!(e instanceof Error))return String(e);let t=e.cause instanceof Error?` (cause: ${e.cause.message})`:``;return`${e.name}: ${e.message}${t}`}function Pw(e,t){if(t.backend===`static`)return`static`;let n=t.websocket!==void 0,r=t.sse!==void 0;if(e===`websocket`){if(!n)throw Error(`[devframe] transport: 'websocket' was requested, but this server does not advertise a WebSocket endpoint`);return`websocket`}if(e===`sse`){if(!r)throw Error(`[devframe] transport: 'sse' was requested, but this server does not advertise an SSE endpoint`);return`sse`}if(t.backend===`sse`&&r)return`sse`;if(n)return`websocket`;if(r)return`sse`;throw Error(`[devframe] This server advertises no RPC transport (backend "none"), so there is nothing to connect to. Enable the WebSocket or SSE endpoint on the server, or use its static/MCP surfaces instead.`)}async function Fw(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Gb(),a=Array.isArray(t)?t:[t],o=await VC(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new gC({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new TC(f),m=e.webmcp===!1?void 0:Aw(p),h,g=!1,_=0,ee;function te(){_++,ee=void 0,d.clear(),r===!0&&d.updateOptions({functions:[]})}r&&(p.register({name:db.broadcast.cacheInvalidate,type:`event`,handler:te}),i.on(db.client.connectionStatus,te),i.on(db.client.isTrustedUpdated,te));async function ne(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(Xb(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let re=e.callTimeout??0,ie=re>0?re:1/0,ae,oe={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){let a=performance.now()+ie;if(await n.onRequest?.call(this,e,t,i),r===!0&&e.i&&ae.isTrusted&&!e.m.startsWith(`anonymous:`)&&e.m!==`devframe:rpc:cacheable-functions`){function t(){if(performance.now()>=a)throw new HC(`timeout`,`[devframe] RPC call "${e.m}" timed out after ${re}ms`)}for(;!ee&&(t(),!(g||ae.status!==`connected`));){let e=_;ee=ae.callOptional(`devframe:rpc:cacheable-functions`).then(t=>{e===_&&d.updateOptions({functions:t??[]})}).catch(t=>{throw e===_&&(ee=void 0),t}),await ee}await ee,t()}let o=_;if(r&&e.i&&!g&&ae.isTrusted&&d.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);o===_&&!g&&d.apply(e,n)}else await t(e)}}},se=Pw(e.transport??`auto`,s);ae=se===`static`?await mw({fetchJsonFromBases:ne}):se===`sse`?iw({...oe,sseOptions:e.sseOptions}):Sw({...oe,wsOptions:e.wsOptions});let ce;try{ce=new BroadcastChannel(`devframe-auth`)}catch{}let le,ue=!1;function de(e){return((...t)=>ue||!le?e(...t):le.then(()=>e(...t)))}function fe(){g=!0,te();try{h?.(),m?.()}finally{try{ce?.close()}finally{ae.close?.()}}}let pe={events:i,get isTrusted(){return ae.isTrusted},get status(){return ae.status},get connectionError(){return ae.connectionError},get transport(){return ae.transport??se},get connection(){return o},connectionMeta:s,ensureTrusted:ae.ensureTrusted,requestTrust:ae.requestTrust,requestTrustWithToken:async e=>(LC(e),o={...o,authToken:e},ae.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await ae.requestTrustWithCode(e);if(!t)return!1;LC(t),o={...o,authToken:t};try{ce?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>ae.requestAuthCode(e),call:de(ae.call),callEvent:de(ae.callEvent),callOptional:de(ae.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:fe};pe.sharedState=JC(pe),pe.streaming=_w(pe),pe.services=qC(pe);let me=new Map;pe.scope=(e=>{if(!e)return pe;let t=me.get(e);return t||(t=Ow(pe,e),me.set(e,t)),t}),f.rpc=pe;function he(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function ge(){if(e.simpleAuth!==!1&&he()&&typeof globalThis.prompt==`function`)for(await pe.requestAuthCode().catch(()=>{});!pe.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await pe.requestTrustWithCode(t))return}}async function _e(){let t=await ae.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await KC(pe,{param:n}):!1;t||r||pe.isTrusted||await ge()}return le=_e().then(()=>{ue=!0},()=>{ue=!0}),s.mcp&&cC(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-KH4HHvHf-bRoSxJvJ.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(pe))}).catch(()=>{}),ce&&(ce.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&pe.requestTrustWithToken(e.data.authToken)}),pe}var Iw=Fw,Lw=[`components`,`injectors`,`signals`,`ngrx`,`tanstackQuery`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`,`errors`,`plugins`],Rw=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function zw(e){return`pangular:${e}`}var Bw=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`,`tanstackQuery`,`plugins`],Vw={refreshMs:{default:3e3,min:500,max:8e3},navigations:{default:50,min:5,max:500},formTimeline:{default:200,min:10,max:2e3},httpCalls:{default:200,min:10,max:2e3},changeLog:{default:200,min:10,max:2e3},cdCycles:{default:200,min:10,max:2e3},capacitorCalls:{default:200,min:10,max:2e3},idleAfterMs:{default:6e4,min:0,max:6e5}},Hw={"opted-out":`the request sets transferCache: false`,post:`POST requests are left out unless includePostRequests is set`,method:`only GET, HEAD and POST requests are cached`,"auth-headers":`it sends an Authorization, Proxy-Authorization or Cookie header`,credentials:`it sends credentials (withCredentials or credentials: include/same-origin)`,"no-cache-request":`the request asks for no-store, no-cache or private`,"no-cache-response":`the response has Cache-Control no-store, no-cache or private`,"set-cookie":`the response sets a cookie`,error:`failed responses are not stored`,mocked:`a fault rule answered before the transfer cache ran`,"cache-off-or-filter":`the transfer cache is off, or its filter (or another withHttpTransferCacheOptions setting) left it out`},Uw=[[0,`Network error (offline)`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Content Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Content`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[499,`Client Closed Request`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[510,`Not Extended`],[511,`Network Authentication Required`],[520,`Web Server Returned an Unknown Error`],[521,`Web Server Is Down`],[522,`Connection Timed Out`],[523,`Origin Is Unreachable`],[524,`A Timeout Occurred`]];function Ww(e){return Uw.some(([t])=>t===e)}var Gw=/^[a-z][a-z0-9-]{0,39}$/;function Kw(e,t){let n=t.plugins?.[e],r=t.inspectors.plugins&&Gw.test(e)&&(n?.enabled??!0);return{enabled:r,tools:r&&t.agent.tools.plugins&&(n?.tools??!0),actions:r&&t.actions.plugins&&(n?.actions??!0)}}var qw=`pangular`,Jw={mod:`Mod`,ctrl:`Ctrl`,control:`Ctrl`,meta:`Meta`,cmd:`Meta`,command:`Meta`,alt:`Alt`,option:`Alt`,opt:`Alt`,shift:`Shift`},Yw=[`Mod`,`Ctrl`,`Meta`,`Alt`,`Shift`];function Xw(e){if(typeof e!=`string`||e.length>40)return;let t=e.split(`+`).map(e=>e.trim());if(t.some(e=>!e))return;let n=new Set,r;for(let e of t){let t=Jw[e.toLowerCase()];if(t){if(n.has(t))return;n.add(t);continue}if(r!==void 0)return;if(/^[a-z0-9]$/i.test(e))r=e.toUpperCase();else if(/^f([1-9]|1[0-2])$/i.test(e))r=e.toUpperCase();else return}if(r&&[...n].some(e=>e!==`Shift`)&&!(n.has(`Mod`)&&(n.has(`Ctrl`)||n.has(`Meta`))))return[...Yw.filter(e=>n.has(e)),r].join(`+`)}function Zw(e,t,n){let r=t.split(`+`),i=r.pop(),a=new Set(r),o=a.has(`Ctrl`)||a.has(`Mod`)&&!n,s=a.has(`Meta`)||a.has(`Mod`)&&n;if(e.ctrlKey!==o||e.metaKey!==s||e.altKey!==a.has(`Alt`)||e.shiftKey!==a.has(`Shift`))return!1;if(/^F\d+$/.test(i))return e.key.toUpperCase()===i;let c=/^\d$/.test(i)?`Digit${i}`:`Key${i}`;return e.code?e.code===c:e.key.toUpperCase()===i}function Qw(e,t){if(!t)return e.replace(/^Mod\b/,`Ctrl`);let n={Mod:`⌘`,Meta:`⌘`,Ctrl:`⌃`,Alt:`⌥`,Shift:`⇧`};return e.split(`+`).map(e=>n[e]??e).join(``)}var $w=[{id:`dashboard`,label:`Dashboard`},{id:`timeline`,label:`Timeline`},{id:`audit`,label:`Audit`},{id:`analog`,label:`Analog`,inspector:`analog`},{id:`components`,label:`Components`,inspector:`components`},{id:`routes`,label:`Routes`,inspector:`router`},{id:`signals`,label:`Signals`,inspector:`signals`},{id:`injectors`,label:`Injectors`,inspector:`injectors`},{id:`store`,label:`Store`,inspector:`ngrx`},{id:`queries`,label:`Queries`,inspector:`tanstackQuery`},{id:`forms`,label:`Forms`,inspector:`forms`},{id:`pipes`,label:`Pipes`,inspector:`pipes`},{id:`network`,label:`SSR & HTTP`,inspector:`http`},{id:`errors`,label:`Errors`,inspector:`errors`},{id:`capacitor`,label:`Capacitor`,inspector:`capacitor`},{id:`plugins`,label:`Plugins`,inspector:`plugins`}],eT=1e4;function tT(e){return $w.filter(t=>!(`inspector`in t)||e.inspectors[t.inspector])}var nT={components:`a component instance, by its id in the component tree`,injectors:`a component's element injector, by the component's id`,forms:`a form, by its id`},rT=200;function iT(e){let t=new URLSearchParams({tab:e.tab});return e.id&&t.set(`id`,e.id),e.page&&t.set(`page`,e.page),`#${t.toString()}`}function aT(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=e=>{let n=t.get(e)?.trim();return n&&n.length<=rT?n:void 0},r=n(`tab`);if(!r)return null;let i=n(`id`),a=n(`page`);return{tab:r,...i?{id:i}:{},...a?{page:a}:{}}}var oT=[{id:`settings`,title:`Open settings`,group:`Go to`,keywords:`preferences tabs`},{id:`pick-component`,title:`Pick component on page`,group:`Actions`,keywords:`select inspect element`,inspector:`components`},{id:`cd-record-start`,title:`Start recording change detection`,group:`Actions`,keywords:`profiler cycles`,inspector:`components`},{id:`cd-record-stop`,title:`Stop recording change detection`,group:`Actions`,keywords:`profiler cycles`,inspector:`components`},{id:`cd-clear`,title:`Clear change detection recording`,group:`Actions`,keywords:`reset recordings cycles`,inspector:`components`},{id:`theme:system`,title:`Theme: follow the system`,group:`Theme`,keywords:`auto`},{id:`theme:light`,title:`Theme: light`,group:`Theme`},{id:`theme:dark`,title:`Theme: dark`,group:`Theme`},{id:`dock:float`,title:`Popup: float`,group:`Popup`,keywords:`dock`,popupOnly:!0},{id:`dock:bottom`,title:`Popup: dock to the bottom`,group:`Popup`,keywords:`dock`,popupOnly:!0},{id:`dock:right`,title:`Popup: dock to the right`,group:`Popup`,keywords:`dock`,popupOnly:!0},{id:`dock:reset-size`,title:`Popup: reset the docked size`,group:`Popup`,keywords:`splitter resize height width`,popupOnly:!0},{id:`popout`,title:`Popup: open in its own window`,group:`Popup`,keywords:`pop out detach new window`,popupOnly:!0},{id:`popout:return`,title:`Popup: back into the page`,group:`Popup`,keywords:`pop in attach dock window`,popupOnly:!0}];function sT(e){let t=tT(e).map(e=>({id:`tab:${e.id}`,title:`Go to ${e.label}`,group:`Go to`,keywords:`tab open`})),n=oT.filter(t=>!t.inspector||e.inspectors[t.inspector]).map(({inspector:e,...t})=>t);return[...t,...n]}function cT(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function lT(e,t){return typeof e==`boolean`?e:t}var uT=100,dT=100;function fT(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=dT);return[...new Set(t)].slice(0,uT)}function pT(e,t){let{default:n,min:r,max:i}=Vw[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function mT(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function hT(e){let t=cT(e),n=cT(t.agent),r=cT(t.inspectors),i=cT(n.tools),a=cT(t.actions),o=lT(t.actions,!0),s=cT(t.redaction),c=cT(t.limits),l=mT(Lw,e=>lT(r[e],!0));return{inspectors:l,agent:{readOnly:lT(n.readOnly,!1),tools:mT(Lw,e=>l[e]&&lT(i[e],!0)),browserTools:lT(n.browserTools,!1)},actions:mT(Bw,e=>l[e]&&lT(a[e],o)),redaction:{secretNames:fT(s.secretNames),unmask:fT(s.unmask)},limits:Object.fromEntries(Object.keys(Vw).map(e=>[e,pT(c[e],e)])),popup:{hotkey:bT(cT(t.popup).hotkey)},plugins:yT(t.plugins),lint:{rules:_T(t.lint)}}}var gT=200;function _T(e){let t=cT(cT(e).rules),n={};for(let[e,r]of Object.entries(t).slice(0,gT))typeof r==`boolean`&&(n[e]=r);return n}var vT=100;function yT(e){let t={};for(let[n,r]of Object.entries(cT(e)).slice(0,vT)){if(!Gw.test(n))continue;if(typeof r==`boolean`){t[n]={enabled:r,tools:!0,actions:!0};continue}let e=cT(r);r!==void 0&&Object.keys(e).length&&(t[n]={enabled:lT(e.enabled,!0),tools:lT(e.tools,!0),actions:lT(e.actions,!0)})}return t}function bT(e){return e===!1?!1:Xw(e)??`Alt+Shift+P`}function xT(e){let t=e?.configs;return hT(t?.[qw])}function ST(e){return`${{forms:`Writing to forms`,router:`Navigating and clearing navigations`,ngrx:`Restoring NgRx state and dispatching actions`,http:`Changing HTTP mock rules and SSR overrides, and clearing HTTP calls`,analog:`Calling API routes and clearing server calls`,components:`Editing component properties and signals`,tanstackQuery:`Invalidating and refetching TanStack queries`,plugins:`Running plugin actions`}[e]} is turned off in the devtools config (actions.${e}).`}var CT=[`pangular:build-meta`],wT={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,tanstackQuery:`TanStack Query`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`,capacitor:`Capacitor`,errors:`Errors`,plugins:`Plugins`},TT={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore and dispatch`,http:`HTTP mocking`,analog:`Analog API calls`,components:`Component edits`,tanstackQuery:`TanStack Query invalidate and refetch`,plugins:`Plugin actions`},ET={refreshMs:e=>`poll every ${e} ms`,navigations:e=>`${e} navigations`,formTimeline:e=>`${e} form events`,httpCalls:e=>`${e} HTTP calls`,changeLog:e=>`${e} NgRx changes`,cdCycles:e=>`${e} change detection cycles`,capacitorCalls:e=>`${e} Capacitor plugin calls`,idleAfterMs:e=>e?`idle ${e/1e3} s after the last agent call`:`never idle`};function DT(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=Lw.filter(t=>e.inspectors[t]);n(`Inspectors off`,Lw.filter(t=>!e.inspectors[t]).map(e=>wT[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>wT[e])),n(`Blocked actions`,Bw.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>TT[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Limits`,Object.keys(Vw).filter(t=>e.limits[t]!==Vw[t].default).map(t=>ET[t](e.limits[t]))),e.popup.hotkey!==`Alt+Shift+P`&&n(`Popup shortcut`,[e.popup.hotkey===!1?`Off`:e.popup.hotkey]);let i=Object.entries(e.plugins??{});return n(`Plugins off`,i.filter(([,e])=>!e.enabled).map(([e])=>e)),n(`Plugin tools or actions off`,i.filter(([,e])=>e.enabled&&(!e.tools||!e.actions)).map(([e,t])=>`${e} (${[!t.tools&&`tools`,!t.actions&&`actions`].filter(Boolean).join(`, `)})`)),n(`Lint rules off`,Object.entries(e.lint?.rules??{}).filter(([,e])=>!e).map(([e])=>e)),t}function OT(e){let t={tags:[],directives:[],text:``},n=e.toLowerCase();return n=n.replace(/<\s*([^<>\s]+)\s*>/g,(e,n)=>(t.tags.push({value:n,exact:!0}),` `)),n=n.replace(/\[\s*([^[\]\s]+)\s*\]/g,(e,n)=>(t.directives.push({value:n,exact:!0}),` `)),n=n.replace(/(^|\s)([<[])([^<>[\]\s]*)$/,(e,n,r,i)=>(i&&(r===`<`?t.tags:t.directives).push({value:i,exact:!1}),n)),t.text=n.replace(/\s+/g,` `).trim(),t}function kT(e){return!e.tags.length&&!e.directives.length&&!e.text}function AT(e,t){let n=e.tag.toLowerCase(),r=(e.directives??[]).map(e=>e.toLowerCase()),i=(e.attributes??[]).map(e=>e.toLowerCase()),a=[...r,...r.map(e=>e.replace(/directive$/,``)),...i];for(let{value:e,exact:r}of t.tags)if(r?n!==e:!n.startsWith(e))return!1;for(let{value:e,exact:n}of t.directives)if(!a.some(t=>n?t===e:t.includes(e)))return!1;if(t.text){let a=t.text;if(!(e.name.toLowerCase().includes(a)||n.includes(a)||r.some(e=>e.includes(a))||i.some(e=>e.includes(a))))return!1}return!0}var jT={debugApi:{subject:`Live data`,since:`12.0`},injectorProviders:{subject:`Reading providers and environment injectors`,since:`16.2`},injectorMetadata:{subject:`The full injector tree`,since:`17.0`},isSignal:{subject:`Telling signals apart in component values`,since:`17.1`},signalGraph:{subject:`The live signal graph`,since:`20.1`},deferBlocks:{subject:`Listing @defer blocks`,since:`19.1`},forBlocks:{subject:`Listing @for blocks`,since:`22.0`},profiler:{subject:`Recording change detection`,since:`20.0`},angularProfiling:{subject:`Angular profiling`,since:`20.0`},routerInstance:{subject:`The router debug util`,since:`20.3`}};function MT(e){let t=/^(\d+)\.(\d+)/.exec(e.trim());return t?`${t[1]}.${t[2]}`:e.trim()}function NT(e){let t=/^(\d+)(?:\.(\d+))?/.exec(e.trim());return t?[Number(t[1]),Number(t[2]??0)]:null}function PT(e,t){let n=NT(e),r=NT(t);return!n||!r?!1:n[0]===r[0]?n[1]>=r[1]:n[0]>r[0]}function FT(e,t){return e?.capabilities?.[t]===!1}function IT(e,t){let n=jT[e],r=`${n.subject} needs Angular ${n.since} or later`;if(!t)return`${r}; this page's Angular version is unknown.`;let i=MT(t);return PT(t,n.since)?`${r} in a development build; this page runs Angular ${i} without it, which usually means a production build.`:`${r}; this page runs Angular ${i}.`}var LT=/^on (viewport|interaction|hover)\b/;function RT(e){let t=e.filter(e=>!/^(prefetch|hydrate) /.test(e));return t.length>0&&t.every(e=>LT.test(e))}function zT(e,t){let n=[],r=e.since>0?Math.max(0,Math.round((t-e.since)/1e3)):0;return e.state===`error`&&n.push({kind:`failed`,text:`failed to load`,label:`failed`}),(e.state===`placeholder`||e.state===`initial`)&&r*1e3>=1e4&&n.push(RT(e.triggers)?{kind:`waiting`,text:`waiting for its trigger for ${r}s`,label:`waiting ${r}s`,seconds:r}:{kind:`stuck`,text:`on its placeholder for ${r}s`,label:`stuck ${r}s`,seconds:r}),e.hydrateNever?n.push({kind:`hydrate-never`,text:`hydrate never: the server HTML stays static`,label:`hydrate never`}):e.hydration===`dehydrated`&&n.push({kind:`dehydrated`,text:`still dehydrated`,label:`dehydrated`}),n}var BT=`pangular-page-id`,VT=null;function HT(e){VT=e}function UT(){if(VT)return VT;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(BT)||null)}catch{return null}}function WT(e,t){if(t.chosen&&e[t.chosen])return t.chosen;if(t.host)return t.host;if(t.previous&&e[t.previous])return t.previous;let n=null;for(let t of Object.values(e))(!n||t.reportedAt>n.reportedAt)&&(n=t);return n?.pageId??null}function GT(e,t){return e?t?e.pages?.[t]??null:e:null}function KT(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function qT(){return{functions:[...CT]}}function JT(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function YT(e,t,n){return JT(e,t,n).then(e=>e,()=>null)}function XT(e){return e?.connectionMeta.backend===`static`}function ZT(e){let t=()=>{let t=e()?.scope(`pangular`).rpc;t&&(t.callEvent(`request-page-highlight`,null),t.callEvent(`request-form-highlight`,null))};return addEventListener(`pagehide`,t),()=>{removeEventListener(`pagehide`,t),t()}}function QT(e=globalThis){delete e.__DEVFRAME_CONNECTION__,delete e.__DEVFRAME_CONNECTION_META__}function $T(e){return e.split(`@`)[1]??``}var eE={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},tE={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},nE=YT,rE={key:`name looks secret`,"input-type":`password input`,autocomplete:`autocomplete is a secret kind`,marker:`marked as mask`,parent:`inside a secret group`,config:`listed in mask`};function iE(e){return rE[e]??e}var aE=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function oE(e,t){return await nE(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function sE(e){return`${e.ok?e.message??`Done.`:e.error??`Failed.`}${e.skipped?.length?` Skipped: ${e.skipped.map(e=>`${e.path} (${e.reason})`).join(`, `)}.`:``}${e.status?` Status: ${e.status}.`:``}`}var cE=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function lE(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(cE,(e,t)=>t??(e===`**`?``:e))}function uE(e){return xT(e?.connectionMeta)}function dE(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)?[...e]:void 0}function fE(e,t){if(!t||typeof t!=`object`)return e;let n=dE(t.secretNames),r=dE(t.unmask);return!n||!r?e:{...e,redaction:{secretNames:n,unmask:r}}}function pE(e,t){return uE(e).actions[t]}var mE={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,queries:`tanstackQuery`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`,capacitor:`capacitor`,errors:`errors`,plugins:`plugins`};function hE(e){return mE[e]}var gE=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function _E(e,t){let n=mE[e];return!n||t.inspectors[n]}function vE(e,t){e&1&&(E(),Og(0,`rect`,5)(1,`rect`,6)(2,`rect`,7)(3,`rect`,8))}function yE(e,t){e&1&&(E(),Og(0,`path`,9)(1,`circle`,10)(2,`circle`,11)(3,`path`,12))}function bE(e,t){e&1&&(E(),Og(0,`path`,13)(1,`path`,14))}function xE(e,t){e&1&&(E(),Og(0,`path`,15)(1,`path`,16)(2,`path`,17))}function SE(e,t){e&1&&(E(),Og(0,`circle`,18)(1,`path`,19)(2,`circle`,20))}function CE(e,t){e&1&&(E(),Og(0,`path`,1))}function wE(e,t){e&1&&(E(),Og(0,`path`,21)(1,`path`,22)(2,`path`,23)(3,`path`,24))}function TE(e,t){e&1&&(E(),Og(0,`ellipse`,25)(1,`path`,26)(2,`path`,27))}function EE(e,t){e&1&&(E(),Og(0,`rect`,28)(1,`path`,29)(2,`path`,30)(3,`path`,31))}function DE(e,t){e&1&&(E(),Og(0,`circle`,32)(1,`path`,9)(2,`path`,33))}function OE(e,t){e&1&&(E(),Og(0,`path`,34)(1,`path`,35)(2,`path`,36)(3,`path`,37)(4,`circle`,38))}function kE(e,t){e&1&&(E(),Og(0,`circle`,39)(1,`path`,40))}function AE(e,t){e&1&&(E(),Og(0,`ellipse`,41)(1,`path`,42)(2,`path`,43)(3,`path`,44)(4,`path`,45))}function jE(e,t){e&1&&(E(),Og(0,`circle`,32)(1,`path`,46)(2,`path`,47))}function ME(e,t){e&1&&(E(),Og(0,`path`,2))}function NE(e,t){e&1&&(E(),Og(0,`path`,3))}function PE(e,t){e&1&&(E(),Og(0,`path`,4))}var FE=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:18,vars:1,consts:[[`viewBox`,`0 0 24 24`,`width`,`16`,`height`,`16`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`1.8`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`,`aria-hidden`,`true`],[`d`,`M22 12h-4l-3 9L9 3l-3 9H2`],[`d`,`M10 3h4v3a2 2 0 1 0 4 0V5h1a2 2 0 0 1 2 2v4h-2a2 2 0 1 0 0 4h2v4a2 2 0 0 1-2 2h-4v-2a2 2 0 1 0-4 0v2H7a2 2 0 0 1-2-2v-4H4a2 2 0 1 1 0-4h1V7a2 2 0 0 1 2-2h3Z`],[`d`,`m8 3 4 8 5-5 5 15H2L8 3z`],[`fill`,`currentColor`,`stroke`,`none`,`transform`,`translate(1.8 1.8) scale(0.85)`,`d`,`M24 3.7l-5.766 5.766 5.725 5.736-3.713 3.712L5.073 3.742 8.786.03l5.736 5.726L20.284 0 24 3.7zM.029 8.785l3.713-3.713 15.173 15.173-3.713 3.714-5.732-5.726L3.7 24 0 20.285l5.754-5.764L.029 8.785z`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`x`,`14`,`y`,`12`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`3`,`y`,`16`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`d`,`M3 12h18`],[`cx`,`7`,`cy`,`12`,`r`,`2`],[`cx`,`14`,`cy`,`12`,`r`,`2`],[`d`,`M18 7v10`],[`d`,`M9 11l2 2 4-4`],[`d`,`M12 3 4 6v6c0 4.5 3.4 8.3 8 9 4.6-.7 8-4.5 8-9V6l-8-3Z`],[`d`,`M12 2 3 7l9 5 9-5-9-5Z`],[`d`,`m3 12 9 5 9-5`],[`d`,`m3 17 9 5 9-5`],[`cx`,`6`,`cy`,`19`,`r`,`3`],[`d`,`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`],[`cx`,`18`,`cy`,`5`,`r`,`3`],[`d`,`M12 22v-5`],[`d`,`M9 8V2`],[`d`,`M15 8V2`],[`d`,`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`],[`cx`,`12`,`cy`,`5`,`rx`,`9`,`ry`,`3`],[`d`,`M3 5v14a9 3 0 0 0 18 0V5`],[`d`,`M3 12a9 3 0 0 0 18 0`],[`x`,`3`,`y`,`4`,`width`,`18`,`height`,`16`,`rx`,`2`],[`d`,`M7 9h10`],[`d`,`M7 13h6`],[`d`,`M7 17h8`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M12 3a14 14 0 0 1 0 18a14 14 0 0 1 0-18Z`],[`d`,`M4 7h10`],[`d`,`M4 17h6`],[`d`,`m14 13 4 4-4 4`],[`d`,`M10 17h8`],[`cx`,`18`,`cy`,`7`,`r`,`3`],[`cx`,`12`,`cy`,`12`,`r`,`3`],[`d`,`M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1Z`],[`cx`,`11`,`cy`,`5`,`rx`,`8`,`ry`,`3`],[`d`,`M3 5v6c0 1.66 3.58 3 8 3`],[`d`,`M3 11v6c0 1.66 3.58 3 8 3`],[`d`,`M21 14a4 4 0 1 1-1.2-2.85L21 12.3`],[`d`,`M21 9v3.3h-3.3`],[`d`,`M12 7v6`],[`d`,`M12 16.5v.01`]],template:function(e,t){if(e&1&&(E(),z(0,`svg`,0),j(1,vE,4,0)(2,yE,4,0)(3,bE,2,0)(4,xE,3,0)(5,SE,3,0)(6,CE,1,0,`:svg:path`,1)(7,wE,4,0)(8,TE,3,0)(9,EE,4,0)(10,DE,3,0)(11,OE,5,0)(12,kE,2,0)(13,AE,5,0)(14,jE,3,0)(15,ME,1,0,`:svg:path`,2)(16,NE,1,0,`:svg:path`,3)(17,PE,1,0,`:svg:path`,4),B()),e&2){let e;O(),M((e=t.name())===`dashboard`?1:e===`timeline`?2:e===`audit`?3:e===`components`?4:e===`routes`?5:e===`signals`?6:e===`injectors`?7:e===`store`?8:e===`forms`?9:e===`network`?10:e===`pipes`?11:e===`settings`?12:e===`queries`?13:e===`errors`?14:e===`plugins`?15:e===`analog`?16:e===`capacitor`?17:-1)}},styles:[`[_nghost-%COMP%] { +`))}}g()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await ee(e.body)}catch(e){if(c.signal.aborted){g();return}h(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l){n(Error(`Devframe SSE channel is closed; message dropped`));return}try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[dC]:t},body:e});if(n.status===200){let e=await n.text();e&&u?.(e);return}if(!n.ok)throw Error(`Devframe SSE POST failed: ${n.status}`)}catch(e){n(e instanceof Error?e:Error(String(e)))}},serialize:s.serialize,deserialize:s.deserialize}}function tw(e,t){let{channel:n,rpcOptions:r={}}=t;return wb(e,{...n,timeout:-1,...r,proxify:!1})}function nw(e){let{transport:t,authToken:n,connectionMeta:r,events:i,clientRpc:a,rpcOptions:o={},callTimeout:s=0}=e,c=!1,l=`connecting`,u=null,d=Promise.withResolvers();function f(e,t=null){if(t?u=t:e===`connected`&&(u=null),e===l)return;let n=l;l=e,i.emit(db.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function h(){return l===`disconnected`||l===`error`?new HC(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new HC(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function g(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(db.client.error,e,t),r(e))}};function l(){a=!0,p.delete(c),o&&clearTimeout(o)}p.add(c),s>0&&(o=setTimeout(()=>{c.reject(new HC(`timeout`,`[devframe] RPC call "${t}" timed out after ${s}ms`))},s)),e.then(e=>{a||(l(),n(e))},e=>{if(a)return;l();let n=e instanceof Error?e:Error(String(e));i.emit(db.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let ee=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(db.client.connectionError,e),m(new HC(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new HC(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),te=tw(a.functions,{channel:ee,rpcOptions:o});a.register({name:db.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new HC(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(db.client.connectionError,e),m(e),i.emit(db.client.isTrustedUpdated,!1)}});let ne=n;async function re(e){ne=e;let t=await te.$call(`anonymous:devframe:auth`,{authToken:e,ua:navigator.userAgent,origin:location.origin});if(c=t.isTrusted,c)d.resolve(!0),f(`connected`);else{let e=new HC(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(db.client.connectionError,e)}return i.emit(db.client.isTrustedUpdated,c),t.isTrusted}async function ie(e){let t=(await te.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(ne=t,c=!0,d.resolve(!0),f(`connected`),i.emit(db.client.isTrustedUpdated,!0)),t}async function ae(e={}){await te.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function oe(){return c?!0:re(ne??``)}async function se(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t;try{return await Promise.race([d.promise,new Promise((n,r)=>{t=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e)})]),c}finally{clearTimeout(t)}}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:oe,requestTrustWithToken:re,requestTrustWithCode:ie,requestAuthCode:ae,ensureTrusted:se,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(db.client.error,n,t),Promise.reject(n)):g(te.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(db.client.error,t,String(e[0]));return}return te.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(db.client.error,n,t),Promise.reject(n)):g(te.$callOptional(...e),t)},close:()=>{ee.close()}}}function rw(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})();if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`;return new URL(e.path??`/`,`${r.protocol}//${t}`).href}return new URL(e.path??``,r).href}let i=e??``;return/^https?:\/\//i.test(i)?i:new URL(i,r).href}function iw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=rw(n.sse,r??`./`,location);return nw({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>ew({url:l,authToken:t,definitions:e.definitions,...s,onConnected(){s.onConnected?.()},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(){e.onDisconnected(),s.onDisconnected?.()}})})}function aw(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:ow(r)?aw(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function ow(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function sw(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function cw(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function lw(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function uw(e){if(e.error)throw aw(e.error);return e.output}function dw(e){return e.some(e=>e!=null)}function fw(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function pw(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?YS(e):e}function a(e,t){return i(fw(e),t)}async function o(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>a(t,e.serialization)));let r=await n.get(e.path);return lw(r)?uw(r):r}async function s(e,n){return r.has(e)||r.set(e,t(e).then(e=>a(e,n))),await r.get(e)}async function c(t,n){if(!(t in e))throw Error(`[devframe-rpc] Function "${t}" not found in dump store`);let r=e[t];if(sw(r)){if(dw(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(cw(r)){let e=Wb(n),i=r.records[e];if(i)return uw(await s(i,r.serialization));if(r.fallback)return uw(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!dw(n))return r;throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}return{call:async(e,t)=>await c(e,t),callOptional:async(t,n)=>{if(t in e)return await c(t,n)},callEvent:async(e,t)=>{}}}async function mw(e){let t=pw(await e.fetchJsonFromBases(fC),e.fetchJsonFromBases);return{transport:`static`,isTrusted:!0,status:`connected`,connectionError:null,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,requestAuthCode:async()=>{},ensureTrusted:async()=>!0,call:(...e)=>t.call(e[0],e.slice(1)),callEvent:(...e)=>t.callEvent(e[0],e.slice(1)),callOptional:(...e)=>t.callOptional(e[0],e.slice(1)),close:()=>{}}}var hw=``;function gw(e,t){return`${e}${hw}${t}`}function _w(e){let t=new Map,n=new Map;e.client.register({name:db.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(gw(e,n))?._push(r,i)}}),e.client.register({name:db.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=gw(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:db.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=gw(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(db.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(hw);if(t<0)continue;let i=n.slice(0,t),a=n.slice(t+1);e.callEvent(`devframe:streaming:subscribe`,i,a,{afterSeq:r.lastSeenSeq})}});function r(n,r,i={}){let a=gw(n,r),o=t.get(a);if(o)return o;let s=tC({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(db.client.isTrustedUpdated,o=>{o&&(i(),t.has(a)&&!s.cancelled&&!s.done&&e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:s.lastSeenSeq}))})}return s}function i(t,r){let i=gw(t,r),a=n.get(i);if(a)return a;let o=eC({id:r});return o.events.on(`chunk`,(n,i)=>{e.callEvent(`devframe:streaming:upload-chunk`,t,r,n,i)}),o.events.on(`end`,a=>{e.callEvent(`devframe:streaming:upload-end`,t,r,a),n.delete(i)}),n.set(i,o),o}return{subscribe:r,upload:i}}function vw(){}var yw=new Map;function bw(e){let t=e.url;e.authToken&&(t=`${t}?${hC}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=vw,onError:i=vw,onDisconnected:a=vw,definitions:o=yw}=e;n.addEventListener(`open`,e=>{r(e)}),n.addEventListener(`error`,e=>{let t=e instanceof Error?e:Error(e.type);i(t)}),n.addEventListener(`close`,e=>{a(e)});let s=XC(o);return{close:()=>{n.close()},on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN){n.send(e);return}if(n.readyState===WebSocket.CONNECTING){let t=()=>{i(),n.readyState===WebSocket.OPEN&&n.send(e)},r=()=>i();function i(){n.removeEventListener(`open`,t),n.removeEventListener(`close`,r)}n.addEventListener(`open`,t),n.addEventListener(`close`,r);return}i(Error(`Devframe WebSocket is not open; message dropped`))},serialize:s.serialize,deserialize:s.deserialize}}function xw(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})(),i=r.protocol===`https:`?`wss:`:`ws:`;if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`,n=new URL(e.path??`/`,`${i}//${t}`);return n.protocol=i,n.href}let t=new URL(e.path??``,r);return t.protocol=i,t.href}if(typeof e==`number`)return`${i}//${r.hostname}:${e}`;let a=e??``;if(/^wss?:\/\//i.test(a))return a;if(/^https?:\/\//i.test(a))return Zb(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function Sw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=xw(n.websocket,r??`./`,location);return nw({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>bw({url:l,authToken:t,definitions:e.definitions,...s,onConnected(e){s.onConnected?.(e)},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(t){e.onDisconnected(),s.onDisconnected?.(t)}})})}function Cw(e){return e.includes(`:`)}function ww(e,t){return Cw(t)?t:`${e}:${t}`}function Tw(e){return{async get(t){return(await e()).value()?.[t]},async set(t,n){(await e()).mutate(e=>{if(e===void 0)return{[t]:n};e[t]=n})},async delete(t){(await e()).mutate(e=>{e!==void 0&&delete e[t]})},async all(){return(await e()).value()??{}},async onChange(t){return(await e()).on(`updated`,e=>t(e??{}))}}}function Ew(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=(async()=>(await e.ensureTrusted(),e.sharedState.get(r)))().catch(e=>{throw i=void 0,e}),i}return Tw(a)}function Dw(e,t){return{global:Ew(e,t,`global`),project:Ew(e,t,`project`)}}function Ow(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(Cw(n.name))throw Error(`[devframe] Scoped client RPC registration for namespace "${t}" received an already-namespaced function name "${n.name}". Pass a bare name without a ":" separator.`);e.client.register({...n,name:`${t}:${n.name}`})},call:((n,...r)=>e.call(ww(t,n),...r)),callEvent:((n,...r)=>e.callEvent(ww(t,n),...r)),callOptional:((n,...r)=>e.callOptional(ww(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(ww(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(ww(t,n),r,i),upload:(n,r)=>e.streaming.upload(ww(t,n),r)}},settings:Dw(e,t),scope:e.scope}}function kw(){if(typeof document<`u`){let e=document.modelContext;if(e)return e}if(typeof navigator<`u`){let e=navigator.modelContext;if(e)return e}}function Aw(e,t={}){let n=t.modelContext??kw();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=iC(t.name),s=a.get(o);if(s&&s!==t.name){console.warn(`[devframe] WebMCP tool name "${o}" (from "${t.name}") collides with "${s}"; keeping the first registration.`);return}let c=new AbortController,l=Tb(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Ob(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>jw(t,e.context,n)},{signal:c.signal});u&&`then`in u&&u.then(()=>{},()=>{}),a.set(o,t.name),i.set(t.name,()=>{c.abort(),u&&`unregister`in u&&typeof u.unregister==`function`&&u.unregister(),a.delete(o)})}function s(t){let n=t?[t]:[...e.definitions.keys()];for(let t of n){i.get(t)?.(),i.delete(t);let n=e.definitions.get(t),r=n?.agent;n&&r&&o(n,r)}}s();let c=e.onChanged(e=>s(e));return()=>{c();for(let e of i.values())e();i.clear()}}async function jw(e,t,n){try{let r=Ab(n,e.args?.length);return{content:[{type:`text`,text:Mw(await(await wC(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:Nw(e)}]}}}function Mw(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function Nw(e){if(!(e instanceof Error))return String(e);let t=e.cause instanceof Error?` (cause: ${e.cause.message})`:``;return`${e.name}: ${e.message}${t}`}function Pw(e,t){if(t.backend===`static`)return`static`;let n=t.websocket!==void 0,r=t.sse!==void 0;if(e===`websocket`){if(!n)throw Error(`[devframe] transport: 'websocket' was requested, but this server does not advertise a WebSocket endpoint`);return`websocket`}if(e===`sse`){if(!r)throw Error(`[devframe] transport: 'sse' was requested, but this server does not advertise an SSE endpoint`);return`sse`}if(t.backend===`sse`&&r)return`sse`;if(n)return`websocket`;if(r)return`sse`;throw Error(`[devframe] This server advertises no RPC transport (backend "none"), so there is nothing to connect to. Enable the WebSocket or SSE endpoint on the server, or use its static/MCP surfaces instead.`)}async function Fw(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Gb(),a=Array.isArray(t)?t:[t],o=await VC(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new gC({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new TC(f),m=e.webmcp===!1?void 0:Aw(p),h,g=!1,_=0,ee;function te(){_++,ee=void 0,d.clear(),r===!0&&d.updateOptions({functions:[]})}r&&(p.register({name:db.broadcast.cacheInvalidate,type:`event`,handler:te}),i.on(db.client.connectionStatus,te),i.on(db.client.isTrustedUpdated,te));async function ne(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(Xb(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let re=e.callTimeout??0,ie=re>0?re:1/0,ae,oe={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){let a=performance.now()+ie;if(await n.onRequest?.call(this,e,t,i),r===!0&&e.i&&ae.isTrusted&&!e.m.startsWith(`anonymous:`)&&e.m!==`devframe:rpc:cacheable-functions`){function t(){if(performance.now()>=a)throw new HC(`timeout`,`[devframe] RPC call "${e.m}" timed out after ${re}ms`)}for(;!ee&&(t(),!(g||ae.status!==`connected`));){let e=_;ee=ae.callOptional(`devframe:rpc:cacheable-functions`).then(t=>{e===_&&d.updateOptions({functions:t??[]})}).catch(t=>{throw e===_&&(ee=void 0),t}),await ee}await ee,t()}let o=_;if(r&&e.i&&!g&&ae.isTrusted&&d.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);o===_&&!g&&d.apply(e,n)}else await t(e)}}},se=Pw(e.transport??`auto`,s);ae=se===`static`?await mw({fetchJsonFromBases:ne}):se===`sse`?iw({...oe,sseOptions:e.sseOptions}):Sw({...oe,wsOptions:e.wsOptions});let ce;try{ce=new BroadcastChannel(`devframe-auth`)}catch{}let le,ue=!1;function de(e){return((...t)=>ue||!le?e(...t):le.then(()=>e(...t)))}function fe(){g=!0,te();try{h?.(),m?.()}finally{try{ce?.close()}finally{ae.close?.()}}}let pe={events:i,get isTrusted(){return ae.isTrusted},get status(){return ae.status},get connectionError(){return ae.connectionError},get transport(){return ae.transport??se},get connection(){return o},connectionMeta:s,ensureTrusted:ae.ensureTrusted,requestTrust:ae.requestTrust,requestTrustWithToken:async e=>(LC(e),o={...o,authToken:e},ae.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await ae.requestTrustWithCode(e);if(!t)return!1;LC(t),o={...o,authToken:t};try{ce?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>ae.requestAuthCode(e),call:de(ae.call),callEvent:de(ae.callEvent),callOptional:de(ae.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:fe};pe.sharedState=JC(pe),pe.streaming=_w(pe),pe.services=qC(pe);let me=new Map;pe.scope=(e=>{if(!e)return pe;let t=me.get(e);return t||(t=Ow(pe,e),me.set(e,t)),t}),f.rpc=pe;function he(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function ge(){if(e.simpleAuth!==!1&&he()&&typeof globalThis.prompt==`function`)for(await pe.requestAuthCode().catch(()=>{});!pe.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await pe.requestTrustWithCode(t))return}}async function _e(){let t=await ae.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await KC(pe,{param:n}):!1;t||r||pe.isTrusted||await ge()}return le=_e().then(()=>{ue=!0},()=>{ue=!0}),s.mcp&&cC(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-KH4HHvHf-yqPCd0Qs.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(pe))}).catch(()=>{}),ce&&(ce.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&pe.requestTrustWithToken(e.data.authToken)}),pe}var Iw=Fw,Lw=[`components`,`injectors`,`signals`,`ngrx`,`tanstackQuery`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`,`errors`,`plugins`],Rw=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function zw(e){return`pangular:${e}`}var Bw=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`,`tanstackQuery`,`plugins`],Vw={refreshMs:{default:3e3,min:500,max:8e3},navigations:{default:50,min:5,max:500},formTimeline:{default:200,min:10,max:2e3},httpCalls:{default:200,min:10,max:2e3},changeLog:{default:200,min:10,max:2e3},cdCycles:{default:200,min:10,max:2e3},capacitorCalls:{default:200,min:10,max:2e3},idleAfterMs:{default:6e4,min:0,max:6e5}},Hw={"opted-out":`the request sets transferCache: false`,post:`POST requests are left out unless includePostRequests is set`,method:`only GET, HEAD and POST requests are cached`,"auth-headers":`it sends an Authorization, Proxy-Authorization or Cookie header`,credentials:`it sends credentials (withCredentials or credentials: include/same-origin)`,"no-cache-request":`the request asks for no-store, no-cache or private`,"no-cache-response":`the response has Cache-Control no-store, no-cache or private`,"set-cookie":`the response sets a cookie`,error:`failed responses are not stored`,mocked:`a fault rule answered before the transfer cache ran`,"cache-off-or-filter":`the transfer cache is off, or its filter (or another withHttpTransferCacheOptions setting) left it out`},Uw=[[0,`Network error (offline)`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Content Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Content`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[499,`Client Closed Request`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[510,`Not Extended`],[511,`Network Authentication Required`],[520,`Web Server Returned an Unknown Error`],[521,`Web Server Is Down`],[522,`Connection Timed Out`],[523,`Origin Is Unreachable`],[524,`A Timeout Occurred`]];function Ww(e){return Uw.some(([t])=>t===e)}var Gw=/^[a-z][a-z0-9-]{0,39}$/;function Kw(e,t){let n=t.plugins?.[e],r=t.inspectors.plugins&&Gw.test(e)&&(n?.enabled??!0);return{enabled:r,tools:r&&t.agent.tools.plugins&&(n?.tools??!0),actions:r&&t.actions.plugins&&(n?.actions??!0)}}var qw=`pangular`,Jw={mod:`Mod`,ctrl:`Ctrl`,control:`Ctrl`,meta:`Meta`,cmd:`Meta`,command:`Meta`,alt:`Alt`,option:`Alt`,opt:`Alt`,shift:`Shift`},Yw=[`Mod`,`Ctrl`,`Meta`,`Alt`,`Shift`];function Xw(e){if(typeof e!=`string`||e.length>40)return;let t=e.split(`+`).map(e=>e.trim());if(t.some(e=>!e))return;let n=new Set,r;for(let e of t){let t=Jw[e.toLowerCase()];if(t){if(n.has(t))return;n.add(t);continue}if(r!==void 0)return;if(/^[a-z0-9]$/i.test(e))r=e.toUpperCase();else if(/^f([1-9]|1[0-2])$/i.test(e))r=e.toUpperCase();else return}if(r&&[...n].some(e=>e!==`Shift`)&&!(n.has(`Mod`)&&(n.has(`Ctrl`)||n.has(`Meta`))))return[...Yw.filter(e=>n.has(e)),r].join(`+`)}function Zw(e,t,n){let r=t.split(`+`),i=r.pop(),a=new Set(r),o=a.has(`Ctrl`)||a.has(`Mod`)&&!n,s=a.has(`Meta`)||a.has(`Mod`)&&n;if(e.ctrlKey!==o||e.metaKey!==s||e.altKey!==a.has(`Alt`)||e.shiftKey!==a.has(`Shift`))return!1;if(/^F\d+$/.test(i))return e.key.toUpperCase()===i;let c=/^\d$/.test(i)?`Digit${i}`:`Key${i}`;return e.code?e.code===c:e.key.toUpperCase()===i}function Qw(e,t){if(!t)return e.replace(/^Mod\b/,`Ctrl`);let n={Mod:`⌘`,Meta:`⌘`,Ctrl:`⌃`,Alt:`⌥`,Shift:`⇧`};return e.split(`+`).map(e=>n[e]??e).join(``)}var $w=[{id:`dashboard`,label:`Dashboard`},{id:`timeline`,label:`Timeline`},{id:`audit`,label:`Audit`},{id:`analog`,label:`Analog`,inspector:`analog`},{id:`components`,label:`Components`,inspector:`components`},{id:`routes`,label:`Routes`,inspector:`router`},{id:`signals`,label:`Signals`,inspector:`signals`},{id:`injectors`,label:`Injectors`,inspector:`injectors`},{id:`store`,label:`Store`,inspector:`ngrx`},{id:`queries`,label:`Queries`,inspector:`tanstackQuery`},{id:`forms`,label:`Forms`,inspector:`forms`},{id:`pipes`,label:`Pipes`,inspector:`pipes`},{id:`network`,label:`SSR & HTTP`,inspector:`http`},{id:`errors`,label:`Errors`,inspector:`errors`},{id:`capacitor`,label:`Capacitor`,inspector:`capacitor`},{id:`plugins`,label:`Plugins`,inspector:`plugins`}],eT=1e4;function tT(e){return $w.filter(t=>!(`inspector`in t)||e.inspectors[t.inspector])}var nT={components:`a component instance, by its id in the component tree`,injectors:`a component's element injector, by the component's id`,forms:`a form, by its id`},rT=200;function iT(e){let t=new URLSearchParams({tab:e.tab});return e.id&&t.set(`id`,e.id),e.page&&t.set(`page`,e.page),`#${t.toString()}`}function aT(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=e=>{let n=t.get(e)?.trim();return n&&n.length<=rT?n:void 0},r=n(`tab`);if(!r)return null;let i=n(`id`),a=n(`page`);return{tab:r,...i?{id:i}:{},...a?{page:a}:{}}}var oT=[{id:`settings`,title:`Open settings`,group:`Go to`,keywords:`preferences tabs`},{id:`pick-component`,title:`Pick component on page`,group:`Actions`,keywords:`select inspect element`,inspector:`components`},{id:`cd-record-start`,title:`Start recording change detection`,group:`Actions`,keywords:`profiler cycles`,inspector:`components`},{id:`cd-record-stop`,title:`Stop recording change detection`,group:`Actions`,keywords:`profiler cycles`,inspector:`components`},{id:`cd-clear`,title:`Clear change detection recording`,group:`Actions`,keywords:`reset recordings cycles`,inspector:`components`},{id:`theme:system`,title:`Theme: follow the system`,group:`Theme`,keywords:`auto`},{id:`theme:light`,title:`Theme: light`,group:`Theme`},{id:`theme:dark`,title:`Theme: dark`,group:`Theme`},{id:`dock:float`,title:`Popup: float`,group:`Popup`,keywords:`dock`,popupOnly:!0},{id:`dock:bottom`,title:`Popup: dock to the bottom`,group:`Popup`,keywords:`dock`,popupOnly:!0},{id:`dock:right`,title:`Popup: dock to the right`,group:`Popup`,keywords:`dock`,popupOnly:!0},{id:`dock:reset-size`,title:`Popup: reset the docked size`,group:`Popup`,keywords:`splitter resize height width`,popupOnly:!0},{id:`popout`,title:`Popup: open in its own window`,group:`Popup`,keywords:`pop out detach new window`,popupOnly:!0},{id:`popout:return`,title:`Popup: back into the page`,group:`Popup`,keywords:`pop in attach dock window`,popupOnly:!0}];function sT(e){let t=tT(e).map(e=>({id:`tab:${e.id}`,title:`Go to ${e.label}`,group:`Go to`,keywords:`tab open`})),n=oT.filter(t=>!t.inspector||e.inspectors[t.inspector]).map(({inspector:e,...t})=>t);return[...t,...n]}function cT(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function lT(e,t){return typeof e==`boolean`?e:t}var uT=100,dT=100;function fT(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=dT);return[...new Set(t)].slice(0,uT)}function pT(e,t){let{default:n,min:r,max:i}=Vw[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function mT(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function hT(e){let t=cT(e),n=cT(t.agent),r=cT(t.inspectors),i=cT(n.tools),a=cT(t.actions),o=lT(t.actions,!0),s=cT(t.redaction),c=cT(t.limits),l=mT(Lw,e=>lT(r[e],!0));return{inspectors:l,agent:{readOnly:lT(n.readOnly,!1),tools:mT(Lw,e=>l[e]&&lT(i[e],!0)),browserTools:lT(n.browserTools,!1)},actions:mT(Bw,e=>l[e]&&lT(a[e],o)),redaction:{secretNames:fT(s.secretNames),unmask:fT(s.unmask)},limits:Object.fromEntries(Object.keys(Vw).map(e=>[e,pT(c[e],e)])),popup:{hotkey:bT(cT(t.popup).hotkey)},plugins:yT(t.plugins),lint:{rules:_T(t.lint)}}}var gT=200;function _T(e){let t=cT(cT(e).rules),n={};for(let[e,r]of Object.entries(t).slice(0,gT))typeof r==`boolean`&&(n[e]=r);return n}var vT=100;function yT(e){let t={};for(let[n,r]of Object.entries(cT(e)).slice(0,vT)){if(!Gw.test(n))continue;if(typeof r==`boolean`){t[n]={enabled:r,tools:!0,actions:!0};continue}let e=cT(r);r!==void 0&&Object.keys(e).length&&(t[n]={enabled:lT(e.enabled,!0),tools:lT(e.tools,!0),actions:lT(e.actions,!0)})}return t}function bT(e){return e===!1?!1:Xw(e)??`Alt+Shift+P`}function xT(e){let t=e?.configs;return hT(t?.[qw])}function ST(e){return`${{forms:`Writing to forms`,router:`Navigating and clearing navigations`,ngrx:`Restoring NgRx state and dispatching actions`,http:`Changing HTTP mock rules and SSR overrides, and clearing HTTP calls`,analog:`Calling API routes and clearing server calls`,components:`Editing component properties and signals`,tanstackQuery:`Invalidating and refetching TanStack queries`,plugins:`Running plugin actions`}[e]} is turned off in the devtools config (actions.${e}).`}var CT=[`pangular:build-meta`],wT={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,tanstackQuery:`TanStack Query`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`,capacitor:`Capacitor`,errors:`Errors`,plugins:`Plugins`},TT={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore and dispatch`,http:`HTTP mocking`,analog:`Analog API calls`,components:`Component edits`,tanstackQuery:`TanStack Query invalidate and refetch`,plugins:`Plugin actions`},ET={refreshMs:e=>`poll every ${e} ms`,navigations:e=>`${e} navigations`,formTimeline:e=>`${e} form events`,httpCalls:e=>`${e} HTTP calls`,changeLog:e=>`${e} NgRx changes`,cdCycles:e=>`${e} change detection cycles`,capacitorCalls:e=>`${e} Capacitor plugin calls`,idleAfterMs:e=>e?`idle ${e/1e3} s after the last agent call`:`never idle`};function DT(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=Lw.filter(t=>e.inspectors[t]);n(`Inspectors off`,Lw.filter(t=>!e.inspectors[t]).map(e=>wT[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>wT[e])),n(`Blocked actions`,Bw.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>TT[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Limits`,Object.keys(Vw).filter(t=>e.limits[t]!==Vw[t].default).map(t=>ET[t](e.limits[t]))),e.popup.hotkey!==`Alt+Shift+P`&&n(`Popup shortcut`,[e.popup.hotkey===!1?`Off`:e.popup.hotkey]);let i=Object.entries(e.plugins??{});return n(`Plugins off`,i.filter(([,e])=>!e.enabled).map(([e])=>e)),n(`Plugin tools or actions off`,i.filter(([,e])=>e.enabled&&(!e.tools||!e.actions)).map(([e,t])=>`${e} (${[!t.tools&&`tools`,!t.actions&&`actions`].filter(Boolean).join(`, `)})`)),n(`Lint rules off`,Object.entries(e.lint?.rules??{}).filter(([,e])=>!e).map(([e])=>e)),t}function OT(e){let t={tags:[],directives:[],text:``},n=e.toLowerCase();return n=n.replace(/<\s*([^<>\s]+)\s*>/g,(e,n)=>(t.tags.push({value:n,exact:!0}),` `)),n=n.replace(/\[\s*([^[\]\s]+)\s*\]/g,(e,n)=>(t.directives.push({value:n,exact:!0}),` `)),n=n.replace(/(^|\s)([<[])([^<>[\]\s]*)$/,(e,n,r,i)=>(i&&(r===`<`?t.tags:t.directives).push({value:i,exact:!1}),n)),t.text=n.replace(/\s+/g,` `).trim(),t}function kT(e){return!e.tags.length&&!e.directives.length&&!e.text}function AT(e,t){let n=e.tag.toLowerCase(),r=(e.directives??[]).map(e=>e.toLowerCase()),i=(e.attributes??[]).map(e=>e.toLowerCase()),a=[...r,...r.map(e=>e.replace(/directive$/,``)),...i];for(let{value:e,exact:r}of t.tags)if(r?n!==e:!n.startsWith(e))return!1;for(let{value:e,exact:n}of t.directives)if(!a.some(t=>n?t===e:t.includes(e)))return!1;if(t.text){let a=t.text;if(!(e.name.toLowerCase().includes(a)||n.includes(a)||r.some(e=>e.includes(a))||i.some(e=>e.includes(a))))return!1}return!0}var jT={debugApi:{subject:`Live data`,since:`12.0`},injectorProviders:{subject:`Reading providers and environment injectors`,since:`16.2`},injectorMetadata:{subject:`The full injector tree`,since:`17.0`},isSignal:{subject:`Telling signals apart in component values`,since:`17.1`},signalGraph:{subject:`The live signal graph`,since:`20.1`},deferBlocks:{subject:`Listing @defer blocks`,since:`19.1`},forBlocks:{subject:`Listing @for blocks`,since:`22.0`},profiler:{subject:`Recording change detection`,since:`20.0`},angularProfiling:{subject:`Angular profiling`,since:`20.0`},routerInstance:{subject:`The router debug util`,since:`20.3`}};function MT(e){let t=/^(\d+)\.(\d+)/.exec(e.trim());return t?`${t[1]}.${t[2]}`:e.trim()}function NT(e){let t=/^(\d+)(?:\.(\d+))?/.exec(e.trim());return t?[Number(t[1]),Number(t[2]??0)]:null}function PT(e,t){let n=NT(e),r=NT(t);return!n||!r?!1:n[0]===r[0]?n[1]>=r[1]:n[0]>r[0]}function FT(e,t){return e?.capabilities?.[t]===!1}function IT(e,t){let n=jT[e],r=`${n.subject} needs Angular ${n.since} or later`;if(!t)return`${r}; this page's Angular version is unknown.`;let i=MT(t);return PT(t,n.since)?`${r} in a development build; this page runs Angular ${i} without it, which usually means a production build.`:`${r}; this page runs Angular ${i}.`}var LT=/^on (viewport|interaction|hover)\b/;function RT(e){let t=e.filter(e=>!/^(prefetch|hydrate) /.test(e));return t.length>0&&t.every(e=>LT.test(e))}function zT(e,t){let n=[],r=e.since>0?Math.max(0,Math.round((t-e.since)/1e3)):0;return e.state===`error`&&n.push({kind:`failed`,text:`failed to load`,label:`failed`}),(e.state===`placeholder`||e.state===`initial`)&&r*1e3>=1e4&&n.push(RT(e.triggers)?{kind:`waiting`,text:`waiting for its trigger for ${r}s`,label:`waiting ${r}s`,seconds:r}:{kind:`stuck`,text:`on its placeholder for ${r}s`,label:`stuck ${r}s`,seconds:r}),e.hydrateNever?n.push({kind:`hydrate-never`,text:`hydrate never: the server HTML stays static`,label:`hydrate never`}):e.hydration===`dehydrated`&&n.push({kind:`dehydrated`,text:`still dehydrated`,label:`dehydrated`}),n}var BT=`pangular-page-id`,VT=null;function HT(e){VT=e}function UT(){if(VT)return VT;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(BT)||null)}catch{return null}}function WT(e,t){if(t.chosen&&e[t.chosen])return t.chosen;if(t.host)return t.host;if(t.previous&&e[t.previous])return t.previous;let n=null;for(let t of Object.values(e))(!n||t.reportedAt>n.reportedAt)&&(n=t);return n?.pageId??null}function GT(e,t){return e?t?e.pages?.[t]??null:e:null}function KT(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function qT(){return{functions:[...CT]}}function JT(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function YT(e,t,n){return JT(e,t,n).then(e=>e,()=>null)}function XT(e){return e?.connectionMeta.backend===`static`}function ZT(e){let t=()=>{let t=e()?.scope(`pangular`).rpc;t&&(t.callEvent(`request-page-highlight`,null),t.callEvent(`request-form-highlight`,null))};return addEventListener(`pagehide`,t),()=>{removeEventListener(`pagehide`,t),t()}}function QT(e=globalThis){delete e.__DEVFRAME_CONNECTION__,delete e.__DEVFRAME_CONNECTION_META__}function $T(e){return e.split(`@`)[1]??``}var eE={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},tE={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},nE=YT,rE={key:`name looks secret`,"input-type":`password input`,autocomplete:`autocomplete is a secret kind`,marker:`marked as mask`,parent:`inside a secret group`,config:`listed in mask`};function iE(e){return rE[e]??e}var aE=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function oE(e,t){return await nE(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function sE(e){return`${e.ok?e.message??`Done.`:e.error??`Failed.`}${e.skipped?.length?` Skipped: ${e.skipped.map(e=>`${e.path} (${e.reason})`).join(`, `)}.`:``}${e.status?` Status: ${e.status}.`:``}`}var cE=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function lE(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(cE,(e,t)=>t??(e===`**`?``:e))}function uE(e){return xT(e?.connectionMeta)}function dE(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)?[...e]:void 0}function fE(e,t){if(!t||typeof t!=`object`)return e;let n=dE(t.secretNames),r=dE(t.unmask);return!n||!r?e:{...e,redaction:{secretNames:n,unmask:r}}}function pE(e,t){return uE(e).actions[t]}var mE={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,queries:`tanstackQuery`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`,capacitor:`capacitor`,errors:`errors`,plugins:`plugins`};function hE(e){return mE[e]}var gE=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function _E(e,t){let n=mE[e];return!n||t.inspectors[n]}function vE(e,t){e&1&&(E(),Dg(0,`rect`,5)(1,`rect`,6)(2,`rect`,7)(3,`rect`,8))}function yE(e,t){e&1&&(E(),Dg(0,`path`,9)(1,`circle`,10)(2,`circle`,11)(3,`path`,12))}function bE(e,t){e&1&&(E(),Dg(0,`path`,13)(1,`path`,14))}function xE(e,t){e&1&&(E(),Dg(0,`path`,15)(1,`path`,16)(2,`path`,17))}function SE(e,t){e&1&&(E(),Dg(0,`circle`,18)(1,`path`,19)(2,`circle`,20))}function CE(e,t){e&1&&(E(),Dg(0,`path`,1))}function wE(e,t){e&1&&(E(),Dg(0,`path`,21)(1,`path`,22)(2,`path`,23)(3,`path`,24))}function TE(e,t){e&1&&(E(),Dg(0,`ellipse`,25)(1,`path`,26)(2,`path`,27))}function EE(e,t){e&1&&(E(),Dg(0,`rect`,28)(1,`path`,29)(2,`path`,30)(3,`path`,31))}function DE(e,t){e&1&&(E(),Dg(0,`circle`,32)(1,`path`,9)(2,`path`,33))}function OE(e,t){e&1&&(E(),Dg(0,`path`,34)(1,`path`,35)(2,`path`,36)(3,`path`,37)(4,`circle`,38))}function kE(e,t){e&1&&(E(),Dg(0,`circle`,39)(1,`path`,40))}function AE(e,t){e&1&&(E(),Dg(0,`ellipse`,41)(1,`path`,42)(2,`path`,43)(3,`path`,44)(4,`path`,45))}function jE(e,t){e&1&&(E(),Dg(0,`circle`,32)(1,`path`,46)(2,`path`,47))}function ME(e,t){e&1&&(E(),Dg(0,`path`,2))}function NE(e,t){e&1&&(E(),Dg(0,`path`,3))}function PE(e,t){e&1&&(E(),Dg(0,`path`,4))}var FE=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:18,vars:1,consts:[[`viewBox`,`0 0 24 24`,`width`,`16`,`height`,`16`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`1.8`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`,`aria-hidden`,`true`],[`d`,`M22 12h-4l-3 9L9 3l-3 9H2`],[`d`,`M10 3h4v3a2 2 0 1 0 4 0V5h1a2 2 0 0 1 2 2v4h-2a2 2 0 1 0 0 4h2v4a2 2 0 0 1-2 2h-4v-2a2 2 0 1 0-4 0v2H7a2 2 0 0 1-2-2v-4H4a2 2 0 1 1 0-4h1V7a2 2 0 0 1 2-2h3Z`],[`d`,`m8 3 4 8 5-5 5 15H2L8 3z`],[`fill`,`currentColor`,`stroke`,`none`,`transform`,`translate(1.8 1.8) scale(0.85)`,`d`,`M24 3.7l-5.766 5.766 5.725 5.736-3.713 3.712L5.073 3.742 8.786.03l5.736 5.726L20.284 0 24 3.7zM.029 8.785l3.713-3.713 15.173 15.173-3.713 3.714-5.732-5.726L3.7 24 0 20.285l5.754-5.764L.029 8.785z`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`x`,`14`,`y`,`12`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`3`,`y`,`16`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`d`,`M3 12h18`],[`cx`,`7`,`cy`,`12`,`r`,`2`],[`cx`,`14`,`cy`,`12`,`r`,`2`],[`d`,`M18 7v10`],[`d`,`M9 11l2 2 4-4`],[`d`,`M12 3 4 6v6c0 4.5 3.4 8.3 8 9 4.6-.7 8-4.5 8-9V6l-8-3Z`],[`d`,`M12 2 3 7l9 5 9-5-9-5Z`],[`d`,`m3 12 9 5 9-5`],[`d`,`m3 17 9 5 9-5`],[`cx`,`6`,`cy`,`19`,`r`,`3`],[`d`,`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`],[`cx`,`18`,`cy`,`5`,`r`,`3`],[`d`,`M12 22v-5`],[`d`,`M9 8V2`],[`d`,`M15 8V2`],[`d`,`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`],[`cx`,`12`,`cy`,`5`,`rx`,`9`,`ry`,`3`],[`d`,`M3 5v14a9 3 0 0 0 18 0V5`],[`d`,`M3 12a9 3 0 0 0 18 0`],[`x`,`3`,`y`,`4`,`width`,`18`,`height`,`16`,`rx`,`2`],[`d`,`M7 9h10`],[`d`,`M7 13h6`],[`d`,`M7 17h8`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M12 3a14 14 0 0 1 0 18a14 14 0 0 1 0-18Z`],[`d`,`M4 7h10`],[`d`,`M4 17h6`],[`d`,`m14 13 4 4-4 4`],[`d`,`M10 17h8`],[`cx`,`18`,`cy`,`7`,`r`,`3`],[`cx`,`12`,`cy`,`12`,`r`,`3`],[`d`,`M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1Z`],[`cx`,`11`,`cy`,`5`,`rx`,`8`,`ry`,`3`],[`d`,`M3 5v6c0 1.66 3.58 3 8 3`],[`d`,`M3 11v6c0 1.66 3.58 3 8 3`],[`d`,`M21 14a4 4 0 1 1-1.2-2.85L21 12.3`],[`d`,`M21 9v3.3h-3.3`],[`d`,`M12 7v6`],[`d`,`M12 16.5v.01`]],template:function(e,t){if(e&1&&(E(),z(0,`svg`,0),j(1,vE,4,0)(2,yE,4,0)(3,bE,2,0)(4,xE,3,0)(5,SE,3,0)(6,CE,1,0,`:svg:path`,1)(7,wE,4,0)(8,TE,3,0)(9,EE,4,0)(10,DE,3,0)(11,OE,5,0)(12,kE,2,0)(13,AE,5,0)(14,jE,3,0)(15,ME,1,0,`:svg:path`,2)(16,NE,1,0,`:svg:path`,3)(17,PE,1,0,`:svg:path`,4),B()),e&2){let e;O(),M((e=t.name())===`dashboard`?1:e===`timeline`?2:e===`audit`?3:e===`components`?4:e===`routes`?5:e===`signals`?6:e===`injectors`?7:e===`store`?8:e===`forms`?9:e===`network`?10:e===`pipes`?11:e===`settings`?12:e===`queries`?13:e===`errors`?14:e===`plugins`?15:e===`analog`?16:e===`capacitor`?17:-1)}},styles:[`[_nghost-%COMP%] { display: inline-flex; flex-shrink: 0; -}`]})},IE=(e,t)=>t.tab,LE=(e,t)=>t.label;function RE(e,t){e&1&&K(0),e&2&&J(` `,W().meta()?.projectName,` `)}function zE(e,t){e&1&&K(0,` Project details unavailable `)}function BE(e,t){e&1&&K(0,` Loading… `)}function VE(e,t){e&1&&(K(0,` Run `),I(1,`code`),K(2,`pangular build`),L(),K(3,` again to rebuild the report. `))}function HE(e,t){e&1&&K(0,` Check that the dev server is running. `)}function UE(e,t){if(e&1){let e=V();I(0,`button`,12),H(`click`,function(){return w(e),T(W(2).loadMeta())}),K(1,`Try again`),L()}}function WE(e,t){if(e&1&&(I(0,`p`,10),j(1,VE,4,0)(2,HE,1,0),L(),j(3,UE,2,0,`button`,11)),e&2){let e=W();O(),M(e.staticReport()?1:2),O(2),M(e.staticReport()?-1:3)}}function GE(e,t){e&1&&(I(0,`li`,5)(1,`span`),K(2,`Analog`),L(),K(3),L()),e&2&&(O(3),q(t))}function KE(e,t){e&1&&(I(0,`li`)(1,`span`),K(2,`Change detection`),L(),K(3),L()),e&2&&(O(3),q(t))}function qE(e,t){if(e&1&&(I(0,`span`,19),K(1),L(),I(2,`span`,20),K(3),L()),e&2){let e=W().$implicit,t=W();O(),q(t.cards()[e.tab]?.value),O(2),q(t.cards()[e.tab]?.sub)}}function JE(e,t){e&1&&(I(0,`span`,21),K(1,`–`),L(),I(2,`span`,20),K(3,`Count unavailable`),L())}function YE(e,t){e&1&&(R(0,`span`,22),I(1,`span`,20),K(2,`Counting…`),L())}function XE(e,t){if(e&1){let e=V();I(0,`button`,13),H(`click`,function(){let t=w(e).$implicit;return T(W().navigate.emit(t.tab))}),I(1,`span`,14)(2,`span`,15),R(3,`app-tab-icon`,16),L(),I(4,`span`,17),K(5,`→`),L()(),I(6,`span`,18),K(7),L(),j(8,qE,4,2)(9,JE,4,0)(10,YE,3,0),L()}if(e&2){let e,n=t.$implicit,r=t.$index,i=W().stateOf(n.tab);y_(`animation-delay`,60*r,`ms`),A(`aria-busy`,i===`loading`),O(3),F(`name`,n.tab),O(4),q(n.label),O(),M((e=i)===`ready`?8:e===`error`?9:10)}}function ZE(e,t){e&1&&(I(0,`p`),K(1,`Loading…`),L())}function QE(e,t){if(e&1&&(I(0,`div`)(1,`dt`),K(2),L(),I(3,`dd`),K(4),L()()),e&2){let e=t.$implicit;O(2),q(e.label),O(2),q(e.value)}}function $E(e,t){if(e&1&&(I(0,`dl`),N(1,QE,5,2,`div`,null,LE),L()),e&2){let e=W();O(),P(e.configItems())}}function eD(e,t){e&1&&(I(0,`p`),K(1,`Defaults`),L())}var tD=[{tab:`components`,label:`Components`},{tab:`routes`,label:`Routes`},{tab:`signals`,label:`Signals`},{tab:`injectors`,label:`Injectors`},{tab:`store`,label:`NgRx declarations`},{tab:`pipes`,label:`Pipes`},{tab:`forms`,label:`Forms`},{tab:`network`,label:`SSR & HTTP`}];function nD(e){return tD.filter(t=>_E(t.tab,e))}var rD={zoneless:`Zoneless`,zone:`zone.js`,"zone-unused":`Zoneless, zone.js loaded`};function iD(e){return e&&Object.hasOwn(rD,e)?rD[e]:null}var aD=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),oD={action:[`action`,`actions`],reducer:[`reducer`,`reducers`],effect:[`effect`,`effects`],selector:[`selector`,`selectors`],feature:[`feature`,`features`],"store-setup":[`setup call`,`setup calls`],"signal-store":[`signal store`,`signal stores`],"signal-state":[`signal state`,`signal states`],"signal-method":[`signal method`,`signal methods`]};function sD(e,t,n){return`${e} ${e===1?t:n}`}function cD(e,t){for(let n of e??[])t(n),cD(n.children,t)}function lD(e){if(!e.some(e=>e.kind))return{value:e.length,sub:`discovered in source`};let t=e.filter(e=>e.kind===`directive`).length;return{value:e.length-t,sub:`components · ${sD(t,`directive`,`directives`)}`}}function uD(e){if(!e.some(e=>e.kind))return{value:e.length,sub:`route entries in source`};let t=e.filter(e=>e.kind===`redirect`).length;return{value:new Set(e.filter(e=>e.kind===`page`).map(e=>e.fullPath??e.path??``)).size,sub:`navigable paths · ${sD(t,`redirect`,`redirects`)}`}}function dD(e){let t=new Map;for(let n of e)n.kind&&t.set(n.kind,(t.get(n.kind)??0)+1);if(!t.size)return{value:e.length,sub:`declarations in source`};let n=[...t].sort((e,t)=>t[1]-e[1]).map(([e,t])=>{let[n,r]=oD[e]??[e,e];return sD(t,n,r)});return{value:e.length,sub:n.join(` · `)}}function fD(e,t){let n=e?.forms??[],r=t?n.filter(e=>$T(e.id)===t):n;if(!r.length)return{value:0,sub:`no forms on the page yet`};let i=r.filter(e=>e.root?.status===`INVALID`).length;return{value:r.length,sub:`${r.length===1?`form`:`forms`} · ${i} invalid`}}function pD(e){return e.cancelled||e.status===void 0?!1:e.status===0||e.status>=400}function mD(e,t){let n=e?.pages??[],r=t?n.find(e=>e.pageId===t)??null:n.reduce((e,t)=>!e||t.reportedAt>e.reportedAt?t:e,null),i=t&&!r?[]:e?.serverCalls??[],a=r?.initialUrl,o=[...a?i.filter(e=>!e.pageUrl||e.pageUrl===a):i,...r?.calls??[]];if(!o.length)return{value:0,sub:`no calls recorded yet`};let s=o.filter(pD).length;return{value:o.length,sub:`${o.length===1?`call`:`calls`} · ${s} failed`}}var hD=class e{rpc=$(null);navigate=Cv();staticReport=X(()=>XT(this.rpc()));meta=D(null);redaction=D(null);config=X(()=>fE(uE(this.rpc()),this.redaction()));stats=X(()=>this.rpc()?nD(this.config()):[]);configItems=X(()=>DT(this.config()));metaState=D(`loading`);states=D({});rows=D({});injectorTree=D(null);signalGraph=D(null);formsState=D(null);httpState=D(null);pageId=UT();destroyRef=C(Os);stopLive=[];zone=X(()=>iD(GT(this.injectorTree(),this.pageId)?.zone));liveInjectors=X(()=>{let e=GT(this.injectorTree(),this.pageId);if(!e?.roots?.length)return null;let t=0,n=0,r=e=>{t++,n+=e.providers?.length??0};return cD(e.roots,r),cD(e.environment,r),{injectors:t,providers:n}});liveSignals=X(()=>{let e=KT(this.signalGraph(),this.pageId);return e?.nodes?.length?e.nodes.filter(e=>aD.has(e.kind??``)).length:null});cards=X(()=>{let e=this.rows(),t={};if(e.components&&(t.components=lD(e.components)),e.routes&&(t.routes=uD(e.routes)),e.store&&(t.store=dD(e.store)),e.pipes){let n=e.pipes.filter(e=>e.builtin).length;t.pipes={value:e.pipes.length-n,sub:n?`custom pipes · ${n} built-in in use`:`custom pipes in source`}}let n=this.liveSignals();n===null?e.signals&&(t.signals={value:e.signals.length,sub:`signal declarations in source`}):t.signals={value:n,sub:e.signals?`live on the page · ${e.signals.length} declared in source`:`live on the page`};let r=this.liveInjectors();r?t.injectors={value:r.injectors,sub:`live injectors · ${sD(r.providers,`provider`,`providers`)}`}:e.injectors&&(t.injectors={value:e.injectors.filter(e=>e.type!==`injection`).length,sub:`provider declarations in source`});let i=this.formsState();i&&(t.forms=fD(i,this.pageId));let a=this.httpState();return a&&(t.network=mD(a,this.pageId)),t});loadMeta(e=this.rpc()){e&&(this.metaState.set(`loading`),e.scope(`pangular`).rpc.call(`build-meta`).then(t=>{this.rpc()===e&&(this.meta.set(t),this.metaState.set(`ready`))}).catch(()=>{this.rpc()===e&&this.metaState.set(`error`)}))}loadRedaction(e){this.redaction.set(null),!XT(e)&&JT(e,`redaction-config`).then(t=>{this.rpc()===e&&this.redaction.set(t)}).catch(()=>{})}constructor(){hc(()=>{let e=this.rpc();if(!e)return;let t=e.scope(`pangular`);this.states.set({}),this.rows.set({}),this.formsState.set(null),this.httpState.set(null),this.loadMeta(e),this.loadRedaction(e);let n=uE(e),r=e=>_E(e,n);r(`components`)&&this.load(t.rpc.call(`get-components`),`components`),r(`routes`)&&this.load(t.rpc.call(`get-routes`),`routes`),r(`signals`)&&this.load(t.rpc.call(`get-signals`),`signals`),r(`injectors`)&&this.load(t.rpc.call(`get-providers`),`injectors`),r(`store`)&&this.load(t.rpc.call(`get-ngrx-store`),`store`),r(`pipes`)&&this.load(t.rpc.call(`get-pipes`),`pipes`),this.watchLive(e,n)}),this.destroyRef.onDestroy(()=>this.unwatch())}stateOf(e){return(e===`signals`?this.liveSignals():e===`injectors`?this.liveInjectors():null)===null?this.states()[e]??`loading`:`ready`}load(e,t){let n=e=>this.states.update(n=>({...n,[t]:e}));e.then(e=>{this.rows.update(n=>({...n,[t]:Array.isArray(e)?e:[]})),n(`ready`)}).catch(()=>n(`error`))}async watchLive(e,t){this.unwatch();let n=e.scope(`pangular`).rpc,r=async(t,r,i)=>{let a=e=>i&&this.states.update(t=>({...t,[i]:e}));try{let i=await n.sharedState(t);if(this.destroyRef.destroyed||this.rpc()!==e)return;r(i.value()),a(`ready`),this.stopLive.push(i.on(`updated`,e=>r(e)))}catch{if(this.destroyRef.destroyed||this.rpc()!==e)return;r(null),a(`error`)}};await Promise.all([t.inspectors.injectors&&r(`injector-tree`,e=>this.injectorTree.set(e)),t.inspectors.signals&&r(`signal-graph`,e=>this.signalGraph.set(e)),_E(`forms`,t)&&r(`forms`,e=>this.formsState.set(e??{}),`forms`),_E(`network`,t)&&r(`http`,e=>this.httpState.set(e??{}),`network`)])}unwatch(){for(let e of this.stopLive.splice(0))e()}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:33,vars:14,consts:[[`aria-labelledby`,`project-title`,1,`project`],[1,`project-head`],[1,`eyebrow`],[`id`,`project-title`],[1,`chips`],[1,`analog`],[1,`grid`],[`type`,`button`,1,`stat`,3,`animation-delay`],[`aria-labelledby`,`config-title`,1,`config`],[`id`,`config-title`],[1,`hint`],[`type`,`button`,1,`retry`],[`type`,`button`,1,`retry`,3,`click`],[`type`,`button`,1,`stat`,3,`click`],[1,`top`],[1,`icon`],[3,`name`],[`aria-hidden`,`true`,1,`go`],[1,`label`],[1,`big`],[1,`sub`],[1,`big`,`muted`],[`aria-hidden`,`true`,1,`big`,`skeleton`]],template:function(e,t){if(e&1&&(I(0,`section`,0)(1,`div`,1)(2,`p`,2),K(3,`Project`),L(),I(4,`h2`,3),j(5,RE,1,1)(6,zE,1,0)(7,BE,1,0),L(),j(8,WE,4,2),L(),I(9,`ul`,4)(10,`li`)(11,`span`),K(12,`Angular`),L(),K(13),L(),I(14,`li`)(15,`span`),K(16,`TypeScript`),L(),K(17),L(),I(18,`li`)(19,`span`),K(20,`SSR`),L(),K(21),L(),j(22,GE,4,1,`li`,5),j(23,KE,4,1,`li`),L()(),I(24,`div`,6),N(25,XE,11,6,`button`,7,IE),L(),I(27,`section`,8)(28,`h2`,9),K(29,`Configuration`),L(),j(30,ZE,2,0,`p`)(31,$E,3,0,`dl`)(32,eD,2,0,`p`),L()),e&2){let e,n,r;A(`aria-busy`,t.metaState()===`loading`),O(4),G(`muted`,t.metaState()!==`ready`),O(),M((e=t.metaState())===`ready`?5:e===`error`?6:7),O(3),M(t.metaState()===`error`?8:-1),O(),G(`pending`,t.metaState()===`loading`),O(4),q(t.meta()?.angularVersion??`…`),O(4),q(t.meta()?.typescript??`…`),O(4),q(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),O(),M((n=t.meta()?.analog)?22:-1,n),O(),M((r=t.zone())?23:-1,r),O(2),P(t.stats()),O(2),A(`aria-busy`,!t.rpc()),O(3),M(t.rpc()?t.configItems().length?31:32:30)}},dependencies:[FE],styles:[`[_nghost-%COMP%] { +}`]})},IE=(e,t)=>t.tab,LE=(e,t)=>t.label;function RE(e,t){e&1&&K(0),e&2&&J(` `,W().meta()?.projectName,` `)}function zE(e,t){e&1&&K(0,` Project details unavailable `)}function BE(e,t){e&1&&K(0,` Loading… `)}function VE(e,t){e&1&&(K(0,` Run `),I(1,`code`),K(2,`pangular build`),L(),K(3,` again to rebuild the report. `))}function HE(e,t){e&1&&K(0,` Check that the dev server is running. `)}function UE(e,t){if(e&1){let e=V();I(0,`button`,12),H(`click`,function(){return w(e),T(W(2).loadMeta())}),K(1,`Try again`),L()}}function WE(e,t){if(e&1&&(I(0,`p`,10),j(1,VE,4,0)(2,HE,1,0),L(),j(3,UE,2,0,`button`,11)),e&2){let e=W();O(),M(e.staticReport()?1:2),O(2),M(e.staticReport()?-1:3)}}function GE(e,t){e&1&&(I(0,`li`,5)(1,`span`),K(2,`Analog`),L(),K(3),L()),e&2&&(O(3),q(t))}function KE(e,t){e&1&&(I(0,`li`)(1,`span`),K(2,`Change detection`),L(),K(3),L()),e&2&&(O(3),q(t))}function qE(e,t){if(e&1&&(I(0,`span`,19),K(1),L(),I(2,`span`,20),K(3),L()),e&2){let e=W().$implicit,t=W();O(),q(t.cards()[e.tab]?.value),O(2),q(t.cards()[e.tab]?.sub)}}function JE(e,t){e&1&&(I(0,`span`,21),K(1,`–`),L(),I(2,`span`,20),K(3,`Count unavailable`),L())}function YE(e,t){e&1&&(R(0,`span`,22),I(1,`span`,20),K(2,`Counting…`),L())}function XE(e,t){if(e&1){let e=V();I(0,`button`,13),H(`click`,function(){let t=w(e).$implicit;return T(W().navigate.emit(t.tab))}),I(1,`span`,14)(2,`span`,15),R(3,`app-tab-icon`,16),L(),I(4,`span`,17),K(5,`→`),L()(),I(6,`span`,18),K(7),L(),j(8,qE,4,2)(9,JE,4,0)(10,YE,3,0),L()}if(e&2){let e,n=t.$implicit,r=t.$index,i=W().stateOf(n.tab);v_(`animation-delay`,60*r,`ms`),A(`aria-busy`,i===`loading`),O(3),F(`name`,n.tab),O(4),q(n.label),O(),M((e=i)===`ready`?8:e===`error`?9:10)}}function ZE(e,t){e&1&&(I(0,`p`),K(1,`Loading…`),L())}function QE(e,t){if(e&1&&(I(0,`div`)(1,`dt`),K(2),L(),I(3,`dd`),K(4),L()()),e&2){let e=t.$implicit;O(2),q(e.label),O(2),q(e.value)}}function $E(e,t){if(e&1&&(I(0,`dl`),N(1,QE,5,2,`div`,null,LE),L()),e&2){let e=W();O(),P(e.configItems())}}function eD(e,t){e&1&&(I(0,`p`),K(1,`Defaults`),L())}var tD=[{tab:`components`,label:`Components`},{tab:`routes`,label:`Routes`},{tab:`signals`,label:`Signals`},{tab:`injectors`,label:`Injectors`},{tab:`store`,label:`NgRx declarations`},{tab:`pipes`,label:`Pipes`},{tab:`forms`,label:`Forms`},{tab:`network`,label:`SSR & HTTP`}];function nD(e){return tD.filter(t=>_E(t.tab,e))}var rD={zoneless:`Zoneless`,zone:`zone.js`,"zone-unused":`Zoneless, zone.js loaded`};function iD(e){return e&&Object.hasOwn(rD,e)?rD[e]:null}var aD=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),oD={action:[`action`,`actions`],reducer:[`reducer`,`reducers`],effect:[`effect`,`effects`],selector:[`selector`,`selectors`],feature:[`feature`,`features`],"store-setup":[`setup call`,`setup calls`],"signal-store":[`signal store`,`signal stores`],"signal-state":[`signal state`,`signal states`],"signal-method":[`signal method`,`signal methods`]};function sD(e,t,n){return`${e} ${e===1?t:n}`}function cD(e,t){for(let n of e??[])t(n),cD(n.children,t)}function lD(e){if(!e.some(e=>e.kind))return{value:e.length,sub:`discovered in source`};let t=e.filter(e=>e.kind===`directive`).length;return{value:e.length-t,sub:`components · ${sD(t,`directive`,`directives`)}`}}function uD(e){if(!e.some(e=>e.kind))return{value:e.length,sub:`route entries in source`};let t=e.filter(e=>e.kind===`redirect`).length;return{value:new Set(e.filter(e=>e.kind===`page`).map(e=>e.fullPath??e.path??``)).size,sub:`navigable paths · ${sD(t,`redirect`,`redirects`)}`}}function dD(e){let t=new Map;for(let n of e)n.kind&&t.set(n.kind,(t.get(n.kind)??0)+1);if(!t.size)return{value:e.length,sub:`declarations in source`};let n=[...t].sort((e,t)=>t[1]-e[1]).map(([e,t])=>{let[n,r]=oD[e]??[e,e];return sD(t,n,r)});return{value:e.length,sub:n.join(` · `)}}function fD(e,t){let n=e?.forms??[],r=t?n.filter(e=>$T(e.id)===t):n;if(!r.length)return{value:0,sub:`no forms on the page yet`};let i=r.filter(e=>e.root?.status===`INVALID`).length;return{value:r.length,sub:`${r.length===1?`form`:`forms`} · ${i} invalid`}}function pD(e){return e.cancelled||e.status===void 0?!1:e.status===0||e.status>=400}function mD(e,t){let n=e?.pages??[],r=t?n.find(e=>e.pageId===t)??null:n.reduce((e,t)=>!e||t.reportedAt>e.reportedAt?t:e,null),i=t&&!r?[]:e?.serverCalls??[],a=r?.initialUrl,o=[...a?i.filter(e=>!e.pageUrl||e.pageUrl===a):i,...r?.calls??[]];if(!o.length)return{value:0,sub:`no calls recorded yet`};let s=o.filter(pD).length;return{value:o.length,sub:`${o.length===1?`call`:`calls`} · ${s} failed`}}var hD=class e{rpc=$(null);navigate=Cv();staticReport=X(()=>XT(this.rpc()));meta=D(null);redaction=D(null);config=X(()=>fE(uE(this.rpc()),this.redaction()));stats=X(()=>this.rpc()?nD(this.config()):[]);configItems=X(()=>DT(this.config()));metaState=D(`loading`);states=D({});rows=D({});injectorTree=D(null);signalGraph=D(null);formsState=D(null);httpState=D(null);pageId=UT();destroyRef=C(Os);stopLive=[];zone=X(()=>iD(GT(this.injectorTree(),this.pageId)?.zone));liveInjectors=X(()=>{let e=GT(this.injectorTree(),this.pageId);if(!e?.roots?.length)return null;let t=0,n=0,r=e=>{t++,n+=e.providers?.length??0};return cD(e.roots,r),cD(e.environment,r),{injectors:t,providers:n}});liveSignals=X(()=>{let e=KT(this.signalGraph(),this.pageId);return e?.nodes?.length?e.nodes.filter(e=>aD.has(e.kind??``)).length:null});cards=X(()=>{let e=this.rows(),t={};if(e.components&&(t.components=lD(e.components)),e.routes&&(t.routes=uD(e.routes)),e.store&&(t.store=dD(e.store)),e.pipes){let n=e.pipes.filter(e=>e.builtin).length;t.pipes={value:e.pipes.length-n,sub:n?`custom pipes · ${n} built-in in use`:`custom pipes in source`}}let n=this.liveSignals();n===null?e.signals&&(t.signals={value:e.signals.length,sub:`signal declarations in source`}):t.signals={value:n,sub:e.signals?`live on the page · ${e.signals.length} declared in source`:`live on the page`};let r=this.liveInjectors();r?t.injectors={value:r.injectors,sub:`live injectors · ${sD(r.providers,`provider`,`providers`)}`}:e.injectors&&(t.injectors={value:e.injectors.filter(e=>e.type!==`injection`).length,sub:`provider declarations in source`});let i=this.formsState();i&&(t.forms=fD(i,this.pageId));let a=this.httpState();return a&&(t.network=mD(a,this.pageId)),t});loadMeta(e=this.rpc()){e&&(this.metaState.set(`loading`),e.scope(`pangular`).rpc.call(`build-meta`).then(t=>{this.rpc()===e&&(this.meta.set(t),this.metaState.set(`ready`))}).catch(()=>{this.rpc()===e&&this.metaState.set(`error`)}))}loadRedaction(e){this.redaction.set(null),!XT(e)&&JT(e,`redaction-config`).then(t=>{this.rpc()===e&&this.redaction.set(t)}).catch(()=>{})}constructor(){hc(()=>{let e=this.rpc();if(!e)return;let t=e.scope(`pangular`);this.states.set({}),this.rows.set({}),this.formsState.set(null),this.httpState.set(null),this.loadMeta(e),this.loadRedaction(e);let n=uE(e),r=e=>_E(e,n);r(`components`)&&this.load(t.rpc.call(`get-components`),`components`),r(`routes`)&&this.load(t.rpc.call(`get-routes`),`routes`),r(`signals`)&&this.load(t.rpc.call(`get-signals`),`signals`),r(`injectors`)&&this.load(t.rpc.call(`get-providers`),`injectors`),r(`store`)&&this.load(t.rpc.call(`get-ngrx-store`),`store`),r(`pipes`)&&this.load(t.rpc.call(`get-pipes`),`pipes`),this.watchLive(e,n)}),this.destroyRef.onDestroy(()=>this.unwatch())}stateOf(e){return(e===`signals`?this.liveSignals():e===`injectors`?this.liveInjectors():null)===null?this.states()[e]??`loading`:`ready`}load(e,t){let n=e=>this.states.update(n=>({...n,[t]:e}));e.then(e=>{this.rows.update(n=>({...n,[t]:Array.isArray(e)?e:[]})),n(`ready`)}).catch(()=>n(`error`))}async watchLive(e,t){this.unwatch();let n=e.scope(`pangular`).rpc,r=async(t,r,i)=>{let a=e=>i&&this.states.update(t=>({...t,[i]:e}));try{let i=await n.sharedState(t);if(this.destroyRef.destroyed||this.rpc()!==e)return;r(i.value()),a(`ready`),this.stopLive.push(i.on(`updated`,e=>r(e)))}catch{if(this.destroyRef.destroyed||this.rpc()!==e)return;r(null),a(`error`)}};await Promise.all([t.inspectors.injectors&&r(`injector-tree`,e=>this.injectorTree.set(e)),t.inspectors.signals&&r(`signal-graph`,e=>this.signalGraph.set(e)),_E(`forms`,t)&&r(`forms`,e=>this.formsState.set(e??{}),`forms`),_E(`network`,t)&&r(`http`,e=>this.httpState.set(e??{}),`network`)])}unwatch(){for(let e of this.stopLive.splice(0))e()}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:33,vars:14,consts:[[`aria-labelledby`,`project-title`,1,`project`],[1,`project-head`],[1,`eyebrow`],[`id`,`project-title`],[1,`chips`],[1,`analog`],[1,`grid`],[`type`,`button`,1,`stat`,3,`animation-delay`],[`aria-labelledby`,`config-title`,1,`config`],[`id`,`config-title`],[1,`hint`],[`type`,`button`,1,`retry`],[`type`,`button`,1,`retry`,3,`click`],[`type`,`button`,1,`stat`,3,`click`],[1,`top`],[1,`icon`],[3,`name`],[`aria-hidden`,`true`,1,`go`],[1,`label`],[1,`big`],[1,`sub`],[1,`big`,`muted`],[`aria-hidden`,`true`,1,`big`,`skeleton`]],template:function(e,t){if(e&1&&(I(0,`section`,0)(1,`div`,1)(2,`p`,2),K(3,`Project`),L(),I(4,`h2`,3),j(5,RE,1,1)(6,zE,1,0)(7,BE,1,0),L(),j(8,WE,4,2),L(),I(9,`ul`,4)(10,`li`)(11,`span`),K(12,`Angular`),L(),K(13),L(),I(14,`li`)(15,`span`),K(16,`TypeScript`),L(),K(17),L(),I(18,`li`)(19,`span`),K(20,`SSR`),L(),K(21),L(),j(22,GE,4,1,`li`,5),j(23,KE,4,1,`li`),L()(),I(24,`div`,6),N(25,XE,11,6,`button`,7,IE),L(),I(27,`section`,8)(28,`h2`,9),K(29,`Configuration`),L(),j(30,ZE,2,0,`p`)(31,$E,3,0,`dl`)(32,eD,2,0,`p`),L()),e&2){let e,n,r;A(`aria-busy`,t.metaState()===`loading`),O(4),G(`muted`,t.metaState()!==`ready`),O(),M((e=t.metaState())===`ready`?5:e===`error`?6:7),O(3),M(t.metaState()===`error`?8:-1),O(),G(`pending`,t.metaState()===`loading`),O(4),q(t.meta()?.angularVersion??`…`),O(4),q(t.meta()?.typescript??`…`),O(4),q(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),O(),M((n=t.meta()?.analog)?22:-1,n),O(),M((r=t.zone())?23:-1,r),O(2),P(t.stats()),O(2),A(`aria-busy`,!t.rpc()),O(3),M(t.rpc()?t.configItems().length?31:32:30)}},dependencies:[FE],styles:[`[_nghost-%COMP%] { display: block; max-width: 1200px; } @@ -436,7 +436,7 @@ button.pipe[_ngcontent-%COMP%]:focus-visible { button.pipe[_ngcontent-%COMP%] { transition: none; } -}`]})};function BD(e){let t=e?.pages;return t&&typeof t==`object`?t:{}}function VD(e){let t=C(Os),n=D({}),r=null,i=null,a=async e=>{i?.(),i=null,r=e;try{let a=await e.scope(`pangular`).rpc.sharedState(`page-angular`);if(t.destroyed||r!==e)return;let o=e=>n.set(BD(e));o(a.value()),i=a.on(`updated`,o)}catch{r===e&&n.set({})}};return hc(()=>{let t=e();t&&t!==r&&Z(()=>void a(t))}),t.onDestroy(()=>i?.()),n.asReadonly()}function HD(e,t){if(t)return e[t]??null;let n=null;for(let t of Object.values(e))(!n||t.reportedAt>n.reportedAt)&&(n=t);return n}var UD=[`*`];function WD(e,t){if(e&1&&(z(0,`div`,1)(1,`p`,2),K(2),B(),z(3,`p`,3),K(4),Jg(5),z(6,`a`,4),K(7,`Supported versions`),B()()()),e&2){let e=W();G(`compact`,e.compact()),O(2),q(e.title()),O(2),J(` `,t,` `),O(2),Pg(`href`,e.docsUrl,Nu)}}var GD=`https://pangular-inspector.dev/getting-started/installation/#supported-angular-versions`,KD=class e{page=$(null);capability=$.required();missing=$(!1,{transform:Pv});compact=$(!1,{transform:Pv});docsUrl=GD;text=X(()=>{let e=this.page();return!this.missing()&&!FT(e,this.capability())?null:IT(this.capability(),e?.version)});title=X(()=>{let e=this.page()?.version;return e?`Not available on Angular ${MT(e)}`:`Not available on this page`});static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-angular-unavailable`]],inputs:{page:[1,`page`],capability:[1,`capability`],missing:[1,`missing`],compact:[1,`compact`]},ngContentSelectors:UD,decls:1,vars:1,consts:[[`role`,`status`,1,`unavailable`,3,`compact`],[`role`,`status`,1,`unavailable`],[1,`title`],[1,`hint`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`]],template:function(e,t){if(e&1&&(qg(),j(0,WD,8,5,`div`,0)),e&2){let e;M((e=t.text())?0:-1,e)}},styles:[`[_nghost-%COMP%] { +}`]})};function BD(e){let t=e?.pages;return t&&typeof t==`object`?t:{}}function VD(e){let t=C(Os),n=D({}),r=null,i=null,a=async e=>{i?.(),i=null,r=e;try{let a=await e.scope(`pangular`).rpc.sharedState(`page-angular`);if(t.destroyed||r!==e)return;let o=e=>n.set(BD(e));o(a.value()),i=a.on(`updated`,o)}catch{r===e&&n.set({})}};return hc(()=>{let t=e();t&&t!==r&&Z(()=>void a(t))}),t.onDestroy(()=>i?.()),n.asReadonly()}function HD(e,t){if(t)return e[t]??null;let n=null;for(let t of Object.values(e))(!n||t.reportedAt>n.reportedAt)&&(n=t);return n}var UD=[`*`];function WD(e,t){if(e&1&&(z(0,`div`,1)(1,`p`,2),K(2),B(),z(3,`p`,3),K(4),qg(5),z(6,`a`,4),K(7,`Supported versions`),B()()()),e&2){let e=W();G(`compact`,e.compact()),O(2),q(e.title()),O(2),J(` `,t,` `),O(2),Ng(`href`,e.docsUrl,Nu)}}var GD=`https://pangular-inspector.dev/getting-started/installation/#supported-angular-versions`,KD=class e{page=$(null);capability=$.required();missing=$(!1,{transform:Pv});compact=$(!1,{transform:Pv});docsUrl=GD;text=X(()=>{let e=this.page();return!this.missing()&&!FT(e,this.capability())?null:IT(this.capability(),e?.version)});title=X(()=>{let e=this.page()?.version;return e?`Not available on Angular ${MT(e)}`:`Not available on this page`});static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-angular-unavailable`]],inputs:{page:[1,`page`],capability:[1,`capability`],missing:[1,`missing`],compact:[1,`compact`]},ngContentSelectors:UD,decls:1,vars:1,consts:[[`role`,`status`,1,`unavailable`,3,`compact`],[`role`,`status`,1,`unavailable`],[1,`title`],[1,`hint`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`]],template:function(e,t){if(e&1&&(Kg(),j(0,WD,8,5,`div`,0)),e&2){let e;M((e=t.text())?0:-1,e)}},styles:[`[_nghost-%COMP%] { display: block; } @@ -483,7 +483,7 @@ a[_ngcontent-%COMP%] { a[_ngcontent-%COMP%]:focus-visible { outline: 2px solid var(--%NS%accent); outline-offset: 2px; -}`]})};function qD(e){return e?.platform===`angular-native`}function JD(e){return qD(e)||e?.platform===`nativescript`}function YD(e,t){let n=Object.values(e??{}).filter(qD);if(t&&n.some(e=>e.pageId===t))return t;let r=null;for(let e of n)(!r||e.reportedAt>r.reportedAt)&&(r=e);return r?.pageId??null}var XD=[`trigger`],ZD=[`list`],QD=(e,t)=>t.value;function $D(e,t){if(e&1&&(z(0,`span`,4),K(1),B()),e&2){let e=W();O(),q(e.current().hint)}}function eO(e,t){if(e&1&&(z(0,`span`,15),K(1),B()),e&2){let e=W().$implicit;O(),q(e.hint)}}function tO(e,t){if(e&1){let e=V();z(0,`li`,11),U(`pointerenter`,function(){let t=w(e).$index;return T(W(2).active.set(t))})(`pointerdown`,function(e){return e.preventDefault()})(`click`,function(){let t=w(e).$index;return T(W(2).choose(t))}),E(),z(1,`svg`,12),Og(2,`path`,13),B(),vs(),z(3,`span`,14),K(4),B(),j(5,eO,2,1,`span`,15),B()}if(e&2){let e=t.$implicit,n=t.$index,r=W(2);G(`active`,n===r.active())(`selected`,e.value===r.value()),A(`id`,r.uid+`-opt-`+n)(`aria-selected`,e.value===r.value())(`aria-disabled`,e.disabled||null),O(4),q(e.label),O(),M(e.hint?5:-1)}}function nO(e,t){if(e&1&&(z(0,`li`,10),K(1),B()),e&2){let e=W(2);O(),q(e.emptyText())}}function rO(e,t){if(e&1&&(z(0,`ul`,8,1),ig(`list-in`),U(`pointerdown`,function(e){return e.preventDefault()}),N(2,tO,6,9,`li`,9,QD,!1,nO,2,1,`li`,10),B()),e&2){let e=W();G(`up`,e.dropUp()),A(`id`,e.uid+`-list`)(`aria-labelledby`,e.labelledBy()||e.uid+`-trigger`),O(2),P(e.options())}}var iO=0,aO=class e{options=$.required();value=Ov(null);placeholder=$(`Select…`);ariaLabel=$(``);labelledBy=$(``);describedBy=$(``);disabled=$(!1);emptyText=$(`Nothing to choose`);uid=`app-select-${++iO}`;open=D(!1);active=D(-1);dropUp=D(!1);current=X(()=>this.options().find(e=>e.value===this.value())??null);host=C(zl);injector=C(Es);trigger=Av.required(`trigger`);list=Av(`list`);typed=``;typedAt=0;toggle(){this.open()?this.close():this.show()}choose(e){let t=this.options()[e];t&&!t.disabled&&(this.value.set(t.value),this.close(),this.trigger().nativeElement.focus())}onKey(e){let t=this.options(),n=this.open();switch(e.key){case`ArrowDown`:case`ArrowUp`:if(e.preventDefault(),!n){this.show();return}this.move(e.key===`ArrowDown`?1:-1);return;case`Home`:case`End`:if(!n)return;e.preventDefault(),this.setActive(e.key===`Home`?this.firstEnabled(0,1):this.firstEnabled(t.length-1,-1));return;case`Enter`:case` `:e.preventDefault(),n&&this.active()>=0?this.choose(this.active()):this.show();return;case`Escape`:if(!n)return;e.preventDefault(),e.stopPropagation(),this.close();return;case`Tab`:n&&this.close();return;default:e.key.length===1&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&this.typeAhead(e.key)}}onBlur(e){let t=e.relatedTarget;t&&this.host.nativeElement.contains(t)||this.close()}onOutside(e){this.open()&&!this.host.nativeElement.contains(e.target)&&this.close()}show(){if(this.disabled())return;let e=this.host.nativeElement.getBoundingClientRect(),t=window.innerHeight-e.bottom;this.dropUp.set(t<220&&e.top>t);let n=this.options().findIndex(e=>e.value===this.value());this.open.set(!0),this.setActive(n>=0?n:this.firstEnabled(0,1))}close(){this.open.set(!1),this.active.set(-1)}move(e){let t=this.firstEnabled(this.active()+e,e);t>=0&&this.setActive(t)}firstEnabled(e,t){let n=this.options();for(let r=e;r>=0&&r{(this.list()?.nativeElement.querySelector(`#${this.uid}-opt-${e}`))?.scrollIntoView({block:`nearest`})},{injector:this.injector})}typeAhead(e){let t=performance.now();this.typed=t-this.typedAt>600?e.toLowerCase():this.typed+e.toLowerCase(),this.typedAt=t;let n=this.options().findIndex(e=>!e.disabled&&e.label.toLowerCase().startsWith(this.typed));n<0||(this.open()?this.setActive(n):this.value.set(this.options()[n].value))}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-select`]],viewQuery:function(e,t){e&1&&Xg(t.trigger,XD,5)(t.list,ZD,5),e&2&&Zg(2)},hostAttrs:[1,`app-select`],hostVars:2,hostBindings:function(e,t){e&1&&H(`pointerdown`,function(e){return t.onOutside(e)},Fu),e&2&&G(`open`,t.open())},inputs:{options:[1,`options`],value:[1,`value`],placeholder:[1,`placeholder`],ariaLabel:[1,`ariaLabel`],labelledBy:[1,`labelledBy`],describedBy:[1,`describedBy`],disabled:[1,`disabled`],emptyText:[1,`emptyText`]},outputs:{value:`valueChange`},decls:8,vars:13,consts:[[`trigger`,``],[`list`,``],[`type`,`button`,`role`,`combobox`,`aria-haspopup`,`listbox`,1,`trigger`,3,`click`,`keydown`,`blur`,`disabled`],[1,`value`],[1,`value-hint`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[`d`,`m6 9 6 6 6-6`],[`role`,`listbox`,`tabindex`,`-1`,1,`list`,3,`up`],[`role`,`listbox`,`tabindex`,`-1`,1,`list`,3,`pointerdown`],[`role`,`option`,3,`active`,`selected`],[`role`,`option`,`aria-disabled`,`true`,1,`empty`],[`role`,`option`,3,`pointerenter`,`pointerdown`,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`check`],[`d`,`m5 12 5 5 9-10`],[1,`label`],[1,`hint`]],template:function(e,t){e&1&&(z(0,`button`,2,0),U(`click`,function(){return t.toggle()})(`keydown`,function(e){return t.onKey(e)})(`blur`,function(e){return t.onBlur(e)}),z(2,`span`,3),K(3),B(),j(4,$D,2,1,`span`,4),E(),z(5,`svg`,5),Og(6,`path`,6),B()(),j(7,rO,5,5,`ul`,7)),e&2&&(Pg(`disabled`,t.disabled()),A(`id`,t.uid+`-trigger`)(`aria-controls`,t.uid+`-list`)(`aria-expanded`,t.open())(`aria-label`,t.ariaLabel()||null)(`aria-labelledby`,t.labelledBy()||null)(`aria-describedby`,t.describedBy()||null)(`aria-activedescendant`,t.open()&&t.active()>=0?t.uid+`-opt-`+t.active():null),O(2),G(`placeholder`,!t.current()),O(),J(` `,t.current()?.label??t.placeholder(),` `),O(),M(t.current()?.hint?4:-1),O(3),M(t.open()?7:-1))},styles:[`[_nghost-%COMP%] { +}`]})};function qD(e){return e?.platform===`angular-native`}function JD(e){return qD(e)||e?.platform===`nativescript`}function YD(e,t){let n=Object.values(e??{}).filter(qD);if(t&&n.some(e=>e.pageId===t))return t;let r=null;for(let e of n)(!r||e.reportedAt>r.reportedAt)&&(r=e);return r?.pageId??null}var XD=[`trigger`],ZD=[`list`],QD=(e,t)=>t.value;function $D(e,t){if(e&1&&(z(0,`span`,4),K(1),B()),e&2){let e=W();O(),q(e.current().hint)}}function eO(e,t){if(e&1&&(z(0,`span`,15),K(1),B()),e&2){let e=W().$implicit;O(),q(e.hint)}}function tO(e,t){if(e&1){let e=V();z(0,`li`,11),U(`pointerenter`,function(){let t=w(e).$index;return T(W(2).active.set(t))})(`pointerdown`,function(e){return e.preventDefault()})(`click`,function(){let t=w(e).$index;return T(W(2).choose(t))}),E(),z(1,`svg`,12),Dg(2,`path`,13),B(),vs(),z(3,`span`,14),K(4),B(),j(5,eO,2,1,`span`,15),B()}if(e&2){let e=t.$implicit,n=t.$index,r=W(2);G(`active`,n===r.active())(`selected`,e.value===r.value()),A(`id`,r.uid+`-opt-`+n)(`aria-selected`,e.value===r.value())(`aria-disabled`,e.disabled||null),O(4),q(e.label),O(),M(e.hint?5:-1)}}function nO(e,t){if(e&1&&(z(0,`li`,10),K(1),B()),e&2){let e=W(2);O(),q(e.emptyText())}}function rO(e,t){if(e&1&&(z(0,`ul`,8,1),rg(`list-in`),U(`pointerdown`,function(e){return e.preventDefault()}),N(2,tO,6,9,`li`,9,QD,!1,nO,2,1,`li`,10),B()),e&2){let e=W();G(`up`,e.dropUp()),A(`id`,e.uid+`-list`)(`aria-labelledby`,e.labelledBy()||e.uid+`-trigger`),O(2),P(e.options())}}var iO=0,aO=class e{options=$.required();value=Ov(null);placeholder=$(`Select…`);ariaLabel=$(``);labelledBy=$(``);describedBy=$(``);disabled=$(!1);emptyText=$(`Nothing to choose`);uid=`app-select-${++iO}`;open=D(!1);active=D(-1);dropUp=D(!1);current=X(()=>this.options().find(e=>e.value===this.value())??null);host=C(zl);injector=C(Es);trigger=Av.required(`trigger`);list=Av(`list`);typed=``;typedAt=0;toggle(){this.open()?this.close():this.show()}choose(e){let t=this.options()[e];t&&!t.disabled&&(this.value.set(t.value),this.close(),this.trigger().nativeElement.focus())}onKey(e){let t=this.options(),n=this.open();switch(e.key){case`ArrowDown`:case`ArrowUp`:if(e.preventDefault(),!n){this.show();return}this.move(e.key===`ArrowDown`?1:-1);return;case`Home`:case`End`:if(!n)return;e.preventDefault(),this.setActive(e.key===`Home`?this.firstEnabled(0,1):this.firstEnabled(t.length-1,-1));return;case`Enter`:case` `:e.preventDefault(),n&&this.active()>=0?this.choose(this.active()):this.show();return;case`Escape`:if(!n)return;e.preventDefault(),e.stopPropagation(),this.close();return;case`Tab`:n&&this.close();return;default:e.key.length===1&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&this.typeAhead(e.key)}}onBlur(e){let t=e.relatedTarget;t&&this.host.nativeElement.contains(t)||this.close()}onOutside(e){this.open()&&!this.host.nativeElement.contains(e.target)&&this.close()}show(){if(this.disabled())return;let e=this.host.nativeElement.getBoundingClientRect(),t=window.innerHeight-e.bottom;this.dropUp.set(t<220&&e.top>t);let n=this.options().findIndex(e=>e.value===this.value());this.open.set(!0),this.setActive(n>=0?n:this.firstEnabled(0,1))}close(){this.open.set(!1),this.active.set(-1)}move(e){let t=this.firstEnabled(this.active()+e,e);t>=0&&this.setActive(t)}firstEnabled(e,t){let n=this.options();for(let r=e;r>=0&&r{(this.list()?.nativeElement.querySelector(`#${this.uid}-opt-${e}`))?.scrollIntoView({block:`nearest`})},{injector:this.injector})}typeAhead(e){let t=performance.now();this.typed=t-this.typedAt>600?e.toLowerCase():this.typed+e.toLowerCase(),this.typedAt=t;let n=this.options().findIndex(e=>!e.disabled&&e.label.toLowerCase().startsWith(this.typed));n<0||(this.open()?this.setActive(n):this.value.set(this.options()[n].value))}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-select`]],viewQuery:function(e,t){e&1&&Yg(t.trigger,XD,5)(t.list,ZD,5),e&2&&Xg(2)},hostAttrs:[1,`app-select`],hostVars:2,hostBindings:function(e,t){e&1&&H(`pointerdown`,function(e){return t.onOutside(e)},Fu),e&2&&G(`open`,t.open())},inputs:{options:[1,`options`],value:[1,`value`],placeholder:[1,`placeholder`],ariaLabel:[1,`ariaLabel`],labelledBy:[1,`labelledBy`],describedBy:[1,`describedBy`],disabled:[1,`disabled`],emptyText:[1,`emptyText`]},outputs:{value:`valueChange`},decls:8,vars:13,consts:[[`trigger`,``],[`list`,``],[`type`,`button`,`role`,`combobox`,`aria-haspopup`,`listbox`,1,`trigger`,3,`click`,`keydown`,`blur`,`disabled`],[1,`value`],[1,`value-hint`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[`d`,`m6 9 6 6 6-6`],[`role`,`listbox`,`tabindex`,`-1`,1,`list`,3,`up`],[`role`,`listbox`,`tabindex`,`-1`,1,`list`,3,`pointerdown`],[`role`,`option`,3,`active`,`selected`],[`role`,`option`,`aria-disabled`,`true`,1,`empty`],[`role`,`option`,3,`pointerenter`,`pointerdown`,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`check`],[`d`,`m5 12 5 5 9-10`],[1,`label`],[1,`hint`]],template:function(e,t){e&1&&(z(0,`button`,2,0),U(`click`,function(){return t.toggle()})(`keydown`,function(e){return t.onKey(e)})(`blur`,function(e){return t.onBlur(e)}),z(2,`span`,3),K(3),B(),j(4,$D,2,1,`span`,4),E(),z(5,`svg`,5),Dg(6,`path`,6),B()(),j(7,rO,5,5,`ul`,7)),e&2&&(Ng(`disabled`,t.disabled()),A(`id`,t.uid+`-trigger`)(`aria-controls`,t.uid+`-list`)(`aria-expanded`,t.open())(`aria-label`,t.ariaLabel()||null)(`aria-labelledby`,t.labelledBy()||null)(`aria-describedby`,t.describedBy()||null)(`aria-activedescendant`,t.open()&&t.active()>=0?t.uid+`-opt-`+t.active():null),O(2),G(`placeholder`,!t.current()),O(),J(` `,t.current()?.label??t.placeholder(),` `),O(),M(t.current()?.hint?4:-1),O(3),M(t.open()?7:-1))},styles:[`[_nghost-%COMP%] { position: relative; display: inline-flex; min-width: 0; @@ -678,7 +678,7 @@ li.selected[_ngcontent-%COMP%] .check[_ngcontent-%COMP%] { .chevron[_ngcontent-%COMP%] { transition: none; } -}`]})};function oO(e,t){let n=OT(t);if(kT(n))return{nodes:e,matches:0};let r=0,i=e=>e.flatMap(e=>{let t=AT(e,n);t&&r++;let a=i(e.children);return t||a.length?[{...e,children:a}]:[]});return{nodes:i(e),matches:r}}function sO(e){return e.flatMap(e=>e.kind===`directive`?sO(e.children):[{...e,children:sO(e.children)}])}function cO(e){return(e.attributes?.length?e.attributes:e.directives??[e.name]).map(e=>`[${e}]`).join(` `)}var lO={hydrated:`Hydrated`,skipped:`Skipped`,mismatched:`Mismatch`,client:`Client`};function uO(e){return lO[e]}function dO(e,t,n,r=!1,i=0){let a=r?`${e}+`:`${e}`;if(n)return`${t} of ${r?`${e+i}+`:e+i}`;let o=i?` · ${i} directive ${i===1?`host`:`hosts`}`:``;return`${a} ${e===1&&!r?`instance`:`instances`}${o}`}function fO(e,t,n,r=!1,i=0){if(!n.trim())return``;if(!t)return`No components match.`;let a=e+i,o=r?`${a}+`:`${a}`,s=!r&&a===1;return`${t} of ${o} ${i?s?`row`:`rows`:s?`instance`:`instances`} match.`}function pO(e){let t=e?.components,n=e?.depth;return t&&n?`Showing the first ${t} component instances, and none nested more than ${n} elements deep. Others are not listed or searchable.`:t?`Showing the first ${t} component instances. Others are not listed or searchable.`:n?`Components nested more than ${n} elements deep are not listed or searchable.`:`The page has more components than the tree shows.`}function mO(e,t){let n=t?.detail?.id??null,r=t?.pageId??null;if(r!==e.pageId)return{pageId:r,selectedId:n,detailId:n,destroyed:null};let i=e.selectedId;return n&&n!==e.detailId&&n!==i&&(i=n),i&&t&&!t.truncated&&!hO(t.roots,i)?{pageId:r,selectedId:null,detailId:n,destroyed:i}:{pageId:r,selectedId:i,detailId:n,destroyed:null}}function hO(e,t){return e.some(e=>e.id===t||hO(e.children,t))}function gO(e,t,n){let r=e.indexOf(n);if(r<0)return null;for(let n=r+1;n=0;n--)if(t.has(e[n]))return e[n];return null}var _O=(e,t)=>t.key,vO=(e,t)=>t.id;function yO(e,t){e&1&&(z(0,`p`,2),K(1,` The HTML came from the server, but no component was hydrated, so the app rendered again on the client. Add `),z(2,`code`),K(3,`provideClientHydration()`),B(),K(4,` and use a development build to see each component's status. `),B())}function bO(e,t){if(e&1&&(z(0,`li`)(1,`span`,9),K(2),B(),K(3),B()),e&2){let e=t.$implicit;b_(`count count-`+e.key),O(2),q(e.value),O(),J(` `,e.label,` `)}}function xO(e,t){if(e&1&&(z(0,`span`,15),K(1,`Expected `),z(2,`code`),K(3),B()()),e&2){let e=W().$implicit;O(3),q(e.expected)}}function SO(e,t){if(e&1&&(z(0,`span`,15),K(1,`Found `),z(2,`code`),K(3),B()()),e&2){let e=W().$implicit;O(3),q(e.actual)}}function CO(e,t){if(e&1){let e=V();z(0,`li`)(1,`button`,12),U(`click`,function(){let t=w(e).$implicit;return T(W(4).showNode.emit(t.id))})(`focus`,function(){let t=w(e).$implicit;return T(W(4).highlight.emit(t.id))})(`blur`,function(){return w(e),T(W(4).highlight.emit(null))})(`mouseenter`,function(){let t=w(e).$implicit;return T(W(4).highlight.emit(t.id))})(`mouseleave`,function(){return w(e),T(W(4).highlight.emit(null))}),z(2,`span`,13),K(3),B(),z(4,`span`,14),K(5),B(),j(6,xO,4,1,`span`,15),j(7,SO,4,1,`span`,15),B()()}if(e&2){let e=t.$implicit;O(3),q(e.name),O(2),J(`<`,e.tag,`>`),O(),M(e.expected?6:-1),O(),M(e.actual?7:-1)}}function wO(e,t){if(e&1&&(z(0,`h3`,10),K(1,`Mismatches`),B(),z(2,`ul`,11),N(3,CO,8,4,`li`,null,vO),B()),e&2){let e=W(2);O(3),P(e.mismatches)}}function TO(e,t){if(e&1){let e=V();z(0,`div`,3)(1,`ul`,4),N(2,bO,4,4,`li`,5,_O),B(),z(4,`button`,6),U(`click`,function(){return w(e),T(W(2).toggleOverlay())}),E(),z(5,`svg`,7),Og(6,`rect`,8),B(),K(7,` Outline on page `),B()(),j(8,wO,5,0)}if(e&2){let e=W(),t=W();O(2),P(t.counts()),O(2),A(`aria-pressed`,t.overlayOn()),O(4),M(e.mismatches.length?8:-1)}}function EO(e,t){e&1&&j(0,yO,5,0,`p`,2)(1,TO,9,2),e&2&&M(+!!t.hydrated)}function DO(e,t){e&1&&(z(0,`p`,2),K(1,` This page was not rendered on the server, so there is nothing to hydrate. With server-side rendering and `),z(2,`code`),K(3,`provideClientHydration()`),B(),K(4,`, each component shows whether it was hydrated, skipped or mismatched. `),B())}var OO=class e{report=$(void 0);overlay=Cv();showNode=Cv();highlight=Cv();overlayOn=Q(()=>this.report()?.overlay===!0);counts=X(()=>{let e=this.report()?.counts;return e?[{key:`hydrated`,label:`hydrated`,value:e.hydrated},{key:`skipped`,label:`skipped`,value:e.skipped},{key:`mismatched`,label:`mismatched`,value:e.mismatched},{key:`client`,label:`created on the client`,value:e.client},{key:`dehydratedBlocks`,label:e.dehydratedBlocks===1?`dehydrated @defer block`:`dehydrated @defer blocks`,value:e.dehydratedBlocks}]:[]});toggleOverlay(){let e=!this.overlayOn();this.overlayOn.set(e),this.overlay.emit(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-hydration-section`]],inputs:{report:[1,`report`]},outputs:{overlay:`overlay`,showNode:`showNode`,highlight:`highlight`},decls:5,vars:1,consts:[[`aria-labelledby`,`ct-hydration-title`,1,`hydration`],[`id`,`ct-hydration-title`,1,`title`],[1,`empty`],[1,`summary`],[`aria-label`,`Hydration summary`,1,`counts`],[3,`class`],[`type`,`button`,1,`outline`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`x`,`3`,`y`,`3`,`width`,`18`,`height`,`18`,`rx`,`2`,`stroke-dasharray`,`4 3`],[1,`num`],[1,`label`],[1,`mismatches`],[`type`,`button`,1,`mismatch`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`name`,`mono`],[1,`mono`,`muted`],[1,`detail-line`]],template:function(e,t){if(e&1&&(z(0,`section`,0)(1,`h2`,1),K(2,`Hydration`),B(),j(3,EO,2,1)(4,DO,5,0,`p`,2),B()),e&2){let e;O(3),M((e=t.report())?3:4,e)}},styles:[`.hydration[_ngcontent-%COMP%] { +}`]})};function oO(e,t){let n=OT(t);if(kT(n))return{nodes:e,matches:0};let r=0,i=e=>e.flatMap(e=>{let t=AT(e,n);t&&r++;let a=i(e.children);return t||a.length?[{...e,children:a}]:[]});return{nodes:i(e),matches:r}}function sO(e){return e.flatMap(e=>e.kind===`directive`?sO(e.children):[{...e,children:sO(e.children)}])}function cO(e){return(e.attributes?.length?e.attributes:e.directives??[e.name]).map(e=>`[${e}]`).join(` `)}var lO={hydrated:`Hydrated`,skipped:`Skipped`,mismatched:`Mismatch`,client:`Client`};function uO(e){return lO[e]}function dO(e,t,n,r=!1,i=0){let a=r?`${e}+`:`${e}`;if(n)return`${t} of ${r?`${e+i}+`:e+i}`;let o=i?` · ${i} directive ${i===1?`host`:`hosts`}`:``;return`${a} ${e===1&&!r?`instance`:`instances`}${o}`}function fO(e,t,n,r=!1,i=0){if(!n.trim())return``;if(!t)return`No components match.`;let a=e+i,o=r?`${a}+`:`${a}`,s=!r&&a===1;return`${t} of ${o} ${i?s?`row`:`rows`:s?`instance`:`instances`} match.`}function pO(e){let t=e?.components,n=e?.depth;return t&&n?`Showing the first ${t} component instances, and none nested more than ${n} elements deep. Others are not listed or searchable.`:t?`Showing the first ${t} component instances. Others are not listed or searchable.`:n?`Components nested more than ${n} elements deep are not listed or searchable.`:`The page has more components than the tree shows.`}function mO(e,t){let n=t?.detail?.id??null,r=t?.pageId??null;if(r!==e.pageId)return{pageId:r,selectedId:n,detailId:n,destroyed:null};let i=e.selectedId;return n&&n!==e.detailId&&n!==i&&(i=n),i&&t&&!t.truncated&&!hO(t.roots,i)?{pageId:r,selectedId:null,detailId:n,destroyed:i}:{pageId:r,selectedId:i,detailId:n,destroyed:null}}function hO(e,t){return e.some(e=>e.id===t||hO(e.children,t))}function gO(e,t,n){let r=e.indexOf(n);if(r<0)return null;for(let n=r+1;n=0;n--)if(t.has(e[n]))return e[n];return null}var _O=(e,t)=>t.key,vO=(e,t)=>t.id;function yO(e,t){e&1&&(z(0,`p`,2),K(1,` The HTML came from the server, but no component was hydrated, so the app rendered again on the client. Add `),z(2,`code`),K(3,`provideClientHydration()`),B(),K(4,` and use a development build to see each component's status. `),B())}function bO(e,t){if(e&1&&(z(0,`li`)(1,`span`,9),K(2),B(),K(3),B()),e&2){let e=t.$implicit;y_(`count count-`+e.key),O(2),q(e.value),O(),J(` `,e.label,` `)}}function xO(e,t){if(e&1&&(z(0,`span`,15),K(1,`Expected `),z(2,`code`),K(3),B()()),e&2){let e=W().$implicit;O(3),q(e.expected)}}function SO(e,t){if(e&1&&(z(0,`span`,15),K(1,`Found `),z(2,`code`),K(3),B()()),e&2){let e=W().$implicit;O(3),q(e.actual)}}function CO(e,t){if(e&1){let e=V();z(0,`li`)(1,`button`,12),U(`click`,function(){let t=w(e).$implicit;return T(W(4).showNode.emit(t.id))})(`focus`,function(){let t=w(e).$implicit;return T(W(4).highlight.emit(t.id))})(`blur`,function(){return w(e),T(W(4).highlight.emit(null))})(`mouseenter`,function(){let t=w(e).$implicit;return T(W(4).highlight.emit(t.id))})(`mouseleave`,function(){return w(e),T(W(4).highlight.emit(null))}),z(2,`span`,13),K(3),B(),z(4,`span`,14),K(5),B(),j(6,xO,4,1,`span`,15),j(7,SO,4,1,`span`,15),B()()}if(e&2){let e=t.$implicit;O(3),q(e.name),O(2),J(`<`,e.tag,`>`),O(),M(e.expected?6:-1),O(),M(e.actual?7:-1)}}function wO(e,t){if(e&1&&(z(0,`h3`,10),K(1,`Mismatches`),B(),z(2,`ul`,11),N(3,CO,8,4,`li`,null,vO),B()),e&2){let e=W(2);O(3),P(e.mismatches)}}function TO(e,t){if(e&1){let e=V();z(0,`div`,3)(1,`ul`,4),N(2,bO,4,4,`li`,5,_O),B(),z(4,`button`,6),U(`click`,function(){return w(e),T(W(2).toggleOverlay())}),E(),z(5,`svg`,7),Dg(6,`rect`,8),B(),K(7,` Outline on page `),B()(),j(8,wO,5,0)}if(e&2){let e=W(),t=W();O(2),P(t.counts()),O(2),A(`aria-pressed`,t.overlayOn()),O(4),M(e.mismatches.length?8:-1)}}function EO(e,t){e&1&&j(0,yO,5,0,`p`,2)(1,TO,9,2),e&2&&M(+!!t.hydrated)}function DO(e,t){e&1&&(z(0,`p`,2),K(1,` This page was not rendered on the server, so there is nothing to hydrate. With server-side rendering and `),z(2,`code`),K(3,`provideClientHydration()`),B(),K(4,`, each component shows whether it was hydrated, skipped or mismatched. `),B())}var OO=class e{report=$(void 0);overlay=Cv();showNode=Cv();highlight=Cv();overlayOn=Q(()=>this.report()?.overlay===!0);counts=X(()=>{let e=this.report()?.counts;return e?[{key:`hydrated`,label:`hydrated`,value:e.hydrated},{key:`skipped`,label:`skipped`,value:e.skipped},{key:`mismatched`,label:`mismatched`,value:e.mismatched},{key:`client`,label:`created on the client`,value:e.client},{key:`dehydratedBlocks`,label:e.dehydratedBlocks===1?`dehydrated @defer block`:`dehydrated @defer blocks`,value:e.dehydratedBlocks}]:[]});toggleOverlay(){let e=!this.overlayOn();this.overlayOn.set(e),this.overlay.emit(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-hydration-section`]],inputs:{report:[1,`report`]},outputs:{overlay:`overlay`,showNode:`showNode`,highlight:`highlight`},decls:5,vars:1,consts:[[`aria-labelledby`,`ct-hydration-title`,1,`hydration`],[`id`,`ct-hydration-title`,1,`title`],[1,`empty`],[1,`summary`],[`aria-label`,`Hydration summary`,1,`counts`],[3,`class`],[`type`,`button`,1,`outline`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`x`,`3`,`y`,`3`,`width`,`18`,`height`,`18`,`rx`,`2`,`stroke-dasharray`,`4 3`],[1,`num`],[1,`label`],[1,`mismatches`],[`type`,`button`,1,`mismatch`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`name`,`mono`],[1,`mono`,`muted`],[1,`detail-line`]],template:function(e,t){if(e&1&&(z(0,`section`,0)(1,`h2`,1),K(2,`Hydration`),B(),j(3,EO,2,1)(4,DO,5,0,`p`,2),B()),e&2){let e;O(3),M((e=t.report())?3:4,e)}},styles:[`.hydration[_ngcontent-%COMP%] { margin-top: 16px; } @@ -849,7 +849,7 @@ svg[_ngcontent-%COMP%] { button[_ngcontent-%COMP%] { transition: none; } -}`]})};function kO(e,t){if(e&1&&(z(0,`p`,0),K(1),z(2,`code`),K(3),B(),K(4,` to keep more. `),z(5,`a`,1),K(6,`About limits`),B()()),e&2){let e=W();O(),U_(` Showing the latest `,e.max(),` `,e.what(),`. `,e.dropped(),` older `,e.dropped()===1?`entry was`:`entries were`,` dropped. Raise `),O(2),J(`limits.`,e.limit()),O(2),Pg(`href`,e.docsUrl,Nu)}}var AO=`https://pangular-inspector.dev/getting-started/configuration/#limits`,jO=class e{dropped=$(0);max=$.required();what=$.required();limit=$.required();docsUrl=AO;static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-limit-note`]],inputs:{dropped:[1,`dropped`],max:[1,`max`],what:[1,`what`],limit:[1,`limit`]},decls:1,vars:1,consts:[[1,`note`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`]],template:function(e,t){e&1&&j(0,kO,7,6,`p`,0),e&2&&M(t.dropped()>0?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})};function kO(e,t){if(e&1&&(z(0,`p`,0),K(1),z(2,`code`),K(3),B(),K(4,` to keep more. `),z(5,`a`,1),K(6,`About limits`),B()()),e&2){let e=W();O(),U_(` Showing the latest `,e.max(),` `,e.what(),`. `,e.dropped(),` older `,e.dropped()===1?`entry was`:`entries were`,` dropped. Raise `),O(2),J(`limits.`,e.limit()),O(2),Ng(`href`,e.docsUrl,Nu)}}var AO=`https://pangular-inspector.dev/getting-started/configuration/#limits`,jO=class e{dropped=$(0);max=$.required();what=$.required();limit=$.required();docsUrl=AO;static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-limit-note`]],inputs:{dropped:[1,`dropped`],max:[1,`max`],what:[1,`what`],limit:[1,`limit`]},decls:1,vars:1,consts:[[1,`note`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`]],template:function(e,t){e&1&&j(0,kO,7,6,`p`,0),e&2&&M(t.dropped()>0?0:-1)},styles:[`[_nghost-%COMP%] { display: block; } @@ -876,7 +876,7 @@ a[_ngcontent-%COMP%] { a[_ngcontent-%COMP%]:focus-visible { outline: 2px solid var(--%NS%accent); outline-offset: 2px; -}`]})},MO=864e13,NO=200,PO=300,FO=100,IO=10,LO=100,RO=2e3,zO=2e3,BO=4e3,VO=1e3,HO=100,UO=3,WO=50,GO={component:`c`,hook:`h`,afterRender:`r`,output:`o`},KO=Object.values(GO),qO=e=>!!e&&typeof e==`object`&&!Array.isArray(e),JO=e=>typeof e==`number`&&Number.isFinite(e)&&e>=0?e:0,YO=(e,t)=>typeof e==`string`?e.slice(0,t):``,XO=e=>JO(e)>0?JO(e):void 0,ZO=(e,t)=>Array.isArray(e)?e.slice(0,t):[];function QO(e){if(!qO(e))return null;let t=YO(e.name,NO);return t?{name:t,checks:JO(e.checks),ms:JO(e.ms)}:null}function $O(e,t){if(!Array.isArray(e)||e.length!==5)return null;let[n,r,i,a,o]=e;return typeof n!=`number`||!Number.isInteger(n)||n<0||n>=t||typeof r!=`number`||!Number.isFinite(r)||Math.abs(r)>1e7||typeof a!=`number`||!Number.isInteger(a)||a<0||a>VO||typeof o!=`string`||!KO.includes(o)?null:[n,r,JO(i),a,o]}function ek(e,t){if(!qO(e)||typeof e.id!=`number`)return null;let n=ZO(e.components,IO).map(QO).filter(e=>!!e),r=YO(e.trigger,PO),i=ZO(e.spans,40).map(e=>$O(e,t)).filter(e=>!!e),a=Array.isArray(e.spans)?e.spans.length-40:0,o=Math.floor(JO(e.droppedSpans))+Math.max(0,a),s={t:typeof e.t==`number`?JO(e.t):void 0,hookMs:XO(e.hookMs),afterRenderMs:XO(e.afterRenderMs),outputMs:XO(e.outputMs)},c=ik(e.cause),l=XO(e.refreshed),u=XO(e.unchanged);return{id:JO(e.id),at:JO(e.at),ms:JO(e.ms),passes:JO(e.passes),...r?{trigger:r}:{},checks:JO(e.checks),components:n,...Object.fromEntries(Object.entries(s).filter(([,e])=>e!==void 0)),...i.length?{spans:i}:{},...o?{droppedSpans:o}:{},...c?{cause:c}:{},...l?{refreshed:l}:{},...u?{unchanged:u}:{}}}var tk=[`event`,`http`,`timer`,`signal`,`effect`,`markForCheck`,`input`,`view`,`tick`,`zone`,`unknown`],nk={event:`Event`,http:`HTTP response`,timer:`Timer`,signal:`Signal write`,effect:`Effect`,markForCheck:`markForCheck`,input:`setInput`,view:`View change`,tick:`ApplicationRef.tick`,zone:`zone.js only`,unknown:`Unknown`},rk=e=>typeof e==`string`&&tk.includes(e);function ik(e){if(!qO(e)||!rk(e.kind))return;let t=[`component`,`listener`,`event`,`target`,`signal`,`task`],n={kind:e.kind};rk(e.via)&&(n.via=e.via);for(let r of t){let t=YO(e[r],NO);t&&(n[r]=t)}e.zone===!0&&(n.zone=!0);let r=ZO(e.stack,UO).map(e=>YO(e,PO)).filter(Boolean);r.length&&(n.stack=r);let i=Math.floor(JO(e.more));return i&&(n.more=i),n}function ak(e){if(!qO(e))return null;let t=YO(e.name,NO);if(!t)return null;let n=e.strategy;return{name:t,refreshed:Math.floor(JO(e.refreshed)),unchanged:Math.floor(JO(e.unchanged)),...n===`OnPush`||n===`Eager`?{strategy:n}:{}}}function ok(e){if(!qO(e))return null;let t=YO(e.name,NO),n=YO(e.input,NO);if(!t||!n)return null;let r=YO(e.parent,NO);return{name:t,input:n,...r?{parent:r}:{},inPlace:Math.floor(JO(e.inPlace)),sameContents:Math.floor(JO(e.sameContents))}}function sk(e){if(!qO(e))return null;let t=YO(e.name,NO);if(!t)return null;let n=ZO(e.tasks,3).map(e=>YO(e,NO)).filter(Boolean);return{name:t,ticks:Math.floor(JO(e.ticks)),...n.length?{tasks:n}:{}}}function ck(e){if(!qO(e))return;let t={};if(qO(e.causes))for(let n of tk){let r=Math.floor(JO(e.causes[n]));r&&(t[n]=r)}let n=ZO(e.components,LO).map(ak).filter(e=>!!e),r=ZO(e.inputs,WO).map(ok).filter(e=>!!e),i=ZO(e.zone,WO).map(sk).filter(e=>!!e),a=Math.floor(JO(e.major));return{triggers:e.triggers===!0,waste:e.waste===!0,...a&&a<1e3?{major:a}:{},causes:t,components:n,...r.length?{inputs:r}:{},...i.length?{zone:i}:{},...typeof e.zoneJs==`boolean`?{zoneJs:e.zoneJs}:{}}}function lk(e){let t=[],n=e.component?` in ${e.component}${e.listener?` (${e.listener})`:``}`:``;switch(e.kind){case`event`:t.push(`${e.event??`Template listener`}${e.target?` on ${e.target}`:``}${n}`);break;case`http`:t.push(`HTTP response${n}`);break;case`timer`:t.push(`${e.task??`Timer`}${n}`);break;case`zone`:t.push(`zone.js tick with no Angular notification${e.task?` after ${e.task}`:``}`);break;case`tick`:t.push(`ApplicationRef.tick()${n}`);break;default:t.push(`${nk[e.kind]}${n}`)}return e.signal?t.push(e.signal===`?`?`wrote an unnamed signal`:`wrote signal ${e.signal}`):e.via&&e.via!==e.kind&&t.push(`via ${nk[e.via]}`),e.zone&&e.kind!==`zone`&&t.push(`run by zone.js`),e.more&&t.push(`${e.more} more notification${e.more===1?``:`s`}`),t.join(`, `)}function uk(e){if(!e)return[];let t=[],n=(e.major??0)>=22;for(let r of e.components){if(r.refreshed<10)continue;let e=r.refreshed-r.unchanged;if(e/r.refreshed>.2)continue;let i=`refreshed ${r.refreshed} times and changed something in ${e}`;r.strategy===`Eager`?t.push({name:r.name,kind:`on-push`,text:n?`${r.name} was ${i}. It opts out of OnPush, which is the default from Angular 22: remove \`changeDetection: ChangeDetectionStrategy.Eager\` (or \`Default\`) so Angular skips it until an input, event, signal or markForCheck marks it.`:`${r.name} was ${i}. Add \`changeDetection: ChangeDetectionStrategy.OnPush\` so Angular skips it until an input, event, signal or markForCheck marks it.`}):r.strategy===`OnPush`&&t.push({name:r.name,kind:`already-on-push`,text:`${r.name} was ${i}, and it is already OnPush${n?` (the default from Angular 22)`:``}. Something keeps marking it: an input that gets a new reference each time, an event or output in it, markForCheck, or a signal it reads that is set to an equal value.`})}for(let n of e.inputs??[]){let e=n.parent?` set by ${n.parent}`:``;n.inPlace&&t.push({name:n.name,kind:`in-place`,text:`Input ${n.input} of ${n.name}${e} changed in place ${n.inPlace} time${n.inPlace===1?``:`s`}: same reference, different contents. OnPush components, computed and signal equality don't see that. Pass a new object or array instead of mutating it.`}),n.sameContents&&t.push({name:n.name,kind:`same-contents`,text:`Input ${n.input} of ${n.name}${e} got a new reference with the same contents ${n.sameContents} time${n.sameContents===1?``:`s`}, so Angular refreshed ${n.name} for nothing. Keep the reference when nothing changed, for example with a computed instead of a method call in the template.`})}for(let n of e.zone??[]){let e=n.tasks?.length?` (after ${n.tasks.join(`, `)})`:``;t.push({name:n.name,kind:`zone`,text:`${n.name} changed in ${n.ticks} tick${n.ticks===1?``:`s`} that only zone.js started${e}. Without zone.js it would not update: keep that state in a signal, or call markForCheck after changing it.`})}return t}function dk(e){let t=QO(e);return!t||!qO(e)?null:{...t,maxMs:JO(e.maxMs),cycles:JO(e.cycles)}}function fk(e){if(!qO(e))return null;let t=YO(e.name,NO),n=YO(e.hook,FO);if(!t||!n)return null;let{calls:r,ms:i,maxMs:a}=e;return{name:t,hook:n,calls:JO(r),ms:JO(i),maxMs:JO(a)}}function pk(e){if(!qO(e))return null;let t=YO(e.name,NO);if(!t)return null;let n=YO(e.listener,NO);return{name:t,...n?{listener:n}:{},calls:JO(e.calls),ms:JO(e.ms),maxMs:JO(e.maxMs)}}function mk(e){if(qO(e)&&JO(e.runs))return{runs:JO(e.runs),ms:JO(e.ms),maxMs:JO(e.maxMs)}}function hk(e,t){if(!qO(e))return null;let n=ZO(e.spanNames,BO).map(e=>YO(e,PO)),r=Array.isArray(e.cycles)?e.cycles.slice(-Math.min(t,zO)).map(e=>ek(e,n.length)).filter(e=>!!e):[],i={},a=0;if(qO(e.hosts)){let t=Object.entries(e.hosts);a=Math.max(0,t.length-RO);for(let[e,n]of t.slice(0,RO))e.length<50&&JO(n)&&(i[e]=JO(n))}let o=Array.isArray(e.components)?e.components:[],s=Math.floor(JO(e.droppedClasses))+Math.max(0,o.length-LO),c=Math.floor(JO(e.droppedHosts))+a,l=ZO(e.hooks,HO).map(fk).filter(e=>!!e),u=ZO(e.outputs,HO).map(pk).filter(e=>!!e),d=Math.max(0,ZO(e.hooks,1/0).length-HO)+Math.max(0,ZO(e.outputs,1/0).length-HO),f=Math.floor(JO(e.droppedTimings))+d,p=mk(e.afterRender),m=r.some(e=>e.spans?.length),h=ck(e.diagnosis);return{recording:e.recording===!0,startedAt:typeof e.startedAt==`number`&&e.startedAt<=MO?JO(e.startedAt):null,dropped:JO(e.dropped),cycles:r,components:o.slice(0,LO).map(dk).filter(e=>!!e),...s?{droppedClasses:s}:{},hosts:i,...c?{droppedHosts:c}:{},...l.length?{hooks:l}:{},...u.length?{outputs:u}:{},...f?{droppedTimings:f}:{},...p?{afterRender:p}:{},...m?{spanNames:n}:{},...h?{diagnosis:h}:{}}}var gk=`pangular-inspector/change-detection`;function _k(e,t,n=Date.now()){return{format:gk,version:1,exportedAt:n,pageId:t,recording:{...hk(e,zO)??e,recording:!1,hosts:{}}}}function vk(e,t){if(e.length>2e7||e.length*3>2e7&&new TextEncoder().encode(e).byteLength>2e7)return{ok:!1,error:`The file is larger than 20 MB.`};let n;try{n=JSON.parse(e)}catch{return{ok:!1,error:`The file is not valid JSON.`}}if(!qO(n))return{ok:!1,error:`The file is not a recording.`};if(n.format!==void 0&&n.format!==`pangular-inspector/change-detection`)return{ok:!1,error:`The file is not a change detection recording.`};let r=qO(n.recording)?n.recording:n;if(!Array.isArray(r.cycles))return{ok:!1,error:`The file has no change detection cycles.`};let i=hk(r,t);if(!i)return{ok:!1,error:`The file is not a recording.`};let a=YO(n.pageId??r.pageId,49)||`imported`,o=XO(n.exportedAt);return{ok:!0,pageId:a,...o?{exportedAt:o}:{},recording:{...i,recording:!1}}}var yk=1,bk=1,xk=2,Sk={c:`component`,h:`lifecycle-hook`,r:`after-render`,o:`output`},Ck=e=>Math.round(e*1e6)/1e3;function wk(e,t){let n=e.spanNames??[],r=e.cycles[0]?.at??0,i=e.startedAt??r,a=[],o=0,s=0;for(let t of e.cycles){let e=t.t??Math.max(0,t.at-i),r=e+t.ms;a.push({name:`Change detection #${t.id}`,cat:`change-detection`,ph:`X`,pid:yk,tid:bk,ts:Ck(e),dur:Ck(t.ms),args:{checks:t.checks,passes:t.passes,...t.trigger?{trigger:t.trigger}:{},...t.hookMs?{hookMs:t.hookMs}:{},...t.afterRenderMs?{afterRenderMs:t.afterRenderMs}:{},...t.outputMs?{outputMs:t.outputMs}:{},...t.cause?{cause:lk(t.cause)}:{},...t.unchanged?{unchanged:t.unchanged}:{},slowest:t.components.map(e=>`${e.name} ${e.checks}x ${e.ms}ms`)}}),s+=t.droppedSpans??0;let c=[{end:r}],l=[...t.spans??[]].sort((e,t)=>e[1]-t[1]||t[2]-e[2]);for(let[r,i,s,u,d]of l){o++;let l=n[r]??`?`;if(d===GO.output){let n=e+i;a.push({name:l,cat:Sk[d],ph:`X`,pid:yk,tid:xk,ts:Ck(n),dur:Ck(i<0?Math.max(0,Math.min(s,-i)):s),args:{cycle:t.id}});continue}let f=Math.max(e,e+i);for(;c.length>1&&c.at(-1).end<=f;)c.pop();let p=c.at(-1).end,m=Math.min(f+s,p);me.ts??0));if(c<0)for(let e of a)e.ts=Ck((e.ts-c)/1e3);a.sort((e,t)=>e.ts-t.ts||t.dur-e.dur);let l=(e,t,n)=>({name:t,ph:`M`,pid:yk,tid:e,args:{name:n}});return{traceEvents:[l(0,`process_name`,`Angular change detection (page ${t})`),l(bk,`thread_name`,`Change detection`),l(xk,`thread_name`,`Outputs`),...a],displayTimeUnit:`ms`,otherData:{source:`Pangular Inspector change detection recording`,pageId:t,cycles:e.cycles.length,droppedCycles:e.dropped,spans:o,droppedSpans:s,...e.startedAt&&e.startedAt<=MO?{startedAt:new Date(e.startedAt).toISOString()}:{}}}}var Tk=16.6;function Ek(e){return e.ms>Tk}function Dk(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}function Ok(e,t){if(!t)return[...e];let n=Math.min(t.from,t.to),r=Math.max(t.from,t.to),i=e.filter(e=>e.id>=n&&e.id<=r);return i.length?i:[...e]}function kk(e){let t=new Map;for(let n of e)for(let e of n.components){let n=t.get(e.name);n?(n.checks+=e.checks,n.ms+=e.ms,n.maxMs=Math.max(n.maxMs,e.ms),n.cycles+=1):t.set(e.name,{name:e.name,checks:e.checks,ms:e.ms,maxMs:e.ms,cycles:1})}return[...t.values()].sort((e,t)=>t.ms-e.ms||e.name.localeCompare(t.name))}function Ak(e){let t=e.reduce((e,t)=>Math.max(e,t.ms),0);return Math.max(t,Tk*1.25)}function jk(e,t,n=3){let r=e.map(e=>({item:e,value:t(e)})).filter(e=>e.value>0).sort((e,t)=>t.value-e.value),i=r.reduce((e,t)=>e+t.value,0);if(!i)return[];let a=n/i,o=[],s=0,c=0,l=n,u=1,d=[],f=(e,t)=>{let n=e.reduce((e,t)=>e+t,0),r=Math.max(...e),i=Math.min(...e);return Math.max(t*t*r/(n*n),n*n/(t*t*i))},p=()=>{let e=d.reduce((e,t)=>e+t.area,0);if(l>=u){let t=e/u,n=c;for(let e of d){let r=e.area/t;o.push({item:e.item,x:s,y:n,w:t,h:r}),n+=r}s+=t,l-=t}else{let t=e/l,n=s;for(let e of d){let r=e.area/t;o.push({item:e.item,x:n,y:c,w:r,h:t}),n+=r}c+=t,u-=t}d=[]};for(let e of r){let t=e.value*a,n=Math.min(l,u),r=d.map(e=>e.area);d.length&&f([...r,t],n)>f(r,n)&&p(),d.push({item:e.item,area:t})}return d.length&&p(),o.map(e=>({item:e.item,x:e.x/n*100,y:e.y*100,w:e.w/n*100,h:e.h*100}))}var Mk={c:`component`,h:`hook`,r:`afterRender`,o:`output`};function Nk(e,t){if(t===`c`)return e||null;if(t===`h`){let t=e.lastIndexOf(`.`);return t>0?e.slice(0,t):null}if(t===`o`){let t=e.indexOf(` (`),n=t>0?e.slice(0,t):e;return n&&n!==`?`?n:null}return null}function Pk(e,t){let n=e.filter(e=>e.spans?.length);if(!n.length)return null;let r=n.map(e=>{let t=e.spans,n=Math.min(0,...t.map(e=>e[1])),r=Math.max(e.ms,...t.map(e=>e[1]+e[2]));return{cycle:e,spans:t,from:n,width:Math.max(r-n,.001)}}),i=r.reduce((e,t)=>e+t.width,0),a=[],o=[],s=0,c=0;for(let{cycle:e,spans:n,from:l,width:u}of r){o.push({id:e.id,x:s/i*100,w:u/i*100,droppedSpans:e.droppedSpans??0});let r=[...n].sort((e,t)=>e[1]-t[1]||e[3]-t[3]),d=[];for(let[n,o,u,f,p]of r){let r=t[n]??`unknown`,m=d[f-1],h=f>0&&m!==void 0&&ot.kind,Ik=(e,t)=>t.name,Lk=(e,t)=>t.name+`.`+t.input;function Rk(e,t){e&1&&(z(0,`p`,3),K(1,` The page has no Angular change detection scheduler the overlay could find (it needs Angular 18 or later), so cycles have no cause. `),B())}function zk(e,t){if(e&1&&(z(0,`tr`)(1,`td`),K(2),B(),z(3,`td`,6),K(4),B()()),e&2){let e=t.$implicit;O(2),q(e.label),O(2),q(e.count)}}function Bk(e,t){if(e&1&&(z(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Trigger`),B(),z(5,`th`,5),K(6,`Cycles`),B()()(),z(7,`tbody`),N(8,zk,5,2,`tr`,null,Fk),B()()),e&2){let e=W(2);O(8),P(e.causes())}}function Vk(e,t){e&1&&(z(0,`p`,3),K(1,`No cycle has a cause yet.`),B())}function Hk(e,t){if(e&1&&(z(0,`tr`)(1,`td`,7),K(2),B(),z(3,`td`,6),K(4),B(),z(5,`td`,7),K(6),B()()),e&2){let e=t.$implicit;O(2),q(e.name),O(2),q(e.ticks),O(2),q(e.tasks?.join(`, `))}}function Uk(e,t){if(e&1&&(z(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Component`),B(),z(5,`th`,5),K(6,`Zone-only ticks`),B(),z(7,`th`,4),K(8,`After`),B()()(),z(9,`tbody`),N(10,Hk,7,3,`tr`,null,Ik),B()()),e&2){let e=W(3);O(10),P(e.zone())}}function Wk(e,t){if(e&1&&(z(0,`p`,3),K(1),B()),e&2){let e=W(3);O(),q(e.zoneNote())}}function Gk(e,t){if(e&1&&(z(0,`div`)(1,`h4`),K(2,`Depends on zone.js`),B(),j(3,Uk,12,0,`table`)(4,Wk,2,1,`p`,3),B()),e&2){let e=W(),t=W();O(3),M(t.zone().length?3:e.triggers?4:-1)}}function Kk(e,t){e&1&&(z(0,`p`,3),K(1,`The page can't watch DOM updates, so wasted checks are not counted.`),B())}function qk(e,t){if(e&1&&(z(0,`tr`)(1,`td`,7),K(2),B(),z(3,`td`,6),K(4),B(),z(5,`td`,6),K(6),B(),z(7,`td`),K(8),B()()),e&2){let e=t.$implicit,n=W(3);O(2),q(e.name),O(2),q(e.refreshed),O(2),Y(``,e.unchanged,` (`,n.share(e.unchanged,e.refreshed),`)`),O(2),q(e.strategy??`Unknown`)}}function Jk(e,t){if(e&1&&(z(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Component`),B(),z(5,`th`,5),K(6,`Refreshed`),B(),z(7,`th`,5),K(8,`Changed nothing`),B(),z(9,`th`,4),K(10,`Strategy`),B()()(),z(11,`tbody`),N(12,qk,9,5,`tr`,null,Ik),B()()),e&2){let e=W(2);O(12),P(e.wasted())}}function Yk(e,t){e&1&&(z(0,`p`,3),K(1,`Every refreshed check changed something.`),B())}function Xk(e,t){if(e&1&&(z(0,`tr`)(1,`td`,7),K(2),B(),z(3,`td`,7),K(4),B(),z(5,`td`,6),K(6),B(),z(7,`td`,6),K(8),B()()),e&2){let e=t.$implicit;O(2),Y(``,e.name,`.`,e.input),O(2),q(e.parent??`Unknown`),O(2),q(e.inPlace),O(2),q(e.sameContents)}}function Zk(e,t){if(e&1&&(z(0,`h4`),K(1,`Inputs that break OnPush`),B(),z(2,`table`)(3,`thead`)(4,`tr`)(5,`th`,4),K(6,`Input`),B(),z(7,`th`,4),K(8,`Set by`),B(),z(9,`th`,5),K(10,`Changed in place`),B(),z(11,`th`,5),K(12,`Same contents, new reference`),B()()(),z(13,`tbody`),N(14,Xk,9,5,`tr`,null,Lk),B()()),e&2){let e=W(2);O(14),P(e.inputs())}}function Qk(e,t){if(e&1&&(z(0,`li`),K(1),B()),e&2){let e=t.$implicit;O(),q(e.text)}}function $k(e,t){if(e&1&&(z(0,`h4`),K(1,`Hints`),B(),z(2,`ul`,8),N(3,Qk,2,1,`li`,null,gg),B()),e&2){let e=W(2);O(3),P(e.hints())}}function eA(e,t){if(e&1&&(z(0,`section`,0)(1,`h3`,1),K(2,`Why it ran and what it wasted`),B(),z(3,`div`,2)(4,`div`)(5,`h4`),K(6,`What started the cycles`),B(),j(7,Rk,2,0,`p`,3)(8,Bk,10,0,`table`)(9,Vk,2,0,`p`,3),B(),j(10,Gk,5,1,`div`),B(),z(11,`h4`),K(12,`Wasted checks`),B(),j(13,Kk,2,0,`p`,3)(14,Jk,14,0,`table`)(15,Yk,2,0,`p`,3),j(16,Zk,16,0),j(17,$k,5,0),B()),e&2){let e=t,n=W();O(7),M(e.triggers?n.causes().length?8:9:7),O(3),M(n.hasZone()?10:-1),O(3),M(e.waste?n.wasted().length?14:15:13),O(3),M(n.inputs().length?16:-1),O(),M(n.hints().length?17:-1)}}var tA=10,nA=class e{page=$(null);diagnosis=X(()=>this.page()?.diagnosis??null);causes=X(()=>{let e=this.diagnosis()?.causes??{};return tk.filter(t=>e[t]).map(t=>({kind:t,label:nk[t],count:e[t]}))});zone=X(()=>(this.diagnosis()?.zone??[]).slice(0,tA));zoneTicks=X(()=>this.diagnosis()?.causes.zone??0);hasZone=X(()=>this.diagnosis()?.zoneJs??(this.zone().length>0||this.zoneTicks()>0));zoneNote=X(()=>{let e=this.zoneTicks();return e?`${e} ${e===1?`tick`:`ticks`} came from zone.js alone, and no component changed in them.`:`No component changed in a tick only zone.js started.`});wasted=X(()=>(this.diagnosis()?.components??[]).filter(e=>e.unchanged>0).slice(0,tA));inputs=X(()=>(this.diagnosis()?.inputs??[]).slice(0,tA));hints=X(()=>uk(this.diagnosis()??void 0).slice(0,tA));share(e,t){return t?`${Math.round(e/t*100)}%`:`0%`}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-diagnosis`]],inputs:{page:[1,`page`]},decls:1,vars:1,consts:[[`aria-labelledby`,`cd-diagnosis-heading`,1,`diagnosis`],[`id`,`cd-diagnosis-heading`],[1,`grid`],[1,`note`],[`scope`,`col`],[`scope`,`col`,1,`num`],[1,`num`],[1,`mono`],[1,`hints`]],template:function(e,t){if(e&1&&j(0,eA,18,5,`section`,0),e&2){let e;M((e=t.diagnosis())?0:-1,e)}},styles:[`[_nghost-%COMP%] { +}`]})},MO=864e13,NO=200,PO=300,FO=100,IO=10,LO=100,RO=2e3,zO=2e3,BO=4e3,VO=1e3,HO=100,UO=3,WO=50,GO={component:`c`,hook:`h`,afterRender:`r`,output:`o`},KO=Object.values(GO),qO=e=>!!e&&typeof e==`object`&&!Array.isArray(e),JO=e=>typeof e==`number`&&Number.isFinite(e)&&e>=0?e:0,YO=(e,t)=>typeof e==`string`?e.slice(0,t):``,XO=e=>JO(e)>0?JO(e):void 0,ZO=(e,t)=>Array.isArray(e)?e.slice(0,t):[];function QO(e){if(!qO(e))return null;let t=YO(e.name,NO);return t?{name:t,checks:JO(e.checks),ms:JO(e.ms)}:null}function $O(e,t){if(!Array.isArray(e)||e.length!==5)return null;let[n,r,i,a,o]=e;return typeof n!=`number`||!Number.isInteger(n)||n<0||n>=t||typeof r!=`number`||!Number.isFinite(r)||Math.abs(r)>1e7||typeof a!=`number`||!Number.isInteger(a)||a<0||a>VO||typeof o!=`string`||!KO.includes(o)?null:[n,r,JO(i),a,o]}function ek(e,t){if(!qO(e)||typeof e.id!=`number`)return null;let n=ZO(e.components,IO).map(QO).filter(e=>!!e),r=YO(e.trigger,PO),i=ZO(e.spans,40).map(e=>$O(e,t)).filter(e=>!!e),a=Array.isArray(e.spans)?e.spans.length-40:0,o=Math.floor(JO(e.droppedSpans))+Math.max(0,a),s={t:typeof e.t==`number`?JO(e.t):void 0,hookMs:XO(e.hookMs),afterRenderMs:XO(e.afterRenderMs),outputMs:XO(e.outputMs)},c=ik(e.cause),l=XO(e.refreshed),u=XO(e.unchanged);return{id:JO(e.id),at:JO(e.at),ms:JO(e.ms),passes:JO(e.passes),...r?{trigger:r}:{},checks:JO(e.checks),components:n,...Object.fromEntries(Object.entries(s).filter(([,e])=>e!==void 0)),...i.length?{spans:i}:{},...o?{droppedSpans:o}:{},...c?{cause:c}:{},...l?{refreshed:l}:{},...u?{unchanged:u}:{}}}var tk=[`event`,`http`,`timer`,`signal`,`effect`,`markForCheck`,`input`,`view`,`tick`,`zone`,`unknown`],nk={event:`Event`,http:`HTTP response`,timer:`Timer`,signal:`Signal write`,effect:`Effect`,markForCheck:`markForCheck`,input:`setInput`,view:`View change`,tick:`ApplicationRef.tick`,zone:`zone.js only`,unknown:`Unknown`},rk=e=>typeof e==`string`&&tk.includes(e);function ik(e){if(!qO(e)||!rk(e.kind))return;let t=[`component`,`listener`,`event`,`target`,`signal`,`task`],n={kind:e.kind};rk(e.via)&&(n.via=e.via);for(let r of t){let t=YO(e[r],NO);t&&(n[r]=t)}e.zone===!0&&(n.zone=!0);let r=ZO(e.stack,UO).map(e=>YO(e,PO)).filter(Boolean);r.length&&(n.stack=r);let i=Math.floor(JO(e.more));return i&&(n.more=i),n}function ak(e){if(!qO(e))return null;let t=YO(e.name,NO);if(!t)return null;let n=e.strategy;return{name:t,refreshed:Math.floor(JO(e.refreshed)),unchanged:Math.floor(JO(e.unchanged)),...n===`OnPush`||n===`Eager`?{strategy:n}:{}}}function ok(e){if(!qO(e))return null;let t=YO(e.name,NO),n=YO(e.input,NO);if(!t||!n)return null;let r=YO(e.parent,NO);return{name:t,input:n,...r?{parent:r}:{},inPlace:Math.floor(JO(e.inPlace)),sameContents:Math.floor(JO(e.sameContents))}}function sk(e){if(!qO(e))return null;let t=YO(e.name,NO);if(!t)return null;let n=ZO(e.tasks,3).map(e=>YO(e,NO)).filter(Boolean);return{name:t,ticks:Math.floor(JO(e.ticks)),...n.length?{tasks:n}:{}}}function ck(e){if(!qO(e))return;let t={};if(qO(e.causes))for(let n of tk){let r=Math.floor(JO(e.causes[n]));r&&(t[n]=r)}let n=ZO(e.components,LO).map(ak).filter(e=>!!e),r=ZO(e.inputs,WO).map(ok).filter(e=>!!e),i=ZO(e.zone,WO).map(sk).filter(e=>!!e),a=Math.floor(JO(e.major));return{triggers:e.triggers===!0,waste:e.waste===!0,...a&&a<1e3?{major:a}:{},causes:t,components:n,...r.length?{inputs:r}:{},...i.length?{zone:i}:{},...typeof e.zoneJs==`boolean`?{zoneJs:e.zoneJs}:{}}}function lk(e){let t=[],n=e.component?` in ${e.component}${e.listener?` (${e.listener})`:``}`:``;switch(e.kind){case`event`:t.push(`${e.event??`Template listener`}${e.target?` on ${e.target}`:``}${n}`);break;case`http`:t.push(`HTTP response${n}`);break;case`timer`:t.push(`${e.task??`Timer`}${n}`);break;case`zone`:t.push(`zone.js tick with no Angular notification${e.task?` after ${e.task}`:``}`);break;case`tick`:t.push(`ApplicationRef.tick()${n}`);break;default:t.push(`${nk[e.kind]}${n}`)}return e.signal?t.push(e.signal===`?`?`wrote an unnamed signal`:`wrote signal ${e.signal}`):e.via&&e.via!==e.kind&&t.push(`via ${nk[e.via]}`),e.zone&&e.kind!==`zone`&&t.push(`run by zone.js`),e.more&&t.push(`${e.more} more notification${e.more===1?``:`s`}`),t.join(`, `)}function uk(e){if(!e)return[];let t=[],n=(e.major??0)>=22;for(let r of e.components){if(r.refreshed<10)continue;let e=r.refreshed-r.unchanged;if(e/r.refreshed>.2)continue;let i=`refreshed ${r.refreshed} times and changed something in ${e}`;r.strategy===`Eager`?t.push({name:r.name,kind:`on-push`,text:n?`${r.name} was ${i}. It opts out of OnPush, which is the default from Angular 22: remove \`changeDetection: ChangeDetectionStrategy.Eager\` (or \`Default\`) so Angular skips it until an input, event, signal or markForCheck marks it.`:`${r.name} was ${i}. Add \`changeDetection: ChangeDetectionStrategy.OnPush\` so Angular skips it until an input, event, signal or markForCheck marks it.`}):r.strategy===`OnPush`&&t.push({name:r.name,kind:`already-on-push`,text:`${r.name} was ${i}, and it is already OnPush${n?` (the default from Angular 22)`:``}. Something keeps marking it: an input that gets a new reference each time, an event or output in it, markForCheck, or a signal it reads that is set to an equal value.`})}for(let n of e.inputs??[]){let e=n.parent?` set by ${n.parent}`:``;n.inPlace&&t.push({name:n.name,kind:`in-place`,text:`Input ${n.input} of ${n.name}${e} changed in place ${n.inPlace} time${n.inPlace===1?``:`s`}: same reference, different contents. OnPush components, computed and signal equality don't see that. Pass a new object or array instead of mutating it.`}),n.sameContents&&t.push({name:n.name,kind:`same-contents`,text:`Input ${n.input} of ${n.name}${e} got a new reference with the same contents ${n.sameContents} time${n.sameContents===1?``:`s`}, so Angular refreshed ${n.name} for nothing. Keep the reference when nothing changed, for example with a computed instead of a method call in the template.`})}for(let n of e.zone??[]){let e=n.tasks?.length?` (after ${n.tasks.join(`, `)})`:``;t.push({name:n.name,kind:`zone`,text:`${n.name} changed in ${n.ticks} tick${n.ticks===1?``:`s`} that only zone.js started${e}. Without zone.js it would not update: keep that state in a signal, or call markForCheck after changing it.`})}return t}function dk(e){let t=QO(e);return!t||!qO(e)?null:{...t,maxMs:JO(e.maxMs),cycles:JO(e.cycles)}}function fk(e){if(!qO(e))return null;let t=YO(e.name,NO),n=YO(e.hook,FO);if(!t||!n)return null;let{calls:r,ms:i,maxMs:a}=e;return{name:t,hook:n,calls:JO(r),ms:JO(i),maxMs:JO(a)}}function pk(e){if(!qO(e))return null;let t=YO(e.name,NO);if(!t)return null;let n=YO(e.listener,NO);return{name:t,...n?{listener:n}:{},calls:JO(e.calls),ms:JO(e.ms),maxMs:JO(e.maxMs)}}function mk(e){if(qO(e)&&JO(e.runs))return{runs:JO(e.runs),ms:JO(e.ms),maxMs:JO(e.maxMs)}}function hk(e,t){if(!qO(e))return null;let n=ZO(e.spanNames,BO).map(e=>YO(e,PO)),r=Array.isArray(e.cycles)?e.cycles.slice(-Math.min(t,zO)).map(e=>ek(e,n.length)).filter(e=>!!e):[],i={},a=0;if(qO(e.hosts)){let t=Object.entries(e.hosts);a=Math.max(0,t.length-RO);for(let[e,n]of t.slice(0,RO))e.length<50&&JO(n)&&(i[e]=JO(n))}let o=Array.isArray(e.components)?e.components:[],s=Math.floor(JO(e.droppedClasses))+Math.max(0,o.length-LO),c=Math.floor(JO(e.droppedHosts))+a,l=ZO(e.hooks,HO).map(fk).filter(e=>!!e),u=ZO(e.outputs,HO).map(pk).filter(e=>!!e),d=Math.max(0,ZO(e.hooks,1/0).length-HO)+Math.max(0,ZO(e.outputs,1/0).length-HO),f=Math.floor(JO(e.droppedTimings))+d,p=mk(e.afterRender),m=r.some(e=>e.spans?.length),h=ck(e.diagnosis);return{recording:e.recording===!0,startedAt:typeof e.startedAt==`number`&&e.startedAt<=MO?JO(e.startedAt):null,dropped:JO(e.dropped),cycles:r,components:o.slice(0,LO).map(dk).filter(e=>!!e),...s?{droppedClasses:s}:{},hosts:i,...c?{droppedHosts:c}:{},...l.length?{hooks:l}:{},...u.length?{outputs:u}:{},...f?{droppedTimings:f}:{},...p?{afterRender:p}:{},...m?{spanNames:n}:{},...h?{diagnosis:h}:{}}}var gk=`pangular-inspector/change-detection`;function _k(e,t,n=Date.now()){return{format:gk,version:1,exportedAt:n,pageId:t,recording:{...hk(e,zO)??e,recording:!1,hosts:{}}}}function vk(e,t){if(e.length>2e7||e.length*3>2e7&&new TextEncoder().encode(e).byteLength>2e7)return{ok:!1,error:`The file is larger than 20 MB.`};let n;try{n=JSON.parse(e)}catch{return{ok:!1,error:`The file is not valid JSON.`}}if(!qO(n))return{ok:!1,error:`The file is not a recording.`};if(n.format!==void 0&&n.format!==`pangular-inspector/change-detection`)return{ok:!1,error:`The file is not a change detection recording.`};let r=qO(n.recording)?n.recording:n;if(!Array.isArray(r.cycles))return{ok:!1,error:`The file has no change detection cycles.`};let i=hk(r,t);if(!i)return{ok:!1,error:`The file is not a recording.`};let a=YO(n.pageId??r.pageId,49)||`imported`,o=XO(n.exportedAt);return{ok:!0,pageId:a,...o?{exportedAt:o}:{},recording:{...i,recording:!1}}}var yk=1,bk=1,xk=2,Sk={c:`component`,h:`lifecycle-hook`,r:`after-render`,o:`output`},Ck=e=>Math.round(e*1e6)/1e3;function wk(e,t){let n=e.spanNames??[],r=e.cycles[0]?.at??0,i=e.startedAt??r,a=[],o=0,s=0;for(let t of e.cycles){let e=t.t??Math.max(0,t.at-i),r=e+t.ms;a.push({name:`Change detection #${t.id}`,cat:`change-detection`,ph:`X`,pid:yk,tid:bk,ts:Ck(e),dur:Ck(t.ms),args:{checks:t.checks,passes:t.passes,...t.trigger?{trigger:t.trigger}:{},...t.hookMs?{hookMs:t.hookMs}:{},...t.afterRenderMs?{afterRenderMs:t.afterRenderMs}:{},...t.outputMs?{outputMs:t.outputMs}:{},...t.cause?{cause:lk(t.cause)}:{},...t.unchanged?{unchanged:t.unchanged}:{},slowest:t.components.map(e=>`${e.name} ${e.checks}x ${e.ms}ms`)}}),s+=t.droppedSpans??0;let c=[{end:r}],l=[...t.spans??[]].sort((e,t)=>e[1]-t[1]||t[2]-e[2]);for(let[r,i,s,u,d]of l){o++;let l=n[r]??`?`;if(d===GO.output){let n=e+i;a.push({name:l,cat:Sk[d],ph:`X`,pid:yk,tid:xk,ts:Ck(n),dur:Ck(i<0?Math.max(0,Math.min(s,-i)):s),args:{cycle:t.id}});continue}let f=Math.max(e,e+i);for(;c.length>1&&c.at(-1).end<=f;)c.pop();let p=c.at(-1).end,m=Math.min(f+s,p);me.ts??0));if(c<0)for(let e of a)e.ts=Ck((e.ts-c)/1e3);a.sort((e,t)=>e.ts-t.ts||t.dur-e.dur);let l=(e,t,n)=>({name:t,ph:`M`,pid:yk,tid:e,args:{name:n}});return{traceEvents:[l(0,`process_name`,`Angular change detection (page ${t})`),l(bk,`thread_name`,`Change detection`),l(xk,`thread_name`,`Outputs`),...a],displayTimeUnit:`ms`,otherData:{source:`Pangular Inspector change detection recording`,pageId:t,cycles:e.cycles.length,droppedCycles:e.dropped,spans:o,droppedSpans:s,...e.startedAt&&e.startedAt<=MO?{startedAt:new Date(e.startedAt).toISOString()}:{}}}}var Tk=16.6;function Ek(e){return e.ms>Tk}function Dk(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}function Ok(e,t){if(!t)return[...e];let n=Math.min(t.from,t.to),r=Math.max(t.from,t.to),i=e.filter(e=>e.id>=n&&e.id<=r);return i.length?i:[...e]}function kk(e){let t=new Map;for(let n of e)for(let e of n.components){let n=t.get(e.name);n?(n.checks+=e.checks,n.ms+=e.ms,n.maxMs=Math.max(n.maxMs,e.ms),n.cycles+=1):t.set(e.name,{name:e.name,checks:e.checks,ms:e.ms,maxMs:e.ms,cycles:1})}return[...t.values()].sort((e,t)=>t.ms-e.ms||e.name.localeCompare(t.name))}function Ak(e){let t=e.reduce((e,t)=>Math.max(e,t.ms),0);return Math.max(t,Tk*1.25)}function jk(e,t,n=3){let r=e.map(e=>({item:e,value:t(e)})).filter(e=>e.value>0).sort((e,t)=>t.value-e.value),i=r.reduce((e,t)=>e+t.value,0);if(!i)return[];let a=n/i,o=[],s=0,c=0,l=n,u=1,d=[],f=(e,t)=>{let n=e.reduce((e,t)=>e+t,0),r=Math.max(...e),i=Math.min(...e);return Math.max(t*t*r/(n*n),n*n/(t*t*i))},p=()=>{let e=d.reduce((e,t)=>e+t.area,0);if(l>=u){let t=e/u,n=c;for(let e of d){let r=e.area/t;o.push({item:e.item,x:s,y:n,w:t,h:r}),n+=r}s+=t,l-=t}else{let t=e/l,n=s;for(let e of d){let r=e.area/t;o.push({item:e.item,x:n,y:c,w:r,h:t}),n+=r}c+=t,u-=t}d=[]};for(let e of r){let t=e.value*a,n=Math.min(l,u),r=d.map(e=>e.area);d.length&&f([...r,t],n)>f(r,n)&&p(),d.push({item:e.item,area:t})}return d.length&&p(),o.map(e=>({item:e.item,x:e.x/n*100,y:e.y*100,w:e.w/n*100,h:e.h*100}))}var Mk={c:`component`,h:`hook`,r:`afterRender`,o:`output`};function Nk(e,t){if(t===`c`)return e||null;if(t===`h`){let t=e.lastIndexOf(`.`);return t>0?e.slice(0,t):null}if(t===`o`){let t=e.indexOf(` (`),n=t>0?e.slice(0,t):e;return n&&n!==`?`?n:null}return null}function Pk(e,t){let n=e.filter(e=>e.spans?.length);if(!n.length)return null;let r=n.map(e=>{let t=e.spans,n=Math.min(0,...t.map(e=>e[1])),r=Math.max(e.ms,...t.map(e=>e[1]+e[2]));return{cycle:e,spans:t,from:n,width:Math.max(r-n,.001)}}),i=r.reduce((e,t)=>e+t.width,0),a=[],o=[],s=0,c=0;for(let{cycle:e,spans:n,from:l,width:u}of r){o.push({id:e.id,x:s/i*100,w:u/i*100,droppedSpans:e.droppedSpans??0});let r=[...n].sort((e,t)=>e[1]-t[1]||e[3]-t[3]),d=[];for(let[n,o,u,f,p]of r){let r=t[n]??`unknown`,m=d[f-1],h=f>0&&m!==void 0&&ot.kind,Ik=(e,t)=>t.name,Lk=(e,t)=>t.name+`.`+t.input;function Rk(e,t){e&1&&(z(0,`p`,3),K(1,` The page has no Angular change detection scheduler the overlay could find (it needs Angular 18 or later), so cycles have no cause. `),B())}function zk(e,t){if(e&1&&(z(0,`tr`)(1,`td`),K(2),B(),z(3,`td`,6),K(4),B()()),e&2){let e=t.$implicit;O(2),q(e.label),O(2),q(e.count)}}function Bk(e,t){if(e&1&&(z(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Trigger`),B(),z(5,`th`,5),K(6,`Cycles`),B()()(),z(7,`tbody`),N(8,zk,5,2,`tr`,null,Fk),B()()),e&2){let e=W(2);O(8),P(e.causes())}}function Vk(e,t){e&1&&(z(0,`p`,3),K(1,`No cycle has a cause yet.`),B())}function Hk(e,t){if(e&1&&(z(0,`tr`)(1,`td`,7),K(2),B(),z(3,`td`,6),K(4),B(),z(5,`td`,7),K(6),B()()),e&2){let e=t.$implicit;O(2),q(e.name),O(2),q(e.ticks),O(2),q(e.tasks?.join(`, `))}}function Uk(e,t){if(e&1&&(z(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Component`),B(),z(5,`th`,5),K(6,`Zone-only ticks`),B(),z(7,`th`,4),K(8,`After`),B()()(),z(9,`tbody`),N(10,Hk,7,3,`tr`,null,Ik),B()()),e&2){let e=W(3);O(10),P(e.zone())}}function Wk(e,t){if(e&1&&(z(0,`p`,3),K(1),B()),e&2){let e=W(3);O(),q(e.zoneNote())}}function Gk(e,t){if(e&1&&(z(0,`div`)(1,`h4`),K(2,`Depends on zone.js`),B(),j(3,Uk,12,0,`table`)(4,Wk,2,1,`p`,3),B()),e&2){let e=W(),t=W();O(3),M(t.zone().length?3:e.triggers?4:-1)}}function Kk(e,t){e&1&&(z(0,`p`,3),K(1,`The page can't watch DOM updates, so wasted checks are not counted.`),B())}function qk(e,t){if(e&1&&(z(0,`tr`)(1,`td`,7),K(2),B(),z(3,`td`,6),K(4),B(),z(5,`td`,6),K(6),B(),z(7,`td`),K(8),B()()),e&2){let e=t.$implicit,n=W(3);O(2),q(e.name),O(2),q(e.refreshed),O(2),Y(``,e.unchanged,` (`,n.share(e.unchanged,e.refreshed),`)`),O(2),q(e.strategy??`Unknown`)}}function Jk(e,t){if(e&1&&(z(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Component`),B(),z(5,`th`,5),K(6,`Refreshed`),B(),z(7,`th`,5),K(8,`Changed nothing`),B(),z(9,`th`,4),K(10,`Strategy`),B()()(),z(11,`tbody`),N(12,qk,9,5,`tr`,null,Ik),B()()),e&2){let e=W(2);O(12),P(e.wasted())}}function Yk(e,t){e&1&&(z(0,`p`,3),K(1,`Every refreshed check changed something.`),B())}function Xk(e,t){if(e&1&&(z(0,`tr`)(1,`td`,7),K(2),B(),z(3,`td`,7),K(4),B(),z(5,`td`,6),K(6),B(),z(7,`td`,6),K(8),B()()),e&2){let e=t.$implicit;O(2),Y(``,e.name,`.`,e.input),O(2),q(e.parent??`Unknown`),O(2),q(e.inPlace),O(2),q(e.sameContents)}}function Zk(e,t){if(e&1&&(z(0,`h4`),K(1,`Inputs that break OnPush`),B(),z(2,`table`)(3,`thead`)(4,`tr`)(5,`th`,4),K(6,`Input`),B(),z(7,`th`,4),K(8,`Set by`),B(),z(9,`th`,5),K(10,`Changed in place`),B(),z(11,`th`,5),K(12,`Same contents, new reference`),B()()(),z(13,`tbody`),N(14,Xk,9,5,`tr`,null,Lk),B()()),e&2){let e=W(2);O(14),P(e.inputs())}}function Qk(e,t){if(e&1&&(z(0,`li`),K(1),B()),e&2){let e=t.$implicit;O(),q(e.text)}}function $k(e,t){if(e&1&&(z(0,`h4`),K(1,`Hints`),B(),z(2,`ul`,8),N(3,Qk,2,1,`li`,null,hg),B()),e&2){let e=W(2);O(3),P(e.hints())}}function eA(e,t){if(e&1&&(z(0,`section`,0)(1,`h3`,1),K(2,`Why it ran and what it wasted`),B(),z(3,`div`,2)(4,`div`)(5,`h4`),K(6,`What started the cycles`),B(),j(7,Rk,2,0,`p`,3)(8,Bk,10,0,`table`)(9,Vk,2,0,`p`,3),B(),j(10,Gk,5,1,`div`),B(),z(11,`h4`),K(12,`Wasted checks`),B(),j(13,Kk,2,0,`p`,3)(14,Jk,14,0,`table`)(15,Yk,2,0,`p`,3),j(16,Zk,16,0),j(17,$k,5,0),B()),e&2){let e=t,n=W();O(7),M(e.triggers?n.causes().length?8:9:7),O(3),M(n.hasZone()?10:-1),O(3),M(e.waste?n.wasted().length?14:15:13),O(3),M(n.inputs().length?16:-1),O(),M(n.hints().length?17:-1)}}var tA=10,nA=class e{page=$(null);diagnosis=X(()=>this.page()?.diagnosis??null);causes=X(()=>{let e=this.diagnosis()?.causes??{};return tk.filter(t=>e[t]).map(t=>({kind:t,label:nk[t],count:e[t]}))});zone=X(()=>(this.diagnosis()?.zone??[]).slice(0,tA));zoneTicks=X(()=>this.diagnosis()?.causes.zone??0);hasZone=X(()=>this.diagnosis()?.zoneJs??(this.zone().length>0||this.zoneTicks()>0));zoneNote=X(()=>{let e=this.zoneTicks();return e?`${e} ${e===1?`tick`:`ticks`} came from zone.js alone, and no component changed in them.`:`No component changed in a tick only zone.js started.`});wasted=X(()=>(this.diagnosis()?.components??[]).filter(e=>e.unchanged>0).slice(0,tA));inputs=X(()=>(this.diagnosis()?.inputs??[]).slice(0,tA));hints=X(()=>uk(this.diagnosis()??void 0).slice(0,tA));share(e,t){return t?`${Math.round(e/t*100)}%`:`0%`}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-diagnosis`]],inputs:{page:[1,`page`]},decls:1,vars:1,consts:[[`aria-labelledby`,`cd-diagnosis-heading`,1,`diagnosis`],[`id`,`cd-diagnosis-heading`],[1,`grid`],[1,`note`],[`scope`,`col`],[`scope`,`col`,1,`num`],[1,`num`],[1,`mono`],[1,`hints`]],template:function(e,t){if(e&1&&j(0,eA,18,5,`section`,0),e&2){let e;M((e=t.diagnosis())?0:-1,e)}},styles:[`[_nghost-%COMP%] { display: block; } @@ -955,7 +955,7 @@ td.mono[_ngcontent-%COMP%] { .hints[_ngcontent-%COMP%] li[_ngcontent-%COMP%] + li[_ngcontent-%COMP%] { margin-top: 4px; -}`]})},rA=(e,t)=>t.cycle.id,iA=(e,t)=>t.id;function aA(e,t){if(e&1){let e=V();z(0,`button`,27),U(`click`,function(){return w(e),T(W().showAll())}),K(1,`Show all cycles`),B()}}function oA(e,t){if(e&1&&Og(0,`div`,28),e&2){let e=t;y_(`left`,e.left,`%`)(`width`,e.width,`%`)}}function sA(e,t){if(e&1&&(z(0,`div`,29),Og(1,`span`,30),B()),e&2){let e=t.$implicit,n=W();G(`over`,e.over)(`out`,!n.inRange(e.index)&&!!n.range())(`active`,n.focused()&&n.active()===e.index),Pg(`id`,n.optionId(e.index)),A(`data-index`,e.index)(`aria-selected`,n.inRange(e.index))(`aria-label`,e.label),O(),y_(`height`,e.height,`%`)}}function cA(e,t){e&1&&(z(0,`span`,33),K(1,`over budget`),B())}function lA(e,t){if(e&1&&(z(0,`p`),K(1,` after `),z(2,`span`,35),K(3),B()()),e&2){let e=W();O(3),q(e.cycle.trigger)}}function uA(e,t){if(e&1&&(z(0,`p`,34)(1,`span`,36),K(2),B(),z(3,`span`),K(4),B()()),e&2){let e=t.$implicit,n=W(2);O(2),q(e.name),O(2),q(n.fmt(e.ms))}}function dA(e,t){if(e&1&&(z(0,`div`,31)(1,`p`,32)(2,`strong`),K(3),B(),z(4,`span`),K(5),B(),j(6,cA,2,0,`span`,33),B(),j(7,lA,4,1,`p`),z(8,`p`),K(9),B(),N(10,uA,5,2,`p`,34,gg),B()),e&2){let e=t,n=W();y_(`left`,e.left)(`right`,e.right),O(3),q(n.fmt(e.cycle.ms)),O(2),J(`cycle `,e.cycle.id),O(),M(e.over?6:-1),O(),M(e.cycle.trigger?7:-1),O(2),U_(` `,e.cycle.checks,` `,e.cycle.checks===1?`check`:`checks`,`, `,e.cycle.passes,` `,e.cycle.passes===1?`pass`:`passes`,` `),O(),P(e.top)}}function fA(e,t){if(e&1&&Og(0,`span`),e&2){let e=t.$implicit;G(`over`,e.over)}}function pA(e,t){if(e&1&&K(0),e&2){let e=t,n=W(2);Y(` `,e.name,` (`,n.fmt(e.ms),`) `)}}function mA(e,t){if(e&1&&(z(0,`tr`)(1,`td`,37),K(2),B(),z(3,`td`,37),K(4),B(),z(5,`td`),K(6),B(),z(7,`td`,37),K(8),B(),z(9,`td`,37),K(10),B(),z(11,`td`,35),K(12),B(),z(13,`td`,35),j(14,pA,1,2),B()()),e&2){let e,n=t.$implicit,r=W();O(2),q(n.id),O(2),q(r.fmt(n.ms)),O(2),q(r.isOver(n)?`Over`:`Within`),O(2),q(n.checks),O(2),q(n.passes),O(2),q(n.trigger??``),O(2),M((e=n.components[0])?14:-1,e)}}var hA=0,gA=80,_A=10,vA=class e{cycles=$([]);range=Ov(null);gapUntil=gA;budgetLabel=`${Tk} ms budget`;uid=`cd-chart-${hA++}`;hintId=`${this.uid}-hint`;active=D(null);anchor=null;dragging=!1;hover=D(null);focused=D(!1);max=X(()=>Ak(this.cycles()));budgetAt=X(()=>Tk/this.max()*100);bars=X(()=>{let e=this.max();return this.cycles().map((t,n)=>({cycle:t,index:n,height:t.ms/e*100,over:Ek(t),label:this.describe(t)}))});firstId=X(()=>this.cycles()[0]?.id??0);lastId=X(()=>this.cycles().at(-1)?.id??0);span=X(()=>{let e=this.range();if(!e)return null;let t=this.cycles(),n=Math.min(e.from,e.to),r=Math.max(e.from,e.to),i=t.findIndex(e=>e.id>=n),a=-1;for(let e=t.length-1;e>=0;e--)if(t[e].id<=r){a=e;break}return i<0||aOk(this.cycles(),this.range()));startId=X(()=>this.selected()[0]?.id??``);endId=X(()=>this.selected().at(-1)?.id??``);band=X(()=>{let e=this.span(),t=this.cycles().length;return!e||!t?null:{left:e.start/t*100,width:(e.end-e.start+1)/t*100}});summary=X(()=>{let e=this.selected(),t=e.filter(Ek).length;return`${this.span()?e.length===1?`Cycle ${e[0].id}`:`Cycles ${e[0].id} to ${e.at(-1).id} (${e.length})`:`All ${e.length} ${e.length===1?`cycle`:`cycles`}`}. ${t} over the ${Tk} ms budget.`});tableLabel=X(()=>this.span()?`Picked cycles, ${this.summary()}`:`All recorded cycles`);activeOptionId=X(()=>{let e=this.active();return this.focused()&&e!==null&&e{let e=this.hover()??(this.focused()?this.active():null),t=e===null?void 0:this.cycles()[e];return!t||e===null?null:{cycle:t,over:Ek(t),top:t.components.slice(0,3),...this.tipSide(e)}});tipSide(e){let t=this.cycles().length;return e+.5=t.start&&e<=t.end}describe(e){let t=[`Cycle ${e.id}`,Dk(e.ms)];Ek(e)&&t.push(`over budget`),e.trigger&&t.push(`after ${e.trigger}`),t.push(`${e.checks} ${e.checks===1?`check`:`checks`}`);let n=e.components[0];return n&&t.push(`slowest ${n.name} ${Dk(n.ms)}`),t.join(`, `)}select(e,t){let n=this.cycles(),r=n[Math.min(e,t)],i=n[Math.max(e,t)];r&&i&&this.range.set({from:r.id,to:i.id})}showAll(){this.range.set(null),this.anchor=null}setEnd(e,t){if(!this.cycles().length)return;let n=t.target,r=Number.parseInt(n.value,10);if(Number.isNaN(r)){n.value=String(e===`from`?this.startId():this.endId());return}let i=Math.min(Math.max(r,this.firstId()),this.lastId()),a=this.selected(),o=e===`from`?i:a[0]?.id??this.firstId(),s=e===`to`?i:a.at(-1)?.id??this.lastId();this.range.set({from:Math.min(o,s),to:Math.max(o,s)}),n.value=String(e===`from`?Math.min(o,s):Math.max(o,s))}onFocus(){this.focused.set(!0),(this.active()===null||this.active()>=this.cycles().length)&&this.active.set(this.span()?.start??Math.max(this.cycles().length-1,0)),this.anchor??=this.active()}onKey(e){let t=this.cycles().length;if(!t)return;let n=Math.min(this.active()??t-1,t-1),r=null;switch(e.key){case`ArrowRight`:case`ArrowDown`:r=n+1;break;case`ArrowLeft`:case`ArrowUp`:r=n-1;break;case`PageDown`:r=n+_A;break;case`PageUp`:r=n-_A;break;case`Home`:r=0;break;case`End`:r=t-1;break;case`Enter`:case` `:e.preventDefault(),this.anchor=n,this.select(n,n);return;case`Escape`:this.range()&&(e.preventDefault(),this.showAll());return;default:return}e.preventDefault(),r=Math.min(Math.max(r,0),t-1),this.active.set(r),this.hover.set(null),e.shiftKey?(this.anchor??=n,this.select(this.anchor,r)):this.anchor=r}indexAt(e){let t=e.target?.closest?.(`[data-index]`);if(t)return Number(t.getAttribute(`data-index`));let n=e.currentTarget?.getBoundingClientRect(),r=this.cycles().length;if(!n?.width||!r)return null;let i=(e.clientX-n.left)/n.width;return Math.min(Math.max(Math.floor(i*r),0),r-1)}startDrag(e){if(e.button!==0)return;let t=this.indexAt(e);t!==null&&(this.dragging=!0,this.anchor=t,this.active.set(t),this.select(t,t))}onPointerMove(e){let t=this.indexAt(e);this.hover.set(t),this.dragging&&t!==null&&this.anchor!==null&&(this.active.set(t),this.select(this.anchor,t))}endDrag(){this.dragging=!1}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-cycle-chart`]],hostBindings:function(e,t){e&1&&H(`pointerup`,function(){return t.endDrag()},Pu)(`pointercancel`,function(){return t.endDrag()},Pu)},inputs:{cycles:[1,`cycles`],range:[1,`range`]},outputs:{range:`rangeChange`},decls:69,vars:25,consts:[[1,`range`],[`type`,`number`,`inputmode`,`numeric`,3,`change`,`min`,`max`,`value`],[`type`,`button`],[1,`summary`],[1,`hint`,3,`id`],[1,`plot`],[`aria-hidden`,`true`,1,`axis`],[1,`tick`,`top`],[1,`tick`,`zero`],[1,`area`],[`aria-hidden`,`true`,1,`band`,3,`left`,`width`],[`aria-hidden`,`true`,1,`budget`],[`role`,`listbox`,`aria-multiselectable`,`true`,`aria-orientation`,`horizontal`,`tabindex`,`0`,1,`bars`,3,`keydown`,`focus`,`blur`,`pointerdown`,`pointermove`,`pointerleave`],[`role`,`option`,1,`col`,3,`id`,`over`,`out`,`active`],[`aria-hidden`,`true`,1,`tip`,3,`left`,`right`],[`aria-hidden`,`true`,1,`markers`],[3,`over`],[`aria-label`,`Chart key`,1,`legend`],[`aria-hidden`,`true`,1,`key`,`ok`],[`aria-hidden`,`true`,1,`key`,`over`],[`aria-hidden`,`true`,1,`key-marker`],[`aria-hidden`,`true`,1,`key`,`line`],[1,`table`],[`tabindex`,`0`,`role`,`region`,1,`table-wrap`],[1,`sr-only`],[`scope`,`col`,1,`num`],[`scope`,`col`],[`type`,`button`,3,`click`],[`aria-hidden`,`true`,1,`band`],[`role`,`option`,1,`col`,3,`id`],[1,`bar`],[`aria-hidden`,`true`,1,`tip`],[1,`tip-head`],[1,`flag`],[1,`tip-row`],[1,`mono`],[1,`mono`,`name`],[1,`num`]],template:function(e,t){if(e&1&&(z(0,`div`,0)(1,`label`)(2,`span`),K(3,`Start`),B(),z(4,`input`,1),U(`change`,function(e){return t.setEnd(`from`,e)}),B()(),z(5,`label`)(6,`span`),K(7,`End`),B(),z(8,`input`,1),U(`change`,function(e){return t.setEnd(`to`,e)}),B()(),j(9,aA,2,0,`button`,2),z(10,`p`,3),K(11),B()(),z(12,`p`,4),K(13,` Drag across the bars to pick a range of cycles. With the chart focused, the arrow keys move between cycles, Shift with an arrow key extends the range, Enter picks one cycle and Escape shows all cycles again. `),B(),z(14,`div`,5)(15,`div`,6)(16,`span`,7),K(17),B(),z(18,`span`,8),K(19,`0 ms`),B()(),z(20,`div`,9),j(21,oA,1,4,`div`,10),z(22,`div`,11)(23,`span`),K(24),B()(),z(25,`div`,12),U(`keydown`,function(e){return t.onKey(e)})(`focus`,function(){return t.onFocus()})(`blur`,function(){return t.focused.set(!1)})(`pointerdown`,function(e){return t.startDrag(e)})(`pointermove`,function(e){return t.onPointerMove(e)})(`pointerleave`,function(){return t.hover.set(null)}),N(26,sA,2,12,`div`,13,rA),B(),j(28,dA,12,12,`div`,14),B()(),z(29,`div`,15),N(30,fA,1,2,`span`,16,rA),B(),z(32,`ul`,17)(33,`li`),Og(34,`span`,18),K(35,`Within budget`),B(),z(36,`li`),Og(37,`span`,19)(38,`span`,20),K(39,`Over budget `),B(),z(40,`li`),Og(41,`span`,21),K(42),B()(),z(43,`details`,22)(44,`summary`),K(45,`Show the cycles as a table`),B(),z(46,`div`,23)(47,`table`)(48,`caption`,24),K(49),B(),z(50,`thead`)(51,`tr`)(52,`th`,25),K(53,`Cycle`),B(),z(54,`th`,25),K(55,`Duration`),B(),z(56,`th`,26),K(57,`Budget`),B(),z(58,`th`,25),K(59,`Checks`),B(),z(60,`th`,25),K(61,`Passes`),B(),z(62,`th`,26),K(63,`After`),B(),z(64,`th`,26),K(65,`Slowest component`),B()()(),z(66,`tbody`),N(67,mA,15,7,`tr`,null,iA),B()()()()),e&2){let e,n;O(4),Pg(`min`,t.firstId())(`max`,t.lastId())(`value`,t.startId()),O(4),Pg(`min`,t.firstId())(`max`,t.lastId())(`value`,t.endId()),O(),M(t.range()?9:-1),O(2),q(t.summary()),O(),Pg(`id`,t.hintId),O(2),G(`flush`,t.bars().length>t.gapUntil),O(3),q(t.fmt(t.max())),O(4),M((e=t.band())?21:-1,e),O(),y_(`bottom`,t.budgetAt(),`%`),O(2),q(t.budgetLabel),O(),A(`aria-label`,`Change detection cycles, `+t.summary())(`aria-describedby`,t.hintId)(`aria-activedescendant`,t.activeOptionId()),O(),P(t.bars()),O(2),M((n=t.tip())?28:-1,n),O(),G(`flush`,t.bars().length>t.gapUntil),O(),P(t.bars()),O(12),q(t.budgetLabel),O(4),A(`aria-label`,t.tableLabel()),O(3),J(` `,t.tableLabel(),` `),O(18),P(t.selected())}},styles:[`[_nghost-%COMP%] { +}`]})},rA=(e,t)=>t.cycle.id,iA=(e,t)=>t.id;function aA(e,t){if(e&1){let e=V();z(0,`button`,27),U(`click`,function(){return w(e),T(W().showAll())}),K(1,`Show all cycles`),B()}}function oA(e,t){if(e&1&&Dg(0,`div`,28),e&2){let e=t;v_(`left`,e.left,`%`)(`width`,e.width,`%`)}}function sA(e,t){if(e&1&&(z(0,`div`,29),Dg(1,`span`,30),B()),e&2){let e=t.$implicit,n=W();G(`over`,e.over)(`out`,!n.inRange(e.index)&&!!n.range())(`active`,n.focused()&&n.active()===e.index),Ng(`id`,n.optionId(e.index)),A(`data-index`,e.index)(`aria-selected`,n.inRange(e.index))(`aria-label`,e.label),O(),v_(`height`,e.height,`%`)}}function cA(e,t){e&1&&(z(0,`span`,33),K(1,`over budget`),B())}function lA(e,t){if(e&1&&(z(0,`p`),K(1,` after `),z(2,`span`,35),K(3),B()()),e&2){let e=W();O(3),q(e.cycle.trigger)}}function uA(e,t){if(e&1&&(z(0,`p`,34)(1,`span`,36),K(2),B(),z(3,`span`),K(4),B()()),e&2){let e=t.$implicit,n=W(2);O(2),q(e.name),O(2),q(n.fmt(e.ms))}}function dA(e,t){if(e&1&&(z(0,`div`,31)(1,`p`,32)(2,`strong`),K(3),B(),z(4,`span`),K(5),B(),j(6,cA,2,0,`span`,33),B(),j(7,lA,4,1,`p`),z(8,`p`),K(9),B(),N(10,uA,5,2,`p`,34,hg),B()),e&2){let e=t,n=W();v_(`left`,e.left)(`right`,e.right),O(3),q(n.fmt(e.cycle.ms)),O(2),J(`cycle `,e.cycle.id),O(),M(e.over?6:-1),O(),M(e.cycle.trigger?7:-1),O(2),U_(` `,e.cycle.checks,` `,e.cycle.checks===1?`check`:`checks`,`, `,e.cycle.passes,` `,e.cycle.passes===1?`pass`:`passes`,` `),O(),P(e.top)}}function fA(e,t){if(e&1&&Dg(0,`span`),e&2){let e=t.$implicit;G(`over`,e.over)}}function pA(e,t){if(e&1&&K(0),e&2){let e=t,n=W(2);Y(` `,e.name,` (`,n.fmt(e.ms),`) `)}}function mA(e,t){if(e&1&&(z(0,`tr`)(1,`td`,37),K(2),B(),z(3,`td`,37),K(4),B(),z(5,`td`),K(6),B(),z(7,`td`,37),K(8),B(),z(9,`td`,37),K(10),B(),z(11,`td`,35),K(12),B(),z(13,`td`,35),j(14,pA,1,2),B()()),e&2){let e,n=t.$implicit,r=W();O(2),q(n.id),O(2),q(r.fmt(n.ms)),O(2),q(r.isOver(n)?`Over`:`Within`),O(2),q(n.checks),O(2),q(n.passes),O(2),q(n.trigger??``),O(2),M((e=n.components[0])?14:-1,e)}}var hA=0,gA=80,_A=10,vA=class e{cycles=$([]);range=Ov(null);gapUntil=gA;budgetLabel=`${Tk} ms budget`;uid=`cd-chart-${hA++}`;hintId=`${this.uid}-hint`;active=D(null);anchor=null;dragging=!1;hover=D(null);focused=D(!1);max=X(()=>Ak(this.cycles()));budgetAt=X(()=>Tk/this.max()*100);bars=X(()=>{let e=this.max();return this.cycles().map((t,n)=>({cycle:t,index:n,height:t.ms/e*100,over:Ek(t),label:this.describe(t)}))});firstId=X(()=>this.cycles()[0]?.id??0);lastId=X(()=>this.cycles().at(-1)?.id??0);span=X(()=>{let e=this.range();if(!e)return null;let t=this.cycles(),n=Math.min(e.from,e.to),r=Math.max(e.from,e.to),i=t.findIndex(e=>e.id>=n),a=-1;for(let e=t.length-1;e>=0;e--)if(t[e].id<=r){a=e;break}return i<0||aOk(this.cycles(),this.range()));startId=X(()=>this.selected()[0]?.id??``);endId=X(()=>this.selected().at(-1)?.id??``);band=X(()=>{let e=this.span(),t=this.cycles().length;return!e||!t?null:{left:e.start/t*100,width:(e.end-e.start+1)/t*100}});summary=X(()=>{let e=this.selected(),t=e.filter(Ek).length;return`${this.span()?e.length===1?`Cycle ${e[0].id}`:`Cycles ${e[0].id} to ${e.at(-1).id} (${e.length})`:`All ${e.length} ${e.length===1?`cycle`:`cycles`}`}. ${t} over the ${Tk} ms budget.`});tableLabel=X(()=>this.span()?`Picked cycles, ${this.summary()}`:`All recorded cycles`);activeOptionId=X(()=>{let e=this.active();return this.focused()&&e!==null&&e{let e=this.hover()??(this.focused()?this.active():null),t=e===null?void 0:this.cycles()[e];return!t||e===null?null:{cycle:t,over:Ek(t),top:t.components.slice(0,3),...this.tipSide(e)}});tipSide(e){let t=this.cycles().length;return e+.5=t.start&&e<=t.end}describe(e){let t=[`Cycle ${e.id}`,Dk(e.ms)];Ek(e)&&t.push(`over budget`),e.trigger&&t.push(`after ${e.trigger}`),t.push(`${e.checks} ${e.checks===1?`check`:`checks`}`);let n=e.components[0];return n&&t.push(`slowest ${n.name} ${Dk(n.ms)}`),t.join(`, `)}select(e,t){let n=this.cycles(),r=n[Math.min(e,t)],i=n[Math.max(e,t)];r&&i&&this.range.set({from:r.id,to:i.id})}showAll(){this.range.set(null),this.anchor=null}setEnd(e,t){if(!this.cycles().length)return;let n=t.target,r=Number.parseInt(n.value,10);if(Number.isNaN(r)){n.value=String(e===`from`?this.startId():this.endId());return}let i=Math.min(Math.max(r,this.firstId()),this.lastId()),a=this.selected(),o=e===`from`?i:a[0]?.id??this.firstId(),s=e===`to`?i:a.at(-1)?.id??this.lastId();this.range.set({from:Math.min(o,s),to:Math.max(o,s)}),n.value=String(e===`from`?Math.min(o,s):Math.max(o,s))}onFocus(){this.focused.set(!0),(this.active()===null||this.active()>=this.cycles().length)&&this.active.set(this.span()?.start??Math.max(this.cycles().length-1,0)),this.anchor??=this.active()}onKey(e){let t=this.cycles().length;if(!t)return;let n=Math.min(this.active()??t-1,t-1),r=null;switch(e.key){case`ArrowRight`:case`ArrowDown`:r=n+1;break;case`ArrowLeft`:case`ArrowUp`:r=n-1;break;case`PageDown`:r=n+_A;break;case`PageUp`:r=n-_A;break;case`Home`:r=0;break;case`End`:r=t-1;break;case`Enter`:case` `:e.preventDefault(),this.anchor=n,this.select(n,n);return;case`Escape`:this.range()&&(e.preventDefault(),this.showAll());return;default:return}e.preventDefault(),r=Math.min(Math.max(r,0),t-1),this.active.set(r),this.hover.set(null),e.shiftKey?(this.anchor??=n,this.select(this.anchor,r)):this.anchor=r}indexAt(e){let t=e.target?.closest?.(`[data-index]`);if(t)return Number(t.getAttribute(`data-index`));let n=e.currentTarget?.getBoundingClientRect(),r=this.cycles().length;if(!n?.width||!r)return null;let i=(e.clientX-n.left)/n.width;return Math.min(Math.max(Math.floor(i*r),0),r-1)}startDrag(e){if(e.button!==0)return;let t=this.indexAt(e);t!==null&&(this.dragging=!0,this.anchor=t,this.active.set(t),this.select(t,t))}onPointerMove(e){let t=this.indexAt(e);this.hover.set(t),this.dragging&&t!==null&&this.anchor!==null&&(this.active.set(t),this.select(this.anchor,t))}endDrag(){this.dragging=!1}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-cycle-chart`]],hostBindings:function(e,t){e&1&&H(`pointerup`,function(){return t.endDrag()},Pu)(`pointercancel`,function(){return t.endDrag()},Pu)},inputs:{cycles:[1,`cycles`],range:[1,`range`]},outputs:{range:`rangeChange`},decls:69,vars:25,consts:[[1,`range`],[`type`,`number`,`inputmode`,`numeric`,3,`change`,`min`,`max`,`value`],[`type`,`button`],[1,`summary`],[1,`hint`,3,`id`],[1,`plot`],[`aria-hidden`,`true`,1,`axis`],[1,`tick`,`top`],[1,`tick`,`zero`],[1,`area`],[`aria-hidden`,`true`,1,`band`,3,`left`,`width`],[`aria-hidden`,`true`,1,`budget`],[`role`,`listbox`,`aria-multiselectable`,`true`,`aria-orientation`,`horizontal`,`tabindex`,`0`,1,`bars`,3,`keydown`,`focus`,`blur`,`pointerdown`,`pointermove`,`pointerleave`],[`role`,`option`,1,`col`,3,`id`,`over`,`out`,`active`],[`aria-hidden`,`true`,1,`tip`,3,`left`,`right`],[`aria-hidden`,`true`,1,`markers`],[3,`over`],[`aria-label`,`Chart key`,1,`legend`],[`aria-hidden`,`true`,1,`key`,`ok`],[`aria-hidden`,`true`,1,`key`,`over`],[`aria-hidden`,`true`,1,`key-marker`],[`aria-hidden`,`true`,1,`key`,`line`],[1,`table`],[`tabindex`,`0`,`role`,`region`,1,`table-wrap`],[1,`sr-only`],[`scope`,`col`,1,`num`],[`scope`,`col`],[`type`,`button`,3,`click`],[`aria-hidden`,`true`,1,`band`],[`role`,`option`,1,`col`,3,`id`],[1,`bar`],[`aria-hidden`,`true`,1,`tip`],[1,`tip-head`],[1,`flag`],[1,`tip-row`],[1,`mono`],[1,`mono`,`name`],[1,`num`]],template:function(e,t){if(e&1&&(z(0,`div`,0)(1,`label`)(2,`span`),K(3,`Start`),B(),z(4,`input`,1),U(`change`,function(e){return t.setEnd(`from`,e)}),B()(),z(5,`label`)(6,`span`),K(7,`End`),B(),z(8,`input`,1),U(`change`,function(e){return t.setEnd(`to`,e)}),B()(),j(9,aA,2,0,`button`,2),z(10,`p`,3),K(11),B()(),z(12,`p`,4),K(13,` Drag across the bars to pick a range of cycles. With the chart focused, the arrow keys move between cycles, Shift with an arrow key extends the range, Enter picks one cycle and Escape shows all cycles again. `),B(),z(14,`div`,5)(15,`div`,6)(16,`span`,7),K(17),B(),z(18,`span`,8),K(19,`0 ms`),B()(),z(20,`div`,9),j(21,oA,1,4,`div`,10),z(22,`div`,11)(23,`span`),K(24),B()(),z(25,`div`,12),U(`keydown`,function(e){return t.onKey(e)})(`focus`,function(){return t.onFocus()})(`blur`,function(){return t.focused.set(!1)})(`pointerdown`,function(e){return t.startDrag(e)})(`pointermove`,function(e){return t.onPointerMove(e)})(`pointerleave`,function(){return t.hover.set(null)}),N(26,sA,2,12,`div`,13,rA),B(),j(28,dA,12,12,`div`,14),B()(),z(29,`div`,15),N(30,fA,1,2,`span`,16,rA),B(),z(32,`ul`,17)(33,`li`),Dg(34,`span`,18),K(35,`Within budget`),B(),z(36,`li`),Dg(37,`span`,19)(38,`span`,20),K(39,`Over budget `),B(),z(40,`li`),Dg(41,`span`,21),K(42),B()(),z(43,`details`,22)(44,`summary`),K(45,`Show the cycles as a table`),B(),z(46,`div`,23)(47,`table`)(48,`caption`,24),K(49),B(),z(50,`thead`)(51,`tr`)(52,`th`,25),K(53,`Cycle`),B(),z(54,`th`,25),K(55,`Duration`),B(),z(56,`th`,26),K(57,`Budget`),B(),z(58,`th`,25),K(59,`Checks`),B(),z(60,`th`,25),K(61,`Passes`),B(),z(62,`th`,26),K(63,`After`),B(),z(64,`th`,26),K(65,`Slowest component`),B()()(),z(66,`tbody`),N(67,mA,15,7,`tr`,null,iA),B()()()()),e&2){let e,n;O(4),Ng(`min`,t.firstId())(`max`,t.lastId())(`value`,t.startId()),O(4),Ng(`min`,t.firstId())(`max`,t.lastId())(`value`,t.endId()),O(),M(t.range()?9:-1),O(2),q(t.summary()),O(),Ng(`id`,t.hintId),O(2),G(`flush`,t.bars().length>t.gapUntil),O(3),q(t.fmt(t.max())),O(4),M((e=t.band())?21:-1,e),O(),v_(`bottom`,t.budgetAt(),`%`),O(2),q(t.budgetLabel),O(),A(`aria-label`,`Change detection cycles, `+t.summary())(`aria-describedby`,t.hintId)(`aria-activedescendant`,t.activeOptionId()),O(),P(t.bars()),O(2),M((n=t.tip())?28:-1,n),O(),G(`flush`,t.bars().length>t.gapUntil),O(),P(t.bars()),O(12),q(t.budgetLabel),O(4),A(`aria-label`,t.tableLabel()),O(3),J(` `,t.tableLabel(),` `),O(18),P(t.selected())}},styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1335,7 +1335,7 @@ td.mono[_ngcontent-%COMP%] { .bar[_ngcontent-%COMP%] { transition: none; } -}`]})},yA=(e,t)=>t.id,bA=(e,t)=>t.index,xA=(e,t)=>t.kind;function SA(e,t){if(e&1&&(z(0,`p`,0),K(1),B()),e&2){let e=W(2);O(),Y(` Pick `,e.max,` cycles or fewer to see their spans. `,e.count(),` are picked. `)}}function CA(e,t){if(e&1&&(z(0,`span`),K(1),B()),e&2){let e=t.$implicit;y_(`left`,e.x,`%`)(`width`,e.w,`%`),O(),J(`cycle `,e.id)}}function wA(e,t){if(e&1){let e=V();z(0,`button`,11),U(`focus`,function(){let t=w(e).$implicit;return T(W(3).current.set(t.index))})(`mouseenter`,function(){let t=w(e).$implicit;return T(W(3).hover.set(t.index))})(`mouseleave`,function(){return w(e),T(W(3).hover.set(null))})(`click`,function(){let t=w(e).$implicit;return T(W(3).choose(t))}),z(1,`span`,12),K(2),B()()}if(e&2){let e=t.$implicit,n=W(3);b_(Q_(`block kind-`,e.kind)),y_(`left`,e.x,`%`)(`width`,e.w,`%`)(`top`,e.depth*n.row,`px`),G(`narrow`,e.w<4),A(`tabindex`,e.index===n.tabStop()?0:-1)(`data-index`,e.index)(`aria-label`,n.describe(e))(`aria-disabled`,e.component?null:`true`),O(2),q(e.name)}}function TA(e,t){if(e&1&&(z(0,`li`),Og(1,`span`,13),K(2),B()),e&2){let e=t.$implicit;O(),b_(Q_(`key kind-`,e.kind)),O(),q(e.label)}}function EA(e,t){if(e&1&&(z(0,`p`,0),K(1),B()),e&2){let e=W(3);O(),Y(` Each cycle keeps its longest spans. `,e.dropped(),` shorter `,e.dropped()===1?`span was`:`spans were`,` left out. `)}}function DA(e,t){if(e&1&&(z(0,`tr`)(1,`td`,17),K(2),B(),z(3,`td`,18),K(4),B(),z(5,`td`),K(6),B(),z(7,`td`,17),K(8),B(),z(9,`td`,17),K(10),B(),z(11,`td`,17),K(12),B(),z(13,`td`,17),K(14),B()()),e&2){let e=t.$implicit,n=W(4);O(2),q(e.cycleId),O(),y_(`padding-left`,6+e.depth*8,`px`),O(),q(e.name),O(2),q(n.kindLabel(e)),O(2),q(e.depth),O(2),q(n.fmt(e.start)),O(2),q(n.fmt(e.ms)),O(2),q(n.fmt(e.selfMs))}}function OA(e,t){if(e&1&&(z(0,`div`,10)(1,`table`)(2,`caption`,14),K(3),B(),z(4,`thead`)(5,`tr`)(6,`th`,15),K(7,`Cycle`),B(),z(8,`th`,16),K(9,`Span`),B(),z(10,`th`,16),K(11,`Kind`),B(),z(12,`th`,15),K(13,`Depth`),B(),z(14,`th`,15),K(15,`Start`),B(),z(16,`th`,15),K(17,`Total`),B(),z(18,`th`,15),K(19,`Self`),B()()(),z(20,`tbody`),N(21,DA,15,9,`tr`,null,bA),B()()()),e&2){let e=W(),t=W(2);A(`aria-label`,t.tableLabel()),O(3),J(` `,t.tableLabel(),` `),O(18),P(e.blocks)}}function kA(e,t){if(e&1){let e=V();z(0,`div`,1),U(`keydown`,function(t){return w(e),T(W(2).onKey(t))}),z(1,`div`,2),N(2,CA,2,5,`span`,3,yA),B(),z(4,`div`,4),N(5,wA,3,16,`button`,5,bA),B()(),z(7,`p`,6),K(8),B(),z(9,`ul`,7),N(10,TA,3,4,`li`,null,xA),B(),z(12,`p`,8),K(13,` Arrow keys move along a row, Up goes to the enclosing span and Down to the first nested one. Enter on a component shows it in the tree. `),B(),j(14,EA,2,2,`p`,0),z(15,`details`,9),U(`toggle`,function(t){return w(e),T(W(2).onToggle(t))}),z(16,`summary`),K(17,`Show the spans as a table`),B(),j(18,OA,23,2,`div`,10),B()}if(e&2){let e=t,n=W(2);A(`aria-label`,n.label()),O(2),P(e.cycles),O(2),y_(`height`,e.depth*n.row,`px`),O(),P(e.blocks),O(3),q(n.readout()),O(2),P(n.kinds),O(4),M(n.dropped()?14:-1),O(4),M(n.tableOpen()?18:-1)}}function AA(e,t){if(e&1&&(z(0,`h3`),K(1,`Spans in the picked cycles`),B(),j(2,SA,2,2,`p`,0)(3,kA,19,6)),e&2){let e,t=W();O(2),M(t.tooMany()?2:(e=t.graph())?3:-1,e)}}var jA=22;function MA(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return e[n]}var NA=class e{cycles=$([]);names=$([]);scope=$(`the recording`);pick=Cv();row=jA;max=30;kinds=[`c`,`h`,`r`,`o`].map(e=>({kind:e,label:Mk[e]}));current=D(0);tableOpen=D(!1);hover=D(null);hasSpans=X(()=>this.cycles().some(e=>e.spans?.length));count=X(()=>this.cycles().length);tooMany=X(()=>this.count()>30);graph=X(()=>this.tooMany()?null:Pk(this.cycles(),this.names()));tabStop=X(()=>Math.min(this.current(),Math.max((this.graph()?.blocks.length??1)-1,0)));dropped=X(()=>this.graph()?.cycles.reduce((e,t)=>e+t.droppedSpans,0)??0);label=X(()=>`Spans in ${this.scope()} over time, nested by depth. Pick a component to show it in the tree.`);readout=X(()=>{let e=(this.graph()?.blocks??[])[this.hover()??this.tabStop()];return e?this.describe(e):``});tableLabel=X(()=>`Timed spans in ${this.scope()}`);fmt(e){return Dk(e)}kindLabel(e){return Mk[e.kind]}onToggle(e){this.tableOpen.set(e.target.open)}describe(e){let t=[e.name,Mk[e.kind],`${Dk(e.ms)} total`];return e.selfMs!==e.ms&&t.push(`${Dk(e.selfMs)} self`),t.push(e.start<0?`cycle ${e.cycleId}, ${Dk(-e.start)} before it started`:`cycle ${e.cycleId} at ${Dk(e.start)}`),t.join(`, `)}choose(e){this.current.set(e.index),e.component&&this.pick.emit(e.component)}onKey(e){let t=this.graph()?.blocks??[];if(!t.length)return;let n=t[this.tabStop()],r;switch(e.key){case`ArrowRight`:r=t.find(e=>e.index>n.index&&e.depth===n.depth);break;case`ArrowLeft`:r=MA(t,e=>e.indexe.indexe.parent===n.index)??t.find(e=>e.index>n.index&&e.depth===n.depth+1);break;case`Home`:r=t[0];break;case`End`:r=t.at(-1);break;default:return}e.preventDefault(),this.hover.set(null),r&&(this.current.set(r.index),e.currentTarget.querySelector(`button[data-index="${r.index}"]`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-flame-graph`]],inputs:{cycles:[1,`cycles`],names:[1,`names`],scope:[1,`scope`]},outputs:{pick:`pick`},decls:1,vars:1,consts:[[1,`note`],[`role`,`group`,1,`flame`,3,`keydown`],[`aria-hidden`,`true`,1,`cycles`],[3,`left`,`width`],[1,`rows`],[`type`,`button`,3,`class`,`narrow`,`left`,`width`,`top`],[`aria-hidden`,`true`,1,`readout`],[`aria-label`,`Span kinds`,1,`legend`],[1,`hint`],[1,`table`,3,`toggle`],[`tabindex`,`0`,`role`,`region`,1,`table-wrap`],[`type`,`button`,3,`focus`,`mouseenter`,`mouseleave`,`click`],[1,`text`],[`aria-hidden`,`true`],[1,`sr-only`],[`scope`,`col`,1,`num`],[`scope`,`col`],[1,`num`],[1,`mono`]],template:function(e,t){e&1&&j(0,AA,4,1),e&2&&M(t.hasSpans()?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})},yA=(e,t)=>t.id,bA=(e,t)=>t.index,xA=(e,t)=>t.kind;function SA(e,t){if(e&1&&(z(0,`p`,0),K(1),B()),e&2){let e=W(2);O(),Y(` Pick `,e.max,` cycles or fewer to see their spans. `,e.count(),` are picked. `)}}function CA(e,t){if(e&1&&(z(0,`span`),K(1),B()),e&2){let e=t.$implicit;v_(`left`,e.x,`%`)(`width`,e.w,`%`),O(),J(`cycle `,e.id)}}function wA(e,t){if(e&1){let e=V();z(0,`button`,11),U(`focus`,function(){let t=w(e).$implicit;return T(W(3).current.set(t.index))})(`mouseenter`,function(){let t=w(e).$implicit;return T(W(3).hover.set(t.index))})(`mouseleave`,function(){return w(e),T(W(3).hover.set(null))})(`click`,function(){let t=w(e).$implicit;return T(W(3).choose(t))}),z(1,`span`,12),K(2),B()()}if(e&2){let e=t.$implicit,n=W(3);y_(Q_(`block kind-`,e.kind)),v_(`left`,e.x,`%`)(`width`,e.w,`%`)(`top`,e.depth*n.row,`px`),G(`narrow`,e.w<4),A(`tabindex`,e.index===n.tabStop()?0:-1)(`data-index`,e.index)(`aria-label`,n.describe(e))(`aria-disabled`,e.component?null:`true`),O(2),q(e.name)}}function TA(e,t){if(e&1&&(z(0,`li`),Dg(1,`span`,13),K(2),B()),e&2){let e=t.$implicit;O(),y_(Q_(`key kind-`,e.kind)),O(),q(e.label)}}function EA(e,t){if(e&1&&(z(0,`p`,0),K(1),B()),e&2){let e=W(3);O(),Y(` Each cycle keeps its longest spans. `,e.dropped(),` shorter `,e.dropped()===1?`span was`:`spans were`,` left out. `)}}function DA(e,t){if(e&1&&(z(0,`tr`)(1,`td`,17),K(2),B(),z(3,`td`,18),K(4),B(),z(5,`td`),K(6),B(),z(7,`td`,17),K(8),B(),z(9,`td`,17),K(10),B(),z(11,`td`,17),K(12),B(),z(13,`td`,17),K(14),B()()),e&2){let e=t.$implicit,n=W(4);O(2),q(e.cycleId),O(),v_(`padding-left`,6+e.depth*8,`px`),O(),q(e.name),O(2),q(n.kindLabel(e)),O(2),q(e.depth),O(2),q(n.fmt(e.start)),O(2),q(n.fmt(e.ms)),O(2),q(n.fmt(e.selfMs))}}function OA(e,t){if(e&1&&(z(0,`div`,10)(1,`table`)(2,`caption`,14),K(3),B(),z(4,`thead`)(5,`tr`)(6,`th`,15),K(7,`Cycle`),B(),z(8,`th`,16),K(9,`Span`),B(),z(10,`th`,16),K(11,`Kind`),B(),z(12,`th`,15),K(13,`Depth`),B(),z(14,`th`,15),K(15,`Start`),B(),z(16,`th`,15),K(17,`Total`),B(),z(18,`th`,15),K(19,`Self`),B()()(),z(20,`tbody`),N(21,DA,15,9,`tr`,null,bA),B()()()),e&2){let e=W(),t=W(2);A(`aria-label`,t.tableLabel()),O(3),J(` `,t.tableLabel(),` `),O(18),P(e.blocks)}}function kA(e,t){if(e&1){let e=V();z(0,`div`,1),U(`keydown`,function(t){return w(e),T(W(2).onKey(t))}),z(1,`div`,2),N(2,CA,2,5,`span`,3,yA),B(),z(4,`div`,4),N(5,wA,3,16,`button`,5,bA),B()(),z(7,`p`,6),K(8),B(),z(9,`ul`,7),N(10,TA,3,4,`li`,null,xA),B(),z(12,`p`,8),K(13,` Arrow keys move along a row, Up goes to the enclosing span and Down to the first nested one. Enter on a component shows it in the tree. `),B(),j(14,EA,2,2,`p`,0),z(15,`details`,9),U(`toggle`,function(t){return w(e),T(W(2).onToggle(t))}),z(16,`summary`),K(17,`Show the spans as a table`),B(),j(18,OA,23,2,`div`,10),B()}if(e&2){let e=t,n=W(2);A(`aria-label`,n.label()),O(2),P(e.cycles),O(2),v_(`height`,e.depth*n.row,`px`),O(),P(e.blocks),O(3),q(n.readout()),O(2),P(n.kinds),O(4),M(n.dropped()?14:-1),O(4),M(n.tableOpen()?18:-1)}}function AA(e,t){if(e&1&&(z(0,`h3`),K(1,`Spans in the picked cycles`),B(),j(2,SA,2,2,`p`,0)(3,kA,19,6)),e&2){let e,t=W();O(2),M(t.tooMany()?2:(e=t.graph())?3:-1,e)}}var jA=22;function MA(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return e[n]}var NA=class e{cycles=$([]);names=$([]);scope=$(`the recording`);pick=Cv();row=jA;max=30;kinds=[`c`,`h`,`r`,`o`].map(e=>({kind:e,label:Mk[e]}));current=D(0);tableOpen=D(!1);hover=D(null);hasSpans=X(()=>this.cycles().some(e=>e.spans?.length));count=X(()=>this.cycles().length);tooMany=X(()=>this.count()>30);graph=X(()=>this.tooMany()?null:Pk(this.cycles(),this.names()));tabStop=X(()=>Math.min(this.current(),Math.max((this.graph()?.blocks.length??1)-1,0)));dropped=X(()=>this.graph()?.cycles.reduce((e,t)=>e+t.droppedSpans,0)??0);label=X(()=>`Spans in ${this.scope()} over time, nested by depth. Pick a component to show it in the tree.`);readout=X(()=>{let e=(this.graph()?.blocks??[])[this.hover()??this.tabStop()];return e?this.describe(e):``});tableLabel=X(()=>`Timed spans in ${this.scope()}`);fmt(e){return Dk(e)}kindLabel(e){return Mk[e.kind]}onToggle(e){this.tableOpen.set(e.target.open)}describe(e){let t=[e.name,Mk[e.kind],`${Dk(e.ms)} total`];return e.selfMs!==e.ms&&t.push(`${Dk(e.selfMs)} self`),t.push(e.start<0?`cycle ${e.cycleId}, ${Dk(-e.start)} before it started`:`cycle ${e.cycleId} at ${Dk(e.start)}`),t.join(`, `)}choose(e){this.current.set(e.index),e.component&&this.pick.emit(e.component)}onKey(e){let t=this.graph()?.blocks??[];if(!t.length)return;let n=t[this.tabStop()],r;switch(e.key){case`ArrowRight`:r=t.find(e=>e.index>n.index&&e.depth===n.depth);break;case`ArrowLeft`:r=MA(t,e=>e.indexe.indexe.parent===n.index)??t.find(e=>e.index>n.index&&e.depth===n.depth+1);break;case`Home`:r=t[0];break;case`End`:r=t.at(-1);break;default:return}e.preventDefault(),this.hover.set(null),r&&(this.current.set(r.index),e.currentTarget.querySelector(`button[data-index="${r.index}"]`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-flame-graph`]],inputs:{cycles:[1,`cycles`],names:[1,`names`],scope:[1,`scope`]},outputs:{pick:`pick`},decls:1,vars:1,consts:[[1,`note`],[`role`,`group`,1,`flame`,3,`keydown`],[`aria-hidden`,`true`,1,`cycles`],[3,`left`,`width`],[1,`rows`],[`type`,`button`,3,`class`,`narrow`,`left`,`width`,`top`],[`aria-hidden`,`true`,1,`readout`],[`aria-label`,`Span kinds`,1,`legend`],[1,`hint`],[1,`table`,3,`toggle`],[`tabindex`,`0`,`role`,`region`,1,`table-wrap`],[`type`,`button`,3,`focus`,`mouseenter`,`mouseleave`,`click`],[1,`text`],[`aria-hidden`,`true`],[1,`sr-only`],[`scope`,`col`,1,`num`],[`scope`,`col`],[1,`num`],[1,`mono`]],template:function(e,t){e&1&&j(0,AA,4,1),e&2&&M(t.hasSpans()?0:-1)},styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1542,7 +1542,7 @@ td.mono[_ngcontent-%COMP%] { .num[_ngcontent-%COMP%] { text-align: right; font-variant-numeric: tabular-nums; -}`]})};function PA(e,t){if(e&1&&(z(0,`tr`)(1,`td`,5),K(2),B(),z(3,`td`,6),K(4),B(),z(5,`td`,6),K(6),B(),z(7,`td`,6),K(8),B()()),e&2){let e=t.$implicit,n=W(3);O(2),Y(``,e.name,`.`,e.hook),O(2),q(e.calls),O(2),q(n.ms(e.ms)),O(2),q(n.ms(e.maxMs))}}function FA(e,t){if(e&1&&(z(0,`div`)(1,`h3`),K(2,`Lifecycle hooks`),B(),z(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),K(7,`Hook`),B(),z(8,`th`,4),K(9,`Calls`),B(),z(10,`th`,4),K(11,`Time`),B(),z(12,`th`,4),K(13,`Slowest`),B()()(),z(14,`tbody`),N(15,PA,9,5,`tr`,null,gg),B()()()),e&2){let e=W(2);O(15),P(e.hooks())}}function IA(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` (`,e.listener,`) `)}}function LA(e,t){if(e&1&&(z(0,`tr`)(1,`td`,5),K(2),j(3,IA,1,1),B(),z(4,`td`,6),K(5),B(),z(6,`td`,6),K(7),B(),z(8,`td`,6),K(9),B()()),e&2){let e=t.$implicit,n=W(3);O(2),J(` `,e.name,` `),O(),M(e.listener?3:-1),O(2),q(e.calls),O(2),q(n.ms(e.ms)),O(2),q(n.ms(e.maxMs))}}function RA(e,t){if(e&1&&(z(0,`div`)(1,`h3`),K(2,`Output listeners`),B(),z(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),K(7,`Listener`),B(),z(8,`th`,4),K(9,`Calls`),B(),z(10,`th`,4),K(11,`Time`),B(),z(12,`th`,4),K(13,`Slowest`),B()()(),z(14,`tbody`),N(15,LA,10,5,`tr`,null,gg),B()()()),e&2){let e=W(2);O(15),P(e.outputs())}}function zA(e,t){if(e&1&&(z(0,`p`,1),K(1),B()),e&2){let e=t,n=W(2);O(),U_(` afterRender callbacks ran `,e.runs,` `,e.runs===1?`time`:`times`,`, `,n.ms(e.ms),` in total, slowest `,n.ms(e.maxMs),`. `)}}function BA(e,t){if(e&1&&(z(0,`p`,2),K(1),B()),e&2){let e=W(2);O(),Y(` `,e.dropped(),` more hook or output `,e.dropped()===1?`row is`:`rows are`,` left out. A recording lists at most 100 of each. `)}}function VA(e,t){if(e&1&&(z(0,`div`,0),j(1,FA,17,0,`div`),j(2,RA,17,0,`div`),B(),j(3,zA,2,4,`p`,1),j(4,BA,2,2,`p`,2)),e&2){let e,t=W();O(),M(t.hooks().length?1:-1),O(),M(t.outputs().length?2:-1),O(),M((e=t.afterRender())?3:-1,e),O(),M(t.dropped()?4:-1)}}var HA=10;function UA(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}var WA=class e{page=$(null);hooks=X(()=>(this.page()?.hooks??[]).slice(0,HA));outputs=X(()=>(this.page()?.outputs??[]).slice(0,HA));afterRender=X(()=>{let e=this.page()?.afterRender;return e?.runs?e:null});dropped=X(()=>this.page()?.droppedTimings??0);ms(e){return UA(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-timing`]],inputs:{page:[1,`page`]},decls:1,vars:1,consts:[[1,`timing`],[1,`after-render`],[1,`note`],[`scope`,`col`],[`scope`,`col`,1,`num`],[1,`mono`],[1,`num`]],template:function(e,t){e&1&&j(0,VA,5,4),e&2&&M(t.hooks().length||t.outputs().length||t.afterRender()?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})};function PA(e,t){if(e&1&&(z(0,`tr`)(1,`td`,5),K(2),B(),z(3,`td`,6),K(4),B(),z(5,`td`,6),K(6),B(),z(7,`td`,6),K(8),B()()),e&2){let e=t.$implicit,n=W(3);O(2),Y(``,e.name,`.`,e.hook),O(2),q(e.calls),O(2),q(n.ms(e.ms)),O(2),q(n.ms(e.maxMs))}}function FA(e,t){if(e&1&&(z(0,`div`)(1,`h3`),K(2,`Lifecycle hooks`),B(),z(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),K(7,`Hook`),B(),z(8,`th`,4),K(9,`Calls`),B(),z(10,`th`,4),K(11,`Time`),B(),z(12,`th`,4),K(13,`Slowest`),B()()(),z(14,`tbody`),N(15,PA,9,5,`tr`,null,hg),B()()()),e&2){let e=W(2);O(15),P(e.hooks())}}function IA(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` (`,e.listener,`) `)}}function LA(e,t){if(e&1&&(z(0,`tr`)(1,`td`,5),K(2),j(3,IA,1,1),B(),z(4,`td`,6),K(5),B(),z(6,`td`,6),K(7),B(),z(8,`td`,6),K(9),B()()),e&2){let e=t.$implicit,n=W(3);O(2),J(` `,e.name,` `),O(),M(e.listener?3:-1),O(2),q(e.calls),O(2),q(n.ms(e.ms)),O(2),q(n.ms(e.maxMs))}}function RA(e,t){if(e&1&&(z(0,`div`)(1,`h3`),K(2,`Output listeners`),B(),z(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),K(7,`Listener`),B(),z(8,`th`,4),K(9,`Calls`),B(),z(10,`th`,4),K(11,`Time`),B(),z(12,`th`,4),K(13,`Slowest`),B()()(),z(14,`tbody`),N(15,LA,10,5,`tr`,null,hg),B()()()),e&2){let e=W(2);O(15),P(e.outputs())}}function zA(e,t){if(e&1&&(z(0,`p`,1),K(1),B()),e&2){let e=t,n=W(2);O(),U_(` afterRender callbacks ran `,e.runs,` `,e.runs===1?`time`:`times`,`, `,n.ms(e.ms),` in total, slowest `,n.ms(e.maxMs),`. `)}}function BA(e,t){if(e&1&&(z(0,`p`,2),K(1),B()),e&2){let e=W(2);O(),Y(` `,e.dropped(),` more hook or output `,e.dropped()===1?`row is`:`rows are`,` left out. A recording lists at most 100 of each. `)}}function VA(e,t){if(e&1&&(z(0,`div`,0),j(1,FA,17,0,`div`),j(2,RA,17,0,`div`),B(),j(3,zA,2,4,`p`,1),j(4,BA,2,2,`p`,2)),e&2){let e,t=W();O(),M(t.hooks().length?1:-1),O(),M(t.outputs().length?2:-1),O(),M((e=t.afterRender())?3:-1,e),O(),M(t.dropped()?4:-1)}}var HA=10;function UA(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}var WA=class e{page=$(null);hooks=X(()=>(this.page()?.hooks??[]).slice(0,HA));outputs=X(()=>(this.page()?.outputs??[]).slice(0,HA));afterRender=X(()=>{let e=this.page()?.afterRender;return e?.runs?e:null});dropped=X(()=>this.page()?.droppedTimings??0);ms(e){return UA(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-timing`]],inputs:{page:[1,`page`]},decls:1,vars:1,consts:[[1,`timing`],[1,`after-render`],[1,`note`],[`scope`,`col`],[`scope`,`col`,1,`num`],[1,`mono`],[1,`num`]],template:function(e,t){e&1&&j(0,VA,5,4),e&2&&M(t.hooks().length||t.outputs().length||t.afterRender()?0:-1)},styles:[`[_nghost-%COMP%] { display: block; } @@ -1602,7 +1602,7 @@ td.mono[_ngcontent-%COMP%] { margin: 8px 0 0; color: var(--%NS%text-2); font-size: 12px; -}`]})};function GA(e,t){if(e&1&&(z(0,`p`,5),K(1),B()),e&2){let e=W();O(),q(e.error())}}function KA(e,t){let n=new Blob([JSON.stringify(e,null,2)],{type:`application/json`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=t,document.body.append(i),i.click(),i.remove(),setTimeout(()=>URL.revokeObjectURL(r),0)}var qA=class e{page=$(null);maxCycles=$(200);imported=Cv();error=D(``);hasCycles(){return(this.page()?.cycles.length??0)>0}exportJson(){let e=this.page();e&&KA(_k(e,e.pageId),`change-detection-${e.pageId}.json`)}exportTrace(){let e=this.page();e&&KA(wk(e,e.pageId),`change-detection-${e.pageId}.trace.json`)}async read(e){let t=e.files?.[0];if(e.value=``,!t)return;if(t.size>2e7){this.error.set(`${t.name}: The file is larger than 20 MB.`);return}let n;try{n=await t.text()}catch{this.error.set(`Could not read the file.`);return}let r=vk(n,this.maxCycles());if(!r.ok){this.error.set(`${t.name}: ${r.error}`);return}this.error.set(``),this.imported.emit({fileName:t.name,page:{...r.recording,pageId:r.pageId,supported:!0}})}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-transfer`]],inputs:{page:[1,`page`],maxCycles:[1,`maxCycles`]},outputs:{imported:`imported`},decls:10,vars:3,consts:[[`file`,``],[`role`,`group`,`aria-label`,`Export and import the recording`,1,`transfer`],[`type`,`button`,3,`click`,`disabled`],[`type`,`button`,3,`click`],[`type`,`file`,`accept`,`.json,application/json`,`hidden`,``,3,`change`],[`role`,`alert`,1,`error`]],template:function(e,t){if(e&1){let e=V();z(0,`div`,1)(1,`button`,2),U(`click`,function(){return t.exportJson()}),K(2,`Export JSON`),B(),z(3,`button`,2),U(`click`,function(){return t.exportTrace()}),K(4,` Export trace (Perfetto) `),B(),z(5,`button`,3),U(`click`,function(){return w(e),T(Qg(8).click())}),K(6,`Import`),B(),z(7,`input`,4,0),U(`change`,function(){w(e);let n=Qg(8);return T(t.read(n))}),B()(),j(9,GA,2,1,`p`,5)}e&2&&(O(),Pg(`disabled`,!t.hasCycles()),O(2),Pg(`disabled`,!t.hasCycles()),O(6),M(t.error()?9:-1))},styles:[`[_nghost-%COMP%] { +}`]})};function GA(e,t){if(e&1&&(z(0,`p`,5),K(1),B()),e&2){let e=W();O(),q(e.error())}}function KA(e,t){let n=new Blob([JSON.stringify(e,null,2)],{type:`application/json`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=t,document.body.append(i),i.click(),i.remove(),setTimeout(()=>URL.revokeObjectURL(r),0)}var qA=class e{page=$(null);maxCycles=$(200);imported=Cv();error=D(``);hasCycles(){return(this.page()?.cycles.length??0)>0}exportJson(){let e=this.page();e&&KA(_k(e,e.pageId),`change-detection-${e.pageId}.json`)}exportTrace(){let e=this.page();e&&KA(wk(e,e.pageId),`change-detection-${e.pageId}.trace.json`)}async read(e){let t=e.files?.[0];if(e.value=``,!t)return;if(t.size>2e7){this.error.set(`${t.name}: The file is larger than 20 MB.`);return}let n;try{n=await t.text()}catch{this.error.set(`Could not read the file.`);return}let r=vk(n,this.maxCycles());if(!r.ok){this.error.set(`${t.name}: ${r.error}`);return}this.error.set(``),this.imported.emit({fileName:t.name,page:{...r.recording,pageId:r.pageId,supported:!0}})}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-transfer`]],inputs:{page:[1,`page`],maxCycles:[1,`maxCycles`]},outputs:{imported:`imported`},decls:10,vars:3,consts:[[`file`,``],[`role`,`group`,`aria-label`,`Export and import the recording`,1,`transfer`],[`type`,`button`,3,`click`,`disabled`],[`type`,`button`,3,`click`],[`type`,`file`,`accept`,`.json,application/json`,`hidden`,``,3,`change`],[`role`,`alert`,1,`error`]],template:function(e,t){if(e&1){let e=V();z(0,`div`,1)(1,`button`,2),U(`click`,function(){return t.exportJson()}),K(2,`Export JSON`),B(),z(3,`button`,2),U(`click`,function(){return t.exportTrace()}),K(4,` Export trace (Perfetto) `),B(),z(5,`button`,3),U(`click`,function(){return w(e),T(Zg(8).click())}),K(6,`Import`),B(),z(7,`input`,4,0),U(`change`,function(){w(e);let n=Zg(8);return T(t.read(n))}),B()(),j(9,GA,2,1,`p`,5)}e&2&&(O(),Ng(`disabled`,!t.hasCycles()),O(2),Ng(`disabled`,!t.hasCycles()),O(6),M(t.error()?9:-1))},styles:[`[_nghost-%COMP%] { display: contents; } @@ -1644,7 +1644,7 @@ button[_ngcontent-%COMP%]:disabled { margin: 0; color: var(--%NS%danger-text); font-size: 12px; -}`]})},JA=(e,t)=>t.stat.name;function YA(e,t){if(e&1&&(z(0,`span`,8),K(1),B()),e&2){let e=W(2).$implicit;O(),J(``,e.other,` more`)}}function XA(e,t){if(e&1&&(z(0,`div`,6)(1,`span`,7),K(2),B(),j(3,YA,2,1,`span`,8),B()),e&2){let e=W().$implicit;y_(`--%NS%tone`,e.tone+`%`),O(2),q(e.label),O(),M(e.roomy?3:-1)}}function ZA(e,t){if(e&1&&(z(0,`span`,10),K(1),B(),z(2,`span`,11),K(3),B()),e&2){let e=W(2).$implicit,t=W(2);O(),q(e.stat.name),O(2),q(t.fmt(e.stat.ms))}}function QA(e,t){if(e&1){let e=V();z(0,`button`,9),U(`focus`,function(){w(e);let t=W().$index;return T(W(2).current.set(t))})(`click`,function(){w(e);let t=W().$implicit;return T(W(2).pick.emit(t.stat.name))}),j(1,ZA,4,2),B()}if(e&2){let e=W(),t=e.$implicit,n=e.$index,r=W(2);y_(`--%NS%tone`,t.tone+`%`),A(`tabindex`,n===r.tabStop()?0:-1)(`aria-label`,t.label)(`data-index`,n),O(),M(t.roomy?1:-1)}}function $A(e,t){if(e&1&&(z(0,`li`),j(1,XA,4,4,`div`,4)(2,QA,2,6,`button`,5),B()),e&2){let e=t.$implicit;y_(`left`,e.x,`%`)(`top`,e.y,`%`)(`width`,e.w,`%`)(`height`,e.h,`%`),O(),M(e.other?1:2)}}function ej(e,t){if(e&1){let e=V();z(0,`ul`,2),U(`keydown`,function(t){return w(e),T(W().onKey(t))}),N(1,$A,3,9,`li`,3,JA),B()}if(e&2){let e=W();A(`aria-label`,e.label()),O(),P(e.cells())}}function tj(e,t){e&1&&(z(0,`p`,1),K(1,`No component time in these cycles.`),B())}var nj=24,rj=3,ij=class e{stats=$([]);scope=$(`the recording`);pick=Cv();current=D(0);label=X(()=>`Self time per component in ${this.scope()}, largest first. Pick one to show it in the tree.`);cells=X(()=>{let e=this.stats().filter(e=>e.ms>0),t=e.slice(0,nj),n=e.slice(nj),r=n.reduce((e,t)=>e+t.ms,0),i=t.map(e=>({stat:e,other:0}));n.length&&i.push({stat:{name:`Other components`,checks:0,ms:r,maxMs:0,cycles:0},other:n.length});let a=e.reduce((e,t)=>e+t.ms,0),o=t[0]?.ms??1,s=jk(i,e=>e.stat.ms,rj);return s.sort((e,t)=>Number(e.item.other>0)-Number(t.item.other>0)),s.map(e=>{let{stat:t,other:n}=e.item,r=a?Math.round(t.ms/a*100):0;return{stat:t,other:n,x:e.x,y:e.y,w:e.w,h:e.h,tone:n?0:14+Math.round(26*Math.min(t.ms/o,1)),roomy:e.w>=10&&e.h>=22,label:n?`${n} more components, ${Dk(t.ms)}, ${r}% of self time`:`${t.name}, ${Dk(t.ms)} self time, ${r}%, ${t.checks} ${t.checks===1?`check`:`checks`}`}})});tabStop=X(()=>Math.min(this.current(),Math.max(this.cells().filter(e=>!e.other).length-1,0)));fmt(e){return Dk(e)}onKey(e){let t=this.cells().filter(e=>!e.other).length;if(!t)return;let n=this.tabStop(),r;switch(e.key){case`ArrowRight`:case`ArrowDown`:r=Math.min(n+1,t-1);break;case`ArrowLeft`:case`ArrowUp`:r=Math.max(n-1,0);break;case`Home`:r=0;break;case`End`:r=t-1;break;default:return}e.preventDefault(),this.current.set(r),e.currentTarget.querySelector(`button[data-index="${r}"]`)?.focus()}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-treemap`]],inputs:{stats:[1,`stats`],scope:[1,`scope`]},outputs:{pick:`pick`},decls:2,vars:1,consts:[[1,`map`],[1,`empty`],[1,`map`,3,`keydown`],[3,`left`,`top`,`width`,`height`],[1,`cell`,`other`,3,`--%NS%tone`],[`type`,`button`,1,`cell`,3,`--%NS%tone`],[1,`cell`,`other`],[1,`sr-only`],[`aria-hidden`,`true`,1,`name`],[`type`,`button`,1,`cell`,3,`focus`,`click`],[1,`name`,`mono`],[1,`ms`]],template:function(e,t){e&1&&j(0,ej,3,1,`ul`,0)(1,tj,2,0,`p`,1),e&2&&M(+!t.cells().length)},styles:[`[_nghost-%COMP%] { +}`]})},JA=(e,t)=>t.stat.name;function YA(e,t){if(e&1&&(z(0,`span`,8),K(1),B()),e&2){let e=W(2).$implicit;O(),J(``,e.other,` more`)}}function XA(e,t){if(e&1&&(z(0,`div`,6)(1,`span`,7),K(2),B(),j(3,YA,2,1,`span`,8),B()),e&2){let e=W().$implicit;v_(`--%NS%tone`,e.tone+`%`),O(2),q(e.label),O(),M(e.roomy?3:-1)}}function ZA(e,t){if(e&1&&(z(0,`span`,10),K(1),B(),z(2,`span`,11),K(3),B()),e&2){let e=W(2).$implicit,t=W(2);O(),q(e.stat.name),O(2),q(t.fmt(e.stat.ms))}}function QA(e,t){if(e&1){let e=V();z(0,`button`,9),U(`focus`,function(){w(e);let t=W().$index;return T(W(2).current.set(t))})(`click`,function(){w(e);let t=W().$implicit;return T(W(2).pick.emit(t.stat.name))}),j(1,ZA,4,2),B()}if(e&2){let e=W(),t=e.$implicit,n=e.$index,r=W(2);v_(`--%NS%tone`,t.tone+`%`),A(`tabindex`,n===r.tabStop()?0:-1)(`aria-label`,t.label)(`data-index`,n),O(),M(t.roomy?1:-1)}}function $A(e,t){if(e&1&&(z(0,`li`),j(1,XA,4,4,`div`,4)(2,QA,2,6,`button`,5),B()),e&2){let e=t.$implicit;v_(`left`,e.x,`%`)(`top`,e.y,`%`)(`width`,e.w,`%`)(`height`,e.h,`%`),O(),M(e.other?1:2)}}function ej(e,t){if(e&1){let e=V();z(0,`ul`,2),U(`keydown`,function(t){return w(e),T(W().onKey(t))}),N(1,$A,3,9,`li`,3,JA),B()}if(e&2){let e=W();A(`aria-label`,e.label()),O(),P(e.cells())}}function tj(e,t){e&1&&(z(0,`p`,1),K(1,`No component time in these cycles.`),B())}var nj=24,rj=3,ij=class e{stats=$([]);scope=$(`the recording`);pick=Cv();current=D(0);label=X(()=>`Self time per component in ${this.scope()}, largest first. Pick one to show it in the tree.`);cells=X(()=>{let e=this.stats().filter(e=>e.ms>0),t=e.slice(0,nj),n=e.slice(nj),r=n.reduce((e,t)=>e+t.ms,0),i=t.map(e=>({stat:e,other:0}));n.length&&i.push({stat:{name:`Other components`,checks:0,ms:r,maxMs:0,cycles:0},other:n.length});let a=e.reduce((e,t)=>e+t.ms,0),o=t[0]?.ms??1,s=jk(i,e=>e.stat.ms,rj);return s.sort((e,t)=>Number(e.item.other>0)-Number(t.item.other>0)),s.map(e=>{let{stat:t,other:n}=e.item,r=a?Math.round(t.ms/a*100):0;return{stat:t,other:n,x:e.x,y:e.y,w:e.w,h:e.h,tone:n?0:14+Math.round(26*Math.min(t.ms/o,1)),roomy:e.w>=10&&e.h>=22,label:n?`${n} more components, ${Dk(t.ms)}, ${r}% of self time`:`${t.name}, ${Dk(t.ms)} self time, ${r}%, ${t.checks} ${t.checks===1?`check`:`checks`}`}})});tabStop=X(()=>Math.min(this.current(),Math.max(this.cells().filter(e=>!e.other).length-1,0)));fmt(e){return Dk(e)}onKey(e){let t=this.cells().filter(e=>!e.other).length;if(!t)return;let n=this.tabStop(),r;switch(e.key){case`ArrowRight`:case`ArrowDown`:r=Math.min(n+1,t-1);break;case`ArrowLeft`:case`ArrowUp`:r=Math.max(n-1,0);break;case`Home`:r=0;break;case`End`:r=t-1;break;default:return}e.preventDefault(),this.current.set(r),e.currentTarget.querySelector(`button[data-index="${r}"]`)?.focus()}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-treemap`]],inputs:{stats:[1,`stats`],scope:[1,`scope`]},outputs:{pick:`pick`},decls:2,vars:1,consts:[[1,`map`],[1,`empty`],[1,`map`,3,`keydown`],[3,`left`,`top`,`width`,`height`],[1,`cell`,`other`,3,`--%NS%tone`],[`type`,`button`,1,`cell`,3,`--%NS%tone`],[1,`cell`,`other`],[1,`sr-only`],[`aria-hidden`,`true`,1,`name`],[`type`,`button`,1,`cell`,3,`focus`,`click`],[1,`name`,`mono`],[1,`ms`]],template:function(e,t){e&1&&j(0,ej,3,1,`ul`,0)(1,tj,2,0,`p`,1),e&2&&M(+!t.cells().length)},styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1720,7 +1720,7 @@ button.cell[_ngcontent-%COMP%]:focus-visible { .empty[_ngcontent-%COMP%] { margin: 8px 0; color: var(--%NS%text-2); -}`]})},aj=(e,t)=>t.id;function oj(e,t){if(e&1){let e=V();I(0,`button`,14),H(`click`,function(){return w(e),T(W(2).clear())}),K(1,`Clear`),L()}}function sj(e,t){if(e&1){let e=V();I(0,`button`,11),H(`click`,function(){return w(e),T(W().toggle())}),R(1,`span`,12),K(2),L(),j(3,oj,2,0,`button`,13)}if(e&2){let e=W();G(`on`,e.recording()),F(`disabled`,!e.pageId()),O(2),J(` `,e.recording()?`Stop recording`:`Record`,` `),O(),M(e.cycles().length?3:-1)}}function cj(e,t){if(e&1){let e=V();I(0,`p`,6)(1,`span`,15),K(2,`Imported recording`),L(),I(3,`span`,16),K(4),L(),I(5,`button`,14),H(`click`,function(){return w(e),T(W().closeImport())}),K(6,`Back to live recording`),L()()}e&2&&(O(4),q(t.fileName))}function lj(e,t){e&1&&K(0,` An app on a device has no DOM, so checks that changed nothing are not counted there. `)}function uj(e,t){e&1&&(I(0,`p`,9),K(1,` The page has Angular's profiler hook, but the recording could not attach to it yet. The page tries again on its next update while recording is on. If this stays, stop and start the recording, or reload the page. `),L())}function dj(e,t){e&1&&R(0,`app-angular-unavailable`,17),e&2&&F(`page`,W(2).angularPage())}function fj(e,t){e&1&&j(0,uj,2,0,`p`,9)(1,dj,1,1,`app-angular-unavailable`,17),e&2&&M(+!W().attachPending())}function pj(e,t){e&1&&(I(0,`p`,9),K(1,`Angular profiling stays on until the page reloads.`),L())}function mj(e,t){e&1&&R(0,`app-angular-unavailable`,21),e&2&&F(`page`,W(2).angularPage())}function hj(e,t){if(e&1){let e=V();I(0,`div`,18)(1,`span`,19),K(2,`Live views`),L(),I(3,`button`,20),H(`click`,function(){w(e);let t=W();return T(t.setView(`flash`,!t.views().flash))}),R(4,`span`,12),K(5,` Flash checks `),L(),I(6,`button`,20),H(`click`,function(){w(e);let t=W();return T(t.setView(`track`,!t.views().track))}),R(7,`span`,12),K(8,` Performance track `),L(),I(9,`button`,20),H(`click`,function(){return w(e),T(W().setView(`angularProfiling`,!0))}),R(10,`span`,12),K(11,` Angular profiling `),L()(),I(12,`p`,7),K(13,` Flash checks draws a box over each component on the page as Angular checks it, with its name and how often it was checked, fading over a second. Performance track adds a Pangular track to the Chrome Performance panel with every component check, hook and output. Angular profiling turns on Angular's own track there. `),L(),j(14,pj,2,0,`p`,9)(15,mj,1,1,`app-angular-unavailable`,21)}if(e&2){let e=W();O(3),F(`disabled`,!e.canShowViews()),A(`aria-pressed`,e.views().flash),O(3),F(`disabled`,!e.canShowViews()),A(`aria-pressed`,e.views().track),O(3),F(`disabled`,!e.canShowViews()||e.views().angularProfiling||!e.views().angularProfilingAvailable),A(`aria-pressed`,e.views().angularProfiling),O(5),M(e.views().angularProfiling?14:e.views().angularProfilingAvailable?-1:15)}}function gj(e,t){if(e&1&&(I(0,`p`,9),K(1),L()),e&2){let e=t.$implicit;O(),q(e)}}function _j(e,t){if(e&1&&(I(0,`p`,24),K(1),L()),e&2){let e=W(2);O(),J(` `,e.range()?`The picked cycles have no timed spans, so there is no flame graph for them.`:`This recording has no timed spans, so there is no flame graph. A recording from an older version, or a file saved without spans, has none.`,` `)}}function vj(e,t){e&1&&(I(0,`p`,9),K(1,` For picked cycles, totals come from the 10 slowest components each cycle lists. `),L())}function yj(e,t){if(e&1){let e=V();I(0,`h3`),K(1,`Cycles`),L(),I(2,`app-cd-cycle-chart`,22),q_(`rangeChange`,function(t){w(e);let n=W();return K_(n.range,t)||(n.range=t),T(t)}),L(),I(3,`app-cd-flame-graph`,23),H(`pick`,function(t){return w(e),T(W().showComponent.emit(t))}),L(),j(4,_j,2,1,`p`,24),I(5,`h3`),K(6,`Self time by component`),L(),j(7,vj,2,0,`p`,9),I(8,`app-cd-treemap`,25),H(`pick`,function(t){return w(e),T(W().showComponent.emit(t))}),L()}if(e&2){let e=W();O(2),F(`cycles`,e.cycles()),G_(`range`,e.range),O(),F(`cycles`,e.picked())(`names`,e.spanNames())(`scope`,e.scope()),O(),M(e.hasSpans()?-1:4),O(3),M(e.range()?7:-1),O(),F(`stats`,e.stats())(`scope`,e.scope())}}function bj(e,t){if(e&1&&(I(0,`tr`)(1,`td`,16),K(2),L(),I(3,`td`,31),K(4),L(),I(5,`td`,31),K(6),L(),I(7,`td`,31),K(8),L()()),e&2){let e=t.$implicit,n=W(2);O(2),q(e.name),O(2),q(e.checks),O(2),q(n.ms(e.ms)),O(2),q(n.ms(e.maxMs))}}function xj(e,t){e&1&&(I(0,`tr`)(1,`td`,32),K(2,`No component time in the picked cycles.`),L()())}function Sj(e,t){if(e&1&&(I(0,`span`,34),K(1,`from `),I(2,`span`,16),K(3),L()()),e&2){let e=W(3);O(3),q(e.causeText(t))}}function Cj(e,t){if(e&1&&(I(0,`span`,34),K(1,`after `),I(2,`span`,16),K(3),L()()),e&2){let e=W().$implicit;O(3),q(e.trigger)}}function wj(e,t){if(e&1&&(I(0,`span`,35),K(1),L()),e&2){let e=W().$implicit;O(),J(``,e.unchanged,` changed nothing`)}}function Tj(e,t){if(e&1&&(I(0,`span`,35),K(1),L()),e&2){let e=W().$implicit,t=W(2);O(),J(`hooks `,t.ms(e.hookMs))}}function Ej(e,t){if(e&1&&(I(0,`span`,35),K(1),L()),e&2){let e=W().$implicit,t=W(2);O(),J(`afterRender `,t.ms(e.afterRenderMs))}}function Dj(e,t){if(e&1&&(I(0,`span`,36),K(1,` slowest `),I(2,`span`,16),K(3),L(),K(4),L()),e&2){let e=t,n=W(3);O(3),q(e.name),O(),J(` `,n.ms(e.ms),` `)}}function Oj(e,t){if(e&1&&(I(0,`li`)(1,`span`,33),K(2),L(),I(3,`span`,16),K(4),L(),I(5,`span`),K(6),L(),j(7,Sj,4,1,`span`,34)(8,Cj,4,1,`span`,34),j(9,wj,2,1,`span`,35),j(10,Tj,2,1,`span`,35),j(11,Ej,2,1,`span`,35),j(12,Dj,5,2,`span`,36),L()),e&2){let e,n,r=t.$implicit,i=W(2);O(2),q(i.clock(r.at)),O(2),q(i.ms(r.ms)),O(2),U_(` `,r.checks,` `,r.checks===1?`check`:`checks`,`, `,r.passes,` `,r.passes===1?`pass`:`passes`,` `),O(),M((e=r.cause)?7:r.trigger?8:-1,e),O(2),M(r.unchanged?9:-1),O(),M(r.hookMs?10:-1),O(),M(r.afterRenderMs?11:-1),O(),M((n=r.components[0])?12:-1,n)}}function kj(e,t){if(e&1&&(I(0,`div`,26)(1,`div`)(2,`h3`),K(3),L(),I(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,27),K(8,`Component`),L(),I(9,`th`,28),K(10,`Checks`),L(),I(11,`th`,28),K(12,`Self time`),L(),I(13,`th`,28),K(14,`Slowest`),L()()(),I(15,`tbody`),N(16,bj,9,4,`tr`,null,gg,!1,xj,3,0,`tr`),L()()(),I(19,`div`)(20,`h3`),K(21,`Latest cycles`),L(),I(22,`ol`,29),N(23,Oj,13,11,`li`,null,aj),L()()(),R(25,`app-cd-timing`,30)(26,`app-cd-diagnosis`,30)),e&2){let e=W();O(3),J(` `,e.range()?`Slowest components in the picked cycles`:`Slowest components`,` `),O(13),P(e.slowest()),O(7),P(e.latest()),O(2),F(`page`,e.page()),O(),F(`page`,e.page())}}function Aj(e,t){e&1&&(I(0,`p`,10),K(1,`Use the app. Cycles show up here as Angular runs change detection.`),L())}var jj=3e3,Mj=10,Nj=class e{livePage=$(null,{alias:`page`});pageId=$(null);rpc=$(null);native=$(!1);angularPages=VD(()=>this.rpc());angularPage=X(()=>HD(this.angularPages(),this.pageId()));attachPending=X(()=>this.angularPage()?.capabilities.profiler===!0);showComponent=Cv();range=D(null);imported=D(null);page=X(()=>this.imported()?.page??this.livePage());views=Q(()=>this.livePage()?.options??{flash:!1,track:!1,angularProfiling:!1,angularProfilingAvailable:!0});canShowViews=X(()=>!!this.pageId()&&this.livePage()?.supported!==!1);message=D(``);announcement=D(``);recording=X(()=>this.page()?.recording===!0);cycles=X(()=>this.page()?.cycles??[]);maxCycles=X(()=>uE(this.rpc()).limits.cdCycles);picked=X(()=>Ok(this.cycles(),this.range()));hasSpans=X(()=>this.picked().some(e=>e.spans?.length));spanNames=X(()=>this.page()?.spanNames??[]);stats=X(()=>this.range()?kk(this.picked()):[...this.page()?.components??[]].sort((e,t)=>t.ms-e.ms));scope=X(()=>{let e=this.range()?this.picked():[];return e.length?e.length===1?`cycle ${e[0].id}`:`cycles ${e[0].id} to ${e.at(-1).id}`:`the recording`});slowest=X(()=>this.stats().slice(0,Mj));latest=X(()=>this.cycles().slice(-30).reverse());capNotes=X(()=>{let e=this.page()?.droppedClasses??0,t=this.page()?.droppedHosts??0,n=[];return e>0&&n.push(`${e} more component ${e===1?`class was`:`classes were`} checked than a recording keeps, so ${e===1?`it is`:`they are`} left out of these totals.`),t>0&&n.push(`${t} component ${t===1?`instance was`:`instances were`} checked past the 2000 a recording counts, so ${t===1?`its tree row shows`:`their tree rows show`} no check count.`),n});status=X(()=>{if(this.message())return this.message();let e=this.cycles().length;return this.imported()?`${e} ${e===1?`cycle`:`cycles`} imported.`:this.recording()?`Recording. ${e} ${e===1?`cycle`:`cycles`} so far.`:e?`${e} ${e===1?`cycle`:`cycles`} recorded.`:``});ms(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}clock(e){return SD(e)}causeText(e){return lk(e)}confirming=D(null);confirmTimer;constructor(){hc(()=>{let e=this.confirming();e!==null&&this.livePage()?.recording===!0===e&&Z(()=>this.confirmed(e))}),C(Os).onDestroy(()=>clearTimeout(this.confirmTimer))}confirmed(e){clearTimeout(this.confirmTimer),this.confirming.set(null),this.message.set(``);let t=this.livePage()?.cycles.length??0;this.announce(e?`Recording started.`:`Recording stopped. ${t} ${t===1?`cycle`:`cycles`} recorded.`)}unconfirmed(e){let t=`The page did not confirm that the recording ${e?`started`:`stopped`}. The tab may be in the background, closed or reloading.`;this.message.set(t),this.announce(t)}async toggle(){let e=!this.recording();clearTimeout(this.confirmTimer),this.confirming.set(null),await this.send({on:e},e?`Starting…`:`Stopping…`,()=>``,`request-change-detection-record`,{quiet:!0,keepPending:!0})&&(this.confirming.set(e),this.confirmTimer=setTimeout(()=>{this.confirming()===e&&this.unconfirmed(e)},jj))}showImport(e){this.message.set(``),this.range.set(null),this.imported.set(e);let t=e.page.cycles.length;this.announce(`Imported ${e.fileName}: ${t} ${t===1?`cycle`:`cycles`}. Showing the imported recording.`)}closeImport(){this.imported.set(null),this.range.set(null),this.announce(`Showing the live recording.`)}async clear(){this.range.set(null),await this.send({clear:!0},``,()=>`Cleared the recorded cycles.`)}async setView(e,t){let n=this.views();this.views.set({...n,[e]:t});let r={flash:t?`Flash checks on.`:`Flash checks off.`,track:t?`Performance track on. Record in the Chrome Performance panel to see it.`:`Performance track off.`,angularProfiling:`Angular profiling on. It stays on until the page reloads.`}[e];await this.send({[e]:t},``,()=>r,`request-change-detection-options`)||this.views.set(n)}async send(e,t,n,r=`request-change-detection-record`,{quiet:i=!1,keepPending:a=!1}={}){this.message.set(t);try{if(!this.rpc())throw Error(`no client`);return await JT(this.rpc(),r,{pageId:this.pageId(),...e}),a||this.message.set(``),i||this.announce(n()),!0}catch{let e=`Could not reach the page.`;return this.message.set(e),this.announce(e),!1}}announce(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-recording`]],inputs:{livePage:[1,`page`,`livePage`],pageId:[1,`pageId`],rpc:[1,`rpc`],native:[1,`native`]},outputs:{showComponent:`showComponent`},decls:22,vars:13,consts:[[`aria-labelledby`,`cd-heading`,1,`cd`],[1,`cd-head`],[`id`,`cd-heading`],[3,`imported`,`page`,`maxCycles`],[1,`status`],[`role`,`status`,1,`sr-only`],[1,`imported`],[1,`hint`],[`what`,`cycles`,`limit`,`cdCycles`,3,`dropped`,`max`],[1,`note`],[1,`empty`],[`type`,`button`,3,`click`,`disabled`],[`aria-hidden`,`true`,1,`dot`],[`type`,`button`],[`type`,`button`,3,`click`],[1,`badge`],[1,`mono`],[`capability`,`profiler`,`missing`,``,`compact`,``,3,`page`],[`role`,`group`,`aria-labelledby`,`cd-views-label`,1,`views`],[`id`,`cd-views-label`,1,`views-label`],[`type`,`button`,1,`view`,3,`click`,`disabled`],[`capability`,`angularProfiling`,`missing`,``,`compact`,``,3,`page`],[3,`rangeChange`,`cycles`,`range`],[3,`pick`,`cycles`,`names`,`scope`],[1,`spans-note`],[3,`pick`,`stats`,`scope`],[1,`cd-grid`],[`scope`,`col`],[`scope`,`col`,1,`num`],[`aria-label`,`Latest change detection cycles, newest first`,1,`cycles`],[3,`page`],[1,`num`],[`colspan`,`4`],[1,`when`],[1,`trigger`],[1,`timing`],[1,`top`]],template:function(e,t){if(e&1&&(I(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Change detection`),L(),j(4,sj,4,5),I(5,`app-cd-transfer`,3),H(`imported`,function(e){return t.showImport(e)}),L(),I(6,`p`,4),K(7),L(),I(8,`p`,5),K(9),L()(),j(10,cj,7,1,`p`,6),I(11,`p`,7),K(12,` Records each change detection cycle with Angular's profiler: how long it took, how many components it checked, what started it and which checks changed nothing. Tree rows show how often each instance was checked. Times come from a development build. While it records, the page also wraps Angular's scheduler, adds a signal write hook and watches DOM updates; all of it stops with the recording. `),j(13,lj,1,0),L(),j(14,fj,2,1),j(15,hj,16,7),R(16,`app-limit-note`,8),N(17,gj,2,1,`p`,9,_g),j(19,yj,9,9),j(20,kj,27,4)(21,Aj,2,0,`p`,10),L()),e&2){let e;O(4),M(t.imported()?-1:4),O(),F(`page`,t.page())(`maxCycles`,t.maxCycles()),O(2),q(t.status()),O(2),q(t.announcement()),O(),M((e=t.imported())?10:-1,e),O(3),M(t.native()?13:-1),O(),M(t.page()?.supported===!1?14:-1),O(),M(!t.imported()&&!t.native()?15:-1),O(),F(`dropped`,t.page()?.dropped??0)(`max`,t.maxCycles()),O(),P(t.capNotes()),O(2),M(t.cycles().length?19:-1),O(),M(t.page()?.components?.length?20:t.recording()?21:-1)}},dependencies:[KD,jO,WA,nA,qA,vA,NA,ij],styles:[`[_nghost-%COMP%] { +}`]})},aj=(e,t)=>t.id;function oj(e,t){if(e&1){let e=V();I(0,`button`,14),H(`click`,function(){return w(e),T(W(2).clear())}),K(1,`Clear`),L()}}function sj(e,t){if(e&1){let e=V();I(0,`button`,11),H(`click`,function(){return w(e),T(W().toggle())}),R(1,`span`,12),K(2),L(),j(3,oj,2,0,`button`,13)}if(e&2){let e=W();G(`on`,e.recording()),F(`disabled`,!e.pageId()),O(2),J(` `,e.recording()?`Stop recording`:`Record`,` `),O(),M(e.cycles().length?3:-1)}}function cj(e,t){if(e&1){let e=V();I(0,`p`,6)(1,`span`,15),K(2,`Imported recording`),L(),I(3,`span`,16),K(4),L(),I(5,`button`,14),H(`click`,function(){return w(e),T(W().closeImport())}),K(6,`Back to live recording`),L()()}e&2&&(O(4),q(t.fileName))}function lj(e,t){e&1&&K(0,` An app on a device has no DOM, so checks that changed nothing are not counted there. `)}function uj(e,t){e&1&&(I(0,`p`,9),K(1,` The page has Angular's profiler hook, but the recording could not attach to it yet. The page tries again on its next update while recording is on. If this stays, stop and start the recording, or reload the page. `),L())}function dj(e,t){e&1&&R(0,`app-angular-unavailable`,17),e&2&&F(`page`,W(2).angularPage())}function fj(e,t){e&1&&j(0,uj,2,0,`p`,9)(1,dj,1,1,`app-angular-unavailable`,17),e&2&&M(+!W().attachPending())}function pj(e,t){e&1&&(I(0,`p`,9),K(1,`Angular profiling stays on until the page reloads.`),L())}function mj(e,t){e&1&&R(0,`app-angular-unavailable`,21),e&2&&F(`page`,W(2).angularPage())}function hj(e,t){if(e&1){let e=V();I(0,`div`,18)(1,`span`,19),K(2,`Live views`),L(),I(3,`button`,20),H(`click`,function(){w(e);let t=W();return T(t.setView(`flash`,!t.views().flash))}),R(4,`span`,12),K(5,` Flash checks `),L(),I(6,`button`,20),H(`click`,function(){w(e);let t=W();return T(t.setView(`track`,!t.views().track))}),R(7,`span`,12),K(8,` Performance track `),L(),I(9,`button`,20),H(`click`,function(){return w(e),T(W().setView(`angularProfiling`,!0))}),R(10,`span`,12),K(11,` Angular profiling `),L()(),I(12,`p`,7),K(13,` Flash checks draws a box over each component on the page as Angular checks it, with its name and how often it was checked, fading over a second. Performance track adds a Pangular track to the Chrome Performance panel with every component check, hook and output. Angular profiling turns on Angular's own track there. `),L(),j(14,pj,2,0,`p`,9)(15,mj,1,1,`app-angular-unavailable`,21)}if(e&2){let e=W();O(3),F(`disabled`,!e.canShowViews()),A(`aria-pressed`,e.views().flash),O(3),F(`disabled`,!e.canShowViews()),A(`aria-pressed`,e.views().track),O(3),F(`disabled`,!e.canShowViews()||e.views().angularProfiling||!e.views().angularProfilingAvailable),A(`aria-pressed`,e.views().angularProfiling),O(5),M(e.views().angularProfiling?14:e.views().angularProfilingAvailable?-1:15)}}function gj(e,t){if(e&1&&(I(0,`p`,9),K(1),L()),e&2){let e=t.$implicit;O(),q(e)}}function _j(e,t){if(e&1&&(I(0,`p`,24),K(1),L()),e&2){let e=W(2);O(),J(` `,e.range()?`The picked cycles have no timed spans, so there is no flame graph for them.`:`This recording has no timed spans, so there is no flame graph. A recording from an older version, or a file saved without spans, has none.`,` `)}}function vj(e,t){e&1&&(I(0,`p`,9),K(1,` For picked cycles, totals come from the 10 slowest components each cycle lists. `),L())}function yj(e,t){if(e&1){let e=V();I(0,`h3`),K(1,`Cycles`),L(),I(2,`app-cd-cycle-chart`,22),q_(`rangeChange`,function(t){w(e);let n=W();return K_(n.range,t)||(n.range=t),T(t)}),L(),I(3,`app-cd-flame-graph`,23),H(`pick`,function(t){return w(e),T(W().showComponent.emit(t))}),L(),j(4,_j,2,1,`p`,24),I(5,`h3`),K(6,`Self time by component`),L(),j(7,vj,2,0,`p`,9),I(8,`app-cd-treemap`,25),H(`pick`,function(t){return w(e),T(W().showComponent.emit(t))}),L()}if(e&2){let e=W();O(2),F(`cycles`,e.cycles()),G_(`range`,e.range),O(),F(`cycles`,e.picked())(`names`,e.spanNames())(`scope`,e.scope()),O(),M(e.hasSpans()?-1:4),O(3),M(e.range()?7:-1),O(),F(`stats`,e.stats())(`scope`,e.scope())}}function bj(e,t){if(e&1&&(I(0,`tr`)(1,`td`,16),K(2),L(),I(3,`td`,31),K(4),L(),I(5,`td`,31),K(6),L(),I(7,`td`,31),K(8),L()()),e&2){let e=t.$implicit,n=W(2);O(2),q(e.name),O(2),q(e.checks),O(2),q(n.ms(e.ms)),O(2),q(n.ms(e.maxMs))}}function xj(e,t){e&1&&(I(0,`tr`)(1,`td`,32),K(2,`No component time in the picked cycles.`),L()())}function Sj(e,t){if(e&1&&(I(0,`span`,34),K(1,`from `),I(2,`span`,16),K(3),L()()),e&2){let e=W(3);O(3),q(e.causeText(t))}}function Cj(e,t){if(e&1&&(I(0,`span`,34),K(1,`after `),I(2,`span`,16),K(3),L()()),e&2){let e=W().$implicit;O(3),q(e.trigger)}}function wj(e,t){if(e&1&&(I(0,`span`,35),K(1),L()),e&2){let e=W().$implicit;O(),J(``,e.unchanged,` changed nothing`)}}function Tj(e,t){if(e&1&&(I(0,`span`,35),K(1),L()),e&2){let e=W().$implicit,t=W(2);O(),J(`hooks `,t.ms(e.hookMs))}}function Ej(e,t){if(e&1&&(I(0,`span`,35),K(1),L()),e&2){let e=W().$implicit,t=W(2);O(),J(`afterRender `,t.ms(e.afterRenderMs))}}function Dj(e,t){if(e&1&&(I(0,`span`,36),K(1,` slowest `),I(2,`span`,16),K(3),L(),K(4),L()),e&2){let e=t,n=W(3);O(3),q(e.name),O(),J(` `,n.ms(e.ms),` `)}}function Oj(e,t){if(e&1&&(I(0,`li`)(1,`span`,33),K(2),L(),I(3,`span`,16),K(4),L(),I(5,`span`),K(6),L(),j(7,Sj,4,1,`span`,34)(8,Cj,4,1,`span`,34),j(9,wj,2,1,`span`,35),j(10,Tj,2,1,`span`,35),j(11,Ej,2,1,`span`,35),j(12,Dj,5,2,`span`,36),L()),e&2){let e,n,r=t.$implicit,i=W(2);O(2),q(i.clock(r.at)),O(2),q(i.ms(r.ms)),O(2),U_(` `,r.checks,` `,r.checks===1?`check`:`checks`,`, `,r.passes,` `,r.passes===1?`pass`:`passes`,` `),O(),M((e=r.cause)?7:r.trigger?8:-1,e),O(2),M(r.unchanged?9:-1),O(),M(r.hookMs?10:-1),O(),M(r.afterRenderMs?11:-1),O(),M((n=r.components[0])?12:-1,n)}}function kj(e,t){if(e&1&&(I(0,`div`,26)(1,`div`)(2,`h3`),K(3),L(),I(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,27),K(8,`Component`),L(),I(9,`th`,28),K(10,`Checks`),L(),I(11,`th`,28),K(12,`Self time`),L(),I(13,`th`,28),K(14,`Slowest`),L()()(),I(15,`tbody`),N(16,bj,9,4,`tr`,null,hg,!1,xj,3,0,`tr`),L()()(),I(19,`div`)(20,`h3`),K(21,`Latest cycles`),L(),I(22,`ol`,29),N(23,Oj,13,11,`li`,null,aj),L()()(),R(25,`app-cd-timing`,30)(26,`app-cd-diagnosis`,30)),e&2){let e=W();O(3),J(` `,e.range()?`Slowest components in the picked cycles`:`Slowest components`,` `),O(13),P(e.slowest()),O(7),P(e.latest()),O(2),F(`page`,e.page()),O(),F(`page`,e.page())}}function Aj(e,t){e&1&&(I(0,`p`,10),K(1,`Use the app. Cycles show up here as Angular runs change detection.`),L())}var jj=3e3,Mj=10,Nj=class e{livePage=$(null,{alias:`page`});pageId=$(null);rpc=$(null);native=$(!1);angularPages=VD(()=>this.rpc());angularPage=X(()=>HD(this.angularPages(),this.pageId()));attachPending=X(()=>this.angularPage()?.capabilities.profiler===!0);showComponent=Cv();range=D(null);imported=D(null);page=X(()=>this.imported()?.page??this.livePage());views=Q(()=>this.livePage()?.options??{flash:!1,track:!1,angularProfiling:!1,angularProfilingAvailable:!0});canShowViews=X(()=>!!this.pageId()&&this.livePage()?.supported!==!1);message=D(``);announcement=D(``);recording=X(()=>this.page()?.recording===!0);cycles=X(()=>this.page()?.cycles??[]);maxCycles=X(()=>uE(this.rpc()).limits.cdCycles);picked=X(()=>Ok(this.cycles(),this.range()));hasSpans=X(()=>this.picked().some(e=>e.spans?.length));spanNames=X(()=>this.page()?.spanNames??[]);stats=X(()=>this.range()?kk(this.picked()):[...this.page()?.components??[]].sort((e,t)=>t.ms-e.ms));scope=X(()=>{let e=this.range()?this.picked():[];return e.length?e.length===1?`cycle ${e[0].id}`:`cycles ${e[0].id} to ${e.at(-1).id}`:`the recording`});slowest=X(()=>this.stats().slice(0,Mj));latest=X(()=>this.cycles().slice(-30).reverse());capNotes=X(()=>{let e=this.page()?.droppedClasses??0,t=this.page()?.droppedHosts??0,n=[];return e>0&&n.push(`${e} more component ${e===1?`class was`:`classes were`} checked than a recording keeps, so ${e===1?`it is`:`they are`} left out of these totals.`),t>0&&n.push(`${t} component ${t===1?`instance was`:`instances were`} checked past the 2000 a recording counts, so ${t===1?`its tree row shows`:`their tree rows show`} no check count.`),n});status=X(()=>{if(this.message())return this.message();let e=this.cycles().length;return this.imported()?`${e} ${e===1?`cycle`:`cycles`} imported.`:this.recording()?`Recording. ${e} ${e===1?`cycle`:`cycles`} so far.`:e?`${e} ${e===1?`cycle`:`cycles`} recorded.`:``});ms(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}clock(e){return SD(e)}causeText(e){return lk(e)}confirming=D(null);confirmTimer;constructor(){hc(()=>{let e=this.confirming();e!==null&&this.livePage()?.recording===!0===e&&Z(()=>this.confirmed(e))}),C(Os).onDestroy(()=>clearTimeout(this.confirmTimer))}confirmed(e){clearTimeout(this.confirmTimer),this.confirming.set(null),this.message.set(``);let t=this.livePage()?.cycles.length??0;this.announce(e?`Recording started.`:`Recording stopped. ${t} ${t===1?`cycle`:`cycles`} recorded.`)}unconfirmed(e){let t=`The page did not confirm that the recording ${e?`started`:`stopped`}. The tab may be in the background, closed or reloading.`;this.message.set(t),this.announce(t)}async toggle(){let e=!this.recording();clearTimeout(this.confirmTimer),this.confirming.set(null),await this.send({on:e},e?`Starting…`:`Stopping…`,()=>``,`request-change-detection-record`,{quiet:!0,keepPending:!0})&&(this.confirming.set(e),this.confirmTimer=setTimeout(()=>{this.confirming()===e&&this.unconfirmed(e)},jj))}showImport(e){this.message.set(``),this.range.set(null),this.imported.set(e);let t=e.page.cycles.length;this.announce(`Imported ${e.fileName}: ${t} ${t===1?`cycle`:`cycles`}. Showing the imported recording.`)}closeImport(){this.imported.set(null),this.range.set(null),this.announce(`Showing the live recording.`)}async clear(){this.range.set(null),await this.send({clear:!0},``,()=>`Cleared the recorded cycles.`)}async setView(e,t){let n=this.views();this.views.set({...n,[e]:t});let r={flash:t?`Flash checks on.`:`Flash checks off.`,track:t?`Performance track on. Record in the Chrome Performance panel to see it.`:`Performance track off.`,angularProfiling:`Angular profiling on. It stays on until the page reloads.`}[e];await this.send({[e]:t},``,()=>r,`request-change-detection-options`)||this.views.set(n)}async send(e,t,n,r=`request-change-detection-record`,{quiet:i=!1,keepPending:a=!1}={}){this.message.set(t);try{if(!this.rpc())throw Error(`no client`);return await JT(this.rpc(),r,{pageId:this.pageId(),...e}),a||this.message.set(``),i||this.announce(n()),!0}catch{let e=`Could not reach the page.`;return this.message.set(e),this.announce(e),!1}}announce(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-recording`]],inputs:{livePage:[1,`page`,`livePage`],pageId:[1,`pageId`],rpc:[1,`rpc`],native:[1,`native`]},outputs:{showComponent:`showComponent`},decls:22,vars:13,consts:[[`aria-labelledby`,`cd-heading`,1,`cd`],[1,`cd-head`],[`id`,`cd-heading`],[3,`imported`,`page`,`maxCycles`],[1,`status`],[`role`,`status`,1,`sr-only`],[1,`imported`],[1,`hint`],[`what`,`cycles`,`limit`,`cdCycles`,3,`dropped`,`max`],[1,`note`],[1,`empty`],[`type`,`button`,3,`click`,`disabled`],[`aria-hidden`,`true`,1,`dot`],[`type`,`button`],[`type`,`button`,3,`click`],[1,`badge`],[1,`mono`],[`capability`,`profiler`,`missing`,``,`compact`,``,3,`page`],[`role`,`group`,`aria-labelledby`,`cd-views-label`,1,`views`],[`id`,`cd-views-label`,1,`views-label`],[`type`,`button`,1,`view`,3,`click`,`disabled`],[`capability`,`angularProfiling`,`missing`,``,`compact`,``,3,`page`],[3,`rangeChange`,`cycles`,`range`],[3,`pick`,`cycles`,`names`,`scope`],[1,`spans-note`],[3,`pick`,`stats`,`scope`],[1,`cd-grid`],[`scope`,`col`],[`scope`,`col`,1,`num`],[`aria-label`,`Latest change detection cycles, newest first`,1,`cycles`],[3,`page`],[1,`num`],[`colspan`,`4`],[1,`when`],[1,`trigger`],[1,`timing`],[1,`top`]],template:function(e,t){if(e&1&&(I(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Change detection`),L(),j(4,sj,4,5),I(5,`app-cd-transfer`,3),H(`imported`,function(e){return t.showImport(e)}),L(),I(6,`p`,4),K(7),L(),I(8,`p`,5),K(9),L()(),j(10,cj,7,1,`p`,6),I(11,`p`,7),K(12,` Records each change detection cycle with Angular's profiler: how long it took, how many components it checked, what started it and which checks changed nothing. Tree rows show how often each instance was checked. Times come from a development build. While it records, the page also wraps Angular's scheduler, adds a signal write hook and watches DOM updates; all of it stops with the recording. `),j(13,lj,1,0),L(),j(14,fj,2,1),j(15,hj,16,7),R(16,`app-limit-note`,8),N(17,gj,2,1,`p`,9,gg),j(19,yj,9,9),j(20,kj,27,4)(21,Aj,2,0,`p`,10),L()),e&2){let e;O(4),M(t.imported()?-1:4),O(),F(`page`,t.page())(`maxCycles`,t.maxCycles()),O(2),q(t.status()),O(2),q(t.announcement()),O(),M((e=t.imported())?10:-1,e),O(3),M(t.native()?13:-1),O(),M(t.page()?.supported===!1?14:-1),O(),M(!t.imported()&&!t.native()?15:-1),O(),F(`dropped`,t.page()?.dropped??0)(`max`,t.maxCycles()),O(),P(t.capNotes()),O(2),M(t.cycles().length?19:-1),O(),M(t.page()?.components?.length?20:t.recording()?21:-1)}},dependencies:[KD,jO,WA,nA,qA,vA,NA,ij],styles:[`[_nghost-%COMP%] { display: block; margin-top: 16px; } @@ -1922,7 +1922,7 @@ td.mono[_ngcontent-%COMP%] { .trigger[_ngcontent-%COMP%] .mono[_ngcontent-%COMP%], .top[_ngcontent-%COMP%] .mono[_ngcontent-%COMP%] { overflow-wrap: anywhere; -}`]})},Pj=[`*`];function Fj(e,t){e&1&&K(0),e&2&&q(W(2).label())}function Ij(e,t){e&1&&Jg(0,0,null,Fj,1,1)}function Lj(e,t){if(e&1&&(I(0,`span`,4),K(1),L()),e&2){let e=W(2);O(),q(e.message())}}function Rj(e,t){if(e&1){let e=V();I(0,`button`,2),H(`click`,function(){return w(e),T(W().open())}),Mg(1,3),L(),j(2,Lj,2,1,`span`,4)}if(e&2){let e=W(),t=Qg(1);F(`title`,`Open `+e.label()+` in your editor`),A(`aria-label`,`Open `+e.label()+` in your editor`),O(),F(`ngTemplateOutlet`,t),O(),M(e.message()?2:-1)}}function zj(e,t){if(e&1&&(I(0,`span`,1),Mg(1,3),L()),e&2){let e=W(),t=Qg(1);F(`title`,e.label()),O(),F(`ngTemplateOutlet`,t)}}var Bj=class e{source=D(D(null));client=X(()=>this.source()());available=X(()=>{let e=this.client();return!!e&&!XT(e)});use(e){this.source.set(e)}async open(e,t){if(!this.available())return{ok:!1,error:`No server is connected.`};try{let n=await JT(this.client(),`open-in-editor`,{file:e,...t?{line:t}:{}});return n?.ok?{ok:!0}:{ok:!1,error:n?.error??`The server did not open it.`}}catch{return{ok:!1,error:`The server did not open it.`}}}static ɵfac=function(t){return new(t||e)};static ɵprov=Il({token:e,factory:e.ɵfac})};function Vj(e,t){return t?`${e}:${t}`:e}var Hj=class e{editor=C(Bj);file=$.required();line=$(void 0);label=X(()=>Vj(this.file(),this.line()));message=D(``);async open(){this.message.set(``);let e=await this.editor.open(this.file(),this.line()??void 0);e.ok||this.message.set(`Not opened: ${e.error}`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-source-link`]],inputs:{file:[1,`file`],line:[1,`line`]},ngContentSelectors:Pj,decls:4,vars:1,consts:[[`text`,``],[1,`source-text`,3,`title`],[`type`,`button`,1,`source-link`,3,`click`,`title`],[3,`ngTemplateOutlet`],[`role`,`alert`,1,`message`]],template:function(e,t){e&1&&(qg(),Jh(0,Ij,2,0,`ng-template`,null,0,gv),j(2,Rj,3,4)(3,zj,2,2,`span`,1)),e&2&&(O(2),M(t.editor.available()?2:3))},dependencies:[fy],styles:[`[_nghost-%COMP%] { +}`]})},Pj=[`*`];function Fj(e,t){e&1&&K(0),e&2&&q(W(2).label())}function Ij(e,t){e&1&&qg(0,0,null,Fj,1,1)}function Lj(e,t){if(e&1&&(I(0,`span`,4),K(1),L()),e&2){let e=W(2);O(),q(e.message())}}function Rj(e,t){if(e&1){let e=V();I(0,`button`,2),H(`click`,function(){return w(e),T(W().open())}),jg(1,3),L(),j(2,Lj,2,1,`span`,4)}if(e&2){let e=W(),t=Zg(1);F(`title`,`Open `+e.label()+` in your editor`),A(`aria-label`,`Open `+e.label()+` in your editor`),O(),F(`ngTemplateOutlet`,t),O(),M(e.message()?2:-1)}}function zj(e,t){if(e&1&&(I(0,`span`,1),jg(1,3),L()),e&2){let e=W(),t=Zg(1);F(`title`,e.label()),O(),F(`ngTemplateOutlet`,t)}}var Bj=class e{source=D(D(null));client=X(()=>this.source()());available=X(()=>{let e=this.client();return!!e&&!XT(e)});use(e){this.source.set(e)}async open(e,t){if(!this.available())return{ok:!1,error:`No server is connected.`};try{let n=await JT(this.client(),`open-in-editor`,{file:e,...t?{line:t}:{}});return n?.ok?{ok:!0}:{ok:!1,error:n?.error??`The server did not open it.`}}catch{return{ok:!1,error:`The server did not open it.`}}}static ɵfac=function(t){return new(t||e)};static ɵprov=Il({token:e,factory:e.ɵfac})};function Vj(e,t){return t?`${e}:${t}`:e}var Hj=class e{editor=C(Bj);file=$.required();line=$(void 0);label=X(()=>Vj(this.file(),this.line()));message=D(``);async open(){this.message.set(``);let e=await this.editor.open(this.file(),this.line()??void 0);e.ok||this.message.set(`Not opened: ${e.error}`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-source-link`]],inputs:{file:[1,`file`],line:[1,`line`]},ngContentSelectors:Pj,decls:4,vars:1,consts:[[`text`,``],[1,`source-text`,3,`title`],[`type`,`button`,1,`source-link`,3,`click`,`title`],[3,`ngTemplateOutlet`],[`role`,`alert`,1,`message`]],template:function(e,t){e&1&&(Kg(),qh(0,Ij,2,0,`ng-template`,null,0,gv),j(2,Rj,3,4)(3,zj,2,2,`span`,1)),e&2&&(O(2),M(t.editor.available()?2:3))},dependencies:[fy],styles:[`[_nghost-%COMP%] { display: inline; min-width: 0; } @@ -1957,7 +1957,7 @@ td.mono[_ngcontent-%COMP%] { color: var(--%NS%danger-text); font-family: var(--%NS%font-sans); font-size: 0.92em; -}`]})},Uj=[`field`],Wj=[`editButton`],Gj=[`valueBox`];function Kj(e,t){if(e&1){let e=V();z(0,`div`,5)(1,`label`,6),K(2),B(),z(3,`input`,7,0),U(`input`,function(t){return w(e),T(W().draft.set(t.target.value))})(`keydown.enter`,function(t){w(e);let n=W();return t.preventDefault(),T(n.apply())})(`keydown.escape`,function(t){w(e);let n=W();return t.preventDefault(),t.stopPropagation(),T(n.cancel())}),B(),z(5,`button`,8),U(`click`,function(){return w(e),T(W().apply())}),K(6,`Apply`),B(),z(7,`button`,9),U(`click`,function(){return w(e),T(W().cancel())}),K(8,`Cancel`),B()(),z(9,`p`,10),K(10),B()}if(e&2){let e=W();O(),Pg(`htmlFor`,e.fieldId),O(),J(`New value of `,e.prop().name,`, as JSON`),O(),Pg(`id`,e.fieldId)(`value`,e.draft())(`readOnly`,e.busy()),A(`aria-busy`,e.busy()?`true`:null)(`aria-invalid`,e.error()?`true`:null)(`aria-describedby`,e.hintId+(e.error()?` `+e.errorId:``)),O(2),Pg(`disabled`,e.busy()),O(4),Pg(`id`,e.hintId),O(),J(` JSON, such as "text", 42, true or `,e.objectSample,`. Enter applies, Escape cancels. `)}}function qj(e,t){if(e&1&&(z(0,`pre`,null,1),K(2),fv(3,`json`),B()),e&2){let e=W(2);A(`tabindex`,e.scrollable()?0:null)(`role`,e.scrollable()?`region`:null)(`aria-label`,e.scrollable()?`Value of `+e.prop().name:null),O(2),q(pv(3,4,e.prop().value))}}function Jj(e,t){if(e&1){let e=V();z(0,`button`,14,2),U(`click`,function(){return w(e),T(W(2).start())}),K(2,` Edit `),B()}if(e&2){let e=W(2);Pg(`disabled`,e.busy()),A(`aria-label`,`Edit `+e.prop().name)}}function Yj(e,t){if(e&1&&(z(0,`p`,13),K(1),B()),e&2){let e=W(2);O(),q(e.prop().locked)}}function Xj(e,t){if(e&1&&(z(0,`div`,11),j(1,qj,4,6,`pre`),j(2,Jj,3,2,`button`,12),B(),j(3,Yj,2,1,`p`,13)),e&2){let e=W();O(),M(e.bare()?-1:1),O(),M(e.editable()?2:-1),O(),M(e.writes()&&e.prop().locked?3:-1)}}function Zj(e,t){if(e&1&&(z(0,`p`,3),K(1),B()),e&2){let e=W();Pg(`id`,e.errorId),O(),q(e.error())}}var Qj=0;function $j(e){let t=e.trim();if(!t)return{error:`Type a JSON value, such as "text", 42, true, null or [1, 2].`};try{return{value:JSON.parse(t)}}catch{return{error:`Not valid JSON. Put text in double quotes, such as "Paris".`}}}var eM=class e{prop=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);bare=$(!1);readDraft=$(null);fieldId=`prop-edit-${++Qj}`;hintId=`${this.fieldId}-hint`;errorId=`${this.fieldId}-error`;objectSample=`{"a": 1}`;editing=D(!1);draft=D(``);busy=D(!1);error=D(``);done=D(``);editable=X(()=>this.writes()&&!!this.prop().edit&&!!this.pageId()&&!!this.rpc());field=Av(`field`);editButton=Av(`editButton`);valueBox=Av(`valueBox`);injector=C(Es);scrollable=D(!1);constructor(){Lv(()=>{this.prop();let e=this.valueBox()?.nativeElement;this.scrollable.set(!!e&&e.scrollHeight>e.clientHeight+1)})}async start(){let e=this.prop().value;this.error.set(``),this.done.set(``);let t=this.readDraft();if(t){this.busy.set(!0);let n=await t();if(this.busy.set(!1),n.error!==void 0){this.error.set(n.error);return}e=n.value}this.draft.set(e===void 0?``:JSON.stringify(e)),this.editing.set(!0),md(()=>{let e=this.field()?.nativeElement;e?.focus(),e?.select()},{injector:this.injector})}cancel(){this.editing()&&(this.editing.set(!1),this.busy.set(!1),this.error.set(``),this.focusEdit())}async apply(){if(this.busy())return;let e=$j(this.draft());if(`error`in e){this.error.set(e.error);return}let t=this.prop(),n=this.rpc(),r=this.pageId();if(!n||!r||!t.edit)return;this.busy.set(!0),this.error.set(``);let i;try{i=await n.scope(`pangular`).rpc.call(`request-component-edit`,{pageId:r,request:{id:this.componentId(),path:t.prop,value:e.value,kind:t.edit}})??{}}catch{i={error:`The devtools server did not answer. Try again.`}}this.busy.set(!1),this.editing()&&(i.ok?(this.editing.set(!1),this.done.set(`Set ${t.name}.`),this.focusEdit()):(this.error.set(i.error??`The page did not write it.`),this.field()?.nativeElement.focus()))}focusEdit(){md(()=>this.editButton()?.nativeElement.focus(),{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-prop-value`]],viewQuery:function(e,t){e&1&&Xg(t.field,Uj,5)(t.editButton,Wj,5)(t.valueBox,Gj,5),e&2&&Zg(3)},inputs:{prop:[1,`prop`],componentId:[1,`componentId`],pageId:[1,`pageId`],rpc:[1,`rpc`],writes:[1,`writes`],bare:[1,`bare`],readDraft:[1,`readDraft`]},decls:5,vars:3,consts:[[`field`,``],[`valueBox`,``],[`editButton`,``],[`role`,`alert`,1,`error`,3,`id`],[`role`,`status`,1,`sr-only`],[1,`editor`],[1,`sr-only`,3,`for`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,1,`field`,`mono`,3,`input`,`keydown.enter`,`keydown.escape`,`id`,`value`,`readOnly`],[`type`,`button`,1,`primary`,3,`click`,`disabled`],[`type`,`button`,3,`click`],[1,`hint`,3,`id`],[1,`view`],[`type`,`button`,1,`edit`,3,`disabled`],[1,`locked`],[`type`,`button`,1,`edit`,3,`click`,`disabled`]],template:function(e,t){e&1&&(j(0,Kj,11,11)(1,Xj,4,3),j(2,Zj,2,2,`p`,3),z(3,`p`,4),K(4),B()),e&2&&(M(+!t.editing()),O(2),M(t.error()?2:-1),O(2),q(t.done()))},dependencies:[my],styles:[`[_nghost-%COMP%] { +}`]})},Uj=[`field`],Wj=[`editButton`],Gj=[`valueBox`];function Kj(e,t){if(e&1){let e=V();z(0,`div`,5)(1,`label`,6),K(2),B(),z(3,`input`,7,0),U(`input`,function(t){return w(e),T(W().draft.set(t.target.value))})(`keydown.enter`,function(t){w(e);let n=W();return t.preventDefault(),T(n.apply())})(`keydown.escape`,function(t){w(e);let n=W();return t.preventDefault(),t.stopPropagation(),T(n.cancel())}),B(),z(5,`button`,8),U(`click`,function(){return w(e),T(W().apply())}),K(6,`Apply`),B(),z(7,`button`,9),U(`click`,function(){return w(e),T(W().cancel())}),K(8,`Cancel`),B()(),z(9,`p`,10),K(10),B()}if(e&2){let e=W();O(),Ng(`htmlFor`,e.fieldId),O(),J(`New value of `,e.prop().name,`, as JSON`),O(),Ng(`id`,e.fieldId)(`value`,e.draft())(`readOnly`,e.busy()),A(`aria-busy`,e.busy()?`true`:null)(`aria-invalid`,e.error()?`true`:null)(`aria-describedby`,e.hintId+(e.error()?` `+e.errorId:``)),O(2),Ng(`disabled`,e.busy()),O(4),Ng(`id`,e.hintId),O(),J(` JSON, such as "text", 42, true or `,e.objectSample,`. Enter applies, Escape cancels. `)}}function qj(e,t){if(e&1&&(z(0,`pre`,null,1),K(2),fv(3,`json`),B()),e&2){let e=W(2);A(`tabindex`,e.scrollable()?0:null)(`role`,e.scrollable()?`region`:null)(`aria-label`,e.scrollable()?`Value of `+e.prop().name:null),O(2),q(pv(3,4,e.prop().value))}}function Jj(e,t){if(e&1){let e=V();z(0,`button`,14,2),U(`click`,function(){return w(e),T(W(2).start())}),K(2,` Edit `),B()}if(e&2){let e=W(2);Ng(`disabled`,e.busy()),A(`aria-label`,`Edit `+e.prop().name)}}function Yj(e,t){if(e&1&&(z(0,`p`,13),K(1),B()),e&2){let e=W(2);O(),q(e.prop().locked)}}function Xj(e,t){if(e&1&&(z(0,`div`,11),j(1,qj,4,6,`pre`),j(2,Jj,3,2,`button`,12),B(),j(3,Yj,2,1,`p`,13)),e&2){let e=W();O(),M(e.bare()?-1:1),O(),M(e.editable()?2:-1),O(),M(e.writes()&&e.prop().locked?3:-1)}}function Zj(e,t){if(e&1&&(z(0,`p`,3),K(1),B()),e&2){let e=W();Ng(`id`,e.errorId),O(),q(e.error())}}var Qj=0;function $j(e){let t=e.trim();if(!t)return{error:`Type a JSON value, such as "text", 42, true, null or [1, 2].`};try{return{value:JSON.parse(t)}}catch{return{error:`Not valid JSON. Put text in double quotes, such as "Paris".`}}}var eM=class e{prop=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);bare=$(!1);readDraft=$(null);fieldId=`prop-edit-${++Qj}`;hintId=`${this.fieldId}-hint`;errorId=`${this.fieldId}-error`;objectSample=`{"a": 1}`;editing=D(!1);draft=D(``);busy=D(!1);error=D(``);done=D(``);editable=X(()=>this.writes()&&!!this.prop().edit&&!!this.pageId()&&!!this.rpc());field=Av(`field`);editButton=Av(`editButton`);valueBox=Av(`valueBox`);injector=C(Es);scrollable=D(!1);constructor(){Lv(()=>{this.prop();let e=this.valueBox()?.nativeElement;this.scrollable.set(!!e&&e.scrollHeight>e.clientHeight+1)})}async start(){let e=this.prop().value;this.error.set(``),this.done.set(``);let t=this.readDraft();if(t){this.busy.set(!0);let n=await t();if(this.busy.set(!1),n.error!==void 0){this.error.set(n.error);return}e=n.value}this.draft.set(e===void 0?``:JSON.stringify(e)),this.editing.set(!0),md(()=>{let e=this.field()?.nativeElement;e?.focus(),e?.select()},{injector:this.injector})}cancel(){this.editing()&&(this.editing.set(!1),this.busy.set(!1),this.error.set(``),this.focusEdit())}async apply(){if(this.busy())return;let e=$j(this.draft());if(`error`in e){this.error.set(e.error);return}let t=this.prop(),n=this.rpc(),r=this.pageId();if(!n||!r||!t.edit)return;this.busy.set(!0),this.error.set(``);let i;try{i=await n.scope(`pangular`).rpc.call(`request-component-edit`,{pageId:r,request:{id:this.componentId(),path:t.prop,value:e.value,kind:t.edit}})??{}}catch{i={error:`The devtools server did not answer. Try again.`}}this.busy.set(!1),this.editing()&&(i.ok?(this.editing.set(!1),this.done.set(`Set ${t.name}.`),this.focusEdit()):(this.error.set(i.error??`The page did not write it.`),this.field()?.nativeElement.focus()))}focusEdit(){md(()=>this.editButton()?.nativeElement.focus(),{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-prop-value`]],viewQuery:function(e,t){e&1&&Yg(t.field,Uj,5)(t.editButton,Wj,5)(t.valueBox,Gj,5),e&2&&Xg(3)},inputs:{prop:[1,`prop`],componentId:[1,`componentId`],pageId:[1,`pageId`],rpc:[1,`rpc`],writes:[1,`writes`],bare:[1,`bare`],readDraft:[1,`readDraft`]},decls:5,vars:3,consts:[[`field`,``],[`valueBox`,``],[`editButton`,``],[`role`,`alert`,1,`error`,3,`id`],[`role`,`status`,1,`sr-only`],[1,`editor`],[1,`sr-only`,3,`for`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,1,`field`,`mono`,3,`input`,`keydown.enter`,`keydown.escape`,`id`,`value`,`readOnly`],[`type`,`button`,1,`primary`,3,`click`,`disabled`],[`type`,`button`,3,`click`],[1,`hint`,3,`id`],[1,`view`],[`type`,`button`,1,`edit`,3,`disabled`],[1,`locked`],[`type`,`button`,1,`edit`,3,`click`,`disabled`]],template:function(e,t){e&1&&(j(0,Kj,11,11)(1,Xj,4,3),j(2,Zj,2,2,`p`,3),z(3,`p`,4),K(4),B()),e&2&&(M(+!t.editing()),O(2),M(t.error()?2:-1),O(2),q(t.done()))},dependencies:[my],styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -2080,7 +2080,7 @@ button.edit[_ngcontent-%COMP%] { .error[_ngcontent-%COMP%] { color: var(--%NS%danger-text); -}`]})},tM=1e3,nM={depth:5,limit:100},rM=`[redacted]`;function iM(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function aM(e){return iM(e)&&typeof e.$more==`number`&&Object.keys(e).length===1}function oM(e){return iM(e)&&typeof e.$collapsed==`string`&&typeof e.size==`number`&&Object.keys(e).length===2}function sM(e){return e===`Array`?`array`:e===`Map`?`map`:e===`Set`?`set`:`object`}function cM(e){return e.$type===`Map`&&Array.isArray(e.entries)}function lM(e){return e.$type===`Set`&&Array.isArray(e.values)}function uM(e){return Object.keys(e).filter(e=>e!==`$type`&&e!==`$more`)}function dM(e){if(!e||typeof e!=`object`)return null;if(oM(e))return e.size<=0?null:{kind:sM(e.$collapsed),type:e.$collapsed,size:e.size,collapsed:!0};if(aM(e))return null;if(Array.isArray(e)){let t=e.at(-1),n=aM(t)?t.$more:0,r=e.length-+!!n+n;return r?{kind:`array`,type:`Array`,size:r,collapsed:!1}:null}let t=e;if(cM(t)||lM(t)){let e=typeof t.size==`number`?t.size:0,n=cM(t)?`map`:`set`;return e?{kind:n,type:n===`map`?`Map`:`Set`,size:e,collapsed:!1}:null}let n=typeof t.$more==`number`?t.$more:0,r=uM(t).length+n,i=typeof t.$type==`string`?t.$type:`Object`;return r?{kind:`object`,type:i,size:r,collapsed:!1}:null}function fM(e){if(typeof e==`string`)return JSON.stringify(e);let t=dM(e);if(t)return hM(t);try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function pM(e){let t=dM(e);if(!t||t.collapsed)return{children:[],more:0};if(Array.isArray(e)){let n=(aM(e.at(-1))?e.slice(0,-1):e).map((e,t)=>({key:String(t),label:String(t),value:e}));return{children:n,more:t.size-n.length}}let n=e;if(t.kind===`map`){let e=n.entries.map((e,t)=>{let[n,r]=Array.isArray(e)?e:[void 0,e];return{key:String(t),label:fM(n),value:r}});return{children:e,more:Math.max(0,t.size-e.length)}}if(t.kind===`set`){let e=n.values.map((e,t)=>({key:String(t),label:String(t),value:e}));return{children:e,more:Math.max(0,t.size-e.length)}}return{children:uM(n).map(e=>({key:e,label:e,value:n[e]})),more:typeof n.$more==`number`?n.$more:0}}function mM(e,t,n){return`${e} ${e===1?t:n}`}function hM(e){let t={array:mM(e.size,`item`,`items`),object:mM(e.size,`key`,`keys`),map:mM(e.size,`entry`,`entries`),set:mM(e.size,`value`,`values`)}[e.kind];return`${e.type} (${t})`}function gM(e,t){return JSON.stringify(t===void 0?e:[t,...e])}function _M(e,t){return e.map((e,n)=>n===0?e:(t?t[n-1]!==`object`:/^\d+$/.test(e))?`[${e}]`:`.${e}`).join(``)}function vM(e){return e.every(e=>e&&e===e.trim()&&!/[.[\]]/.test(e))?e.join(`.`):null}var yM=/^\[(Getter|Unreadable|Circular|Truncated|Function\b.*|Promise)\]$/;function bM(e){return e===null||typeof e==`boolean`?!0:typeof e==`number`?Number.isFinite(e):typeof e==`string`&&e!==rM&&!yM.test(e)&&!e.endsWith(`…`)}function xM(e,t){return!e||t.kind===`map`||t.kind===`set`||e===`signal`&&t.kind===`object`&&t.type!==`Object`?null:e}function SM(e,t,n,r,i=500){let a=[],o=r.trim().toLowerCase();if(!o)return a;let s=new Set,c=(e,t)=>{let r=gM(e);if(!(s.has(r)||a.length>=i)){s.add(r);for(let r of pM(t).children){let t=[...e,r.key];if(r.label.toLowerCase().includes(o)&&a.push(t),!dM(r.value))continue;let i=n(t)??(dM(r.value)?.collapsed?void 0:r.value);i!==void 0&&c(t,i)}}};return c(e,n(e)??t),a}var CM=(e,t)=>t.id;function wM(e,t){if(e&1){let e=V();I(0,`button`,2),H(`click`,function(){w(e);let t=W().$implicit;return T(W(3).toggle(t))}),E(),I(1,`svg`,3),R(2,`path`,4),L(),vs(),I(3,`span`,14),K(4),L(),I(5,`span`,5),K(6),L()()}if(e&2){let e=W().$implicit;A(`aria-expanded`,e.open)(`aria-label`,e.label+`: `+e.text),O(4),J(``,e.label,`:`),O(2),q(e.text)}}function TM(e,t){if(e&1&&R(0,`app-prop-value`,15),e&2){let e=W(5);F(`prop`,t)(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}function EM(e,t){if(e&1&&(I(0,`span`,16),K(1),L()),e&2){let e=W(2).$implicit;O(),q(e.text)}}function DM(e,t){if(e&1&&(I(0,`span`,14),K(1),L(),j(2,TM,1,5,`app-prop-value`,15)(3,EM,2,1,`span`,16)),e&2){let e,t=W().$implicit;O(),J(``,t.label,`:`),O(),M((e=t.edit)?2:3,e)}}function OM(e,t){if(e&1){let e=V();I(0,`button`,17),H(`click`,function(){w(e);let t=W().$implicit;return T(W(3).more(t))}),K(1),I(2,`span`,18),K(3),L()()}if(e&2){let e=W().$implicit,t=W(3);O(),J(` Show `,t.step(e),` more `),O(2),J(`(`,e.more,` not listed)`)}}function kM(e,t){e&1&&(I(0,`span`,12),K(1,`Reading from the page…`),L())}function AM(e,t){if(e&1&&(I(0,`span`,13),K(1),L()),e&2){let e=W().$implicit;O(),q(e.text)}}function jM(e,t){if(e&1&&(I(0,`li`,9),j(1,wM,7,4,`button`,10)(2,DM,4,2)(3,OM,4,2,`button`,11)(4,kM,2,0,`span`,12)(5,AM,2,1,`span`,13),L()),e&2){let e,n=t.$implicit;y_(`padding-left`,n.depth*14,`px`),O(),M((e=n.kind)===`node`?1:e===`leaf`?2:e===`more`?3:e===`loading`?4:e===`error`?5:-1)}}function MM(e,t){if(e&1&&(I(0,`ul`,7),N(1,jM,6,3,`li`,8,CM),L()),e&2){let e=W(2);F(`id`,e.listId),A(`aria-label`,e.prop().name+` entries`),O(),P(e.rows())}}function NM(e,t){if(e&1){let e=V();I(0,`div`,1)(1,`button`,2),H(`click`,function(){return w(e),T(W().toggleRoot())}),E(),I(2,`svg`,3),R(3,`path`,4),L(),vs(),I(4,`span`,5),K(5),L()(),R(6,`app-prop-value`,6),L(),j(7,MM,3,2,`ul`,7)}if(e&2){let e=t,n=W();O(),A(`aria-expanded`,n.rootOpen())(`aria-controls`,n.rootOpen()?n.listId:null)(`aria-label`,n.prop().name+`: `+n.summaryOf(e)),O(4),q(n.summaryOf(e)),O(),F(`bare`,!0)(`prop`,n.prop())(`componentId`,n.componentId())(`pageId`,n.pageId())(`rpc`,n.rpc())(`writes`,n.writes())(`readDraft`,n.readWhole),O(),M(n.rootOpen()?7:-1)}}function PM(e,t){if(e&1&&R(0,`app-prop-value`,0),e&2){let e=W();F(`prop`,e.prop())(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}var FM=0;function IM(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function LM(e){if(Array.isArray(e))return e.every(LM);if(e&&typeof e==`object`){let t=e;return![`$collapsed`,`$more`,`$type`].some(e=>Object.hasOwn(t,e))&&Object.values(t).every(LM)}return bM(e)}var RM=class e{prop=$.required();store=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);directive=$(void 0);query=$(``);listId=`value-tree-${++FM}`;host=C(zl);pendingMore=null;constructor(){Lv(()=>{let e=this.rows(),t=this.pendingMore;if(!t)return;let n=e.findIndex(e=>(e.kind===`leaf`||e.kind===`node`)&&!t.has(e.id));if(n<0)return;this.pendingMore=null;let r=document.activeElement;r&&r!==document.body&&r.isConnected||this.focusNear(n)})}rootPath=X(()=>[this.prop().prop]);rootValue=X(()=>this.store().level(this.rootPath(),this.directive())??this.prop().value);root=X(()=>dM(this.rootValue()));needle=X(()=>this.query().trim().toLowerCase());matches=X(()=>{let e=this.needle(),t=this.prop();if(!e||[t.name,t.prop].some(t=>t.toLowerCase().includes(e)))return null;let n=this.store(),r=this.directive();return SM(this.rootPath(),this.rootValue(),e=>n.level(e,r),e)});rootOpen=X(()=>!!this.matches()?.length||this.store().isOpen(this.rootPath(),this.directive()));rows=X(()=>{let e=this.root();if(!e)return[];let t=this.store(),n=this.directive(),r=this.matches(),i=new Set,a=new Set;for(let e of r??[]){a.add(gM(e));for(let t=2;t<=e.length;t++)i.add(gM(e.slice(0,t)))}let o=this.prop(),s=this.writes()&&n===void 0,c=[],l=(e,o,d,f,p,m)=>{let{children:h,more:g}=pM(e);for(let e of h){let h=[...o,e.key],g=gM(h);if(r&&!m&&!i.has(g))continue;let _=dM(e.value),ee=gM(h,n);if(!_){let t=p&&bM(e.value)?vM(h):null;c.push({id:ee,kind:`leaf`,depth:f,path:h,label:e.label,text:IM(e.value),edit:s&&t&&p?{name:_M(h,[...d]),prop:t,value:e.value,edit:p}:void 0});continue}let te=!!r&&!m&&i.has(g)&&!a.has(g)||t.isOpen(h,n);if(c.push({id:ee,kind:`node`,depth:f,path:h,label:e.label,text:hM(_),container:_,open:te}),!te)continue;let ne=t.level(h,n)??(_.collapsed?void 0:e.value),re=[...d,_.kind];ne===void 0?t.errors().has(ee)?c.push({...u(h,f+1,`error`),text:t.errors().get(ee)}):c.push(u(h,f+1,`loading`)):l(ne,h,re,f+1,xM(p,_),m||a.has(g))}g>0&&(!r||m)&&c.push({...u(o,f,`more`),more:g,listed:h.length})},u=(e,t,r)=>({id:`${gM(e,n)}:${r}`,kind:r,depth:t,path:e,label:``,text:``});return l(this.rootValue(),this.rootPath(),[e.kind],0,s?xM(o.editInside??null,e):null,!r),c});readWhole=async()=>{let e=await this.store().read(this.rootPath(),nM.depth,nM.limit);return e.ok?LM(e.value)?{value:e.value}:{error:`Too large to edit as a whole. Open it to edit the values inside.`}:{error:e.error??`The page did not read it.`}};summaryOf(e){return hM(e)}toggleRoot(){this.pendingMore=null,this.store().toggle(this.rootPath(),this.directive(),!1)}toggle(e){this.pendingMore=null,this.store().toggle(e.path,this.directive(),!!e.container?.collapsed)}more(e){this.pendingMore=new Set(this.rows().map(e=>e.id)),this.store().more(e.path,this.directive(),e.listed??0)}focusNear(e){let t=this.host.nativeElement,n=Array.from(t.querySelectorAll(`#${this.listId} > li`)),r=e=>e?.querySelector(`button:not([disabled]), input, textarea, [tabindex="0"]`);(n.slice(e).map(r).find(Boolean)??n.slice(0,e).reverse().map(r).find(Boolean)??t.querySelector(`.root > .toggle`))?.focus()}step(e){return Math.min(100,e.more??0)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-value-tree`]],inputs:{prop:[1,`prop`],store:[1,`store`],componentId:[1,`componentId`],pageId:[1,`pageId`],rpc:[1,`rpc`],writes:[1,`writes`],directive:[1,`directive`],query:[1,`query`]},decls:2,vars:1,consts:[[3,`prop`,`componentId`,`pageId`,`rpc`,`writes`],[1,`root`],[`type`,`button`,1,`toggle`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[`d`,`m9 6 6 6-6 6`],[1,`summary`,`mono`],[1,`whole`,3,`bare`,`prop`,`componentId`,`pageId`,`rpc`,`writes`,`readDraft`],[1,`entries`,3,`id`],[1,`entry`,3,`padding-left`],[1,`entry`],[`type`,`button`,1,`toggle`],[`type`,`button`,1,`more`],[`role`,`status`,1,`muted`],[`role`,`alert`,1,`error`],[1,`key`,`mono`],[1,`leaf-edit`,3,`prop`,`componentId`,`pageId`,`rpc`,`writes`],[1,`leaf`,`mono`],[`type`,`button`,1,`more`,3,`click`],[1,`muted`]],template:function(e,t){if(e&1&&j(0,NM,8,12)(1,PM,1,5,`app-prop-value`,0),e&2){let e;M((e=t.root())?0:1,e)}},dependencies:[eM],styles:[`[_nghost-%COMP%] { +}`]})},tM=1e3,nM={depth:5,limit:100},rM=`[redacted]`;function iM(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function aM(e){return iM(e)&&typeof e.$more==`number`&&Object.keys(e).length===1}function oM(e){return iM(e)&&typeof e.$collapsed==`string`&&typeof e.size==`number`&&Object.keys(e).length===2}function sM(e){return e===`Array`?`array`:e===`Map`?`map`:e===`Set`?`set`:`object`}function cM(e){return e.$type===`Map`&&Array.isArray(e.entries)}function lM(e){return e.$type===`Set`&&Array.isArray(e.values)}function uM(e){return Object.keys(e).filter(e=>e!==`$type`&&e!==`$more`)}function dM(e){if(!e||typeof e!=`object`)return null;if(oM(e))return e.size<=0?null:{kind:sM(e.$collapsed),type:e.$collapsed,size:e.size,collapsed:!0};if(aM(e))return null;if(Array.isArray(e)){let t=e.at(-1),n=aM(t)?t.$more:0,r=e.length-+!!n+n;return r?{kind:`array`,type:`Array`,size:r,collapsed:!1}:null}let t=e;if(cM(t)||lM(t)){let e=typeof t.size==`number`?t.size:0,n=cM(t)?`map`:`set`;return e?{kind:n,type:n===`map`?`Map`:`Set`,size:e,collapsed:!1}:null}let n=typeof t.$more==`number`?t.$more:0,r=uM(t).length+n,i=typeof t.$type==`string`?t.$type:`Object`;return r?{kind:`object`,type:i,size:r,collapsed:!1}:null}function fM(e){if(typeof e==`string`)return JSON.stringify(e);let t=dM(e);if(t)return hM(t);try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function pM(e){let t=dM(e);if(!t||t.collapsed)return{children:[],more:0};if(Array.isArray(e)){let n=(aM(e.at(-1))?e.slice(0,-1):e).map((e,t)=>({key:String(t),label:String(t),value:e}));return{children:n,more:t.size-n.length}}let n=e;if(t.kind===`map`){let e=n.entries.map((e,t)=>{let[n,r]=Array.isArray(e)?e:[void 0,e];return{key:String(t),label:fM(n),value:r}});return{children:e,more:Math.max(0,t.size-e.length)}}if(t.kind===`set`){let e=n.values.map((e,t)=>({key:String(t),label:String(t),value:e}));return{children:e,more:Math.max(0,t.size-e.length)}}return{children:uM(n).map(e=>({key:e,label:e,value:n[e]})),more:typeof n.$more==`number`?n.$more:0}}function mM(e,t,n){return`${e} ${e===1?t:n}`}function hM(e){let t={array:mM(e.size,`item`,`items`),object:mM(e.size,`key`,`keys`),map:mM(e.size,`entry`,`entries`),set:mM(e.size,`value`,`values`)}[e.kind];return`${e.type} (${t})`}function gM(e,t){return JSON.stringify(t===void 0?e:[t,...e])}function _M(e,t){return e.map((e,n)=>n===0?e:(t?t[n-1]!==`object`:/^\d+$/.test(e))?`[${e}]`:`.${e}`).join(``)}function vM(e){return e.every(e=>e&&e===e.trim()&&!/[.[\]]/.test(e))?e.join(`.`):null}var yM=/^\[(Getter|Unreadable|Circular|Truncated|Function\b.*|Promise)\]$/;function bM(e){return e===null||typeof e==`boolean`?!0:typeof e==`number`?Number.isFinite(e):typeof e==`string`&&e!==rM&&!yM.test(e)&&!e.endsWith(`…`)}function xM(e,t){return!e||t.kind===`map`||t.kind===`set`||e===`signal`&&t.kind===`object`&&t.type!==`Object`?null:e}function SM(e,t,n,r,i=500){let a=[],o=r.trim().toLowerCase();if(!o)return a;let s=new Set,c=(e,t)=>{let r=gM(e);if(!(s.has(r)||a.length>=i)){s.add(r);for(let r of pM(t).children){let t=[...e,r.key];if(r.label.toLowerCase().includes(o)&&a.push(t),!dM(r.value))continue;let i=n(t)??(dM(r.value)?.collapsed?void 0:r.value);i!==void 0&&c(t,i)}}};return c(e,n(e)??t),a}var CM=(e,t)=>t.id;function wM(e,t){if(e&1){let e=V();I(0,`button`,2),H(`click`,function(){w(e);let t=W().$implicit;return T(W(3).toggle(t))}),E(),I(1,`svg`,3),R(2,`path`,4),L(),vs(),I(3,`span`,14),K(4),L(),I(5,`span`,5),K(6),L()()}if(e&2){let e=W().$implicit;A(`aria-expanded`,e.open)(`aria-label`,e.label+`: `+e.text),O(4),J(``,e.label,`:`),O(2),q(e.text)}}function TM(e,t){if(e&1&&R(0,`app-prop-value`,15),e&2){let e=W(5);F(`prop`,t)(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}function EM(e,t){if(e&1&&(I(0,`span`,16),K(1),L()),e&2){let e=W(2).$implicit;O(),q(e.text)}}function DM(e,t){if(e&1&&(I(0,`span`,14),K(1),L(),j(2,TM,1,5,`app-prop-value`,15)(3,EM,2,1,`span`,16)),e&2){let e,t=W().$implicit;O(),J(``,t.label,`:`),O(),M((e=t.edit)?2:3,e)}}function OM(e,t){if(e&1){let e=V();I(0,`button`,17),H(`click`,function(){w(e);let t=W().$implicit;return T(W(3).more(t))}),K(1),I(2,`span`,18),K(3),L()()}if(e&2){let e=W().$implicit,t=W(3);O(),J(` Show `,t.step(e),` more `),O(2),J(`(`,e.more,` not listed)`)}}function kM(e,t){e&1&&(I(0,`span`,12),K(1,`Reading from the page…`),L())}function AM(e,t){if(e&1&&(I(0,`span`,13),K(1),L()),e&2){let e=W().$implicit;O(),q(e.text)}}function jM(e,t){if(e&1&&(I(0,`li`,9),j(1,wM,7,4,`button`,10)(2,DM,4,2)(3,OM,4,2,`button`,11)(4,kM,2,0,`span`,12)(5,AM,2,1,`span`,13),L()),e&2){let e,n=t.$implicit;v_(`padding-left`,n.depth*14,`px`),O(),M((e=n.kind)===`node`?1:e===`leaf`?2:e===`more`?3:e===`loading`?4:e===`error`?5:-1)}}function MM(e,t){if(e&1&&(I(0,`ul`,7),N(1,jM,6,3,`li`,8,CM),L()),e&2){let e=W(2);F(`id`,e.listId),A(`aria-label`,e.prop().name+` entries`),O(),P(e.rows())}}function NM(e,t){if(e&1){let e=V();I(0,`div`,1)(1,`button`,2),H(`click`,function(){return w(e),T(W().toggleRoot())}),E(),I(2,`svg`,3),R(3,`path`,4),L(),vs(),I(4,`span`,5),K(5),L()(),R(6,`app-prop-value`,6),L(),j(7,MM,3,2,`ul`,7)}if(e&2){let e=t,n=W();O(),A(`aria-expanded`,n.rootOpen())(`aria-controls`,n.rootOpen()?n.listId:null)(`aria-label`,n.prop().name+`: `+n.summaryOf(e)),O(4),q(n.summaryOf(e)),O(),F(`bare`,!0)(`prop`,n.prop())(`componentId`,n.componentId())(`pageId`,n.pageId())(`rpc`,n.rpc())(`writes`,n.writes())(`readDraft`,n.readWhole),O(),M(n.rootOpen()?7:-1)}}function PM(e,t){if(e&1&&R(0,`app-prop-value`,0),e&2){let e=W();F(`prop`,e.prop())(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}var FM=0;function IM(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function LM(e){if(Array.isArray(e))return e.every(LM);if(e&&typeof e==`object`){let t=e;return![`$collapsed`,`$more`,`$type`].some(e=>Object.hasOwn(t,e))&&Object.values(t).every(LM)}return bM(e)}var RM=class e{prop=$.required();store=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);directive=$(void 0);query=$(``);listId=`value-tree-${++FM}`;host=C(zl);pendingMore=null;constructor(){Lv(()=>{let e=this.rows(),t=this.pendingMore;if(!t)return;let n=e.findIndex(e=>(e.kind===`leaf`||e.kind===`node`)&&!t.has(e.id));if(n<0)return;this.pendingMore=null;let r=document.activeElement;r&&r!==document.body&&r.isConnected||this.focusNear(n)})}rootPath=X(()=>[this.prop().prop]);rootValue=X(()=>this.store().level(this.rootPath(),this.directive())??this.prop().value);root=X(()=>dM(this.rootValue()));needle=X(()=>this.query().trim().toLowerCase());matches=X(()=>{let e=this.needle(),t=this.prop();if(!e||[t.name,t.prop].some(t=>t.toLowerCase().includes(e)))return null;let n=this.store(),r=this.directive();return SM(this.rootPath(),this.rootValue(),e=>n.level(e,r),e)});rootOpen=X(()=>!!this.matches()?.length||this.store().isOpen(this.rootPath(),this.directive()));rows=X(()=>{let e=this.root();if(!e)return[];let t=this.store(),n=this.directive(),r=this.matches(),i=new Set,a=new Set;for(let e of r??[]){a.add(gM(e));for(let t=2;t<=e.length;t++)i.add(gM(e.slice(0,t)))}let o=this.prop(),s=this.writes()&&n===void 0,c=[],l=(e,o,d,f,p,m)=>{let{children:h,more:g}=pM(e);for(let e of h){let h=[...o,e.key],g=gM(h);if(r&&!m&&!i.has(g))continue;let _=dM(e.value),ee=gM(h,n);if(!_){let t=p&&bM(e.value)?vM(h):null;c.push({id:ee,kind:`leaf`,depth:f,path:h,label:e.label,text:IM(e.value),edit:s&&t&&p?{name:_M(h,[...d]),prop:t,value:e.value,edit:p}:void 0});continue}let te=!!r&&!m&&i.has(g)&&!a.has(g)||t.isOpen(h,n);if(c.push({id:ee,kind:`node`,depth:f,path:h,label:e.label,text:hM(_),container:_,open:te}),!te)continue;let ne=t.level(h,n)??(_.collapsed?void 0:e.value),re=[...d,_.kind];ne===void 0?t.errors().has(ee)?c.push({...u(h,f+1,`error`),text:t.errors().get(ee)}):c.push(u(h,f+1,`loading`)):l(ne,h,re,f+1,xM(p,_),m||a.has(g))}g>0&&(!r||m)&&c.push({...u(o,f,`more`),more:g,listed:h.length})},u=(e,t,r)=>({id:`${gM(e,n)}:${r}`,kind:r,depth:t,path:e,label:``,text:``});return l(this.rootValue(),this.rootPath(),[e.kind],0,s?xM(o.editInside??null,e):null,!r),c});readWhole=async()=>{let e=await this.store().read(this.rootPath(),nM.depth,nM.limit);return e.ok?LM(e.value)?{value:e.value}:{error:`Too large to edit as a whole. Open it to edit the values inside.`}:{error:e.error??`The page did not read it.`}};summaryOf(e){return hM(e)}toggleRoot(){this.pendingMore=null,this.store().toggle(this.rootPath(),this.directive(),!1)}toggle(e){this.pendingMore=null,this.store().toggle(e.path,this.directive(),!!e.container?.collapsed)}more(e){this.pendingMore=new Set(this.rows().map(e=>e.id)),this.store().more(e.path,this.directive(),e.listed??0)}focusNear(e){let t=this.host.nativeElement,n=Array.from(t.querySelectorAll(`#${this.listId} > li`)),r=e=>e?.querySelector(`button:not([disabled]), input, textarea, [tabindex="0"]`);(n.slice(e).map(r).find(Boolean)??n.slice(0,e).reverse().map(r).find(Boolean)??t.querySelector(`.root > .toggle`))?.focus()}step(e){return Math.min(100,e.more??0)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-value-tree`]],inputs:{prop:[1,`prop`],store:[1,`store`],componentId:[1,`componentId`],pageId:[1,`pageId`],rpc:[1,`rpc`],writes:[1,`writes`],directive:[1,`directive`],query:[1,`query`]},decls:2,vars:1,consts:[[3,`prop`,`componentId`,`pageId`,`rpc`,`writes`],[1,`root`],[`type`,`button`,1,`toggle`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[`d`,`m9 6 6 6-6 6`],[1,`summary`,`mono`],[1,`whole`,3,`bare`,`prop`,`componentId`,`pageId`,`rpc`,`writes`,`readDraft`],[1,`entries`,3,`id`],[1,`entry`,3,`padding-left`],[1,`entry`],[`type`,`button`,1,`toggle`],[`type`,`button`,1,`more`],[`role`,`status`,1,`muted`],[`role`,`alert`,1,`error`],[1,`key`,`mono`],[1,`leaf-edit`,3,`prop`,`componentId`,`pageId`,`rpc`,`writes`],[1,`leaf`,`mono`],[`type`,`button`,1,`more`,3,`click`],[1,`muted`]],template:function(e,t){if(e&1&&j(0,NM,8,12)(1,PM,1,5,`app-prop-value`,0),e&2){let e;M((e=t.root())?0:1,e)}},dependencies:[eM],styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -2202,7 +2202,7 @@ button.edit[_ngcontent-%COMP%] { .more[_ngcontent-%COMP%] { transition: none; } -}`]})};function zM(e,t){return e.length>t.length&&e.startsWith(`${t.slice(0,-1)},`)}var BM=class{sender;target={rpc:null,pageId:null,componentId:null};fetched=D(new Map);pushed=D({});open=D(new Set);loading=D(new Set);errors=D(new Map);limits=new Map;generation=0;constructor(e){this.sender=e}follow(e,t){let n=e.componentId===this.target.componentId&&e.pageId===this.target.pageId;this.target=e,n||(this.generation++,this.fetched.set(new Map),this.open.set(new Set),this.loading.set(new Set),this.errors.set(new Map),this.limits.clear()),this.pushed.set(t??{})}level(e,t){let n=gM(e,t),r=this.pushed();return Object.hasOwn(r,n)?r[n]:this.fetched().get(n)}isOpen(e,t){return this.open().has(gM(e,t))}toggle(e,t,n){let r=gM(e,t),i=new Set(this.open());if(i.has(r)){for(let e of i)(e===r||zM(e,r))&&i.delete(e);this.open.set(i),this.send({path:e,directive:t,forget:!0});return}i.add(r),this.open.set(i),n&&this.load(e,t,this.limits.get(r)??30)}more(e,t,n){let r=gM(e,t),i=Math.min(tM,Math.max(n,this.limits.get(r)??0)+100);this.limits.set(r,i),this.load(e,t,i)}async read(e,t,n){return this.send({path:e,depth:t,limit:n})}async load(e,t,n){let r=gM(e,t),i=this.generation;this.loading.update(e=>new Set(e).add(r));let a=await this.send({path:e,directive:t,limit:n,watch:!0});i===this.generation&&(this.loading.update(e=>{let t=new Set(e);return t.delete(r),t}),this.errors.update(e=>{let t=new Map(e);return a.ok?t.delete(r):t.set(r,a.error??`The page did not read it.`),t}),a.ok&&this.fetched.update(e=>new Map(e).set(r,a.value)))}async send(e){if(this.sender){if(e.forget)return{ok:!0};let{directive:t,watch:n,...r}=e;try{return await this.sender(r)}catch{return{error:`The devtools server did not answer. Try again.`}}}let{rpc:t,pageId:n,componentId:r}=this.target;if(!t||!n||!r)return{error:`No live page to read from.`};let{directive:i,...a}=e;try{return await t.scope(`pangular`).rpc.call(`request-component-value`,{pageId:n,request:{id:r,...a,...i===void 0?{}:{directive:i}}})??{}}catch{return{error:`The devtools server did not answer. Try again.`}}}};function VM(e,t){if(e&1&&(z(0,`span`,1),K(1),B()),e&2){let e=W(2);O(),J(`: `,e.label())}}function HM(e,t){if(e&1&&(z(0,`span`,1),K(1),B()),e&2){let e=W(3);O(),J(`: `,e.label())}}function UM(e,t){if(e&1){let e=V();z(0,`button`,4),U(`click`,function(){return w(e),T(W(2).store(`log`))}),K(1,` Log to console `),j(2,HM,2,1,`span`,1),B()}if(e&2){let e=W(2);Pg(`disabled`,e.busy()||!e.rpc()||!e.pageId()),O(2),M(e.label()?2:-1)}}function WM(e,t){if(e&1){let e=V();z(0,`button`,0),U(`click`,function(){return w(e),T(W().store())}),K(1,` Store as global `),j(2,VM,2,1,`span`,1),B(),j(3,UM,3,2,`button`,2),z(4,`span`,3),K(5),B()}if(e&2){let e=W();Pg(`disabled`,e.busy()||!e.rpc()||!e.pageId()),O(2),M(e.label()?2:-1),O(),M(e.canLog()?3:-1),O(2),q(e.message())}}var GM=class e{rpc=$(null);pageId=$(null);target=$.required();label=$(``);canLog=$(!1);staticReport=X(()=>XT(this.rpc()));busy=D(!1);message=D(``);async store(e=`store`){let t=this.rpc(),n=this.pageId();if(t&&n){this.busy.set(!0),this.message.set(``);try{let r=await t.scope(`pangular`).rpc.call(`request-console-global`,{pageId:n,target:this.target(),...e===`log`?{mode:e}:{}}),i=e===`log`?r?.ok?`Logged in the page console.`:`Not logged.`:r?.ok&&r.name?`Stored as ${r.name}.`:`Not stored.`;this.message.set(r?.message||i)}catch{this.message.set(`Could not reach the page.`)}finally{this.busy.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-store-global`]],inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`],target:[1,`target`],label:[1,`label`],canLog:[1,`canLog`]},decls:1,vars:1,consts:[[`type`,`button`,1,`store`,3,`click`,`disabled`],[1,`sr-only`],[`type`,`button`,1,`store`,`log`,3,`disabled`],[`role`,`status`,1,`status`],[`type`,`button`,1,`store`,`log`,3,`click`,`disabled`]],template:function(e,t){e&1&&j(0,WM,6,4),e&2&&M(t.staticReport()?-1:0)},styles:[`[_nghost-%COMP%] { +}`]})};function zM(e,t){return e.length>t.length&&e.startsWith(`${t.slice(0,-1)},`)}var BM=class{sender;target={rpc:null,pageId:null,componentId:null};fetched=D(new Map);pushed=D({});open=D(new Set);loading=D(new Set);errors=D(new Map);limits=new Map;generation=0;constructor(e){this.sender=e}follow(e,t){let n=e.componentId===this.target.componentId&&e.pageId===this.target.pageId;this.target=e,n||(this.generation++,this.fetched.set(new Map),this.open.set(new Set),this.loading.set(new Set),this.errors.set(new Map),this.limits.clear()),this.pushed.set(t??{})}level(e,t){let n=gM(e,t),r=this.pushed();return Object.hasOwn(r,n)?r[n]:this.fetched().get(n)}isOpen(e,t){return this.open().has(gM(e,t))}toggle(e,t,n){let r=gM(e,t),i=new Set(this.open());if(i.has(r)){for(let e of i)(e===r||zM(e,r))&&i.delete(e);this.open.set(i),this.send({path:e,directive:t,forget:!0});return}i.add(r),this.open.set(i),n&&this.load(e,t,this.limits.get(r)??30)}more(e,t,n){let r=gM(e,t),i=Math.min(tM,Math.max(n,this.limits.get(r)??0)+100);this.limits.set(r,i),this.load(e,t,i)}async read(e,t,n){return this.send({path:e,depth:t,limit:n})}async load(e,t,n){let r=gM(e,t),i=this.generation;this.loading.update(e=>new Set(e).add(r));let a=await this.send({path:e,directive:t,limit:n,watch:!0});i===this.generation&&(this.loading.update(e=>{let t=new Set(e);return t.delete(r),t}),this.errors.update(e=>{let t=new Map(e);return a.ok?t.delete(r):t.set(r,a.error??`The page did not read it.`),t}),a.ok&&this.fetched.update(e=>new Map(e).set(r,a.value)))}async send(e){if(this.sender){if(e.forget)return{ok:!0};let{directive:t,watch:n,...r}=e;try{return await this.sender(r)}catch{return{error:`The devtools server did not answer. Try again.`}}}let{rpc:t,pageId:n,componentId:r}=this.target;if(!t||!n||!r)return{error:`No live page to read from.`};let{directive:i,...a}=e;try{return await t.scope(`pangular`).rpc.call(`request-component-value`,{pageId:n,request:{id:r,...a,...i===void 0?{}:{directive:i}}})??{}}catch{return{error:`The devtools server did not answer. Try again.`}}}};function VM(e,t){if(e&1&&(z(0,`span`,1),K(1),B()),e&2){let e=W(2);O(),J(`: `,e.label())}}function HM(e,t){if(e&1&&(z(0,`span`,1),K(1),B()),e&2){let e=W(3);O(),J(`: `,e.label())}}function UM(e,t){if(e&1){let e=V();z(0,`button`,4),U(`click`,function(){return w(e),T(W(2).store(`log`))}),K(1,` Log to console `),j(2,HM,2,1,`span`,1),B()}if(e&2){let e=W(2);Ng(`disabled`,e.busy()||!e.rpc()||!e.pageId()),O(2),M(e.label()?2:-1)}}function WM(e,t){if(e&1){let e=V();z(0,`button`,0),U(`click`,function(){return w(e),T(W().store())}),K(1,` Store as global `),j(2,VM,2,1,`span`,1),B(),j(3,UM,3,2,`button`,2),z(4,`span`,3),K(5),B()}if(e&2){let e=W();Ng(`disabled`,e.busy()||!e.rpc()||!e.pageId()),O(2),M(e.label()?2:-1),O(),M(e.canLog()?3:-1),O(2),q(e.message())}}var GM=class e{rpc=$(null);pageId=$(null);target=$.required();label=$(``);canLog=$(!1);staticReport=X(()=>XT(this.rpc()));busy=D(!1);message=D(``);async store(e=`store`){let t=this.rpc(),n=this.pageId();if(t&&n){this.busy.set(!0),this.message.set(``);try{let r=await t.scope(`pangular`).rpc.call(`request-console-global`,{pageId:n,target:this.target(),...e===`log`?{mode:e}:{}}),i=e===`log`?r?.ok?`Logged in the page console.`:`Not logged.`:r?.ok&&r.name?`Stored as ${r.name}.`:`Not stored.`;this.message.set(r?.message||i)}catch{this.message.set(`Could not reach the page.`)}finally{this.busy.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-store-global`]],inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`],target:[1,`target`],label:[1,`label`],canLog:[1,`canLog`]},decls:1,vars:1,consts:[[`type`,`button`,1,`store`,3,`click`,`disabled`],[1,`sr-only`],[`type`,`button`,1,`store`,`log`,3,`disabled`],[`role`,`status`,1,`status`],[`type`,`button`,1,`store`,`log`,3,`click`,`disabled`]],template:function(e,t){e&1&&j(0,WM,6,4),e&2&&M(t.staticReport()?-1:0)},styles:[`[_nghost-%COMP%] { display: inline-flex; flex-wrap: wrap; align-items: center; @@ -2251,7 +2251,7 @@ button.edit[_ngcontent-%COMP%] { .status[_ngcontent-%COMP%]:empty { display: none; -}`]})},KM=(e,t)=>t.block.id,qM=(e,t)=>t.kind;function JM(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,e.label,` `)}}function YM(e,t){if(e&1&&(K(0),z(1,`span`,11),K(2),B()),e&2){let e=W().$implicit;J(` `,e.kind,` `),O(2),J(``,e.seconds,`s`)}}function XM(e,t){if(e&1&&(z(0,`span`,8),j(1,JM,1,1)(2,YM,3,2),B()),e&2){let e=t.$implicit;b_(`note-`+e.kind),A(`title`,e.text),O(),M(e.seconds===void 0?1:2)}}function ZM(e,t){e&1&&(z(0,`span`,8),K(1,`hydrated`),B())}function QM(e,t){e&1&&(z(0,`span`,8),K(1,`@error block`),B())}function $M(e,t){if(e&1&&(z(0,`span`,9),K(1),B()),e&2){let e=W().$implicit;O(),q(e.timings)}}function eN(e,t){if(e&1){let e=V();z(0,`li`)(1,`button`,4),U(`click`,function(){let t=w(e).$implicit;return T(W(2).showOwner.emit(t.block))})(`focus`,function(){let t=w(e).$implicit;return T(W(2).highlight.emit(t.block))})(`blur`,function(){return w(e),T(W(2).highlight.emit(null))})(`mouseenter`,function(){let t=w(e).$implicit;return T(W(2).highlight.emit(t.block))})(`mouseleave`,function(){return w(e),T(W(2).highlight.emit(null))}),z(2,`span`,5),K(3),B(),z(4,`span`,6),K(5),B(),N(6,XM,3,4,`span`,7,qM),j(8,ZM,2,0,`span`,8),j(9,QM,2,0,`span`,8),j(10,$M,2,1,`span`,9),z(11,`span`,10),K(12),B()()()}if(e&2){let e=t.$implicit;O(),A(`aria-disabled`,e.block.owner?null:`true`),O(2),q(e.block.owner?.name??`Unknown component`),O(),b_(`defer-state-`+e.block.state),O(),q(e.block.state),O(),P(e.notes),O(2),M(e.block.hydration===`hydrated`?8:-1),O(),M(e.block.hasErrorBlock?9:-1),O(),M(e.timings?10:-1),O(2),q(e.block.triggers.join(`, `)||`no triggers`)}}function tN(e,t){if(e&1&&(z(0,`section`,0)(1,`h2`,1),K(2,` Defer blocks `),z(3,`span`,2),K(4),B()(),z(5,`ul`,3),N(6,eN,13,9,`li`,null,KM),B()()),e&2){let e=W();O(4),Y(``,e.rows().length,``,e.truncated()?`+`:``),O(2),P(e.rows())}}function nN(e){return e<1e3?`${e}ms`:`${Number((e/1e3).toFixed(2))}s`}function rN(e){let t=[],n=e.placeholder?.minimumTime;n!=null&&t.push(`placeholder min ${nN(n)}`);let r=[e.loading?.afterTime==null?``:`after ${nN(e.loading.afterTime)}`,e.loading?.minimumTime==null?``:`min ${nN(e.loading.minimumTime)}`].filter(Boolean);return r.length&&t.push(`loading ${r.join(`, `)}`),t.join(` · `)}var iN=class e{blocks=$([]);truncated=$(!1);clockOffset=$(0);showOwner=Cv();highlight=Cv();now=D(Date.now());waiting=X(()=>this.blocks().some(e=>!!e.since&&(e.state===`placeholder`||e.state===`initial`)));rows=X(()=>{let e=this.now()-this.clockOffset();return this.blocks().map(t=>({block:t,notes:zT({...t,since:t.since||e},e),timings:rN(t)}))});constructor(){let e,t=()=>{clearInterval(e),e=void 0};hc(()=>{if(!this.waiting())return t();e===void 0&&(this.now.set(Date.now()),e=setInterval(()=>this.now.set(Date.now()),1e3))}),C(Os).onDestroy(t)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-defer-blocks`]],inputs:{blocks:[1,`blocks`],truncated:[1,`truncated`],clockOffset:[1,`clockOffset`]},outputs:{showOwner:`showOwner`,highlight:`highlight`},decls:1,vars:1,consts:[[`aria-labelledby`,`ct-defer-title`,1,`defer`],[`id`,`ct-defer-title`,1,`defer-title`],[1,`pill`],[1,`defer-list`],[`type`,`button`,1,`defer-row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`name`,`mono`],[1,`defer-state`],[1,`flag`,3,`class`],[1,`flag`],[1,`timings`],[1,`triggers`,`mono`],[`aria-hidden`,`true`]],template:function(e,t){e&1&&j(0,tN,8,2,`section`,0),e&2&&M(t.rows().length?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})},KM=(e,t)=>t.block.id,qM=(e,t)=>t.kind;function JM(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,e.label,` `)}}function YM(e,t){if(e&1&&(K(0),z(1,`span`,11),K(2),B()),e&2){let e=W().$implicit;J(` `,e.kind,` `),O(2),J(``,e.seconds,`s`)}}function XM(e,t){if(e&1&&(z(0,`span`,8),j(1,JM,1,1)(2,YM,3,2),B()),e&2){let e=t.$implicit;y_(`note-`+e.kind),A(`title`,e.text),O(),M(e.seconds===void 0?1:2)}}function ZM(e,t){e&1&&(z(0,`span`,8),K(1,`hydrated`),B())}function QM(e,t){e&1&&(z(0,`span`,8),K(1,`@error block`),B())}function $M(e,t){if(e&1&&(z(0,`span`,9),K(1),B()),e&2){let e=W().$implicit;O(),q(e.timings)}}function eN(e,t){if(e&1){let e=V();z(0,`li`)(1,`button`,4),U(`click`,function(){let t=w(e).$implicit;return T(W(2).showOwner.emit(t.block))})(`focus`,function(){let t=w(e).$implicit;return T(W(2).highlight.emit(t.block))})(`blur`,function(){return w(e),T(W(2).highlight.emit(null))})(`mouseenter`,function(){let t=w(e).$implicit;return T(W(2).highlight.emit(t.block))})(`mouseleave`,function(){return w(e),T(W(2).highlight.emit(null))}),z(2,`span`,5),K(3),B(),z(4,`span`,6),K(5),B(),N(6,XM,3,4,`span`,7,qM),j(8,ZM,2,0,`span`,8),j(9,QM,2,0,`span`,8),j(10,$M,2,1,`span`,9),z(11,`span`,10),K(12),B()()()}if(e&2){let e=t.$implicit;O(),A(`aria-disabled`,e.block.owner?null:`true`),O(2),q(e.block.owner?.name??`Unknown component`),O(),y_(`defer-state-`+e.block.state),O(),q(e.block.state),O(),P(e.notes),O(2),M(e.block.hydration===`hydrated`?8:-1),O(),M(e.block.hasErrorBlock?9:-1),O(),M(e.timings?10:-1),O(2),q(e.block.triggers.join(`, `)||`no triggers`)}}function tN(e,t){if(e&1&&(z(0,`section`,0)(1,`h2`,1),K(2,` Defer blocks `),z(3,`span`,2),K(4),B()(),z(5,`ul`,3),N(6,eN,13,9,`li`,null,KM),B()()),e&2){let e=W();O(4),Y(``,e.rows().length,``,e.truncated()?`+`:``),O(2),P(e.rows())}}function nN(e){return e<1e3?`${e}ms`:`${Number((e/1e3).toFixed(2))}s`}function rN(e){let t=[],n=e.placeholder?.minimumTime;n!=null&&t.push(`placeholder min ${nN(n)}`);let r=[e.loading?.afterTime==null?``:`after ${nN(e.loading.afterTime)}`,e.loading?.minimumTime==null?``:`min ${nN(e.loading.minimumTime)}`].filter(Boolean);return r.length&&t.push(`loading ${r.join(`, `)}`),t.join(` · `)}var iN=class e{blocks=$([]);truncated=$(!1);clockOffset=$(0);showOwner=Cv();highlight=Cv();now=D(Date.now());waiting=X(()=>this.blocks().some(e=>!!e.since&&(e.state===`placeholder`||e.state===`initial`)));rows=X(()=>{let e=this.now()-this.clockOffset();return this.blocks().map(t=>({block:t,notes:zT({...t,since:t.since||e},e),timings:rN(t)}))});constructor(){let e,t=()=>{clearInterval(e),e=void 0};hc(()=>{if(!this.waiting())return t();e===void 0&&(this.now.set(Date.now()),e=setInterval(()=>this.now.set(Date.now()),1e3))}),C(Os).onDestroy(t)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-defer-blocks`]],inputs:{blocks:[1,`blocks`],truncated:[1,`truncated`],clockOffset:[1,`clockOffset`]},outputs:{showOwner:`showOwner`,highlight:`highlight`},decls:1,vars:1,consts:[[`aria-labelledby`,`ct-defer-title`,1,`defer`],[`id`,`ct-defer-title`,1,`defer-title`],[1,`pill`],[1,`defer-list`],[`type`,`button`,1,`defer-row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`name`,`mono`],[1,`defer-state`],[1,`flag`,3,`class`],[1,`flag`],[1,`timings`],[1,`triggers`,`mono`],[`aria-hidden`,`true`]],template:function(e,t){e&1&&j(0,tN,8,2,`section`,0),e&2&&M(t.rows().length?0:-1)},styles:[`[_nghost-%COMP%] { display: block; } @@ -2511,7 +2511,7 @@ button.edit[_ngcontent-%COMP%] { min-width: 0; text-overflow: ellipsis; white-space: nowrap; -}`]})},gN=(e,t)=>t.id;function _N(e,t){if(e&1&&(I(0,`p`,11),K(1),L(),I(2,`h3`,7),K(3,`Still retained`),L(),I(4,`p`,6),K(5,` In a development build, Angular's DI debug data keeps every destroyed component in memory, so Pangular can't tell a leak from that. Check retainers in the Chrome DevTools Memory panel: take a heap snapshot after a few navigations, search for the class and look for a retainer other than Angular's DI debug records. Open subscriptions after destroy are still tracked below. `),L()),e&2){let e=W(),t=W();O(),q(t.plural(e.navigations,`navigation`))}}function vN(e,t){e&1&&(I(0,`p`,6),K(1,` This page cannot track destroyed components. It needs WeakRef, FinalizationRegistry and the Angular debug API of a development build. `),L())}function yN(e,t){if(e&1&&(I(0,`span`,18),K(1),L()),e&2){let e=W().$implicit,t=W(4);O(),q(t.plural(e.subscriptions,`open subscription`))}}function bN(e,t){if(e&1&&(I(0,`li`,13)(1,`span`,14),K(2),L(),I(3,`span`,15),K(4),L(),I(5,`span`,16),K(6),L(),I(7,`span`,17),K(8),L(),j(9,yN,2,1,`span`,18),L()),e&2){let e=t.$implicit,n=W(4);O(2),q(e.name),O(2),q(e.route||`/`),O(2),J(``,n.plural(e.navigations,`navigation`),` ago`),O(2),q(n.ageOf(e)),O(),M(e.subscriptions?9:-1)}}function xN(e,t){if(e&1&&(I(0,`p`,6),K(1),L(),I(2,`ul`,12),N(3,bN,10,5,`li`,13,gN),L()),e&2){let e=W(3);O(),Y(` Destroyed, yet still in memory after at least `,e.minNavigations,` navigations and `,e.minSeconds,` seconds. Take a heap snapshot, search for the class and read its retainers. `),O(2),P(e.retained().slice(0,e.shown))}}function SN(e,t){e&1&&(I(0,`p`,6),K(1,`No destroyed component is still in memory after a few navigations.`),L())}function CN(e,t){if(e&1&&(I(0,`p`,6),K(1),I(2,`span`,19),K(3),L(),K(4,`. Navigate a few times to see whether they stay. `),L()),e&2){let e=W(3);O(),J(` `,e.plural(e.recent().length,`instance`),` destroyed recently and not collected yet: `),O(2),q(e.names(e.recent()))}}function wN(e,t){if(e&1&&(j(0,vN,2,0,`p`,6),I(1,`p`,11),K(2),L(),I(3,`h3`,7),K(4,` Still retained `),I(5,`span`,8),K(6),L()(),j(7,xN,5,2)(8,SN,2,0,`p`,6),j(9,CN,5,2,`p`,6)),e&2){let e=W(),t=W();M(e.support.retention?-1:0),O(2),H_(` `,t.plural(e.navigations,`navigation`),` · `,t.retained().length,` still retained · `,t.plural(e.totals.collected,`instance`),` collected `),O(4),q(t.retained().length),O(),M(t.retained().length?7:8),O(2),M(t.recent().length?9:-1)}}function TN(e,t){if(e&1&&(I(0,`p`,6),K(1,` Off the page but not destroyed (detached views, such as a route reuse cache): `),I(2,`span`,19),K(3),L(),K(4,`. `),L()),e&2){let e=W(2);O(3),q(e.names(e.detached()))}}function EN(e,t){if(e&1&&(I(0,`span`,8),K(1),L()),e&2){let e=W();O(),q(e.subscriptions.length)}}function DN(e,t){if(e&1&&(I(0,`span`,15),K(1),L()),e&2){let e=W().$implicit;O(),q(e.source)}}function ON(e,t){if(e&1&&(I(0,`li`,13)(1,`span`,14),K(2),L(),I(3,`span`,16),K(4),L(),I(5,`span`,18),K(6),L(),j(7,DN,2,1,`span`,15),L()),e&2){let e=t.$implicit;O(2),q(e.name),O(2),J(``,e.count,` open`),O(2),J(` `,e.reason===`instance-destroyed`?`instance destroyed`:`no instance left`,` `),O(),M(e.source?7:-1)}}function kN(e,t){if(e&1&&(I(0,`p`,6),K(1,` Still open although the component that made them is gone. Tear them down with takeUntilDestroyed(), DestroyRef.onDestroy or the async pipe. `),L(),I(2,`ul`,12),N(3,ON,8,4,`li`,13,gg),L()),e&2){let e=W(2),t=W();O(3),P(e.subscriptions.slice(0,t.shown))}}function AN(e,t){e&1&&(I(0,`p`,6),K(1,`No subscription is still open after its component went away.`),L())}function jN(e,t){e&1&&(I(0,`p`,6),K(1,` Subscriptions are tied to component classes only; Angular 20 profiler hooks tie them to instances. `),L())}function MN(e,t){if(e&1&&(j(0,kN,5,0)(1,AN,2,0,`p`,6),j(2,jN,2,0,`p`,6)),e&2){let e=W();M(+!e.subscriptions.length),O(2),M(e.support.instances?-1:2)}}function NN(e,t){e&1&&(I(0,`p`,9),K(1,` Tracking could not start: the page has no RxJS the overlay can load. `),L())}function PN(e,t){e&1&&(I(0,`p`,6),K(1,` Off. Track subscriptions wraps Observable.prototype.subscribe on the page to record which component makes each subscription, until you stop it. Subscriptions made before you start are not seen, so reload or navigate again after starting. `),L())}function FN(e,t){e&1&&R(0,`app-angular-unavailable`,10),e&2&&F(`page`,W(2).angular())}function IN(e,t){if(e&1&&(I(0,`span`,16),K(1),L()),e&2){let e=W().$implicit,t=W(3);O(),q(t.plural(e.subscriptions,`subscription`))}}function LN(e,t){if(e&1){let e=V();I(0,`li`)(1,`button`,20),H(`click`,function(){let t=w(e).$implicit;return T(W(3).showComponent.emit(t.id))})(`focus`,function(){let t=w(e).$implicit;return T(W(3).highlight.emit(t.id))})(`blur`,function(){return w(e),T(W(3).highlight.emit(null))})(`mouseenter`,function(){let t=w(e).$implicit;return T(W(3).highlight.emit(t.id))})(`mouseleave`,function(){return w(e),T(W(3).highlight.emit(null))}),I(2,`span`,14),K(3),L(),I(4,`span`,16),K(5),L(),j(6,IN,2,1,`span`,16),L()()}if(e&2){let e=t.$implicit,n=W(2),r=W();O(3),q(e.name),O(2),q(r.effectsText(e)),O(),M(n.support.subscriptions===`on`?6:-1)}}function RN(e,t){e&1&&(I(0,`p`,6),K(1,` Angular files a component's effects under the template its host sits in, so effects of components side by side in one template show as shared. `),L())}function zN(e,t){if(e&1&&(I(0,`ul`,12),N(1,LN,7,3,`li`,null,gN),L(),j(3,RN,2,0,`p`,6)),e&2){let e=W(),t=W();O(),P(e.components.slice(0,t.shown)),O(2),M(e.components.some(t.hasShared)?3:-1)}}function BN(e,t){e&1&&(I(0,`p`,6),K(1,`No component on the page has a live effect or a tracked subscription.`),L())}function VN(e,t){if(e&1&&(j(0,_N,6,1)(1,wN,10,7),j(2,TN,5,1,`p`,6),I(3,`h3`,7),K(4,` Open subscriptions after destroy `),j(5,EN,2,1,`span`,8),L(),j(6,MN,3,2)(7,NN,2,0,`p`,9)(8,PN,2,0,`p`,6),I(9,`h3`,7),K(10,` Live effects and subscriptions `),I(11,`span`,8),K(12),L()(),j(13,FN,1,1,`app-angular-unavailable`,10),j(14,zN,4,1)(15,BN,2,0,`p`,6)),e&2){let e,n=t,r=W();M(n.support.retention===`dev-di-debug`?0:1),O(2),M(r.detached().length?2:-1),O(3),M(n.support.subscriptions===`on`?5:-1),O(),M((e=n.support.subscriptions)===`on`?6:e===`unavailable`?7:8),O(6),q(n.components.length),O(),M(n.support.effects?-1:13),O(),M(n.components.length?14:15)}}function HN(e,t){e&1&&(I(0,`p`,6),K(1,`No leak data from this page yet. It comes with the next report.`),L())}var UN=20;function WN(e){let t=Math.max(0,Math.round(e/1e3));if(t<120)return`${t} s`;let n=Math.round(t/60);return n<120?`${n} min`:`${Math.round(n/60)} h`}var GN=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,KN=class e{report=$(null);pageId=$(null);rpc=$(null);angular=$(null);now=$(()=>Date.now());showComponent=Cv();highlight=Cv();shown=UN;minNavigations=2;minSeconds=eT/1e3;plural=GN;busy=D(!1);announcement=D(``);tracking=X(()=>this.report()?.support.subscriptions===`on`);split=X(()=>{let e=this.report(),t=[],n=[],r=[];if(!e)return{retained:t,recent:n,detached:r};let i=e.support.retention===`dev-di-debug`;for(let a of e.destroyed)if(a.detached)r.push(a);else if(i)continue;else this.isRetained(e,a)?t.push(a):n.push(a);return{retained:t,recent:n,detached:r}});retained=X(()=>this.split().retained);recent=X(()=>this.split().recent);detached=X(()=>this.split().detached);ageMs(e,t){return Math.max(0,this.now()()-e.reportedAt+(e.at-t.destroyedAt))}isRetained(e,t){return t.navigations>=2&&this.ageMs(e,t)>=1e4}ageOf(e){let t=this.report();return t?`${WN(this.ageMs(t,e))} old`:``}names(e){let t=[...new Set(e.map(e=>e.name))];return t.length>6?`${t.slice(0,6).join(`, `)} and more`:t.join(`, `)}hasShared(e){return!!e.sharedEffects}effectsText(e){let t=GN(e.effects,`effect`);return e.sharedEffects?`${t}, ${e.sharedEffects} shared`:t}async toggle(){let e=this.pageId();if(!e||this.busy())return;let t=!this.tracking();this.busy.set(!0);try{await JT(this.rpc(),`request-leak-tracking`,{pageId:e,on:t}),this.announcement.set(t?`Tracking subscriptions. Reload or navigate to see subscriptions made at start.`:`Stopped tracking subscriptions.`)}catch{this.announcement.set(`Could not reach the page. Try again.`)}finally{this.busy.set(!1)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-leaks-section`]],inputs:{report:[1,`report`],pageId:[1,`pageId`],rpc:[1,`rpc`],angular:[1,`angular`],now:[1,`now`]},outputs:{showComponent:`showComponent`,highlight:`highlight`},decls:12,vars:5,consts:[[`aria-labelledby`,`ct-leaks-title`,1,`leaks`],[1,`head`],[`id`,`ct-leaks-title`],[`type`,`button`,1,`track`,3,`click`,`disabled`],[`role`,`status`,1,`sr-only`],[1,`hint`],[1,`note`],[1,`sub`],[1,`pill`],[`role`,`status`,1,`note`],[`capability`,`signalGraph`,`missing`,``,`compact`,``,3,`page`],[1,`stats`],[1,`rows`],[1,`row`],[1,`name`,`mono`],[1,`meta`,`mono`],[1,`count`],[1,`meta`],[1,`flag`,`warn`],[1,`mono`],[`type`,`button`,1,`row`,`live`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`]],template:function(e,t){if(e&1&&(I(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Leaks`),L(),I(4,`button`,3),H(`click`,function(){return t.toggle()}),K(5,` Track subscriptions `),L(),I(6,`p`,4),K(7),L()(),I(8,`p`,5),K(9,` Components that left the page but are still in memory, and the live effects and RxJS subscriptions of each component. The browser collects garbage when it decides, so a retained instance is a hint: check what holds it in the Chrome DevTools Memory panel. `),L(),j(10,VN,16,7)(11,HN,2,0,`p`,6),L()),e&2){let e;O(4),F(`disabled`,!t.pageId()||!t.report()),A(`aria-pressed`,t.tracking())(`aria-disabled`,t.busy()||null),O(3),q(t.announcement()),O(3),M((e=t.report())?10:11,e)}},dependencies:[KD],styles:[`[_nghost-%COMP%] { +}`]})},gN=(e,t)=>t.id;function _N(e,t){if(e&1&&(I(0,`p`,11),K(1),L(),I(2,`h3`,7),K(3,`Still retained`),L(),I(4,`p`,6),K(5,` In a development build, Angular's DI debug data keeps every destroyed component in memory, so Pangular can't tell a leak from that. Check retainers in the Chrome DevTools Memory panel: take a heap snapshot after a few navigations, search for the class and look for a retainer other than Angular's DI debug records. Open subscriptions after destroy are still tracked below. `),L()),e&2){let e=W(),t=W();O(),q(t.plural(e.navigations,`navigation`))}}function vN(e,t){e&1&&(I(0,`p`,6),K(1,` This page cannot track destroyed components. It needs WeakRef, FinalizationRegistry and the Angular debug API of a development build. `),L())}function yN(e,t){if(e&1&&(I(0,`span`,18),K(1),L()),e&2){let e=W().$implicit,t=W(4);O(),q(t.plural(e.subscriptions,`open subscription`))}}function bN(e,t){if(e&1&&(I(0,`li`,13)(1,`span`,14),K(2),L(),I(3,`span`,15),K(4),L(),I(5,`span`,16),K(6),L(),I(7,`span`,17),K(8),L(),j(9,yN,2,1,`span`,18),L()),e&2){let e=t.$implicit,n=W(4);O(2),q(e.name),O(2),q(e.route||`/`),O(2),J(``,n.plural(e.navigations,`navigation`),` ago`),O(2),q(n.ageOf(e)),O(),M(e.subscriptions?9:-1)}}function xN(e,t){if(e&1&&(I(0,`p`,6),K(1),L(),I(2,`ul`,12),N(3,bN,10,5,`li`,13,gN),L()),e&2){let e=W(3);O(),Y(` Destroyed, yet still in memory after at least `,e.minNavigations,` navigations and `,e.minSeconds,` seconds. Take a heap snapshot, search for the class and read its retainers. `),O(2),P(e.retained().slice(0,e.shown))}}function SN(e,t){e&1&&(I(0,`p`,6),K(1,`No destroyed component is still in memory after a few navigations.`),L())}function CN(e,t){if(e&1&&(I(0,`p`,6),K(1),I(2,`span`,19),K(3),L(),K(4,`. Navigate a few times to see whether they stay. `),L()),e&2){let e=W(3);O(),J(` `,e.plural(e.recent().length,`instance`),` destroyed recently and not collected yet: `),O(2),q(e.names(e.recent()))}}function wN(e,t){if(e&1&&(j(0,vN,2,0,`p`,6),I(1,`p`,11),K(2),L(),I(3,`h3`,7),K(4,` Still retained `),I(5,`span`,8),K(6),L()(),j(7,xN,5,2)(8,SN,2,0,`p`,6),j(9,CN,5,2,`p`,6)),e&2){let e=W(),t=W();M(e.support.retention?-1:0),O(2),H_(` `,t.plural(e.navigations,`navigation`),` · `,t.retained().length,` still retained · `,t.plural(e.totals.collected,`instance`),` collected `),O(4),q(t.retained().length),O(),M(t.retained().length?7:8),O(2),M(t.recent().length?9:-1)}}function TN(e,t){if(e&1&&(I(0,`p`,6),K(1,` Off the page but not destroyed (detached views, such as a route reuse cache): `),I(2,`span`,19),K(3),L(),K(4,`. `),L()),e&2){let e=W(2);O(3),q(e.names(e.detached()))}}function EN(e,t){if(e&1&&(I(0,`span`,8),K(1),L()),e&2){let e=W();O(),q(e.subscriptions.length)}}function DN(e,t){if(e&1&&(I(0,`span`,15),K(1),L()),e&2){let e=W().$implicit;O(),q(e.source)}}function ON(e,t){if(e&1&&(I(0,`li`,13)(1,`span`,14),K(2),L(),I(3,`span`,16),K(4),L(),I(5,`span`,18),K(6),L(),j(7,DN,2,1,`span`,15),L()),e&2){let e=t.$implicit;O(2),q(e.name),O(2),J(``,e.count,` open`),O(2),J(` `,e.reason===`instance-destroyed`?`instance destroyed`:`no instance left`,` `),O(),M(e.source?7:-1)}}function kN(e,t){if(e&1&&(I(0,`p`,6),K(1,` Still open although the component that made them is gone. Tear them down with takeUntilDestroyed(), DestroyRef.onDestroy or the async pipe. `),L(),I(2,`ul`,12),N(3,ON,8,4,`li`,13,hg),L()),e&2){let e=W(2),t=W();O(3),P(e.subscriptions.slice(0,t.shown))}}function AN(e,t){e&1&&(I(0,`p`,6),K(1,`No subscription is still open after its component went away.`),L())}function jN(e,t){e&1&&(I(0,`p`,6),K(1,` Subscriptions are tied to component classes only; Angular 20 profiler hooks tie them to instances. `),L())}function MN(e,t){if(e&1&&(j(0,kN,5,0)(1,AN,2,0,`p`,6),j(2,jN,2,0,`p`,6)),e&2){let e=W();M(+!e.subscriptions.length),O(2),M(e.support.instances?-1:2)}}function NN(e,t){e&1&&(I(0,`p`,9),K(1,` Tracking could not start: the page has no RxJS the overlay can load. `),L())}function PN(e,t){e&1&&(I(0,`p`,6),K(1,` Off. Track subscriptions wraps Observable.prototype.subscribe on the page to record which component makes each subscription, until you stop it. Subscriptions made before you start are not seen, so reload or navigate again after starting. `),L())}function FN(e,t){e&1&&R(0,`app-angular-unavailable`,10),e&2&&F(`page`,W(2).angular())}function IN(e,t){if(e&1&&(I(0,`span`,16),K(1),L()),e&2){let e=W().$implicit,t=W(3);O(),q(t.plural(e.subscriptions,`subscription`))}}function LN(e,t){if(e&1){let e=V();I(0,`li`)(1,`button`,20),H(`click`,function(){let t=w(e).$implicit;return T(W(3).showComponent.emit(t.id))})(`focus`,function(){let t=w(e).$implicit;return T(W(3).highlight.emit(t.id))})(`blur`,function(){return w(e),T(W(3).highlight.emit(null))})(`mouseenter`,function(){let t=w(e).$implicit;return T(W(3).highlight.emit(t.id))})(`mouseleave`,function(){return w(e),T(W(3).highlight.emit(null))}),I(2,`span`,14),K(3),L(),I(4,`span`,16),K(5),L(),j(6,IN,2,1,`span`,16),L()()}if(e&2){let e=t.$implicit,n=W(2),r=W();O(3),q(e.name),O(2),q(r.effectsText(e)),O(),M(n.support.subscriptions===`on`?6:-1)}}function RN(e,t){e&1&&(I(0,`p`,6),K(1,` Angular files a component's effects under the template its host sits in, so effects of components side by side in one template show as shared. `),L())}function zN(e,t){if(e&1&&(I(0,`ul`,12),N(1,LN,7,3,`li`,null,gN),L(),j(3,RN,2,0,`p`,6)),e&2){let e=W(),t=W();O(),P(e.components.slice(0,t.shown)),O(2),M(e.components.some(t.hasShared)?3:-1)}}function BN(e,t){e&1&&(I(0,`p`,6),K(1,`No component on the page has a live effect or a tracked subscription.`),L())}function VN(e,t){if(e&1&&(j(0,_N,6,1)(1,wN,10,7),j(2,TN,5,1,`p`,6),I(3,`h3`,7),K(4,` Open subscriptions after destroy `),j(5,EN,2,1,`span`,8),L(),j(6,MN,3,2)(7,NN,2,0,`p`,9)(8,PN,2,0,`p`,6),I(9,`h3`,7),K(10,` Live effects and subscriptions `),I(11,`span`,8),K(12),L()(),j(13,FN,1,1,`app-angular-unavailable`,10),j(14,zN,4,1)(15,BN,2,0,`p`,6)),e&2){let e,n=t,r=W();M(n.support.retention===`dev-di-debug`?0:1),O(2),M(r.detached().length?2:-1),O(3),M(n.support.subscriptions===`on`?5:-1),O(),M((e=n.support.subscriptions)===`on`?6:e===`unavailable`?7:8),O(6),q(n.components.length),O(),M(n.support.effects?-1:13),O(),M(n.components.length?14:15)}}function HN(e,t){e&1&&(I(0,`p`,6),K(1,`No leak data from this page yet. It comes with the next report.`),L())}var UN=20;function WN(e){let t=Math.max(0,Math.round(e/1e3));if(t<120)return`${t} s`;let n=Math.round(t/60);return n<120?`${n} min`:`${Math.round(n/60)} h`}var GN=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,KN=class e{report=$(null);pageId=$(null);rpc=$(null);angular=$(null);now=$(()=>Date.now());showComponent=Cv();highlight=Cv();shown=UN;minNavigations=2;minSeconds=eT/1e3;plural=GN;busy=D(!1);announcement=D(``);tracking=X(()=>this.report()?.support.subscriptions===`on`);split=X(()=>{let e=this.report(),t=[],n=[],r=[];if(!e)return{retained:t,recent:n,detached:r};let i=e.support.retention===`dev-di-debug`;for(let a of e.destroyed)if(a.detached)r.push(a);else if(i)continue;else this.isRetained(e,a)?t.push(a):n.push(a);return{retained:t,recent:n,detached:r}});retained=X(()=>this.split().retained);recent=X(()=>this.split().recent);detached=X(()=>this.split().detached);ageMs(e,t){return Math.max(0,this.now()()-e.reportedAt+(e.at-t.destroyedAt))}isRetained(e,t){return t.navigations>=2&&this.ageMs(e,t)>=1e4}ageOf(e){let t=this.report();return t?`${WN(this.ageMs(t,e))} old`:``}names(e){let t=[...new Set(e.map(e=>e.name))];return t.length>6?`${t.slice(0,6).join(`, `)} and more`:t.join(`, `)}hasShared(e){return!!e.sharedEffects}effectsText(e){let t=GN(e.effects,`effect`);return e.sharedEffects?`${t}, ${e.sharedEffects} shared`:t}async toggle(){let e=this.pageId();if(!e||this.busy())return;let t=!this.tracking();this.busy.set(!0);try{await JT(this.rpc(),`request-leak-tracking`,{pageId:e,on:t}),this.announcement.set(t?`Tracking subscriptions. Reload or navigate to see subscriptions made at start.`:`Stopped tracking subscriptions.`)}catch{this.announcement.set(`Could not reach the page. Try again.`)}finally{this.busy.set(!1)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-leaks-section`]],inputs:{report:[1,`report`],pageId:[1,`pageId`],rpc:[1,`rpc`],angular:[1,`angular`],now:[1,`now`]},outputs:{showComponent:`showComponent`,highlight:`highlight`},decls:12,vars:5,consts:[[`aria-labelledby`,`ct-leaks-title`,1,`leaks`],[1,`head`],[`id`,`ct-leaks-title`],[`type`,`button`,1,`track`,3,`click`,`disabled`],[`role`,`status`,1,`sr-only`],[1,`hint`],[1,`note`],[1,`sub`],[1,`pill`],[`role`,`status`,1,`note`],[`capability`,`signalGraph`,`missing`,``,`compact`,``,3,`page`],[1,`stats`],[1,`rows`],[1,`row`],[1,`name`,`mono`],[1,`meta`,`mono`],[1,`count`],[1,`meta`],[1,`flag`,`warn`],[1,`mono`],[`type`,`button`,1,`row`,`live`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`]],template:function(e,t){if(e&1&&(I(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Leaks`),L(),I(4,`button`,3),H(`click`,function(){return t.toggle()}),K(5,` Track subscriptions `),L(),I(6,`p`,4),K(7),L()(),I(8,`p`,5),K(9,` Components that left the page but are still in memory, and the live effects and RxJS subscriptions of each component. The browser collects garbage when it decides, so a retained instance is a hint: check what holds it in the Chrome DevTools Memory panel. `),L(),j(10,VN,16,7)(11,HN,2,0,`p`,6),L()),e&2){let e;O(4),F(`disabled`,!t.pageId()||!t.report()),A(`aria-pressed`,t.tracking())(`aria-disabled`,t.busy()||null),O(3),q(t.announcement()),O(3),M((e=t.report())?10:11,e)}},dependencies:[KD],styles:[`[_nghost-%COMP%] { display: block; } @@ -2667,7 +2667,7 @@ h2[_ngcontent-%COMP%] { border-color: color-mix(in srgb, var(--%NS%warn) 30%, transparent); background: color-mix(in srgb, var(--%NS%warn) 12%, transparent); color: var(--%NS%warn-text); -}`]})},qN=12,JN=900;function YN(e){for(let t=e.parentElement;t;t=t.parentElement){let e=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(e.overflowY))return t}return null}var XN=class{options;injector=C(Es);visibleTop=D(0);viewport=D(JN);rowHeight;host=null;scroller=null;detach=null;enabled;range;padTop;padBottom;constructor(e){this.options=e,this.rowHeight=D(e.estimate);let t=e.min??300;this.enabled=X(()=>e.count()>t),this.range=X(()=>{let t=e.count();if(!this.enabled())return{start:0,end:t};let n=this.rowHeight(),r=this.viewport(),i=Math.max(0,Math.min(this.visibleTop(),t*n-r)),a=Math.max(0,Math.min(t-1,Math.floor(i/n)-qN));return{start:a,end:Math.min(t,Math.max(a,Math.ceil((i+r)/n)+qN))}}),this.padTop=X(()=>this.enabled()?this.range().start*this.rowHeight():0),this.padBottom=X(()=>this.enabled()?(e.count()-this.range().end)*this.rowHeight():0),hc(()=>{e.count(),md(()=>this.update(),{injector:this.injector})}),C(Os).onDestroy(()=>this.detach?.())}get count(){return this.options.count()}rendered(e){let{start:t,end:n}=this.range();return e>=t&&ethis.update();n.addEventListener(`scroll`,r,{passive:!0}),window.addEventListener(`resize`,r),this.detach=()=>{n.removeEventListener(`scroll`,r),window.removeEventListener(`resize`,r)},this.update()}update(){let e=this.host;if(e){if(this.scroller===e)this.place(e.scrollTop,e.clientHeight);else{let t=this.scroller?this.scroller.getBoundingClientRect().top:0,n=this.scroller?this.scroller.clientHeight:window.innerHeight;this.place(t-e.getBoundingClientRect().top,n)}this.options.fixed||this.measure()}}place(e,t){this.visibleTop.set(e),this.viewport.set(t>0?t:JN)}measure(){let e=this.host?.querySelectorAll(`[data-vindex]`);if(!e||e.length<2)return;let t=e[0].getBoundingClientRect(),n=(e[e.length-1].getBoundingClientRect().bottom-t.top)/e.length;n>4&&Math.abs(n-this.rowHeight())>1&&this.rowHeight.set(n)}reveal(e,t){if(this.enabled()&&!this.rendered(e)){let t=e*this.rowHeight(),n=this.viewport(),r=Math.max(0,t-n/2);if(this.place(r,n),this.host&&this.scroller===this.host)this.host.scrollTop=r;else if(this.host){let e=this.scroller?this.scroller.getBoundingClientRect().top:0,t=this.host.getBoundingClientRect().top-e+r;this.scroller?this.scroller.scrollTop+=t:window.scrollBy(0,t)}}t&&md(t,{injector:this.injector})}};function ZN(e){let t=e.ownerDocument.defaultView;if(!t)return null;for(let n=e.parentElement;n&&n!==e.ownerDocument.documentElement&&n!==e.ownerDocument.body;n=n.parentElement)if(/(auto|scroll|overlay)/.test(t.getComputedStyle(n).overflowY))return n;return null}var QN=e=>{let t=parseFloat(e);return Number.isFinite(t)?t:0};function $N(e,t=8){let n=e.ownerDocument.defaultView;if(!n)return e.offsetHeight+t;let r=ZN(e),i=r?n.getComputedStyle(r):null,a=i?QN(i.paddingTop):0,o=i?QN(i.scrollPaddingTop):0,s=QN(n.getComputedStyle(e).top);return Math.max(0,Math.ceil(a+s+e.offsetHeight+t-o))}function eP(e,t,n=8){let r=ZN(e),i=t.getBoundingClientRect().bottom+n-e.getBoundingClientRect().top;i<=0||(r?r.scrollTop-=i:e.ownerDocument.defaultView?.scrollBy(0,-i))}var tP=[`filterInput`],nP=[`treeEl`],rP=[`propFilterInput`],iP=()=>[],aP=e=>({kind:`component`,id:e}),oP=(e,t)=>t.row.node.id,sP=(e,t)=>t.outlet+t.route,cP=(e,t)=>t+e;function lP(e,t){return this.sourceKey(t)}var uP=(e,t)=>t.formId,dP=(e,t)=>t.name+t.index,fP=(e,t)=>t.name,pP=(e,t)=>t.token+e;function mP(e,t){if(e&1){let e=V();I(0,`span`,40),K(1,`Page`),L(),I(2,`app-select`,41),H(`valueChange`,function(t){return w(e),T(W(2).selectPage(t))}),L()}if(e&2){let e=W(2);O(2),F(`options`,e.pageOptions())(`value`,e.page()?.pageId??null)}}function hP(e,t){if(e&1){let e=V();I(0,`button`,42),H(`click`,function(){return w(e),T(W(2).toggleDirectiveHosts())}),E(),I(1,`svg`,15),R(2,`path`,43)(3,`path`,44),L(),vs(),I(4,`span`,18),K(5,`Directive hosts`),L()()}e&2&&A(`aria-pressed`,W(2).showDirectiveHosts())}function gP(e,t){if(e&1){let e=V();I(0,`button`,45),H(`click`,function(){w(e);let t=W(2);return T(t.picking()?t.cancelPick():t.pick())}),E(),I(1,`svg`,15),R(2,`path`,46),L(),vs(),I(3,`span`,18),K(4),L()()}if(e&2){let e=W(2);G(`on`,e.picking()),A(`title`,e.pickLabel()),O(4),q(e.pickLabel())}}function _P(e,t){if(e&1&&(I(0,`p`,24),K(1),L()),e&2){let e=W(2);O(),q(e.pickMessage())}}function vP(e,t){if(e&1&&(I(0,`p`,25),K(1),L()),e&2){let e=W(2);O(),q(e.truncationText())}}function yP(e,t){e&1&&(I(0,`p`,48),K(1,`The filter only searches the components the tree lists.`),L())}function bP(e,t){e&1&&(I(0,`p`,48),K(1,`Directive hosts are hidden, so they are not searched.`),L())}function xP(e,t){if(e&1){let e=V();I(0,`div`,29)(1,`p`,47),K(2),L(),j(3,yP,2,0,`p`,48),j(4,bP,2,0,`p`,48),I(5,`button`,49),H(`click`,function(){return w(e),T(W(2).clearFilter())}),K(6,`Clear filters`),L()()}if(e&2){let e=W(2);O(2),J(`No components match “`,e.filter().trim(),`”`),O(),M(e.page().truncated?3:-1),O(),M(!e.showDirectiveHosts()&&e.page().directiveHostCount?4:-1)}}function SP(e,t){if(e&1&&(I(0,`p`,30),K(1),L()),e&2){let e=W(2);O(),J(` `,e.rows().length,` rows. Rows render as you scroll, so the browser's find only sees the ones near view; the filter above searches them all. `)}}function CP(e,t){if(e&1){let e=V();I(0,`span`,57),H(`click`,function(t){w(e),W();let n=Z_(0);return T(W(2).toggle(n.node.id,t))}),E(),I(1,`svg`,58),R(2,`path`,59),L()()}e&2&&(W(),G(`open`,Z_(0).expanded))}function wP(e,t){e&1&&R(0,`span`,52)}function TP(e,t){if(e&1&&(I(0,`span`,60),K(1),L(),I(2,`span`,61),K(3),L(),I(4,`span`,28),K(5,`directive host`),L()),e&2){W();let e=Z_(0),t=W(2);O(),J(`<`,e.node.tag,`>`),O(),A(`title`,e.node.directives?.join(`, `)),O(),q(t.hostLabel(e.node))}}function EP(e,t){if(e&1&&(I(0,`span`,62),K(1),L(),I(2,`span`,63),K(3),L()),e&2){W();let e=Z_(0);A(`title`,e.node.name),O(),q(e.node.name),O(),A(`title`,`<`+e.node.tag+`>`),O(),J(`<`,e.node.tag,`>`)}}function DP(e,t){if(e&1&&(I(0,`span`)(1,`span`,28),K(2,`Hydration: `),L(),K(3),L()),e&2){let e=t,n=W(3);b_(`hyd hyd-`+e),O(3),q(n.hydrationText(e))}}function OP(e,t){if(e&1&&(I(0,`span`,54),K(1),L()),e&2){let e=t.$implicit;O(),q(e.route||`/`)}}function kP(e,t){if(e&1&&(I(0,`span`,55),K(1),I(2,`span`,28),K(3),L()()),e&2){let e=t;O(),J(` `,e),O(2),J(` `,e===1?`check`:`checks`,` while recording`)}}function AP(e,t){if(e&1&&(I(0,`span`,56),K(1),I(2,`span`,28),K(3),L()()),e&2){W();let e=Z_(0);A(`title`,e.node.directives.join(`, `)),O(),J(` +`,e.node.directives.length,` `),O(2),J(` `,e.node.directives.length===1?`directive`:`directives`,` `)}}function jP(e,t){if(e&1){let e=V();Y_(0),I(1,`div`,50),H(`click`,function(){w(e);let t=Z_(0);return T(W(2).select(t.node.id))})(`focus`,function(t){w(e);let n=Z_(0),r=W(2);return r.focusId.set(n.node.id),r.highlight(n.node.id),T(r.showNameTip(t))})(`blur`,function(){w(e);let t=W(2);return t.highlight(null),T(t.nameTip.set(null))})(`keydown.escape`,function(){return w(e),T(W(2).nameTip.set(null))})(`mouseenter`,function(){w(e);let t=Z_(0);return T(W(2).highlight(t.node.id))})(`mouseleave`,function(){return w(e),T(W(2).highlight(null))}),j(2,CP,3,2,`span`,51)(3,wP,1,0,`span`,52),j(4,TP,6,3)(5,EP,4,4),j(6,DP,4,3,`span`,53),N(7,OP,2,1,`span`,54,sP),j(9,kP,4,2,`span`,55),j(10,AP,4,3,`span`,56),L()}if(e&2){let e,n,r=t.$implicit,i=W(2),a=X_(r.row);O(),y_(`--%NS%depth`,a.depth),G(`selected`,i.selectedId()===a.node.id)(`dir-host`,a.node.kind===`directive`),A(`aria-level`,a.depth+1)(`aria-setsize`,a.setsize)(`aria-posinset`,a.posinset)(`aria-expanded`,a.hasChildren?a.expanded:null)(`aria-selected`,i.selectedId()===a.node.id)(`tabindex`,i.tabStop()===a.node.id?0:-1)(`data-vindex`,r.index)(`data-id`,a.node.id),O(),M(a.hasChildren?2:3),O(2),M(a.node.kind===`directive`?4:5),O(2),M((e=a.node.hydration)?6:-1,e),O(),P(i.routedById().get(a.node.id)??ov(20,iP)),O(2),M((n=i.cdHosts()[a.node.id])?9:-1,n),O(),M(a.node.kind!==`directive`&&a.node.directives?.length?10:-1)}}function MP(e,t){if(e&1&&(I(0,`div`,64),K(1),L()),e&2){let e=t;y_(`top`,e.top,`px`),O(),J(` `,e.text,` `)}}function NP(e,t){if(e&1&&(I(0,`li`,72),K(1),L()),e&2){let e=t.$implicit;O(),q(e)}}function PP(e,t){if(e&1){let e=V();I(0,`div`,74)(1,`button`,49),H(`click`,function(){let t=w(e);return T(W(3).reveal(t.id,!0))}),K(2),L()()}e&2&&(O(2),J(` Show `,t.name,` `))}function FP(e,t){if(e&1&&(I(0,`section`,34)(1,`header`,65)(2,`span`,66),K(3,`directive host`),L(),I(4,`h2`,67),K(5),L(),I(6,`span`,68),K(7),L()(),I(8,`div`,69)(9,`h3`),K(10,` Directives `),I(11,`span`,70),K(12),L()(),I(13,`ul`,71),N(14,NP,2,1,`li`,72,cP),L()(),I(16,`div`,69)(17,`p`,73),K(18,` This element hosts directives but no component. Their inputs are bound in the template of the component that renders it. `),L(),j(19,PP,3,1,`div`,74),L()()),e&2){let e,n=t,r=W(2);O(5),J(`<`,n.tag,`>`),O(2),q(r.hostLabel(n)),O(5),q(n.directives?.length??0),O(2),P(n.directives??ov(4,iP)),O(5),M((e=r.ownerOf(n.id))?19:-1,e)}}function IP(e,t){if(e&1&&(I(0,`p`,75),R(1,`app-source-link`,79),L()),e&2){let e=t;O(),F(`file`,e.file)(`line`,e.line)}}function LP(e,t){if(e&1&&(I(0,`p`,80)(1,`span`,82),K(2,`Likely`),L(),I(3,`span`,28),K(4,`, matched by class name: `),L(),R(5,`app-source-link`,79),L()),e&2){W();let e=Z_(0);F(`title`,W(3).guessTitle),O(5),F(`file`,e[0].file)(`line`,e[0].line)}}function RP(e,t){if(e&1&&(I(0,`li`),R(1,`app-source-link`,79),L()),e&2){let e=t.$implicit;O(),F(`file`,e.file)(`line`,e.line)}}function zP(e,t){if(e&1&&(I(0,`div`,81)(1,`p`,83)(2,`span`,82),K(3,`Not certain`),L(),K(4),L(),I(5,`ul`,84),N(6,RP,2,2,`li`,null,lP,!0),L()()),e&2){W();let e=Z_(0),t=W(),n=W(2);F(`title`,n.guessTitle),O(4),Y(` `,e.length,` source files define `,n.bareName(t.name),`: `),O(2),P(e)}}function BP(e,t){if(e&1&&(Y_(0),j(1,LP,6,3,`p`,80)(2,zP,8,3,`div`,81)),e&2){let e=W(),t=X_(W(2).sourceCandidates(e));O(),M(t.length===1?1:t.length>1?2:-1)}}function VP(e,t){if(e&1){let e=V();I(0,`div`,85)(1,`button`,49),H(`click`,function(){w(e);let t=W();return T(W(2).revealInElements(t))}),K(2,`Reveal in Elements`),L(),I(3,`button`,49),H(`click`,function(){w(e);let t=W();return T(W(2).openSource(t))}),K(4,`Open source`),L()(),I(5,`p`,86),K(6),L()}if(e&2){let e=W(3);O(6),q(e.actionMessage())}}function HP(e,t){if(e&1){let e=V();I(0,`button`,88),H(`click`,function(){let t=w(e).$implicit;return T(W(5).showForm.emit(t.formId))}),K(1),L()}if(e&2){let e=t.$implicit;O(),J(` Show `,e.label,` in Forms `)}}function UP(e,t){if(e&1&&(I(0,`div`,76),N(1,HP,2,1,`button`,87,uP),L()),e&2){let e=W(),t=W(3);O(),P(t.formsIn(e.file))}}function WP(e,t){e&1&&j(0,UP,3,0,`div`,76),e&2&&M(W(3).formsIn(t.file).length?0:-1)}function GP(e,t){if(e&1){let e=V();I(0,`div`,76)(1,`button`,49),H(`click`,function(){w(e);let t=W();return T(W(2).openInjector(t))}),K(2,` Show in Injectors `),I(3,`span`,28),K(4),L()()()}if(e&2){let e=W();O(4),J(`: `,e.name)}}function KP(e,t){if(e&1&&R(0,`app-store-global`,77),e&2){let e=W(),t=W(2);F(`rpc`,t.rpc())(`pageId`,t.page()?.pageId)(`target`,sv(4,aP,e.id))(`label`,e.name)}}function qP(e,t){if(e&1&&(I(0,`dt`),K(1,`Routed`),L(),I(2,`dd`,90),K(3),L()),e&2){let e=t.$implicit;O(3),Y(``,e.route||`/`,` in outlet `,e.outlet)}}function JP(e,t){if(e&1&&(I(0,`span`,11),K(1),L()),e&2){let e=W(4);O(),Y(``,e.shownValues()?.count??0,` of `,e.valueTotal())}}function YP(e,t){if(e&1){let e=V();I(0,`div`,95)(1,`p`,47),K(2),L(),I(3,`p`,48),K(4,` The filter searches names, and the nested keys of values you opened. `),L(),I(5,`button`,49),H(`click`,function(){return w(e),T(W(5).clearPropFilter())}),K(6,`Clear filters`),L()()}if(e&2){let e=W(5);O(2),J(` No inputs, outputs or properties match “`,e.propFilter().trim(),`” `)}}function XP(e,t){if(e&1&&(I(0,`span`,99),K(1),L()),e&2){let e=W().$implicit;O(),J(`(`,e.prop,`)`)}}function ZP(e,t){if(e&1&&(I(0,`li`,97)(1,`span`,98),K(2),j(3,XP,2,1,`span`,99),L(),R(4,`app-value-tree`,100),L()),e&2){let e=t.$implicit,n=W(4),r=W(3);O(2),J(` `,e.name,` `),O(),M(e.prop===e.name?-1:3),O(),F(`prop`,e)(`store`,r.values)(`query`,r.propFilter())(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function QP(e,t){if(e&1&&(I(0,`ul`,96),N(1,ZP,5,9,`li`,97,fP),L()),e&2){let e=W(2);O(),P(e.inputs)}}function $P(e,t){e&1&&(I(0,`p`,73),K(1,`No inputs.`),L())}function eF(e,t){if(e&1&&(I(0,`div`,69)(1,`h3`),K(2,` Inputs `),I(3,`span`,70),K(4),L()(),j(5,QP,3,0,`ul`,96)(6,$P,2,0,`p`,73),L()),e&2){let e=W();O(4),q(e.inputs.length),O(),M(e.inputs.length?5:6)}}function tF(e,t){if(e&1&&(I(0,`li`,102)(1,`span`,90),K(2),L(),I(3,`span`,103),K(4),L()()),e&2){let e=t.$implicit;G(`on`,e.listened),O(2),q(e.name),O(2),q(e.listened?`listened`:`no listener`)}}function nF(e,t){if(e&1&&(I(0,`ul`,71),N(1,tF,5,4,`li`,101,fP),L()),e&2){let e=W(2);O(),P(e.outputs)}}function rF(e,t){e&1&&(I(0,`p`,73),K(1,`No outputs.`),L())}function iF(e,t){if(e&1&&(I(0,`div`,69)(1,`h3`),K(2,` Outputs `),I(3,`span`,70),K(4),L()(),j(5,nF,3,0,`ul`,71)(6,rF,2,0,`p`,73),L()),e&2){let e=W();O(4),q(e.outputs.length),O(),M(e.outputs.length?5:6)}}function aF(e,t){if(e&1&&(I(0,`span`,104),K(1),L()),e&2){let e=W().$implicit;O(),q(e.kind)}}function oF(e,t){if(e&1&&(I(0,`li`,97)(1,`span`,98),K(2),j(3,aF,2,1,`span`,104),L(),R(4,`app-value-tree`,100),L()),e&2){let e=t.$implicit,n=W(4),r=W(3);O(2),J(` `,e.name,` `),O(),M(e.kind?3:-1),O(),F(`prop`,e)(`store`,r.values)(`query`,r.propFilter())(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function sF(e,t){if(e&1&&(I(0,`ul`,96),N(1,oF,5,9,`li`,97,fP),L()),e&2){let e=W(2);O(),P(e.properties)}}function cF(e,t){e&1&&(I(0,`p`,73),K(1,`No other properties.`),L())}function lF(e,t){if(e&1&&(I(0,`div`,69)(1,`h3`),K(2,` Properties `),I(3,`span`,70),K(4),L()(),j(5,sF,3,0,`ul`,96)(6,cF,2,0,`p`,73),L()),e&2){let e=W();O(4),q(e.properties.length),O(),M(e.properties.length?5:6)}}function uF(e,t){if(e&1&&(I(0,`li`,72),K(1),L()),e&2){let e=t.$implicit;O(),q(e)}}function dF(e,t){if(e&1&&(I(0,`div`,69)(1,`h3`),K(2,` DOM listeners `),I(3,`span`,70),K(4),L()(),I(5,`ul`,71),N(6,uF,2,1,`li`,72,_g),L()()),e&2){let e=W(2);O(4),q(e.listeners.length),O(2),P(e.listeners)}}function fF(e,t){if(e&1&&(I(0,`li`,97)(1,`span`,98),K(2),L(),R(3,`app-value-tree`,105),L()),e&2){let e=t.$implicit,n=W(2).$implicit,r=W(2),i=W(3);O(2),q(e.name),O(),F(`prop`,e)(`store`,i.values)(`query`,i.propFilter())(`directive`,n.index)(`componentId`,r.id)(`pageId`,i.page()?.pageId??null)(`rpc`,i.rpc())}}function pF(e,t){if(e&1&&(I(0,`ul`,96),N(1,fF,4,8,`li`,97,fP),L()),e&2){let e=W().$implicit;O(),P(e.inputs)}}function mF(e,t){if(e&1&&(I(0,`li`,102)(1,`span`,90),K(2),L(),I(3,`span`,103),K(4),L()()),e&2){let e=t.$implicit;G(`on`,e.listened),O(2),q(e.name),O(2),q(e.listened?`listened`:`no listener`)}}function hF(e,t){if(e&1&&(I(0,`ul`,71),N(1,mF,5,4,`li`,101,fP),L()),e&2){let e=W().$implicit;O(),P(e.outputs)}}function gF(e,t){e&1&&(I(0,`p`,73),K(1,`No inputs or outputs.`),L())}function _F(e,t){if(e&1&&(I(0,`div`,69)(1,`h3`)(2,`span`,90),K(3),L(),I(4,`span`,104),K(5,`directive on host`),L()(),j(6,pF,3,0,`ul`,96),j(7,hF,3,0,`ul`,71),j(8,gF,2,0,`p`,73),L()),e&2){let e=t.$implicit;O(3),q(e.name),O(3),M(e.inputs.length?6:-1),O(),M(e.outputs.length?7:-1),O(),M(!e.inputs.length&&!e.outputs.length?8:-1)}}function vF(e,t){if(e&1&&(j(0,YP,7,1,`div`,95),j(1,eF,7,2,`div`,69),j(2,iF,7,2,`div`,69),j(3,lF,7,2,`div`,69),j(4,dF,8,1,`div`,69),N(5,_F,9,4,`div`,69,dP)),e&2){let e=t,n=W(),r=W(3);M(r.propQuery()&&!e.count?0:-1),O(),M(!r.propQuery()||e.inputs.length?1:-1),O(),M(!r.propQuery()||e.outputs.length?2:-1),O(),M(!r.propQuery()||e.properties.length?3:-1),O(),M(!r.propQuery()&&n.listeners.length?4:-1),O(),P(e.directives)}}function yF(e,t){if(e&1&&(I(0,`span`,104),K(1),L()),e&2){let e=t.$implicit;O(),q(e)}}function bF(e,t){if(e&1&&(I(0,`span`,108),K(1,`from `),I(2,`span`,90),K(3),L()()),e&2){let e=W().$implicit;O(3),q(e.providedByName??`an injector`)}}function xF(e,t){e&1&&(I(0,`span`,109),K(1,`not provided`),L())}function SF(e,t){if(e&1&&(I(0,`li`,106)(1,`span`,107),K(2),L(),N(3,yF,2,1,`span`,104,_g),j(5,bF,4,1,`span`,108)(6,xF,2,0,`span`,109),L()),e&2){let e=t.$implicit;O(2),q(e.token),O(),P(e.flags),O(2),M(e.providedBy?5:6)}}function CF(e,t){if(e&1&&(I(0,`ul`,93),N(1,SF,7,2,`li`,106,pP),L()),e&2){let e=W();O(),P(e.dependencies)}}function wF(e,t){e&1&&(I(0,`p`,73),K(1,`Nothing is injected through the constructor or inject().`),L())}function TF(e,t){if(e&1){let e=V();I(0,`app-component-pipes`,110),H(`showPipe`,function(t){return w(e),T(W(4).showPipe.emit(t))}),L()}if(e&2){let e=W(2),t=W(2);F(`rpc`,t.rpc())(`pageId`,t.page()?.pageId)(`component`,t.bareName(e.name))(`canShowPipes`,!t.staticReport())}}function EF(e,t){if(e&1){let e=V();I(0,`dl`,89)(1,`dt`),K(2,`Change detection`),L(),I(3,`dd`),K(4),L(),I(5,`dt`),K(6,`Encapsulation`),L(),I(7,`dd`),K(8),L(),I(9,`dt`),K(10,`Host path`),L(),I(11,`dd`,90),K(12),L(),N(13,qP,4,2,null,null,sP),L(),I(15,`div`,91)(16,`div`,5),E(),I(17,`svg`,6),R(18,`circle`,7)(19,`path`,8),L(),vs(),I(20,`input`,92,2),H(`input`,function(t){return w(e),T(W(3).propFilter.set(t.target.value))})(`keydown.escape`,function(t){return w(e),T(W(3).clearPropFilter(t))}),L()(),j(22,JP,2,2,`span`,11),I(23,`p`,23),K(24),L()(),j(25,vF,7,5),I(26,`div`,69)(27,`h3`),K(28,` Injected `),I(29,`span`,70),K(30),L()(),j(31,CF,3,0,`ul`,93)(32,wF,2,0,`p`,73),L(),j(33,TF,1,4,`app-component-pipes`,94)}if(e&2){let e,n=t,r=W(),i=W(2);O(4),q(n.changeDetection??`Unknown`),O(4),q(n.encapsulation??`Unknown`),O(4),q(n.path),O(),P(i.routedById().get(r.id)??ov(10,iP)),O(7),F(`value`,i.propFilter()),O(2),M(i.propQuery()?22:-1),O(2),q(i.propFilterStatus()),O(),M((e=i.shownValues())?25:-1,e),O(5),q(n.dependencies.length),O(),M(n.dependencies.length?31:32),O(2),M(i.canShowPipes()?33:-1)}}function DF(e,t){e&1&&(I(0,`div`,78),R(1,`span`,111),I(2,`p`,48),K(3,`Reading live values from the page…`),L()())}function OF(e,t){if(e&1&&(I(0,`section`,34)(1,`header`,65)(2,`span`,66),K(3,`component`),L(),I(4,`h2`,67),K(5),L(),I(6,`span`,68),K(7),L(),j(8,IP,2,2,`p`,75)(9,BP,3,2),j(10,VP,7,1),j(11,WP,1,1),j(12,GP,5,1,`div`,76),j(13,KP,1,6,`app-store-global`,77),L(),j(14,EF,34,11)(15,DF,4,0,`div`,78),L()),e&2){let e,n,r,i=t,a=W(2);O(5),q(i.name),O(2),J(`<`,i.tag,`>`),O(),M((e=a.detail()?.source)?8:9,e),O(2),M(a.devtoolsActions()?10:-1),O(),M((n=a.sourceFor(i))?11:-1,n),O(),M(a.canShowInjector()&&!a.staticReport()?12:-1),O(),M(!a.staticReport()&&!a.native()?13:-1),O(),M((r=a.detail())?14:15,r)}}function kF(e,t){e&1&&(I(0,`p`,47),K(1,`The selected component was destroyed`),L(),I(2,`p`,48)(3,`span`,90),K(4),L(),K(5,` is no longer on the page. Select another component to see its live values. `),L()),e&2&&(O(4),q(t))}function AF(e,t){e&1&&(I(0,`p`,48),K(1,` Select a component to see its live inputs, properties, outputs, change detection and injected services. `),L())}function jF(e,t){if(e&1&&(I(0,`div`,35),j(1,kF,6,1)(2,AF,2,0,`p`,48),L()),e&2){let e,t=W(2);O(),M((e=t.destroyed())?1:2,e)}}function MF(e,t){e&1&&R(0,`app-angular-unavailable`,37),e&2&&F(`page`,W(2).angularPage())}function NF(e,t){if(e&1){let e=V();I(0,`app-hydration-section`,112),H(`overlay`,function(t){return w(e),T(W(2).setHydrationOverlay(t))})(`showNode`,function(t){return w(e),T(W(2).revealNode(t))})(`highlight`,function(t){return w(e),T(W(2).highlight(t))}),L()}e&2&&F(`report`,W(2).page()?.hydration)}function PF(e,t){if(e&1){let e=V();I(0,`app-cd-recording`,113),H(`showComponent`,function(t){return w(e),T(W(2).showCdComponent(t))}),L(),I(1,`app-leaks-section`,114),H(`showComponent`,function(t){return w(e),T(W(2).showLeakComponent(t))})(`highlight`,function(t){return w(e),T(W(2).highlight(t))}),L()}if(e&2){let e=W(2);F(`page`,e.cdPage())(`pageId`,e.page().pageId)(`rpc`,e.rpc())(`native`,e.native()),O(),F(`report`,e.leaksPage())(`pageId`,e.page().pageId)(`rpc`,e.rpc())(`angular`,e.angularPage())}}function FF(e,t){if(e&1){let e=V();I(0,`p`,3),K(1,` Every component instance on the page, in the order Angular rendered them. Hover a row to highlight its host in the page, and select it to read its live inputs, properties, outputs and injected services. `),L(),I(2,`div`,4)(3,`div`,5),E(),I(4,`svg`,6),R(5,`circle`,7)(6,`path`,8),L(),vs(),I(7,`input`,9,0),H(`input`,function(t){return w(e),T(W().setFilter(t.target.value))})(`keydown.escape`,function(){return w(e),T(W().setFilter(``))}),L(),I(9,`span`,10),K(10,` Type plain text, a tag such as