From 7b1e2213e74e9510c83da8abe4ffc11b5e3de72f Mon Sep 17 00:00:00 2001 From: erKam Date: Sat, 7 Nov 2026 19:29:28 +0000 Subject: [PATCH 01/15] ci: fail the commit message check on a bad commit in the range The range step ran with --warn, so a commit that broke the format only left an annotation and the check stayed green. Drop the warn-only mode, report each problem as an error annotation and fail the job, as decided in #373. Refs #373 --- .claude/skills/devtools-commit/SKILL.md | 2 +- .github/workflows/commit-message.yml | 2 +- apps/docs/src/content/contributing/development.md | 10 +++++----- docs/contributing/commit-message-guidelines.md | 2 +- packages/devtools/CHANGELOG.md | 1 + scripts/commit-message.mjs | 14 ++++---------- 6 files changed, 13 insertions(+), 18 deletions(-) diff --git a/.claude/skills/devtools-commit/SKILL.md b/.claude/skills/devtools-commit/SKILL.md index 0298d361..219d326a 100644 --- a/.claude/skills/devtools-commit/SKILL.md +++ b/.claude/skills/devtools-commit/SKILL.md @@ -22,7 +22,7 @@ The rules are in `docs/contributing/commit-message-guidelines.md`. Summary: ## Pull requests - Pull requests are squash merged; the title becomes the commit on `main`, so it must follow the header format. -- A `commit-msg` hook (`scripts/commit-message.mjs`, enabled by `pnpm install`) warns about a bad message as you commit; CI checks the title and every commit in the pull request: a bad title fails the check, and problems in the commits show as warnings. Run `pnpm commit:check` before pushing, and fix flagged messages with `git commit --amend` or a reword rebase. +- A `commit-msg` hook (`scripts/commit-message.mjs`, enabled by `pnpm install`) warns about a bad message as you commit; CI checks the title and every commit in the pull request: a bad title or a bad commit message fails the check. Run `pnpm commit:check` before pushing, and fix flagged messages with `git commit --amend` or a reword rebase. - Address review feedback with fixup commits (`docs/contributing/using-fixup-commits.md`). - One feature per pull request, with its tests (including agent tool tests when tools change). - Rebuild and commit `extension/ui` when `app/` changed. diff --git a/.github/workflows/commit-message.yml b/.github/workflows/commit-message.yml index 1a455f3a..6e5b7c89 100644 --- a/.github/workflows/commit-message.yml +++ b/.github/workflows/commit-message.yml @@ -34,4 +34,4 @@ jobs: env: BASE: ${{ github.event.pull_request.base.sha }} HEAD: ${{ github.event.pull_request.head.sha }} - run: node scripts/commit-message.mjs --range "$BASE..$HEAD" --warn + run: node scripts/commit-message.mjs --range "$BASE..$HEAD" diff --git a/apps/docs/src/content/contributing/development.md b/apps/docs/src/content/contributing/development.md index 7cf643a0..899ea810 100644 --- a/apps/docs/src/content/contributing/development.md +++ b/apps/docs/src/content/contributing/development.md @@ -247,12 +247,12 @@ To reproduce a job, add the same `overrides` block to `pnpm-workspace.yaml`, run ### Pull request checks -Two more workflows run on pull requests. Only a pull request title that breaks the commit format fails one; everything else they find is a warning. +Two more workflows run on pull requests. A pull request title or a commit message that breaks the commit format fails `Commit message`. `Docs check` only warns. -| Workflow | File | What it checks | -| ---------------- | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Commit message` | `.github/workflows/commit-message.yml` | The pull request title and every commit message. The title becomes the commit on `main` when the pull request is squash merged, so a bad title fails the check. | -| `Docs check` | `.github/workflows/docs-check.yml` | That a change to `packages/devtools/src/`, `app/src/` or the top-level files in `extension/` also changes a page in `apps/docs/src/content`. Tests don't count. | +| Workflow | File | What it checks | +| ---------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Commit message` | `.github/workflows/commit-message.yml` | The pull request title and every commit message. The title becomes the commit on `main` when the pull request is squash merged. A bad title or commit fails the check. | +| `Docs check` | `.github/workflows/docs-check.yml` | That a change to `packages/devtools/src/`, `app/src/` or the top-level files in `extension/` also changes a page in `apps/docs/src/content`. Tests don't count. | If a code change needs no docs change, add the `no-docs` label to the pull request and say why in the description. The `Docs check` workflow then skips the warning. diff --git a/docs/contributing/commit-message-guidelines.md b/docs/contributing/commit-message-guidelines.md index 47d6a394..062f9479 100644 --- a/docs/contributing/commit-message-guidelines.md +++ b/docs/contributing/commit-message-guidelines.md @@ -5,7 +5,7 @@ Every commit follows one format, with scopes that match the areas of this reposi Every commit is checked twice: - **Locally**, by a `commit-msg` git hook that `pnpm install` turns on (it sets `core.hooksPath` to `.githooks` and `commit.template` to [`.gitmessage`](../../.gitmessage)). It warns and lets the commit through; fix the message with `git commit --amend` before you push. -- **In CI**, on every pull request: each commit and the pull request title. Pull requests are squash merged, so **the title becomes the commit on `main`**. A title that breaks the format fails the check. Problems in the individual commits only warn: they show up as annotations on the pull request, and the check stays green. +- **In CI**, on every pull request: each commit and the pull request title. Pull requests are squash merged, so **the title becomes the commit on `main`**. A title or a commit that breaks the format fails the check, and each problem shows up as an annotation on the pull request. Run `pnpm commit:check` to check the commits on your branch before you push. To fix an older commit, reword it with `git rebase -i` and force-push your branch. While a review is in progress, prefer [fixup commits](./using-fixup-commits.md). `fixup!` and `squash!` commits and merge commits are skipped. diff --git a/packages/devtools/CHANGELOG.md b/packages/devtools/CHANGELOG.md index 43afea64..3d7bd861 100644 --- a/packages/devtools/CHANGELOG.md +++ b/packages/devtools/CHANGELOG.md @@ -309,6 +309,7 @@ What remains: `/config` exports `DEFAULT_POPUP_HOTKEY`, `PANGULAR_ACTIONS`, `PAN - The `leaks-real` test expects the rows the collector really reports (#430). - Pull requests run the security and MCP end-to-end checks, and a weekly job runs the rest. - A CI job installs the packed package on Node.js 22.12.0, the `engines.node` floor, and loads its CLI and its `cli`, `hub`, `ssr` and `vite` entry points there (#373). +- The `Commit message` check fails on a commit message that breaks the format, not only on a bad pull request title (#373). - The packed `package.json` leaves out `devDependencies`, `scripts` and the `nx` block, and declares `sideEffects`. - Dependencies: devframe and `@devframes/*` 1.2.6 (was 1.2.0). `@devframes/plugin-messages`, `@devframes/plugin-terminals` and `axe-core` are added. `h3` is no longer a dependency. diff --git a/scripts/commit-message.mjs b/scripts/commit-message.mjs index a8e0dd7d..bce416c8 100755 --- a/scripts/commit-message.mjs +++ b/scripts/commit-message.mjs @@ -94,13 +94,11 @@ export function validate(message, { requireBody = true, allowGitPrefixes = true return errors; } -let warnOnly = false; - function report(label, errors) { if (!errors.length) return true; - if (warnOnly && process.env.GITHUB_ACTIONS) { + if (process.env.GITHUB_ACTIONS) { const text = `${label} ${errors.join(' ')}`.replace(/%/g, '%25').replace(/\r?\n/g, '%0A'); - console.log(`::warning title=Commit message::${text}`); + console.log(`::error title=Commit message::${text}`); } console.error(`\n${label}`); for (const error of errors) console.error(` - ${error}`); @@ -158,7 +156,7 @@ function main(args) { } console.error( - 'Usage: commit-message.mjs --file | --title | --range <a..b> | --branch [--warn]', + 'Usage: commit-message.mjs --file <path> | --title <title> | --range <a..b> | --branch', ); return false; } @@ -172,9 +170,5 @@ function isEntryPoint() { } if (isEntryPoint()) { - const args = process.argv.slice(2); - warnOnly = args.includes('--warn'); - const ok = main(args.filter((arg) => arg !== '--warn')); - if (!ok && warnOnly) console.error('Warn-only mode: not failing the check.'); - process.exit(ok || warnOnly ? 0 : 1); + process.exit(main(process.argv.slice(2)) ? 0 : 1); } From 0a5c966d77c3f8b83526f417af8e4ad417ac6879 Mon Sep 17 00:00:00 2001 From: erKam <erkamyaman35@gmail.com> Date: Sat, 7 Nov 2026 19:41:43 +0000 Subject: [PATCH 02/15] refactor(router): share the router report types with the panel The router panel kept its own copies of the report types, so a field added on the server could drift from what the panel read. Move the router report shapes into a types-only router-types.ts, serve them through the workspace-only internal/types entry as #475 did for injectors and signals, and re-export them from the panel's router-types.ts. The contract test now also checks the router entry, that router-types.ts stays types-only and that the panel no longer declares copies. The get-routes schema is tied to the shared ScannedRoute type at compile time. Refs #368 --- app/src/__tests__/live-route-pinned.test.ts | 1 + app/src/__tests__/route-diff.test.ts | 2 +- app/src/__tests__/route-preview.test.ts | 1 + .../__tests__/route-timeline-clear.test.ts | 2 +- .../__tests__/route-timeline-extras.test.ts | 1 + .../__tests__/route-timeline-phases.test.ts | 1 + app/src/__tests__/router-panels.test.ts | 1 + app/src/pages/route-current.ts | 5 +- app/src/pages/route-tree.ts | 5 +- app/src/pages/router-types.ts | 299 ++------------ .../src/__tests__/panel-types.test.ts | 51 ++- packages/devtools/src/panel-types.ts | 21 + packages/devtools/src/router-actions.ts | 9 +- packages/devtools/src/router-config.ts | 25 +- packages/devtools/src/router-links.ts | 27 +- packages/devtools/src/router-matched.ts | 17 +- packages/devtools/src/router-open-redirect.ts | 15 +- packages/devtools/src/router-platform-nav.ts | 22 +- packages/devtools/src/router-setup.ts | 20 +- packages/devtools/src/router-types.ts | 386 ++++++++++++++++++ packages/devtools/src/router.ts | 111 +---- packages/devtools/src/rpc/get-routes.ts | 13 +- .../devtools/src/rpc/router-config-tools.ts | 15 +- packages/devtools/src/rpc/router-diff.ts | 37 +- packages/devtools/src/rpc/router-http.ts | 13 +- packages/devtools/src/rpc/router-loops.ts | 20 +- packages/devtools/src/rpc/router-preview.ts | 61 +-- packages/devtools/src/rpc/router-tools.ts | 41 +- 28 files changed, 566 insertions(+), 656 deletions(-) create mode 100644 packages/devtools/src/router-types.ts diff --git a/app/src/__tests__/live-route-pinned.test.ts b/app/src/__tests__/live-route-pinned.test.ts index cbed1c1d..22ba8913 100644 --- a/app/src/__tests__/live-route-pinned.test.ts +++ b/app/src/__tests__/live-route-pinned.test.ts @@ -9,6 +9,7 @@ function routerPage(pageId: string): RouterPage { return { pageId, reportedAt: 1, + changedAt: 1, snapshot: { url: `/${pageId}`, queryParams: {}, diff --git a/app/src/__tests__/route-diff.test.ts b/app/src/__tests__/route-diff.test.ts index 720cb3c9..f2478d3f 100644 --- a/app/src/__tests__/route-diff.test.ts +++ b/app/src/__tests__/route-diff.test.ts @@ -24,7 +24,7 @@ function nav(id: number, extra: Partial<NavigationRecord> = {}): NavigationRecor } function page(navigations: NavigationRecord[]): RouterPage { - return { pageId: 'p1', reportedAt: 1, snapshot: null, navigations }; + return { pageId: 'p1', reportedAt: 1, changedAt: 1, snapshot: null, navigations }; } async function settle(fixture: ComponentFixture<unknown>) { diff --git a/app/src/__tests__/route-preview.test.ts b/app/src/__tests__/route-preview.test.ts index 4ff0327a..7c8757dc 100644 --- a/app/src/__tests__/route-preview.test.ts +++ b/app/src/__tests__/route-preview.test.ts @@ -21,6 +21,7 @@ async function settle(fixture: ComponentFixture<unknown>) { const page: RouterPage = { pageId: 'p1', reportedAt: 1, + changedAt: 1, snapshot: null, navigations: [], config: [{ id: '0', path: 'account', fullPath: '/account', kind: 'component', component: 'A' }], diff --git a/app/src/__tests__/route-timeline-clear.test.ts b/app/src/__tests__/route-timeline-clear.test.ts index 9bf54c96..f2a87368 100644 --- a/app/src/__tests__/route-timeline-clear.test.ts +++ b/app/src/__tests__/route-timeline-clear.test.ts @@ -24,7 +24,7 @@ function nav(id: number, url: string, extra: Partial<NavigationRecord> = {}): Na } function page(extra: Partial<RouterPage> = {}): RouterPage { - return { pageId: 'p1', reportedAt: 1, snapshot: null, navigations: [], ...extra }; + return { pageId: 'p1', reportedAt: 1, changedAt: 1, snapshot: null, navigations: [], ...extra }; } async function settle(fixture: ComponentFixture<unknown>) { diff --git a/app/src/__tests__/route-timeline-extras.test.ts b/app/src/__tests__/route-timeline-extras.test.ts index 4062dd09..1d7fa73f 100644 --- a/app/src/__tests__/route-timeline-extras.test.ts +++ b/app/src/__tests__/route-timeline-extras.test.ts @@ -35,6 +35,7 @@ function mount(page: Partial<RouterPage>, call?: (name: string, arg: unknown) => fixture.componentRef.setInput('page', { pageId: 'p1', reportedAt: 1, + changedAt: 1, snapshot: null, navigations: [], ...page, diff --git a/app/src/__tests__/route-timeline-phases.test.ts b/app/src/__tests__/route-timeline-phases.test.ts index 3d7195f5..841ff7c0 100644 --- a/app/src/__tests__/route-timeline-phases.test.ts +++ b/app/src/__tests__/route-timeline-phases.test.ts @@ -25,6 +25,7 @@ describe('RouteTimeline phase colors', () => { const page: RouterPage = { pageId: 'p1', reportedAt: 1, + changedAt: 1, snapshot: null, navigations: [ { diff --git a/app/src/__tests__/router-panels.test.ts b/app/src/__tests__/router-panels.test.ts index a008c25f..b1ffbccc 100644 --- a/app/src/__tests__/router-panels.test.ts +++ b/app/src/__tests__/router-panels.test.ts @@ -29,6 +29,7 @@ function page(extra: Partial<RouterPage> = {}): RouterPage { return { pageId: 'p1', reportedAt: 1, + changedAt: 1, snapshot: { url: '/users/42', queryParams: {}, diff --git a/app/src/pages/route-current.ts b/app/src/pages/route-current.ts index e637090c..a701d0dc 100644 --- a/app/src/pages/route-current.ts +++ b/app/src/pages/route-current.ts @@ -410,8 +410,9 @@ export class RouteCurrent { } guardList(route: ActiveRoute) { - return Object.entries(route.guards ?? {}).flatMap(([kind, names]) => - names.map((name) => `${kind} ${name}`), + return Object.entries(route.guards ?? {}).flatMap( + ([kind, names]: [string, string[] | undefined]) => + (names ?? []).map((name) => `${kind} ${name}`), ); } diff --git a/app/src/pages/route-tree.ts b/app/src/pages/route-tree.ts index b55cdd8d..f6ea1df9 100644 --- a/app/src/pages/route-tree.ts +++ b/app/src/pages/route-tree.ts @@ -542,8 +542,9 @@ export class RouteTree { } guardList(node: RouteNode) { - return Object.entries(node.guards ?? {}).flatMap(([kind, names]) => - names.map((name) => `${kind} ${name}`), + return Object.entries(node.guards ?? {}).flatMap( + ([kind, names]: [string, string[] | undefined]) => + (names ?? []).map((name) => `${kind} ${name}`), ); } diff --git a/app/src/pages/router-types.ts b/app/src/pages/router-types.ts index f8435569..7f1c7e02 100644 --- a/app/src/pages/router-types.ts +++ b/app/src/pages/router-types.ts @@ -1,131 +1,40 @@ import type { DevframeRpcClient } from 'devframe/client'; import { rpcTry } from '../rpc'; +import type { + NavigationCalls, + RouteNode, + RouterLintResult, + ScannedRoute, +} from '@pangular-inspector/devtools/internal/types'; -export interface ActiveRoute { - path: string; - url: string; - outlet: string; - component?: string; - title?: string; - ownTitle?: boolean; - params: Record<string, unknown>; - data: Record<string, unknown>; - paramSources?: Record<string, string>; - dataSources?: Record<string, string>; - guards?: Record<string, string[]>; - resolvers?: string[]; - lazy?: boolean; - children: ActiveRoute[]; -} - -export interface GuardRun { - guard: string; - kind: string; - route: string; - result: string; - ms: number; -} - -export interface NavigationRecord { - id: number; - url: string; - trigger: string; - startedAt: number; - endedAt?: number; - outcome: string; - finalUrl?: string; - from?: string; - extras?: string[]; - caller?: string; - phases?: Record<string, number>; - redirectedFrom?: number; - redirectTo?: string; - redirectKind?: string; - guards?: { names: string[]; passed?: boolean; ms?: number }; - resolvers?: { names: string[]; ms?: number }; - checked?: { activate: string[]; deactivate: string[] }; - runs?: GuardRun[]; - lazyLoaded?: string[]; - reused?: string[]; - requests?: { count: number; urls: string[] }; - warnings?: string[]; - errorCode?: string; - errorHandler?: string; - scroll?: string; - title?: string; - reason?: string; - code?: string; - beforeConnect?: boolean; - earlier?: number; - probe?: boolean; - routes?: MatchedRoute[]; - /** The target came from a query param of the URL: a possible open redirect. */ - queryRedirect?: { param: string; by: string }; - /** The browser Navigation API event it came with. */ - platform?: { type: string; userInitiated?: boolean }; -} +export type { + ActiveRoute, + DiffChange, + GuardRun, + LinkInfo, + LintFinding, + LoopHop, + MatchedRoute, + NavigationCalls, + NavigationDiffResult, + NavigationLoop, + NavigationRecord, + OutletInfo, + PlatformNavigation, + RouteNode, + RoutePreview, + RouterPage, + RouterSetup, +} from '@pangular-inspector/devtools/internal/types'; -/** A browser Navigation API `navigate` event the page recorded. */ -export interface PlatformNavigation { - at: number; - type: string; - url: string; - userInitiated?: boolean; - hashChange?: boolean; - navigationId?: number; - result?: 'succeeded' | 'failed'; - error?: string; -} +/** A route from the source scan (`get-routes` RPC). */ +export type SourceRoute = ScannedRoute; -export interface LoopHop { - id: number; - from: string; - to: string; - via: string; - by?: string; -} +/** Lint findings for the panel, or why no check could run (`router-lint` RPC). */ +export type LintResult = RouterLintResult; -export interface NavigationLoop { - kind: 'redirect' | 'burst' | 'config'; - ids: number[]; - cycle: string[]; - hops: LoopHop[]; - guards: string[]; - bounces: number; - end: string; -} - -export interface RouteNode { - id: string; - path: string; - fullPath: string; - kind: string; - component?: string; - redirectTo?: string; - pathMatch?: string; - outlet?: string; - lazy?: 'unloaded' | 'loaded'; - matcher?: string; - guards?: Record<string, string[]>; - resolvers?: string[]; - title?: string; - providers?: number; - children?: RouteNode[]; -} - -export interface SourceRoute { - path: string; - fullPath: string; - kind: 'page' | 'group' | 'redirect' | 'wildcard'; - component?: string; - redirectTo?: string; - title?: string; - guards?: Record<string, string[]>; - resolvers?: string[]; - hasChildren: boolean; - file: string; - line?: number; -} +/** An HttpClient call as the `router-http` RPC returns it. */ +export type TimelineCall = NavigationCalls['during'][number]; export function sourceLocation(source: SourceRoute): string { return source.line ? `${source.file}:${source.line}` : source.file; @@ -143,152 +52,6 @@ export function sourceOf(node: RouteNode, sources: SourceRoute[]): SourceRoute | ); } -export interface OutletInfo { - outlet: string; - route?: string; - component?: string; - element?: string; - /** Stable id of the routed component's host element, as the component tree uses it. */ - devtoolsId?: string; - activated: boolean; - detached?: boolean; - inputs?: { input: string; source: string }[]; - data?: string; - children?: OutletInfo[]; -} - -export interface LinkInfo { - text: string; - href?: string; - active?: boolean; - linkActive?: boolean; - exact?: boolean; - ariaCurrent?: string; -} - -export interface RouterSetup { - mode: 'full' | 'events-only'; - setupKind: string; - routers: number; - angularVersion?: string; - options: { name: string; value: string; set: boolean }[]; - features: Record<string, string>; - strategies: Record<string, string>; - baseHref?: string; - hydrated?: number; -} - -export interface RouterPage { - pageId: string; - reportedAt: number; - changedAt?: number; - snapshot: { - url: string; - queryParams: Record<string, unknown>; - fragment: string | null; - root: ActiveRoute; - browserUrl?: string; - urlDrift?: boolean; - title?: string; - pending?: { id: number; url: string }; - } | null; - navigations: NavigationRecord[]; - dropped?: number; - generation?: number; - config?: RouteNode[]; - configTruncated?: number; - activeIds?: string[]; - setup?: RouterSetup; - outlets?: OutletInfo[]; - links?: LinkInfo[]; - /** Links past the first 100 that the page found but did not list. */ - linksTruncated?: number; - preloads?: { path: string; startedAt: number; ms?: number; failed?: boolean }[]; - instrumented?: boolean; - loops?: NavigationLoop[]; - platformNavigations?: PlatformNavigation[]; -} - -export interface LintFinding { - rule: string; - severity: 'error' | 'warning' | 'info'; - route: string; - message: string; - fix: string; - angular: string; -} - -export type LintResult = - | { checked: true; findings: LintFinding[] } - | { checked: false; reason: 'no-page' | 'events-only' | 'no-config' }; - -/** A field that differs between two navigations (`router-diff` RPC). */ -export interface DiffChange { - field: string; - before?: string; - after?: string; -} - -export type NavigationDiffResult = - | { - a: number; - b: number; - sections: { title: string; changes: DiffChange[] }[]; - same: string[]; - notes: string[]; - } - | { error: string }; - -/** One activated route kept on a navigation record. */ -export interface MatchedRoute { - path: string; - outlet?: string; - component?: string; - params?: Record<string, string>; - data?: Record<string, string>; -} - -/** An HttpClient call as the `router-http` RPC returns it. */ -export interface TimelineCall { - id: string; - url: string; - method: string; - status: number; - durationMs: number; - at: number; - cancelled?: boolean; - error?: string; -} - -/** The HTTP inspector's calls of one navigation (`router-http` RPC). */ -export interface NavigationCalls { - during: TimelineCall[]; - after: TimelineCall[]; -} - -/** What going to a URL would do (`router-preview` RPC). */ -export interface RoutePreview { - url: string; - finalUrl: string; - matched: boolean; - hops: { from: string; to: string; route: string }[]; - chain: { - path: string; - component?: string; - outlet?: string; - lazy?: string; - title?: string; - source?: string; - active?: boolean; - }[]; - params: Record<string, string>; - steps: { phase: string; items: string[] }[]; - renderMode?: { mode: string; path: string; file: string }; - stopped?: string; - notes: string[]; - nearest: string[]; -} - export const routerCall = rpcTry; export function isReplayableUrl(url: string): boolean { diff --git a/packages/devtools/src/__tests__/panel-types.test.ts b/packages/devtools/src/__tests__/panel-types.test.ts index 11a4ee6b..a826bc78 100644 --- a/packages/devtools/src/__tests__/panel-types.test.ts +++ b/packages/devtools/src/__tests__/panel-types.test.ts @@ -19,25 +19,52 @@ function filesUnder(dir: string, out: string[] = []): string[] { describe('panel types entry', () => { const entry = readFileSync(join(src, 'panel-types.ts'), 'utf-8').replace(/\/\*[\s\S]*?\*\//g, ''); - it('holds type-only re-exports of names types.ts declares', () => { - const statements = entry - .split(';') - .map((part) => part.trim()) - .filter(Boolean); - expect(statements.length).toBeGreaterThan(0); - const types = readFileSync(join(src, 'types.ts'), 'utf-8'); - for (const statement of statements) { - const match = /^export type \{([^}]*)\} from '\.\/types\.ts'$/.exec(statement); - expect(match, statement).not.toBeNull(); - for (const name of match![1]! + const statements = entry + .split(';') + .map((part) => part.trim()) + .filter(Boolean); + const reExports = statements.map((statement) => { + const match = /^export type \{([^}]*)\} from '\.\/((?:router-)?types)\.ts'$/.exec(statement); + return { + statement, + file: match ? `${match[2]}.ts` : undefined, + names: (match?.[1] ?? '') .split(',') .map((n) => n.trim()) - .filter(Boolean)) { + .filter(Boolean), + }; + }); + + it('holds type-only re-exports of names types.ts and router-types.ts declare', () => { + expect(statements.length).toBeGreaterThan(0); + for (const { statement, file, names } of reExports) { + expect(file, statement).toBeDefined(); + const types = readFileSync(join(src, file!), 'utf-8'); + for (const name of names) { expect(types, name).toMatch(new RegExp(`export (?:interface|type) ${name}\\b`)); } } }); + it('keeps router-types.ts free of runtime imports', () => { + const router = readFileSync(join(src, 'router-types.ts'), 'utf-8'); + const imports = [...router.matchAll(/^import\s+(type\s+)?/gm)]; + for (const found of imports) expect(found[1], found[0]).toBeTruthy(); + expect(router).not.toMatch(/^export (?:const|function|class|let|enum)\b/m); + }); + + it('lets the router panel share the router types instead of copying them', () => { + const shared = reExports.filter((r) => r.file === 'router-types.ts').flatMap((r) => r.names); + expect(shared).toEqual( + expect.arrayContaining(['NavigationRecord', 'RouterPage', 'RouteNode', 'RoutePreview']), + ); + const panel = readFileSync(join(app, 'src', 'pages', 'router-types.ts'), 'utf-8'); + expect(panel).toContain(ENTRY); + for (const name of shared) { + expect(panel, name).not.toMatch(new RegExp(`(?:interface|type) ${name}\\b\\s*[={]`)); + } + }); + it('is a workspace-only entry that is never published', () => { const manifest = JSON.parse(readFileSync(join(src, '..', 'package.json'), 'utf-8')) as { exports: Record<string, string>; diff --git a/packages/devtools/src/panel-types.ts b/packages/devtools/src/panel-types.ts index 83e4ee1d..106a4979 100644 --- a/packages/devtools/src/panel-types.ts +++ b/packages/devtools/src/panel-types.ts @@ -17,3 +17,24 @@ export type { SignalGraphNode, SignalWriteLocator, } from './types.ts'; +export type { + ActiveRoute, + DiffChange, + GuardRun, + LinkInfo, + LintFinding, + LoopHop, + MatchedRoute, + NavigationCalls, + NavigationDiffResult, + NavigationLoop, + NavigationRecord, + OutletInfo, + PlatformNavigation, + RouteNode, + RoutePreview, + RouterLintResult, + RouterPage, + RouterSetup, + ScannedRoute, +} from './router-types.ts'; diff --git a/packages/devtools/src/router-actions.ts b/packages/devtools/src/router-actions.ts index bbdcb57e..51ee3910 100644 --- a/packages/devtools/src/router-actions.ts +++ b/packages/devtools/src/router-actions.ts @@ -26,13 +26,8 @@ import { type RouterDebugApi, WRAPPED, } from './router.ts'; - -export interface PreloadRecord { - path: string; - startedAt: number; - ms?: number; - failed?: boolean; -} +import type { PreloadRecord } from './router-types.ts'; +export type { PreloadRecord } from './router-types.ts'; export type RouterAction = | { diff --git a/packages/devtools/src/router-config.ts b/packages/devtools/src/router-config.ts index dd5369ff..2f839077 100644 --- a/packages/devtools/src/router-config.ts +++ b/packages/devtools/src/router-config.ts @@ -9,30 +9,9 @@ import { resolversOf, WRAPPED, type AnyRecord, - type RouteGuards, } from './router.ts'; - -export interface RouteNode { - id: string; - path: string; - fullPath: string; - kind: 'component' | 'redirect' | 'children' | 'lazy' | 'componentless'; - component?: string; - redirectTo?: string; - pathMatch?: string; - outlet?: string; - lazy?: 'unloaded' | 'loaded'; - matcher?: string; - guards?: RouteGuards; - resolvers?: string[]; - title?: string; - dataKeys?: string[]; - providers?: number; - runGuardsAndResolvers?: string; - inputs?: string[]; - classGuards?: string[]; - children?: RouteNode[]; -} +import type { RouteNode } from './router-types.ts'; +export type { RouteNode } from './router-types.ts'; const MAX_NODES = 1000; const MAX_SIBLINGS = 200; diff --git a/packages/devtools/src/router-links.ts b/packages/devtools/src/router-links.ts index 95c8182c..5d1d44f8 100644 --- a/packages/devtools/src/router-links.ts +++ b/packages/devtools/src/router-links.ts @@ -10,31 +10,8 @@ import { } from './router.ts'; import { elementId } from './element-id.ts'; import { serialize } from './serialize.ts'; - -export interface OutletInfo { - outlet: string; - route?: string; - component?: string; - element?: string; - devtoolsId?: string; - activated: boolean; - detached?: boolean; - inputs?: { input: string; source: string }[]; - data?: string; - children?: OutletInfo[]; -} - -export interface LinkInfo { - text: string; - href?: string; - active?: boolean; - linkActive?: boolean; - activeClasses?: string[]; - exact?: boolean; - ariaCurrent?: string; - element?: string; - devtoolsId?: string; -} +import type { OutletInfo, LinkInfo } from './router-types.ts'; +export type { OutletInfo, LinkInfo } from './router-types.ts'; const MAX_OUTLETS = 100; const MAX_LINKS = 100; diff --git a/packages/devtools/src/router-matched.ts b/packages/devtools/src/router-matched.ts index feddba1f..7175cb9a 100644 --- a/packages/devtools/src/router-matched.ts +++ b/packages/devtools/src/router-matched.ts @@ -8,21 +8,8 @@ import { redactRecord, type AnyRecord, } from './router.ts'; - -/** - * One route a navigation activated, kept on its record so two navigations - * can be compared later. Params and data are redacted, and each value is - * short JSON text, so the record stays small and comparable as strings. - */ -export interface MatchedRoute { - /** Full path of the route config, such as `/users/:id`. */ - path: string; - /** Left out for the primary outlet. */ - outlet?: string; - component?: string; - params?: Record<string, string>; - data?: Record<string, string>; -} +import type { MatchedRoute } from './router-types.ts'; +export type { MatchedRoute } from './router-types.ts'; /** Most routes one navigation keeps. */ export const MAX_MATCHED_ROUTES = 30; diff --git a/packages/devtools/src/router-open-redirect.ts b/packages/devtools/src/router-open-redirect.ts index 08d981a4..0c0ccc66 100644 --- a/packages/devtools/src/router-open-redirect.ts +++ b/packages/devtools/src/router-open-redirect.ts @@ -1,18 +1,7 @@ import type { GuardRun } from './router.ts'; import { clip } from './text.ts'; - -/** - * A navigation whose target came from a query param of the URL it was - * started from or redirected away from, such as a guard that sends - * `/login?returnUrl=/admin` to `/admin`. A target an attacker can choose is - * an open redirect risk once the app passes it on without an allow list. - */ -export interface QueryRedirect { - /** The query param the target was read from. */ - param: string; - /** Who navigated: the guard or resolver, the error handler, or the calling code. */ - by: string; -} +import type { QueryRedirect } from './router-types.ts'; +export type { QueryRedirect } from './router-types.ts'; /** Query param names that usually hold a URL to go to next. */ const RETURN_PARAM = /return|redirect|next|url|back|continue|goto|target|dest/i; diff --git a/packages/devtools/src/router-platform-nav.ts b/packages/devtools/src/router-platform-nav.ts index 4d1034cb..ed0294e3 100644 --- a/packages/devtools/src/router-platform-nav.ts +++ b/packages/devtools/src/router-platform-nav.ts @@ -7,26 +7,8 @@ import { type AnyRecord, type NavigationRecord, } from './router.ts'; - -/** - * One `navigate` event of the browser's Navigation API (`window.navigation`): - * a link, a form, back and forward, `history.pushState`, or the router's own - * history update. Kept next to the router's navigations so history changes - * the router did not make (the cause of `urlDrift`) show up. - */ -export interface PlatformNavigation { - at: number; - /** `push`, `replace`, `reload` or `traverse`. */ - type: string; - /** The destination as a path, with the origin left out and secrets masked. */ - url: string; - userInitiated?: boolean; - hashChange?: boolean; - /** The router navigation it belongs to; left out when the router was not navigating. */ - navigationId?: number; - result?: 'succeeded' | 'failed'; - error?: string; -} +import type { PlatformNavigation } from './router-types.ts'; +export type { PlatformNavigation } from './router-types.ts'; /** Most Navigation API events a page keeps. */ export const MAX_PLATFORM_NAVIGATIONS = 30; diff --git a/packages/devtools/src/router-setup.ts b/packages/devtools/src/router-setup.ts index 95757423..0682fefd 100644 --- a/packages/devtools/src/router-setup.ts +++ b/packages/devtools/src/router-setup.ts @@ -1,22 +1,6 @@ import { nameOf, providerOf, read, type AnyRecord, type RouterDebugApi } from './router.ts'; - -export interface RouterOption { - name: string; - value: string; - set: boolean; -} - -export interface RouterSetup { - mode: 'full' | 'events-only'; - setupKind: 'provideRouter' | 'forRoot or other' | 'unknown'; - routers: number; - angularVersion?: string; - options: RouterOption[]; - features: Record<string, string>; - strategies: Record<string, string>; - baseHref?: string; - hydrated?: number; -} +import type { RouterOption, RouterSetup } from './router-types.ts'; +export type { RouterOption, RouterSetup } from './router-types.ts'; const OPTION_DEFAULTS: [string, string][] = [ ['onSameUrlNavigation', 'ignore'], diff --git a/packages/devtools/src/router-types.ts b/packages/devtools/src/router-types.ts new file mode 100644 index 00000000..83b74ecf --- /dev/null +++ b/packages/devtools/src/router-types.ts @@ -0,0 +1,386 @@ +/** + * The router report shapes: what the page pushes (`router.ts` and the + * `router-*` collectors), what the server keeps and serves to the panel + * (`rpc/router-tools.ts`), and what the router RPCs return. Types only, so + * the panel can share them through `./internal/types` (`panel-types.ts`) + * without pulling package code into its bundle. + */ +import type { HttpCall } from './http-rules.ts'; + +export interface RouteGuards { + canActivate?: string[]; + canActivateChild?: string[]; + canDeactivate?: string[]; + canMatch?: string[]; + canLoad?: string[]; +} + +export interface ActiveRoute { + path: string; + url: string; + outlet: string; + component?: string; + title?: string; + ownTitle?: boolean; + params: Record<string, unknown>; + data: Record<string, unknown>; + paramSources?: Record<string, 'own' | 'inherited'>; + dataSources?: Record<string, 'static' | 'resolved' | 'inherited'>; + guards?: RouteGuards; + resolvers?: string[]; + lazy?: boolean; + children: ActiveRoute[]; +} + +export interface RouterSnapshot { + url: string; + queryParams: Record<string, unknown>; + fragment: string | null; + root: ActiveRoute; + browserUrl?: string; + urlDrift?: boolean; + title?: string; + pending?: { id: number; url: string }; +} + +export type NavigationOutcome = + 'pending' | 'succeeded' | 'redirected' | 'cancelled' | 'failed' | 'skipped'; + +export interface GuardRun { + guard: string; + kind: string; + route: string; + result: string; + ms: number; +} + +export interface NavigationRecord { + id: number; + url: string; + trigger: string; + startedAt: number; + endedAt?: number; + outcome: NavigationOutcome; + finalUrl?: string; + from?: string; + extras?: string[]; + caller?: string; + phases?: Record<string, number>; + redirectedFrom?: number; + redirectTo?: string; + redirectKind?: string; + guards?: { names: string[]; passed?: boolean; ms?: number }; + resolvers?: { names: string[]; ms?: number }; + checked?: { activate: string[]; deactivate: string[] }; + runs?: GuardRun[]; + lazyLoaded?: string[]; + reused?: string[]; + requests?: { count: number; urls: string[] }; + warnings?: string[]; + errorCode?: string; + errorHandler?: string; + scroll?: string; + title?: string; + generation?: number; + reason?: string; + code?: string; + beforeConnect?: boolean; + earlier?: number; + probe?: boolean; + /** The routes it activated, for comparing two navigations (`router-diff.ts`). */ + routes?: MatchedRoute[]; + /** Its target came from a query param: a possible open redirect (`router-open-redirect.ts`). */ + queryRedirect?: QueryRedirect; + /** The browser Navigation API event it came with (`router-platform-nav.ts`). */ + platform?: { type: string; userInitiated?: boolean }; +} + +/** + * One route a navigation activated, kept on its record so two navigations + * can be compared later. Params and data are redacted, and each value is + * short JSON text, so the record stays small and comparable as strings. + */ +export interface MatchedRoute { + /** Full path of the route config, such as `/users/:id`. */ + path: string; + /** Left out for the primary outlet. */ + outlet?: string; + component?: string; + params?: Record<string, string>; + data?: Record<string, string>; +} + +/** + * A navigation whose target came from a query param of the URL it was + * started from or redirected away from, such as a guard that sends + * `/login?returnUrl=/admin` to `/admin`. A target an attacker can choose is + * an open redirect risk once the app passes it on without an allow list. + */ +export interface QueryRedirect { + /** The query param the target was read from. */ + param: string; + /** Who navigated: the guard or resolver, the error handler, or the calling code. */ + by: string; +} + +/** + * One `navigate` event of the browser's Navigation API (`window.navigation`): + * a link, a form, back and forward, `history.pushState`, or the router's own + * history update. Kept next to the router's navigations so history changes + * the router did not make (the cause of `urlDrift`) show up. + */ +export interface PlatformNavigation { + at: number; + /** `push`, `replace`, `reload` or `traverse`. */ + type: string; + /** The destination as a path, with the origin left out and secrets masked. */ + url: string; + userInitiated?: boolean; + hashChange?: boolean; + /** The router navigation it belongs to; left out when the router was not navigating. */ + navigationId?: number; + result?: 'succeeded' | 'failed'; + error?: string; +} + +export interface OutletInfo { + outlet: string; + route?: string; + component?: string; + element?: string; + devtoolsId?: string; + activated: boolean; + detached?: boolean; + inputs?: { input: string; source: string }[]; + data?: string; + children?: OutletInfo[]; +} + +export interface LinkInfo { + text: string; + href?: string; + active?: boolean; + linkActive?: boolean; + activeClasses?: string[]; + exact?: boolean; + ariaCurrent?: string; + element?: string; + devtoolsId?: string; +} + +export interface RouteNode { + id: string; + path: string; + fullPath: string; + kind: 'component' | 'redirect' | 'children' | 'lazy' | 'componentless'; + component?: string; + redirectTo?: string; + pathMatch?: string; + outlet?: string; + lazy?: 'unloaded' | 'loaded'; + matcher?: string; + guards?: RouteGuards; + resolvers?: string[]; + title?: string; + dataKeys?: string[]; + providers?: number; + runGuardsAndResolvers?: string; + inputs?: string[]; + classGuards?: string[]; + children?: RouteNode[]; +} + +export interface RouterOption { + name: string; + value: string; + set: boolean; +} + +export interface RouterSetup { + mode: 'full' | 'events-only'; + setupKind: 'provideRouter' | 'forRoot or other' | 'unknown'; + routers: number; + angularVersion?: string; + options: RouterOption[]; + features: Record<string, string>; + strategies: Record<string, string>; + baseHref?: string; + hydrated?: number; +} + +export interface PreloadRecord { + path: string; + startedAt: number; + ms?: number; + failed?: boolean; +} + +export interface LoopHop { + id: number; + from: string; + to: string; + via: string; + by?: string; +} + +export interface NavigationLoop { + kind: 'redirect' | 'burst' | 'config'; + ids: number[]; + cycle: string[]; + hops: LoopHop[]; + guards: string[]; + bounces: number; + end: string; +} + +export interface RouterReport { + pageId: string; + snapshot: RouterSnapshot | null; + navigations: NavigationRecord[]; + /** Older navigations removed at `limits.navigations`. */ + dropped?: number; + generation?: number; + config?: RouteNode[]; + configTruncated?: number; + activeIds?: string[]; + setup?: RouterSetup; + outlets?: OutletInfo[]; + links?: LinkInfo[]; + /** Links past the first 100 that the page found but did not list. */ + linksTruncated?: number; + /** + * Elements that could hold a link but were past the page's check limit, so + * `linksTruncated` is a lower bound. + */ + linksUnchecked?: number; + preloads?: PreloadRecord[]; + instrumented?: boolean; + /** The browser Navigation API's `navigate` events, newest last. */ + platformNavigations?: PlatformNavigation[]; +} + +export interface RouterPage extends RouterReport { + reportedAt: number; + changedAt: number; + loops?: NavigationLoop[]; +} + +export interface RouterState { + pages: RouterPage[]; +} + +export interface LintFinding { + rule: string; + severity: 'error' | 'warning' | 'info'; + route: string; + message: string; + fix: string; + angular: 'throws' | 'warns' | 'silent'; +} + +export type RouterLintResult = + | { checked: true; findings: LintFinding[] } + | { checked: false; reason: 'no-page' | 'events-only' | 'no-config' }; + +/** One field that differs between two navigations. A missing side did not have it. */ +export interface DiffChange { + field: string; + before?: string; + after?: string; +} + +export interface DiffSection { + title: string; + changes: DiffChange[]; +} + +export interface NavigationDiff { + a: number; + b: number; + /** Sections with at least one change, in a fixed order. */ + sections: DiffSection[]; + /** Titles of the sections that are the same in both. */ + same: string[]; + /** What could not be compared, such as a navigation with no route data. */ + notes: string[]; +} + +export type NavigationDiffResult = NavigationDiff | { error: string }; + +/** + * The HttpClient calls of one navigation, joined from the HTTP inspector's + * report of the same page: the ones that started while it ran (guards, + * resolvers, lazy loads) and the ones that started after it ended, before + * the next navigation or `AFTER_MS` in `rpc/router-http.ts` (the components it + * rendered). + */ +export interface NavigationCalls { + during: HttpCall[]; + after: HttpCall[]; +} + +/** A redirect the prediction followed: from one URL to the next, through a `redirectTo` route. */ +export interface PreviewHop { + from: string; + to: string; + route: string; +} + +/** One route of the matched chain, parent first. */ +export interface PreviewRoute { + path: string; + component?: string; + outlet?: string; + lazy?: 'unloaded' | 'loaded'; + title?: string; + source?: string; + /** The route is active now, so it keeps its component and reruns guards only when its params change. */ + active?: boolean; +} + +/** One phase of the navigation, in the order the router runs them, with what runs in it. */ +export interface PreviewStep { + phase: string; + items: string[]; +} + +/** + * What going to a URL would do, predicted from the live route config + * without navigating: the redirects it follows, the route chain it ends + * on, and the guards, lazy chunks, resolvers and components of each phase. + */ +export interface RoutePreview { + url: string; + finalUrl: string; + matched: boolean; + hops: PreviewHop[]; + chain: PreviewRoute[]; + params: Record<string, string>; + steps: PreviewStep[]; + renderMode?: { mode: string; path: string; file: string }; + /** Where the prediction stopped short: a function redirect, an unloaded lazy route, a redirect loop. */ + stopped?: string; + notes: string[]; + nearest: string[]; +} + +export type RoutePreviewResult = RoutePreview | { error: string }; + +/** + * A route the source scan found in a `*.routes.ts` or routing module file, or + * in an Analog `pages` folder (`get-routes` RPC). Read from source, so it is + * there before any page connects. + */ +export interface ScannedRoute { + path: string; + fullPath: string; + kind: 'page' | 'group' | 'redirect' | 'wildcard'; + component?: string; + redirectTo?: string; + title?: string; + guards?: Record<string, string[]>; + resolvers?: string[]; + hasChildren: boolean; + file: string; + line?: number; +} diff --git a/packages/devtools/src/router.ts b/packages/devtools/src/router.ts index bfe05b3b..d13b60d4 100644 --- a/packages/devtools/src/router.ts +++ b/packages/devtools/src/router.ts @@ -3,100 +3,23 @@ import { routerHeldOnPage } from './router-fallback.ts'; import { REDACTED, serializeFormValue } from './forms.ts'; import { decode, isSecretKey, knownSecrets, redactText, rememberSecret } from './text-redact.ts'; import { clip } from './text.ts'; -import { matchedRoutesOf, type MatchedRoute } from './router-matched.ts'; -import { - navigationFromQuery, - redirectFromQuery, - type QueryRedirect, -} from './router-open-redirect.ts'; - -export interface RouteGuards { - canActivate?: string[]; - canActivateChild?: string[]; - canDeactivate?: string[]; - canMatch?: string[]; - canLoad?: string[]; -} - -export interface ActiveRoute { - path: string; - url: string; - outlet: string; - component?: string; - title?: string; - ownTitle?: boolean; - params: Record<string, unknown>; - data: Record<string, unknown>; - paramSources?: Record<string, 'own' | 'inherited'>; - dataSources?: Record<string, 'static' | 'resolved' | 'inherited'>; - guards?: RouteGuards; - resolvers?: string[]; - lazy?: boolean; - children: ActiveRoute[]; -} - -export interface RouterSnapshot { - url: string; - queryParams: Record<string, unknown>; - fragment: string | null; - root: ActiveRoute; - browserUrl?: string; - urlDrift?: boolean; - title?: string; - pending?: { id: number; url: string }; -} - -export type NavigationOutcome = - 'pending' | 'succeeded' | 'redirected' | 'cancelled' | 'failed' | 'skipped'; - -export interface GuardRun { - guard: string; - kind: string; - route: string; - result: string; - ms: number; -} - -export interface NavigationRecord { - id: number; - url: string; - trigger: string; - startedAt: number; - endedAt?: number; - outcome: NavigationOutcome; - finalUrl?: string; - from?: string; - extras?: string[]; - caller?: string; - phases?: Record<string, number>; - redirectedFrom?: number; - redirectTo?: string; - redirectKind?: string; - guards?: { names: string[]; passed?: boolean; ms?: number }; - resolvers?: { names: string[]; ms?: number }; - checked?: { activate: string[]; deactivate: string[] }; - runs?: GuardRun[]; - lazyLoaded?: string[]; - reused?: string[]; - requests?: { count: number; urls: string[] }; - warnings?: string[]; - errorCode?: string; - errorHandler?: string; - scroll?: string; - title?: string; - generation?: number; - reason?: string; - code?: string; - beforeConnect?: boolean; - earlier?: number; - probe?: boolean; - /** The routes it activated, for comparing two navigations (`router-diff.ts`). */ - routes?: MatchedRoute[]; - /** Its target came from a query param: a possible open redirect (`router-open-redirect.ts`). */ - queryRedirect?: QueryRedirect; - /** The browser Navigation API event it came with (`router-platform-nav.ts`). */ - platform?: { type: string; userInitiated?: boolean }; -} +import { matchedRoutesOf } from './router-matched.ts'; +import { navigationFromQuery, redirectFromQuery } from './router-open-redirect.ts'; +import type { + RouteGuards, + ActiveRoute, + RouterSnapshot, + GuardRun, + NavigationRecord, +} from './router-types.ts'; +export type { + RouteGuards, + ActiveRoute, + RouterSnapshot, + NavigationOutcome, + GuardRun, + NavigationRecord, +} from './router-types.ts'; export interface RouterDebugApi { getInjector?(el: Element): unknown; diff --git a/packages/devtools/src/rpc/get-routes.ts b/packages/devtools/src/rpc/get-routes.ts index 7da96638..8a8b7965 100644 --- a/packages/devtools/src/rpc/get-routes.ts +++ b/packages/devtools/src/rpc/get-routes.ts @@ -1,6 +1,7 @@ import { defineRpcFunction } from 'devframe'; import * as v from 'valibot'; import { describable } from './agent-schema.ts'; +import type { ScannedRoute } from '../router-types.ts'; import { analogVersion, buildRoutes, flattenRoutes, servedAnalogRoot } from './analog-scan.ts'; import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs'; import { dirname, isAbsolute, join, relative } from 'node:path'; @@ -27,7 +28,12 @@ const RouteSchema = v.object({ line: v.optional(v.number()), }); -type ExtractedRoute = v.InferOutput<typeof RouteSchema>; +type ExtractedRoute = ScannedRoute; + +/** True when two types are the same, so the schema and the shared type can't drift apart. */ +type Same<A, B> = [A] extends [B] ? ([B] extends [A] ? true : false) : false; +const schemaMatchesScannedRoute: Same<v.InferOutput<typeof RouteSchema>, ScannedRoute> = true; +void schemaMatchesScannedRoute; export const getRoutes = defineRpcFunction({ name: 'get-routes', @@ -236,8 +242,9 @@ function resolveFiles(found: string[], cwd: string): ExtractedRoute[] { } function clean(route: ExtractedRoute): ExtractedRoute { - const out = { ...route } as Record<string, unknown>; - for (const key of Object.keys(out)) if (out[key] === undefined) delete out[key]; + const out: Partial<Record<keyof ExtractedRoute, unknown>> = { ...route }; + for (const key of Object.keys(out) as (keyof ExtractedRoute)[]) + if (out[key] === undefined) delete out[key]; return out as ExtractedRoute; } diff --git a/packages/devtools/src/rpc/router-config-tools.ts b/packages/devtools/src/rpc/router-config-tools.ts index a7bd7350..cb7ca86d 100644 --- a/packages/devtools/src/rpc/router-config-tools.ts +++ b/packages/devtools/src/rpc/router-config-tools.ts @@ -20,6 +20,8 @@ import { import { hopText, loopChain, loopTitle, redirectCycles } from './router-loops.ts'; import type { HttpCall } from '../http-rules.ts'; import { callsForNavigation, nextNavigation } from './router-http.ts'; +import type { LintFinding, RouterLintResult } from '../router-types.ts'; +export type { LintFinding, RouterLintResult } from '../router-types.ts'; export interface SourceRoute { path: string; @@ -38,15 +40,6 @@ export interface MatchResult { nearest: string[]; } -export interface LintFinding { - rule: string; - severity: 'error' | 'warning' | 'info'; - route: string; - message: string; - fix: string; - angular: 'throws' | 'warns' | 'silent'; -} - const MAX_LIST = 400; function walk( @@ -313,10 +306,6 @@ export interface RouterLintOptions { httpFor?: (pageId: string) => readonly HttpCall[] | undefined; } -export type RouterLintResult = - | { checked: true; findings: LintFinding[] } - | { checked: false; reason: 'no-page' | 'events-only' | 'no-config' }; - /** Lint findings for the panel, or why no check could run. */ export function routerLintResult( page: RouterPage | undefined, diff --git a/packages/devtools/src/rpc/router-diff.ts b/packages/devtools/src/rpc/router-diff.ts index dd2a2075..facb42e7 100644 --- a/packages/devtools/src/rpc/router-diff.ts +++ b/packages/devtools/src/rpc/router-diff.ts @@ -9,31 +9,18 @@ import { pickPage, type RouterState, } from './router-tools.ts'; - -/** One field that differs between two navigations. A missing side did not have it. */ -export interface DiffChange { - field: string; - before?: string; - after?: string; -} - -export interface DiffSection { - title: string; - changes: DiffChange[]; -} - -export interface NavigationDiff { - a: number; - b: number; - /** Sections with at least one change, in a fixed order. */ - sections: DiffSection[]; - /** Titles of the sections that are the same in both. */ - same: string[]; - /** What could not be compared, such as a navigation with no route data. */ - notes: string[]; -} - -export type NavigationDiffResult = NavigationDiff | { error: string }; +import type { + DiffChange, + DiffSection, + NavigationDiff, + NavigationDiffResult, +} from '../router-types.ts'; +export type { + DiffChange, + DiffSection, + NavigationDiff, + NavigationDiffResult, +} from '../router-types.ts'; function queryOf(url: string | undefined): Record<string, string> { const query = url?.split('#')[0].split('?')[1]; diff --git a/packages/devtools/src/rpc/router-http.ts b/packages/devtools/src/rpc/router-http.ts index 4663ff39..6f9093d7 100644 --- a/packages/devtools/src/rpc/router-http.ts +++ b/packages/devtools/src/rpc/router-http.ts @@ -2,17 +2,8 @@ import { redactCall } from '../http-redact.ts'; import type { HttpCall } from '../http-rules.ts'; import type { NavigationRecord } from '../router.ts'; import { clip, code } from '../text.ts'; - -/** - * The HttpClient calls of one navigation, joined from the HTTP inspector's - * report of the same page: the ones that started while it ran (guards, - * resolvers, lazy loads) and the ones that started after it ended, before - * the next navigation or {@link AFTER_MS} (the components it rendered). - */ -export interface NavigationCalls { - during: HttpCall[]; - after: HttpCall[]; -} +import type { NavigationCalls } from '../router-types.ts'; +export type { NavigationCalls } from '../router-types.ts'; /** How long after a navigation ends a call still counts as one of its own. */ export const AFTER_MS = 5_000; diff --git a/packages/devtools/src/rpc/router-loops.ts b/packages/devtools/src/rpc/router-loops.ts index e6484900..441434e2 100644 --- a/packages/devtools/src/rpc/router-loops.ts +++ b/packages/devtools/src/rpc/router-loops.ts @@ -1,24 +1,8 @@ import type { NavigationRecord } from '../router.ts'; import type { RouteNode } from '../router-config.ts'; import { code } from './forms-tools.ts'; - -export interface LoopHop { - id: number; - from: string; - to: string; - via: string; - by?: string; -} - -export interface NavigationLoop { - kind: 'redirect' | 'burst' | 'config'; - ids: number[]; - cycle: string[]; - hops: LoopHop[]; - guards: string[]; - bounces: number; - end: string; -} +import type { LoopHop, NavigationLoop } from '../router-types.ts'; +export type { LoopHop, NavigationLoop } from '../router-types.ts'; interface Step { url: string; diff --git a/packages/devtools/src/rpc/router-preview.ts b/packages/devtools/src/rpc/router-preview.ts index bb7b0fd5..e718795e 100644 --- a/packages/devtools/src/rpc/router-preview.ts +++ b/packages/devtools/src/rpc/router-preview.ts @@ -17,53 +17,20 @@ import { type RouterState, } from './router-tools.ts'; import type { ServerRouteEntry } from './server-routes.ts'; - -/** A redirect the prediction followed: from one URL to the next, through a `redirectTo` route. */ -export interface PreviewHop { - from: string; - to: string; - route: string; -} - -/** One route of the matched chain, parent first. */ -export interface PreviewRoute { - path: string; - component?: string; - outlet?: string; - lazy?: 'unloaded' | 'loaded'; - title?: string; - source?: string; - /** The route is active now, so it keeps its component and reruns guards only when its params change. */ - active?: boolean; -} - -/** One phase of the navigation, in the order the router runs them, with what runs in it. */ -export interface PreviewStep { - phase: string; - items: string[]; -} - -/** - * What going to a URL would do, predicted from the live route config - * without navigating: the redirects it follows, the route chain it ends - * on, and the guards, lazy chunks, resolvers and components of each phase. - */ -export interface RoutePreview { - url: string; - finalUrl: string; - matched: boolean; - hops: PreviewHop[]; - chain: PreviewRoute[]; - params: Record<string, string>; - steps: PreviewStep[]; - renderMode?: { mode: string; path: string; file: string }; - /** Where the prediction stopped short: a function redirect, an unloaded lazy route, a redirect loop. */ - stopped?: string; - notes: string[]; - nearest: string[]; -} - -export type RoutePreviewResult = RoutePreview | { error: string }; +import type { + PreviewHop, + PreviewRoute, + PreviewStep, + RoutePreview, + RoutePreviewResult, +} from '../router-types.ts'; +export type { + PreviewHop, + PreviewRoute, + PreviewStep, + RoutePreview, + RoutePreviewResult, +} from '../router-types.ts'; const MAX_HOPS = 5; diff --git a/packages/devtools/src/rpc/router-tools.ts b/packages/devtools/src/rpc/router-tools.ts index 4a6f25b1..4439abcb 100644 --- a/packages/devtools/src/rpc/router-tools.ts +++ b/packages/devtools/src/rpc/router-tools.ts @@ -2,9 +2,8 @@ import { defaultPage } from './default-page.ts'; import type { ActiveRoute, NavigationRecord, RouterSnapshot } from '../router.ts'; import type { RouteNode } from '../router-config.ts'; import type { RouterSetup } from '../router-setup.ts'; -import type { LinkInfo, OutletInfo } from '../router-links.ts'; +import type { OutletInfo } from '../router-links.ts'; import type { PreloadRecord } from '../router-actions.ts'; -import type { PlatformNavigation } from '../router-platform-nav.ts'; import type { HttpCall } from '../http-rules.ts'; import { callsForNavigation, @@ -26,42 +25,8 @@ import { loopTitle, type NavigationLoop, } from './router-loops.ts'; - -export interface RouterReport { - pageId: string; - snapshot: RouterSnapshot | null; - navigations: NavigationRecord[]; - /** Older navigations removed at `limits.navigations`. */ - dropped?: number; - generation?: number; - config?: RouteNode[]; - configTruncated?: number; - activeIds?: string[]; - setup?: RouterSetup; - outlets?: OutletInfo[]; - links?: LinkInfo[]; - /** Links past the first 100 that the page found but did not list. */ - linksTruncated?: number; - /** - * Elements that could hold a link but were past the page's check limit, so - * `linksTruncated` is a lower bound. - */ - linksUnchecked?: number; - preloads?: PreloadRecord[]; - instrumented?: boolean; - /** The browser Navigation API's `navigate` events, newest last. */ - platformNavigations?: PlatformNavigation[]; -} - -export interface RouterPage extends RouterReport { - reportedAt: number; - changedAt: number; - loops?: NavigationLoop[]; -} - -export interface RouterState { - pages: RouterPage[]; -} +import type { RouterReport, RouterPage, RouterState } from '../router-types.ts'; +export type { RouterReport, RouterPage, RouterState } from '../router-types.ts'; type Pages = Map<string, RouterPage>; From 6be90253e2ed9345491b25508a5b8c9d0068482f Mon Sep 17 00:00:00 2001 From: erKam <erkamyaman35@gmail.com> Date: Sat, 7 Nov 2026 19:55:18 +0000 Subject: [PATCH 03/15] feat(http): refetch the TransferState payload, rule presets for agents, lint in audit Three items #473 left partial. Refetch renders the page's URL again on the server with the tab's cookies, parses the HTML into a detached document and pushes the masked payload, without reloading the tab. The panel button and the refetch-transfer-state agent tool both need actions.http, and the tool is registered in AGENT_ENTRIES with refusal tests. set-http-rule takes preset (offline, slow-3g, flaky) and expands it into the same plain rules as the panel's buttons. The audit now lists lint-http findings (duplicate requests, waterfalls, repeated server calls) and the snapshot HTTP section ends with a count of them. Refs #369 --- .../__tests__/network-payload-refetch.test.ts | 102 +++++++++ app/src/pages/network-inspector.ts | 56 +++++ apps/docs/src/content/agents/mcp-server.md | 3 +- apps/docs/src/content/agents/tools.md | 57 ++--- .../content/getting-started/configuration.md | 34 +-- apps/docs/src/content/inspectors/audit.md | 22 +- apps/docs/src/content/inspectors/ssr-http.md | 35 +-- packages/devtools/CHANGELOG.md | 3 + .../__tests__/action-tool-refusals.test.ts | 1 + .../src/__tests__/audit-findings.test.ts | 46 ++++ .../devtools/src/__tests__/config.test.ts | 2 + .../fixtures/agent-metadata-derived.json | 5 + .../__tests__/http-payload-refetch.test.ts | 214 ++++++++++++++++++ .../src/__tests__/http-rule-tools.test.ts | 49 +++- .../src/__tests__/snapshot-tool.test.ts | 22 ++ packages/devtools/src/config.ts | 13 +- packages/devtools/src/devframe.ts | 115 +++++++++- packages/devtools/src/http-overlay.ts | 48 +++- packages/devtools/src/http-payload-refetch.ts | 52 +++++ packages/devtools/src/http-payload.ts | 5 + packages/devtools/src/rpc/audit-findings.ts | 56 ++++- packages/devtools/src/rpc/http-lint.ts | 42 +++- packages/devtools/src/rpc/http-rule-tools.ts | 58 +++++ packages/devtools/src/rpc/snapshot-tools.ts | 6 +- .../devtools/src/rpc/ssr-override-tools.ts | 32 +++ scripts/e2e-mcp.mjs | 21 ++ 26 files changed, 1009 insertions(+), 90 deletions(-) create mode 100644 app/src/__tests__/network-payload-refetch.test.ts create mode 100644 packages/devtools/src/__tests__/http-payload-refetch.test.ts create mode 100644 packages/devtools/src/http-payload-refetch.ts diff --git a/app/src/__tests__/network-payload-refetch.test.ts b/app/src/__tests__/network-payload-refetch.test.ts new file mode 100644 index 00000000..3c3e2cec --- /dev/null +++ b/app/src/__tests__/network-payload-refetch.test.ts @@ -0,0 +1,102 @@ +import { TestBed, type ComponentFixture } from '@angular/core/testing'; +import type { DevframeRpcClient } from 'devframe/client'; +import { afterEach, describe, expect, it, vi } from 'vitest'; + +const calls: [string, unknown][] = []; +let answer: unknown = { ok: true, found: true, entries: 2, status: 200 }; + +vi.mock('../rpc', () => ({ + rpcCall: async (_rpc: unknown, name: string, arg?: unknown) => { + calls.push([name, arg]); + return answer; + }, +})); + +const { NetworkInspector } = await import('../pages/network-inspector'); + +const page = { + pageId: 'p1', + url: 'http://localhost:4000/trips', + initialUrl: 'http://localhost:4000/trips', + title: 'Trips', + hydration: null, + calls: [], + reportedAt: 1, +}; + +function client( + actions: Record<string, boolean> = {}, + payload: Record<string, unknown> = { found: true, size: 7, entries: [] }, +): DevframeRpcClient { + const values: Record<string, unknown> = { + http: { serverCalls: [], pages: [page], rules: [], ssrOverrides: [] }, + 'http-payloads': { pages: { p1: payload } }, + }; + const rpc = { + sharedState: (name: string) => + Promise.resolve({ value: () => values[name], on: () => () => {} }), + }; + return { + connectionMeta: { configs: { pangular: { actions } } }, + scope: () => ({ rpc }), + } as unknown as DevframeRpcClient; +} + +let fixture: ComponentFixture<InstanceType<typeof NetworkInspector>>; + +async function render(rpc: DevframeRpcClient) { + fixture = TestBed.createComponent(NetworkInspector); + fixture.componentRef.setInput('rpc', rpc); + await fixture.whenStable(); + await new Promise((resolve) => setTimeout(resolve)); + await fixture.whenStable(); + return fixture.nativeElement as HTMLElement; +} + +const button = (host: HTMLElement) => + host.querySelector<HTMLButtonElement>('button[data-refetch-payload]')!; + +describe('NetworkInspector payload refetch', () => { + afterEach(() => { + fixture?.destroy(); + TestBed.resetTestingModule(); + calls.length = 0; + answer = { ok: true, found: true, entries: 2, status: 200 }; + }); + + it('asks the server to refetch the selected page and announces the result', async () => { + const host = await render(client()); + const refetch = button(host); + expect(refetch.textContent!.trim()).toBe('Refetch'); + expect(refetch.getAttribute('aria-describedby')).toBe('refetch-hint'); + refetch.click(); + await fixture.whenStable(); + expect(calls).toContainEqual(['request-http-payload-refetch', { pageId: 'p1' }]); + expect(host.querySelector('.toolbar [role="status"]')!.textContent).toBe( + 'Refetched: 2 entries.', + ); + }); + + it('reads out the reason when the refetch does nothing', async () => { + answer = { error: 'The page did not answer within 15s. Is the tab still open?' }; + const host = await render(client()); + button(host).click(); + await fixture.whenStable(); + expect(host.querySelector('.toolbar [role="status"]')!.textContent).toBe( + 'The page did not answer within 15s. Is the tab still open?', + ); + }); + + it('is off when HTTP actions are off, and says why', async () => { + const host = await render(client({ http: false })); + const refetch = button(host); + expect(refetch.disabled).toBe(true); + expect(refetch.getAttribute('aria-describedby')).toBe('http-writes-off refetch-hint'); + expect(host.querySelector('#http-writes-off')).not.toBeNull(); + }); + + it('marks a payload that came from a refetch', async () => { + const host = await render(client({}, { found: true, size: 7, entries: [], refetchedAt: 5 })); + expect(host.querySelector('[data-refetched]')!.textContent).toBe('Refetched'); + }); +}); diff --git a/app/src/pages/network-inspector.ts b/app/src/pages/network-inspector.ts index 04cf2771..b53ffafb 100644 --- a/app/src/pages/network-inspector.ts +++ b/app/src/pages/network-inspector.ts @@ -190,6 +190,8 @@ interface HttpPayload { size: number; entries: PayloadEntry[]; error?: string; + /** Set when the payload came from Refetch, not from the HTML the tab was served with. */ + refetchedAt?: number; } interface HttpPage { @@ -1302,6 +1304,23 @@ const HTTP_STATUS_OPTIONS: SelectOption[] = [ <section class="panel wide" aria-labelledby="payload-heading"> <h2 id="payload-heading">TransferState payload</h2> + @if (selected(); as page) { + <div class="payload-tools"> + <button + type="button" + data-refetch-payload + [disabled]="!canWrite() || refetching()" + [attr.aria-describedby]="canWrite() ? 'refetch-hint' : 'http-writes-off refetch-hint'" + (click)="refetchPayload(page.pageId)" + > + {{ refetching() ? 'Refetching…' : 'Refetch' }} + </button> + <span id="refetch-hint" class="muted small"> + Renders this URL again on the server, with this tab's cookies, and shows the payload + it sends now. The tab does not reload. + </span> + </div> + } @if (selectedPayload(); as payload) { @if (!payload.found) { <div class="empty"> @@ -1311,6 +1330,9 @@ const HTTP_STATUS_OPTIONS: SelectOption[] = [ <p class="muted small summary-line"> {{ payload.entries.length }} entr{{ payload.entries.length === 1 ? 'y' : 'ies' }}, {{ payload.size }} bytes + @if (payload.refetchedAt) { + <span class="tag" data-refetched>Refetched</span> + } </p> @if (payload.error) { <p class="bad" role="alert">{{ payload.error }}</p> @@ -2179,6 +2201,17 @@ const HTTP_STATUS_OPTIONS: SelectOption[] = [ margin-bottom: 8px; font-variant-numeric: tabular-nums; } + .payload-tools { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 8px 12px; + margin-bottom: 12px; + } + .payload-tools .muted { + flex: 1 1 240px; + min-width: 0; + } .entries { border-top: 1px solid var(--border); } @@ -2335,6 +2368,7 @@ export class NetworkInspector { readonly selectedCallId = signal<string | null>(null); readonly draft = signal<RuleDraft>({ ...EMPTY_DRAFT }); readonly message = signal(''); + readonly refetching = signal(false); readonly bodyPlaceholder = '{ "error": "Service unavailable" }'; readonly statusOptions = HTTP_STATUS_OPTIONS; @@ -2954,6 +2988,28 @@ export class NetworkInspector { ); } + /** Asks the page to render its URL again on the server and push the payload it gets. */ + async refetchPayload(pageId: string) { + if (this.refetching()) return; + this.refetching.set(true); + try { + const result = (await call(this.rpc(), 'request-http-payload-refetch', { pageId })) as + { error?: string; found?: boolean; entries?: number; status?: number } | null | undefined; + if (!result) this.announce('Could not reach the devtools server.'); + else if (result.error) this.announce(result.error); + else if (!result.found) { + this.announce(`The server answered ${result.status} without a TransferState payload.`); + } else { + const count = result.entries ?? 0; + this.announce(`Refetched: ${count} entr${count === 1 ? 'y' : 'ies'}.`); + } + } catch { + this.announce('Could not refetch the payload.'); + } finally { + this.refetching.set(false); + } + } + /** Clears a repeated message first, so the live region speaks again for the same text. */ private announce(text: string) { if (this.message() !== text) { diff --git a/apps/docs/src/content/agents/mcp-server.md b/apps/docs/src/content/agents/mcp-server.md index f3f613ce..fe9d7141 100644 --- a/apps/docs/src/content/agents/mcp-server.md +++ b/apps/docs/src/content/agents/mcp-server.md @@ -275,7 +275,7 @@ Every tool answers with one plain text block, the answer as written: markdown fo ### Read and action tools -Each tool has a safety tier: `read`, `action` or `destructive`. The server marks `read` tools as read-only for your client, and `destructive` tools as destructive. Twenty-five tools act on the app, so the server does not mark them read-only: +Each tool has a safety tier: `read`, `action` or `destructive`. The server marks `read` tools as read-only for your client, and `destructive` tools as destructive. Twenty-six tools act on the app, so the server does not mark them read-only: | Tool | Tier | Reference | | -------------------------- | ------------- | --------------------------------------------------------------------------------- | @@ -291,6 +291,7 @@ Each tool has a safety tier: `read`, `action` or `destructive`. The server marks | `remove-http-rule` | `action` | [Fault rules](./tools.md#fault-rules) | | `set-ssr-override` | `action` | [TransferState and SSR overrides](./tools.md#transferstate-and-ssr-overrides) | | `remove-ssr-override` | `action` | [TransferState and SSR overrides](./tools.md#transferstate-and-ssr-overrides) | +| `refetch-transfer-state` | `action` | [TransferState and SSR overrides](./tools.md#transferstate-and-ssr-overrides) | | `set-component-property` | `action` | [Edit a component](./tools.md#edit-a-component) | | `set-signal` | `action` | [Edit a component](./tools.md#edit-a-component) | | `load-defer-block` | `action` | [load-defer-block](./tools.md#load-defer-block) | diff --git a/apps/docs/src/content/agents/tools.md b/apps/docs/src/content/agents/tools.md index a2f68acf..970fb84e 100644 --- a/apps/docs/src/content/agents/tools.md +++ b/apps/docs/src/content/agents/tools.md @@ -4,7 +4,7 @@ description: Every agent tool the devtools expose, grouped by inspector, with wh --- <ngmd-hero title="Tools" logo="https://cdn.simpleicons.org/modelcontextprotocol/71717A" gradient> - One hundred and thirteen tools, grouped by inspector. Each one answers a question you would otherwise answer by clicking through the panel. + One hundred and fourteen tools, grouped by inspector. Each one answers a question you would otherwise answer by clicking through the panel. </ngmd-hero> # Tools @@ -105,19 +105,19 @@ The URL comes from the HTTP or router report. A page that sends neither (no rout Gives one page's full picture in one bounded markdown answer, for an agent that wants everything at once or a bug report. Reads: page. Each section comes from the tool named under its heading, with the same masking, so call that tool for the rest. -| Section | What it holds | Full answer | -| ------------- | ---------------------------------------------------------- | ----------------------- | -| `page` | Page id, URL, title, platform, Angular version, inspectors | `list-pages` | -| `components` | The component outline | `list-components` | -| `route` | The URL and the active route tree | `inspect-route` | -| `navigations` | Recent navigations, one line each, newest first | `explain-navigation` | -| `http` | HttpClient calls, newest first | `list-http-calls` | -| `errors` | Error groups, most recent first | `list-errors` | -| `console` | Console calls, newest first | `list-console` | -| `forms` | Each form with its status and error count | `inspect-forms` | -| `signals` | The signal graph, without Angular's own nodes and history | `inspect-signals` | -| `stores` | NgRx stores and Redux DevTools stores | `ngrx-inspect-store` | -| `queries` | TanStack Query queries and mutations | `tanstack-list-queries` | +| Section | What it holds | Full answer | +| ------------- | ------------------------------------------------------------------------------- | ----------------------- | +| `page` | Page id, URL, title, platform, Angular version, inspectors | `list-pages` | +| `components` | The component outline | `list-components` | +| `route` | The URL and the active route tree | `inspect-route` | +| `navigations` | Recent navigations, one line each, newest first | `explain-navigation` | +| `http` | HttpClient calls, newest first, and a line that counts the `lint-http` findings | `list-http-calls` | +| `errors` | Error groups, most recent first | `list-errors` | +| `console` | Console calls, newest first | `list-console` | +| `forms` | Each form with its status and error count | `inspect-forms` | +| `signals` | The signal graph, without Angular's own nodes and history | `inspect-signals` | +| `stores` | NgRx stores and Redux DevTools stores | `ngrx-inspect-store` | +| `queries` | TanStack Query queries and mutations | `tanstack-list-queries` | | Argument | Required | What it is | | ---------- | -------- | ---------------------------------------------------------------------- | @@ -170,11 +170,11 @@ Without `url`, `navigation` holds as soon as no navigation is in progress, which Every tool has one of three safety tiers. The server sends the tier to your client as the tool's read-only and destructive hints. -| Tier | What the tool can do | Tools | -| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `read` | Reads your source, the page or the server. `highlight` only shows and selects a component. | Every other tool, and every resource | -| `action` | Changes the running page, the server's fault rules and SSR overrides, or what the page records, or runs a Nitro task. A reload or the next call undoes most of it, but a Nitro task can change data for good. | `navigate`, `probe-route`, `record-guards`, `ngrx-dispatch`, `ngrx-restore`, `tanstack-run-query`, `run-form-action`, `fill-form`, `set-http-rule`, `remove-http-rule`, `set-ssr-override`, `remove-ssr-override`, `set-component-property`, `set-signal`, `load-defer-block`, `watch-signal`, `record-pipes`, `track-subscriptions`, `record-change-detection`, `analog-run-nitro-task` and `audit` | -| `destructive` | Can lose data: it erases recordings or Store DevTools history, deletes the Nitro cache, or sends writes to your own API routes. | `clear-recordings`, `analog-run-api`, `analog-purge-nitro-cache` and `ngrx-store-devtools` | +| Tier | What the tool can do | Tools | +| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `read` | Reads your source, the page or the server. `highlight` only shows and selects a component. | Every other tool, and every resource | +| `action` | Changes the running page, the server's fault rules and SSR overrides, or what the page records, or runs a Nitro task. A reload or the next call undoes most of it, but a Nitro task can change data for good. | `navigate`, `probe-route`, `record-guards`, `ngrx-dispatch`, `ngrx-restore`, `tanstack-run-query`, `run-form-action`, `fill-form`, `set-http-rule`, `remove-http-rule`, `set-ssr-override`, `remove-ssr-override`, `refetch-transfer-state`, `set-component-property`, `set-signal`, `load-defer-block`, `watch-signal`, `record-pipes`, `track-subscriptions`, `record-change-detection`, `analog-run-nitro-task` and `audit` | +| `destructive` | Can lose data: it erases recordings or Store DevTools history, deletes the Nitro cache, or sends writes to your own API routes. | `clear-recordings`, `analog-run-api`, `analog-purge-nitro-cache` and `ngrx-store-devtools` | <ngmd-alert severity="important"> The twenty-five <code>action</code> and <code>destructive</code> tools act on the app. Your client can ask you before it runs them. @@ -959,23 +959,24 @@ These tools read the HttpClient calls that `withPangular()` recorded and the SSR These tools read and change the rules of [Fault injection](../inspectors/ssr-http.md#fault-injection), the same rules the panel shows. Rules live on the devtools server and apply to every connected tab, so the tools take no `page`. Reads: page. -| Tool | What it does | Arguments | -| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | -| `list-http-rules` | Lists the rules in match order: id, on or off, method, URL pattern, where it applies (client, SSR or both) and its effect (status, delay, mock body). | none | -| `set-http-rule` | Adds a rule, or replaces the rule with `id`, and returns the saved rules. | `pattern` (required), `id`, `method`, `target`, `status`, `delayMs`, `body`, `chance`, `enabled` | -| `remove-http-rule` | Removes the rule with `id` and returns the rules left. | `id` (required) | +| Tool | What it does | Arguments | +| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| `list-http-rules` | Lists the rules in match order: id, on or off, method, URL pattern, where it applies (client, SSR or both) and its effect (status, delay, mock body). | none | +| `set-http-rule` | Adds a rule, or replaces the rule with `id`, and returns the saved rules. With `preset`, adds the rules of a built-in preset instead. | `pattern` (required without `preset`), `id`, `method`, `target`, `status`, `delayMs`, `body`, `chance`, `enabled`, `preset` | +| `remove-http-rule` | Removes the rule with `id` and returns the rules left. | `id` (required) | -`set-http-rule` checks its input the way the panel's form does. `pattern` is a substring or a glob where `*` matches anything, up to 500 characters. A leading `^` anchors it at the start of the URL path. `target` is `client`, `server` or `both` (the default). `status` is one of the statuses the panel lists, or `0` to fail the request as a network error. `delayMs` runs from 0 to 10000. `chance` is a whole percent from 1 to 99: the rule then applies to that share of matching requests, rolled per request, and the others go on to the next rule. `body` is JSON text or a JSON value, up to 100,000 characters. A rule needs a `status`, a `delayMs` or a `body`, and there can be at most 50 rules. A rule that breaks one of these is refused with the reason, and nothing changes. A rule that applies to SSR takes effect on the next page load. Patterns and bodies in the answers are masked like recorded calls. The panel's presets are plain rules, so an agent sets the same ones: Offline is `pattern: "*", target: "client", status: 0`, Slow 3G is `delayMs: 2000` and Flaky is `status: 503, chance: 30`. +`set-http-rule` checks its input the way the panel's form does. `pattern` is a substring or a glob where `*` matches anything, up to 500 characters. A leading `^` anchors it at the start of the URL path. `target` is `client`, `server` or `both` (the default). `status` is one of the statuses the panel lists, or `0` to fail the request as a network error. `delayMs` runs from 0 to 10000. `chance` is a whole percent from 1 to 99: the rule then applies to that share of matching requests, rolled per request, and the others go on to the next rule. `body` is JSON text or a JSON value, up to 100,000 characters. A rule needs a `status`, a `delayMs` or a `body`, and there can be at most 50 rules. A rule that breaks one of these is refused with the reason, and nothing changes. A rule that applies to SSR takes effect on the next page load. Patterns and bodies in the answers are masked like recorded calls. `preset` adds the rules of one of the panel's presets after the existing ones, as plain rules that show, change and go away like any other: `offline` is `pattern: "*", target: "client", status: 0`, `slow-3g` is the same with `delayMs: 2000` and `flaky` with `status: 503, chance: 30`. Pass `preset` alone. With any other rule argument it is refused, and so is a preset that would go past 50 rules. With [`actions.http`](../getting-started/configuration.md#actions) set to `false`, `set-http-rule` and `remove-http-rule` are dropped, and `list-http-rules` says that no rule applies. ### TransferState and SSR overrides <ngmd-badge variant="action">Action</ngmd-badge> -These tools read the [TransferState payload](../inspectors/ssr-http.md#transferstate-payload) a page was served with, and read and change the [SSR overrides](../inspectors/ssr-http.md#ssr-overrides), the same overrides the panel shows. Overrides live on the devtools server and apply to every page load that matches, so the override tools take no `page`. Reads: page. +These tools read and refetch the [TransferState payload](../inspectors/ssr-http.md#transferstate-payload) a page was served with, and read and change the [SSR overrides](../inspectors/ssr-http.md#ssr-overrides), the same overrides the panel shows. Overrides live on the devtools server and apply to every page load that matches, so the override tools take no `page`. Reads: page. | Tool | What it does | Arguments | | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | | `inspect-transfer-state` | Lists the TransferState keys of a page with their kind (HTTP transfer cache, app state, hydration data, Analog) and size, or shows one key's value. | `page`, `key`, `search`, `limit` | +| `refetch-transfer-state` | Renders the page's URL again on the server, with the tab's cookies, and replaces the payload the panel and `inspect-transfer-state` show. | `page` | | `list-ssr-overrides` | Lists the overrides: id, on or off, kind, page pattern and effect. | none | | `set-ssr-override` | Adds an override, or replaces the one with `id`, and returns the saved overrides. | `kind` (required), `pattern` (required), `id`, `message`, `key`, `value`, `enabled` | | `remove-ssr-override` | Removes the override with `id` and returns the overrides left. | `id` (required) | @@ -992,7 +993,9 @@ These tools read the [TransferState payload](../inspectors/ssr-http.md#transfers `inspect-transfer-state` reads the default page among those that reported a payload unless `page` names another. `search` keeps keys and cached URLs that contain the text, and `limit` defaults to 50 (at most 500). The values are the masked and clipped copy the panel shows, so read them to find a key, and type the full value for `state-edit`. An HttpClient entry holds `b` (body), `s` (status), `st` (status text), `u` (URL) and `rt` (response type). Above the key list, it warns when the payload is over 100 KB, with its three largest entries, and names any URL the transfer cache stored under more than one key. -With [`actions.http`](../getting-started/configuration.md#actions) set to `false`, `set-ssr-override` and `remove-ssr-override` are dropped, and `list-ssr-overrides` says that no override applies. +`refetch-transfer-state` asks the tab to fetch its own URL with its cookies and `cache: "no-store"`, and reads the payload out of the HTML the server sends. The HTML is parsed into a detached document, so its scripts don't run and the tab does not reload. The refetched payload is masked like the first one, and the panel marks it **Refetched** until the tab reloads. It answers with the entry count and the key list, or refuses when no page reports HTTP data, the server sends no HTML or the tab doesn't answer within 15 seconds. On a platform without `fetch` or an HTML parser, such as a native app, it refuses. + +With [`actions.http`](../getting-started/configuration.md#actions) set to `false`, `set-ssr-override`, `remove-ssr-override` and `refetch-transfer-state` are dropped, and `list-ssr-overrides` says that no override applies. ### Clear recordings <ngmd-badge variant="destructive">Destructive</ngmd-badge> diff --git a/apps/docs/src/content/getting-started/configuration.md b/apps/docs/src/content/getting-started/configuration.md index 82d51a62..90800e78 100644 --- a/apps/docs/src/content/getting-started/configuration.md +++ b/apps/docs/src/content/getting-started/configuration.md @@ -143,12 +143,12 @@ interface PangularConfig { ### Inspectors and agent tools -| Option | Default | What it does | -| -------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `inspectors.<name>` | `true` | `false` removes the inspector: no tab or dock, no page collector, no RPC functions, and no agent tools or resources. Its actions are blocked too. | -| `agent.readOnly` | `false` | `true` keeps only the agent tools in the `read` [safety tier](../agents/tools.md#action-tools). It drops every `action` and `destructive` tool in the [tier table](../agents/tools.md#action-tools): `run-form-action`, `fill-form`, `navigate`, `ngrx-dispatch`, `ngrx-restore`, `ngrx-store-devtools`, `tanstack-run-query`, `set-http-rule`, `remove-http-rule`, `set-ssr-override`, `remove-ssr-override`, `set-component-property`, `set-signal`, `load-defer-block`, `watch-signal`, `record-pipes`, `track-subscriptions`, `record-change-detection`, `probe-route`, `record-guards`, `analog-run-api`, `analog-run-nitro-task`, `analog-purge-nitro-cache` and `clear-recordings`. `audit` stays without its `axe` argument. | -| `agent.tools.<name>` | `true` | `false` hides one inspector's agent tools and resources, and its [shared-state keys](../agents/resources.md#shared-state) over HTTP MCP. The tab stays. | -| `agent.browserTools` | `false` | `true` registers the `read` agent tools on the page for [browser agents](../agents/browser-agents.md) (WebMCP and Chrome DevTools for agents). Off by default, because any script on the development page could then call them. This is where the **Browser agent tools** switch in [Settings](./settings.md#browser-agents) starts. The switch changes it for every page until the dev server restarts. | +| Option | Default | What it does | +| -------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `inspectors.<name>` | `true` | `false` removes the inspector: no tab or dock, no page collector, no RPC functions, and no agent tools or resources. Its actions are blocked too. | +| `agent.readOnly` | `false` | `true` keeps only the agent tools in the `read` [safety tier](../agents/tools.md#action-tools). It drops every `action` and `destructive` tool in the [tier table](../agents/tools.md#action-tools): `run-form-action`, `fill-form`, `navigate`, `ngrx-dispatch`, `ngrx-restore`, `ngrx-store-devtools`, `tanstack-run-query`, `set-http-rule`, `remove-http-rule`, `set-ssr-override`, `remove-ssr-override`, `refetch-transfer-state`, `set-component-property`, `set-signal`, `load-defer-block`, `watch-signal`, `record-pipes`, `track-subscriptions`, `record-change-detection`, `probe-route`, `record-guards`, `analog-run-api`, `analog-run-nitro-task`, `analog-purge-nitro-cache` and `clear-recordings`. `audit` stays without its `axe` argument. | +| `agent.tools.<name>` | `true` | `false` hides one inspector's agent tools and resources, and its [shared-state keys](../agents/resources.md#shared-state) over HTTP MCP. The tab stays. | +| `agent.browserTools` | `false` | `true` registers the `read` agent tools on the page for [browser agents](../agents/browser-agents.md) (WebMCP and Chrome DevTools for agents). Off by default, because any script on the development page could then call them. This is where the **Browser agent tools** switch in [Settings](./settings.md#browser-agents) starts. The switch changes it for every page until the dev server restarts. | `agent.tools` has the same keys as `inspectors`. An inspector that is off has no agent tools, whatever `agent.tools` says. @@ -158,17 +158,17 @@ If you open a tab that is turned off, the panel says so, shows the option that t Actions are the writes that the panel and agents make to your app or the server. -| Option | Default | What `false` blocks | -| ----------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `actions.forms` | `true` | Form writes: set value, fill, mark touched, untouched, dirty or pristine, touch all, revalidate, reset, enable, disable, submit and restore. Drops `run-form-action` and `fill-form`. | -| `actions.router` | `true` | Navigate, abort, replay and probe, and clearing the navigations list. Drops the `navigate` and `probe-route` agent tools and router clearing in `clear-recordings`. `record-guards` and `list-routes` with `resolveLazy` stay. | -| `actions.ngrx` | `true` | Restoring NgRx state from the change log, dispatching `@ngrx/store` actions and changing the Store DevTools history. Drops the `ngrx-dispatch`, `ngrx-restore` and `ngrx-store-devtools` agent tools. | -| `actions.http` | `true` | Editing fault injection rules and SSR overrides, and clearing the HTTP timeline. Drops the `set-http-rule`, `remove-http-rule`, `set-ssr-override` and `remove-ssr-override` agent tools and HTTP clearing in `clear-recordings`. | -| `actions.analog` | `true` | The Analog request playground, clearing server calls, running Nitro tasks and purging the Nitro cache. Drops the `analog-run-api`, `analog-run-nitro-task` and `analog-purge-nitro-cache` agent tools and Analog clearing in `clear-recordings`. | -| `actions.components` | `true` | Editing component inputs, properties and writable signals from the **Components** tab, and **Restore** in the **Signals** value history. Drops the `set-component-property`, `set-signal` and `load-defer-block` agent tools. | -| `actions.tanstackQuery` | `true` | Invalidating and refetching a query from the **Queries** tab. Drops the `tanstack-run-query` agent tool. | -| `actions.plugins` | `true` | Every plugin's page actions, from the **Plugins** tab and from its tools. Drops the plugin tools that are not `read`. | -| `actions` | `true` | All of the above. | +| Option | Default | What `false` blocks | +| ----------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `actions.forms` | `true` | Form writes: set value, fill, mark touched, untouched, dirty or pristine, touch all, revalidate, reset, enable, disable, submit and restore. Drops `run-form-action` and `fill-form`. | +| `actions.router` | `true` | Navigate, abort, replay and probe, and clearing the navigations list. Drops the `navigate` and `probe-route` agent tools and router clearing in `clear-recordings`. `record-guards` and `list-routes` with `resolveLazy` stay. | +| `actions.ngrx` | `true` | Restoring NgRx state from the change log, dispatching `@ngrx/store` actions and changing the Store DevTools history. Drops the `ngrx-dispatch`, `ngrx-restore` and `ngrx-store-devtools` agent tools. | +| `actions.http` | `true` | Editing fault injection rules and SSR overrides, refetching the TransferState payload, and clearing the HTTP timeline. Drops the `set-http-rule`, `remove-http-rule`, `set-ssr-override`, `remove-ssr-override` and `refetch-transfer-state` agent tools and HTTP clearing in `clear-recordings`. | +| `actions.analog` | `true` | The Analog request playground, clearing server calls, running Nitro tasks and purging the Nitro cache. Drops the `analog-run-api`, `analog-run-nitro-task` and `analog-purge-nitro-cache` agent tools and Analog clearing in `clear-recordings`. | +| `actions.components` | `true` | Editing component inputs, properties and writable signals from the **Components** tab, and **Restore** in the **Signals** value history. Drops the `set-component-property`, `set-signal` and `load-defer-block` agent tools. | +| `actions.tanstackQuery` | `true` | Invalidating and refetching a query from the **Queries** tab. Drops the `tanstack-run-query` agent tool. | +| `actions.plugins` | `true` | Every plugin's page actions, from the **Plugins** tab and from its tools. Drops the plugin tools that are not `read`. | +| `actions` | `true` | All of the above. | Pass `actions: false` to block every action, or an object to block some. Keys you leave out of the object stay on. diff --git a/apps/docs/src/content/inspectors/audit.md b/apps/docs/src/content/inspectors/audit.md index dfe26694..cc58a790 100644 --- a/apps/docs/src/content/inspectors/audit.md +++ b/apps/docs/src/content/inspectors/audit.md @@ -37,17 +37,17 @@ Errors come first, then warnings, then info. Within a severity, accessibility co The audit runs no check of its own. It reads what each inspector already collected and turns its results into findings. -| Area | Findings | Detail tool | -| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | -| Accessibility | Each axe rule the app breaks, per component, with the rule's impact as severity: critical and serious are errors, moderate a warning, minor info. | `audit` with `area` | -| Errors | Each error group, with its count and owning component. | `explain-error` | -| Hydration | Mismatches, server HTML that was not hydrated at all, and hosts that skip hydration. | `hydration` | -| Change detection | The hints of the [change detection diagnosis](./components.md#change-detection): OnPush candidates, inputs mutated in place, components that depend on zone.js. Also components whose slowest check took 16 ms or more. | `diagnose-change-detection` | -| Leaks | Components still retained after destroy, and subscriptions still open after their component went away. | `find-leaks` | -| Router | The findings of [Router Lint](./router.md), redirect loops included. | `lint-routes` | -| Forms | The findings of Forms Lint, and NG01xxx setup errors. | `lint-forms` | -| HTTP | Failed `HttpClient` calls by endpoint, calls a fault rule failed, and calls the browser fetched again because the transfer cache did not keep them. | `list-http-calls` | -| Pipes | The findings of the pipe lint, from the source scan. | `scan-pipe-usage` | +| Area | Findings | Detail tool | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | +| Accessibility | Each axe rule the app breaks, per component, with the rule's impact as severity: critical and serious are errors, moderate a warning, minor info. | `audit` with `area` | +| Errors | Each error group, with its count and owning component. | `explain-error` | +| Hydration | Mismatches, server HTML that was not hydrated at all, and hosts that skip hydration. | `hydration` | +| Change detection | The hints of the [change detection diagnosis](./components.md#change-detection): OnPush candidates, inputs mutated in place, components that depend on zone.js. Also components whose slowest check took 16 ms or more. | `diagnose-change-detection` | +| Leaks | Components still retained after destroy, and subscriptions still open after their component went away. | `find-leaks` | +| Router | The findings of [Router Lint](./router.md), redirect loops included. | `lint-routes` | +| Forms | The findings of Forms Lint, and NG01xxx setup errors. | `lint-forms` | +| HTTP | Failed `HttpClient` calls by endpoint, calls a fault rule failed, and calls the browser fetched again because the transfer cache did not keep them. Also the [HTTP lint](./ssr-http.md#http-lint) findings: duplicate requests, request waterfalls and server calls the browser made again. | `list-http-calls`, `lint-http` | +| Pipes | The findings of the pipe lint, from the source scan. | `scan-pipe-usage` | ### Key numbers diff --git a/apps/docs/src/content/inspectors/ssr-http.md b/apps/docs/src/content/inspectors/ssr-http.md index 6a96573f..7cfb3d7b 100644 --- a/apps/docs/src/content/inspectors/ssr-http.md +++ b/apps/docs/src/content/inspectors/ssr-http.md @@ -167,7 +167,7 @@ Checks the selected page's client calls for requests that cost time. Transfer ca | **Waterfall** | 3 or more calls ran one after another: each started within 50 ms after the previous one ended. | | **Repeated server call** | A call the server made while rendering the page ran again in the browser, so the transfer cache missed it. | -Each finding says what happened, how many milliseconds it costs where that can be told, and what to try, such as sharing one request or starting the calls together with `forkJoin`. A waterfall can be on purpose, when a call needs the response before it. **Show first call** opens the first call of the finding in the timeline preview. The `lint-http` agent tool runs the same checks. +Each finding says what happened, how many milliseconds it costs where that can be told, and what to try, such as sharing one request or starting the calls together with `forkJoin`. A waterfall can be on purpose, when a call needs the response before it. **Show first call** opens the first call of the finding in the timeline preview. The `lint-http` agent tool runs the same checks, and the [Audit](./audit.md) and the `snapshot` agent tool include their findings. ### Fault injection @@ -230,7 +230,7 @@ Each entry in the page's `{APP_ID}-state` script, with its size. Above the entri - **Largest entries**: the five biggest entries, by request URL or key, each with its size, its share of the payload and a bar of that share. - **Same URL stored more than once**: HttpClient entries that cached one URL under several keys, because their headers, params or body differ, with the key count and total size. Check whether one request could serve them all. -These views only read what the page reported. Nothing is fetched again. The tab decodes HttpClient and Analog cache entries to status, URL and body. It labels `__nghData__` and `__nghDeferData__` as hydration annotations, and Analog server function results seeded during server rendering by function name. +These views read what the page reported. **Refetch** renders the page's URL again on the server, with the tab's cookies, and shows the payload the server sends now, without reloading the tab. It needs the `actions.http` write action. The refetched payload is marked **Refetched** until the tab reloads, and hydration stats keep reading the payload the tab was served with. The tab decodes HttpClient and Analog cache entries to status, URL and body. It labels `__nghData__` and `__nghDeferData__` as hydration annotations, and Analog server function results seeded during server rendering by function name. Open an entry to see its cache key, even when the row shows the request URL. **Copy** puts the key on the clipboard. If the `actions.http` write action is on, **Edit in SSR overrides** opens the [SSR overrides](#ssr-overrides) form for that key. The button is hidden for keys longer than 200 characters, the most an override keeps, and for keys with spaces at either end, which an override would trim. @@ -326,21 +326,22 @@ The interceptor works in development builds only. In production it passes reques ## Agent tools -| Tool | What it answers | Arguments | -| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `pangular:list-ssr-requests` | Recent traced SSR requests: id, URL, status, render mode, render time, server calls, and whether a connected page loaded the response. | `limit` | -| `pangular:explain-ssr-request` | One request end to end: timings, kept response headers, the router's guard and resolver times, each server call with its transfer cache outcome, then the browser page with its hydration result and the calls the browser made again. | `id`, `url` | -| `pangular:list-http-calls` | The app's HttpClient calls, newest first: side (SSR or client), method, URL, status, duration, and flags for mocked, faulted, cancelled, redirected, transfer cache hit, the matched rule and the likely [call origin](#call-origin). With `view: "waterfall"`, one tab's client calls as a waterfall, grouped by navigation. | `page`, `url`, `failed`, `limit`, `preview`, `headers`, `view` | -| `pangular:lint-http` | The [HTTP lint](#http-lint) of one tab: duplicate GETs, waterfalls and server calls the browser made again, with call ids and a fix. | `page` | -| `pangular:list-http-rules` | The [fault rules](#fault-injection) in match order: id, on or off, method, URL pattern, where it applies and its effect. | none | -| `pangular:set-http-rule` | Adds a fault rule, or replaces the rule with `id`. Checks the input like the form does. | `pattern`, `id`, `method`, `target`, `status`, `delayMs`, `body`, `chance`, `enabled` | -| `pangular:remove-http-rule` | Removes the fault rule with `id`. | `id` | -| `pangular:inspect-transfer-state` | The [TransferState payload](#transferstate-payload) of a page: each key with its kind and size, or one key's value. | `page`, `key`, `search`, `limit` | -| `pangular:list-ssr-overrides` | The [SSR overrides](#ssr-overrides): id, on or off, kind, page pattern and effect. | none | -| `pangular:set-ssr-override` | Adds an override, or replaces the one with `id`. Checks the input like the form does. | `kind`, `pattern`, `id`, `message`, `key`, `value`, `enabled` | -| `pangular:remove-ssr-override` | Removes the override with `id`. | `id` | - -`set-http-rule` and `remove-http-rule` change the same rules as this tab, so the rule list in this tab updates as an agent edits it. `set-ssr-override` and `remove-ssr-override` do the same for the SSR overrides. All four need `actions.http`. See [Fault rules](../agents/tools.md#fault-rules) and [TransferState and SSR overrides](../agents/tools.md#transferstate-and-ssr-overrides). +| Tool | What it answers | Arguments | +| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `pangular:list-ssr-requests` | Recent traced SSR requests: id, URL, status, render mode, render time, server calls, and whether a connected page loaded the response. | `limit` | +| `pangular:explain-ssr-request` | One request end to end: timings, kept response headers, the router's guard and resolver times, each server call with its transfer cache outcome, then the browser page with its hydration result and the calls the browser made again. | `id`, `url` | +| `pangular:list-http-calls` | The app's HttpClient calls, newest first: side (SSR or client), method, URL, status, duration, and flags for mocked, faulted, cancelled, redirected, transfer cache hit, the matched rule and the likely [call origin](#call-origin). With `view: "waterfall"`, one tab's client calls as a waterfall, grouped by navigation. | `page`, `url`, `failed`, `limit`, `preview`, `headers`, `view` | +| `pangular:lint-http` | The [HTTP lint](#http-lint) of one tab: duplicate GETs, waterfalls and server calls the browser made again, with call ids and a fix. | `page` | +| `pangular:list-http-rules` | The [fault rules](#fault-injection) in match order: id, on or off, method, URL pattern, where it applies and its effect. | none | +| `pangular:set-http-rule` | Adds a fault rule, or replaces the rule with `id`. Checks the input like the form does. `preset` adds the Offline, Slow 3G or Flaky rules instead. | `pattern`, `id`, `method`, `target`, `status`, `delayMs`, `body`, `chance`, `enabled`, `preset` | +| `pangular:remove-http-rule` | Removes the fault rule with `id`. | `id` | +| `pangular:inspect-transfer-state` | The [TransferState payload](#transferstate-payload) of a page: each key with its kind and size, or one key's value. | `page`, `key`, `search`, `limit` | +| `pangular:refetch-transfer-state` | Does what **Refetch** does: renders the page's URL again on the server and replaces the payload this tab shows. | `page` | +| `pangular:list-ssr-overrides` | The [SSR overrides](#ssr-overrides): id, on or off, kind, page pattern and effect. | none | +| `pangular:set-ssr-override` | Adds an override, or replaces the one with `id`. Checks the input like the form does. | `kind`, `pattern`, `id`, `message`, `key`, `value`, `enabled` | +| `pangular:remove-ssr-override` | Removes the override with `id`. | `id` | + +`set-http-rule` and `remove-http-rule` change the same rules as this tab, so the rule list in this tab updates as an agent edits it. `set-ssr-override` and `remove-ssr-override` do the same for the SSR overrides. These four and `refetch-transfer-state` need `actions.http`. See [Fault rules](../agents/tools.md#fault-rules) and [TransferState and SSR overrides](../agents/tools.md#transferstate-and-ssr-overrides). For the rest of this tab, agents read the `pangular:http` key with the `devframe_state_read` tool. See [Resources](../agents/resources.md). diff --git a/packages/devtools/CHANGELOG.md b/packages/devtools/CHANGELOG.md index 3d7bd861..42511773 100644 --- a/packages/devtools/CHANGELOG.md +++ b/packages/devtools/CHANGELOG.md @@ -199,6 +199,9 @@ What remains: `/config` exports `DEFAULT_POPUP_HOTKEY`, `PANGULAR_ACTIONS`, `PAN - **Copy as fetch and Copy as cURL.** The response preview copies the open call as a `fetch()` statement or a `curl` command, built from the masked copy, so values that match the redaction rules stay `[redacted]`. Check a snippet for other secrets, such as a token in a custom header, before you share it. Nothing is sent. - **TransferState payload checks.** The payload section shows the size against a 100 KB budget, the largest entries with size bars, and URLs the transfer cache stored under more than one key. `inspect-transfer-state` adds the same warnings to its key list. - **HTTP lint and the `lint-http` agent tool.** A new HTTP lint section flags the same GET fired again within 2000 ms, chains of 3 or more calls that ran one after another and could start together, and server calls the browser made again. `lint-http` returns the same findings with call ids. +- **Refetch the TransferState payload.** **Refetch** in the payload section, and the `refetch-transfer-state` agent tool, render the page's URL again on the server with the tab's cookies and show the payload it sends now, without reloading the tab. The payload is masked like the first one and marked **Refetched**. Both need `actions.http` (#369). +- **`set-http-rule` takes `preset`.** `offline`, `slow-3g` or `flaky` adds the same plain rules as the panel's preset buttons (#369). +- **HTTP lint in the audit and in `snapshot`.** The audit lists duplicate requests, request waterfalls and server calls the browser made again as HTTP findings, and the `snapshot` HTTP section ends with a line that counts the `lint-http` findings (#369). - **A Server-Timing entry per server HttpClient call.** Traced renders add `fetch-1;desc="GET /api/products";dur=12` and so on, for the first 20 calls, so Chrome's Timing tab shows each call. The description is the method and the masked path, without the query. - **Calls labeled by the API that likely started them.** The interceptor reads the call stack and tags a call **likely httpResource()**, **likely resource()** or **likely @defer** in the timeline, in `list-http-calls` and in the HAR export. It is a guess from Angular's frame names in development builds. diff --git a/packages/devtools/src/__tests__/action-tool-refusals.test.ts b/packages/devtools/src/__tests__/action-tool-refusals.test.ts index a199f12d..81ff72f4 100644 --- a/packages/devtools/src/__tests__/action-tool-refusals.test.ts +++ b/packages/devtools/src/__tests__/action-tool-refusals.test.ts @@ -84,6 +84,7 @@ const NOTHING_DONE: Record<string, Record<string, unknown>[]> = { 'remove-http-rule': [{ id: 'nope' }], 'set-ssr-override': [{ kind: 'nope', pattern: '/x' }], 'remove-ssr-override': [{ id: 'nope' }], + 'refetch-transfer-state': [{}, { page: 'gone' }], 'analog-run-api': [{ path: '/api/x', method: 'POST' }], 'analog-run-nitro-task': [{ name: 'db:migrate' }, { name: 'missing', confirm: true }], 'analog-purge-nitro-cache': [{}, { confirm: true }, { confirm: true, files: ['/package.json'] }], diff --git a/packages/devtools/src/__tests__/audit-findings.test.ts b/packages/devtools/src/__tests__/audit-findings.test.ts index 902ce3bb..bdd74e27 100644 --- a/packages/devtools/src/__tests__/audit-findings.test.ts +++ b/packages/devtools/src/__tests__/audit-findings.test.ts @@ -228,6 +228,52 @@ const axe = (): AxeReport => ({ const keys = (findings: AuditFinding[]) => findings.map((finding) => finding.key); describe('buildAudit', () => { + it('adds the HTTP lint findings, without a second fetched-twice for the same call', () => { + const state = http(); + state.pages[0]!.calls = [ + call({ id: 'd1', url: '/api/flights', at: NOW }), + call({ id: 'd2', url: '/api/flights', at: NOW + 100 }), + call({ id: 'w1', url: '/api/a', at: NOW + 5_000, durationMs: 10 }), + call({ id: 'w2', url: '/api/b', at: NOW + 5_020, durationMs: 10 }), + call({ id: 'w3', url: '/api/c', at: NOW + 5_040, durationMs: 10 }), + call({ id: 'c1', url: '/api/cities', at: NOW + 9_000 }), + ] as never; + (state.pages[0] as { ssrRequestId?: string }).ssrRequestId = 'r1'; + state.serverCalls = [ + call({ side: 'server', url: '/api/cities', cacheSkip: 'post', requestId: 'r1' }), + ] as never; + const report = buildAudit({ http: state }, 'tab1', {}, NOW); + const found = report.findings.filter((finding) => finding.area === 'http'); + expect(keys(found).sort()).toEqual([ + 'http:duplicate-request:GET /api/flights', + 'http:fetched-twice:GET /api/cities', + 'http:request-waterfall:3 calls from GET /api/a', + ]); + expect(found.find((f) => f.rule === 'duplicate-request')).toMatchObject({ + severity: 'warning', + tool: 'pangular:lint-http', + args: { page: 'tab1' }, + }); + // The transfer cache check found it first, so it keeps its own tool. + expect(found.find((f) => f.rule === 'fetched-twice')).toMatchObject({ + tool: 'pangular:explain-ssr-request', + }); + }); + + it('reports a server call made again from the lint when the cache check has no reason', () => { + const state = http(); + state.pages[0]!.calls = [call({ id: 'c1', url: '/api/cities', at: NOW })] as never; + (state.pages[0] as { ssrRequestId?: string }).ssrRequestId = 'r1'; + state.serverCalls = [call({ side: 'server', url: '/api/cities', requestId: 'r1' })] as never; + const report = buildAudit({ http: state }, 'tab1', {}, NOW); + expect(report.findings).toEqual([ + expect.objectContaining({ + key: 'http:fetched-twice:GET /api/cities', + tool: 'pangular:lint-http', + }), + ]); + }); + it('gathers every area into one list ranked by severity, area and count', () => { const report = buildAudit( { diff --git a/packages/devtools/src/__tests__/config.test.ts b/packages/devtools/src/__tests__/config.test.ts index f6f98d85..13238881 100644 --- a/packages/devtools/src/__tests__/config.test.ts +++ b/packages/devtools/src/__tests__/config.test.ts @@ -322,6 +322,7 @@ describe('agent tool and RPC registration', () => { 'record-pipes', 'remove-http-rule', 'remove-ssr-override', + 'refetch-transfer-state', 'ngrx-restore', 'load-defer-block', 'ngrx-store-devtools', @@ -452,6 +453,7 @@ describe('agent tool and RPC registration', () => { 'record-pipes', 'remove-http-rule', 'remove-ssr-override', + 'refetch-transfer-state', 'ngrx-restore', 'load-defer-block', 'ngrx-store-devtools', diff --git a/packages/devtools/src/__tests__/fixtures/agent-metadata-derived.json b/packages/devtools/src/__tests__/fixtures/agent-metadata-derived.json index da6edb55..d3f4a506 100644 --- a/packages/devtools/src/__tests__/fixtures/agent-metadata-derived.json +++ b/packages/devtools/src/__tests__/fixtures/agent-metadata-derived.json @@ -35,6 +35,7 @@ "inspect-route": "router", "inspect-signals": "signals", "inspect-transfer-state": "http", + "refetch-transfer-state": "http", "lint-forms": "forms", "lint-http": "http", "lint-routes": "router", @@ -104,6 +105,7 @@ "ngrx": ["ngrx-dispatch", "ngrx-restore", "ngrx-store-devtools"], "http": [ "clear-recordings", + "refetch-transfer-state", "remove-http-rule", "remove-ssr-override", "set-http-rule", @@ -137,6 +139,7 @@ "record-guards": "action", "record-pipes": "action", "remove-http-rule": "action", + "refetch-transfer-state": "action", "remove-ssr-override": "action", "run-form-action": "action", "set-component-property": "action", @@ -222,6 +225,7 @@ "record-guards", "record-pipes", "redux-inspect-stores", + "refetch-transfer-state", "remove-http-rule", "remove-ssr-override", "router", @@ -297,6 +301,7 @@ "inspect-route": ["router"], "inspect-signals": ["signals"], "inspect-transfer-state": ["http"], + "refetch-transfer-state": ["http"], "lint-forms": ["forms"], "lint-http": ["http"], "lint-routes": ["router"], diff --git a/packages/devtools/src/__tests__/http-payload-refetch.test.ts b/packages/devtools/src/__tests__/http-payload-refetch.test.ts new file mode 100644 index 00000000..3be7b979 --- /dev/null +++ b/packages/devtools/src/__tests__/http-payload-refetch.test.ts @@ -0,0 +1,214 @@ +// @vitest-environment jsdom +import { createHostContext } from 'devframe/node'; +import { afterEach, describe, expect, it, vi } from 'vitest'; +import type { PangularConfig } from '../config.ts'; +import { createPangular } from '../devframe.ts'; +import { attachHttp } from '../http-overlay.ts'; +import { refetchPayload } from '../http-payload-refetch.ts'; +import { httpRegistry } from '../http-rules.ts'; +import type { HttpPayloadState } from '../types.ts'; +import { toolAnswer } from './tool-answer.ts'; + +const JWT = 'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjMifQ.c2lnbmF0dXJlLXRlc3Q'; + +const html = (state: Record<string, unknown>) => + `<!doctype html><html><body><app-root></app-root><script id="ng-state" type="application/json">${JSON.stringify(state)}</script><script>window.ran = true</script></body></html>`; + +const answer = (body: string, type = 'text/html; charset=utf-8', status = 200) => + vi.fn(async () => new Response(body, { status, headers: { 'content-type': type } })); + +describe('refetchPayload', () => { + it('reads the TransferState of the HTML the server sends now, with the tab cookies', async () => { + const fetchFn = answer(html({ trips: { count: 3 } })); + const result = await refetchPayload('http://localhost/trips', { + fetch: fetchFn as unknown as typeof fetch, + }); + expect(fetchFn).toHaveBeenCalledWith( + 'http://localhost/trips', + expect.objectContaining({ credentials: 'same-origin', cache: 'no-store' }), + ); + expect(result).toMatchObject({ + status: 200, + payload: { found: true, entries: [expect.objectContaining({ key: 'trips' })] }, + }); + // The HTML is parsed into a detached document: its scripts never run. + expect((window as { ran?: boolean }).ran).toBeUndefined(); + }); + + it('says why there is no payload instead of guessing', async () => { + const json = answer('{"a":1}', 'application/json', 404); + expect(await refetchPayload('/x', { fetch: json as unknown as typeof fetch })).toEqual({ + error: 'The server answered 404 with `application/json`, not HTML.', + }); + const failing = vi.fn(async () => { + throw new TypeError('offline'); + }); + expect(await refetchPayload('/x', { fetch: failing as unknown as typeof fetch })).toEqual({ + error: 'The request failed: offline.', + }); + const noParser = answer(html({})); + expect( + await refetchPayload('/x', { fetch: noParser as unknown as typeof fetch, parse: () => null }), + ).toEqual({ error: 'This platform cannot parse HTML, so the payload cannot be read.' }); + }); +}); + +describe('the page side of a refetch', () => { + afterEach(() => { + document.body.innerHTML = ''; + httpRegistry().calls = []; + }); + + it('pushes the refetched payload masked, answers with counts, and ignores other pages', async () => { + document.body.innerHTML = `<script id="ng-state" type="application/json">${JSON.stringify({ old: 1 })}</script>`; + const calls: [string, unknown][] = []; + const handlers = new Map<string, (message: unknown) => unknown>(); + const my = { + rpc: { + call: async (name: string, arg?: unknown) => { + calls.push([name, arg]); + if (name === 'get-http-rules') return []; + return name === 'push-http' ? { needPayload: false } : { known: true }; + }, + register: (definition: { name: string; handler: (message: unknown) => unknown }) => + handlers.set(definition.name, definition.handler), + }, + }; + const fetchFn = answer(html({ fresh: { password: 'PW-SECRET-9', note: JWT, city: 'Kyoto' } })); + const http = attachHttp(my, 'p1', () => 0, { fetch: fetchFn as unknown as typeof fetch }); + try { + await http.push(); + const refetch = handlers.get('http-payload-refetch')!; + refetch({ requestId: 'x1', pageId: 'other' }); + expect(fetchFn).not.toHaveBeenCalled(); + + refetch({ requestId: 'p1-r', pageId: 'p1' }); + await vi.waitFor(() => + expect(calls.some(([name]) => name === 'http-payload-refetch-result')).toBe(true), + ); + const pushes = calls.filter(([name]) => name === 'push-http').map(([, arg]) => arg); + const last = JSON.stringify(pushes.at(-1)); + expect(last).toContain('"fresh"'); + expect(last).toContain('Kyoto'); + expect(last).not.toContain('"old"'); + expect(last).not.toContain('PW-SECRET-9'); + expect(last).not.toContain(JWT); + const [, result] = calls.find(([name]) => name === 'http-payload-refetch-result')!; + expect(result).toEqual({ + requestId: 'p1-r', + pageId: 'p1', + result: { ok: true, status: 200, found: true, entries: 1, size: expect.any(Number) }, + }); + } finally { + http.stop(); + } + }); +}); + +async function boot(config: PangularConfig = {}) { + const host = { + mountStatic: () => {}, + resolveOrigin: () => 'http://localhost', + getStorageDir: () => '', + }; + const ctx = await createHostContext({ cwd: process.cwd(), mode: 'dev', host: host as never }); + await createPangular(config).setup(ctx as never); + const push = (name: string, payload: unknown) => + ctx.rpc.invokeLocal(`pangular:${name}` as never, ...([payload] as never)) as Promise<unknown>; + const payloads = async () => + ( + await ( + ctx.rpc as unknown as { + sharedState: { get: (key: string) => Promise<{ value: () => unknown }> }; + } + ).sharedState.get('pangular:http-payloads') + ).value() as HttpPayloadState; + return { ctx, push, payloads }; +} + +const report = (pageId: string, payload: unknown) => ({ + pageId, + url: `/${pageId}`, + initialUrl: `/${pageId}`, + title: pageId, + hydration: { enabled: true, warnings: [], skipHydrationHosts: [] }, + calls: [], + payload, +}); + +describe('refetch on the server', () => { + it('asks the page, stores the new payload with refetchedAt and answers the agent', async () => { + const { ctx, push, payloads } = await boot(); + await push('push-http', report('tab1', { found: true, size: 2, entries: [] })); + vi.spyOn(ctx.rpc, 'broadcast').mockImplementation((async (options: { + method: string; + args: [{ requestId: string; pageId: string }]; + }) => { + if (!options.method.endsWith('http-payload-refetch')) return; + const { requestId, pageId } = options.args[0]; + await push( + 'push-http', + report(pageId, { + found: true, + size: 20, + entries: [{ key: 'trips', size: 20, value: { count: 3 } }], + }), + ); + await push('http-payload-refetch-result', { + requestId, + pageId, + result: { ok: true, status: 200, found: true, entries: 1, size: 20 }, + }); + }) as never); + const result = await toolAnswer(ctx.agent.invoke('pangular:refetch-transfer-state', {})); + expect(result.isError).toBeFalsy(); + expect(result.markdown).toContain( + 'Refetched the TransferState of page `tab1`: the server answered 200 with 1 entry, 20 bytes.', + ); + expect(result.markdown).toContain('`trips`'); + expect((await payloads()).pages['tab1']).toMatchObject({ + size: 20, + refetchedAt: expect.any(Number), + }); + }); + + it('refuses when actions.http is off, from the panel RPC as well', async () => { + const { ctx, push } = await boot({ actions: { http: false } }); + await push('push-http', report('tab1', { found: true, size: 2, entries: [] })); + const broadcast = vi.spyOn(ctx.rpc, 'broadcast'); + expect(ctx.agent.getTool('pangular:refetch-transfer-state')).toBeFalsy(); + expect(await push('request-http-payload-refetch', { pageId: 'tab1' })).toEqual({ + error: + 'Changing HTTP mock rules and SSR overrides, refetching the TransferState payload, and clearing HTTP calls is turned off in the devtools config (actions.http).', + }); + expect(broadcast).not.toHaveBeenCalledWith( + expect.objectContaining({ method: 'pangular:http-payload-refetch' }), + ); + }); + + it('ignores an answer from a page the request did not go to', async () => { + const { ctx, push } = await boot(); + await push('push-http', report('tab1', { found: true, size: 2, entries: [] })); + vi.useFakeTimers({ toFake: ['setTimeout', 'clearTimeout'] }); + try { + vi.spyOn(ctx.rpc, 'broadcast').mockImplementation((async (options: { + method: string; + args: [{ requestId: string }]; + }) => { + if (!options.method.endsWith('http-payload-refetch')) return; + await push('http-payload-refetch-result', { + requestId: options.args[0].requestId, + pageId: 'tab2', + result: { ok: true, status: 200, found: true, entries: 0, size: 0 }, + }); + }) as never); + const pending = push('request-http-payload-refetch', { pageId: 'tab1' }); + await vi.advanceTimersByTimeAsync(15_000); + expect(await pending).toEqual({ + error: 'The page did not answer within 15s. Is the tab still open?', + }); + } finally { + vi.useRealTimers(); + } + }); +}); diff --git a/packages/devtools/src/__tests__/http-rule-tools.test.ts b/packages/devtools/src/__tests__/http-rule-tools.test.ts index 23cf7da2..5b829403 100644 --- a/packages/devtools/src/__tests__/http-rule-tools.test.ts +++ b/packages/devtools/src/__tests__/http-rule-tools.test.ts @@ -3,7 +3,12 @@ import { afterEach, describe, expect, it } from 'vitest'; import type { PangularConfig } from '../config.ts'; import { createPangular } from '../devframe.ts'; import { httpRegistry, MAX_RULES, type HttpRule } from '../http-rules.ts'; -import { httpRulesText, removeHttpRule, upsertHttpRule } from '../rpc/http-rule-tools.ts'; +import { + addHttpRulePreset, + httpRulesText, + removeHttpRule, + upsertHttpRule, +} from '../rpc/http-rule-tools.ts'; import type { HttpState } from '../types.ts'; import { answerText } from './tool-answer.ts'; @@ -137,6 +142,48 @@ describe('HTTP rule agent tools', () => { expect(httpRegistry().rules).toEqual([rule()]); }); + it('expands a preset into plain rules after the existing ones', async () => { + const { tool, state } = await boot(); + httpRegistry().rules = [rule()]; + const answer = await tool('set-http-rule', { preset: 'offline' }); + expect(answer).toMatch(/^Added the Offline preset: Fails every browser request/); + const rules = httpRegistry().rules ?? []; + expect(rules).toHaveLength(2); + expect(rules[0]!.id).toBe('r1'); + expect(rules[1]).toMatchObject({ pattern: '*', target: 'client', status: 0, enabled: true }); + expect(answer).toContain(`\`${rules[1]!.id}\``); + expect((await state()).rules).toEqual(rules); + + await tool('set-http-rule', { preset: 'slow-3g' }); + await tool('set-http-rule', { preset: 'flaky' }); + expect((httpRegistry().rules ?? []).slice(2)).toEqual([ + expect.objectContaining({ pattern: '*', target: 'client', delayMs: 2000 }), + expect.objectContaining({ pattern: '*', target: 'client', status: 503, chance: 30 }), + ]); + }); + + it('refuses a preset mixed with rule arguments, an unknown one, or one past the limit', async () => { + const { tool } = await boot(); + httpRegistry().rules = [rule()]; + expect(await tool('set-http-rule', { preset: 'offline', pattern: '/api' })).toMatch( + /`preset` adds its own rules, so pass it alone, without `pattern`/, + ); + expect(await tool('set-http-rule', { preset: 'offline', id: 'r1' })).toMatch(/without `id`/); + expect(await tool('set-http-rule', { preset: '4g' })).toMatch( + /`preset` must be one of `offline`, `slow-3g`, `flaky`/, + ); + expect(ids()).toEqual(['r1']); + const full = Array.from({ length: MAX_RULES }, (_, i) => rule({ id: `f${i}` })); + expect('error' in addHttpRulePreset(full, { preset: 'flaky' }, () => 'x')).toBe(true); + }); + + it('refuses a preset when HTTP actions are off', async () => { + const { tool } = await boot({ actions: { http: false } }); + // The write tool is dropped, so the call is an unknown tool or a refusal; nothing changes. + await tool('set-http-rule', { preset: 'offline' }).catch(() => ''); + expect(httpRegistry().rules ?? []).toEqual([]); + }); + it('keeps a JSON null mock body as the only effect of a rule', async () => { const { tool } = await boot(); expect(await tool('set-http-rule', { pattern: '/api/empty', body: null })).toMatch( diff --git a/packages/devtools/src/__tests__/snapshot-tool.test.ts b/packages/devtools/src/__tests__/snapshot-tool.test.ts index a787cb3f..813bcbaa 100644 --- a/packages/devtools/src/__tests__/snapshot-tool.test.ts +++ b/packages/devtools/src/__tests__/snapshot-tool.test.ts @@ -262,6 +262,28 @@ describe('snapshot agent tool', () => { expect(text).toContain('`q1`'); }); + it('adds a line with the HTTP lint findings to the HTTP section', async () => { + const { push, snapshot } = await boot(); + const at = Date.now() - 5_000; + await push('push-http', { + pageId: 'tab1', + url: 'http://localhost:4200/trips', + payload: { entries: [] }, + calls: [ + httpCall('h1', '/api/trips', { at, cacheHit: false, faulted: false }), + httpCall('h2', '/api/trips', { at: at + 100, cacheHit: false, faulted: false }), + ], + }); + const text = await snapshot({ sections: ['http'] }); + expect(text).toContain('HTTP lint: 1 duplicate request. `lint-http` lists the calls'); + }); + + it('leaves the HTTP lint line out when the lint finds nothing', async () => { + const { push, snapshot } = await boot(); + await pushAll(push); + expect(await snapshot({ sections: ['http'] })).not.toContain('HTTP lint:'); + }); + it('lists only the sections asked for, and refuses unknown ones', async () => { const { push, snapshot } = await boot(); await pushAll(push); diff --git a/packages/devtools/src/config.ts b/packages/devtools/src/config.ts index 95ad19b9..07724f72 100644 --- a/packages/devtools/src/config.ts +++ b/packages/devtools/src/config.ts @@ -1428,6 +1428,14 @@ export const AGENT_ENTRIES: Readonly<Record<string, AgentEntry>> = { page: true, }, 'inspect-transfer-state': { kind: 'tool', inspectors: ['http'], page: true }, + // Renders the page's URL again on the server, with the tab's cookies. + 'refetch-transfer-state': { + kind: 'tool', + inspectors: ['http'], + safety: 'action', + actions: ['http'], + page: true, + }, 'list-ssr-overrides': { kind: 'tool', inspectors: ['http'], page: true }, 'set-ssr-override': { kind: 'tool', @@ -1573,7 +1581,7 @@ export function actionBlockedMessage(action: PangularAction): string { forms: 'Writing to forms', router: 'Navigating and clearing navigations', ngrx: 'Restoring NgRx state, dispatching actions and changing the Store DevTools history', - http: 'Changing HTTP mock rules and SSR overrides, and clearing HTTP calls', + http: 'Changing HTTP mock rules and SSR overrides, refetching the TransferState payload, and clearing HTTP calls', analog: 'Calling API routes, clearing server calls, running Nitro tasks and purging the Nitro cache', components: 'Editing component properties and signals', @@ -1733,6 +1741,9 @@ export const RPC_INSPECTOR: Record<string, PangularInspector> = { 'set-http-rules': 'http', 'set-ssr-overrides': 'http', 'clear-http-calls': 'http', + // The panel's and agents' payload refetch, and the page's answer to it. + 'request-http-payload-refetch': 'http', + 'http-payload-refetch-result': 'http', 'push-capacitor': 'capacitor', 'forget-capacitor-page': 'capacitor', 'push-errors': 'errors', diff --git a/packages/devtools/src/devframe.ts b/packages/devtools/src/devframe.ts index a4e7f872..3251d7e4 100644 --- a/packages/devtools/src/devframe.ts +++ b/packages/devtools/src/devframe.ts @@ -205,14 +205,21 @@ import { redactCall } from './http-redact.ts'; import { redactMessage, redactUrl } from './router.ts'; import { isSsrRequestId, ssrRegistry } from './ssr-registry.ts'; import { sanitizeSsrOverrides, type SsrOverride } from './ssr-overrides.ts'; -import { ssrOverrideTools } from './rpc/ssr-override-tools.ts'; +import { + refetchAnswerText, + sanitizeRefetchResult, + ssrOverrideTools, +} from './rpc/ssr-override-tools.ts'; import { createComponentScreenshots } from './rpc/component-screenshots.ts'; import { explainSsrRequestText, listSsrRequestsText, sanitizeSsrRequest } from './rpc/ssr-tools.ts'; import { listHttpCallsText } from './rpc/http-tools.ts'; import { httpWaterfallText } from './rpc/http-waterfall.ts'; import { lintHttpText } from './rpc/http-lint.ts'; import { + addHttpRulePreset, + HTTP_RULE_PRESET_IDS, httpRulesText, + presetChangeText, removeHttpRule, ruleChangeText, upsertHttpRule, @@ -1499,6 +1506,88 @@ const pangular = defineDevframe({ return saveSsrOverrides(sanitizeSsrOverrides(input)); }, }); + // Refetch: the page renders its URL again on the server and pushes the payload it gets. + const pendingRefetches = new Map< + string, + { pageId: string; settle: (result: Record<string, unknown>) => void } + >(); + let refetchSeq = 0; + const refetchPayloadOf = (page: string | undefined) => + new Promise<Record<string, unknown>>((resolve) => { + if (!config.actions.http) return resolve({ error: actionBlockedMessage('http') }); + const target = page ? httpPages.get(page) : defaultPage(httpPages.values()); + if (!target) { + return resolve({ + error: page + ? `Page \`${page.slice(0, 50)}\` reports no HTTP data. pangular:list-pages lists the pages that are connected.` + : 'No page reports HTTP data. Open the app in a browser with `withPangular()` in its HttpClient setup.', + }); + } + const requestId = `p${++refetchSeq}`; + const timer = setTimeout(() => { + pendingRefetches.delete(requestId); + resolve({ error: 'The page did not answer within 15s. Is the tab still open?' }); + }, 15_000); + timer.unref?.(); + pendingRefetches.set(requestId, { + pageId: target.pageId, + settle: (result) => { + clearTimeout(timer); + pendingRefetches.delete(requestId); + resolve({ ...result, pageId: target.pageId }); + }, + }); + void my.rpc.broadcast({ + method: 'http-payload-refetch', + args: [{ requestId, pageId: target.pageId }], + optional: true, + }); + }); + + register({ + name: 'http-payload-refetch-result', + type: 'action', + jsonSerializable: true, + handler: (message: { requestId?: unknown; pageId?: unknown; result?: unknown }) => { + if (typeof message?.requestId !== 'string') return; + const pending = pendingRefetches.get(message.requestId); + if (!pending || !answersFor(pending.pageId, message.pageId)) return; + const result = sanitizeRefetchResult(message.result); + const stored = httpPayloads.get(pending.pageId); + if (result['ok'] && stored) { + const refetched = { ...stored, refetchedAt: Date.now() }; + httpPayloads.set(pending.pageId, refetched); + httpPayloadState.mutate((draft) => { + draft.pages[pending.pageId] = refetched; + }); + } + pending.settle(result); + }, + }); + + register({ + name: 'request-http-payload-refetch', + type: 'action', + jsonSerializable: true, + handler: (message: { pageId?: unknown } | undefined) => + refetchPayloadOf(typeof message?.pageId === 'string' ? message.pageId : undefined), + }); + + agent.registerTool({ + id: 'pangular:refetch-transfer-state', + title: 'Refetch TransferState', + description: + "Renders the page's URL again on the server, with the tab's cookies, and replaces the TransferState payload the panel and `inspect-transfer-state` show with the one the server sends now. The tab itself does not reload. Needs actions.http.", + inputSchema: { type: 'object', properties: { page: PAGE_ARGUMENT } }, + handler: async (args: Record<string, unknown>) => { + const result = await refetchPayloadOf(pageArgument(args)); + if (typeof result['error'] === 'string') return { markdown: refusal(result['error']) }; + return { + markdown: refetchAnswerText(result, httpPayloads, httpPages.values()), + }; + }, + }); + // The panel's TransferState payload and SSR overrides, for agents. for (const tool of ssrOverrideTools({ config, @@ -1792,6 +1881,12 @@ const pangular = defineDevframe({ }, body: { description: 'Mock response body: JSON text or a JSON value. Alone it answers 200.' }, enabled: { type: 'boolean', description: 'Default true.' }, + preset: { + type: 'string', + enum: [...HTTP_RULE_PRESET_IDS], + description: + 'Instead of the other arguments: add the plain rules of a built-in preset for every browser request. `offline` fails them with a network error, `slow-3g` holds them back 2000 ms, `flaky` fails 30% with 503.', + }, }; const newRuleId = () => `r${Date.now().toString(36)}${Math.random().toString(36).slice(2, 6)}`; const httpRuleChange = (change: RuleChange, verb: 'Added' | 'Updated' | 'Removed') => { @@ -1816,10 +1911,24 @@ const pangular = defineDevframe({ id: 'pangular:set-http-rule', title: 'Set an HTTP mock rule', description: - 'Add or replace (`id`) an HTTP fault or mock rule (dev only): `pattern` plus `status`, `delayMs` or `body`. Applies to every tab now and to SSR on the next load. Needs actions.http.', - inputSchema: { type: 'object', properties: ruleInput, required: ['pattern'] }, + 'Add or replace (`id`) an HTTP fault or mock rule (dev only): `pattern` plus `status`, `delayMs` or `body`, or `preset` alone to add the Offline, Slow 3G or Flaky rules. Applies to every tab now and to SSR on the next load. Needs actions.http.', + inputSchema: { type: 'object', properties: ruleInput }, handler: async (args: SetHttpRuleArgs) => { const rules = registry.rules ?? []; + if (args.pattern === undefined && args.preset === undefined) { + return { + markdown: refusal( + `Pass \`pattern\` with \`status\`, \`delayMs\` or \`body\`, or \`preset\` alone (${HTTP_RULE_PRESET_IDS.map((id) => `\`${id}\``).join(', ')}).`, + ), + }; + } + if (args.preset !== undefined) { + if (!config.actions.http) return { markdown: refusal(actionBlockedMessage('http')) }; + const change = addHttpRulePreset(rules, args, newRuleId); + if ('error' in change) return { markdown: refusal(change.error) }; + setHttpRules(change.rules); + return { markdown: presetChangeText(change) }; + } const verb = typeof args.id === 'string' && args.id ? 'Updated' : 'Added'; return httpRuleChange(upsertHttpRule(rules, args, newRuleId), verb); }, diff --git a/packages/devtools/src/http-overlay.ts b/packages/devtools/src/http-overlay.ts index e7c29872..4e30f5eb 100644 --- a/packages/devtools/src/http-overlay.ts +++ b/packages/devtools/src/http-overlay.ts @@ -2,6 +2,8 @@ import { keepaliveDue } from './change-detection.ts'; import { watchDeferHydration } from './defer-hydration-watch.ts'; import { appIdOf, scanHydration, type HydrationScanNg } from './http-hydration.ts'; import { decodePayload, sanitizePayload, type PayloadSummary } from './http-payload.ts'; +import { refetchPayload, type RefetchEnv } from './http-payload-refetch.ts'; +import { outsideAngular } from './outside-angular.ts'; import { withCapturedHeaders } from './http-headers.ts'; import { redactCall } from './http-redact.ts'; import { httpRegistry, sanitizeRules, storeRules, type HttpCall } from './http-rules.ts'; @@ -97,8 +99,16 @@ function hydrationStats( * The payload and the full call list go out once; later pushes carry only new * calls, and a ping keeps the page alive while nothing changes. */ -export function attachHttp(my: RpcScope, pageId: string, tickMs: () => number = () => 0) { +export function attachHttp( + my: RpcScope, + pageId: string, + tickMs: () => number = () => 0, + refetchEnv: RefetchEnv = {}, +) { + // The payload the page was served with: hydration stats always read this one. const payload = decodePayload(document, appIdOf(document)); + // What the panel shows: the served payload, or the last refetched one. + let shownPayload = payload; // TransferState holds whatever the server rendered with, so it is masked here, before it // leaves the page, with the same rules the server applies to it. let maskedPayload: PayloadSummary | undefined; @@ -146,7 +156,7 @@ export function attachHttp(my: RpcScope, pageId: string, tickMs: () => number = full, }; const sent = full - ? { ...report, payload: (maskedPayload ??= sanitizePayload(payload)) } + ? { ...report, payload: (maskedPayload ??= sanitizePayload(shownPayload)) } : report; const answer = (await my.rpc.call('push-http', sent)) as { needPayload?: boolean } | null | undefined; @@ -179,6 +189,40 @@ export function attachHttp(my: RpcScope, pageId: string, tickMs: () => number = }, }); + // A user's Refetch in the panel, or an agent's `refetch-transfer-state`: render the page's + // URL again on the server and show the payload it sends now, without reloading the tab. + my.rpc.register({ + name: 'http-payload-refetch', + type: 'event', + jsonSerializable: true, + handler: (message: { requestId?: unknown; pageId?: unknown } | undefined) => { + if (message?.pageId !== pageId || typeof message.requestId !== 'string') return; + const requestId = message.requestId; + void outsideAngular(async () => { + const fetched = await refetchPayload(location.href, refetchEnv); + let result: Record<string, unknown>; + if ('error' in fetched) { + result = { error: redactMessage(fetched.error) }; + } else { + shownPayload = fetched.payload; + maskedPayload = sanitizePayload(shownPayload); + payloadSent = false; + await push().catch(() => {}); + result = { + ok: true, + status: fetched.status, + found: maskedPayload.found, + entries: maskedPayload.entries.length, + size: maskedPayload.size, + }; + } + await my.rpc + .call('http-payload-refetch-result', { requestId, pageId, result }) + .catch(() => {}); + }); + }, + }); + void my.rpc .call('get-http-rules') .then((rules) => storeRules(sanitizeRules(rules))) diff --git a/packages/devtools/src/http-payload-refetch.ts b/packages/devtools/src/http-payload-refetch.ts new file mode 100644 index 00000000..adfbc10f --- /dev/null +++ b/packages/devtools/src/http-payload-refetch.ts @@ -0,0 +1,52 @@ +import { appIdOf } from './http-hydration.ts'; +import { decodePayload, type PayloadSummary } from './http-payload.ts'; + +/** What the page answers to a refetch: the new payload, or why there is none. */ +export type PayloadRefetch = { payload: PayloadSummary; status: number } | { error: string }; + +/** The longest HTML a refetch reads, so a huge page can't stall the overlay. */ +export const MAX_REFETCH_HTML = 5_000_000; + +export interface RefetchEnv { + fetch?: typeof fetch; + parse?: (html: string) => Document | null; +} + +const parseHtml = (html: string): Document | null => + typeof DOMParser === 'function' ? new DOMParser().parseFromString(html, 'text/html') : null; + +/** + * Asks the server to render `url` again, with the page's own cookies, and + * reads the TransferState payload out of the HTML it sends. The HTML is + * parsed into a detached document: its scripts don't run and nothing is + * written into the app's page. The result is not masked yet; the caller + * runs it through `sanitizePayload` before it leaves the page. + */ +export async function refetchPayload(url: string, env: RefetchEnv = {}): Promise<PayloadRefetch> { + const fetchFn = env.fetch ?? (typeof fetch === 'function' ? fetch : undefined); + const parse = env.parse ?? parseHtml; + if (!fetchFn) return { error: 'This platform has no fetch, so the payload cannot be fetched.' }; + let response: Response; + try { + response = await fetchFn(url, { + credentials: 'same-origin', + cache: 'no-store', + headers: { accept: 'text/html' }, + }); + } catch (error) { + return { error: `The request failed: ${error instanceof Error ? error.message : 'unknown'}.` }; + } + const type = response.headers.get('content-type') ?? ''; + if (!/html/i.test(type)) { + return { + error: `The server answered ${response.status} with ${type ? `\`${type.split(';')[0]}\`` : 'no content type'}, not HTML.`, + }; + } + const html = await response.text(); + if (html.length > MAX_REFETCH_HTML) { + return { error: `The HTML is larger than ${MAX_REFETCH_HTML} characters, so it was not read.` }; + } + const doc = parse(html); + if (!doc) return { error: 'This platform cannot parse HTML, so the payload cannot be read.' }; + return { payload: decodePayload(doc, appIdOf(doc)), status: response.status }; +} diff --git a/packages/devtools/src/http-payload.ts b/packages/devtools/src/http-payload.ts index 19ac2ce1..5697f0eb 100644 --- a/packages/devtools/src/http-payload.ts +++ b/packages/devtools/src/http-payload.ts @@ -24,6 +24,11 @@ export interface PayloadSummary { size: number; entries: PayloadEntry[]; error?: string; + /** + * Set by the server when the payload came from a refetch (the page rendered + * its URL again) instead of the HTML the tab was served with. + */ + refetchedAt?: number; } const MAX_VALUE_CHARS = 20_000; diff --git a/packages/devtools/src/rpc/audit-findings.ts b/packages/devtools/src/rpc/audit-findings.ts index 25c3c2e5..2bcda68d 100644 --- a/packages/devtools/src/rpc/audit-findings.ts +++ b/packages/devtools/src/rpc/audit-findings.ts @@ -1,15 +1,16 @@ // The audit: one ranked list of findings over what the inspectors already // collected. Every check here reuses an inspector's own function (cdHints, -// isRetained, lintRoutes, lintFormsFor, lintPipes, serverCallFor) and only -// turns its result into a finding, so the audit and the inspector's own tool -// always agree. +// isRetained, lintRoutes, lintFormsFor, lintPipes, serverCallFor, +// pageHttpLint) and only turns its result into a finding, so the audit and +// the inspector's own tool always agree. import { cdHints } from '../cd-data.ts'; import type { AxeImpact, AxeReport } from '../axe-runner.ts'; import { redactMessage, redactUrl } from '../router.ts'; import { redactText } from '../serialize.ts'; import { clip } from '../text.ts'; -import type { ComponentPage, HttpState } from '../types.ts'; +import type { ComponentPage, HttpPage, HttpState } from '../types.ts'; +import { pageHttpLint } from './http-lint.ts'; import type { CdState } from './cd-tools.ts'; import type { ErrorsState } from './errors-tools.ts'; import { lintFormsFor } from './forms-explain.ts'; @@ -548,6 +549,52 @@ function endpoint(url: string): string { } } +/** + * The page's HTTP lint (`lint-http`) as findings: duplicate GETs, waterfalls + * and server calls the browser made again. A repeated server call that the + * transfer cache check already reported as `fetched-twice` is not added twice. + */ +function httpLintFindings( + state: HttpState, + page: HttpPage, + found: readonly AuditFinding[], +): AuditFinding[] { + const area = 'http'; + const tool = 'pangular:lint-http'; + const args = { page: page.pageId }; + const byId = new Map(page.calls.map((call) => [call.id, call])); + const about = (id: string | undefined) => { + const call = id ? byId.get(id) : undefined; + return call ? `${call.method} ${redactUrl(endpoint(call.url))}` : undefined; + }; + const out: AuditFinding[] = []; + for (const finding of pageHttpLint(state, page).findings) { + const message = finding.message.replace(/`/g, "'"); + if (finding.kind === 'duplicate') { + out.push( + make(area, 'duplicate-request', 'warning', message, tool, { + subject: about(finding.callIds[0]), + args, + }), + ); + } else if (finding.kind === 'waterfall') { + const first = about(finding.callIds[0]); + out.push( + make(area, 'request-waterfall', 'info', message, tool, { + subject: first ? `${finding.callIds.length} calls from ${first}` : undefined, + args, + }), + ); + } else { + const subject = about(finding.callIds[1]); + const key = `${area}:fetched-twice:${subject ?? ''}`; + if (found.some((f) => f.key === key)) continue; + out.push(make(area, 'fetched-twice', 'warning', message, tool, { subject, args })); + } + } + return out; +} + function http(state: HttpState | undefined, pageId: string): Collected { const area = 'http'; const tool = 'pangular:list-http-calls'; @@ -613,6 +660,7 @@ function http(state: HttpState | undefined, pageId: string): Collected { } } } + findings.push(...httpLintFindings(state, page, findings)); return { findings: merge(findings), source: { area, state: 'ok' }, diff --git a/packages/devtools/src/rpc/http-lint.ts b/packages/devtools/src/rpc/http-lint.ts index 72bbbff5..984dbbf3 100644 --- a/packages/devtools/src/rpc/http-lint.ts +++ b/packages/devtools/src/rpc/http-lint.ts @@ -38,6 +38,41 @@ function section(kind: HttpLintKind, findings: readonly HttpLintFinding[]): stri ]; } +/** + * The HTTP lint findings of one reported page: its masked client calls, and + * the server calls of the render that served it for the refetch check. The + * audit and the snapshot read the same findings as `lint-http`. + */ +export function pageHttpLint( + state: Pick<HttpState, 'serverCalls'>, + page: HttpPage, +): { findings: HttpLintFinding[]; withServer: boolean } { + const serverCalls = page.ssrRequestId + ? state.serverCalls.filter((c) => c.requestId === page.ssrRequestId).map(redactCall) + : undefined; + return { + findings: lintHttp(page.calls.map(redactCall), { serverCalls }), + withServer: serverCalls !== undefined, + }; +} + +const SHORT: Record<HttpLintKind, [string, string]> = { + duplicate: ['duplicate request', 'duplicate requests'], + waterfall: ['waterfall', 'waterfalls'], + refetch: ['repeated server call', 'repeated server calls'], +}; + +/** One line that counts the findings by kind, such as `2 duplicate requests, 1 waterfall`. */ +export function httpLintSummary(findings: readonly HttpLintFinding[]): string { + return (Object.keys(SHORT) as HttpLintKind[]) + .map((kind) => { + const count = findings.filter((f) => f.kind === kind).length; + return count ? `${count} ${SHORT[kind][count === 1 ? 0 : 1]}` : ''; + }) + .filter(Boolean) + .join(', '); +} + /** * The HTTP lint of one page, as markdown: duplicate GETs, chains of calls * that could start together and server calls the browser made again. It @@ -54,11 +89,8 @@ export function lintHttpText( const page = args.page ? pages.find((p) => p.pageId === args.page) : defaultPage(pages); if (!page) return unknownPageText(args.page!, pages, 'HTTP calls'); if (!page.calls.length) return `Page ${code(page.pageId)} has made no HttpClient calls yet.`; - const serverCalls = page.ssrRequestId - ? state.serverCalls.filter((c) => c.requestId === page.ssrRequestId).map(redactCall) - : undefined; - const findings = lintHttp(page.calls.map(redactCall), { serverCalls }); - const scope = `${page.calls.length} client call${page.calls.length === 1 ? '' : 's'} of page ${code(page.pageId)} (${code(page.url)})${serverCalls ? ' and the server render that served it' : ''}`; + const { findings, withServer } = pageHttpLint(state, page); + const scope = `${page.calls.length} client call${page.calls.length === 1 ? '' : 's'} of page ${code(page.pageId)} (${code(page.url)})${withServer ? ' and the server render that served it' : ''}`; if (!findings.length) { return `${UNTRUSTED}\n\nNo duplicate requests, waterfalls or repeated server calls in the ${scope}.`; } diff --git a/packages/devtools/src/rpc/http-rule-tools.ts b/packages/devtools/src/rpc/http-rule-tools.ts index a89f78ff..cb1e0cc9 100644 --- a/packages/devtools/src/rpc/http-rule-tools.ts +++ b/packages/devtools/src/rpc/http-rule-tools.ts @@ -1,4 +1,5 @@ import { HTTP_RULE_CHANCE, isFailingRuleStatus, isHttpRuleStatus } from '../config.ts'; +import { HTTP_RULE_PRESETS, presetRules } from '../http-data.ts'; import { redactPreview } from '../http-redact.ts'; import { MAX_DELAY_MS, @@ -27,6 +28,63 @@ export interface SetHttpRuleArgs { body?: unknown; chance?: unknown; enabled?: unknown; + preset?: unknown; +} + +/** The ids `preset` takes, as the panel's preset buttons offer them. */ +export const HTTP_RULE_PRESET_IDS: readonly string[] = HTTP_RULE_PRESETS.map((p) => p.id); + +export type PresetChange = + | { rules: HttpRule[]; added: HttpRule[]; preset: (typeof HTTP_RULE_PRESETS)[number] } + | { error: string }; + +/** Rule arguments that `preset` can't be combined with: it brings its own. */ +const RULE_FIELDS = [ + 'id', + 'pattern', + 'method', + 'target', + 'status', + 'delayMs', + 'body', + 'chance', + 'enabled', +] as const; + +/** + * Expands a preset (Offline, Slow 3G, Flaky) into plain rules added after the + * current ones, as the panel's preset buttons do. The rules then show, change + * and go away like any other rule. + */ +export function addHttpRulePreset( + rules: readonly HttpRule[], + args: SetHttpRuleArgs, + newId: () => string, +): PresetChange { + const ids = HTTP_RULE_PRESET_IDS.map(code).join(', '); + const preset = HTTP_RULE_PRESETS.find((p) => p.id === args.preset); + if (!preset) return { error: `\`preset\` must be one of ${ids}.` }; + const mixed = RULE_FIELDS.filter((field) => args[field] !== undefined); + if (mixed.length) { + return { + error: `\`preset\` adds its own rules, so pass it alone, without ${mixed.map(code).join(', ')}. Change a rule it added afterwards with its \`id\`.`, + }; + } + const draft = presetRules(preset.id, newId); + if (rules.length + draft.length > MAX_RULES) { + return { + error: `There are already ${rules.length} rules and the preset adds ${draft.length}; the limit is ${MAX_RULES}. Remove one with \`remove-http-rule\`.`, + }; + } + const saved = sanitizeRules([...rules, ...draft]); + const added = saved.filter((rule) => draft.some((d) => d.id === rule.id)); + return { rules: saved, added, preset }; +} + +/** The answer after a preset added its rules. */ +export function presetChangeText(change: Extract<PresetChange, { added: HttpRule[] }>): string { + const ids = change.added.map((rule) => code(rule.id)).join(', '); + return `Added the ${change.preset.label} preset: ${change.preset.description} Rule${change.added.length === 1 ? '' : 's'} ${ids}, after the existing ones, so earlier rules match first. Remove ${change.added.length === 1 ? 'it' : 'them'} with \`remove-http-rule\` to stop it.\n\n${httpRulesText(change.rules, true)}`; } export type RuleChange = { rules: HttpRule[]; rule: HttpRule } | { error: string }; diff --git a/packages/devtools/src/rpc/snapshot-tools.ts b/packages/devtools/src/rpc/snapshot-tools.ts index 1385052a..f4fe87a3 100644 --- a/packages/devtools/src/rpc/snapshot-tools.ts +++ b/packages/devtools/src/rpc/snapshot-tools.ts @@ -11,6 +11,7 @@ import { componentOutlineText, routedHosts } from './component-outline.ts'; import { listConsoleText, listErrorsText, type ErrorsState } from './errors-tools.ts'; import { code, inspectFormsText, onPage, untrusted, type FormsState } from './forms-tools.ts'; import { listHttpCallsText } from './http-tools.ts'; +import { httpLintSummary, pageHttpLint } from './http-lint.ts'; import { inspectSignalStoreText } from './ngrx-live-tools.ts'; import type { NgrxPages } from './ngrx-tools.ts'; import { callerPage } from './page-scope.ts'; @@ -224,7 +225,10 @@ function renderSection(section: SnapshotSection, ctx: RenderContext): string | u const state = sources.http(); const own = state.pages.find((entry) => entry.pageId === pageId); if (!own) return undefined; - return listHttpCallsText({ ...state, pages: [own] }, { page: pageId, limit }, now); + const calls = listHttpCallsText({ ...state, pages: [own] }, { page: pageId, limit }, now); + const { findings } = pageHttpLint(state, own); + if (!findings.length) return calls; + return `${calls}\n\nHTTP lint: ${httpLintSummary(findings)}. \`lint-http\` lists the calls and what to try.`; } case 'errors': { const state = sources.errors(); diff --git a/packages/devtools/src/rpc/ssr-override-tools.ts b/packages/devtools/src/rpc/ssr-override-tools.ts index 0344b5b8..681491db 100644 --- a/packages/devtools/src/rpc/ssr-override-tools.ts +++ b/packages/devtools/src/rpc/ssr-override-tools.ts @@ -348,6 +348,38 @@ function payloadNotes(payload: PayloadSummary): string { return notes.length ? `\n\n${notes.map((n) => `- ${n}`).join('\n')}` : ''; } +/** + * The page's answer to a payload refetch, cut down to the fields the server + * reads: a short error, or the counts of the payload the page pushed. + */ +export function sanitizeRefetchResult(input: unknown): Record<string, unknown> { + const value = (input && typeof input === 'object' ? input : {}) as Record<string, unknown>; + if (typeof value['error'] === 'string') return { error: clip(value['error'], 300) }; + if (value['ok'] !== true) return { error: 'The page sent no payload.' }; + const count = (key: string) => + typeof value[key] === 'number' && Number.isFinite(value[key]) ? Math.floor(value[key]) : 0; + return { + ok: true, + status: count('status'), + found: value['found'] === true, + entries: count('entries'), + size: count('size'), + }; +} + +/** The answer after a refetch: what changed, then the payload as `inspect-transfer-state` lists it. */ +export function refetchAnswerText( + result: Record<string, unknown>, + payloads: ReadonlyMap<string, PayloadSummary>, + pages: Iterable<HttpPage>, +): string { + const pageId = String(result['pageId'] ?? ''); + const head = result['found'] + ? `Refetched the TransferState of page ${code(pageId)}: the server answered ${result['status']} with ${result['entries']} entr${result['entries'] === 1 ? 'y' : 'ies'}, ${result['size']} bytes. The panel and \`inspect-transfer-state\` show this payload until the tab reloads.` + : `Refetched page ${code(pageId)}: the server answered ${result['status']} without a TransferState script, so it did not server render this URL.`; + return `${head}\n\n${transferStateText(payloads, pages, { page: pageId })}`; +} + export interface SsrOverrideToolDeps { config: ResolvedPangularConfig; overrides: () => readonly SsrOverride[]; diff --git a/scripts/e2e-mcp.mjs b/scripts/e2e-mcp.mjs index f87cfb4c..4841bd6f 100644 --- a/scripts/e2e-mcp.mjs +++ b/scripts/e2e-mcp.mjs @@ -839,6 +839,7 @@ const ACTION_SCENARIO_TOOLS = new Set([ 'remove-http-rule', 'set-ssr-override', 'remove-ssr-override', + 'refetch-transfer-state', 'set-component-property', 'set-signal', 'load-defer-block', @@ -1868,6 +1869,26 @@ async function runActions(state) { write('set-http-rule', 'answer names the rule id', false, r.markdown.slice(0, 400)); } await act('remove-http-rule', { id: 'no-such-rule' }, 'refusal'); + r = await act('set-http-rule', { preset: 'offline' }); + const presetId = r.markdown.match(/Rule `([\w-]+)`/)?.[1]; + write( + 'set-http-rule', + 'preset adds the Offline rule', + /Added the Offline preset/.test(r.markdown) && !!presetId, + r.markdown.slice(0, 300), + ); + if (presetId) await act('remove-http-rule', { id: presetId }); + await act('set-http-rule', { preset: 'offline', pattern: '/x' }, 'refusal'); + + // TransferState refetch: the page renders its URL again on the server. + await app.go('/examples/ssr'); + r = await act('refetch-transfer-state', {}, 'any'); + write( + 'refetch-transfer-state', + 'the page answers with the payload the server sends now', + /^Refetched/.test(r.markdown), + r.markdown.slice(0, 300), + ); // SSR overrides. /about is prerendered, so an override there cannot apply; // the tool should say so. From a06eb1da0f703d1b21a9a625a9fb9c113758d529 Mon Sep 17 00:00:00 2001 From: erKam <erkamyaman35@gmail.com> Date: Sat, 7 Nov 2026 19:58:09 +0000 Subject: [PATCH 04/15] refactor: merge the HTTP, JSON text and Analog redaction into one module http-redact.ts, json-text-redact.ts and analog-redact.ts were three small modules that called each other and the same shared text masking. Merge them into redaction.ts, so the masking of recorded calls, JSON text and Analog page reports lives in one place next to its docs, and point every caller and test at it. No behaviour changes: the redaction tests and the leak corpus pass unchanged apart from their import path. Refs #371 --- .../devtools/src/__tests__/analog-mcp.test.ts | 2 +- .../__tests__/credential-redaction.test.ts | 2 +- .../src/__tests__/entropy-redaction.test.ts | 3 +- .../devtools/src/__tests__/http-har.test.ts | 2 +- .../src/__tests__/http-headers.test.ts | 2 +- .../__tests__/http-payload-redaction.test.ts | 2 +- .../src/__tests__/http-snippets.test.ts | 2 +- .../devtools/src/__tests__/http-tools.test.ts | 2 +- .../src/__tests__/redaction-corpus.test.ts | 10 +- .../__tests__/redaction-leak-fixes.test.ts | 2 +- .../src/__tests__/redaction-leaks.test.ts | 2 +- .../src/__tests__/url-email-redaction.test.ts | 2 +- packages/devtools/src/analog-redact.ts | 52 -------- packages/devtools/src/analog-server-log.ts | 2 +- packages/devtools/src/capacitor-redact.ts | 2 +- packages/devtools/src/devframe.ts | 2 +- packages/devtools/src/http-headers.ts | 2 +- packages/devtools/src/http-overlay.ts | 2 +- packages/devtools/src/http-payload.ts | 3 +- packages/devtools/src/json-text-redact.ts | 55 -------- .../src/{http-redact.ts => redaction.ts} | 122 +++++++++++++++++- packages/devtools/src/rpc/analog-register.ts | 3 +- .../devtools/src/rpc/analog-render-check.ts | 2 +- packages/devtools/src/rpc/browser-tools.ts | 2 +- packages/devtools/src/rpc/http-lint.ts | 2 +- packages/devtools/src/rpc/http-rule-tools.ts | 2 +- packages/devtools/src/rpc/http-tools.ts | 2 +- packages/devtools/src/rpc/http-waterfall.ts | 2 +- packages/devtools/src/rpc/router-http.ts | 2 +- .../devtools/src/rpc/ssr-override-tools.ts | 2 +- 30 files changed, 154 insertions(+), 140 deletions(-) delete mode 100644 packages/devtools/src/analog-redact.ts delete mode 100644 packages/devtools/src/json-text-redact.ts rename packages/devtools/src/{http-redact.ts => redaction.ts} (51%) diff --git a/packages/devtools/src/__tests__/analog-mcp.test.ts b/packages/devtools/src/__tests__/analog-mcp.test.ts index c246d34e..badb5545 100644 --- a/packages/devtools/src/__tests__/analog-mcp.test.ts +++ b/packages/devtools/src/__tests__/analog-mcp.test.ts @@ -15,7 +15,7 @@ import { } from '../rpc/analog-tools.ts'; import { scanAnalog } from '../rpc/analog-scan.ts'; import type { AnalogRuntimeReport } from '../analog-runtime.ts'; -import { redactAnalogReport } from '../analog-redact.ts'; +import { redactAnalogReport } from '../redaction.ts'; import { BASE_FILES, BROKEN_FILES, makeProject } from './analog-fixture.ts'; import { answerText } from './tool-answer.ts'; import { toolAnswer } from './tool-answer.ts'; diff --git a/packages/devtools/src/__tests__/credential-redaction.test.ts b/packages/devtools/src/__tests__/credential-redaction.test.ts index 95f999c6..df9e1699 100644 --- a/packages/devtools/src/__tests__/credential-redaction.test.ts +++ b/packages/devtools/src/__tests__/credential-redaction.test.ts @@ -3,7 +3,7 @@ import { describe, expect, it } from 'vitest'; import { redactMessage as serverLogMessage } from '../analog-server-log.ts'; import { REDACTED, isRedactedKey, isSecretKey, redactMessage } from '../forms-privacy.ts'; import type { HttpCall } from '../http-rules.ts'; -import { redactCall, redactPreview } from '../http-redact.ts'; +import { redactCall, redactPreview } from '../redaction.ts'; import { serialize as ngrxSerialize } from '../ngrx-shared.ts'; import { isSecretKey as isRouterSecretKey, diff --git a/packages/devtools/src/__tests__/entropy-redaction.test.ts b/packages/devtools/src/__tests__/entropy-redaction.test.ts index ad0879b9..3edec8c1 100644 --- a/packages/devtools/src/__tests__/entropy-redaction.test.ts +++ b/packages/devtools/src/__tests__/entropy-redaction.test.ts @@ -17,8 +17,7 @@ import { import { REDACTED, redactMessage, SecretSet, setRedaction } from '../forms-privacy.ts'; import { serialize } from '../serialize.ts'; import { redactRecord, redactText, redactUrl } from '../router.ts'; -import { redactCall, redactHeaders, redactPreview } from '../http-redact.ts'; -import { redactAnalogReport } from '../analog-redact.ts'; +import { redactAnalogReport, redactCall, redactHeaders, redactPreview } from '../redaction.ts'; import { redactBody, redactMessage as redactServerMessage } from '../analog-server-log.ts'; import { maskedArgs } from '../capacitor-redact.ts'; import { serialize as ngrxSerialize } from '../ngrx-shared.ts'; diff --git a/packages/devtools/src/__tests__/http-har.test.ts b/packages/devtools/src/__tests__/http-har.test.ts index 43e7e969..d41622d2 100644 --- a/packages/devtools/src/__tests__/http-har.test.ts +++ b/packages/devtools/src/__tests__/http-har.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest'; import { harLog, type RecordedCall } from '../http-data.ts'; -import { redactCall } from '../http-redact.ts'; +import { redactCall } from '../redaction.ts'; const recorded = (overrides: Partial<RecordedCall> = {}): RecordedCall => ({ id: 'c1', diff --git a/packages/devtools/src/__tests__/http-headers.test.ts b/packages/devtools/src/__tests__/http-headers.test.ts index 536eadf0..be5b393e 100644 --- a/packages/devtools/src/__tests__/http-headers.test.ts +++ b/packages/devtools/src/__tests__/http-headers.test.ts @@ -23,7 +23,7 @@ import { type HeaderSource, } from '../http-headers.ts'; import { attachHttp } from '../http-overlay.ts'; -import { redactCall, redactHeaders } from '../http-redact.ts'; +import { redactCall, redactHeaders } from '../redaction.ts'; import { httpRegistry, sanitizeCalls, type HttpCall } from '../http-rules.ts'; import { listHttpCallsText } from '../rpc/http-tools.ts'; import { httpWaterfallText, waterfallGroups } from '../rpc/http-waterfall.ts'; diff --git a/packages/devtools/src/__tests__/http-payload-redaction.test.ts b/packages/devtools/src/__tests__/http-payload-redaction.test.ts index b83be23a..58b92b63 100644 --- a/packages/devtools/src/__tests__/http-payload-redaction.test.ts +++ b/packages/devtools/src/__tests__/http-payload-redaction.test.ts @@ -2,7 +2,7 @@ import { afterEach, describe, expect, it } from 'vitest'; import { setRedaction } from '../forms-privacy.ts'; import { decodePayload, sanitizePayload } from '../http-payload.ts'; -import { redactPreview } from '../http-redact.ts'; +import { redactPreview } from '../redaction.ts'; import { redactText } from '../router.ts'; afterEach(() => setRedaction()); diff --git a/packages/devtools/src/__tests__/http-snippets.test.ts b/packages/devtools/src/__tests__/http-snippets.test.ts index 3a45765c..95611943 100644 --- a/packages/devtools/src/__tests__/http-snippets.test.ts +++ b/packages/devtools/src/__tests__/http-snippets.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest'; import { curlSnippet, fetchSnippet } from '../http-data.ts'; -import { redactCall } from '../http-redact.ts'; +import { redactCall } from '../redaction.ts'; import type { HttpCall } from '../http-rules.ts'; const call = (overrides: Partial<HttpCall> = {}): HttpCall => ({ diff --git a/packages/devtools/src/__tests__/http-tools.test.ts b/packages/devtools/src/__tests__/http-tools.test.ts index a0ffd275..50ca9751 100644 --- a/packages/devtools/src/__tests__/http-tools.test.ts +++ b/packages/devtools/src/__tests__/http-tools.test.ts @@ -237,7 +237,7 @@ describe('redirected calls', () => { it('flags a call answered from another URL, with the target redacted', async () => { const { redirectOf } = await import('../http-redirect.ts'); const { sanitizeCalls } = await import('../http-rules.ts'); - const { redactCall } = await import('../http-redact.ts'); + const { redactCall } = await import('../redaction.ts'); expect( redirectOf('http://localhost:3000/api/products/2?delay=200', 'http://localhost:3000/'), ).toEqual({ diff --git a/packages/devtools/src/__tests__/redaction-corpus.test.ts b/packages/devtools/src/__tests__/redaction-corpus.test.ts index 9f23144a..acf26f53 100644 --- a/packages/devtools/src/__tests__/redaction-corpus.test.ts +++ b/packages/devtools/src/__tests__/redaction-corpus.test.ts @@ -16,9 +16,13 @@ import { } from '../forms-privacy.ts'; import { redactRecord, redactText, redactUrl } from '../router.ts'; import { serialize } from '../serialize.ts'; -import { redactCall, redactHeaders, redactPreview } from '../http-redact.ts'; -import { redactJsonText } from '../json-text-redact.ts'; -import { redactAnalogReport } from '../analog-redact.ts'; +import { + redactAnalogReport, + redactCall, + redactHeaders, + redactJsonText, + redactPreview, +} from '../redaction.ts'; import { redactBody, redactMessage as redactServerMessage } from '../analog-server-log.ts'; import { maskedArgs } from '../capacitor-redact.ts'; import { serialize as ngrxSerialize } from '../ngrx-shared.ts'; diff --git a/packages/devtools/src/__tests__/redaction-leak-fixes.test.ts b/packages/devtools/src/__tests__/redaction-leak-fixes.test.ts index fdc44555..d78ba3b1 100644 --- a/packages/devtools/src/__tests__/redaction-leak-fixes.test.ts +++ b/packages/devtools/src/__tests__/redaction-leak-fixes.test.ts @@ -4,7 +4,7 @@ import { afterEach, describe, expect, it } from 'vitest'; import { setRedaction } from '../forms-privacy.ts'; import { redactText } from '../text-redact.ts'; import { redactBody, redactMessage } from '../analog-server-log.ts'; -import { redactHeaders } from '../http-redact.ts'; +import { redactHeaders } from '../redaction.ts'; import { serialize as ngrxSerialize } from '../ngrx-shared.ts'; afterEach(() => setRedaction()); diff --git a/packages/devtools/src/__tests__/redaction-leaks.test.ts b/packages/devtools/src/__tests__/redaction-leaks.test.ts index 1ccf16d3..bab1b48e 100644 --- a/packages/devtools/src/__tests__/redaction-leaks.test.ts +++ b/packages/devtools/src/__tests__/redaction-leaks.test.ts @@ -4,7 +4,7 @@ import { redactMessage, setRedaction, SecretSet } from '../forms-privacy.ts'; import { serialize } from '../serialize.ts'; import { serialize as ngrxSerialize } from '../ngrx-shared.ts'; import { redactRecord } from '../router.ts'; -import { redactPreview } from '../http-redact.ts'; +import { redactPreview } from '../redaction.ts'; afterEach(() => setRedaction()); diff --git a/packages/devtools/src/__tests__/url-email-redaction.test.ts b/packages/devtools/src/__tests__/url-email-redaction.test.ts index d410bdf4..4f4d11d8 100644 --- a/packages/devtools/src/__tests__/url-email-redaction.test.ts +++ b/packages/devtools/src/__tests__/url-email-redaction.test.ts @@ -2,7 +2,7 @@ import { EventEmitter } from 'node:events'; import { afterEach, describe, expect, it } from 'vitest'; import { analogMiddleware, clearCalls, recentCalls } from '../analog-server-log.ts'; import type { HttpCall } from '../http-rules.ts'; -import { redactCall } from '../http-redact.ts'; +import { redactCall } from '../redaction.ts'; import { applyRouterEvent, redactUrl, type NavigationRecord } from '../router.ts'; import { explainNavigationText, type RouterPage } from '../rpc/router-tools.ts'; import { listHttpCallsText } from '../rpc/http-tools.ts'; diff --git a/packages/devtools/src/analog-redact.ts b/packages/devtools/src/analog-redact.ts deleted file mode 100644 index ec0ba45e..00000000 --- a/packages/devtools/src/analog-redact.ts +++ /dev/null @@ -1,52 +0,0 @@ -import type { AnalogRuntimeReport } from './analog-runtime.ts'; -import { redactPreview } from './http-redact.ts'; -import { redactText, redactUrl } from './router.ts'; -import { clip } from './text.ts'; - -/** Longest URL, `load()` preview and file path kept from a page report. */ -const MAX_URL = 2000; -const MAX_PREVIEW = 1001; -const MAX_PATH = 500; -const MAX_ERROR = 300; - -/** A JWT cut before its signature, which the JWT pattern no longer matches. */ -const PARTIAL_JWT = /eyJ[\w-]*(?:\.[\w-]*)?$/; - -/** - * Clips `value` to twice `max` before redacting it, so an oversized field - * costs little to redact, and to `max` after. A JWT that the first cut splits - * is dropped, so its header and claims cannot slip past the redaction. - */ -function capped(value: string, max: number, redact: (text: string) => string = (t) => t) { - const head = - value.length > max * 2 ? `${value.slice(0, max * 2).replace(PARTIAL_JWT, '')}…` : value; - return clip(redact(head), max); -} - -/** - * Hides secret query values, JWTs, bearer tokens and `redaction.secretNames` - * in the text fields of a page report before it is stored or served, and - * clips each text field. - */ -export function redactAnalogReport(report: AnalogRuntimeReport): AnalogRuntimeReport { - const path = (value: string) => capped(value, MAX_PATH); - return { - ...report, - url: capped(report.url, MAX_URL, redactUrl), - chain: report.chain.map((item) => ({ - ...item, - path: path(item.path), - ...(item.file !== undefined && { file: path(item.file) }), - ...(item.serverFile !== undefined && { serverFile: path(item.serverFile) }), - })), - ...(report.load && { - load: { - ...report.load, - preview: capped(report.load.preview, MAX_PREVIEW, redactPreview), - keys: report.load.keys.map((key) => capped(key, MAX_PATH, redactUrl)), - }, - }), - hydrationErrors: report.hydrationErrors.map((error) => capped(error, MAX_ERROR, redactText)), - configPaths: report.configPaths.map(path), - }; -} diff --git a/packages/devtools/src/analog-server-log.ts b/packages/devtools/src/analog-server-log.ts index 9f3ff452..82b6d06a 100644 --- a/packages/devtools/src/analog-server-log.ts +++ b/packages/devtools/src/analog-server-log.ts @@ -4,7 +4,7 @@ import { beginRender, bindRender, tagRequest } from './analog-call-pages.ts'; import { runInAnalogRender } from './ssr-context.ts'; import { redactHighEntropy } from './entropy-redact.ts'; import { REDACTED, isRedactedKey, redactTokens } from './forms-privacy.ts'; -import { redactJsonText } from './json-text-redact.ts'; +import { redactJsonText } from './redaction.ts'; import { maskEmails } from './text-redact.ts'; // A fragment (`#access_token=…`) and matrix params (`;sid=…`) carry pairs like a query. diff --git a/packages/devtools/src/capacitor-redact.ts b/packages/devtools/src/capacitor-redact.ts index 3f3fdd70..ba29ee77 100644 --- a/packages/devtools/src/capacitor-redact.ts +++ b/packages/devtools/src/capacitor-redact.ts @@ -3,7 +3,7 @@ // `redaction` config, so a call logged before the page knew that config (or by // a page without it) is masked the same way. import { REDACTED, redactReason } from './forms-privacy.ts'; -import { redactPreview } from './http-redact.ts'; +import { redactPreview } from './redaction.ts'; import { redactText, redactUrl } from './router.ts'; import { isSecretName, serialize, type SerializeLimits } from './serialize.ts'; import { clip } from './text.ts'; diff --git a/packages/devtools/src/devframe.ts b/packages/devtools/src/devframe.ts index 3251d7e4..11619f0e 100644 --- a/packages/devtools/src/devframe.ts +++ b/packages/devtools/src/devframe.ts @@ -201,7 +201,7 @@ import { type HttpRule, } from './http-rules.ts'; import { sanitizeHydration, sanitizePayload, type PayloadSummary } from './http-payload.ts'; -import { redactCall } from './http-redact.ts'; +import { redactCall } from './redaction.ts'; import { redactMessage, redactUrl } from './router.ts'; import { isSsrRequestId, ssrRegistry } from './ssr-registry.ts'; import { sanitizeSsrOverrides, type SsrOverride } from './ssr-overrides.ts'; diff --git a/packages/devtools/src/http-headers.ts b/packages/devtools/src/http-headers.ts index 2f5ab410..84d20817 100644 --- a/packages/devtools/src/http-headers.ts +++ b/packages/devtools/src/http-headers.ts @@ -1,7 +1,7 @@ // Request and response headers of recorded HttpClient calls. The interceptor // only keeps a reference to the `HttpHeaders` objects Angular already built; // they are read and capped when a call leaves the page or the -// server process (`redactHeaders` in `http-redact.ts` masks them), so a page with no devtools connected copies nothing. +// server process (`redactHeaders` in `redaction.ts` masks them), so a page with no devtools connected copies nothing. import type { HttpCall } from './http-rules.ts'; import { clip } from './text.ts'; diff --git a/packages/devtools/src/http-overlay.ts b/packages/devtools/src/http-overlay.ts index 4e30f5eb..b29997b8 100644 --- a/packages/devtools/src/http-overlay.ts +++ b/packages/devtools/src/http-overlay.ts @@ -5,7 +5,7 @@ import { decodePayload, sanitizePayload, type PayloadSummary } from './http-payl import { refetchPayload, type RefetchEnv } from './http-payload-refetch.ts'; import { outsideAngular } from './outside-angular.ts'; import { withCapturedHeaders } from './http-headers.ts'; -import { redactCall } from './http-redact.ts'; +import { redactCall } from './redaction.ts'; import { httpRegistry, sanitizeRules, storeRules, type HttpCall } from './http-rules.ts'; import { redactMessage, redactUrl } from './router.ts'; import { readSsrRequestId } from './ssr-registry.ts'; diff --git a/packages/devtools/src/http-payload.ts b/packages/devtools/src/http-payload.ts index 5697f0eb..f648fc99 100644 --- a/packages/devtools/src/http-payload.ts +++ b/packages/devtools/src/http-payload.ts @@ -1,7 +1,6 @@ import { isRedactedKey } from './forms-privacy.ts'; import type { HydrationMismatch } from './http-hydration.ts'; -import { redactStrings } from './http-redact.ts'; -import { redactJsonText } from './json-text-redact.ts'; +import { redactJsonText, redactStrings } from './redaction.ts'; import { redactText, redactUrl } from './router.ts'; import { isSecretName, REDACTED, serialize } from './serialize.ts'; import type { HydrationStats } from './types.ts'; diff --git a/packages/devtools/src/json-text-redact.ts b/packages/devtools/src/json-text-redact.ts deleted file mode 100644 index 68aa1c78..00000000 --- a/packages/devtools/src/json-text-redact.ts +++ /dev/null @@ -1,55 +0,0 @@ -const REDACTED_VALUE = '"[redacted]"'; - -function stringEnd(text: string, start: number): number { - for (let i = start + 1; i < text.length; i++) { - if (text[i] === '\\') i++; - else if (text[i] === '"') return i + 1; - } - return text.length; -} - -function valueEnd(text: string, start: number): number { - const first = text[start]; - if (first === '"') return stringEnd(text, start); - if (first !== '{' && first !== '[') { - const stop = text.slice(start).search(/[,}\]]/); - return stop < 0 ? text.length : start + stop; - } - let depth = 0; - for (let i = start; i < text.length; i++) { - const ch = text[i]; - if (ch === '"') i = stringEnd(text, i) - 1; - else if (ch === '{' || ch === '[') depth++; - else if ((ch === '}' || ch === ']') && --depth === 0) return i + 1; - } - return text.length; -} - -export function redactJsonText(text: string, isSecret: (key: string) => boolean): string { - const colon = /\s*:\s*/y; - let out = ''; - let i = 0; - while (i < text.length) { - if (text[i] !== '"') { - out += text[i++]; - continue; - } - const end = stringEnd(text, i); - const token = text.slice(i, end); - out += token; - i = end; - colon.lastIndex = i; - const sep = colon.exec(text); - if (!sep) continue; - let key: string; - try { - key = String(JSON.parse(token)); - } catch { - key = token.slice(1, -1); - } - if (!isSecret(key)) continue; - out += `${sep[0]}${REDACTED_VALUE}`; - i = valueEnd(text, i + sep[0].length); - } - return out; -} diff --git a/packages/devtools/src/http-redact.ts b/packages/devtools/src/redaction.ts similarity index 51% rename from packages/devtools/src/http-redact.ts rename to packages/devtools/src/redaction.ts index 934f5554..d3811b44 100644 --- a/packages/devtools/src/http-redact.ts +++ b/packages/devtools/src/redaction.ts @@ -1,11 +1,81 @@ +/** + * The redaction helpers for recorded HTTP calls, JSON text and Analog page + * reports, in one place: `redactJsonText` masks `"key": value` pairs in JSON + * that may be clipped, `redactPreview`, `redactHeaders` and `redactCall` mask + * what the HTTP inspector records, and `redactAnalogReport` masks an Analog + * page report. They build on the shared text masking (`text-redact.ts`, via + * `redactText` and `redactUrl`), the secret key rules (`forms-privacy.ts`) and + * `serialize`, so `redaction.secretNames`, JWTs and bearer tokens are masked + * the same way everywhere. + */ +import type { AnalogRuntimeReport } from './analog-runtime.ts'; import { REDACTED, isRedactedKey } from './forms-privacy.ts'; import { MAX_HEADERS, MAX_HEADER_VALUE, type HeaderRecord } from './http-headers.ts'; import type { HttpCall } from './http-rules.ts'; -import { redactJsonText } from './json-text-redact.ts'; import { redactText, redactUrl } from './router.ts'; import { serialize } from './serialize.ts'; import { clip } from './text.ts'; +// JSON text + +const REDACTED_VALUE = JSON.stringify(REDACTED); + +function stringEnd(text: string, start: number): number { + for (let i = start + 1; i < text.length; i++) { + if (text[i] === '\\') i++; + else if (text[i] === '"') return i + 1; + } + return text.length; +} + +function valueEnd(text: string, start: number): number { + const first = text[start]; + if (first === '"') return stringEnd(text, start); + if (first !== '{' && first !== '[') { + const stop = text.slice(start).search(/[,}\]]/); + return stop < 0 ? text.length : start + stop; + } + let depth = 0; + for (let i = start; i < text.length; i++) { + const ch = text[i]; + if (ch === '"') i = stringEnd(text, i) - 1; + else if (ch === '{' || ch === '[') depth++; + else if ((ch === '}' || ch === ']') && --depth === 0) return i + 1; + } + return text.length; +} + +export function redactJsonText(text: string, isSecret: (key: string) => boolean): string { + const colon = /\s*:\s*/y; + let out = ''; + let i = 0; + while (i < text.length) { + if (text[i] !== '"') { + out += text[i++]; + continue; + } + const end = stringEnd(text, i); + const token = text.slice(i, end); + out += token; + i = end; + colon.lastIndex = i; + const sep = colon.exec(text); + if (!sep) continue; + let key: string; + try { + key = String(JSON.parse(token)); + } catch { + key = token.slice(1, -1); + } + if (!isSecret(key)) continue; + out += `${sep[0]}${REDACTED_VALUE}`; + i = valueEnd(text, i + sep[0].length); + } + return out; +} + +// HTTP calls + const PREVIEW_MAX = 2001; /** Headers whose value is always hidden, whatever `redaction.unmask` says. */ @@ -103,3 +173,53 @@ export function redactCall(call: HttpCall): HttpCall { ...(call.responseHeaders ? { responseHeaders: redactHeaders(call.responseHeaders) } : {}), }; } + +// Analog page reports + +/** Longest URL, `load()` preview and file path kept from a page report. */ +const MAX_URL = 2000; +const MAX_PREVIEW = 1001; +const MAX_PATH = 500; +const MAX_ERROR = 300; + +/** A JWT cut before its signature, which the JWT pattern no longer matches. */ +const PARTIAL_JWT = /eyJ[\w-]*(?:\.[\w-]*)?$/; + +/** + * Clips `value` to twice `max` before redacting it, so an oversized field + * costs little to redact, and to `max` after. A JWT that the first cut splits + * is dropped, so its header and claims cannot slip past the redaction. + */ +function capped(value: string, max: number, redact: (text: string) => string = (t) => t) { + const head = + value.length > max * 2 ? `${value.slice(0, max * 2).replace(PARTIAL_JWT, '')}…` : value; + return clip(redact(head), max); +} + +/** + * Hides secret query values, JWTs, bearer tokens and `redaction.secretNames` + * in the text fields of a page report before it is stored or served, and + * clips each text field. + */ +export function redactAnalogReport(report: AnalogRuntimeReport): AnalogRuntimeReport { + const path = (value: string) => capped(value, MAX_PATH); + return { + ...report, + url: capped(report.url, MAX_URL, redactUrl), + chain: report.chain.map((item) => ({ + ...item, + path: path(item.path), + ...(item.file !== undefined && { file: path(item.file) }), + ...(item.serverFile !== undefined && { serverFile: path(item.serverFile) }), + })), + ...(report.load && { + load: { + ...report.load, + preview: capped(report.load.preview, MAX_PREVIEW, redactPreview), + keys: report.load.keys.map((key) => capped(key, MAX_PATH, redactUrl)), + }, + }), + hydrationErrors: report.hydrationErrors.map((error) => capped(error, MAX_ERROR, redactText)), + configPaths: report.configPaths.map(path), + }; +} diff --git a/packages/devtools/src/rpc/analog-register.ts b/packages/devtools/src/rpc/analog-register.ts index a2e0edbb..fae98bff 100644 --- a/packages/devtools/src/rpc/analog-register.ts +++ b/packages/devtools/src/rpc/analog-register.ts @@ -13,8 +13,7 @@ import { } from '../analog-server-log.ts'; import { existsSync, readdirSync } from 'node:fs'; import { basename, dirname, join } from 'node:path'; -import { redactAnalogReport } from '../analog-redact.ts'; -import { redactHeaders, redactStrings } from '../http-redact.ts'; +import { redactAnalogReport, redactHeaders, redactStrings } from '../redaction.ts'; import { forgetRenders, setPagesAtPath } from '../analog-call-pages.ts'; import type { PayloadSummary } from '../http-payload.ts'; import { diff --git a/packages/devtools/src/rpc/analog-render-check.ts b/packages/devtools/src/rpc/analog-render-check.ts index 75999dd5..5c4b6570 100644 --- a/packages/devtools/src/rpc/analog-render-check.ts +++ b/packages/devtools/src/rpc/analog-render-check.ts @@ -3,7 +3,7 @@ // config gives the route. import { DEVTOOLS_HEADER, devOrigin } from '../analog-server-log.ts'; -import { redactHeaders } from '../http-redact.ts'; +import { redactHeaders } from '../redaction.ts'; import { modeOf, type RenderMode } from './analog-tools.ts'; import type { AnalogProject } from './analog-scan.ts'; diff --git a/packages/devtools/src/rpc/browser-tools.ts b/packages/devtools/src/rpc/browser-tools.ts index 50bbc0b0..bca8ab2e 100644 --- a/packages/devtools/src/rpc/browser-tools.ts +++ b/packages/devtools/src/rpc/browser-tools.ts @@ -1,7 +1,7 @@ import { AsyncLocalStorage } from 'node:async_hooks'; import { argsToJsonSchema, stringifyForMcp } from 'devframe/internal'; import { toAgentToolName } from 'devframe/utils/agent-tool-name'; -import { redactJsonText } from '../json-text-redact.ts'; +import { redactJsonText } from '../redaction.ts'; import { isSecretName, redactText } from '../serialize.ts'; import { setCallerPageReader } from './page-scope.ts'; import { ToolRefusal } from './refusal.ts'; diff --git a/packages/devtools/src/rpc/http-lint.ts b/packages/devtools/src/rpc/http-lint.ts index 984dbbf3..f2dd42bc 100644 --- a/packages/devtools/src/rpc/http-lint.ts +++ b/packages/devtools/src/rpc/http-lint.ts @@ -4,7 +4,7 @@ import { type HttpLintFinding, type HttpLintKind, } from '../http-data.ts'; -import { redactCall } from '../http-redact.ts'; +import { redactCall } from '../redaction.ts'; import type { HttpPage, HttpState } from '../types.ts'; import { code } from './forms-tools.ts'; import { defaultPage } from './default-page.ts'; diff --git a/packages/devtools/src/rpc/http-rule-tools.ts b/packages/devtools/src/rpc/http-rule-tools.ts index cb1e0cc9..8a995ac8 100644 --- a/packages/devtools/src/rpc/http-rule-tools.ts +++ b/packages/devtools/src/rpc/http-rule-tools.ts @@ -1,6 +1,6 @@ import { HTTP_RULE_CHANCE, isFailingRuleStatus, isHttpRuleStatus } from '../config.ts'; import { HTTP_RULE_PRESETS, presetRules } from '../http-data.ts'; -import { redactPreview } from '../http-redact.ts'; +import { redactPreview } from '../redaction.ts'; import { MAX_DELAY_MS, MAX_RULES, diff --git a/packages/devtools/src/rpc/http-tools.ts b/packages/devtools/src/rpc/http-tools.ts index dc21082c..b5adf808 100644 --- a/packages/devtools/src/rpc/http-tools.ts +++ b/packages/devtools/src/rpc/http-tools.ts @@ -1,5 +1,5 @@ import { originText } from '../http-origin.ts'; -import { redactCall } from '../http-redact.ts'; +import { redactCall } from '../redaction.ts'; import type { HttpCall } from '../http-rules.ts'; import { clip } from '../text.ts'; import type { HttpPage, HttpState } from '../types.ts'; diff --git a/packages/devtools/src/rpc/http-waterfall.ts b/packages/devtools/src/rpc/http-waterfall.ts index 4ef830f2..30eb5a04 100644 --- a/packages/devtools/src/rpc/http-waterfall.ts +++ b/packages/devtools/src/rpc/http-waterfall.ts @@ -1,4 +1,4 @@ -import { redactCall } from '../http-redact.ts'; +import { redactCall } from '../redaction.ts'; import type { HttpCall } from '../http-rules.ts'; import type { HttpPage, HttpState } from '../types.ts'; import { code } from './forms-tools.ts'; diff --git a/packages/devtools/src/rpc/router-http.ts b/packages/devtools/src/rpc/router-http.ts index 6f9093d7..51605d5c 100644 --- a/packages/devtools/src/rpc/router-http.ts +++ b/packages/devtools/src/rpc/router-http.ts @@ -1,4 +1,4 @@ -import { redactCall } from '../http-redact.ts'; +import { redactCall } from '../redaction.ts'; import type { HttpCall } from '../http-rules.ts'; import type { NavigationRecord } from '../router.ts'; import { clip, code } from '../text.ts'; diff --git a/packages/devtools/src/rpc/ssr-override-tools.ts b/packages/devtools/src/rpc/ssr-override-tools.ts index 681491db..d34d2263 100644 --- a/packages/devtools/src/rpc/ssr-override-tools.ts +++ b/packages/devtools/src/rpc/ssr-override-tools.ts @@ -1,6 +1,6 @@ import { actionBlockedMessage, type ResolvedPangularConfig } from '../config.ts'; import { byteText, payloadInsights } from '../http-data.ts'; -import { redactPreview } from '../http-redact.ts'; +import { redactPreview } from '../redaction.ts'; import type { PayloadEntry, PayloadSummary } from '../http-payload.ts'; import { redactText, redactUrl } from '../router.ts'; import { From 830c0d41075c8f96c197c3ab53c152d01c0f29f4 Mon Sep 17 00:00:00 2001 From: erKam <erkamyaman35@gmail.com> Date: Sat, 7 Nov 2026 20:14:10 +0000 Subject: [PATCH 05/15] feat: show how many values redaction masked in the panel and agent answers Masked values showed as [redacted] with no sign of how much was hidden. Count the masks the redaction helpers write: the panel shows a short line above an HTTP response preview, the TransferState payload, the NgRx state tree, a form's fields and a component's values, and an agent answer that holds masked values ends with one line. Counting scans what is shown for the mask strings, once per value and with a budget, so it stays cheap and needs no change to how values are masked or pushed. Refs #371 --- app/src/__tests__/redaction-count.test.ts | 47 +++++++++ app/src/pages/component-tree.ts | 3 + app/src/pages/forms-inspector.ts | 3 + app/src/pages/network-inspector.ts | 4 + app/src/pages/store-state-tree.ts | 4 +- app/src/ui/redaction-count.ts | 43 +++++++++ app/tsconfig.json | 3 +- apps/docs/src/content/security.md | 6 ++ packages/devtools/CHANGELOG.md | 2 + packages/devtools/package.json | 3 +- .../src/__tests__/redaction-count.test.ts | 96 +++++++++++++++++++ packages/devtools/src/redaction-count.ts | 67 +++++++++++++ packages/devtools/src/redaction.ts | 5 +- packages/devtools/src/rpc/agent-output.ts | 31 +++++- 14 files changed, 311 insertions(+), 6 deletions(-) create mode 100644 app/src/__tests__/redaction-count.test.ts create mode 100644 app/src/ui/redaction-count.ts create mode 100644 packages/devtools/src/__tests__/redaction-count.test.ts create mode 100644 packages/devtools/src/redaction-count.ts diff --git a/app/src/__tests__/redaction-count.test.ts b/app/src/__tests__/redaction-count.test.ts new file mode 100644 index 00000000..aa37163b --- /dev/null +++ b/app/src/__tests__/redaction-count.test.ts @@ -0,0 +1,47 @@ +import type { Type } from '@angular/core'; +import { TestBed } from '@angular/core/testing'; +import { afterEach, describe, expect, it } from 'vitest'; +import { RedactionCount } from '../ui/redaction-count'; +import { StoreStateTree } from '../pages/store-state-tree'; + +function render<T>(type: Type<T>, inputs: Record<string, unknown>) { + const fixture = TestBed.createComponent(type); + for (const [name, value] of Object.entries(inputs)) fixture.componentRef.setInput(name, value); + fixture.detectChanges(); + return fixture; +} + +describe('RedactionCount', () => { + afterEach(() => TestBed.resetTestingModule()); + + it('says how many values the redaction masked', () => { + const fixture = render(RedactionCount, { + value: { token: '[redacted]', user: { email: '[email]', name: 'Ada' } }, + }); + const line = (fixture.nativeElement as HTMLElement).querySelector('[data-redaction-count]')!; + expect(line.textContent!.replace(/\s+/g, ' ').trim()).toBe( + '2 values masked by redaction (secret names, tokens and emails).', + ); + }); + + it('shows nothing when nothing was masked', () => { + const fixture = render(RedactionCount, { value: { name: 'Ada' } }); + expect( + (fixture.nativeElement as HTMLElement).querySelector('[data-redaction-count]'), + ).toBeNull(); + }); + + it('marks a count past the budget as a lower bound', () => { + const fixture = render(RedactionCount, { + value: Array.from({ length: 30_000 }, () => '[redacted]'), + }); + const line = (fixture.nativeElement as HTMLElement).querySelector('[data-redaction-count]')!; + expect(line.textContent).toContain('At least 20000 values masked'); + }); + + it('shows the count above the store state tree', () => { + const fixture = render(StoreStateTree, { value: { auth: { token: '[redacted]' } } }); + const line = (fixture.nativeElement as HTMLElement).querySelector('[data-redaction-count]')!; + expect(line.textContent).toContain('1 value masked'); + }); +}); diff --git a/app/src/pages/component-tree.ts b/app/src/pages/component-tree.ts index b781febe..53943ab9 100644 --- a/app/src/pages/component-tree.ts +++ b/app/src/pages/component-tree.ts @@ -61,6 +61,7 @@ import { LeaksSection, type LeaksPage } from './leaks-section'; import { VirtualWindow } from '../ui/virtual-window'; import { keepBelowSticky, stickyClearance } from '../ui/sticky-clearance'; import { SearchField } from '../ui/search-field'; +import { RedactionCount } from '../ui/redaction-count'; interface SourceComponent { selector: string; @@ -228,6 +229,7 @@ function storedDirectiveHosts(): boolean { selector: 'app-component-tree', imports: [ SearchField, + RedactionCount, NgTemplateOutlet, Select, CdRecording, @@ -604,6 +606,7 @@ function storedDirectiveHosts(): boolean { </div> @if (shownValues(); as v) { + <app-redaction-count [value]="v" /> @if (propQuery() && !v.count) { <div class="state compact"> <p class="state-title"> diff --git a/app/src/pages/forms-inspector.ts b/app/src/pages/forms-inspector.ts index 76c91460..d054e923 100644 --- a/app/src/pages/forms-inspector.ts +++ b/app/src/pages/forms-inspector.ts @@ -39,6 +39,7 @@ import { type FormSetupError, type WebMcpPage, } from './forms-types'; +import { RedactionCount } from '../ui/redaction-count'; type Tab = 'fields' | 'schema' | 'timeline' | 'submit' | 'lint'; @@ -71,6 +72,7 @@ function countFields(node: FormFieldNode): number { @Component({ selector: 'app-forms-inspector', imports: [ + RedactionCount, FormsActionBar, FormsExportTest, FormsFields, @@ -248,6 +250,7 @@ function countFields(node: FormFieldNode): number { > @switch (tab_()) { @case ('fields') { + <app-redaction-count [value]="form" /> <app-forms-fields [form]="form" [rows]="rows()" diff --git a/app/src/pages/network-inspector.ts b/app/src/pages/network-inspector.ts index b53ffafb..c3c711ac 100644 --- a/app/src/pages/network-inspector.ts +++ b/app/src/pages/network-inspector.ts @@ -40,6 +40,7 @@ import { PayloadInsights } from './network/payload-insights'; import { RuleMatchCount } from './network/rule-match-count'; import { RulePresets } from './network/rule-presets'; import { presetRules } from '@pangular-inspector/devtools/internal/http-data'; +import { RedactionCount } from '../ui/redaction-count'; type HttpSide = 'client' | 'server'; @@ -335,6 +336,7 @@ const HTTP_STATUS_OPTIONS: SelectOption[] = [ LimitNote, NetworkWaterfall, PayloadInsights, + RedactionCount, RovingList, RuleMatchCount, RulePresets, @@ -835,6 +837,7 @@ const HTTP_STATUS_OPTIONS: SelectOption[] = [ Matched rule <code>{{ pattern }}</code> </p> } + <app-redaction-count [value]="detail" /> <!-- A named region, so the focusable scroll box says what it holds. --> <pre class="preview-body" @@ -1337,6 +1340,7 @@ const HTTP_STATUS_OPTIONS: SelectOption[] = [ @if (payload.error) { <p class="bad" role="alert">{{ payload.error }}</p> } + <app-redaction-count [value]="payload.entries" /> <app-payload-insights [size]="payload.size" [entries]="payload.entries" /> <div class="entries"> @for (entry of payload.entries; track entry.key) { diff --git a/app/src/pages/store-state-tree.ts b/app/src/pages/store-state-tree.ts index c085f6be..1e0d59e8 100644 --- a/app/src/pages/store-state-tree.ts +++ b/app/src/pages/store-state-tree.ts @@ -10,6 +10,7 @@ import { } from '@angular/core'; import { short } from './store-types'; import { SearchField } from '../ui/search-field'; +import { RedactionCount } from '../ui/redaction-count'; /** The serializer's type marker: a tagged value shows as one leaf. */ const TYPE = '@type'; @@ -112,8 +113,9 @@ export function stateRows( */ @Component({ selector: 'app-state-tree', - imports: [SearchField], + imports: [SearchField, RedactionCount], template: ` + <app-redaction-count [value]="value()" /> <div class="tree-tools"> <app-search-field class="tree-search" diff --git a/app/src/ui/redaction-count.ts b/app/src/ui/redaction-count.ts new file mode 100644 index 00000000..f7d39770 --- /dev/null +++ b/app/src/ui/redaction-count.ts @@ -0,0 +1,43 @@ +import { Component, computed, input } from '@angular/core'; +import { countRedacted } from '@pangular-inspector/devtools/internal/redaction-count'; + +/** + * Says how many values the redaction masked in what a view shows, such as + * "3 values masked". It counts the masks in `value` once per new value, and + * shows nothing when there are none. + */ +@Component({ + selector: 'app-redaction-count', + template: ` + @if (result().count > 0) { + <p class="count" data-redaction-count> + {{ result().capped ? 'At least ' : '' }}{{ result().count }} + {{ result().count === 1 ? 'value' : 'values' }} masked + <span class="why">{{ why() }}</span> + </p> + } + `, + styles: ` + :host { + display: block; + } + .count { + margin: 0 0 8px; + color: var(--text-2); + font-size: 12px; + line-height: 1.5; + font-variant-numeric: tabular-nums; + } + .why { + color: var(--text-2); + } + `, +}) +export class RedactionCount { + /** What the view shows, already masked by the server or the page. */ + readonly value = input<unknown>(undefined); + /** The second half of the line, saying where the masks come from. */ + readonly why = input('by redaction (secret names, tokens and emails).'); + + protected readonly result = computed(() => countRedacted(this.value())); +} diff --git a/app/tsconfig.json b/app/tsconfig.json index f1da4410..786965b5 100644 --- a/app/tsconfig.json +++ b/app/tsconfig.json @@ -23,7 +23,8 @@ "./**/*.ts", "../packages/devtools/src/config.ts", "../packages/devtools/src/cd-data.ts", - "../packages/devtools/src/http-data.ts" + "../packages/devtools/src/http-data.ts", + "../packages/devtools/src/redaction-count.ts" ], "exclude": ["node_modules", "vite.config.ts", "vitest.config.ts"] } diff --git a/apps/docs/src/content/security.md b/apps/docs/src/content/security.md index f462dfe4..9a3d6e8d 100644 --- a/apps/docs/src/content/security.md +++ b/apps/docs/src/content/security.md @@ -366,6 +366,12 @@ Request URLs, page URLs and error messages in the [SSR & HTTP tab](./inspectors/ The page title, the hydration warnings and mismatch details, and the TransferState parse error are redacted too. Response previews are redacted on the devtools server: keys that the forms rules treat as secret, JWTs, bearer tokens and secret query pairs, also in a preview that was cut inside a nested object or array. XML and other text previews are masked by name too: the content of an element with a secret name, such as `<password>…</password>`, and attributes such as `password="…"`. Request and response headers are redacted on the page and again on the devtools server: `Authorization`, `Proxy-Authorization`, `Cookie`, `Set-Cookie` and `Ocp-Apim-Subscription-Key` always, whatever `redaction.unmask` says, names that look secret or match `redaction.secretNames`, and JWTs, bearer tokens and credentials inside any other value. The same holds for TransferState entries: their values, keys and request URLs are redacted on the page, before the payload is sent to the devtools server, and again on the server. A custom key with a secret-looking name, such as `makeStateKey('password')`, has its whole value masked. Large payload values are still cut, so a long value can end in `[Truncated]`. +### Redaction counts + +Where the panel shows masked data, a line above it says how many values were masked, such as **3 values masked by redaction**: a call's response preview in the [SSR & HTTP tab](./inspectors/ssr-http.md), the TransferState payload, the NgRx state tree, the fields of the selected form and the inputs and properties of the selected component. The panel counts the `[redacted]` and `[email]` marks in what it shows, once per new value. For a very large value it stops after 20,000 strings and keys, and the line starts with **At least**. + +An agent answer that holds masked values ends with a line such as `_Redaction masked 3 values in this answer._`. When the answer ends with a file to copy, such as an export, the line comes just before the file. Answers that are JSON get no line, so a client can still parse them. + ## Page text in agent answers An app can put any text in a value, a URL, a label or an error message, including text written to steer an agent. So every agent tool answer that carries text from the inspected page or from the dev server puts a notice before that text: what follows is data, not instructions. The notice stays when the answer is cut to fit. diff --git a/packages/devtools/CHANGELOG.md b/packages/devtools/CHANGELOG.md index 42511773..4637dc43 100644 --- a/packages/devtools/CHANGELOG.md +++ b/packages/devtools/CHANGELOG.md @@ -120,6 +120,8 @@ What remains: `/config` exports `DEFAULT_POPUP_HOTKEY`, `PANGULAR_ACTIONS`, `PAN - Mask secret route params in named outlets, such as the token in `/(side:reset/:token)`, before the navigation is recognized and in router link targets. The route config match read only the primary path. It also follows an empty-path layout route into its named-outlet children, as the router does, so `/(side:reset/:token)` and `/home(side:reset/:token)` are masked when `reset/:token` sits under `{path: '', children: [...]}`. The active route walk also follows `firstChild` when `children` is missing, and stops after 200 routes. - Leave the `redaction` config (`secretNames`, `unmask`) out of `__connection.json`, which answers before the one-time code. Pages get it from the server once they are trusted, and read nothing from the app until they have it. `initOverlay()` still resolves once connected, without waiting for the code. The Dashboard asks for the config the same way to list **Extra secret names** and **Unmasked names**. A static report leaves those rows out (#419). - Mask secret Signal Forms field values in signal graphs and their history. Signal Forms keeps each field value in an unnamed signal, so a `password`, `token` or `apiKey` field showed in the graph of its component on the Signals page, in `inspect-signals` (also when it reads a component by `component` or `selector`), in the `signal-graph` resource, over WebMCP and in the static report. The page now masks the values of the component's secret fields (by name, `redaction.secretNames`, `type="password"`, a credential `autocomplete` or a mask marker, and their last 50 values) in every node, resource and history entry before the graph leaves it. +- **Redaction counts.** Where the panel shows masked data (an HTTP response preview, the TransferState payload, the NgRx state tree, a form's fields and a component's inputs and properties), a line says how many values were masked. Agent answers that hold masked values end with `_Redaction masked N values in this answer._` (#371). +- The HTTP, JSON text and Analog redaction helpers live in one module, `redaction.ts` (#371). ### Features diff --git a/packages/devtools/package.json b/packages/devtools/package.json index f093aac9..2c1e57d8 100644 --- a/packages/devtools/package.json +++ b/packages/devtools/package.json @@ -53,7 +53,8 @@ "./vite": "./src/entries/vite.ts", "./internal/config": "./src/config.ts", "./internal/types": "./src/panel-types.ts", - "./internal/http-data": "./src/http-data.ts" + "./internal/http-data": "./src/http-data.ts", + "./internal/redaction-count": "./src/redaction-count.ts" }, "publishConfig": { "main": "./dist/devframe.mjs", diff --git a/packages/devtools/src/__tests__/redaction-count.test.ts b/packages/devtools/src/__tests__/redaction-count.test.ts new file mode 100644 index 00000000..708a7505 --- /dev/null +++ b/packages/devtools/src/__tests__/redaction-count.test.ts @@ -0,0 +1,96 @@ +import { createHostContext } from 'devframe/node'; +import { describe, expect, it } from 'vitest'; +import pangular from '../devframe.ts'; +import { REDACTED } from '../forms-privacy.ts'; +import { + countRedacted, + countRedactedText, + EMAIL_ADDRESS_MASK, + REDACTED_MASK, + redactionNote, +} from '../redaction-count.ts'; +import { redactCall } from '../redaction.ts'; +import { withRedactionNote } from '../rpc/agent-output.ts'; +import { UNTRUSTED } from '../rpc/forms-tools.ts'; +import { EMAIL_MASK } from '../text-redact.ts'; +import { answerText } from './tool-answer.ts'; + +const JWT = ['eyJhbGciOiJIUzI1NiJ9', 'eyJzdWIiOiIxMjM0NSJ9', 'c2lnbmF0dXJlc2ln'].join('.'); + +describe('redaction counts', () => { + it('counts the masks the redaction helpers write', () => { + expect(REDACTED_MASK).toBe(REDACTED); + expect(EMAIL_ADDRESS_MASK).toBe(EMAIL_MASK); + const call = redactCall({ + id: 'h1', + url: `/api/me?token=${JWT}&user=ada@example.com`, + method: 'GET', + status: 200, + durationMs: 1, + side: 'client', + cacheHit: false, + faulted: false, + at: 1, + requestHeaders: { authorization: `Bearer ${JWT}`, accept: 'application/json' }, + }); + expect(countRedacted(call)).toEqual({ count: 3, capped: false }); + expect(countRedactedText(JSON.stringify(call))).toBe(3); + }); + + it('reads keys and strings once, survives cycles and stops at its budget', () => { + const value: Record<string, unknown> = { a: '[redacted]', '[redacted]': 1, list: ['[email]'] }; + value['self'] = value; + expect(countRedacted(value)).toEqual({ count: 3, capped: false }); + const big = Array.from({ length: 100 }, () => '[redacted]'); + expect(countRedacted(big, 10)).toEqual({ count: 10, capped: true }); + expect(countRedacted(42)).toEqual({ count: 0, capped: false }); + }); + + it('adds a short line to an answer with masked values, and leaves others alone', () => { + expect(withRedactionNote('Nothing to hide.')).toBe('Nothing to hide.'); + expect(withRedactionNote('token=[redacted], key=[redacted]')).toBe( + `token=[redacted], key=[redacted]\n\n${redactionNote(2)}`, + ); + expect(redactionNote(1)).toBe('_Redaction masked 1 value in this answer._'); + const json = `${UNTRUSTED}\n\n{"token":"[redacted]"}`; + expect(withRedactionNote(json)).toBe(json); + const file = 'The export.\n\n```json\n{"token":"[redacted]"}\n```'; + expect(withRedactionNote(file)).toBe( + `The export.\n\n${redactionNote(1)}\n\n\`\`\`json\n{"token":"[redacted]"}\n\`\`\``, + ); + }); + + it('ends an agent answer that carries masked values with the count', async () => { + 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); + await ctx.rpc.invokeLocal( + 'pangular:push-http' as never, + ...([ + { + pageId: 'tab1', + url: '/trips', + payload: { entries: [] }, + calls: [ + { + id: 'h1', + url: `/api/me?token=${JWT}`, + method: 'GET', + status: 200, + durationMs: 3, + side: 'client', + at: Date.now(), + }, + ], + }, + ] as never), + ); + const text = await answerText(ctx.agent.invoke('pangular:list-http-calls', {})); + expect(text).not.toContain(JWT); + expect(text).toMatch(/_Redaction masked \d+ values? in this answer\._$/); + }); +}); diff --git a/packages/devtools/src/redaction-count.ts b/packages/devtools/src/redaction-count.ts new file mode 100644 index 00000000..c957d84e --- /dev/null +++ b/packages/devtools/src/redaction-count.ts @@ -0,0 +1,67 @@ +// How many values the redaction masked in what the panel or an agent sees. +// The panel imports this file through +// `@pangular-inspector/devtools/internal/redaction-count`, so it imports +// nothing. `redaction-count.test.ts` checks that the masks below are the ones +// the redaction helpers write. + +/** What a masked value becomes (`REDACTED` in `forms-privacy.ts`). */ +export const REDACTED_MASK = '[redacted]'; +/** What an email address in a URL becomes (`EMAIL_MASK` in `text-redact.ts`). */ +export const EMAIL_ADDRESS_MASK = '[email]'; + +const MASKS = [REDACTED_MASK, EMAIL_ADDRESS_MASK]; + +/** Most strings and keys `countRedacted` reads, so a large state stays cheap to count. */ +export const COUNT_BUDGET = 20_000; + +/** + * The masks in a text: one `indexOf` scan per mask, which costs little next + * to building the text. Redaction already ran; this only counts its marks. + */ +export function countRedactedText(text: string): number { + let count = 0; + for (const mask of MASKS) { + for (let at = text.indexOf(mask); at >= 0; at = text.indexOf(mask, at + mask.length)) count++; + } + return count; +} + +/** + * The masks in a value the panel shows: in its strings and its keys, walked + * once. It stops after `budget` strings and keys, so the count of a very + * large value is a lower bound (`capped`). + */ +export function countRedacted( + value: unknown, + budget = COUNT_BUDGET, +): { count: number; capped: boolean } { + let count = 0; + let left = budget; + const seen = new Set<object>(); + const stack: unknown[] = [value]; + while (stack.length) { + const item = stack.pop(); + if (typeof item === 'string') { + if (--left < 0) return { count, capped: true }; + count += countRedactedText(item); + continue; + } + if (item === null || typeof item !== 'object' || seen.has(item)) continue; + seen.add(item); + if (Array.isArray(item)) { + for (const entry of item) stack.push(entry); + continue; + } + for (const [key, entry] of Object.entries(item)) { + if (--left < 0) return { count, capped: true }; + count += countRedactedText(key); + stack.push(entry); + } + } + return { count, capped: false }; +} + +/** The short line an agent answer ends with when it holds masked values. */ +export function redactionNote(count: number): string { + return `_Redaction masked ${count} value${count === 1 ? '' : 's'} in this answer._`; +} diff --git a/packages/devtools/src/redaction.ts b/packages/devtools/src/redaction.ts index d3811b44..ace9431b 100644 --- a/packages/devtools/src/redaction.ts +++ b/packages/devtools/src/redaction.ts @@ -6,7 +6,8 @@ * page report. They build on the shared text masking (`text-redact.ts`, via * `redactText` and `redactUrl`), the secret key rules (`forms-privacy.ts`) and * `serialize`, so `redaction.secretNames`, JWTs and bearer tokens are masked - * the same way everywhere. + * the same way everywhere. `countRedacted` and `countRedactedText` count the + * masks they left, for the counts the panel and agent answers show. */ import type { AnalogRuntimeReport } from './analog-runtime.ts'; import { REDACTED, isRedactedKey } from './forms-privacy.ts'; @@ -16,6 +17,8 @@ import { redactText, redactUrl } from './router.ts'; import { serialize } from './serialize.ts'; import { clip } from './text.ts'; +export { countRedacted, countRedactedText, redactionNote } from './redaction-count.ts'; + // JSON text const REDACTED_VALUE = JSON.stringify(REDACTED); diff --git a/packages/devtools/src/rpc/agent-output.ts b/packages/devtools/src/rpc/agent-output.ts index d2f0052e..87c105d7 100644 --- a/packages/devtools/src/rpc/agent-output.ts +++ b/packages/devtools/src/rpc/agent-output.ts @@ -1,4 +1,6 @@ +import { countRedactedText, redactionNote } from '../redaction-count.ts'; import { mcpContentOf } from './refusal.ts'; +import { UNTRUSTED } from './forms-tools.ts'; /** What a markdown agent tool handler answers: the text an agent reads. */ export interface MarkdownAnswer { @@ -24,7 +26,32 @@ export function answerText(result: unknown): unknown { return typeof record.markdown === 'string' ? record.markdown : result; } -/** `handler`, answering with {@link answerText} of its result. */ +/** + * A markdown answer that holds masked values, with a last line that says how + * many (`redactionNote`). Counting is one scan of the finished text for the + * masks the redaction helpers write, so it costs little next to building the + * answer. JSON answers stay JSON a client can parse, so they get no line, + * and an answer that ends with a fenced file gets the line above the file. + */ +export function withRedactionNote(text: string): string { + const body = text.startsWith(UNTRUSTED) ? text.slice(UNTRUSTED.length).trimStart() : text; + if (body.startsWith('{') || body.startsWith('[')) return text; + const count = countRedactedText(text); + if (!count) return text; + // An answer that ends with a file to copy (an export) keeps the file last. + const trimmed = text.trimEnd(); + const closing = trimmed.endsWith('```') ? trimmed.lastIndexOf('\n```') : -1; + const fence = closing > 0 ? trimmed.lastIndexOf('\n```', closing - 1) : -1; + if (fence > 0) { + return `${text.slice(0, fence).trimEnd()}\n\n${redactionNote(count)}\n${text.slice(fence)}`; + } + return `${text}\n\n${redactionNote(count)}`; +} + +/** `handler`, answering with {@link answerText} of its result, noting the values redaction masked. */ export function answeringText<A, R>(handler: (args: A) => R): (args: A) => Promise<unknown> { - return async (args: A) => answerText(await handler(args)); + return async (args: A) => { + const answer = answerText(await handler(args)); + return typeof answer === 'string' ? withRedactionNote(answer) : answer; + }; } From f23744795cb463e79e2a0e086a74070517eef0a5 Mon Sep 17 00:00:00 2001 From: erKam <erkamyaman35@gmail.com> Date: Sat, 7 Nov 2026 20:26:49 +0000 Subject: [PATCH 06/15] feat(overlay): tap-to-pick and a box highlight for NativeScript and Angular Native The device overlays had no picker, and their highlight wrote a border or an outline style onto the app's own view. Add native-pick.ts, which follows component-pick.ts: a pick catches the next tap over the whole app, keeps it from the app and answers with the component that hosts the tapped view, and panel keys move between components. The highlight is a box in a layer of its own. NativeScript draws it and catches taps with a UIView or Android View added to the window; Angular Native uses the engine's createElement, measure and a capturing responder on the root. The old border and outline stay as the fallback, and the panel now shows Pick component on device. Tested with fake view trees, UIKit, Android and engine objects only; none of it ran on a device. Refs #371 --- app/src/__tests__/native-controls.test.ts | 3 +- app/src/pages/component-tree.ts | 41 +- .../content/getting-started/angular-native.md | 30 +- .../content/getting-started/nativescript.md | 30 +- .../docs/src/content/inspectors/components.md | 2 + packages/devtools/CHANGELOG.md | 1 + .../src/__tests__/native-pick.test.ts | 595 ++++++++++++++++++ packages/devtools/src/native-pick.ts | 301 +++++++++ .../src/overlay-angular-native-surface.ts | 134 ++++ .../src/overlay-angular-native-views.ts | 12 +- .../devtools/src/overlay-angular-native.ts | 26 +- .../src/overlay-nativescript-surface.ts | 200 ++++++ .../src/overlay-nativescript-views.ts | 3 + packages/devtools/src/overlay-nativescript.ts | 54 +- 14 files changed, 1377 insertions(+), 55 deletions(-) create mode 100644 packages/devtools/src/__tests__/native-pick.test.ts create mode 100644 packages/devtools/src/native-pick.ts create mode 100644 packages/devtools/src/overlay-angular-native-surface.ts create mode 100644 packages/devtools/src/overlay-nativescript-surface.ts diff --git a/app/src/__tests__/native-controls.test.ts b/app/src/__tests__/native-controls.test.ts index 95a82bee..7214a035 100644 --- a/app/src/__tests__/native-controls.test.ts +++ b/app/src/__tests__/native-controls.test.ts @@ -100,11 +100,12 @@ describe('browser-only controls', () => { }); it.each(['angular-native', 'nativescript'])( - 'hides the picker and the live views for a %s page, and keeps recording and the tree', + 'offers the device picker, hides the live views for a %s page, and keeps recording and the tree', async (platform) => { const fixture = await render(platform); const host = fixture.nativeElement as HTMLElement; expect(buttons(fixture)).not.toContain('Pick component on page'); + expect(buttons(fixture)).toContain('Pick component on device'); expect(buttons(fixture)).toContain('Record'); expect(host.querySelector('#cd-heading')).not.toBeNull(); expect(buttons(fixture)).not.toContain('Flash checks'); diff --git a/app/src/pages/component-tree.ts b/app/src/pages/component-tree.ts index 53943ab9..7c91ef80 100644 --- a/app/src/pages/component-tree.ts +++ b/app/src/pages/component-tree.ts @@ -319,20 +319,18 @@ function storedDirectiveHosts(): boolean { </svg> <span class="label">Collapse all</span> </button> - @if (!native()) { - <button - type="button" - class="pick" - [class.on]="picking()" - [attr.title]="pickLabel()" - (click)="picking() ? cancelPick() : pick()" - > - <svg viewBox="0 0 24 24" aria-hidden="true"> - <path d="M4 4l6.5 16 2.3-6.7L19.5 11z" /> - </svg> - <span class="label">{{ pickLabel() }}</span> - </button> - } + <button + type="button" + class="pick" + [class.on]="picking()" + [attr.title]="pickLabel()" + (click)="picking() ? cancelPick() : pick()" + > + <svg viewBox="0 0 24 24" aria-hidden="true"> + <path d="M4 4l6.5 16 2.3-6.7L19.5 11z" /> + </svg> + <span class="label">{{ pickLabel() }}</span> + </button> </div> </div> <p class="sr-only" role="status">{{ announcement() }}</p> @@ -1910,7 +1908,13 @@ export class ComponentTree { readonly focusId = signal<string | null>(null); /** The full text of the focused row when its name or tag is cut off, shown below the row. */ readonly nameTip = signal<{ text: string; top: number } | null>(null); - readonly pickLabel = computed(() => (this.picking() ? 'Cancel pick' : 'Pick component on page')); + readonly pickLabel = computed(() => + this.picking() + ? 'Cancel pick' + : this.native() + ? 'Pick component on device' + : 'Pick component on page', + ); private readonly bridge = inject(ExtensionBridge); readonly actionMessage = linkedSignal<string | null, string>({ source: this.selectedId, @@ -2303,8 +2307,7 @@ export class ComponentTree { } if (command.kind === 'pick') { untracked(() => { - if (this.native()) this.say('Picking needs a page in a browser.'); - else if (!this.picking()) void this.pick(); + if (!this.picking()) void this.pick(); this.commandHandled.emit(); }); return; @@ -2618,7 +2621,9 @@ export class ComponentTree { this.pickPageId = this.page()?.pageId ?? null; this.picking.set(true); this.say( - 'Click a component in the app, or use the arrow keys to move between components and Enter to pick one. Press Escape to cancel.', + this.native() + ? 'Tap a component on the device, or use the arrow keys to move between components and Enter to pick one. Press Escape to cancel.' + : 'Click a component in the app, or use the arrow keys to move between components and Enter to pick one. Press Escape to cancel.', ); const result = (await client .scope('pangular') diff --git a/apps/docs/src/content/getting-started/angular-native.md b/apps/docs/src/content/getting-started/angular-native.md index 681ddee9..ee3f36ef 100644 --- a/apps/docs/src/content/getting-started/angular-native.md +++ b/apps/docs/src/content/getting-started/angular-native.md @@ -15,27 +15,26 @@ This page describes what the overlay shows and how it works. To add it to an app ## What it shows -| Tab | On Angular Native | -| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Components | The component tree, paths and the detail panel. Pointing at a component in the panel outlines it on the device. **Change detection** records cycles with their causes and OnPush hints, and **Leaks** lists effects and subscriptions, with navigations counted from the app's Router. | -| Signals | The signal graph of the selected component, or of the first component with signals. There is no routed component to pick. | -| Injectors | Element injectors, including `<ng-container>` anchors, and environment injectors with their providers. **Show value** reads a created provider's value, and **Startup** shows the Angular version and when the app was first stable. | -| Store | Live `@ngrx/signals` and `@ngrx/store` state, the change log, sessions and restore, and NGXS, Elf and MiniRx stores. See [Other stores on a device](#other-stores-on-a-device). | -| Queries | The TanStack Query clients the app injected, with their queries and mutations. | -| Pipes | The pipes in use, with their instances and the components that use them. Recording pipe calls works as in the browser. | -| Errors | Errors from Angular's `ErrorHandler` and React Native's global error handler, the console, and the NG0100 and missing provider explainers. | -| Audit | The findings of change detection, leaks and errors, and before and after sessions. axe has no DOM to check. | -| Plugins | The views of [page plugins](../guides/write-a-plugin.md) the app registers. | +| Tab | On Angular Native | +| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Components | The component tree, paths and the detail panel. Pointing at a component in the panel draws a box over it on the device, and **Pick component on device** selects the component you tap. **Change detection** records cycles with their causes and OnPush hints, and **Leaks** lists effects and subscriptions, with navigations counted from the app's Router. | +| Signals | The signal graph of the selected component, or of the first component with signals. There is no routed component to pick. | +| Injectors | Element injectors, including `<ng-container>` anchors, and environment injectors with their providers. **Show value** reads a created provider's value, and **Startup** shows the Angular version and when the app was first stable. | +| Store | Live `@ngrx/signals` and `@ngrx/store` state, the change log, sessions and restore, and NGXS, Elf and MiniRx stores. See [Other stores on a device](#other-stores-on-a-device). | +| Queries | The TanStack Query clients the app injected, with their queries and mutations. | +| Pipes | The pipes in use, with their instances and the components that use them. Recording pipe calls works as in the browser. | +| Errors | Errors from Angular's `ErrorHandler` and React Native's global error handler, the console, and the NG0100 and missing provider explainers. | +| Audit | The findings of change detection, leaks and errors, and before and after sessions. axe has no DOM to check. | +| Plugins | The views of [page plugins](../guides/write-a-plugin.md) the app registers. | The source scans (routes, pipes, NgRx declarations) come from the server, so they work as with the [Standalone CLI](./cli.md). There is no in-app popup. ### What needs a browser -These features read or draw the DOM, or run in the browser, so an Angular Native app has none of them. The panel hides the picker and the live views for the app, **Run axe** says the app has no DOM, and the agent tools answer the same instead of asking another tab. +These features read or draw the DOM, or run in the browser, so an Angular Native app has none of them. The panel hides the live views for the app, **Run axe** says the app has no DOM, and the agent tools answer the same instead of asking another tab. | Feature | Why it is missing | | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Pick component on page** | Picking listens for a click on a DOM element. | | **Flash checks**, **Performance track** and **Angular profiling** | They draw over DOM elements or into the browser's Performance panel. | | Checks that changed nothing | The recording counts them by watching DOM updates. | | Destroyed and retained instances in **Leaks** | A development build keeps every destroyed instance in Angular's DI debug data, so only a detached view would show a leak, and telling one apart asks Angular about a DOM element. | @@ -43,7 +42,7 @@ These features read or draw the DOM, or run in the browser, so an Angular Native | axe, `screenshot-component`, hydration and the console handles | They read or copy the DOM. | | Router, Forms and SSR & HTTP tabs | The Angular Native overlay does not collect them. | -The controls stay for browser pages. Hovering a row still outlines the component on the device. +The controls stay for browser pages. Hovering a row still draws a box over the component on the device. ## Where it shows in the panel @@ -99,7 +98,8 @@ The hook does nothing when `ngDevMode` is off. Without it, only stores created a - **Reporting**: the app polls every `intervalMs`, sends a report only when it changed (with a keepalive), and reconnects after `retryMs` when the server restarts or the socket drops. It keeps one page id until the overlay stops. The **Leaks** scan walks the tree again when the component tree changed, and at least every 30 seconds. - **Angular version**: change detection recording and **Startup** read the version from the `ng-version` value *Angular sets on the root host. When the renderer keeps none, recording stays off and the **Change detection** section says the page has no profiler, as in a browser, since taking Angular's profiler without knowing the version could evict another one for good. - **Errors**: the overlay wraps the app's `ErrorHandler`, listens to the console, and hears React Native's global error handler (`ErrorUtils`), which it calls on with every error and puts back when the overlay stops. -- **Highlight**: when the panel or the `highlight` agent tool points at a component, the overlay sets `outlineWidth`, `outlineStyle` and `outlineColor` in the view's inline style, and restores the previous values when the panel clears it. +- **Highlight**: when the panel or the `highlight` agent tool points at a component, the overlay measures the view with the engine and adds a `view` node of its own to the root, with a 2 px `#68b6ff` border and `pointerEvents: 'none'`, so no view of the app changes. The collectors leave the box out of the tree. It goes away when the panel clears it. If the engine can't create or measure nodes, the overlay sets `outlineWidth`, `outlineStyle` and `outlineColor` in the view's inline style instead, and restores the previous values afterwards. +- **Pick**: **Pick component on device** sets a capturing responder on the root, so the root takes the next touch before the app's own responders. The overlay selects the component that hosts the node the touch landed on, and removes the responder. The arrow keys in the panel move between components as in a browser. A pick ends after 15 seconds without a tap. ## FAQ diff --git a/apps/docs/src/content/getting-started/nativescript.md b/apps/docs/src/content/getting-started/nativescript.md index bab9b231..4a73caf3 100644 --- a/apps/docs/src/content/getting-started/nativescript.md +++ b/apps/docs/src/content/getting-started/nativescript.md @@ -15,17 +15,17 @@ This page describes what the overlay shows and how it works. To add it to an app ## What it shows -| Tab | On NativeScript | -| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Components | The component tree, paths and the detail panel. Pointing at a component in the panel outlines it on the device. **Change detection** records cycles with their causes and OnPush hints, and **Leaks** lists effects and subscriptions, with navigations counted from the app's Router. | -| Signals | The signal graph of the selected component, with its write history. | -| Injectors | Element injectors and environment injectors with their providers. **Show value** reads a created provider's value, and **Startup** shows the Angular version and when the app was first stable. | -| Store | Live `@ngrx/signals` and `@ngrx/store` state, the change log, sessions and restore, and NGXS stores. The store list names the app `NativeScript (iOS)` or `NativeScript (Android)`. | -| Queries | The TanStack Query clients the app injected, with their queries and mutations. | -| Pipes | The pipes in use, with their instances and the components that use them. | -| Errors | Errors from Angular's `ErrorHandler` and the `Application` `uncaughtError` and `discardedError` events, the console, and the NG0100 and missing provider explainers. | -| Audit | The findings of change detection, leaks and errors, and before and after sessions. axe has no DOM to check. | -| Plugins | The views of [page plugins](../guides/write-a-plugin.md) the app registers. | +| Tab | On NativeScript | +| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Components | The component tree, paths and the detail panel. Pointing at a component in the panel draws a box over it on the device, and **Pick component on device** selects the component you tap. **Change detection** records cycles with their causes and OnPush hints, and **Leaks** lists effects and subscriptions, with navigations counted from the app's Router. | +| Signals | The signal graph of the selected component, with its write history. | +| Injectors | Element injectors and environment injectors with their providers. **Show value** reads a created provider's value, and **Startup** shows the Angular version and when the app was first stable. | +| Store | Live `@ngrx/signals` and `@ngrx/store` state, the change log, sessions and restore, and NGXS stores. The store list names the app `NativeScript (iOS)` or `NativeScript (Android)`. | +| Queries | The TanStack Query clients the app injected, with their queries and mutations. | +| Pipes | The pipes in use, with their instances and the components that use them. | +| Errors | Errors from Angular's `ErrorHandler` and the `Application` `uncaughtError` and `discardedError` events, the console, and the NG0100 and missing provider explainers. | +| Audit | The findings of change detection, leaks and errors, and before and after sessions. axe has no DOM to check. | +| Plugins | The views of [page plugins](../guides/write-a-plugin.md) the app registers. | The source scans (routes, pipes, NgRx declarations) come from the server, so they work as with the [Standalone CLI](./cli.md). There is no in-app popup. @@ -33,11 +33,10 @@ The server's [configuration](./configuration.md) applies to the app: inspectors ### What needs a browser -These features read or draw the DOM, or run in the browser, so a NativeScript app has none of them. The panel hides the picker and the live views for the app, **Run axe** says the app has no DOM, and the agent tools answer the same instead of asking another tab. +These features read or draw the DOM, or run in the browser, so a NativeScript app has none of them. The panel hides the live views for the app, **Run axe** says the app has no DOM, and the agent tools answer the same instead of asking another tab. | Feature | Why it is missing | | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Pick component on page** | Picking listens for a click on a DOM element. | | **Flash checks**, **Performance track** and **Angular profiling** | They draw over DOM elements or into the browser's Performance panel. | | Checks that changed nothing | The recording counts them by watching DOM updates. | | Destroyed and retained instances in **Leaks** | A development build keeps every destroyed instance in Angular's DI debug data, so only a detached view would show a leak, and telling one apart asks Angular about a DOM element. | @@ -45,7 +44,7 @@ These features read or draw the DOM, or run in the browser, so a NativeScript ap | axe, `screenshot-component`, hydration and the console handles | They read or copy the DOM. | | Router, Forms and SSR & HTTP tabs | The NativeScript overlay does not collect them. | -Hovering a row still outlines the component on the device. +Hovering a row still draws a box over the component on the device. ## Where it shows in the panel @@ -104,7 +103,8 @@ The overlay marks its component reports with `platform: 'nativescript'`, the URL - **Store stand-in**: `initNativeScriptOverlay()` puts the [Redux DevTools stand-in](../inspectors/ngrx-store.md#other-stores) in place before the app starts, so NGXS stores report without the `store-hook` entry. A store library that looks for the extension on `window` finds nothing there, since a NativeScript app has no `window` once it started. When the server turns the `ngrx` inspector off, the overlay removes it again. - **Angular version**: change detection recording and **Startup** read the version from the `ng-version` value *Angular sets on the root view. When the renderer keeps none, recording stays off and the **Change detection** section says the page has no profiler, as in a browser, since taking Angular's profiler without knowing the version could evict another one for good. - **Reporting**: the app collects every `intervalMs` and sends a report when it changed. The **Leaks** scan walks the views again when the component tree changed, and at least every 30 seconds. When a report has not changed for a while, the app asks the server whether it still holds it, and sends it again only if not. When the connection fails or drops, it logs one warning and tries again every `retryMs`. The app keeps one page id for as long as the overlay runs, so a reconnect does not show it as a new page. -- **Highlight**: when the panel or the `highlight` agent tool points at a component, the overlay sets a 2 px `#68b6ff` border on the first view under the host that draws something. It restores the previous border when the pointer leaves the row, after the duration the `highlight` tool asks for, or after two seconds. +- **Highlight**: when the panel or the `highlight` agent tool points at a component, the overlay adds a native view of its own to the app's window, a `UIView` on iOS and a `View` on Android, with a 2 px `#68b6ff` border over the first view under the host that draws something. The box ignores touches, and no view of the app changes. It goes away when the pointer leaves the row, after the duration the `highlight` tool asks for, or after two seconds. If the overlay can't add the view, it sets the border on the app's view instead and restores it afterwards. +- **Pick**: **Pick component on device** adds a clear view over the whole window that catches the next tap, so the tap doesn't reach the app. The overlay finds the deepest laid-out view under the tap, selects the component that hosts it, and removes the view. The arrow keys in the panel move between components as in a browser, with the box on the one shown. A pick ends after 15 seconds without a tap. ## FAQ diff --git a/apps/docs/src/content/inspectors/components.md b/apps/docs/src/content/inspectors/components.md index 2dcbee13..a9d61a14 100644 --- a/apps/docs/src/content/inspectors/components.md +++ b/apps/docs/src/content/inspectors/components.md @@ -386,6 +386,8 @@ On Angular 20 and later, the page reads the tree about 250 ms after Angular runs While picking, presses and clicks in the app don't reach it, so menus and drag handles stay as they are. +For an app on a device ([NativeScript](../getting-started/nativescript.md) or [Angular Native](../getting-started/angular-native.md)), the button reads **Pick component on device**. Tap a component on the simulator or device, and the tab selects the component that hosts the view you tapped. The tap doesn't reach the app. + You can also pick with the keyboard, from the panel or with focus in the app: | Key | What it does | diff --git a/packages/devtools/CHANGELOG.md b/packages/devtools/CHANGELOG.md index 4637dc43..5a34f5bf 100644 --- a/packages/devtools/CHANGELOG.md +++ b/packages/devtools/CHANGELOG.md @@ -178,6 +178,7 @@ What remains: `/config` exports `DEFAULT_POPUP_HOTKEY`, `PANGULAR_ACTIONS`, `PAN - **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). - **Components:** a **Pipes in template** block lists the pipes the selected component's template uses on the page, and opens one in the **Pipes** tab (#369). - Angular Native and NativeScript pages report change detection, leaks, errors, stores, TanStack Query, provider values, plugins and startup timing too (#407). +- **Tap-to-pick and a box highlight on devices.** For NativeScript and Angular Native apps, **Pick component on device** selects the component behind the next tap on the simulator or device, and the arrow keys move between components. The highlight is a box in a native view of its own instead of a border or outline on the app's view, which stays as the fallback (#371). - Angular features are detected at runtime, and the panel says what an older version lacks. - **Injectors:** selecting an element injector reads it again on the page, and **Refresh** in the toolbar reads every injector again. Element injectors are still cached between updates, since reading what they inject is costly. - **Injectors:** the Environment view lists lazy route injectors the router already loaded but no rendered element uses, with an **inactive** chip. `inspect-providers` and the `injector-tree` resource mark them `inactive: true`. diff --git a/packages/devtools/src/__tests__/native-pick.test.ts b/packages/devtools/src/__tests__/native-pick.test.ts new file mode 100644 index 00000000..bae0af40 --- /dev/null +++ b/packages/devtools/src/__tests__/native-pick.test.ts @@ -0,0 +1,595 @@ +// Tap-to-pick and the box highlight on a device, with fakes in place of the +// device: a fake view tree, a fake UIKit and Android SDK, and a fake +// `@ng-native/fabric` engine. None of this ran on a simulator or a phone. +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; +import { elementId } from '../element-id.ts'; +import type { HostTree } from '../host-tree.ts'; +import { + clearNativeHighlight, + registerNativePick, + showNativeHighlight, + startNativePick, + viewAt, + type NativeFrame, + type NativeSurface, +} from '../native-pick.ts'; +import { angularNativeSurface, isOverlayNode } from '../overlay-angular-native-surface.ts'; +import { angularNativeTree, type AngularNativeNode } from '../overlay-angular-native-views.ts'; +import { + androidPlatform, + iosPlatform, + nativeScriptSurface, +} from '../overlay-nativescript-surface.ts'; +import { nativeScriptTree, type NativeView } from '../overlay-nativescript-views.ts'; + +// --------------------------------------------------------------------------- +// A small view tree: root(app) > list > [card(Card) > label, card2(Card)] + +interface Box { + name: string; + children: Box[]; + parent: Box | null; + frame: NativeFrame | null; +} + +function box(name: string, frame: NativeFrame | null, children: Box[] = []): Box { + const node: Box = { name, children, parent: null, frame }; + for (const child of children) child.parent = node; + return node; +} + +function scene() { + const label = box('label', { x: 10, y: 10, width: 50, height: 20 }); + const card = box('card', { x: 0, y: 0, width: 100, height: 50 }, [label]); + const card2 = box('card2', { x: 0, y: 60, width: 100, height: 50 }); + // The list is a proxy container: no frame of its own. + const list = box('list', null, [card, card2]); + const root = box('root', { x: 0, y: 0, width: 320, height: 640 }, [list]); + const tree: HostTree<Box> = { + roots: () => [root], + children: (node) => node.children, + parent: (node) => node.parent, + tag: (node) => node.name, + connected: () => true, + isHost: (value): value is Box => typeof value === 'object' && value !== null, + }; + class App {} + class Card {} + const components = new Map<Box, object>([ + [root, new App()], + [card, new Card()], + [card2, new Card()], + ]); + const ng = { getComponent: (host: Box) => components.get(host) ?? null }; + return { root, list, card, card2, label, tree, ng }; +} + +function fakeSurface() { + let tap: ((view: Box | null) => void) | null = null; + const stop = vi.fn(() => { + tap = null; + }); + const surface: NativeSurface<Box> & { boxes: Box[] } = { + boxes: [], + captureTaps: vi.fn((onTap) => { + tap = onTap; + return stop; + }), + showBox: vi.fn((view: Box) => { + surface.boxes.push(view); + return true; + }), + hideBox: vi.fn(), + }; + return { surface, stop, tap: (view: Box | null) => tap?.(view) }; +} + +describe('viewAt', () => { + it('finds the deepest view under a point, looking through frameless containers', () => { + const { tree, label, card2, root } = scene(); + const frame = (node: Box) => node.frame; + expect(viewAt(tree, frame, { x: 20, y: 15 })).toBe(label); + expect(viewAt(tree, frame, { x: 90, y: 70 })).toBe(card2); + expect(viewAt(tree, frame, { x: 300, y: 600 })).toBe(root); + expect(viewAt(tree, frame, { x: 400, y: 700 })).toBeNull(); + }); +}); + +describe('startNativePick', () => { + beforeEach(() => vi.useFakeTimers()); + afterEach(() => { + clearNativeHighlight(); + vi.useRealTimers(); + }); + + it('answers with the component around the tapped view and stops catching taps', async () => { + const { tree, ng, card, label } = scene(); + const { surface, stop, tap } = fakeSurface(); + const pick = startNativePick({ getNg: () => ng, tree, surface }); + tap(label); + expect(await pick.result).toEqual({ ok: true, id: elementId(card), name: 'Card', tag: 'card' }); + expect(stop).toHaveBeenCalled(); + }); + + it('says so when the tap is outside any component, on cancel and on timeout', async () => { + const { tree, ng } = scene(); + const outside = startNativePick({ getNg: () => ng, tree, surface: fakeSurface().surface }); + outside.cancel(); + expect(await outside.result).toEqual({ ok: false, error: 'Picking cancelled.' }); + + const late = startNativePick({ getNg: () => ng, tree, surface: fakeSurface().surface }); + vi.advanceTimersByTime(15_000); + expect(await late.result).toEqual({ ok: false, error: 'No component was picked.' }); + + const lonely = box('lonely', { x: 0, y: 0, width: 1, height: 1 }); + const fake = fakeSurface(); + const stray = startNativePick({ getNg: () => ng, tree, surface: fake.surface }); + fake.tap(lonely); + expect(await stray.result).toEqual({ + ok: false, + error: 'That view is not inside an Angular component.', + }); + }); + + it('refuses when the device cannot catch a tap', async () => { + const { tree, ng } = scene(); + const surface: NativeSurface<Box> = { + captureTaps: () => null, + showBox: () => false, + hideBox: () => {}, + }; + expect(await startNativePick({ getNg: () => ng, tree, surface }).result).toEqual({ + ok: false, + error: 'This device cannot catch a tap for picking.', + }); + }); + + it('moves with the keys from the panel and draws the box on the shown component', async () => { + const { tree, ng, root, card, card2 } = scene(); + const { surface } = fakeSurface(); + const pick = startNativePick({ getNg: () => ng, tree, surface }); + expect(pick.move('next')).toMatchObject({ moved: true, id: elementId(root), name: 'App' }); + expect(pick.move('child')).toMatchObject({ moved: true, id: elementId(card) }); + expect(pick.move('next')).toMatchObject({ moved: true, id: elementId(card2) }); + expect(pick.move('next')).toEqual({ moved: false, error: 'This is the last component.' }); + expect(pick.move('parent')).toMatchObject({ moved: true, id: elementId(root) }); + expect(surface.boxes).toEqual([root, card, card2, root]); + expect(pick.move('pick')).toMatchObject({ moved: true, picked: true, id: elementId(root) }); + expect(await pick.result).toMatchObject({ ok: true, id: elementId(root) }); + expect(surface.hideBox).toHaveBeenCalled(); + }); +}); + +describe('registerNativePick', () => { + afterEach(() => clearNativeHighlight()); + + it('answers component-pick requests, moves and cancels like the browser overlay', async () => { + const { tree, ng, card, label } = scene(); + const { surface, tap } = fakeSurface(); + const handlers = new Map<string, (request: unknown) => void>(); + const calls: [string, unknown][] = []; + const rpc = { + call: async (name: string, arg?: unknown) => void calls.push([name, arg]), + register: (definition: { name: string; handler: (request: unknown) => void }) => + handlers.set(definition.name, definition.handler), + }; + const picked = vi.fn(); + registerNativePick(rpc, 'app1', { getNg: () => ng, tree, surface, picked }); + const request = handlers.get('component-pick')!; + + request({ requestId: 'x', pageId: 'other' }); + expect(surface.captureTaps).not.toHaveBeenCalled(); + + request({ requestId: 'm1', pageId: 'app1', move: 'next' }); + await vi.waitFor(() => expect(calls).toHaveLength(1)); + expect(calls[0]![1]).toMatchObject({ result: { moved: false, error: 'No pick is running.' } }); + + request({ requestId: 'p1', pageId: 'app1' }); + tap(label); + await vi.waitFor(() => expect(calls).toHaveLength(2)); + expect(calls[1]).toEqual([ + 'component-pick-result', + { + requestId: 'p1', + pageId: 'app1', + result: { ok: true, id: elementId(card), name: 'Card', tag: 'card' }, + }, + ]); + expect(picked).toHaveBeenCalledWith(elementId(card)); + + request({ requestId: 'p2', pageId: 'app1' }); + request({ pageId: 'app1', cancel: true }); + await vi.waitFor(() => expect(calls).toHaveLength(3)); + expect(calls[2]![1]).toMatchObject({ result: { ok: false, error: 'Picking cancelled.' } }); + }); +}); + +describe('showNativeHighlight', () => { + beforeEach(() => vi.useFakeTimers()); + afterEach(() => vi.useRealTimers()); + + it('draws the box for the duration asked, and clears it', () => { + const { card } = scene(); + const { surface } = fakeSurface(); + expect(showNativeHighlight(surface, card, 5000)).toBe(true); + vi.advanceTimersByTime(4999); + expect(surface.hideBox).not.toHaveBeenCalled(); + vi.advanceTimersByTime(1); + expect(surface.hideBox).toHaveBeenCalledTimes(1); + const none: NativeSurface<Box> = { ...surface, showBox: () => false }; + expect(showNativeHighlight(none, card)).toBe(false); + }); +}); + +// --------------------------------------------------------------------------- +// NativeScript: fake views with frames, and fake UIKit and Android classes. + +interface FakeNsView extends NativeView { + frame: NativeFrame | null; + kids: FakeNsView[]; +} + +function nsView(typeName: string, frame: NativeFrame | null, kids: FakeNsView[] = []) { + const view: FakeNsView = { + typeName, + frame, + kids, + parent: null, + eachChildView(callback) { + for (const kid of kids) callback(kid); + }, + getLocationInWindow: () => (view.frame ? { x: view.frame.x, y: view.frame.y } : undefined), + getActualSize: () => + view.frame ? { width: view.frame.width, height: view.frame.height } : { width: 0, height: 0 }, + }; + for (const kid of kids) kid.parent = view; + return view; +} + +function fakeUIKit() { + const added: Record<string, unknown>[] = []; + const window = { + bounds: { w: 320, h: 640 }, + addSubview: vi.fn((view: Record<string, unknown>) => added.push(view)), + }; + const makeView = (proto: Record<string, unknown> = {}) => ({ + alloc: () => ({ + initWithFrame(frame: unknown) { + const view: Record<string, unknown> = { + ...proto, + frame, + layer: {}, + removeFromSuperview: vi.fn(() => added.splice(added.indexOf(view), 1)), + }; + return view; + }, + }), + }); + const g = { + UIView: { + ...makeView(), + extend: (proto: Record<string, unknown>) => makeView(proto), + }, + CGRectMake: (x: number, y: number, w: number, h: number) => ({ x, y, w, h }), + UIColor: { + clearColor: 'clear', + colorWithRedGreenBlueAlpha: (r: number, gr: number, b: number) => ({ CGColor: [r, gr, b] }), + colorWithWhiteAlpha: () => 'almost-clear', + }, + }; + return { g, window, added }; +} + +function fakeAndroid() { + const decor = { views: [] as Record<string, unknown>[] }; + const decorView = { + addView: vi.fn((view: Record<string, unknown>) => decor.views.push(view)), + removeView: vi.fn((view: Record<string, unknown>) => + decor.views.splice(decor.views.indexOf(view), 1), + ), + }; + class View { + props: Record<string, unknown> = {}; + setBackground(value: unknown) { + this.props['background'] = value; + } + setClickable(value: boolean) { + this.props['clickable'] = value; + } + setFocusable(value: boolean) { + this.props['focusable'] = value; + } + setLayoutParams(value: unknown) { + this.props['params'] = value; + } + setX(value: number) { + this.props['x'] = value; + } + setY(value: number) { + this.props['y'] = value; + } + setOnTouchListener(value: { onTouch(view: unknown, event: unknown): boolean }) { + this.props['touch'] = value; + } + static OnTouchListener = class { + constructor(impl: object) { + Object.assign(this, impl); + } + }; + } + const android = { + view: { + View, + ViewGroup: { LayoutParams: { MATCH_PARENT: -1 } }, + MotionEvent: { ACTION_UP: 1 }, + }, + widget: { + FrameLayout: { + LayoutParams: class { + constructor( + public width: number, + public height: number, + ) {} + }, + }, + }, + graphics: { + Color: { parseColor: (value: string) => value }, + drawable: { + GradientDrawable: class { + stroke: unknown[] = []; + setColor() {} + setStroke(...args: unknown[]) { + this.stroke = args; + } + }, + }, + }, + }; + const activity = { getWindow: () => ({ getDecorView: () => decorView }) }; + return { g: { android }, activity, decor, decorView }; +} + +describe('NativeScript surface', () => { + function nsScene() { + const label = nsView('Label', { x: 20, y: 30, width: 80, height: 20 }); + const proxy = nsView('ProxyViewContainer', null, [label]); + const root = nsView('StackLayout', { x: 0, y: 0, width: 320, height: 640 }, [proxy]); + const ng = { + getComponent: (view: NativeView) => (view === proxy ? { constructor: class Card {} } : null), + }; + const tree = nativeScriptTree( + () => ng, + () => root, + ); + return { label, proxy, root, tree }; + } + + it('draws the box over the first view that draws on iOS, as a UIView that ignores touches', () => { + const { proxy, tree } = nsScene(); + const kit = fakeUIKit(); + const surface = nativeScriptSurface( + tree, + iosPlatform(kit.g, () => kit.window), + ); + expect(surface.showBox(proxy)).toBe(true); + expect(kit.added).toHaveLength(1); + expect(kit.added[0]).toMatchObject({ + frame: { x: 20, y: 30, w: 80, h: 20 }, + userInteractionEnabled: false, + layer: { borderWidth: 2 }, + }); + surface.hideBox(); + expect(kit.added).toHaveLength(0); + }); + + it('catches a tap over the window on iOS and finds the view under it', () => { + const { label, tree } = nsScene(); + const kit = fakeUIKit(); + const surface = nativeScriptSurface( + tree, + iosPlatform(kit.g, () => kit.window), + ); + const onTap = vi.fn(); + const stop = surface.captureTaps(onTap)!; + const catcher = kit.added[0] as Record<string, unknown> & { + touchesEndedWithEvent(touches: unknown): void; + locationInView?: unknown; + }; + catcher.touchesEndedWithEvent.call(catcher, { + anyObject: () => ({ locationInView: () => ({ x: 30, y: 35 }) }), + }); + expect(onTap).toHaveBeenCalledWith(label); + stop(); + expect(kit.added).toHaveLength(0); + }); + + it('places the box and reads taps in pixels on Android', () => { + const { label, proxy, tree } = nsScene(); + const fake = fakeAndroid(); + const surface = nativeScriptSurface( + tree, + androidPlatform( + fake.g, + () => fake.activity, + () => 2, + ), + ); + expect(surface.showBox(proxy)).toBe(true); + const drawn = fake.decor.views[0]!['props'] as Record<string, unknown>; + expect(drawn).toMatchObject({ + x: 40, + y: 60, + clickable: false, + params: { width: 160, height: 40 }, + }); + expect((drawn['background'] as { stroke: unknown[] }).stroke).toEqual([4, '#68b6ff']); + surface.hideBox(); + expect(fake.decor.views).toHaveLength(0); + + const onTap = vi.fn(); + const stop = surface.captureTaps(onTap)!; + const listener = (fake.decor.views[0]!['props'] as Record<string, unknown>)['touch'] as { + onTouch(view: unknown, event: unknown): boolean; + }; + const event = (action: number) => ({ getAction: () => action, getX: () => 60, getY: () => 70 }); + expect(listener.onTouch(null, event(0))).toBe(true); + expect(onTap).not.toHaveBeenCalled(); + expect(listener.onTouch(null, event(1))).toBe(true); + expect(onTap).toHaveBeenCalledWith(label); + stop(); + expect(fake.decor.views).toHaveLength(0); + }); + + it('draws nothing and catches nothing without a platform', () => { + const { proxy, tree } = nsScene(); + const surface = nativeScriptSurface(tree, null); + expect(surface.showBox(proxy)).toBe(false); + expect(surface.captureTaps(() => {})).toBeNull(); + }); +}); + +// --------------------------------------------------------------------------- +// Angular Native: a fake `@ng-native/fabric` engine. + +interface EngineNode { + kind: string; + name: string; + children: EngineNode[]; + parent: EngineNode | null; + props: Record<string, unknown>; + host?: unknown; +} + +function fakeEngine(frames: Map<EngineNode, NativeFrame>) { + let responder: Record<string, (...args: unknown[]) => unknown> | null = null; + const engine = { + setProp: vi.fn((node: EngineNode, key: string, value: unknown) => { + node.props[key] = value; + }), + createElement: vi.fn((name: string): EngineNode => ({ + kind: 'element', + name, + children: [], + parent: null, + props: {}, + host: engine, + })), + appendChild: vi.fn((parent: EngineNode, child: EngineNode) => { + parent.children.push(child); + child.parent = parent; + }), + removeChild: vi.fn((parent: EngineNode | null, child: EngineNode) => { + parent?.children.splice(parent.children.indexOf(child), 1); + child.parent = null; + }), + measure: vi.fn((node: EngineNode, into: (frame: NativeFrame) => void) => { + const frame = frames.get(node); + if (frame) into(frame); + }), + setResponder: vi.fn((_node: EngineNode, handlers: Record<string, never>) => { + responder = handlers; + return () => { + responder = null; + }; + }), + commit: vi.fn(() => true), + }; + const touch = (target: EngineNode) => { + const claimed = responder?.['onStartShouldSetResponderCapture']?.({}, target); + if (claimed) responder?.['onResponderRelease']?.({}); + return claimed; + }; + return { engine, touch, hasResponder: () => responder !== null }; +} + +function engineScene() { + const frames = new Map<EngineNode, NativeFrame>(); + const fake = fakeEngine(frames); + const make = (name: string, children: EngineNode[] = []): EngineNode => { + const node: EngineNode = { + kind: 'element', + name, + children, + parent: null, + props: {}, + host: fake.engine, + }; + for (const child of children) child.parent = node; + return node; + }; + const label = make('text'); + const row = make('app-row', [label]); + const root = make('root', [make('view', [row])]); + frames.set(root, { x: 0, y: 40, width: 320, height: 600 }); + frames.set(row, { x: 10, y: 100, width: 300, height: 44 }); + const asNode = (node: EngineNode) => node as unknown as AngularNativeNode; + return { ...fake, root, row, label, asNode, getRoot: () => asNode(root) }; +} + +describe('Angular Native surface', () => { + it('adds a box node over the measured view, in the root coordinates, and removes it', () => { + const { engine, root, row, asNode, getRoot } = engineScene(); + const surface = angularNativeSurface(getRoot); + expect(surface.showBox(asNode(row))).toBe(true); + const node = root.children.at(-1)!; + expect(isOverlayNode(node)).toBe(true); + expect(node.props).toMatchObject({ + pointerEvents: 'none', + style: { + position: 'absolute', + left: 10, + top: 60, + width: 300, + height: 44, + borderWidth: 2, + borderColor: '#68b6ff', + }, + }); + expect(row.props).toEqual({}); + expect(engine.commit).toHaveBeenCalled(); + surface.hideBox(); + expect(root.children.some((child) => isOverlayNode(child))).toBe(false); + }); + + it('keeps the box node out of the tree the collectors walk', () => { + const { root, row, asNode, getRoot } = engineScene(); + const surface = angularNativeSurface(getRoot); + surface.showBox(asNode(row)); + const tree = angularNativeTree(getRoot, () => undefined); + expect(tree.children(asNode(root))).toEqual([asNode(root.children[0]!)]); + surface.hideBox(); + }); + + it('draws nothing for a view the engine has not measured', () => { + const { root, label, asNode, getRoot } = engineScene(); + const surface = angularNativeSurface(getRoot); + surface.showBox(asNode(label)); + expect(root.children.some((child) => isOverlayNode(child))).toBe(false); + }); + + it('claims every touch with a capturing responder on the root while a pick runs', () => { + const { touch, label, asNode, getRoot, hasResponder } = engineScene(); + const surface = angularNativeSurface(getRoot); + const onTap = vi.fn(); + const stop = surface.captureTaps(onTap)!; + expect(touch(label)).toBe(true); + expect(onTap).toHaveBeenCalledWith(asNode(label)); + stop(); + expect(hasResponder()).toBe(false); + }); + + it('answers false and null when the engine lacks the calls', () => { + const node = { + kind: 'element', + name: 'root', + children: [], + parent: null, + props: {}, + host: { setProp: () => {} }, + } as unknown as AngularNativeNode; + const surface = angularNativeSurface(() => node); + expect(surface.showBox(node)).toBe(false); + expect(surface.captureTaps(() => {})).toBeNull(); + }); +}); diff --git a/packages/devtools/src/native-pick.ts b/packages/devtools/src/native-pick.ts new file mode 100644 index 00000000..39a7a98c --- /dev/null +++ b/packages/devtools/src/native-pick.ts @@ -0,0 +1,301 @@ +// Tap-to-pick and the highlight box for the overlays that run on a device +// (NativeScript, Angular Native). They follow `component-pick.ts` and +// `page-highlight.ts`: a pick catches the next tap over the whole app, keeps +// it from the app, and answers with the component that hosts the tapped view; +// a highlight draws a box in a layer of its own over the view instead of +// changing the view. Each platform supplies the surface that catches taps and +// draws the box (`overlay-nativescript-surface.ts`, +// `overlay-angular-native-surface.ts`), so this file needs no framework. + +import { + COMPONENT_PICK_TIMEOUT_MS, + PICK_KEYS, + type ComponentPickResult, + type PickKey, + type PickMoveResult, +} from './component-pick.ts'; +import { componentHostOf, componentHosts, type ComponentDebugNg } from './component-tree.ts'; +import { componentSource } from './component-source.ts'; +import { elementId } from './element-id.ts'; +import type { HostTree } from './host-tree.ts'; +import { className } from './injector-tree.ts'; +import { HIGHLIGHT_SAFETY_MS } from './page-highlight.ts'; + +/** Where a view is on screen, in the platform's layout units, from the top left of the app. */ +export interface NativeFrame { + x: number; + y: number; + width: number; + height: number; +} + +/** The highlight color, the same as the browser overlay's box. */ +export const HIGHLIGHT_COLOR = '#68b6ff'; +export const HIGHLIGHT_BORDER = 2; + +/** What a platform gives the pick and the highlight. */ +export interface NativeSurface<V> { + /** + * Starts catching taps over the whole app and calls `onTap` with the view + * each one landed on, or null. Taps don't reach the app while it runs. + * Returns the function that stops it, or null when the platform can't + * catch taps. + */ + captureTaps(onTap: (view: V | null) => void): (() => void) | null; + /** Draws the box over `view`, replacing the last one. False when it could not. */ + showBox(view: V): boolean; + hideBox(): void; +} + +let boxTimer: ReturnType<typeof setTimeout> | undefined; +let shownOn: NativeSurface<never> | null = null; + +/** + * Draws the box over `view` until `clearNativeHighlight()` or `durationMs` + * (default `HIGHLIGHT_SAFETY_MS`), and returns whether it was drawn. + */ +export function showNativeHighlight<V>( + surface: NativeSurface<V>, + view: V, + durationMs?: number, +): boolean { + clearNativeHighlight(); + if (!surface.showBox(view)) return false; + shownOn = surface as NativeSurface<never>; + boxTimer = setTimeout( + clearNativeHighlight, + typeof durationMs === 'number' && durationMs > 0 + ? Math.min(durationMs, HIGHLIGHT_SAFETY_MS) + : HIGHLIGHT_SAFETY_MS, + ); + return true; +} + +export function clearNativeHighlight() { + clearTimeout(boxTimer); + boxTimer = undefined; + const surface = shownOn; + shownOn = null; + surface?.hideBox(); +} + +interface NativePickOptions<V extends object> { + getNg: () => ComponentDebugNg<V> | undefined; + tree: HostTree<V>; + surface: NativeSurface<V>; + timeoutMs?: number; +} + +/** + * Lets the user tap a view on the device and resolves with the component that + * hosts it. Taps don't reach the app while it runs. `cancel()` or the timeout + * end it. `move` takes the keys of a keyboard pick from the panel, as on the + * web: next and previous component in tree order, the component around the + * shown one, the first one inside it, and picking the shown one. + */ +export function startNativePick<V extends object>( + options: NativePickOptions<V>, +): { + result: Promise<ComponentPickResult>; + cancel: () => void; + move: (key: PickKey) => PickMoveResult; +} { + const { tree, surface } = options; + let shown: V | null = null; + let done = false; + let finish: (result: ComponentPickResult) => void = () => {}; + + const resultFor = (host: V | null): ComponentPickResult => { + if (!host) return { ok: false, error: 'That view is not inside an Angular component.' }; + const instance = options.getNg()?.getComponent?.(host); + const ctor = (instance as { constructor?: unknown } | null)?.constructor; + const source = componentSource(instance); + return { + ok: true, + id: elementId(host), + name: typeof ctor === 'function' ? className(ctor) : 'Anonymous', + tag: tree.tag(host), + ...(source ? { source } : {}), + }; + }; + + const show = (host: V) => { + shown = host; + showNativeHighlight(surface, host); + }; + + const move = (key: PickKey): PickMoveResult => { + if (done) return { moved: false, error: 'No pick is running.' }; + const ng = options.getNg(); + if (!ng?.getComponent) return { moved: false, error: 'This app has no Angular debug API.' }; + if (key === 'pick') { + if (!shown) return { moved: false, error: 'Move to a component first.' }; + const picked = resultFor(shown); + finish(picked); + return picked.ok + ? { moved: true, id: picked.id, name: picked.name, tag: picked.tag, picked: true } + : { moved: false, error: picked.error }; + } + const hosts = componentHosts(ng, tree); + const index = shown ? hosts.indexOf(shown) : -1; + const around = (host: V) => { + const parent = tree.parent(host); + return parent ? componentHostOf(ng, parent, tree) : null; + }; + let next: V | null = null; + if (index === -1) next = hosts[0] ?? null; + else if (key === 'next') next = hosts[index + 1] ?? null; + else if (key === 'previous') next = hosts[index - 1] ?? null; + else if (key === 'parent') next = around(hosts[index]!); + else next = hosts.slice(index + 1).find((host) => around(host) === shown) ?? null; + if (!next) { + const why = { + next: 'This is the last component.', + previous: 'This is the first component.', + parent: 'This component has no component around it.', + child: 'This component has no component inside it.', + }; + return index === -1 + ? { moved: false, error: 'The app shows no component.' } + : { moved: false, error: why[key] }; + } + show(next); + const picked = resultFor(next); + return picked.ok + ? { moved: true, id: picked.id, name: picked.name, tag: picked.tag } + : { moved: false, error: picked.error }; + }; + + const result = new Promise<ComponentPickResult>((resolve) => { + let stop: (() => void) | null = null; + const timer = setTimeout( + () => finish({ ok: false, error: 'No component was picked.' }), + options.timeoutMs ?? COMPONENT_PICK_TIMEOUT_MS, + ); + finish = (outcome) => { + finish = () => {}; + done = true; + clearTimeout(timer); + stop?.(); + clearNativeHighlight(); + resolve(outcome); + }; + try { + stop = surface.captureTaps((view) => { + const host = view ? componentHostOf(options.getNg(), view, tree) : null; + finish(resultFor(host)); + }); + } catch { + stop = null; + } + if (!stop) { + finish({ ok: false, error: 'This device cannot catch a tap for picking.' }); + } + }); + return { result, cancel: () => finish({ ok: false, error: 'Picking cancelled.' }), move }; +} + +/** + * The deepest view under `point` whose frame holds it, walking from the + * roots. Views later in render order win over earlier siblings, as they draw + * on top. A view without a frame (not laid out) is skipped with its children. + */ +export function viewAt<V extends object>( + tree: Pick<HostTree<V>, 'roots' | 'children'>, + frameOf: (view: V) => NativeFrame | null, + point: { x: number; y: number }, + maxDepth = 256, +): V | null { + const inside = (frame: NativeFrame | null) => + !!frame && + point.x >= frame.x && + point.y >= frame.y && + point.x < frame.x + frame.width && + point.y < frame.y + frame.height; + const visit = (view: V, depth: number): V | null => { + if (depth > maxDepth) return null; + const children = tree.children(view); + for (let i = children.length - 1; i >= 0; i--) { + const child = children[i]!; + const frame = frameOf(child); + // A proxy container has no frame of its own, so its children are tried. + if (frame && !inside(frame)) continue; + const hit = visit(child, depth + 1); + if (hit) return hit; + if (frame) return child; + } + return null; + }; + const roots = tree.roots(); + for (let i = roots.length - 1; i >= 0; i--) { + const root = roots[i]!; + const frame = frameOf(root); + if (frame && !inside(frame)) continue; + const hit = visit(root, 0); + if (hit) return hit; + if (frame) return root; + } + return null; +} + +interface PickRpc { + call(name: string, ...args: unknown[]): Promise<unknown>; + register(definition: { + name: string; + type: 'event'; + jsonSerializable: boolean; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + handler: (...args: any[]) => unknown; + }): void; +} + +/** + * Answers the panel's `component-pick` requests on a device, as `overlay.ts` + * does in a browser: a request starts a pick (and cancels a running one), a + * `cancel` ends it, and a `move` key moves it. `picked` runs with the id of a + * picked component. Returns the function that ends a running pick. + */ +export function registerNativePick<V extends object>( + rpc: PickRpc, + pageId: string, + options: NativePickOptions<V> & { picked: (id: string) => void }, +): () => void { + let cancel: (() => void) | null = null; + let move: ((key: PickKey) => PickMoveResult) | null = null; + const answer = (requestId: string, result: unknown) => + void rpc.call('component-pick-result', { requestId, pageId, result }).catch(() => {}); + rpc.register({ + name: 'component-pick', + type: 'event', + jsonSerializable: true, + handler: ( + request: { requestId?: unknown; pageId?: unknown; cancel?: unknown; move?: unknown } | null, + ) => { + if (!request || (request.pageId && request.pageId !== pageId)) return; + // A key from the panel moves the running pick; it never starts or cancels one. + if (request.move !== undefined) { + const key = PICK_KEYS.find((k) => k === request.move); + const result: PickMoveResult = !key + ? { moved: false, error: 'Unknown key.' } + : (move?.(key) ?? { moved: false, error: 'No pick is running.' }); + if (typeof request.requestId === 'string') answer(request.requestId, result); + return; + } + cancel?.(); + if (request.cancel === true || typeof request.requestId !== 'string') return; + const requestId = request.requestId; + const pick = startNativePick(options); + cancel = pick.cancel; + move = pick.move; + void pick.result.then((result) => { + if (cancel === pick.cancel) { + cancel = null; + move = null; + } + if (result.ok) options.picked(result.id); + answer(requestId, result); + }); + }, + }); + return () => cancel?.(); +} diff --git a/packages/devtools/src/overlay-angular-native-surface.ts b/packages/devtools/src/overlay-angular-native-surface.ts new file mode 100644 index 00000000..dc62a5bd --- /dev/null +++ b/packages/devtools/src/overlay-angular-native-surface.ts @@ -0,0 +1,134 @@ +// The Angular Native side of tap-to-pick and the highlight box +// (`native-pick.ts`), through the `@ng-native/fabric` engine the app already +// renders with (`node.host`): the box is a `view` node of its own appended to +// the root and placed from `measure()`, and a pick claims every touch with a +// capturing responder on the root, whose handler is told the node the touch +// landed on. The box node is left out of the tree the collectors walk. + +import type { NativeSurface } from './native-pick.ts'; +import { HIGHLIGHT_BORDER, HIGHLIGHT_COLOR } from './native-pick.ts'; +import type { AngularNativeNode } from './overlay-angular-native-views.ts'; + +/** A window frame, as the engine's `measure()` reports it. */ +interface WindowFrame { + x: number; + y: number; + width: number; + height: number; +} + +/** The engine calls the overlay makes, from `@ng-native/fabric`'s `HostEngine` and `Engine`. */ +export interface AngularNativeEngine { + setProp(node: AngularNativeNode, key: string, value: unknown): void; + createElement?(name: string): AngularNativeNode; + appendChild?(parent: AngularNativeNode, child: AngularNativeNode): void; + removeChild?(parent: AngularNativeNode | null, child: AngularNativeNode): void; + measure?(node: AngularNativeNode, into: (frame: WindowFrame) => void): void; + setResponder?( + node: AngularNativeNode, + handlers: { + onStartShouldSetResponderCapture?(event: unknown, target: AngularNativeNode): boolean; + onResponderRelease?(event: unknown): void; + onResponderTerminationRequest?(event: unknown): boolean; + }, + ): () => void; + commit?(): boolean; +} + +/** Nodes the overlay added (the box), which the tree the collectors walk leaves out. */ +const overlayNodes = new WeakSet<object>(); + +export function isOverlayNode(node: unknown): boolean { + return typeof node === 'object' && node !== null && overlayNodes.has(node); +} + +const engineOf = (node: AngularNativeNode | null | undefined) => + (node?.host as AngularNativeEngine | undefined) ?? null; + +/** + * The pick and highlight surface for the engine under `getRoot()`. A part + * the engine lacks makes that call answer false or null, so the overlay falls + * back to the outline style for the highlight, and the pick says it can't run. + */ +export function angularNativeSurface( + getRoot: () => AngularNativeNode | null | undefined, +): NativeSurface<AngularNativeNode> { + let box: { + node: AngularNativeNode; + root: AngularNativeNode; + engine: AngularNativeEngine; + } | null = null; + let generation = 0; + + const hideBox = () => { + generation++; + if (!box) return; + const { node, root, engine } = box; + box = null; + engine.removeChild?.(root, node); + engine.commit?.(); + }; + + return { + captureTaps: (onTap) => { + const root = getRoot(); + const engine = engineOf(root); + if (!root || !engine?.setResponder) return null; + let target: AngularNativeNode | null = null; + let report: (node: AngularNativeNode | null) => void = onTap; + const stop = engine.setResponder(root, { + // The capture pass runs from the root down, so the root takes every touch first. + onStartShouldSetResponderCapture: (_event, landed) => { + target = landed ?? null; + return true; + }, + onResponderRelease: () => report(target), + onResponderTerminationRequest: () => false, + }); + return () => { + report = () => {}; + stop(); + }; + }, + showBox: (view) => { + hideBox(); + const root = getRoot(); + const engine = engineOf(root); + if ( + !root || + !engine?.createElement || + !engine.appendChild || + !engine.removeChild || + !engine.measure + ) { + return false; + } + const mine = generation; + // Window frames, so the box sits at the view's frame minus the root's. The box is added + // only once both are known: an unmeasured node reports nothing, and then nothing is drawn. + engine.measure(root, (rootFrame) => { + engine.measure!(view, (frame) => { + if (generation !== mine) return; + const node = engine.createElement!('view'); + overlayNodes.add(node); + engine.setProp(node, 'pointerEvents', 'none'); + engine.setProp(node, 'style', { + position: 'absolute', + left: frame.x - rootFrame.x, + top: frame.y - rootFrame.y, + width: frame.width, + height: frame.height, + borderWidth: HIGHLIGHT_BORDER, + borderColor: HIGHLIGHT_COLOR, + zIndex: 2147483647, + }); + engine.appendChild!(root, node); + engine.commit?.(); + box = { node, root, engine }; + }); + }); + return true; + }, + hideBox, + }; +} diff --git a/packages/devtools/src/overlay-angular-native-views.ts b/packages/devtools/src/overlay-angular-native-views.ts index 2deb4c45..e4572471 100644 --- a/packages/devtools/src/overlay-angular-native-views.ts +++ b/packages/devtools/src/overlay-angular-native-views.ts @@ -1,5 +1,6 @@ import type { HostTree } from './host-tree.ts'; import { HIGHLIGHT_SAFETY_MS } from './page-highlight.ts'; +import { isOverlayNode } from './overlay-angular-native-surface.ts'; /** * The part of an `@ng-native/fabric` engine node the overlay reads. Structural, @@ -40,7 +41,9 @@ export function componentSelector(component: unknown): string | null { } function elementSiblings(node: AngularNativeNode): readonly AngularNativeNode[] { - return node.parent ? node.parent.children.filter((child) => child.kind === 'element') : [node]; + return node.parent + ? node.parent.children.filter((child) => child.kind === 'element' && !isOverlayNode(child)) + : [node]; } /** @@ -48,7 +51,8 @@ function elementSiblings(node: AngularNativeNode): readonly AngularNativeNode[] * out, and `@if`, `@for` and `<ng-container>` anchors are hosts named * `ng-container`, as comments are in the DOM. The root node is named by the * selector of the component it hosts, and a selector is a path of - * `name:nth-child(n)` steps from it. + * `name:nth-child(n)` steps from it. The highlight box the overlay adds is + * left out (`isOverlayNode`). */ export function angularNativeTree( getRoot: () => AngularNativeNode | null | undefined, @@ -89,7 +93,9 @@ export function angularNativeTree( return root ? [root] : []; }, children: (node) => - node.kind === 'element' ? node.children.filter((child) => child.kind !== 'text') : [], + node.kind === 'element' + ? node.children.filter((child) => child.kind !== 'text' && !isOverlayNode(child)) + : [], parent: (node) => (node === getRoot() ? null : node.parent), tag, connected, diff --git a/packages/devtools/src/overlay-angular-native.ts b/packages/devtools/src/overlay-angular-native.ts index 3f17280e..822667b4 100644 --- a/packages/devtools/src/overlay-angular-native.ts +++ b/packages/devtools/src/overlay-angular-native.ts @@ -22,6 +22,8 @@ import { showOutline, type AngularNativeNode, } from './overlay-angular-native-views.ts'; +import { angularNativeSurface } from './overlay-angular-native-surface.ts'; +import { clearNativeHighlight, registerNativePick, showNativeHighlight } from './native-pick.ts'; import { serializeNamed } from './serialize.ts'; import { collectSignalGraph, @@ -201,6 +203,8 @@ async function startSession( if (!redaction) throw new Error('[pangular] Could not read the redaction config'); setRedaction(redaction); const tree = angularNativeTree(getRoot, angularDebugApi); + // The highlight box and the tap catcher go through the engine the app renders with. + const surface = angularNativeSurface(getRoot); if (!on.ngrx) uninstallReduxDevtoolsHook(); const diagnostics = attachNativeDiagnostics(my, pageId, { getNg: angularDebugApi, @@ -376,6 +380,7 @@ async function startSession( const wanted = typeof request === 'string' ? { selector: request } : request; if (wanted?.pageId && wanted.pageId !== pageId) return; clearOutline(); + clearNativeHighlight(); if (!wanted) return; const host = typeof wanted.id === 'string' @@ -383,10 +388,27 @@ async function startSession( : typeof wanted.selector === 'string' ? hostBySelector(tree, wanted.selector) : null; - if (host) showOutline(host, wanted.durationMs); + if (!host) return; + // A box in its own layer; the outline style on the view is the fallback. + if (!showNativeHighlight(surface, host, wanted.durationMs)) { + showOutline(host, wanted.durationMs); + } }, }); + // Tap-to-pick: the panel's Pick button catches the next tap on the device. + const stopPick = on.components + ? registerNativePick(my.rpc, pageId, { + getNg: angularDebugApi, + tree, + surface, + picked: (id) => { + componentTarget = id; + void pushTree(true).catch(() => {}); + }, + }) + : null; + my.rpc.register({ name: 'select-signal-component', type: 'event', @@ -418,6 +440,8 @@ async function startSession( return () => { clearInterval(interval); + stopPick?.(); + clearNativeHighlight(); clearOutline(); restoreSignalHook?.(); ngrx?.stop(); diff --git a/packages/devtools/src/overlay-nativescript-surface.ts b/packages/devtools/src/overlay-nativescript-surface.ts new file mode 100644 index 00000000..eb462cad --- /dev/null +++ b/packages/devtools/src/overlay-nativescript-surface.ts @@ -0,0 +1,200 @@ +// The NativeScript side of tap-to-pick and the highlight box (`native-pick.ts`). +// The box and the tap catcher are native views of their own, added to the +// app's window above everything and removed afterwards, so no view of the app +// changes. The platform classes are read from the runtime's globals (UIKit on +// iOS, the Android SDK on Android) and passed in, so this file compiles and +// tests without NativeScript or a device. + +import { + HIGHLIGHT_BORDER, + HIGHLIGHT_COLOR, + viewAt, + type NativeFrame, + type NativeSurface, +} from './native-pick.ts'; +import type { HostTree } from './host-tree.ts'; +import { renderedView, type NativeView } from './overlay-nativescript-views.ts'; + +/** A tap, in the same units and window as `NativeView.getLocationInWindow()`. */ +export interface TapPoint { + x: number; + y: number; +} + +/** What one platform does: draw a box over a window frame, and catch taps over the window. */ +export interface NativeScriptPlatform { + drawBox(frame: NativeFrame): boolean; + removeBox(): void; + catchTaps(onTap: (point: TapPoint) => void): (() => void) | null; +} + +/** Where a view is in the window, in device-independent pixels; null before it is laid out. */ +export function nativeScriptFrame(view: NativeView): NativeFrame | null { + try { + const at = view.getLocationInWindow?.(); + const size = view.getActualSize?.(); + if (!at || !size || !(size.width > 0) || !(size.height > 0)) return null; + return { x: at.x, y: at.y, width: size.width, height: size.height }; + } catch { + // a view whose native view is gone + return null; + } +} + +/** The pick and highlight surface over the NativeScript view tree. */ +export function nativeScriptSurface( + tree: HostTree<NativeView>, + platform: NativeScriptPlatform | null, +): NativeSurface<NativeView> { + return { + captureTaps: (onTap) => + platform?.catchTaps((point) => onTap(viewAt(tree, nativeScriptFrame, point))) ?? null, + showBox: (view) => { + const frame = nativeScriptFrame(renderedView(view)) ?? nativeScriptFrame(view); + return !!frame && !!platform?.drawBox(frame); + }, + hideBox: () => platform?.removeBox(), + }; +} + +type Native = Record<string, any>; // eslint-disable-line @typescript-eslint/no-explicit-any + +const [RED, GREEN, BLUE] = [1, 3, 5].map( + (at) => parseInt(HIGHLIGHT_COLOR.slice(at, at + 2), 16) / 255, +) as [number, number, number]; + +/** + * UIKit: the box is a `UIView` with a border that ignores touches, and the + * catcher a clear `UIView` over the whole window whose `touchesEnded` reports + * the point. Points are the units NativeScript's layout uses on iOS. + */ +export function iosPlatform( + g: Native, + window: () => Native | null | undefined, +): NativeScriptPlatform { + let box: Native | null = null; + let Catcher: Native | null = null; + return { + drawBox: (frame) => { + const win = window(); + if (!win) return false; + box?.removeFromSuperview(); + box = g['UIView'] + .alloc() + .initWithFrame(g['CGRectMake'](frame.x, frame.y, frame.width, frame.height)); + box!['userInteractionEnabled'] = false; + box!['backgroundColor'] = g['UIColor'].clearColor; + box!['layer'].borderWidth = HIGHLIGHT_BORDER; + box!['layer'].borderColor = g['UIColor'].colorWithRedGreenBlueAlpha( + RED, + GREEN, + BLUE, + 1, + ).CGColor; + win['addSubview'](box); + return true; + }, + removeBox: () => { + box?.removeFromSuperview(); + box = null; + }, + catchTaps: (onTap) => { + const win = window(); + if (!win) return null; + let report: (point: TapPoint) => void = onTap; + Catcher ??= g['UIView'].extend({ + touchesEndedWithEvent(this: Native, touches: Native) { + const point = touches['anyObject']()?.locationInView(this); + if (point) (this['pangularTap'] as ((p: TapPoint) => void) | undefined)?.(point); + }, + }); + const catcher = Catcher!['alloc']().initWithFrame(win['bounds']); + catcher['backgroundColor'] = g['UIColor'].colorWithWhiteAlpha(0, 0.01); + catcher['pangularTap'] = (point: TapPoint) => report({ x: point.x, y: point.y }); + win['addSubview'](catcher); + return () => { + report = () => {}; + catcher['removeFromSuperview'](); + }; + }, + }; +} + +/** + * Android: the box is a `View` with a stroked `GradientDrawable` that takes no + * clicks, and the catcher a `View` over the whole decor view whose touch + * listener reports where a touch ended. Both are placed in pixels, and the + * tap is turned back into device-independent pixels. + */ +export function androidPlatform( + g: Native, + activity: () => Native | null | undefined, + density: () => number, +): NativeScriptPlatform { + const android = g['android']; + let box: Native | null = null; + let boxParent: Native | null = null; + const decorOf = (current: Native) => current['getWindow']().getDecorView(); + const remove = () => { + if (box && boxParent) boxParent['removeView'](box); + box = null; + boxParent = null; + }; + return { + drawBox: (frame) => { + const current = activity(); + if (!current) return false; + remove(); + const scale = density(); + const shape = new android.graphics.drawable.GradientDrawable(); + shape.setColor(0); + shape.setStroke( + Math.round(HIGHLIGHT_BORDER * scale), + android.graphics.Color.parseColor(HIGHLIGHT_COLOR), + ); + const view = new android.view.View(current); + view.setBackground(shape); + view.setClickable(false); + view.setFocusable(false); + view.setLayoutParams( + new android.widget.FrameLayout.LayoutParams( + Math.round(frame.width * scale), + Math.round(frame.height * scale), + ), + ); + view.setX(frame.x * scale); + view.setY(frame.y * scale); + boxParent = decorOf(current); + boxParent!['addView'](view); + box = view; + return true; + }, + removeBox: remove, + catchTaps: (onTap) => { + const current = activity(); + if (!current) return null; + const scale = density(); + const decor = decorOf(current); + const catcher = new android.view.View(current); + const match = android.view.ViewGroup.LayoutParams.MATCH_PARENT; + catcher.setLayoutParams(new android.widget.FrameLayout.LayoutParams(match, match)); + let report: (point: TapPoint) => void = onTap; + catcher.setOnTouchListener( + new android.view.View.OnTouchListener({ + onTouch: (_view: Native, event: Native) => { + if (event['getAction']() === android.view.MotionEvent.ACTION_UP) { + report({ x: event['getX']() / scale, y: event['getY']() / scale }); + } + // Every touch is kept from the app while the pick runs. + return true; + }, + }), + ); + decor['addView'](catcher); + return () => { + report = () => {}; + decor['removeView'](catcher); + }; + }, + }; +} diff --git a/packages/devtools/src/overlay-nativescript-views.ts b/packages/devtools/src/overlay-nativescript-views.ts index 2f9bcf9f..8e224286 100644 --- a/packages/devtools/src/overlay-nativescript-views.ts +++ b/packages/devtools/src/overlay-nativescript-views.ts @@ -17,6 +17,9 @@ export interface NativeView { isLoaded?: boolean; borderWidth?: unknown; borderColor?: unknown; + /** Where the view is in the window, in device-independent pixels (undefined before layout). */ + getLocationInWindow?(): { x: number; y: number } | undefined; + getActualSize?(): { width: number; height: number } | undefined; } /** The subset of the `ng` global the NativeScript tree reads. */ diff --git a/packages/devtools/src/overlay-nativescript.ts b/packages/devtools/src/overlay-nativescript.ts index 08518832..126c22fe 100644 --- a/packages/devtools/src/overlay-nativescript.ts +++ b/packages/devtools/src/overlay-nativescript.ts @@ -7,7 +7,7 @@ // `@valor/nativescript-websockets` in `polyfills.ts`). import { outsideAngular, setTimeoutOutside } from './outside-angular.ts'; -import { Application, isAndroid } from '@nativescript/core'; +import { Application, isAndroid, Utils } from '@nativescript/core'; import { connectDevframe } from 'devframe/client'; import { keepaliveDue } from './change-detection.ts'; import { collectComponentTree, type ComponentDebugNg } from './component-tree.ts'; @@ -50,6 +50,13 @@ import { } from './overlay-nativescript-views.ts'; import { claimPageOnServer, newPageId, newPageKey } from './page-id.ts'; import { lanDevtoolsURL } from './lan-url.ts'; +import { clearNativeHighlight, registerNativePick, showNativeHighlight } from './native-pick.ts'; +import { + androidPlatform, + iosPlatform, + nativeScriptSurface, + type NativeScriptPlatform, +} from './overlay-nativescript-surface.ts'; export { lanDevtoolsURL }; @@ -224,6 +231,8 @@ async function startSession( const title = `NativeScript (${isAndroid ? 'Android' : 'iOS'})`; const tree = nativeScriptTree(angularDebugApi, () => Application.getRootView() as NativeView); + // The highlight box and the tap catcher are native views over the window. + const surface = nativeScriptSurface(tree, devicePlatform()); if (!on.ngrx) uninstallReduxDevtoolsHook(); const diagnostics = attachNativeDiagnostics(my, pageId, { getNg: angularDebugApi, @@ -412,10 +421,27 @@ async function startSession( : typeof wanted.selector === 'string' && wanted.selector ? hostBySelector(tree, wanted.selector) : null; - if (host && tree.isHost(host)) flash(renderedView(host), wanted.durationMs); + if (!host || !tree.isHost(host)) return; + // A box in its own layer; the border on the view is the fallback when no box can be drawn. + if (!showNativeHighlight(surface, host, wanted.durationMs ?? FLASH_MS)) { + flash(renderedView(host), wanted.durationMs); + } }, }); + // Tap-to-pick: the panel's Pick button catches the next tap on the device. + const stopPick = on.components + ? registerNativePick(my.rpc, pageId, { + getNg: angularDebugApi, + tree, + surface, + picked: (id) => { + componentTarget = id; + void pushTree(true).catch(() => {}); + }, + }) + : null; + my.rpc.register({ name: 'select-signal-component', type: 'event', @@ -447,6 +473,8 @@ async function startSession( return (forget) => { clearInterval(interval); + stopPick?.(); + clearNativeHighlight(); clearFlash(); restoreSignalHook?.(); ngrx?.stop(); @@ -474,6 +502,28 @@ function angularDebugApi(): DebugNg | undefined { return nativeDebugApi<DebugNg>(); } +type Native = Record<string, any>; // eslint-disable-line @typescript-eslint/no-explicit-any + +/** The platform that draws the box and catches taps, or null when its classes are missing. */ +function devicePlatform(): NativeScriptPlatform | null { + const g = globalThis as Native; + if (isAndroid) { + if (!g['android']?.view?.View) return null; + return androidPlatform( + g, + () => (Application as unknown as Native)['android']?.foregroundActivity, + () => Utils.layout.getDisplayDensity(), + ); + } + if (!g['UIView'] || !g['CGRectMake']) return null; + return iosPlatform( + g, + () => + (Application.getRootView() as unknown as Native | undefined)?.['ios']?.window ?? + g['UIApplication']?.sharedApplication?.keyWindow, + ); +} + let flashed: { view: NativeView; borderWidth: unknown; From 1980f3e0eadf98ebd78ccb095f31d81efe4d2891 Mon Sep 17 00:00:00 2001 From: erKam <erkamyaman35@gmail.com> Date: Sat, 7 Nov 2026 20:29:46 +0000 Subject: [PATCH 07/15] build(extension): add a Firefox build of the extension Firefox reads the same extension files but a different manifest. Add scripts/extension-firefox.mjs and pnpm extension:build:firefox, which build extension/ui, copy extension/ to dist/extension-firefox and write a manifest without key and minimum_chrome_version, with the add-on ID, version floor and data collection declaration under browser_specific_settings.gecko, and with a background service worker turned into background scripts. A test checks the manifest. Nothing is committed or published for Firefox. Refs #342 --- .../content/contributing/chrome-extension.md | 23 ++++++ .../src/content/contributing/development.md | 1 + package.json | 1 + packages/devtools/CHANGELOG.md | 1 + .../src/__tests__/extension-firefox.test.ts | 75 ++++++++++++++++++ scripts/extension-firefox.mjs | 79 +++++++++++++++++++ 6 files changed, 180 insertions(+) create mode 100644 packages/devtools/src/__tests__/extension-firefox.test.ts create mode 100644 scripts/extension-firefox.mjs diff --git a/apps/docs/src/content/contributing/chrome-extension.md b/apps/docs/src/content/contributing/chrome-extension.md index 39fbaeba..e89bb165 100644 --- a/apps/docs/src/content/contributing/chrome-extension.md +++ b/apps/docs/src/content/contributing/chrome-extension.md @@ -79,6 +79,29 @@ If you change `panel.html`, `panel-bridge.js` or a status message, run `pnpm tes After a rebuild, click the reload icon on the extension card, then reopen DevTools. +## Build for Firefox + +```bash +pnpm extension:build:firefox +``` + +This runs `extension:build`, then copies `extension/` to `dist/extension-firefox` with a Firefox manifest. Nothing else in the copy changes. `scripts/extension-firefox.mjs` makes these changes to the manifest: + +| Change | Why | +| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| Drops `key` and `minimum_chrome_version` | Only Chrome reads them. | +| Adds `browser_specific_settings.gecko` | Firefox needs the add-on ID (`pangular-inspector@pangular-inspector.dev`) and the oldest version, 140. | +| Declares `data_collection_permissions: ["none"]` | Firefox asks every add-on what it collects. The extension sends data only to the devtools server. | +| Turns `background.service_worker` into `scripts` | Firefox runs background scripts, not a service worker. The manifest has no background today. | + +`dist/` is not committed, and CI does not build the Firefox copy. `extension-firefox.test.ts` checks the manifest it writes. + +To try it, open `about:debugging#/runtime/this-firefox`, click **Load Temporary Add-on** and pick `dist/extension-firefox/manifest.json`. Then open the Firefox developer tools on an Angular app. + +<ngmd-callout type="warning" title="Trust the Firefox origin"> + Firefox gives an extension a <code>moz-extension://</code> origin with an ID of its own on each install, so the devtools server does not trust it the way it trusts the Chrome extension ID. If the panel says the server refused the request, add the origin it names to <code>allowedOrigins</code>. +</ngmd-callout> + ## Package for the Chrome Web Store ```bash diff --git a/apps/docs/src/content/contributing/development.md b/apps/docs/src/content/contributing/development.md index 899ea810..20c2f083 100644 --- a/apps/docs/src/content/contributing/development.md +++ b/apps/docs/src/content/contributing/development.md @@ -154,6 +154,7 @@ pnpm test:axe # axe check of every panel page (needs Chrom pnpm test:axe:extension # axe check of the extension panel (after pnpm test:axe) pnpm test:coverage # Package and panel tests with v8 coverage, into dist/coverage pnpm extension:build # Chrome extension +pnpm extension:build:firefox # Firefox copy of the extension, into dist/extension-firefox pnpm skills:check # Agent skills and roles in .claude/ pnpm commit:check # Commit messages on your branch ``` diff --git a/package.json b/package.json index abec0fe4..1221f7a7 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "e2e:extension": "node scripts/e2e-extension.mjs", "e2e:resilience": "node scripts/e2e-resilience.mjs", "extension:build": "pnpm devtools:build && rm -rf extension/ui && cp -r dist/devtools-ui extension/ui", + "extension:build:firefox": "pnpm extension:build && node scripts/extension-firefox.mjs", "extension:zip": "pnpm extension:build && node scripts/extension-zip.mjs", "analog:dev": "pnpm --filter analog-demo dev", "docs:dev": "nx serve pangular-inspector-docs", diff --git a/packages/devtools/CHANGELOG.md b/packages/devtools/CHANGELOG.md index 5a34f5bf..18e69be9 100644 --- a/packages/devtools/CHANGELOG.md +++ b/packages/devtools/CHANGELOG.md @@ -315,6 +315,7 @@ What remains: `/config` exports `DEFAULT_POPUP_HOTKEY`, `PANGULAR_ACTIONS`, `PAN - The `leaks-real` test expects the rows the collector really reports (#430). - Pull requests run the security and MCP end-to-end checks, and a weekly job runs the rest. - A CI job installs the packed package on Node.js 22.12.0, the `engines.node` floor, and loads its CLI and its `cli`, `hub`, `ssr` and `vite` entry points there (#373). +- `pnpm extension:build:firefox` builds a Firefox copy of the extension into `dist/extension-firefox`, with the add-on ID and version floor under `browser_specific_settings` and without the Chrome-only manifest keys. It is not published (#342). - The `Commit message` check fails on a commit message that breaks the format, not only on a bad pull request title (#373). - The packed `package.json` leaves out `devDependencies`, `scripts` and the `nx` block, and declares `sideEffects`. - Dependencies: devframe and `@devframes/*` 1.2.6 (was 1.2.0). `@devframes/plugin-messages`, `@devframes/plugin-terminals` and `axe-core` are added. `h3` is no longer a dependency. diff --git a/packages/devtools/src/__tests__/extension-firefox.test.ts b/packages/devtools/src/__tests__/extension-firefox.test.ts new file mode 100644 index 00000000..6049fd76 --- /dev/null +++ b/packages/devtools/src/__tests__/extension-firefox.test.ts @@ -0,0 +1,75 @@ +import { existsSync, mkdtempSync, readFileSync, rmSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { afterEach, describe, expect, it } from 'vitest'; + +type Manifest = Record<string, unknown>; +interface FirefoxScript { + GECKO_ID: string; + GECKO_MIN_VERSION: string; + firefoxManifest(chrome: Manifest): Manifest; + buildFirefoxExtension(paths: { from: string; to: string }): Manifest; +} + +const extension = join(import.meta.dirname, '../../../../extension'); +const script = new URL('../../../../scripts/extension-firefox.mjs', import.meta.url).href; +const load = async () => (await import(/* @vite-ignore */ script)) as FirefoxScript; +const chrome = JSON.parse(readFileSync(join(extension, 'manifest.json'), 'utf8')) as Manifest; + +describe('Firefox extension build', () => { + const made: string[] = []; + afterEach(() => { + for (const dir of made.splice(0)) rmSync(dir, { recursive: true, force: true }); + }); + + it('writes a Firefox manifest: gecko settings, no Chrome-only keys, the rest unchanged', async () => { + const { firefoxManifest, GECKO_ID, GECKO_MIN_VERSION } = await load(); + const manifest = firefoxManifest(chrome); + expect(manifest['key']).toBeUndefined(); + expect(manifest['minimum_chrome_version']).toBeUndefined(); + expect(manifest['browser_specific_settings']).toEqual({ + gecko: { + id: GECKO_ID, + strict_min_version: GECKO_MIN_VERSION, + data_collection_permissions: { required: ['none'] }, + }, + }); + expect(GECKO_ID).toMatch(/^[\w.-]+@[\w.-]+$/); + const { key, minimum_chrome_version, ...shared } = chrome; + void key; + void minimum_chrome_version; + const { browser_specific_settings, ...rest } = manifest; + void browser_specific_settings; + expect(rest).toEqual(shared); + expect(manifest['manifest_version']).toBe(3); + // The Chrome manifest is left as it was. + expect(chrome['key']).toBeTypeOf('string'); + }); + + it('runs a background service worker as a background script', async () => { + const { firefoxManifest } = await load(); + const manifest = firefoxManifest({ + ...chrome, + background: { service_worker: 'background.js', type: 'module' }, + }); + expect(manifest['background']).toEqual({ scripts: ['background.js'], type: 'module' }); + }); + + it('copies every extension file into its own folder and leaves extension/ alone', async () => { + const { buildFirefoxExtension } = await load(); + const to = join(mkdtempSync(join(tmpdir(), 'pangular-firefox-')), 'out'); + made.push(join(to, '..')); + const manifest = buildFirefoxExtension({ from: extension, to }); + const written = JSON.parse(readFileSync(join(to, 'manifest.json'), 'utf8')) as Manifest; + expect(written).toEqual(manifest); + for (const file of [ + written['devtools_page'] as string, + ...Object.values(written['icons'] as Record<string, string>), + 'panel.html', + 'panel-bridge.js', + ]) { + expect(existsSync(join(to, file)), file).toBe(true); + } + expect(JSON.parse(readFileSync(join(extension, 'manifest.json'), 'utf8'))).toEqual(chrome); + }); +}); diff --git a/scripts/extension-firefox.mjs b/scripts/extension-firefox.mjs new file mode 100644 index 00000000..e221e3a7 --- /dev/null +++ b/scripts/extension-firefox.mjs @@ -0,0 +1,79 @@ +#!/usr/bin/env node +// Builds a Firefox copy of the extension into dist/extension-firefox. The +// files are the same as in extension/ (the committed Chrome build); only the +// manifest differs. Run it with `pnpm extension:build:firefox`, which builds +// extension/ui first. +import { + cpSync, + existsSync, + mkdirSync, + readFileSync, + realpathSync, + rmSync, + writeFileSync, +} from 'node:fs'; +import { join, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +/** The add-on ID Firefox keeps the extension under, and the oldest Firefox it installs on. */ +export const GECKO_ID = 'pangular-inspector@pangular-inspector.dev'; +export const GECKO_MIN_VERSION = '140.0'; + +/** Keys only Chrome reads: the ID-pinning `key` and the Chrome version floor. */ +const CHROME_ONLY = ['key', 'minimum_chrome_version']; + +/** + * The Firefox manifest for a Chrome one: the Chrome-only keys removed, the + * add-on ID and version floor under `browser_specific_settings.gecko`, and a + * `background.service_worker` turned into `background.scripts`, which is + * what Firefox runs. Everything else is kept as it is. + */ +export function firefoxManifest(chrome) { + const manifest = structuredClone(chrome); + for (const key of CHROME_ONLY) delete manifest[key]; + const background = manifest.background; + if (background?.service_worker) { + const { service_worker: worker, ...rest } = background; + manifest.background = { ...rest, scripts: [worker] }; + } + manifest.browser_specific_settings = { + ...manifest.browser_specific_settings, + gecko: { + ...manifest.browser_specific_settings?.gecko, + id: GECKO_ID, + strict_min_version: GECKO_MIN_VERSION, + // The extension sends nothing anywhere but the devtools server on the inspected page. + data_collection_permissions: { required: ['none'] }, + }, + }; + return manifest; +} + +/** Copies `from` to `to` (emptied first) and writes the Firefox manifest there. */ +export function buildFirefoxExtension({ from, to }) { + if (!existsSync(join(from, 'manifest.json'))) { + throw new Error(`No manifest.json in ${from}`); + } + rmSync(to, { recursive: true, force: true }); + mkdirSync(to, { recursive: true }); + cpSync(from, to, { recursive: true, filter: (src) => !src.endsWith('.DS_Store') }); + const chrome = JSON.parse(readFileSync(join(from, 'manifest.json'), 'utf8')); + const manifest = firefoxManifest(chrome); + writeFileSync(join(to, 'manifest.json'), `${JSON.stringify(manifest, null, 2)}\n`); + return manifest; +} + +function isEntryPoint() { + try { + return realpathSync(process.argv[1]) === realpathSync(fileURLToPath(import.meta.url)); + } catch { + return false; + } +} + +if (isEntryPoint()) { + const root = resolve(import.meta.dirname, '..'); + const to = join(root, 'dist/extension-firefox'); + buildFirefoxExtension({ from: join(root, 'extension'), to }); + console.log(`Wrote the Firefox extension to ${to}. Load it from about:debugging.`); +} From 31a2e365b0fcc10abdc08e3bfb521d66af70b8c1 Mon Sep 17 00:00:00 2001 From: erKam <erkamyaman35@gmail.com> Date: Sat, 7 Nov 2026 20:48:25 +0000 Subject: [PATCH 08/15] build(extension): rebuild extension/ui Rebuild the committed panel bundle for the panel changes on this branch: payload Refetch, redaction counts and the device picker. --- ...=> browser-agent-rpc-KH4HHvHf-BG-qZj2p.js} | 2 +- .../{index-dxIK5fBB.js => index-CweYvDI5.js} | 235 ++++++++++-------- extension/ui/index.html | 2 +- 3 files changed, 133 insertions(+), 106 deletions(-) rename extension/ui/assets/{browser-agent-rpc-KH4HHvHf-BjQp5LKx.js => browser-agent-rpc-KH4HHvHf-BG-qZj2p.js} (95%) rename extension/ui/assets/{index-dxIK5fBB.js => index-CweYvDI5.js} (75%) diff --git a/extension/ui/assets/browser-agent-rpc-KH4HHvHf-BjQp5LKx.js b/extension/ui/assets/browser-agent-rpc-KH4HHvHf-BG-qZj2p.js similarity index 95% rename from extension/ui/assets/browser-agent-rpc-KH4HHvHf-BjQp5LKx.js rename to extension/ui/assets/browser-agent-rpc-KH4HHvHf-BG-qZj2p.js index 39bfacc5..4f8eb282 100644 --- a/extension/ui/assets/browser-agent-rpc-KH4HHvHf-BjQp5LKx.js +++ b/extension/ui/assets/browser-agent-rpc-KH4HHvHf-BG-qZj2p.js @@ -1 +1 @@ -import{t as e}from"./index-dxIK5fBB.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-CweYvDI5.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-dxIK5fBB.js b/extension/ui/assets/index-CweYvDI5.js similarity index 75% rename from extension/ui/assets/index-dxIK5fBB.js rename to extension/ui/assets/index-CweYvDI5.js index d013b47a..fd281c3b 100644 --- a/extension/ui/assets/index-dxIK5fBB.js +++ b/extension/ui/assets/index-CweYvDI5.js @@ -3,12 +3,12 @@ \r \v ᠎ - \u2028\u2029   `;`${Wt}`,`${Wt}`;var Gt=(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})(Gt||{}),Kt=(function(e){return e[e.Plain=0]=`Plain`,e[e.TemplateLiteralPart=1]=`TemplateLiteralPart`,e[e.TemplateLiteralEnd=2]=`TemplateLiteralEnd`,e})(Kt||{});Gt.Character,At.StyleMap,At.ClassMap,At.StyleProp,At.ClassProp,At.Attribute,At.Property,At.Attribute,At.Control,At.DomProperty,At.DomProperty,At.Attribute,At.StyleMap,At.ClassMap,At.StyleProp,At.ClassProp,At.Listener,At.TwoWayListener,At.AnimationListener,At.StyleMap,At.ClassMap,At.StyleProp,At.ClassProp,At.Property,At.TwoWayProperty,At.DomProperty,At.Attribute,At.Animation,At.Control,zt.Idle,b.deferOnIdle,b.deferPrefetchOnIdle,b.deferHydrateOnIdle,zt.Immediate,b.deferOnImmediate,b.deferPrefetchOnImmediate,b.deferHydrateOnImmediate,zt.Timer,b.deferOnTimer,b.deferPrefetchOnTimer,b.deferHydrateOnTimer,zt.Hover,b.deferOnHover,b.deferPrefetchOnHover,b.deferHydrateOnHover,zt.Interaction,b.deferOnInteraction,b.deferPrefetchOnInteraction,b.deferHydrateOnInteraction,zt.Viewport,b.deferOnViewport,b.deferPrefetchOnViewport,b.deferHydrateOnViewport,zt.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,tt.HTML,b.sanitizeHtml,tt.RESOURCE_URL,b.sanitizeResourceUrl,tt.SCRIPT,b.sanitizeScript,tt.STYLE,b.sanitizeStyle,tt.URL,b.sanitizeUrl,tt.ATTRIBUTE_NO_BINDING,b.validateAttribute,tt.HTML,b.trustConstantHtml,tt.RESOURCE_URL,b.trustConstantResourceUrl;var qt=(function(e){return e[e.None=0]=`None`,e[e.ViewContextRead=1]=`ViewContextRead`,e[e.ViewContextWrite=2]=`ViewContextWrite`,e[e.SideEffectful=4]=`SideEffectful`,e})(qt||{});x.Tmpl,x.Tmpl,x.Both,x.Host,x.Tmpl,x.Tmpl,x.Tmpl,x.Both,x.Both,x.Both,x.Tmpl,x.Both,x.Both,x.Tmpl,x.Both,x.Tmpl,x.Both,x.Both,x.Tmpl,x.Tmpl,x.Tmpl,x.Tmpl,x.Tmpl,x.Both,x.Both,x.Tmpl,x.Tmpl,x.Tmpl,x.Tmpl,x.Both,x.Both,x.Both,x.Tmpl,x.Tmpl,x.Both,x.Tmpl,x.Tmpl,x.Tmpl,x.Both,x.Both,x.Tmpl,x.Both,x.Both,x.Both,x.Both,x.Both,x.Tmpl,x.Tmpl,x.Tmpl,x.Tmpl,x.Tmpl,x.Tmpl,x.Tmpl,x.Tmpl,x.Tmpl,x.Tmpl,x.Tmpl,x.Tmpl,x.Both,x.Tmpl,x.Both,x.Tmpl,x.Both,x.Tmpl,x.Tmpl,x.Tmpl,x.Tmpl,x.Tmpl,x.Tmpl,x.Both,x.Both,x.Both,St.Property,Pt.Property,St.TwoWay,Pt.TwoWayProperty,St.Attribute,Pt.Attribute,St.Class,Pt.ClassName,St.Style,Pt.StyleProperty,St.LegacyAnimation,Pt.LegacyAnimation,St.Animation,Pt.Animation;var Jt=`%COMP%`;`${Jt}`,`${Jt}`,class e{static SINGLETON=new e;static veWillInferAnyFor(t){let n=e.SINGLETON;return t instanceof xt?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 Yt=null,Xt=!1,Zt=1,Qt=null,$t=Symbol(`SIGNAL`);function en(e){let t=Yt;return Yt=e,t}function tn(){return Yt}var nn={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 rn(e){if(Xt)throw Error(``);if(Yt===null)return;Yt.consumerOnSignalRead(e);let t=Yt.producersTail;if(t!==void 0&&t.producer===e)return;let n,r=Yt.recomputing;if(r&&(n=t===void 0?Yt.producers:t.nextProducer,n!==void 0&&n.producer===e)){Yt.producersTail=n,n.lastReadVersion=e.version,n.knownValidAtEpoch=Zt;return}let i=e.consumersTail;if(i!==void 0&&i.consumer===Yt&&(!r||i.knownValidAtEpoch===Zt))return;let a=yn(Yt),o={producer:e,consumer:Yt,nextProducer:n,prevConsumer:void 0,knownValidAtEpoch:Zt,lastReadVersion:e.version,nextConsumer:void 0};Yt.producersTail=o,t===void 0?Yt.producers=o:t.nextProducer=o,a&&_n(e,o)}function an(){Zt++}function on(e){if((!yn(e)||e.dirty)&&(e.dirty||e.lastCleanEpoch!==Zt)){if(!e.producerMustRecompute(e)&&!hn(e)){un(e);return}e.producerRecomputeValue(e),un(e)}}function sn(e){if(e.consumers===void 0)return;let t=Xt;Xt=!0;try{for(let t=e.consumers;t!==void 0;t=t.nextConsumer){let e=t.consumer;e.dirty||ln(e)}}finally{Xt=t}}function cn(){return Yt?.consumerAllowSignalWrites!==!1}function ln(e){e.dirty=!0,sn(e),e.consumerMarkedDirty?.(e)}function un(e){e.dirty=!1,e.lastCleanEpoch=Zt}function dn(e){return e&&fn(e),en(e)}function fn(e){if(e.producersTail?.knownValidAtEpoch===Zt){let t=e.producers;for(;t!==void 0;)t.knownValidAtEpoch=null,t=t.nextProducer}e.producersTail=void 0,e.recomputing=!0}function pn(e,t){en(t),e&&mn(e)}function mn(e){e.recomputing=!1;let t=e.producersTail,n=t===void 0?e.producers:t.nextProducer;if(n!==void 0){if(yn(e))do n=vn(n);while(n!==void 0);t===void 0?e.producers=void 0:t.nextProducer=void 0}}function hn(e){for(let t=e.producers;t!==void 0;t=t.nextProducer){let e=t.producer,n=t.lastReadVersion;if(n!==e.version||(on(e),n!==e.version))return!0}return!1}function gn(e){if(yn(e)){let t=e.producers;for(;t!==void 0;)t=vn(t)}e.producers=void 0,e.producersTail=void 0,e.consumers=void 0,e.consumersTail=void 0}function _n(e,t){let n=e.consumersTail,r=yn(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)_n(t.producer,t)}function vn(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,!yn(t)){let e=t.producers;for(;e!==void 0;)e=vn(e)}return n}function yn(e){return e.consumerIsAlwaysLive||e.consumers!==void 0}function bn(e){Qt?.(e)}function xn(e,t){return Object.is(e,t)}function Sn(e,t){let n=Object.create(pee);n.computation=e,t!==void 0&&(n.equal=t);let r=()=>{if(on(n),rn(n),n.value===Tn)throw n.error;return n.value};return r[$t]=n,bn(n),r}var Cn=Symbol(`UNSET`),wn=Symbol(`COMPUTING`),Tn=Symbol(`ERRORED`),pee={...nn,value:Cn,dirty:!0,error:null,equal:xn,kind:`computed`,producerMustRecompute(e){return e.value===Cn||e.value===wn},producerRecomputeValue(e){if(e.value===wn)throw Error(``);let t=e.value;e.value=wn;let n=dn(e),r,i=!1;try{r=e.computation(),en(null),i=t!==Cn&&t!==Tn&&r!==Tn&&e.equal(t,r)}catch(t){r=Tn,e.error=t}finally{pn(e,n)}if(i){e.value=t;return}e.value=r,e.version++}};function mee(){throw Error()}var En=mee;function Dn(e){En(e)}function hee(e){En=e}var gee=null;function _ee(e,t){let n=Object.create(jn);n.value=e,t!==void 0&&(n.equal=t);let r=()=>On(n);return r[$t]=n,bn(n),[r,e=>kn(n,e),e=>An(n,e)]}function On(e){return rn(e),e.value}function kn(e,t){cn()||Dn(e),e.equal(e.value,t)||(e.value=t,Mn(e))}function An(e,t){cn()||Dn(e),kn(e,t(e.value))}var jn={...nn,equal:xn,value:void 0,kind:`signal`};function Mn(e){e.version++,an(),sn(e),gee?.(e)}var Nn={...nn,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:`effect`};function Pn(e){if(e.dirty=!1,e.version>0&&!hn(e))return;e.version++;let t=dn(e);try{e.cleanup(),e.fn()}finally{pn(e,t)}}var Fn=void 0;function In(){return Fn}function Ln(e){let t=Fn;return Fn=e,t}var Rn=Symbol(`NotFound`);function zn(e){return e===Rn||e?.name===`ɵNotFound`}function Bn(e,t,n){let r=Object.create(Un);r.source=e,r.computation=t,n!=null&&(r.equal=n);let i=()=>{if(on(r),rn(r),r.value===Tn)throw r.error;return r.value};return i[$t]=r,bn(r),i}function Vn(e,t){on(e),kn(e,t),un(e)}function Hn(e,t){if(on(e),e.value===Tn)throw e.error;An(e,t),un(e)}var Un={...nn,value:Cn,dirty:!0,error:null,equal:xn,kind:`linkedSignal`,producerMustRecompute(e){return e.value===Cn||e.value===wn},producerRecomputeValue(e){if(e.value===wn)throw Error(``);let t=e.value;e.value=wn;let n=dn(e),r,i=!1;try{let n=e.source(),a=t!==Cn&&t!==Tn,o=a?{source:e.sourceValue,value:t}:void 0;r=e.computation(n,o),e.sourceValue=n,en(null),i=a&&r!==Tn&&e.equal(t,r)}catch(t){r=Tn,e.error=t}finally{pn(e,n)}if(i){e.value=t;return}e.value=r,e.version++}};function Wn(e){let t=en(null);try{return e()}finally{en(t)}}var Gn=function(e,t){return Gn=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])},Gn(e,t)};function Kn(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);Gn(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function qn(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 Jn(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]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function Yn(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function Xn(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 Zn(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function Qn(e){return this instanceof Qn?(this.v=e,this):new Qn(e)}function $n(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator==`function`?AsyncIterator:Object).prototype),s(`next`),s(`throw`),s(`return`,o),i[Symbol.asyncIterator]=function(){return this},i;function o(e){return function(t){return Promise.resolve(t).then(e,d)}}function s(e,t){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||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 Qn?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 er(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Yn==`function`?Yn(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 tr(e){return typeof e==`function`}function nr(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 rr=nr(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 ir(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var ar=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=Yn(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(tr(c))try{c()}catch(e){i=e instanceof rr?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=Yn(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{cr(f)}catch(e){i??=[],e instanceof rr?i=Zn(Zn([],Xn(i)),Xn(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 rr(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)cr(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)&&ir(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&ir(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),or=ar.EMPTY;function sr(e){return e instanceof ar||e&&`closed`in e&&tr(e.remove)&&tr(e.add)&&tr(e.unsubscribe)}function cr(e){tr(e)?e():e.unsubscribe()}var lr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ur={setTimeout:function(e,t){var n=[...arguments].slice(2),r=ur.delegate;return r?.setTimeout?r.setTimeout.apply(r,Zn([e,t],Xn(n))):setTimeout.apply(void 0,Zn([e,t],Xn(n)))},clearTimeout:function(e){return(ur.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function dr(e){ur.setTimeout(function(){var t=lr.onUnhandledError;if(t)t(e);else throw e})}function fr(){}var pr=(function(){return gr(`C`,void 0,void 0)})();function mr(e){return gr(`E`,void 0,e)}function hr(e){return gr(`N`,e,void 0)}function gr(e,t,n){return{kind:e,value:t,error:n}}var _r=null;function vr(e){if(lr.useDeprecatedSynchronousErrorHandling){var t=!_r;if(t&&(_r={errorThrown:!1,error:null}),e(),t){var n=_r,r=n.errorThrown,i=n.error;if(_r=null,r)throw i}}else e()}function yr(e){lr.useDeprecatedSynchronousErrorHandling&&_r&&(_r.errorThrown=!0,_r.error=e)}var br=function(e){Kn(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,sr(t)&&t.add(n)):n.destination=Or,n}return t.create=function(e,t,n){return new wr(e,t,n)},t.prototype.next=function(e){this.isStopped?Dr(hr(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?Dr(mr(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?Dr(pr,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}(ar),xr=Function.prototype.bind;function Sr(e,t){return xr.call(e,t)}var Cr=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){Tr(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Tr(e)}else Tr(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Tr(e)}},e}(),wr=function(e){Kn(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(tr(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&lr.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&Sr(t.next,o),error:t.error&&Sr(t.error,o),complete:t.complete&&Sr(t.complete,o)}):a=t}return i.destination=new Cr(a),i}return t}(br);function Tr(e){lr.useDeprecatedSynchronousErrorHandling?yr(e):dr(e)}function Er(e){throw e}function Dr(e,t){var n=lr.onStoppedNotification;n&&ur.setTimeout(function(){return n(e,t)})}var Or={closed:!0,next:fr,error:Er,complete:fr},kr=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function Ar(e){return e}function jr(e){return e.length===0?Ar:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var Mr=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=Fr(e)?e:new wr(e,t,n);return vr(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=Nr(t),new t(function(t,r){var i=new wr({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[kr]=function(){return this},e.prototype.pipe=function(){return jr([...arguments])(this)},e.prototype.toPromise=function(e){var t=this;return e=Nr(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 Nr(e){return e??lr.Promise??Promise}function Pr(e){return e&&tr(e.next)&&tr(e.error)&&tr(e.complete)}function Fr(e){return e&&e instanceof br||Pr(e)&&sr(e)}function Ir(e){return tr(e?.lift)}function Lr(e){return function(t){if(Ir(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 Rr(e,t,n,r,i){return new zr(e,t,n,r,i)}var zr=function(e){Kn(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}(br),Br=nr(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),Vr=function(e){Kn(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 Hr(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Br},t.prototype.next=function(e){var t=this;vr(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=Yn(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;vr(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;vr(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?or:(this.currentObservers=null,a.push(e),new ar(function(){t.currentObservers=null,ir(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 Mr;return e.source=this,e},t.create=function(e,t){return new Hr(e,t)},t}(Mr),Hr=function(e){Kn(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)??or},t}(Vr),Ur=function(e){Kn(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}(Vr);function Wr(e){return e[e.length-1]}function Gr(e){return tr(Wr(e))?e.pop():void 0}var Kr=(function(e){return e&&typeof e.length==`number`&&typeof e!=`function`});function qr(e){return tr(e?.then)}function Jr(e){return tr(e[kr])}function Yr(e){return Symbol.asyncIterator&&tr(e?.[Symbol.asyncIterator])}function Xr(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 Zr(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}var Qr=Zr();function $r(e){return tr(e?.[Qr])}function ei(e){return $n(this,arguments,function(){var t,n,r,i;return Jn(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,Qn(t.read())];case 3:return n=a.sent(),r=n.value,i=n.done,i?[4,Qn(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Qn(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 ti(e){return tr(e?.getReader)}function ni(e){if(e instanceof Mr)return e;if(e!=null){if(Jr(e))return vee(e);if(Kr(e))return yee(e);if(qr(e))return bee(e);if(Yr(e))return ri(e);if($r(e))return xee(e);if(ti(e))return See(e)}throw Xr(e)}function vee(e){return new Mr(function(t){var n=e[kr]();if(tr(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}function yee(e){return new Mr(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function bee(e){return new Mr(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,dr)})}function xee(e){return new Mr(function(t){var n,r;try{for(var i=Yn(e),a=i.next();!a.done;a=i.next()){var o=a.value;if(t.next(o),t.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function ri(e){return new Mr(function(t){Cee(e,t).catch(function(e){return t.error(e)})})}function See(e){return ri(ei(e))}function Cee(e,t){var n,r,i,a;return qn(this,void 0,void 0,function(){var o,s;return Jn(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=er(e),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),r.done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function ii(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}function ai(e,t){return t===void 0&&(t=0),Lr(function(n,r){n.subscribe(Rr(r,function(n){return ii(r,e,function(){return r.next(n)},t)},function(){return ii(r,e,function(){return r.complete()},t)},function(n){return ii(r,e,function(){return r.error(n)},t)}))})}function oi(e,t){return t===void 0&&(t=0),Lr(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function wee(e,t){return ni(e).pipe(oi(t),ai(t))}function Tee(e,t){return ni(e).pipe(oi(t),ai(t))}function Eee(e,t){return new Mr(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function Dee(e,t){return new Mr(function(n){var r;return ii(n,t,function(){r=e[Qr](),ii(n,t,function(){var e,t,i;try{e=r.next(),t=e.value,i=e.done}catch(e){n.error(e);return}i?n.complete():n.next(t)},0,!0)}),function(){return tr(r?.return)&&r.return()}})}function si(e,t){if(!e)throw Error(`Iterable cannot be null`);return new Mr(function(n){ii(n,t,function(){var r=e[Symbol.asyncIterator]();ii(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}function Oee(e,t){return si(ei(e),t)}function kee(e,t){if(e!=null){if(Jr(e))return wee(e,t);if(Kr(e))return Eee(e,t);if(qr(e))return Tee(e,t);if(Yr(e))return si(e,t);if($r(e))return Dee(e,t);if(ti(e))return Oee(e,t)}throw Xr(e)}function Aee(e,t){return t?kee(e,t):ni(e)}function ci(e,t){return Lr(function(n,r){var i=0;n.subscribe(Rr(r,function(n){r.next(e.call(t,n,i++))}))})}var jee=Array.isArray;function Mee(e,t){return jee(t)?e.apply(void 0,Zn([],Xn(t))):e(t)}function Nee(e){return ci(function(t){return Mee(e,t)})}var Pee=Array.isArray,Fee=Object.getPrototypeOf,Iee=Object.prototype,Lee=Object.keys;function Ree(e){if(e.length===1){var t=e[0];if(Pee(t))return{args:t,keys:null};if(zee(t)){var n=Lee(t);return{args:n.map(function(e){return t[e]}),keys:n}}}return{args:e,keys:null}}function zee(e){return e&&typeof e==`object`&&Fee(e)===Iee}function Bee(e,t){return e.reduce(function(e,n,r){return e[n]=t[r],e},{})}function Vee(){var e=[...arguments],t=Gr(e),n=Ree(e),r=n.args,i=n.keys,a=new Mr(function(e){var t=r.length;if(!t){e.complete();return}for(var n=Array(t),a=t,o=t,s=function(t){var s=!1;ni(r[t]).subscribe(Rr(e,function(e){s||(s=!0,o--),n[t]=e},function(){return a--},void 0,function(){(!a||!s)&&(o||e.next(i?Bee(i,n):n),e.complete())}))},c=0;c<t;c++)s(c)});return t?a.pipe(Nee(t)):a}var li=`https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss`,ui=class extends Error{code;constructor(e,t){super(di(e,t)),this.code=e}};function Hee(e){return`NG0${Math.abs(e)}`}function di(e,t){return`${Hee(e)}${t?`: `+t:``}`}function fi(e){for(let t in e)if(e[t]===fi)return t;throw Error(``)}function Uee(e,t){for(let n in t)Object.hasOwn(t,n)&&!Object.hasOwn(e,n)&&(e[n]=t[n])}function pi(e){if(typeof e==`string`)return e;if(Array.isArray(e))return`[${e.map(pi).join(`, `)}]`;if(e==null)return``+e;let t=e.overriddenName||e.name;if(t)return`${t}`;let n=e.toString();if(n==null)return``+n;let r=n.indexOf(` -`);return r>=0?n.slice(0,r):n}function mi(e,t){return e?t?`${e} ${t}`:e:t||``}var Wee=fi({__forward_ref__:fi});function hi(e){return e.__forward_ref__=hi,e}function gi(e){return _i(e)?e():e}function _i(e){return typeof e==`function`&&Object.hasOwn(e,Wee)&&e.__forward_ref__===hi}function vi(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function yi(e){return bi(e,Ci)}function bi(e,t){return Object.hasOwn(e,t)&&e[t]||null}function xi(e){return(e?.[Ci]??null)||null}function Si(e){return e&&Object.hasOwn(e,wi)?e[wi]:null}var Ci=fi({ɵprov:fi}),wi=fi({ɵinj:fi}),Ti=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=vi({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Ei(e){return e&&!!e.ɵproviders}var Di=fi({ɵcmp:fi}),Oi=fi({ɵdir:fi}),ki=fi({ɵpipe:fi}),Ai=fi({ɵfac:fi}),ji=fi({__NG_ELEMENT_ID__:fi}),Mi=fi({__NG_ENV_ID__:fi});function Ni(e){return Ii(e,`@Component`),e[Di]||null}function Pi(e){return Ii(e,`@Directive`),e[Oi]||null}function Fi(e){return Ii(e,`@Pipe`),e[ki]||null}function Ii(e,t){if(e==null)throw new ui(-919,!1)}function Li(e){return typeof e==`string`?e:e==null?``:String(e)}var Ri=fi({ngErrorCode:fi}),zi=fi({ngErrorMessage:fi}),Bi=fi({ngTokenPath:fi});function Vi(e,t){return Ui(``,-200,t)}function Hi(e,t){throw new ui(-201,!1)}function Ui(e,t,n){let r=new ui(t,e);return r[Ri]=t,r[zi]=e,n&&(r[Bi]=n),r}function Wi(e){return e[Ri]}var Gi;function Ki(){return Gi}function qi(e){let t=Gi;return Gi=e,t}function Ji(e,t,n){let r=yi(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;Hi(e,``)}var Yi=globalThis,Xi={},Zi=`__NG_DI_FLAG__`,Qi=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=ta(t)||0;try{return this.injector.get(e,n&8?null:Xi,n)}catch(e){if(zn(e))return e;throw e}}};function $i(e,t=0){let n=In();if(n===void 0)throw new ui(-203,!1);if(n===null)return Ji(e,void 0,t);{let r=na(t),i=n.retrieve(e,r);if(zn(i)){if(r.optional)return null;throw i}return i}}function ea(e,t=0){return(Ki()||$i)(gi(e),t)}function S(e,t){return ea(e,ta(t))}function ta(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function na(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function ra(e){let t=[];for(let n=0;n<e.length;n++){let r=gi(e[n]);if(Array.isArray(r)){if(r.length===0)throw new ui(900,!1);let e,n=0;for(let t=0;t<r.length;t++){let i=r[t],a=ia(i);typeof a==`number`?a===-1?e=i.token:n|=a:e=i}t.push(ea(e,n))}else t.push(ea(r))}return t}function ia(e){return e[Zi]}function aa(e,t){return Object.hasOwn(e,Ai)?e[Ai]:null}function oa(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],a=t[r];if(n&&(i=n(i),a=n(a)),a!==i)return!1}return!0}function sa(e){return e.flat(1/0)}function ca(e,t){e.forEach(e=>Array.isArray(e)?ca(e,t):t(e))}function la(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function ua(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function da(e,t){let n=[];for(let r=0;r<e;r++)n.push(t);return n}function fa(e,t,n,r){let i=e.length;if(i==t)e.push(n,r);else if(i===1)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;){let t=i-2;e[i]=e[t],i--}e[t]=n,e[t+1]=r}}function pa(e,t,n){let r=ha(e,t);return r>=0?e[r|1]=n:(r=~r,fa(e,r,t,n)),r}function ma(e,t){let n=ha(e,t);if(n>=0)return e[n|1]}function ha(e,t){return ga(e,t,1)}function ga(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){let a=r+(i-r>>1),o=e[a<<n];if(t===o)return a<<n;o>t?i=a:r=a+1}return~(i<<n)}var _a={},va=[],ya=new Ti(``),ba=new Ti(``,-1),xa=new Ti(``),Sa=class{get(e,t=Xi){if(t===Xi){let e=Ui(``,-201);throw e.name=`ɵNotFound`,e}return t}};function Ca(...e){return{ɵproviders:wa(!0,e),ɵfromNgModule:!0}}function wa(e,...t){let n=[],r=new Set,i,a=e=>{n.push(e)};return ca(t,e=>{let t=e;Ea(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&Ta(i,a),n}function Ta(e,t){for(let n=0;n<e.length;n++){let{ngModule:r,providers:i}=e[n];Da(i,e=>{t(e,r)})}}function Ea(e,t,n,r){if(e=gi(e),!e)return!1;let i=null,a=Si(e),o=!a&&Ni(e);if(!a&&!o){let t=e.ngModule;if(a=Si(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)Ea(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{ca(a.imports,i=>{Ea(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&Ta(e,t)}if(!s){let e=aa(i)||(()=>new i);t({provide:i,useFactory:e,deps:va},i),t({provide:xa,useValue:i,multi:!0},i),t({provide:ya,useValue:()=>ea(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;Da(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function Da(e,t){for(let n of e)Ei(n)&&(n=n.ɵproviders),Array.isArray(n)?Da(n,t):t(n)}var Oa=fi({provide:String,useValue:fi});function ka(e){return typeof e==`object`&&!!e&&Oa in e}function Aa(e){return!!(e&&e.useExisting)}function ja(e){return!!(e&&e.useFactory)}function Ma(e){return typeof e==`function`}function Na(e){return!!e.useClass}var Pa=new Ti(``),Fa={},Ia={},La=void 0;function Ra(){return La===void 0&&(La=new Sa),La}var za=class{},Ba=class extends za{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,Xa(e,e=>this.processProvider(e)),this.records.set(ba,Ka(void 0,this)),r.has(`environment`)&&this.records.set(za,Ka(void 0,this));let i=this.records.get(Pa);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(xa,va,{self:!0}))}retrieve(e,t){let n=ta(t)||0;try{return this.get(e,Xi,n)}catch(e){if(zn(e))return e;throw e}}destroy(){Ga(this),this._destroyed=!0;let e=en(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(),en(e)}}onDestroy(e){return Ga(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Ga(this);let t=Ln(this),n=qi(void 0);try{return e()}finally{Ln(t),qi(n)}}get(e,t=Xi,n){if(Ga(this),Object.hasOwn(e,Mi))return e[Mi](this);let r=ta(n),i=Ln(this),a=qi(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=Ya(e)&&yi(e);t=n&&this.injectableDefInScope(n)?Ka(Va(e),Fa):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?Ra():this.parent;return t=r&8&&t===Xi?null:t,n.get(e,t)}catch(e){let t=Wi(e);throw t===-200||t===-201?new ui(t,null):e}finally{qi(a),Ln(i)}}resolveInjectorInitializers(){let e=en(null),t=Ln(this),n=qi(void 0);try{let e=this.get(ya,va,{self:!0});for(let t of e)t()}finally{Ln(t),qi(n),en(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=gi(e);let t=Ma(e)?e:gi(e&&e.provide),n=Ua(e);if(!Ma(e)&&e.multi===!0){let n=this.records.get(t);n||(n=Ka(void 0,Fa,!0),n.factory=()=>ra(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=en(null);try{if(t.value===Ia)throw Vi(``);return t.value===Fa&&(t.value=Ia,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&Ja(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{en(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=gi(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 Va(e){let t=yi(e),n=t===null?aa(e):t.factory;if(n!==null)return n;if(e instanceof Ti)throw new ui(-204,!1);if(e instanceof Function)return Ha(e);throw new ui(-204,!1)}function Ha(e){if(e.length>0)throw new ui(-204,!1);let t=xi(e);return t===null?()=>new e:()=>t.factory(e)}function Ua(e){return ka(e)?Ka(void 0,e.useValue):Ka(Wa(e),Fa)}function Wa(e,t,n){let r;if(Ma(e)){let t=gi(e);return aa(t)||Va(t)}if(ka(e))r=()=>gi(e.useValue);else if(ja(e))r=()=>e.useFactory(...ra(e.deps||[]));else if(Aa(e))r=(t,n)=>ea(gi(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=gi(e&&(e.useClass||e.provide));if(qa(e))r=()=>new t(...ra(e.deps));else return aa(t)||Va(t)}return r}function Ga(e){if(e.destroyed)throw new ui(-205,!1)}function Ka(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function qa(e){return!!e.deps}function Ja(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function Ya(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function Xa(e,t){for(let n of e)Array.isArray(n)?Xa(n,t):n&&Ei(n)?Xa(n.ɵproviders,t):t(n)}function Za(e,t){let n;e instanceof Ba?(Ga(e),n=e):n=new Qi(e);let r=Ln(n),i=qi(void 0);try{return t()}finally{Ln(r),qi(i)}}function Qa(){return Ki()!==void 0||In()!=null}var $a=1;function eo(e){return Array.isArray(e)&&typeof e[$a]==`object`}function to(e){return Array.isArray(e)&&e[$a]===!0}function no(e){return!!(e.flags&4)}function ro(e){return e.componentOffset>-1}function io(e){return(e.flags&1)==1}function ao(e){return!!e.template}function oo(e){return!!(e[2]&512)}function so(e){return(e[2]&256)==256}var co=(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})(co||{}),lo=`math`;function uo(e){for(;Array.isArray(e);)e=e[0];return e}function fo(e,t){return uo(t[e])}function po(e,t){return uo(t[e.index])}function mo(e,t){return e.data[t]}function ho(e,t){return e[t]}function go(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function _o(e,t){let n=t[e];return eo(n)?n:n[0]}function vo(e){return(e[2]&128)==128}function Gee(e){return to(e[3])}function yo(e,t){return t==null?null:e[t]}function bo(e){e[17]=0}function xo(e){e[2]&1024||(e[2]|=1024,vo(e)&&wo(e))}function Kee(e,t){for(;e>0;)t=t[14],e--;return t}function So(e){return!!(e[2]&9216||e[24]?.dirty)}function Co(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),So(e)&&wo(e)}function wo(e){e[10].changeDetectionScheduler?.notify(0);let t=Eo(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!vo(t)));)t=Eo(t)}function To(e,t){if(so(e))throw new ui(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function qee(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function Eo(e){let t=e[3];return to(t)?t[3]:t}function Do(e){return e[7]??=[]}function Oo(e){return e.cleanup??=[]}function Jee(e,t,n,r){let i=Do(t);i.push(n),e.firstCreatePass&&Oo(e).push(r,i.length-1)}var ko={lFrame:ts(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Ao=!1;function Yee(){return ko.lFrame.elementDepthCount}function Xee(){ko.lFrame.elementDepthCount++}function jo(){ko.lFrame.elementDepthCount--}function Mo(){return ko.bindingsEnabled}function No(){return ko.skipHydrationRootTNode!==null}function Po(e){return ko.skipHydrationRootTNode===e}function Fo(){ko.skipHydrationRootTNode=null}function Io(){return ko.lFrame.lView}function Lo(){return ko.lFrame.tView}function C(e){return ko.lFrame.contextLView=e,e[8]}function w(e){return ko.lFrame.contextLView=null,e}function Ro(){let e=zo();for(;e!==null&&e.type===64;)e=e.parent;return e}function zo(){return ko.lFrame.currentTNode}function Zee(){let e=ko.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Bo(e,t){let n=ko.lFrame;n.currentTNode=e,n.isParent=t}function Vo(){return ko.lFrame.isParent}function Ho(){ko.lFrame.isParent=!1}function Uo(){return ko.lFrame.contextLView}function Wo(){return Ao}function Go(e){let t=Ao;return Ao=e,t}function Ko(){let e=ko.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function qo(){return ko.lFrame.bindingIndex}function Qee(e){return ko.lFrame.bindingIndex=e}function Jo(){return ko.lFrame.bindingIndex++}function Yo(e){let t=ko.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function $ee(){return ko.lFrame.inI18n}function ete(e,t){let n=ko.lFrame;n.bindingIndex=n.bindingRootIndex=e,Xo(t)}function tte(){return ko.lFrame.currentDirectiveIndex}function Xo(e){ko.lFrame.currentDirectiveIndex=e}function nte(e){let t=ko.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function rte(){return ko.lFrame.currentQueryIndex}function Zo(e){ko.lFrame.currentQueryIndex=e}function ite(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function Qo(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=ite(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=ko.lFrame=es();return r.currentTNode=t,r.lView=e,!0}function $o(e){let t=es(),n=e[1];ko.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function es(){let e=ko.lFrame,t=e===null?null:e.child;return t===null?ts(e):t}function ts(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 ns(){let e=ko.lFrame;return ko.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var rs=ns;function is(){let e=ns();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 ate(e){return(ko.lFrame.contextLView=Kee(e,ko.lFrame.contextLView))[8]}function as(){return ko.lFrame.selectedIndex}function os(e){ko.lFrame.selectedIndex=e}function ss(){let e=ko.lFrame;return mo(e.tView,e.selectedIndex)}function T(){ko.lFrame.currentNamespace=`svg`}function cs(){ls()}function ls(){ko.lFrame.currentNamespace=null}function us(){return ko.lFrame.currentNamespace}var ds=!0;function fs(){return ds}function ps(e){ds=e}function ms(e,t=null,n=null,r){let i=hs(e,t,n,r);return i.resolveInjectorInitializers(),i}function hs(e,t=null,n=null,r,i=new Set){return new Ba([n||va,Ca(e)],t||Ra(),null,i)}var gs=class e{static THROW_IF_NOT_FOUND=Xi;static NULL=new Sa;static create(e,t){if(Array.isArray(e))return ms({name:``},t,e,``);{let t=e.name??``;return ms({name:t},e.parent,e.providers,t)}}static ɵprov=vi({token:e,providedIn:`any`,factory:()=>ea(ba)});static __NG_ELEMENT_ID__=-1},_s=new Ti(``),vs=class{static __NG_ELEMENT_ID__=bs;static __NG_ENV_ID__=e=>e},ys=class extends vs{_lView;constructor(e){super(),this._lView=e}get destroyed(){return so(this._lView)}onDestroy(e){let t=this._lView;return To(t,e),()=>qee(t,e)}};function bs(){return new ys(Io())}var xs=new Ti(``),Ss=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Ur(!1);debugTaskTracker=S(xs,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Mr(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=vi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Cs=class extends Vr{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,Qa()&&(this.destroyRef=S(vs,{optional:!0})??void 0,this.pendingTasks=S(Ss,{optional:!0})??void 0)}emit(e){let t=en(null);try{super.next(e)}finally{en(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 ar&&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 ws(...e){}function Ts(e){let t,n;function r(){e=ws;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 Es(e){return queueMicrotask(()=>e()),()=>{e=ws}}var Ds=`isAngularZone`,Os=`isAngularZone_ID`,ks=0,As=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Cs(!1);onMicrotaskEmpty=new Cs(!1);onStable=new Cs(!1);onError=new Cs(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new ui(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,Ps(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(Ds)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new ui(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new ui(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,js,ws,ws);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)}},js={};function Ms(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 Ns(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Ts(()=>{e.callbackScheduled=!1,Fs(e),e.isCheckStableRunning=!0,Ms(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Fs(e)}function Ps(e){let t=()=>{Ns(e)},n=ks++;e._inner=e._inner.fork({name:`angular`,properties:{[Ds]:!0,[Os]:n,[Os+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(zs(s))return n.invokeTask(i,a,o,s);try{return Is(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),Ls(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return Is(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!Bs(s)&&t(),Ls(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,Fs(e),Ms(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 Fs(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function Is(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Ls(e){e._nesting--,Ms(e)}var Rs=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Cs;onMicrotaskEmpty=new Cs;onStable=new Cs;onError=new Cs;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 zs(e){return Vs(e,`__ignore_ng_zone__`)}function Bs(e){return Vs(e,`__scheduler_tick__`)}function Vs(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Hs=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},Us=new Ti(``,{factory:()=>{let e=S(As),t=S(za),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Hs),n.handleError(r))})}}}),Ws={provide:ya,useValue:()=>{S(Hs,{optional:!0})},multi:!0};function E(e,t){let[n,r,i]=_ee(e,t?.equal),a=n;return a[$t],a.set=r,a.update=i,a.asReadonly=Gs.bind(a),a}function Gs(){let e=this[$t];if(e.readonlyFn===void 0){let t=()=>this();t[$t]=e,e.readonlyFn=t}return e.readonlyFn}var Ks=new Ti(``,{factory:()=>qs}),qs=`ng`,Js=new Ti(``),Ys=new Ti(``,{providedIn:`platform`,factory:()=>`unknown`}),Xs=new Ti(``,{factory:()=>S(_s).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),Zs=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=Qs}return e})();function Qs(){return new Zs(Io(),Ro())}var $s=class{},ec=new Ti(``,{factory:()=>!0}),tc=new Ti(``),nc=(()=>{class e{static ɵprov=vi({token:e,providedIn:`root`,factory:()=>new rc})}return e})(),rc=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}},ic=class{[$t];constructor(e){this[$t]=e}destroy(){this[$t].destroy()}};function ac(e,t){let n=t?.injector??S(gs),r=t?.manualCleanup===!0?null:n.get(vs),i,a=n.get(Zs,null,{optional:!0}),o=n.get($s);return a===null?i=uc(e,n.get(nc),o):(i=lc(a.view,o,e),r instanceof ys&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new ic(i)}var oc={...Nn,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=Go(!1);try{Pn(this)}finally{Go(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=en(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],en(e)}}},sc={...oc,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(gn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},cc={...oc,consumerMarkedDirty(){this.view[2]|=8192,wo(this.view),this.notifier.notify(13)},destroy(){if(gn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[23]?.delete(this)}};function lc(e,t,n){let r=Object.create(cc);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=dc(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function uc(e,t,n){let r=Object.create(sc);return r.fn=dc(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 dc(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}function fc(e){return typeof e==`function`&&e[$t]!==void 0}function pc(e){return fc(e)&&typeof e.set==`function`}var mc=Symbol(`InputSignalNode#UNSET`),hc={...jn,transformFn:void 0,applyValueToInputSignal(e,t){kn(e,t)}};function gc(e){return{toString:e}.toString()}var _c=(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})(_c||{}),vc=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function yc(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var bc=null,xc=(()=>{bc=Cc;let e=()=>Cc;return e.ngInherit=!0,e})();function Sc(){return bc}function Cc(e){return e.type.prototype.ngOnChanges&&(e.setInput=Tc),wc}function wc(){let e=Dc(this),t=e?.current;if(t){let n=e.previous;if(n===_a)e.previous=t;else for(let e in t)n[e]=t[e];e.current=null,this.ngOnChanges(t)}}function Tc(e,t,n,r,i){let a=this.declaredInputs[r],o=Dc(e)||Oc(e,{previous:_a,current:null}),s=o.current||={},c=o.previous,l=c[a];s[a]=new vc(l&&l.currentValue,n,c===_a),yc(e,t,i,n)}var Ec=`__ngSimpleChanges__`;function Dc(e){return Object.hasOwn(e,Ec)&&e[Ec]||null}function Oc(e,t){return e[Ec]=t}var kc=[],Ac=function(e,t=null,n){for(let r=0;r<kc.length;r++){let i=kc[r];i(e,t,n)}};function jc(e,t,n){let{ngOnChanges:r,ngOnInit:i,ngDoCheck:a}=t.type.prototype;if(r){let r=Sc()(t);(n.preOrderHooks??=[]).push(e,r),(n.preOrderCheckHooks??=[]).push(e,r)}i&&(n.preOrderHooks??=[]).push(0-e,i),a&&((n.preOrderHooks??=[]).push(e,a),(n.preOrderCheckHooks??=[]).push(e,a))}function Mc(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n<r;n++){let{ngAfterContentInit:t,ngAfterContentChecked:r,ngAfterViewInit:i,ngAfterViewChecked:a,ngOnDestroy:o}=e.data[n].type.prototype;t&&(e.contentHooks??=[]).push(-n,t),r&&((e.contentHooks??=[]).push(n,r),(e.contentCheckHooks??=[]).push(n,r)),i&&(e.viewHooks??=[]).push(-n,i),a&&((e.viewHooks??=[]).push(n,a),(e.viewCheckHooks??=[]).push(n,a)),o!=null&&(e.destroyHooks??=[]).push(n,o)}}function Nc(e,t,n){Ic(e,t,3,n)}function Pc(e,t,n,r){(e[2]&3)===n&&Ic(e,t,n,r)}function Fc(e,t){let n=e[2];(n&3)===t&&(n&=16383,n+=1,e[2]=n)}function Ic(e,t,n,r){let i=r===void 0?0:e[17]&65535,a=r??-1,o=t.length-1,s=0;for(let c=i;c<o;c++)if(typeof t[c+1]==`number`){if(s=t[c],r!=null&&s>=r)break}else t[c]<0&&(e[17]+=65536),(s<a||a==-1)&&(Rc(e,n,t,c),e[17]=(e[17]&4294901760)+c+2),c++}function Lc(e,t){Ac(_c.LifecycleHookStart,e,t);let n=en(null);try{t.call(e)}finally{en(n),Ac(_c.LifecycleHookEnd,e,t)}}function Rc(e,t,n,r){let i=n[r]<0,a=n[r+1],o=e[i?-n[r]:n[r]];i?e[2]>>14<e[17]>>16&&(e[2]&3)===t&&(e[2]+=16384,Lc(o,a)):Lc(o,a)}var zc=-1,Bc=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 Vc(e){return!!(e.flags&8)}function Hc(e){return!!(e.flags&16)}function Uc(e,t,n){let r=0;for(;r<n.length;){let i=n[r];if(typeof i==`number`){if(i!==0)break;r++;let a=n[r++],o=n[r++],s=n[r++];e.setAttribute(t,o,s,a)}else{let a=i,o=n[++r];Gc(a)?e.setProperty(t,a,o):e.setAttribute(t,a,o),r++}}return r}function Wc(e){return e===3||e===4||e===6}function Gc(e){return e.charCodeAt(0)===64}function Kc(e,t){if(t!==null&&t.length!==0){if(e===null||e.length===0)e=t.slice();else{let n=-1;for(let r=0;r<t.length;r++){let i=t[r];typeof i==`number`?n=i:n===0||(n===-1||n===2?qc(e,n,i,null,t[++r]):qc(e,n,i,null,null))}}}return e}function qc(e,t,n,r,i){let a=0,o=e.length;if(t===-1)o=-1;else for(;a<e.length;){let n=e[a++];if(typeof n==`number`){if(n===t){o=-1;break}if(n>t){o=a-1;break}}}for(;a<e.length;){let t=e[a];if(typeof t==`number`)break;if(t===n){i!==null&&(e[a+1]=i);return}a++,i!==null&&a++}o!==-1&&(e.splice(o,0,t),a=o+1),e.splice(a++,0,n),i!==null&&e.splice(a++,0,i)}function Jc(e){return e!==zc}function Yc(e){return e&32767}function Xc(e){return e>>16}function Zc(e,t){let n=Xc(e),r=t;for(;n>0;)r=r[14],n--;return r}var Qc=!0;function $c(e){let t=Qc;return Qc=e,t}var el=255,tl=5,nl=0,rl={};function il(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,ji)&&(r=n[ji]),r??=n[ji]=nl++;let i=r&el,a=1<<i;t.data[e+(i>>tl)]|=a}function al(e,t){let n=sl(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,ol(r.data,e),ol(t,null),ol(r.blueprint,null));let i=cl(e,t),a=e.injectorIndex;if(Jc(i)){let e=Yc(i),n=Zc(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 ol(e,t){e.push(0,0,0,0,0,0,0,0,t)}function sl(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function cl(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=Tl(i),r===null)return zc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return zc}function ll(e,t,n){il(e,t,n)}function ul(e,t,n){if(n&8||e!==void 0)return e;Hi(t,`NodeInjector`)}function dl(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=qi(void 0);try{return i?i.get(t,r,n&8):Ji(t,r,n&8)}finally{qi(a)}}return ul(r,t,n)}function fl(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=wl(e,t,n,r,rl);if(i!==rl)return i}let i=pl(e,t,n,r,rl);if(i!==rl)return i}return dl(t,n,r,i)}function pl(e,t,n,r,i){let a=_l(n);if(typeof a==`function`){if(!Qo(t,e,r))return r&1?ul(i,n,r):dl(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))Hi(n);else return e}finally{rs()}}else if(typeof a==`number`){let i=null,o=sl(e,t),s=zc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?cl(e,t):t[o+8],s===zc||!yl(r,!1)?o=-1:(i=t[1],o=Yc(s),t=Zc(s,t)));o!==-1;){let e=t[1];if(vl(a,o,e.data)){let e=ml(o,t,n,i,r,c);if(e!==rl)return e}s=t[o+8],s!==zc&&yl(r,t[1].data[o+8]===c)&&vl(a,o,t)?(i=e,o=Yc(s),t=Zc(s,t)):o=-1}}return i}function ml(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=hl(s,o,n,r==null?ro(s)&&Qc:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?rl:gl(t,o,c,s,i)}function hl(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<f;e++){let t=o[e];if(e<c&&n===t||e>=c&&t.type===n)return e}if(i){let e=o[c];if(e&&ao(e)&&e.type===n)return c}return null}function gl(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof Bc){let s=a;if(s.resolving)throw Vi(``);let c=$c(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?qi(s.injectImpl):null;Qo(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&jc(n,o[n],t)}finally{l!==null&&qi(l),$c(c),s.resolving=!1,rs()}}return a}function _l(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,ji)?e[ji]:void 0;return typeof t==`number`?t>=0?t&el:xl:t}function vl(e,t,n){let r=1<<e;return!!(n[t+(e>>tl)]&r)}function yl(e,t){return!(e&2)&&!(e&1&&t)}var bl=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return fl(this._tNode,this._lView,e,ta(n),t)}};function xl(){return new bl(Ro(),Io())}function Sl(e){return gc(()=>{let t=e.prototype.constructor,n=t[Ai]||Cl(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let e=i[Ai]||Cl(i);if(e&&e!==n)return e;i=Object.getPrototypeOf(i)}return e=>new e})}function Cl(e){return _i(e)?()=>{let t=Cl(gi(e));return t&&t()}:aa(e)}function wl(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!oo(o);){let e=pl(a,o,n,r|2,rl);if(e!==rl)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,rl,r);if(t!==rl)return t}t=Tl(o),o=o[14]}a=t}return i}function Tl(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}function El(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function Dl(){return Ol(Ro(),Io())}function Ol(e,t){return new kl(po(e,t))}var kl=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=Dl}return e})();function Al(e){return e instanceof kl?e.nativeElement:e}function jl(){return this._results[Symbol.iterator]()}var Ml=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 Vr}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=sa(e);(this._changesDetected=!oa(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]=jl};function Nl(e){return(e.flags&128)==128}var Pl=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Pl||{}),Fl=new Map,Il=0;function Ll(){return Il++}function Rl(e){Fl.set(e[19],e)}function zl(e){Fl.delete(e[19])}var Bl=`__ngContext__`;function Vl(e,t){eo(t)?(e[Bl]=t[19],Rl(t)):e[Bl]=t}function Hl(e){return Wl(e[12])}function Ul(e){return Wl(e[4])}function Wl(e){for(;e!==null&&!to(e);)e=e[4];return e}var Gl=void 0;function Kl(e){Gl=e}function ql(){if(Gl!==void 0)return Gl;if(typeof document<`u`)return document;throw new ui(210,!1)}var Jl=!1,Yl=new Ti(``,{factory:()=>Jl}),Xl=new WeakMap;function Zl(e,t){if(typeof e!=`object`||!e)return;let n=Xl.get(e);n||(n=new WeakSet,Xl.set(e,n)),n.add(t)}function Ql(e){return(e.flags&32)==32}var $l=()=>null;function eu(e,t,n=!1){return $l(e,t,n)}function tu(e,t){let n=e.contentQueries;if(n!==null){let r=en(null);try{for(let r=0;r<n.length;r+=2){let i=n[r],a=n[r+1];if(a!==-1){let n=e.data[a];Zo(i),n.contentQueries(2,t[a],a)}}}finally{en(r)}}}function nu(e,t,n){Zo(0);let r=en(null);try{t(e,n)}finally{en(r)}}function ru(e,t,n){if(no(t)){let r=en(null);try{let r=t.directiveStart,i=t.directiveEnd;for(let t=r;t<i;t++){let r=e.data[t];if(r.contentQueries){let e=n[t];r.contentQueries(1,e,t)}}}finally{en(r)}}}var iu=(function(e){return e[e.Emulated=0]=`Emulated`,e[e.None=2]=`None`,e[e.ShadowDom=3]=`ShadowDom`,e[e.ExperimentalIsolatedShadowDom=4]=`ExperimentalIsolatedShadowDom`,e})(iu||{}),au=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${li})`}};function ou(e){return e instanceof au?e.changingThisBreaksApplicationSecurity:e}function su(e,t){let n=cu(e);if(n!=null&&n!==t){if(n===`ResourceURL`&&t===`URL`)return!0;throw Error(`Required a safe ${t}, got a ${n} (see ${li})`)}return n===t}function cu(e){return e instanceof au&&e.getTypeName()||null}var lu=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function uu(e){return e=String(e),e.match(lu)?e:`unsafe:`+e}var du=/^>|^->|<!--|-->|--!>|<!-$/g,fu=/(<|>)/g,ote=`​$1​`;function ste(e){return e.replace(du,e=>e.replace(fu,ote))}function cte(e,t){return e.createText(t)}function lte(e,t,n){e.setValue(t,n)}function ute(e,t){return e.createComment(ste(t))}function pu(e,t,n){return e.createElement(t,n)}function mu(e,t,n,r,i){e.insertBefore(t,n,r,i)}function hu(e,t,n){e.appendChild(t,n)}function gu(e,t,n,r,i){r===null?hu(e,t,n):mu(e,t,n,r,i)}function _u(e,t,n,r){e.removeChild(null,t,n,r)}function dte(e,t,n){e.setAttribute(t,`style`,n)}function fte(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function vu(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&Uc(e,t,r),i!==null&&fte(e,t,i),a!==null&&dte(e,t,a)}function yu(e){let t=pte();return t?t.sanitize(co.URL,e)||``:su(e,`URL`)?ou(e):uu(Li(e))}function pte(){let e=Io();return e&&e[10].sanitizer}function bu(e){return e.ownerDocument.defaultView}function xu(e){return e.ownerDocument}function mte(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 Su=`ng-template`;function hte(e,t,n,r){let i=0;if(r){for(;i<t.length&&typeof t[i]==`string`;i+=2)if(t[i]===`class`&&mte(t[i+1].toLowerCase(),n,0)!==-1)return!0}else if(Cu(e))return!1;if(i=t.indexOf(1,i),i>-1){let e;for(;++i<t.length&&typeof(e=t[i])==`string`;)if(e.toLowerCase()===n)return!0}return!1}function Cu(e){return e.type===4&&e.value!==Su}function gte(e,t,n){return t===(e.type===4&&!n?Su:e.value)}function _te(e,t,n){let r=4,i=e.attrs,a=i===null?0:bte(i),o=!1;for(let s=0;s<t.length;s++){let c=t[s];if(typeof c==`number`){if(!o&&!wu(r)&&!wu(c))return!1;if(o&&wu(c))continue;o=!1,r=c|r&1;continue}if(!o){if(r&4){if(r=2|r&1,c!==``&&!gte(e,c,n)||c===``&&t.length===1){if(wu(r))return!1;o=!0}}else if(r&8){if(i===null||!hte(e,i,c,n)){if(wu(r))return!1;o=!0}}else{let l=t[++s],u=vte(c,i,Cu(e),n);if(u===-1){if(wu(r))return!1;o=!0;continue}if(l!==``){let e;if(e=u>a?``:i[u+1].toLowerCase(),r&2&&l!==e){if(wu(r))return!1;o=!0}}}}}return wu(r)||o}function wu(e){return!(e&1)}function vte(e,t,n,r){if(t===null)return-1;let i=0;if(r||!n){let n=!1;for(;i<t.length;){let r=t[i];if(r===e)return i;if(r===3||r===6)n=!0;else if(r===1||r===2){let e=t[++i];for(;typeof e==`string`;)e=t[++i];continue}else if(r===4)break;else if(r===0){i+=4;continue}i+=n?1:2}return-1}return xte(t,e)}function Tu(e,t,n=!1){for(let r=0;r<t.length;r++)if(_te(e,t[r],n))return!0;return!1}function yte(e){let t=e.attrs;if(t!=null){let e=t.indexOf(5);if(!(e&1))return t[e+1]}return null}function bte(e){for(let t=0;t<e.length;t++){let n=e[t];if(Wc(n))return t}return e.length}function xte(e,t){let n=e.indexOf(4);if(n>-1)for(n++;n<e.length;){let r=e[n];if(typeof r==`number`)return-1;if(r===t)return n;n++}return-1}function Ste(e,t){selectorListLoop:for(let n=0;n<t.length;n++){let r=t[n];if(e.length===r.length){for(let t=0;t<e.length;t++)if(e[t]!==r[t])continue selectorListLoop;return!0}}return!1}function Eu(e,t){return e?`:not(`+t.trim()+`)`:t}function Cte(e){let t=e[0],n=1,r=2,i=``,a=!1;for(;n<e.length;){let o=e[n];if(typeof o==`string`){if(r&2){let t=e[++n];i+=`[`+o+(t.length>0?`="`+t+`"`:``)+`]`}else r&8?i+=`.`+o:r&4&&(i+=` `+o)}else i!==``&&!wu(o)&&(t+=Eu(a,i),i=``),r=o,a||=!wu(r);n++}return i!==``&&(t+=Eu(a,i)),t}function wte(e){return e.map(Cte).join(`,`)}function Tte(e){let t=[],n=[],r=1,i=2;for(;r<e.length;){let a=e[r];if(typeof a==`string`)i===2?a!==``&&t.push(a,e[++r]):i===8&&n.push(a);else{if(!wu(i))break;i=a}r++}return n.length&&t.push(1,...n),t}var Du={},Ou=(function(e){return e[e.Important=1]=`Important`,e[e.DashCase=2]=`DashCase`,e})(Ou||{}),Ete;function ku(e,t){return Ete(e,t)}var Dte=new Ti(``,{factory:()=>!1});function Au(e){if(!e)return 0;let t=e.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(e)*t}function ju(e,t){return e.getPropertyValue(t).split(`,`).map(e=>e.trim())}function Ote(e){let t=ju(e,`transition-property`),n=ju(e,`transition-duration`),r=ju(e,`transition-delay`),i={propertyName:``,duration:0,animationName:void 0};for(let e=0;e<t.length;e++){let a=Au(r[e])+Au(n[e]);a>i.duration&&(i.propertyName=t[e],i.duration=a)}return i}function kte(e){let t=ju(e,`animation-name`),n=ju(e,`animation-delay`),r=ju(e,`animation-duration`),i=ju(e,`animation-iteration-count`),a={animationName:``,propertyName:void 0,duration:0};for(let e=0;e<t.length;e++){let o=Au(n[e])+Au(r[e]),s=i[e];o>a.duration&&s!==`infinite`&&(a.animationName=t[e],a.duration=o)}return a}function Mu(e,t){return e!==void 0&&e.duration>t.duration}function Nu(e){return(e.animationName!=null||e.propertyName!=null)&&e.duration>0}function Pu(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 Ate(e,t){let n=getComputedStyle(e),r=kte(n),i=Ote(n),a=r.duration>i.duration?r:i;Mu(t.get(e),a)||Nu(a)&&t.set(e,a)}function jte(e,t,n){if(!n)return;let r=e.getAnimations();return r.length===0?Ate(e,t):Mte(e,t,r)}function Mte(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=Pu(e)??0,n,i;e.animationName?i=e.animationName:n=e.transitionProperty,t>=r.duration&&(r={animationName:i,propertyName:n,duration:t})}Mu(t.get(e),r)||Nu(r)&&t.set(e,r)}var Fu=new Set,Nte=!1,Pte=1,Iu=typeof document<`u`&&typeof document?.documentElement?.getAnimations==`function`;function Fte(e){return e[9].get(Dte,Nte)}function Ite(e,t,n){let r=Ru.get(e);if(r){for(let e of t)r.classList.push(e);for(let e of n)r.cleanupFns.push(e)}else Ru.set(e,{classList:t,cleanupFns:n})}function Lu(e){let t=Ru.get(e);if(t){for(let e of t.cleanupFns)e();Ru.delete(e)}zu.delete(e)}var Ru=new WeakMap,zu=new WeakMap,Bu=new WeakMap;function Vu(e){return e?e[14]??e:null}var Hu=new WeakSet;function Lte(e,t,n){let r=Bu.get(e);if(!r||r.length===0)return;let i=t.parentNode,a=t.previousSibling,o=Vu(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),Hu.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 Rte(e,t,n){let r=Vu(n),i=Bu.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):Bu.set(e,[{el:t,declarationView:r}])}function Uu(e){let t=e[26]??={};return t.enter??=new Map}function zte(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 Wu(e){return e.composedPath?e.composedPath()[0]:e.target}function Gu(e,t){let n=zu.get(t);if(n===void 0)return!0;if(t!==Wu(e))return!1;let r=e.animation;if(r){let e=Pu(r);if(e!==void 0&&e+Pte<n.duration)return!1}return n.animationName===void 0?n.propertyName===void 0?!1:n.propertyName===`all`||e.propertyName===n.propertyName:e.animationName===n.animationName}function Bte(e,t,n){let r=e.get(t.index)??{animateFns:[]};r.animateFns.push(n),e.set(t.index,r)}var Ku=(function(e){return e[e.CHANGE_DETECTION=0]=`CHANGE_DETECTION`,e[e.AFTER_NEXT_RENDER=1]=`AFTER_NEXT_RENDER`,e})(Ku||{}),qu=new Ti(``),Ju=new Set;function Yu(e){Ju.has(e)||(Ju.add(e),performance?.mark?.(`mark_feature_usage`,{detail:{feature:e}}))}var Xu=(()=>{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=vi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Zu=[0,1,2,3],Qu=(()=>{class e{ngZone=S(As);scheduler=S($s);errorHandler=S(Hs,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){S(qu,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Ac(_c.AfterRenderHooksStart),this.executing=!0;for(let e of Zu)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&&Ac(_c.AfterRenderHooksEnd)}register(e){let{view:t}=e;t===void 0?this.executing?this.deferredRegistrations.add(e):this.addSequence(e):((t[25]??=[]).push(e),wo(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(Ku.AFTER_NEXT_RENDER,e):e()}static ɵprov=vi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),$u=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 ed(e,t){let n=t?.injector??S(gs);return Yu(`NgAfterNextRender`),Hte(e,n,t,!0)}function Vte(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function Hte(e,t,n,r){let i=t.get(Xu);i.impl??=t.get(Qu);let a=t.get(qu,null,{optional:!0}),o=n?.manualCleanup===!0?null:t.get(vs),s=t.get(Zs,null,{optional:!0}),c=new $u(i.impl,Vte(e),s?.view,r,o,a?.snapshot(null));return i.impl.register(c),c}var td=new Ti(``,{factory:()=>{let e=S(za),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function nd(e,t,n){let r=e.get(td);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 Ute(e,t){let n=e.get(td);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Wte(e,t){let n=e.get(td);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function Gte(e){let t=e.get(td);t.isScheduled||=(ed(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:t.injector}),!0)}function Kte(e){let t=e.get(td);t.scheduler=Gte,t.scheduler(e)}function rd(e,t){for(let[n,r]of t)nd(e,r.animateFns)}function id(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&rd(r,i)}function ad(e,t,n,r){try{n.get(ba)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&Ute(n,i.enter.get(t.index).animateFns);let a=qte(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];od(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&Fu.add(e[19]),nd(n,()=>Jte(e,t,i||void 0,a,r),i||void 0)}function qte(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 Jte(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&&od(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),Xte(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&Fu.delete(e[19]),i(!0)})}else e&&Fu.delete(e[19]),i(!1)}function od(e,t,n){if(t.type&12){let r=e[t.index];if(to(r))for(let e=10;e<r.length;e++){let t=r[e];t[1].type===2&&Yte(t,n)}}let r=t.child;for(;r;)od(e,r,n),r=r.next}function Yte(e,t){let n=e[26];if(n&&n.leave)for(let e of n.leave.values())for(let n of e.animateFns){let{promise:e}=n();t.push(e)}let r=e[1].firstChild;for(;r;)od(e,r,t),r=r.next}function Xte(e,t,n){t.then(()=>{e[26]?.running===t&&(e[26].running=void 0,Fu.delete(e[19])),n(!0)})}function sd(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;to(i)?c=i:eo(i)&&(l=!0,i=i[0]);let u=uo(i);e===0&&r!==null?(id(s,r,a,n),o==null?hu(t,r,u):mu(t,r,u,o||null,!0)):e===1&&r!==null?(id(s,r,a,n),mu(t,r,u,o||null,!0),Lte(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&Rte(a,u,s),Hu.delete(u),ad(s,a,n,e=>{if(Hu.has(u)){Hu.delete(u);return}_u(t,u,l,e)})):e===3&&(Hu.delete(u),ad(s,a,n,()=>{t.destroyNode(u)})),c!=null&&Cd(t,e,n,c,a,r,o)}}function Zte(e,t){cd(e,t),t[0]=null,t[5]=null}function Qte(e,t,n,r,i,a){r[0]=i,r[5]=t,yd(e,r,n,1,i,a)}function cd(e,t){t[10].changeDetectionScheduler?.notify(9),yd(e,t,t[11],2,null,null)}function $te(e){let t=e[12];if(!t)return dd(e[1],e);for(;t;){let n=null;if(eo(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)eo(t)&&dd(t[1],t),t=t[3];t===null&&(t=e),eo(t)&&dd(t[1],t),n=t&&t[4]}t=n}}function ld(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function ud(e,t){if(so(t))return;let n=t[11];n.destroyNode&&yd(e,t,n,3,null,null),$te(t)}function dd(e,t){if(so(t))return;let n=en(null);try{t[2]&=-129,t[2]|=256,t[24]&&gn(t[24]),tne(e,t),ene(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&to(t[3])){n!==t[3]&&ld(n,t);let r=t[18];r!==null&&r.detachView(e)}zl(t)}finally{en(n)}}function ene(e,t){let n=e.cleanup,r=t[7];if(n!==null)for(let e=0;e<n.length-1;e+=2)if(typeof n[e]==`string`){let t=n[e+3];t>=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;e<i.length;e++){let t=i[e];t()}}let a=t[23];if(a!==null){t[23]=null;for(let e of a)e.destroy()}}function tne(e,t){let n;if(e!=null&&(n=e.destroyHooks)!=null)for(let e=0;e<n.length;e+=2){let r=t[n[e]];if(!(r instanceof Bc)){let t=n[e+1];if(Array.isArray(t))for(let e=0;e<t.length;e+=2){let n=r[t[e]],i=t[e+1];Ac(_c.LifecycleHookStart,n,i);try{i.call(n)}finally{Ac(_c.LifecycleHookEnd,n,i)}}else{Ac(_c.LifecycleHookStart,r,t);try{t.call(r)}finally{Ac(_c.LifecycleHookEnd,r,t)}}}}}function fd(e,t,n){if(t===null)throw new ui(510,!1);return nne(e,t.parent,n)}function nne(e,t,n){let r=t;for(;r!==null&&r.type&168;)t=r,r=t.parent;if(r===null)return n[0];if(ro(r)){let{encapsulation:t}=e.data[r.directiveStart+r.componentOffset];if(t===iu.None||t===iu.Emulated)return null}return po(r,n)}function pd(e,t,n){return ine(e,t,n)}function rne(e,t,n){return e.type&40?po(e,n):null}var ine=rne;function md(e,t,n,r){let i=fd(e,r,t),a=t[11],o=pd(r.parent||t[5],r,t);if(i!=null){if(Array.isArray(n))for(let e=0;e<n.length;e++)gu(a,i,n[e],o,!1);else gu(a,i,n,o,!1)}}function hd(e,t){if(t!==null){let n=t.type;if(n&3)return po(t,e);if(n&4)return _d(-1,e[t.index]);if(n&8){let n=t.child;if(n!==null)return hd(e,n);{let n=e[t.index];return to(n)?_d(-1,n):uo(n)}}if(n&128)return hd(e,t.next);if(n&32)return ku(t,e)()||uo(e[t.index]);{let n=gd(e,t);return n===null?hd(e,t.next):Array.isArray(n)?n[0]:hd(Eo(e[15]),n)}}return null}function gd(e,t){if(t!==null){let n=e[15][5],r=t.projection;return n.projection[r]}return null}function _d(e,t){let n=10+e+1;if(n<t.length){let e=t[n],r=e[1].firstChild;if(r!==null)return hd(e,r)}return t[7]}function vd(e,t,n,r,i,a,o){for(;n!=null;){let s=r[9];if(n.type===128){n=n.next;continue}let c=r[n.index],l=n.type;if(o&&t===0&&(c&&Vl(uo(c),r),n.flags|=2),!Ql(n)){if(l&8)vd(e,t,n.child,r,i,a,!1),sd(t,e,s,i,c,n,a,r);else if(l&32){let o=ku(n,r),l;for(;l=o();)sd(t,e,s,i,l,n,a,r);sd(t,e,s,i,c,n,a,r)}else l&16?Sd(e,t,r,n,i,a):sd(t,e,s,i,c,n,a,r)}n=o?n.projectionNext:n.next}}function yd(e,t,n,r,i,a){e.type===3?bd(n,r,t,i,a):vd(n,r,e.firstChild,t,i,a,!1)}function bd(e,t,n,r,i){let a=n[1].firstChild,o=a.next,s=uo(n[a.index]),c=uo(n[o.index]),l=o.index+1,u=n[l];if(t===1||t===0)r!==null&&(u&&u.hasChildNodes()?mu(e,r,u,i,!0):(mu(e,r,s,i,!0),mu(e,r,c,i,!0)));else if(t===2){if(u||(u=document.createDocumentFragment(),n[l]=u),s&&s.parentNode===u)return;let e=s;for(;e!==null;){let t=e.nextSibling;if(u.appendChild(e),e===c)break;e=t}}}function xd(e,t,n){let r=t[11];Sd(r,0,t,n,fd(e,n,t),pd(n.parent||t[5],n,t))}function Sd(e,t,n,r,i,a){let o=n[15],s=o[5].projection[r.projection];if(Array.isArray(s))for(let o=0;o<s.length;o++){let c=s[o];sd(t,e,n[9],i,c,r,a,n)}else{let n=s,c=o[3];Nl(r)&&(n.flags|=128),vd(e,t,n,c,i,a,!0)}}function Cd(e,t,n,r,i,a,o){let s=r[7];if(s!==uo(r)&&sd(t,e,n,a,s,i,o),!(r[2]&4))for(let n=10;n<r.length;n++){let i=r[n];yd(i[1],i,e,t,a,s)}}function wd(e,t,n,r,i){if(t)i?e.addClass(n,r):e.removeClass(n,r);else{let t=r.indexOf(`-`)===-1?void 0:Ou.DashCase;i==null?e.removeStyle(n,r,t):(typeof i==`string`&&i.endsWith(`!important`)&&(i=i.slice(0,-10),t|=Ou.Important),e.setStyle(n,r,i,t))}}function Td(e,t,n,r,i,a,o,s,c,l,u){let d=27+r,f=d+i,p=Ed(d,f),m=typeof l==`function`?l():l;return p[1]={type:e,blueprint:p,template:n,queries:null,viewQuery:s,declTNode:t,data:p.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:f,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof a==`function`?a():a,pipeRegistry:typeof o==`function`?o():o,firstChild:null,schemas:c,consts:m,incompleteFirstPass:!1,ssrId:u}}function Ed(e,t){let n=[];for(let r=0;r<t;r++)n.push(r<e?null:Du);return n}function Dd(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=Td(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function Od(e,t,n,r,i,a,o,s,c,l,u){let d=t.blueprint.slice();return d[0]=i,d[2]=r|1228,(l!==null||e&&e[2]&2048)&&(d[2]|=2048),bo(d),d[3]=d[14]=e,d[8]=n,d[10]=o||e&&e[10],d[11]=s||e&&e[11],d[9]=c||e&&e[9]||null,d[5]=a,d[19]=Ll(),d[6]=u,d[20]=l,d[15]=t.type==2?e[15]:d,d}function kd(e,t,n){let r=po(t,e),i=Dd(n),a=e[10].rendererFactory,o=Md(e,Od(e,i,null,Ad(n),r,t,null,a.createRenderer(r,n),null,null,null));return e[t.index]=o}function Ad(e){let t=16;return e.signals?t=4096:e.onPush&&(t=64),t}function jd(e,t,n,r){if(n===0)return-1;let i=t.length;for(let i=0;i<n;i++)t.push(r),e.blueprint.push(r),e.data.push(null);return i}function Md(e,t){return e[12]?e[13][4]=t:e[12]=t,e[13]=t,t}function D(e=1){Nd(Lo(),Io(),as()+e,!1)}function Nd(e,t,n,r){if(!r){if((t[2]&3)==3){let r=e.preOrderCheckHooks;r!==null&&Nc(t,r,n)}else{let r=e.preOrderHooks;r!==null&&Pc(t,r,0,n)}}os(n)}var Pd=(function(e){return e[e.None=0]=`None`,e[e.SignalBased=1]=`SignalBased`,e[e.HasDecoratorInputTransform=2]=`HasDecoratorInputTransform`,e})(Pd||{});function Fd(e,t,n,r){let i=en(null);try{let[i,a,o]=e.inputs[n],s=null;(a&Pd.SignalBased)!==0&&(s=t[i][$t]),s!==null&&s.transformFn!==void 0?r=s.transformFn(r):o!==null&&(r=o.call(t,r)),e.setInput===null?yc(t,s,i,r):e.setInput(t,s,r,n,i)}finally{en(i)}}function Id(e,t,n,r,i){let a=as(),o=r&2;try{os(-1),o&&t.length>27&&Nd(e,t,27,!1),Ac(o?_c.TemplateUpdateStart:_c.TemplateCreateStart,i,n),n(r,i)}finally{os(a),Ac(o?_c.TemplateUpdateEnd:_c.TemplateCreateEnd,i,n)}}function Ld(e,t,n){Wd(e,t,n),(n.flags&64)==64&&Gd(e,t,n)}function Rd(e,t,n=po){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a<r.length;a+=2){let o=r[a+1],s=o===-1?n(t,e):e[o];e[i++]=s}}}function zd(e,t,n,r){let i=r.get(Yl,Jl)||n===iu.ShadowDom||n===iu.ExperimentalIsolatedShadowDom;return e.selectRootElement(t,i)}function Bd(e){return e===`class`?`className`:e===`for`?`htmlFor`:e===`formaction`?`formAction`:e===`innerHtml`?`innerHTML`:e===`readonly`?`readOnly`:e===`tabindex`?`tabIndex`:e}function Vd(e,t,n,r,i,a){let o=t[1];if(ef(e,o,t,n,r)){ro(e)&&Ud(t,e.index);return}e.type&3&&(n=Bd(n)),Hd(e,t,n,r,i,a)}function Hd(e,t,n,r,i,a){if(e.type&3){let o=po(e,t);r=a==null?r:a(r,e.value||``,n),i.setProperty(o,n,r)}else e.type&12}function Ud(e,t){let n=_o(t,e);n[2]&16||(n[2]|=64)}function Wd(e,t,n){let r=n.directiveStart,i=n.directiveEnd;ro(n)&&kd(t,n,e.data[r+n.componentOffset]),e.firstCreatePass||al(n,t);let a=n.initialInputs;for(let o=r;o<i;o++){let i=e.data[o],s=gl(t,e,o,n);if(Vl(s,t),a!==null&&Xd(t,o-r,s,i,n,a),ao(i)){let r=_o(n.index,t);r[8]=gl(t,e,o,n)}}}function Gd(e,t,n){let r=n.directiveStart,i=n.directiveEnd,a=n.index,o=tte();try{os(a);for(let n=r;n<i;n++){let r=e.data[n],i=t[n];Xo(n),(r.hostBindings!==null||r.hostVars!==0||r.hostAttrs!==null)&&Kd(r,i)}}finally{os(-1),Xo(o)}}function Kd(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function qd(e,t){let n=e.directiveRegistry,r=null;if(n)for(let e=0;e<n.length;e++){let i=n[e];Tu(t,i.selectors,!1)&&(r??=[],ao(i)?r.unshift(i):r.push(i))}return r}function Jd(e,t,n,r,i,a){let o=po(e,t);Yd(t[11],o,a,e.value,n,r,i)}function Yd(e,t,n,r,i,a,o){if(a==null)o?.(a,r||``,i),e.removeAttribute(t,i,n);else{let s=o==null?Li(a):o(a,r||``,i);e.setAttribute(t,i,s,n)}}function Xd(e,t,n,r,i,a){let o=a[t];if(o!==null)for(let e=0;e<o.length;e+=2){let t=o[e],i=o[e+1];Fd(r,n,t,i)}}function Zd(e,t,n,r,i){let a=27+n,o=t[1],s=i(o,t,e,r,n);t[a]=s,Bo(e,!0);let c=e.type===2;return c?(vu(t[11],s,e),(Yee()===0||io(e))&&Vl(s,t),Xee()):Vl(s,t),fs()&&(!c||!Ql(e))&&md(o,t,s,e),e}function Qd(e){let t=e;return Vo()?Ho():(t=t.parent,Bo(t,!1)),t}function $d(e,t){let n=e[9];if(!n)return;let r;try{r=n.get(Us,null)}catch{r=null}r?.(t)}function ef(e,t,n,r,i){let a=e.inputs?.[r],o=e.hostDirectiveInputs?.[r],s=!1;if(o)for(let e=0;e<o.length;e+=2){let r=o[e],a=o[e+1],c=t.data[r];Fd(c,n[r],a,i),s=!0}if(a)for(let e of a){let a=n[e],o=t.data[e];Fd(o,a,r,i),s=!0}return s}function tf(e,t,n,r,i,a){let o=null,s=null,c=null,l=!1,u=e.directiveToIndex.get(r.type);if(typeof u==`number`?o=u:[o,s,c]=u,s!==null&&c!==null&&e.hostDirectiveInputs&&Object.hasOwn(e.hostDirectiveInputs,i)){let r=e.hostDirectiveInputs[i];for(let e=0;e<r.length;e+=2){let i=r[e];if(i>=s&&i<=c){let o=t.data[i],s=r[e+1];Fd(o,n[i],s,a),l=!0}else if(i>c)break}}return o!==null&&Object.hasOwn(r.inputs,i)&&(Fd(r,n[o],i,a),l=!0),l}function nf(e,t){let n=_o(t,e),r=n[1];rf(r,n);let i=n[0];i!==null&&n[6]===null&&(n[6]=eu(i,n[9])),Ac(_c.ComponentStart);try{af(r,n,n[8])}finally{Ac(_c.ComponentEnd,n[8])}}function rf(e,t){for(let n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}function af(e,t,n){$o(t);try{let r=e.viewQuery;r!==null&&nu(1,r,n);let i=e.template;i!==null&&Id(e,t,i,1,n),e.firstCreatePass&&=!1,t[18]?.finishViewCreation(e),e.staticContentQueries&&tu(e,t),e.staticViewQueries&&nu(2,e.viewQuery,n);let a=e.components;a!==null&&of(t,a)}catch(t){throw e.firstCreatePass&&=(e.incompleteFirstPass=!0,!1),t}finally{t[2]&=-5,is()}}function of(e,t){for(let n=0;n<t.length;n++)nf(e,t[n])}function sf(e,t,n,r){let i=en(null);try{let i=t.tView,a=Od(e,i,n,e[2]&4096?4096:16,null,t,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null);a[16]=e[t.index];let o=e[18];return o!==null&&(a[18]=o.createEmbeddedView(i)),af(i,a,n),a}finally{en(i)}}function cf(e,t){return!t||t.firstChild===null||Nl(e)}function lf(e,t,n,r,i=!1){if(e.type===3){let n=e.firstChild,i=n.next,a=uo(t[n.index]),o=uo(t[i.index]),s=a;for(;s!==null&&(r.push(s),s!==o);)s=s.nextSibling;return r}for(;n!==null;){if(n.type===128){n=i?n.projectionNext:n.next;continue}let a=t[n.index];if(a!==null){if(to(a)){let e=a[7];e!==a[0]&&r.push(uo(a)),a[2]&4||uf(a,r),r.push(e)}else r.push(uo(a))}let o=n.type;if(o&8)lf(e,t,n.child,r);else if(o&32){let e=ku(n,t),i;for(;i=e();)r.push(i)}else if(o&16){let e=gd(t,n);if(Array.isArray(e))r.push(...e);else{let n=Eo(t[15]);lf(n[1],n,e,r,!0)}}n=i?n.projectionNext:n.next}return r}function uf(e,t){for(let n=10;n<e.length;n++){let r=e[n],i=r[1].firstChild;i!==null&&lf(r[1],r,i,t)}}function df(e){if(e[25]!==null){for(let t of e[25])t.impl.addSequence(t);e[25].length=0}}var ff=[];function pf(e){return e[24]??mf(e)}function mf(e){let t=ff.pop()??Object.create(gf);return t.lView=e,t}function hf(e){e.lView[24]!==e&&(e.lView=null,ff.push(e))}var gf={...nn,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{wo(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function _f(e){let t=e[24]??Object.create(vf);return t.lView=e,t}var vf={...nn,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=Eo(e.lView);for(;t&&!yf(t[1]);)t=Eo(t);t&&xo(t)},consumerOnSignalRead(){this.lView[24]=this}};function yf(e){return e.type!==2}function bf(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 xf=100;function Sf(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{Cf(e,t)}finally{n.end?.()}}function Cf(e,t){let n=Wo();try{Go(!0),kf(e,t);let n=0;for(;So(e);){if(n===xf)throw new ui(103,!1);n++,kf(e,1)}}finally{Go(n)}}function wf(e,t,n,r){if(so(t))return;let i=t[2];$o(t);let a=!0,o=null,s=null;yf(e)?(s=pf(t),o=dn(s)):tn()===null?(a=!1,s=_f(t),o=dn(s)):t[24]&&=(gn(t[24]),null);try{bo(t),Qee(e.bindingStartIndex),n!==null&&Id(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&Nc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&Pc(t,n,0,null),Fc(t,0)}if(Ef(t),bf(t),Tf(t,0),e.contentQueries!==null&&tu(e,t),a){let n=e.contentCheckHooks;n!==null&&Nc(t,n)}else{let n=e.contentHooks;n!==null&&Pc(t,n,1),Fc(t,1)}jf(e,t);let o=e.components;o!==null&&Af(t,o,0);let s=e.viewQuery;if(s!==null&&nu(2,s,r),a){let n=e.viewCheckHooks;n!==null&&Nc(t,n)}else{let n=e.viewHooks;n!==null&&Pc(t,n,2),Fc(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}df(t),t[2]&=-73}catch(e){throw wo(t),e}finally{s!==null&&(pn(s,o),a&&hf(s)),is()}}function Tf(e,t){for(let n=Hl(e);n!==null;n=Ul(n))for(let e=10;e<n.length;e++){let r=n[e];Of(r,t)}}function Ef(e){for(let t=Hl(e);t!==null;t=Ul(t)){if(!(t[2]&2))continue;let e=t[9];for(let t=0;t<e.length;t++){let n=e[t];xo(n)}}}function Df(e,t,n){Ac(_c.ComponentStart);let r=_o(t,e);try{Of(r,n)}finally{Ac(_c.ComponentEnd,r[8])}}function Of(e,t){vo(e)&&kf(e,t)}function kf(e,t){let n=e[1],r=e[2],i=e[24],a=!!(t===0&&r&16);if(a||=!!(r&64&&t===0),a||=!!(r&1024),a||=!!(i?.dirty&&hn(i)),a||=!1,i&&(i.dirty=!1),e[2]&=-9217,a)wf(n,e,n.template,e[8]);else if(r&8192){let t=en(null);try{bf(e),Tf(e,1);let t=n.components;t!==null&&Af(e,t,1),df(e)}finally{en(t)}}}function Af(e,t,n){for(let r=0;r<t.length;r++)Df(e,t[r],n)}function jf(e,t){let n=e.hostBindingOpCodes;if(n!==null)try{for(let e=0;e<n.length;e++){let r=n[e];if(r<0)os(~r);else{let i=r,a=n[++e],o=n[++e];ete(a,i);let s=t[i];Ac(_c.HostBindingsUpdateStart,s);try{o(2,s)}finally{Ac(_c.HostBindingsUpdateEnd,s)}}}}finally{os(-1)}}function Mf(e,t){let n=Wo()?64:1088;for(e[10].changeDetectionScheduler?.notify(t);e;){e[2]|=n;let t=Eo(e);if(oo(e)&&!t)return e;e=t}return null}function Nf(e,t,n,r){return[e,!0,0,t,null,r,null,n,null,null]}function Pf(e,t){let n=10+t;if(n<e.length)return e[n]}function Ff(e,t,n,r=!0){let i=t[1];if(Rf(i,t,e,n),r){let r=_d(n,e),a=t[11],o=a.parentNode(e[7]);o!==null&&Qte(i,e[5],a,t,o,r)}let a=t[6];a!==null&&a.firstChild!==null&&(a.firstChild=null)}function If(e,t){let n=Lf(e,t);return n!==void 0&&ud(n[1],n),n}function Lf(e,t){if(e.length<=10)return;let n=10+t,r=e[n];if(r){let i=r[16];i!==null&&i!==e&&ld(i,r),t>0&&(e[n-1][4]=r[4]);let a=ua(e,10+t);Zte(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 Rf(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r<a-10?(t[4]=n[i],la(n,10+r,t)):(n.push(t),t[4]=null),t[3]=n;let o=t[16];o!==null&&n!==o&&zf(o,t);let s=t[18];s!==null&&s.insertView(e),Co(t),t[2]|=128}function zf(e,t){let n=e[9],r=t[3];if(eo(r))e[2]|=2;else{let n=r[3][15];t[15]!==n&&(e[2]|=2)}n===null?e[9]=[t]:n.push(t)}var Bf=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let e=this._lView,t=e[1];return lf(t,e,t.firstChild,[])}constructor(e,t){this._lView=e,this._cdRefInjectingView=t}get context(){return this._lView[8]}set context(e){this._lView[8]=e}get destroyed(){return so(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[3];if(to(e)){let t=e[8],n=t?t.indexOf(this):-1;n>-1&&(Lf(e,n),ua(t,n))}this._attachedToViewContainer=!1}ud(this._lView[1],this._lView)}onDestroy(e){To(this._lView,e)}markForCheck(){Mf(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){Co(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,Sf(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new ui(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=oo(this._lView),t=this._lView[16];t!==null&&!e&&ld(t,this._lView),cd(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new ui(902,!1);this._appRef=e;let t=oo(this._lView),n=this._lView[16];n!==null&&!t&&zf(n,this._lView),Co(this._lView)}},Vf=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=Hf;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 Bf(sf(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n}))}}return e})();function Hf(){return Uf(Ro(),Io())}function Uf(e,t){return e.type&4?new Vf(t,e,Ol(e,t)):null}function Wf(e,t,n,r,i){let a=e.data[t];if(a===null)a=Gf(e,t,n,r,i),$ee()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Zee();a.injectorIndex=e===null?-1:e.injectorIndex}return Bo(a,!0),a}function Gf(e,t,n,r,i){let a=zo(),o=Vo(),s=o?a:a&&a.parent,c=e.data[t]=qf(e,s,n,t,r,i);return Kf(e,c,a,o),c}function Kf(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 qf(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return No()&&(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:us(),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 Jf(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?Yf(e,n):r.push(e);e[6]=r}function Yf(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;n<i;){let e=r.nextSibling;_u(t,r,!1),r=e,n++}}}var Xf=()=>null,Zf=()=>null;function Qf(e,t){return Xf(e,t)}function $f(e,t,n){return Zf(e,t,n)}var ep=class{},tp=class{},np=class{destroyNode=null;static __NG_ELEMENT_ID__=()=>rp()};function rp(){let e=Io(),t=_o(Ro().index,e);return(eo(t)?t:e)[11]}var ip=(()=>{class e{static ɵprov=vi({token:e,providedIn:`root`,factory:()=>null})}return e})();function ap(e){return e.debugInfo?.className||e.type.name||null}var op={},sp=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 cp(e,t,n){return e[t]=n}function lp(e,t){return e[t]}function up(e,t,n){if(n===Du)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function dp(e,t,n,r){let i=up(e,t,n);return up(e,t+1,r)||i}function fp(e,t,n,r,i){let a=dp(e,t,n,r);return up(e,t+2,i)||a}function pp(e,t,n,r,i,a){let o=dp(e,t,n,r);return dp(e,t+2,i,a)||o}function mp(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&Zl(i,a),Mf(ro(e)?_o(e.index,t):t,5);let o=t[8],s=hp(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=hp(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function hp(e,t,n,r){let i=en(null);try{return Ac(_c.OutputStart,t,n),n(r)!==!1}catch(t){return $d(e,t),!1}finally{Ac(_c.OutputEnd,t,n),en(i)}}function gp(e,t,n,r,i,a,o,s){let c=io(e),l=!1,u=null;if(!r&&c&&(u=vp(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=po(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);_p(a)||yp(r?t=>r(uo(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function _p(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function vp(e,t,n,r){let i=e.cleanup;if(i!=null)for(let e=0;e<i.length-1;e+=2){let a=i[e];if(a===n&&i[e+1]===r){let n=t[7],r=i[e+2];return n&&n.length>r?n[r]:null}typeof a==`string`&&(e+=2)}return null}function yp(e,t,n,r,i,a,o){let s=t.firstCreatePass?Oo(t):null,c=Do(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function bp(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<n.length;a+=2){let l=n[a];if(l>=o&&l<=s)c=!0,xp(e,t,l,n[a+1],r,i);else if(l>s)break}}return Object.hasOwn(n.outputs,r)&&(c=!0,xp(e,t,a,r,r,i)),c}function xp(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);yp(e.index,s,t,i,a,c,!0)}function Sp(){Cp()}function Cp(){let e=Io(),t=Lo(),n=Ro();if(t.firstCreatePass&&kp(t,n),n.controlDirectiveIndex===-1)return;Yu(`NgSignalForms`);let r=e[n.controlDirectiveIndex];t.data[n.controlDirectiveIndex].controlDef.create(r,new Ep(e,t,n))}function wp(){Tp()}function Tp(){let e=Io(),t=Lo(),n=ss();if(n.controlDirectiveIndex===-1)return;let r=t.data[n.controlDirectiveIndex].controlDef,i=e[n.controlDirectiveIndex];r.update(i,new Ep(e,t,n))}var Ep=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 po(this.tNode,this.lView)}get descriptor(){return`<${this.tNode.value}>`}listenToCustomControlOutput(e,t){let n=this.tView.data[this.tNode.customControlIndex];bp(this.tNode,this.lView,n,e,mp(this.tNode,this.lView,t))}listenToCustomControlModel(e){let t=this.tNode.flags&1024?`valueChange`:`checkedChange`,n=this.tView.data[this.tNode.customControlIndex];bp(this.tNode,this.lView,n,t,mp(this.tNode,this.lView,e))}listenToDom(e,t){gp(this.tNode,this.tView,this.lView,void 0,this.lView[11],e,t,mp(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(Op(r,o,e)))&&(Fd(o,r,e,t),a=!0)}if(i)for(let r=0;r<i.length;r+=2){let o=i[r];if(o===this.tNode.controlDirectiveIndex)continue;let s=this.lView[o],c=i[r+1],l=this.tView.data[o];(!n||n(Op(s,l,e)))&&(Fd(l,s,c,t),a=!0)}return a}setCustomControlModelInput(e){let t=this.tView.data[this.tNode.customControlIndex],n=this.tNode.flags&1024?`value`:`checked`;tf(this.tNode,this.tView,this.lView,t,n,e)}customControlHasInput(e){if(this.tNode.customControlIndex===-1)return!1;let t=this.tView.data[this.tNode.customControlIndex];return(t.signalFormsInputPresence??=this._buildCustomControlInputCache(t))[e]===!0}_buildCustomControlInputCache(e){let t={};for(let n in e.inputs)t[n]=!0;if(e.hostDirectives!==null){let n=[...e.hostDirectives];for(;n.length>0;){let e=n.shift();if(typeof e!=`function`){for(let n in e.inputs)t[e.inputs[n]]=!0;let r=Dp(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;e<r.inputs.length;e+=2){let n=r.inputs[e+1]||r.inputs[e];t[n]=!0}let e=Dp(r.directive);e!==null&&n.push(...e)}}}return t}};function Dp(e){return typeof e==`function`&&`ɵdir`in e?e.ɵdir.hostDirectives??null:null}function Op(e,t,n){if(!t.inputs||!Object.hasOwn(t.inputs,n))return;let[r,i]=t.inputs[n];if((i&Pd.SignalBased)!==0){let t=e[r][$t];return t.value===mc?void 0:t.value}return e[r]}function kp(e,t,n){for(let n=t.directiveStart;n<t.directiveEnd;n++)if(e.data[n].controlDef){t.controlDirectiveIndex=n;break}if(t.controlDirectiveIndex===-1)return;let r=e.data[t.controlDirectiveIndex].controlDef;if(r.passThroughInput&&(t.inputs?.[r.passThroughInput]?.length??0)>1){t.flags|=4096;return}Ap(e,t)}function Ap(e,t){for(let n=t.directiveStart;n<t.directiveEnd;n++){let r=e.data[n];if(!t.directiveToIndex||t.directiveToIndex.has(r.type)){if(jp(r,`value`)){t.flags|=1024,t.customControlIndex=n;return}if(jp(r,`checked`)){t.flags|=2048,t.customControlIndex=n;return}}}if(t.hostDirectiveInputs!==null&&t.hostDirectiveOutputs!==null&&t.directiveToIndex!==null){let e=(e,n)=>{let r=t.hostDirectiveInputs[e],i=t.hostDirectiveOutputs[e+`Change`];if(!r||!i)return!1;for(let e=0;e<r.length;e+=2){let a=r[e];for(let e=0;e<i.length;e+=2)if(a===i[e])for(let e of t.directiveToIndex.values()){if(!Array.isArray(e))continue;let[r,i,o]=e;if(a>=i&&a<=o)return t.flags|=n,t.customControlIndex=r,!0}}return!1};if(e(`value`,1024)||e(`checked`,2048))return}}function jp(e,t){return Mp(e,t)&&Np(e,t+`Change`)}function Mp(e,t){return t in e.inputs}function Np(e,t){return t in e.outputs}var Pp=Symbol(`BINDING`),Fp=new Ti(``);function Ip(e,t,n){let r=n?e.styles:null,i=n?e.classes:null,a=0;if(t!==null)for(let e=0;e<t.length;e++){let n=t[e];if(typeof n==`number`)a=n;else if(a==1)i=mi(i,n);else if(a==2){let i=n,a=t[++e];r=mi(r,i+`: `+a+`;`)}}n?e.styles=r:e.stylesWithoutHost=r,n?e.classes=i:e.classesWithoutHost=i}function Lp(e,t=0){let n=Io();return n===null?ea(e,t):fl(Ro(),n,gi(e),t)}function Rp(e,t,n,r,i){let a=r===null?null:{"":-1},o=i(e,n);if(o!==null){let r=o,i=null,s=null;for(let e of o)if(e.resolveHostDirectives!==null){[r,i,s]=e.resolveHostDirectives(o);break}Vp(e,t,n,r,a,i,s)}a!==null&&r!==null&&zp(n,r,a)}function zp(e,t,n){let r=e.localNames=[];for(let e=0;e<t.length;e+=2){let i=n[t[e+1]];if(i==null)throw new ui(-301,!1);r.push(t[e],i)}}function Bp(e,t,n){t.componentOffset=n,(e.components??=[]).push(t.index)}function Vp(e,t,n,r,i,a,o){let s=r.length,c=null;for(let i=0;i<s;i++){let a=r[i];c===null&&ao(a)&&(c=a,Bp(e,n,i)),ll(al(n,t),e,a.type)}Zp(n,e.data.length,s),c?.viewProvidersResolver&&c.viewProvidersResolver(c);for(let e=0;e<s;e++){let t=r[e];t.providersResolver&&t.providersResolver(t)}let l=!1,u=!1,d=jd(e,t,s,null);s>0&&(n.directiveToIndex=new Map);for(let c=0;c<s;c++){let s=r[c];if(n.mergedAttrs=Kc(n.mergedAttrs,s.hostAttrs),qp(e,n,t,d,s),Xp(d,s,i),o!==null&&o.has(s)){let[e,t]=o.get(s);n.directiveToIndex.set(s.type,[d,e+n.directiveStart,t+n.directiveStart])}else(a===null||!a.has(s))&&n.directiveToIndex.set(s.type,d);s.contentQueries!==null&&(n.flags|=4),(s.hostBindings!==null||s.hostAttrs!==null||s.hostVars!==0)&&(n.flags|=64);let f=s.type.prototype;!l&&(f.ngOnChanges||f.ngOnInit||f.ngDoCheck)&&((e.preOrderHooks??=[]).push(n.index),l=!0),!u&&(f.ngOnChanges||f.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(n.index),u=!0),d++}Hp(e,n,a)}function Hp(e,t,n){for(let r=t.directiveStart;r<t.directiveEnd;r++){let i=e.data[r];if(n===null||!n.has(i))Up(0,t,i,r),Up(1,t,i,r),Kp(t,r,!1);else{let e=n.get(i);Wp(0,t,e,r),Wp(1,t,e,r),Kp(t,r,!0)}}}function Up(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let n in i)if(Object.hasOwn(i,n)){let i;i=e===0?t.inputs??={}:t.outputs??={},i[n]??=[],i[n].push(r),Gp(t,n)}}function Wp(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let n in i)if(Object.hasOwn(i,n)){let a=i[n],o;o=e===0?t.hostDirectiveInputs??={}:t.hostDirectiveOutputs??={},o[a]??=[],o[a].push(r,n),Gp(t,a)}}function Gp(e,t){t===`class`?e.flags|=8:t===`style`&&(e.flags|=16)}function Kp(e,t,n){let{attrs:r,inputs:i,hostDirectiveInputs:a}=e;if(r===null||!n&&i===null||n&&a===null||Cu(e)){e.initialInputs??=[],e.initialInputs.push(null);return}let o=null,s=0;for(;s<r.length;){let e=r[s];if(e===0){s+=4;continue}if(e===5){s+=2;continue}if(typeof e==`number`)break;if(!n&&Object.hasOwn(i,e)){let n=i[e];for(let i of n)if(i===t){o??=[],o.push(e,r[s+1]);break}}else if(n&&Object.hasOwn(a,e)){let n=a[e];for(let e=0;e<n.length;e+=2)if(n[e]===t){o??=[],o.push(n[e+1],r[s+1]);break}}s+=2}e.initialInputs??=[],e.initialInputs.push(o)}function qp(e,t,n,r,i){e.data[r]=i;let a=new Bc(i.factory||=aa(i.type,!0),ao(i),Lp,null);e.blueprint[r]=a,n[r]=a,Jp(e,t,r,jd(e,n,i.hostVars,Du),i)}function Jp(e,t,n,r,i){let a=i.hostBindings;if(a){let i=e.hostBindingOpCodes;i===null&&(i=e.hostBindingOpCodes=[]);let o=~t.index;Yp(i)!=o&&i.push(o),i.push(n,r,a)}}function Yp(e){let t=e.length;for(;t>0;){let n=e[--t];if(typeof n==`number`&&n<0)return n}return 0}function Xp(e,t,n){if(n){if(t.exportAs)for(let r=0;r<t.exportAs.length;r++)n[t.exportAs[r]]=e;ao(t)&&(n[``]=e)}}function Zp(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function Qp(e,t,n,r,i,a,o,s){let c=t[1],l=c.consts,u=Wf(c,e,n,r,yo(l,o));return a&&Rp(c,t,u,yo(l,s),i),u.mergedAttrs=Kc(u.mergedAttrs,u.attrs),u.attrs!==null&&Ip(u,u.attrs,!1),u.mergedAttrs!==null&&Ip(u,u.mergedAttrs,!0),c.queries!==null&&c.queries.elementStart(c,u),u}function $p(e,t){Mc(e,t),no(t)&&e.queries.elementEnd(t)}function em(e,t,n,r,i,a){let o=t.consts,s=Wf(t,e,n,r,yo(o,i));if(s.mergedAttrs=Kc(s.mergedAttrs,s.attrs),a!=null){let e=yo(o,a);s.localNames=[];for(let t=0;t<e.length;t+=2)s.localNames.push(e[t],-1)}return s.attrs!==null&&Ip(s,s.attrs,!1),s.mergedAttrs!==null&&Ip(s,s.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,s),s}var tm=typeof ShadowRoot<`u`,nm=typeof Document<`u`;function rm(e){return Object.keys(e).map(t=>{let[n,r,i]=e[t],a={propName:n,templateName:t,isSignal:(r&Pd.SignalBased)!==0};return i&&(a.transform=i),a})}function im(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function am(e,t,n){let r=t instanceof za?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new sp(n,r):n}function om(e){let t=e.get(tp,null);if(t===null)throw new ui(407,!1);return{rendererFactory:t,sanitizer:e.get(ip,null),changeDetectionScheduler:e.get($s,null),ngReflect:!1,tracingService:e.get(qu,null,{optional:!0})}}function sm(e,t,n){let r=lm(e);return pu(t,r,r===`svg`?`svg`:r===`math`?lo:n)}function cm(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new ui(905,!1)}function lm(e){return(e.selectors[0][0]||`div`).toLowerCase()}var um=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=rm(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=im(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=wte(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){Ac(_c.DynamicComponentStart);let s=en(null);try{let s=this.componentDef,c=am(s,r||this.ngModule,e),l=om(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(ap(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{en(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=dm(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?zd(l,r,s.encapsulation,t):sm(s,l,o??null);cm(u);let d=t.get(Fp,null),f=fm(u,()=>t.get(_s,null)??ql());d&&d.addHost(f);let p=a?.some(mm)||i?.some(e=>typeof e!=`function`&&e.bindings.some(mm)),m=Od(null,c,null,512|Ad(s),null,null,e,l,t,null,eu(u,t,!0));d&&tm&&f instanceof ShadowRoot&&To(m,()=>{d.removeHost(f)}),m[27]=u,$o(m);let h=null;try{let e=Qp(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);vu(l,u,e),Vl(u,m),Ld(c,m,e),ru(c,e,m),$p(c,e),n!==void 0&&gm(e,this.ngContentSelectors,n),h=_o(e.index,m),m[8]=h[8],af(c,m,null)}catch(e){throw h!==null&&zl(h),zl(m),e}finally{Ac(_c.DynamicComponentEnd),is()}return new hm(this.componentType,m,!!p)}};function dm(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:Tte(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[Pp].requiredVars,e.create&&(e.targetIdx=0,(a??=[]).push(e)),e.update&&(e.targetIdx=0,(o??=[]).push(e));if(r)for(let e=0;e<r.length;e++){let t=r[e];if(typeof t!=`function`)for(let n of t.bindings){s+=n[Pp].requiredVars;let t=e+1;n.create&&(n.targetIdx=t,(a??=[]).push(n)),n.update&&(n.targetIdx=t,(o??=[]).push(n))}}let c=[t];if(r)for(let e of r){let t=Pi(typeof e==`function`?e:e.type);c.push(t)}return Td(0,null,pm(a,o),1,s,c,null,null,null,[i],null)}function fm(e,t){let n=e.getRootNode?.();return nm&&n instanceof Document?n.head:n&&tm&&n instanceof ShadowRoot?n:t().head}function pm(e,t){return!e&&!t?null:n=>{if(n&1&&e)for(let t of e)t.create();if(n&2&&t)for(let e of t)e.update()}}function mm(e){let t=e[Pp].kind;return t===`input`||t===`twoWay`}var hm=class extends ep{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=mo(t[1],27),this.location=Ol(this._tNode,t),this.instance=_o(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new Bf(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;ef(n,r[1],r,e,t),this.previousInputValues.set(e,t),Mf(_o(n.index,r),1)}get injector(){return new bl(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function gm(e,t,n){let r=e.projection=[];for(let e=0;e<t.length;e++){let t=n[e];r.push(t!=null&&t.length?Array.from(t):null)}}var _m=(()=>{class e{static __NG_ELEMENT_ID__=vm}return e})();function vm(){return Sm(Ro(),Io())}var ym=class e extends _m{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Ol(this._hostTNode,this._hostLView)}get injector(){return new bl(this._hostTNode,this._hostLView)}get parentInjector(){let e=cl(this._hostTNode,this._hostLView);if(Jc(e)){let t=Zc(e,this._hostLView),n=Yc(e),r=t[1].data[n+8];return new bl(r,t)}return new bl(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=bm(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=Qf(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,cf(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 um(Ni(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(za,null);e&&(i=e)}let d=Ni(l.componentType??{}),f=Qf(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,cf(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(Gee(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 Ff(o,i,a,r),t.attachToViewContainerRef(),la(xm(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=bm(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=Lf(this._lContainer,t);n&&(ua(xm(this._lContainer),t),ud(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=Lf(this._lContainer,t);return n&&ua(xm(this._lContainer),t)!=null?new Bf(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function bm(e){return e[8]}function xm(e){return e[8]||=[]}function Sm(e,t){let n,r=t[e.index];return to(r)?n=r:(n=Nf(r,t,null,e),t[e.index]=n,Md(t,n)),wm(n,t,e,r),new ym(n,e,t)}function Cm(e,t){let n=e[11],r=n.createComment(``),i=po(t,e);return mu(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var wm=Dm,Tm=()=>!1;function Em(e,t,n){return Tm(e,t,n)}function Dm(e,t,n,r){if(e[7])return;let i;i=n.type&8?uo(r):Cm(t,n),e[7]=i}var Om=class e{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},km=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;e<r;e++){let t=n.getByIndex(e),r=this.queries[t.indexInDeclarationView];i.push(r.clone())}return new e(i)}return null}insertView(e){this.dirtyQueriesWithMatches(e)}detachView(e){this.dirtyQueriesWithMatches(e)}finishViewCreation(e){this.dirtyQueriesWithMatches(e)}dirtyQueriesWithMatches(e){for(let t=0;t<this.queries.length;t++)Wm(e,t).matches!==null&&this.queries[t].setDirty()}},Am=class{flags;read;predicate;constructor(e,t,n=null){this.flags=t,this.read=n,this.predicate=typeof e==`string`?Hm(e):e}},jm=class e{queries;constructor(e=[]){this.queries=e}elementStart(e,t){for(let n=0;n<this.queries.length;n++)this.queries[n].elementStart(e,t)}elementEnd(e){for(let t=0;t<this.queries.length;t++)this.queries[t].elementEnd(e)}embeddedTView(t){let n=null;for(let e=0;e<this.length;e++){let r=n===null?0:n.length,i=this.getByIndex(e).embeddedTView(t,r);i&&(i.indexInDeclarationView=e,n===null?n=[i]:n.push(i))}return n===null?null:new e(n)}template(e,t){for(let n=0;n<this.queries.length;n++)this.queries[n].template(e,t)}getByIndex(e){return this.queries[e]}get length(){return this.queries.length}track(e){this.queries.push(e)}},Mm=class e{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(e,t=-1){this.metadata=e,this._declarationNodeIndex=t}elementStart(e,t){this.isApplyingToNode(t)&&this.matchTNode(e,t)}elementEnd(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}template(e,t){this.elementStart(e,t)}embeddedTView(t,n){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,n),new e(this.metadata)):null}isApplyingToNode(e){if(this._appliesToNextNode&&(this.metadata.flags&1)!=1){let t=this._declarationNodeIndex,n=e.parent;for(;n!==null&&n.type&8&&n.index!==t;)n=n.parent;return t===(n===null?-1:n.index)}return this._appliesToNextNode}matchTNode(e,t){let n=this.metadata.predicate;if(Array.isArray(n))for(let r=0;r<n.length;r++){let i=n[r];this.matchTNodeWithReadOption(e,t,Nm(t,i)),this.matchTNodeWithReadOption(e,t,hl(t,e,i,!1,!1))}else n===Vf?t.type&4&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,hl(t,e,n,!1,!1))}matchTNodeWithReadOption(e,t,n){if(n!==null){let r=this.metadata.read;if(r!==null){if(r===kl||r===_m||r===Vf&&t.type&4)this.addMatch(t.index,-2);else{let n=hl(t,e,r,!1,!1);n!==null&&this.addMatch(t.index,n)}}else this.addMatch(t.index,n)}}addMatch(e,t){this.matches===null?this.matches=[e,t]:this.matches.push(e,t)}};function Nm(e,t){let n=e.localNames;if(n!==null){for(let e=0;e<n.length;e+=2)if(n[e]===t)return n[e+1]}return null}function Pm(e,t){return e.type&11?Ol(e,t):e.type&4?Uf(e,t):null}function Fm(e,t,n,r){return n===-1?Pm(t,e):n===-2?Im(e,t,r):gl(e,e[1],n,t)}function Im(e,t,n){if(n===kl)return Ol(t,e);if(n===Vf)return Uf(t,e);if(n===_m)return Sm(t,e)}function Lm(e,t,n,r){let i=t[18].queries[r];if(i.matches===null){let r=e.data,a=n.matches,o=[];for(let e=0;a!==null&&e<a.length;e+=2){let i=a[e];if(i<0)o.push(null);else{let s=r[i];o.push(Fm(t,s,a[e+1],n.metadata.read))}}i.matches=o}return i.matches}function Rm(e,t,n,r){let i=e.queries.getByIndex(n),a=i.matches;if(a!==null){let o=Lm(e,t,i,n);for(let e=0;e<a.length;e+=2){let n=a[e];if(n>0)r.push(o[e/2]);else{let i=a[e+1],o=t[-n];for(let e=10;e<o.length;e++){let t=o[e];t[16]===t[3]&&Rm(t[1],t,i,r)}if(o[9]!==null){let e=o[9];for(let t=0;t<e.length;t++){let n=e[t];Rm(n[1],n,i,r)}}}}}return r}function zm(e,t){return e[18].queries[t].queryList}function Bm(e,t,n){let r=new Ml((n&4)==4);return Jee(e,t,r,r.destroy),(t[18]??=new km).queries.push(new Om(r))-1}function Vm(e,t,n){let r=Lo();return r.firstCreatePass&&(Um(r,new Am(e,t,n),-1),(t&2)==2&&(r.staticViewQueries=!0)),Bm(r,Io(),t)}function Hm(e){return e.split(`,`).map(e=>e.trim())}function Um(e,t,n){e.queries===null&&(e.queries=new jm),e.queries.track(new Mm(t,n))}function Wm(e,t){return e.queries.getByIndex(t)}function Gm(e,t){let n=e[1],r=Wm(n,t);return r.crossesNgTemplate?Rm(n,e,t,[]):Lm(n,e,r,t)}function Km(e,t,n){let r,i=Sn(()=>{r._dirtyCounter();let n=Xm(r,e);if(t&&n===void 0)throw new ui(-951,!1);return n});return r=i[$t],r._dirtyCounter=E(0),r._flatValue=void 0,i}function qm(e){return Km(!0,!1,e)}function Jm(e){return Km(!0,!0,e)}function Ym(e,t){let n=e[$t];n._lView=Io(),n._queryIndex=t,n._queryList=zm(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(e=>e+1))}function Xm(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[2]&4)return t?void 0:va;let i=zm(n,r),a=Gm(n,r);return i.reset(a,Al),t?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}function Zm(e){return!!e&&typeof e.then==`function`}function Qm(e){return!!e&&typeof e.subscribe==`function`}var $m=class{},eh=class extends $m{injector;instance=null;constructor(e){super();let t=new Ba([...e.providers,{provide:$m,useValue:this}],e.parent||Ra(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function th(e,t,n=null){return new eh({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var nh=(()=>{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=wa(!1,e.type),n=t.length>0?th([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=vi({token:e,providedIn:`environment`,factory:()=>new e(ea(za))})}return e})();function O(e){return gc(()=>{let t=ch(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Pl.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(nh).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||iu.Emulated,styles:e.styles||va,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&Yu(`NgStandalone`),lh(n);let r=e.dependencies;return n.directiveDefs=uh(r,rh),n.pipeDefs=uh(r,Fi),n.id=dh(n),n})}function rh(e){return Ni(e)||Pi(e)}function ih(e,t){if(e==null)return _a;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=Pd.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function ah(e){if(e==null)return _a;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function oh(e){return gc(()=>{let t=ch(e);return lh(t),t})}function sh(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 ch(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||_a,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||va,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:ih(e.inputs,t),outputs:ah(e.outputs),debugInfo:null}}function lh(e){e.features?.forEach(t=>t(e))}function uh(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 dh(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 fh=new Ti(``),ph=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=S(fh,{optional:!0})??[];injector=S(gs);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=Za(this.injector,t);if(Zm(n))e.push(n);else if(Qm(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=El({token:e,factory:e.ɵfac})}return e})();function mh(e){return t=>{t.controlDef={create:(e,t)=>{e?.ɵngControlCreate(t)},update:(e,t)=>{e?.ɵngControlUpdate?.(t)},passThroughInput:e}}}function hh(e){return Object.getPrototypeOf(e.prototype).constructor}function gh(e){let t=hh(e.type),n=!0,r=[e];for(;t&&t!==Function.prototype&&t!==Object.prototype;){let i,a=Object.hasOwn(t,Di)?t[Di]:void 0,o=Object.hasOwn(t,Oi)?t[Oi]:void 0;if(ao(e))i=a??o;else{if(a)throw new ui(903,!1);i=o}if(i){if(n){r.push(i);let t=e;t.inputs=yh(e.inputs),t.declaredInputs=yh(e.declaredInputs),t.outputs=yh(e.outputs);let n=i.hostBindings;n&&Sh(e,n);let a=i.viewQuery,o=i.contentQueries;if(a&&bh(e,a),o&&xh(e,o),_h(e,i),Uee(e.outputs,i.outputs),ao(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<t.length;r++){let i=t[r];i&&i.ngInherit&&i(e),i===gh&&(n=!1)}}t=Object.getPrototypeOf(t)}vh(r)}function _h(e,t){for(let n in t.inputs){if(!Object.hasOwn(t.inputs,n)||Object.hasOwn(e.inputs,n))continue;let r=t.inputs[n];r!==void 0&&(e.inputs[n]=r,e.declaredInputs[n]=t.declaredInputs[n])}}function vh(e){let t=0,n=null;for(let r=e.length-1;r>=0;r--){let i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=Kc(i.hostAttrs,n=Kc(n,i.hostAttrs))}}function yh(e){return e===_a?{}:e===va?[]:e}function bh(e,t){let n=e.viewQuery;e.viewQuery=n?(e,r)=>{t(e,r),n(e,r)}:t}function xh(e,t){let n=e.contentQueries;e.contentQueries=n?(e,r,i)=>{t(e,r,i),n(e,r,i)}:t}function Sh(e,t){let n=e.hostBindings;e.hostBindings=n?(e,r)=>{t(e,r),n(e,r)}:t}function Ch(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=Kc(e.mergedAttrs,e.attrs);let t=e.tView=Td(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),Bo(e,!1);let c=Dh(n,t,e,r);fs()&&md(n,t,c,e),Vl(c,t);let l=Nf(c,t,c,e);t[r+27]=l,Md(t,l),Em(l,e,t)}function wh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;return t.firstCreatePass?(f=Wf(t,d,4,o||null,s||null),Mo()&&Rp(t,e,f,yo(t.consts,l),qd),Mc(t,f)):f=t.data[d],Ch(f,e,t,n,r,i,a,c),io(f)&&Ld(t,e,f),l!=null&&Rd(e,f,u),f}function Th(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=Wf(t,d,4,o||null,s||null),l!=null){let e=yo(t.consts,l);f.localNames=[];for(let t=0;t<e.length;t+=2)f.localNames.push(e[t],-1)}}else f=t.data[d];return Ch(f,e,t,n,r,i,a,c),l!=null&&Rd(e,f,u),f}function Eh(e,t,n,r,i,a,o,s){let c=Io(),l=Lo();return wh(c,l,e,t,n,r,i,yo(l.consts,a),void 0,o,s),Eh}var Dh=Oh;function Oh(e,t,n,r){return ps(!0),t[11].createComment(``)}var kh=new Ti(``),Ah=new Ti(``);function jh(){hee(()=>{throw new ui(600,``)})}var Mh=10,Nh=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=S(Us);afterRenderManager=S(Xu);zonelessEnabled=S(ec);rootEffectScheduler=S(nc);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Vr;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=S(Ss);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(ci(e=>!e))}constructor(){S(qu,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=S(za);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=gs.NULL){return this._injector.get(As).run(()=>{if(Ac(_c.BootstrapComponentStart),!this._injector.get(ph).done)throw new ui(405,``);let r=Ni(e),i=this._injector.get($m),a=new um(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=Ph(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(kh,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),Fh(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),Ac(_c.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Ac(_c.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(Ku.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw Ac(_c.ChangeDetectionEnd),new ui(101,!1);let e=en(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,en(e),this.afterTick.next(),Ac(_c.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(tp,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++<Mh;){Ac(_c.ChangeDetectionSyncStart);try{this.synchronizeOnce()}finally{Ac(_c.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||So(n))&&(Sf(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})=>So(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;Fh(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(Ah,[]).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),()=>Fh(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new ui(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=El({token:e,factory:e.ɵfac})}return e})();function Ph(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function Fh(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function k(e,t,n,r){let i=Io();return up(i,Jo(),t)&&(Lo(),Jd(ss(),i,e,t,n,r)),k}function Ih(e){if(Yu(`NgAnimateEnter`),!Iu)return Ih;let t=Io();if(Fte(t))return Ih;let n=Ro(),r=t[9].get(As);return Bte(Uu(t),n,()=>Lh(t,n,e,r)),Kte(t[9]),rd(t[9],Uu(t)),Ih}function Lh(e,t,n,r){let i=po(t,e),a=e[11],o=zte(n),s=[],c=!1,l=e=>{if(Wu(e)!==i)return;let t=e instanceof AnimationEvent?`animationend`:`transitionend`;r.runOutsideAngular(()=>{a.listen(i,t,u)})},u=e=>{Wu(e)===i&&(Gu(e,i)&&(c=!0),Rh(e,i,a))};if(o&&o.length>0){r.runOutsideAngular(()=>{s.push(a.listen(i,`animationstart`,l)),s.push(a.listen(i,`transitionstart`,l))}),Ite(i,o,s);for(let e of o)a.addClass(i,e);r.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(!c&&(jte(i,zu,Iu),!zu.has(i))){for(let e of o)a.removeClass(i,e);Lu(i)}})})}}function Rh(e,t,n){let r=Ru.get(t);if(Wu(e)===t&&r&&Gu(e,t)){e.stopPropagation();for(let e of r.classList)n.removeClass(t,e);Lu(t)}}var zh=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 Bh(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function Vh(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){en(r);let c=t.length-1;for(en(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=Bh(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=Bh(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 Gh,a??=Wh(e,o,s,n),Hh(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;)Uh(e,i,n,o,t[o]),o++}else if(t!=null){en(r);let c=t[Symbol.iterator]();en(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=Bh(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new Gh,a??=Wh(e,o,s,n);let u=n(o,r);if(Hh(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;)Uh(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 Hh(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Uh(e,t,n,r,i){if(Hh(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function Wh(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 Gh=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 A(e,t,n,r,i,a,o,s){Yu(`NgControlFlow`);let c=Io(),l=Lo();return Th(c,l,e,t,n,r,i,yo(l.consts,a),256,o,s),Kh}function Kh(e,t,n,r,i,a,o,s){Yu(`NgControlFlow`);let c=Io(),l=Lo();return Th(c,l,e,t,n,r,i,yo(l.consts,a),512,o,s),Kh}function j(e,t){Yu(`NgControlFlow`);let n=Io(),r=Jo(),i=n[r]===Du?-1:n[r],a=i===-1?void 0:Qh(n,27+i);if(up(n,r,e)){let r=en(null);try{if(a!==void 0&&If(a,0),e!==-1){let r=27+e,i=Qh(n,r),a=rg(n[1],r),o=$f(i,a,n);Ff(i,sf(n,a,t,{dehydratedView:o}),0,cf(a,o))}}finally{en(r)}}else if(a!==void 0){let e=Pf(a,0);e!==void 0&&(e[8]=t)}}var qh=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 Jh(e){return e}function Yh(e,t){return t}var Xh=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function M(e,t,n,r,i,a,o,s,c,l,u,d,f){Yu(`NgControlFlow`);let p=Io(),m=Lo(),h=c!==void 0,g=Io(),_=new Xh(h,s?o.bind(g[15][8]):o);g[27+e]=_,Th(p,m,e+1,t,n,r,i,yo(m.consts,a),256),h&&Th(p,m,e+2,c,l,u,d,yo(m.consts,f),512)}var Zh=class extends zh{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,Ff(this.lContainer,t,e,cf(this.templateTNode,n)),$h(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,eg(this.lContainer,e),tg(this.lContainer,e)}create(e,t){let n=Qf(this.lContainer,this.templateTNode.tView.ssrId);return sf(this.hostLView,this.templateTNode,new qh(this.lContainer,t,e),{dehydratedView:n})}destroy(e){ud(e[1],e)}updateValue(e,t){this.getLView(e)[8].$implicit=t}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[8].$index=e}getLView(e){return ng(this.lContainer,e)}};function N(e){let t=en(null),n=as();try{let r=Io(),i=r[1],a=r[n],o=n+1,s=Qh(r,o);a.liveCollection===void 0?a.liveCollection=new Zh(s,r,rg(i,o)):a.liveCollection.reset();let c=a.liveCollection;if(Vh(c,e,a.trackByFn,t),c.updateIndexes(),a.hasEmptyBlock){let e=Jo(),t=c.length===0;if(up(r,e,t)){let e=n+2,a=Qh(r,e);if(t){let t=rg(i,e),n=$f(a,t,r);Ff(a,sf(r,t,void 0,{dehydratedView:n}),0,cf(t,n))}else i.firstUpdatePass&&Jf(a),If(a,0)}}}finally{en(t)}}function Qh(e,t){return e[t]}function $h(e,t){if(e.length<=10)return;let n=e[10+t],r=n?n[26]:void 0;if(n&&r&&r.detachedLeaveAnimationFns&&r.detachedLeaveAnimationFns.length>0){let e=n[9];Wte(e,r),Fu.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function eg(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 tg(e,t){return Lf(e,t)}function ng(e,t){return Pf(e,t)}function rg(e,t){return mo(e,t)}function P(e,t,n){let r=Io();return up(r,Jo(),t)&&(Lo(),Vd(ss(),r,e,t,r[11],n)),P}function ig(e,t,n,r,i){ef(t,e,n,i?`class`:`style`,r)}function F(e,t,n,r){let i=Io(),a=i[1],o=e+27,s=a.firstCreatePass?Qp(o,i,2,t,qd,Mo(),n,r):a.data[o];if(ro(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(ap(o),()=>(ag(e,t,i,s,r),F))}}return ag(e,t,i,s,r),F}function ag(e,t,n,r,i){if(Zd(r,n,e,t,sg),io(r)){let e=n[1];Ld(e,n,r),ru(e,r,n)}i!=null&&Rd(n,r)}function I(){let e=Lo(),t=Qd(Ro());return e.firstCreatePass&&$p(e,t),Po(t)&&Fo(),jo(),t.classesWithoutHost!=null&&Vc(t)&&ig(e,t,Io(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&Hc(t)&&ig(e,t,Io(),t.stylesWithoutHost,!1),I}function L(e,t,n,r){return F(e,t,n,r),I(),L}function R(e,t,n,r){let i=Io(),a=i[1],o=e+27,s=a.firstCreatePass?em(o,a,2,t,n,r):a.data[o];return Zd(s,i,e,t,sg),r!=null&&Rd(i,s),R}function z(){return Po(Qd(Ro()))&&Fo(),jo(),z}function og(e,t,n,r){return R(e,t,n,r),z(),og}var sg=(e,t,n,r,i)=>(ps(!0),pu(t[11],r,us()));function cg(e,t,n){let r=Io(),i=r[1],a=e+27,o=i.firstCreatePass?Qp(a,r,8,`ng-container`,qd,Mo(),t,n):i.data[a];if(Zd(o,r,e,`ng-container`,dg),io(o)){let e=r[1];Ld(e,r,o),ru(e,o,r)}return n!=null&&Rd(r,o),cg}function lg(){let e=Lo(),t=Qd(Ro());return e.firstCreatePass&&$p(e,t),lg}function ug(e,t,n){return cg(e,t,n),lg(),ug}var dg=(e,t,n,r,i)=>(ps(!0),ute(t[11],``));function B(){return Io()}function V(e,t,n){let r=Io();return up(r,Jo(),t)&&(Lo(),Hd(ss(),r,e,t,r[11],n)),V}var fg=void 0;function pg(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var mg=[`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`,pg],hg=Object.create(null);function gg(e){let t=yg(e),n=_g(t);if(n)return n;let r=t.split(`-`)[0];if(n=_g(r),n)return n;if(r===`en`)return mg;throw new ui(701,!1)}function _g(e){if(!(e in hg)){let t=Yi.ng&&Yi.ng.common&&Yi.ng.common.locales&&Yi.ng.common.locales[e];return t!==void 0&&(hg[e]=t),t}return hg[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 yg(e){return e.toLowerCase().replace(/_/g,`-`)}var bg=`en-US`;function xg(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function H(e,t,n){let r=Io(),i=Lo(),a=Ro();return Sg(i,r,r[11],a,e,t,n),H}function U(e,t,n){let r=Io(),i=Lo(),a=Ro();return(a.type&3||n)&&gp(a,i,r,n,r[11],e,t,mp(a,r,t)),U}function Sg(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=mp(r,t,a),gp(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<n.length;e+=2){let o=n[e],s=n[e+1];c??=mp(r,t,a),xp(r,t,o,s,i,c)}if(e&&e.length)for(let n of e)c??=mp(r,t,a),xp(r,t,n,i,i,c)}}function W(e=1){return ate(e)}function Cg(e,t){let n=null,r=yte(e);for(let i=0;i<t.length;i++){let a=t[i];if(a===`*`){n=i;continue}if(r===null?Tu(e,a,!0):Ste(r,a))return i}return n}function wg(e){let t=Io()[15][5];if(!t.projection){let n=t.projection=da(e?e.length:1,null),r=n.slice(),i=t.child;for(;i!==null;){if(i.type!==128){let t=e?Cg(i,e):0;t!==null&&(r[t]?r[t].projectionNext=i:n[t]=i,r[t]=i)}i=i.next}}}function Tg(e,t=0,n,r,i,a){let o=Io(),s=Lo(),c=r?e+1:null;c!==null&&Th(o,s,c,r,i,a,null,n);let l=Wf(s,27+e,16,null,n||null);l.projection===null&&(l.projection=t),Ho();let u=!o[6]||No();o[15][5].projection[l.projection]===null&&c!==null?Eg(o,s,c):u&&!Ql(l)&&xd(s,o,l)}function Eg(e,t,n){let r=27+n,i=t.data[r],a=e[r],o=Qf(a,i.tView.ssrId);Ff(a,sf(e,i,void 0,{dehydratedView:o}),0,cf(i,o))}function Dg(e,t,n,r){return Ym(e,Vm(t,n,r)),Dg}function Og(e=1){Zo(rte()+e)}function kg(e){return ho(Uo(),27+e)}function Ag(e,t){return e<<17|t<<2}function jg(e){return e>>17&32767}function Mg(e){return(e&2)==2}function Ng(e,t){return e&131071|t<<17}function Pg(e){return e|2}function Fg(e){return(e&131068)>>2}function Ig(e,t){return e&-131069|t<<2}function Lg(e){return(e&1)==1}function Rg(e){return e|1}function zg(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=jg(o),c=Fg(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||ha(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=jg(e[s+1]);e[r+1]=Ag(t,s),t!==0&&(e[t+1]=Ig(e[t+1],r)),e[s+1]=Ng(e[s+1],r)}else e[r+1]=Ag(s,0),s!==0&&(e[s+1]=Ig(e[s+1],r)),s=r}else e[r+1]=Ag(c,0),s===0?s=r:e[c+1]=Ig(e[c+1],r),c=r;l&&(e[r+1]=Pg(e[r+1])),Vg(e,u,r,!0),Vg(e,u,r,!1),Bg(t,u,e,r,a),o=Ag(s,c),a?t.classBindings=o:t.styleBindings=o}function Bg(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&ha(a,t)>=0&&(n[r+1]=Rg(n[r+1]))}function Vg(e,t,n,r){let i=e[n+1],a=t===null,o=r?jg(i):Fg(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];Hg(n,t)&&(s=!0,e[o+1]=r?Rg(i):Pg(i)),o=r?jg(i):Fg(i)}s&&(e[n+1]=r?Pg(i):Rg(i))}function Hg(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?ha(e,t)>=0:!1}var Ug={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Wg(e){return e.substring(Ug.key,Ug.keyEnd)}function Gg(e){return qg(e),Kg(e,Jg(e,0,Ug.textEnd))}function Kg(e,t){let n=Ug.textEnd;return n===t?-1:(t=Ug.keyEnd=Yg(e,Ug.key=t,n),Jg(e,t,n))}function qg(e){Ug.key=0,Ug.keyEnd=0,Ug.value=0,Ug.valueEnd=0,Ug.textEnd=e.length}function Jg(e,t,n){for(;t<n&&e.charCodeAt(t)<=32;)t++;return t}function Yg(e,t,n){for(;t<n&&e.charCodeAt(t)>32;)t++;return t}function Xg(e,t,n){return $g(e,t,n,!1),Xg}function G(e,t){return $g(e,t,null,!0),G}function Zg(e){e_(u_,Qg,e,!0)}function Qg(e,t){for(let n=Gg(t);n>=0;n=Kg(t,n))pa(e,Wg(t),!0)}function $g(e,t,n,r){let i=Io(),a=Lo(),o=Yo(2);if(a.firstUpdatePass&&n_(a,e,o,r),t!==Du&&up(i,o,t)){let s=a.data[as()];f_(a,s,i,i[11],e,i[o+1]=ane(t,n),r,o)}}function e_(e,t,n,r){let i=Lo(),a=Yo(2);i.firstUpdatePass&&n_(i,null,a,r);let o=Io();if(n!==Du&&up(o,a,n)){let s=i.data[as()];if(h_(s,r)&&!t_(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=mi(e,n||``)),ig(i,s,o,n,r)}else d_(i,s,o,o[11],o[a+1],o[a+1]=l_(e,t,n),r,a)}}function t_(e,t){return t>=e.expandoStartIndex}function n_(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[as()],o=t_(e,n);h_(a,r)&&t===null&&!o&&(t=!1),t=r_(i,a,t,r),zg(i,a,t,n,o,r)}}function r_(e,t,n,r){let i=nte(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=s_(null,e,t,n,r),n=c_(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=s_(i,e,t,n,r),a===null){let n=i_(e,t,r);n!==void 0&&Array.isArray(n)&&(n=s_(null,e,t,n[1],r),n=c_(n,t.attrs,r),a_(e,t,r,n))}else a=o_(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function i_(e,t,n){let r=n?t.classBindings:t.styleBindings;if(Fg(r)!==0)return e[jg(r)]}function a_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[jg(i)]=r}function o_(e,t,n){let r,i=t.directiveEnd;for(let a=1+t.directiveStylingLast;a<i;a++){let t=e[a].hostAttrs;r=c_(r,t,n)}return c_(r,t.attrs,n)}function s_(e,t,n,r,i){let a=null,o=n.directiveEnd,s=n.directiveStylingLast;for(s===-1?s=n.directiveStart:s++;s<o&&(a=t[s],r=c_(r,a.hostAttrs,i),a!==e);)s++;return e!==null&&(n.directiveStylingLast=s),r}function c_(e,t,n){let r=n?1:2,i=-1;if(t!==null)for(let a=0;a<t.length;a++){let o=t[a];typeof o==`number`?i=o:i===r&&(Array.isArray(e)||(e=e===void 0?[]:[``,e]),pa(e,o,n?!0:t[++a]))}return e===void 0?null:e}function l_(e,t,n){if(n==null||n===``)return va;let r=[],i=ou(n);if(Array.isArray(i))for(let t=0;t<i.length;t++)e(r,i[t],!0);else if(i instanceof Set)for(let t of i)e(r,t,!0);else if(typeof i==`object`)for(let t in i)Object.hasOwn(i,t)&&e(r,t,i[t]);else typeof i==`string`&&t(r,i);return r}function u_(e,t,n){let r=String(t);r!==``&&!r.includes(` `)&&pa(e,r,n)}function d_(e,t,n,r,i,a,o,s){i===Du&&(i=va);let c=0,l=0,u=0<i.length?i[0]:null,d=0<a.length?a[0]:null;for(;u!==null||d!==null;){let f=c<i.length?i[c+1]:void 0,p=l<a.length?a[l+1]:void 0,m=null,h;u===d?(c+=2,l+=2,f!==p&&(m=d,h=p)):d===null||u!==null&&u<d?(c+=2,m=u):(l+=2,m=d,h=p),m!==null&&f_(e,t,n,r,m,h,o,s),u=c<i.length?i[c]:null,d=l<a.length?a[l]:null}}function f_(e,t,n,r,i,a,o,s){if(!(t.type&3))return;let c=e.data,l=c[s+1];m_(Lg(l)?p_(c,t,n,i,Fg(l),o):void 0)||(m_(a)||Mg(l)&&(a=p_(c,null,n,i,s,o)),wd(r,o,fo(as(),n),i,a))}function p_(e,t,n,r,i,a){let o=t===null,s;for(;i>0;){let t=e[i],a=Array.isArray(t),c=a?t[1]:t,l=c===null,u=n[i+1];u===Du&&(u=l?va:void 0);let d=l?ma(u,r):c===r?u:void 0;if(a&&!m_(d)&&(d=ma(t,r)),m_(d)&&(s=d,o))return s;let f=e[i+1];i=o?jg(f):Fg(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=ma(e,r))}return s}function m_(e){return e!==void 0}function ane(e,t){return e==null||e===``||(typeof t==`string`?e=ou(e)+t:typeof e==`object`&&(e=pi(ou(e)))),e}function h_(e,t){return!!(e.flags&(t?8:16))}function K(e,t=``){let n=Io(),r=Lo(),i=e+27,a=r.firstCreatePass?Wf(r,i,1,t,null):r.data[i],o=one(r,n,a,t);n[i]=o,fs()&&md(r,n,o,a),Bo(a,!1)}var one=(e,t,n,r)=>(ps(!0),cte(t[11],r));function g_(e,t,n,r=``){return up(e,Jo(),n)?t+Li(n)+r:Du}function sne(e,t,n,r,i,a=``){let o=dp(e,qo(),n,i);return Yo(2),o?t+Li(n)+r+Li(i)+a:Du}function cne(e,t,n,r,i,a,o,s=``){let c=fp(e,qo(),n,i,o);return Yo(3),c?t+Li(n)+r+Li(i)+a+Li(o)+s:Du}function lne(e,t,n,r,i,a,o,s,c,l=``){let u=pp(e,qo(),n,i,o,c);return Yo(4),u?t+Li(n)+r+Li(i)+a+Li(o)+s+Li(c)+l:Du}function q(e){return J(``,e),q}function J(e,t,n){let r=Io(),i=g_(r,e,t,n);return i!==Du&&y_(r,as(),i),J}function Y(e,t,n,r,i){let a=Io(),o=sne(a,e,t,n,r,i);return o!==Du&&y_(a,as(),o),Y}function __(e,t,n,r,i,a,o){let s=Io(),c=cne(s,e,t,n,r,i,a,o);return c!==Du&&y_(s,as(),c),__}function v_(e,t,n,r,i,a,o,s,c){let l=Io(),u=lne(l,e,t,n,r,i,a,o,s,c);return u!==Du&&y_(l,as(),u),v_}function y_(e,t,n){let r=fo(t,e);lte(e[11],r,n)}function b_(e,t,n){pc(t)&&(t=t());let r=Io();return up(r,Jo(),t)&&(Lo(),Vd(ss(),r,e,t,r[11],n)),b_}function x_(e,t){let n=pc(e);return n&&e.set(t),n}function S_(e,t){let n=Io(),r=Lo(),i=Ro();return Sg(r,n,n[11],i,e,t),S_}var C_={};function w_(e){Yu(`NgLet`);let t=Lo(),n=Io(),r=e+27;return Bo(Wf(t,r,128,null,null),!1),go(t,n,r,C_),w_}function T_(e){return go(Lo(),Io(),as(),e),e}function E_(e){let t=ho(Uo(),27+e);if(t===C_)throw new ui(314,!1);return t}function D_(e,t,n=``){return g_(Io(),e,t,n)}function O_(e,t,n){let r=Lo();r.firstCreatePass&&k_(t,r.data,r.blueprint,ao(e),n)}function k_(e,t,n,r,i){if(e=gi(e),Array.isArray(e))for(let a=0;a<e.length;a++)k_(e[a],t,n,r,i);else{let a=Lo(),o=Io(),s=Ro(),c=Ma(e)?e:gi(e.provide),l=Wa(e),u=s.providerIndexes&1048575,d=s.directiveStart,f=s.providerIndexes>>20;if(Ma(e)||!e.multi){let r=new Bc(l,i,Lp,null),p=M_(c,t,i?u:u+f,d);p===-1?(ll(al(s,o),a,c),A_(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=M_(c,t,u+f,d),m=M_(c,t,u,u+f),h=p>=0&&n[p],g=m>=0&&n[m];if(i&&!g||!i&&!h){ll(al(s,o),a,c);let u=fne(i?dne:une,n.length,i,r,l,e);!i&&g&&(n[m].providerFactory=u),A_(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=j_(n[i?m:p],l,!i&&r);A_(a,e,p>-1?p:m,t)}!i&&r&&g&&n[m].componentProviders++}}}function A_(e,t,n,r){let i=Ma(t),a=Na(t);if(i||a){let o=(a?gi(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 j_(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function M_(e,t,n,r){for(let i=n;i<r;i++)if(t[i]===e)return i;return-1}function une(e,t,n,r,i){return N_(this.multi,[])}function dne(e,t,n,r,i){let a=this.multi,o;if(this.providerFactory){let e=this.providerFactory.componentProviders,t=gl(r,r[1],this.providerFactory.index,i);o=t.slice(0,e),N_(a,o);for(let n=e;n<t.length;n++)o.push(t[n])}else o=[],N_(a,o);return o}function N_(e,t){for(let n=0;n<e.length;n++){let r=e[n];t.push(r())}return t}function fne(e,t,n,r,i,a){let o=new Bc(e,n,Lp,null);return o.multi=[],o.index=t,o.componentProviders=0,j_(o,i,r&&!n),o}function P_(e,t){return n=>{n.providersResolver=(t,n)=>O_(t,n?n(e):e,!1),t&&(n.viewProvidersResolver=(e,n)=>O_(e,n?n(t):t,!0))}}function F_(e,t){let n=Ko()+e,r=Io();return r[n]===Du?cp(r,n,t()):lp(r,n)}function I_(e,t,n){return z_(Io(),Ko(),e,t,n)}function L_(e,t,n,r){return B_(Io(),Ko(),e,t,n,r)}function pne(e,t,n,r,i,a,o){return mne(Io(),Ko(),e,t,n,r,i,a)}function R_(e,t){let n=e[t];return n===Du?void 0:n}function z_(e,t,n,r,i,a){let o=t+n;return up(e,o,i)?cp(e,o+1,a?r.call(a,i):r(i)):R_(e,o+1)}function B_(e,t,n,r,i,a,o){let s=t+n;return dp(e,s,i,a)?cp(e,s+2,o?r.call(o,i,a):r(i,a)):R_(e,s+2)}function mne(e,t,n,r,i,a,o,s,c){let l=t+n;return pp(e,l,i,a,o,s)?cp(e,l+4,c?r.call(c,i,a,o,s):r(i,a,o,s)):R_(e,l+4)}function V_(e,t){let n=Lo(),r,i=e+27;n.firstCreatePass?(r=hne(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=aa(r.type,!0)),o=qi(Lp);try{let e=$c(!1),t=a();return $c(e),go(n,Io(),i,t),t}finally{qi(o)}}function hne(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function H_(e,t,n){let r=e+27,i=Io(),a=ho(i,r);return W_(i,r)?z_(i,Ko(),t,a.transform,n,a):a.transform(n)}function U_(e,t,n,r){let i=e+27,a=Io(),o=ho(a,i);return W_(a,i)?B_(a,Ko(),t,o.transform,n,r,o):o.transform(n,r)}function W_(e,t){return e[1].data[t].pure}function G_(e,t){return Uf(e,t)}var gne=(()=>{class e{applicationErrorHandler=S(Us);appRef=S(Nh);taskService=S(Ss);ngZone=S(As);zonelessEnabled=S(ec);tracing=S(qu,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new ar;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Os):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(S(tc,{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?Es:Ts;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=El({token:e,factory:e.ɵfac})}return e})();function _ne(){return[{provide:$s,useExisting:gne},{provide:As,useClass:Rs},{provide:ec,useValue:!0}]}function vne(){return typeof $localize<`u`&&$localize.locale||`en-US`}var K_=new Ti(``,{factory:()=>S(K_,{optional:!0,skipSelf:!0})||vne()}),q_=class{destroyed=!1;listeners=null;errorHandler=S(Hs,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=S(vs);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new ui(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(di(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let t=en(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&&yne(this.listeners)),en(t),this.isEmitting=!1}}};function yne(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function X(e,t){return Sn(e,t?.equal)}function Z(e){return Wn(e)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var bne=e=>e;function Q(e,t){return typeof e==`function`?J_(Bn(e,bne,t?.equal),t?.debugName,t?.set):J_(Bn(e.source,e.computation,e.equal),e.debugName,e.set)}function J_(e,t,n){let r=e[$t],i=e;if(n!==void 0){let t=e=>Vn(r,e);i.set=e=>n(e,t),i.update=r=>n(r(Z(e)),t)}else i.set=e=>Vn(r,e),i.update=e=>Hn(r,e);return i.asReadonly=Gs.bind(e),i}var Y_=!1;function xne(){return Y_}function X_(e){Y_=e}function Z_(e,t){let n=Object.create(hc);n.value=e,n.transformFn=t?.transform;function r(){if(rn(n),n.value===mc)throw new ui(-950,null);return n.value}return r[$t]=n,r}function Q_(e){return new q_}function $_(e,t){return Z_(e,t)}function Sne(e){return Z_(mc,e)}var $=($_.required=Sne,$_);function ev(e,t){let n=Object.create(hc),r=new q_;n.value=e;function i(){return rn(n),tv(n.value),n.value}return i[$t]=n,i.asReadonly=Gs.bind(i),i.set=e=>{n.equal(n.value,e)||(kn(n,e),r.emit(e))},i.update=e=>{tv(n.value),i.set(e(n.value))},i.subscribe=r.subscribe.bind(r),i.destroyRef=r.destroyRef,i}function tv(e){if(e===mc)throw new ui(952,!1)}function nv(e,t){return ev(e,t)}function Cne(e){return ev(mc,e)}var rv=(nv.required=Cne,nv);function iv(e,t){return qm(t)}function wne(e,t){return Jm(t)}var av=(iv.required=wne,iv),Tne=(()=>{class e{static __NG_ELEMENT_ID__=Ene}return e})();function Ene(e){return Dne(Ro(),Io(),(e&16)==16)}function Dne(e,t,n){if(ro(e)&&!n){let n=_o(e.index,t);return new Bf(n,n)}if(e.type&175){let e=t[15];return new Bf(e,t)}return null}var ov=new Ti(``),One=new Ti(``);function sv(e){return!e.moduleRef}function kne(e){let t=sv(e)?e.r3Injector:e.moduleRef.injector,n=t.get(As);return n.run(()=>{sv(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Us),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),sv(e)){let n=()=>t.destroy(),r=e.platformInjector.get(ov);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(ov);n.add(t),e.moduleRef.onDestroy(()=>{Fh(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return jne(r,n,()=>{let n=t.get(Ss),r=n.add(),i=t.get(ph);return i.runInitializers(),i.donePromise.then(()=>{if(xg(t.get(K_,bg)||`en-US`),!t.get(One,!0))return sv(e)?t.get(Nh):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(sv(e)){let n=t.get(Nh);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 jne(e,t,n){try{let r=n();return Zm(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var cv=null;function Mne(e=[],t){return gs.create({name:t,providers:[{provide:Pa,useValue:`platform`},{provide:ov,useValue:new Set([()=>cv=null])},...e]})}function Nne(e=[]){if(cv)return cv;let t=Mne(e);return cv=t,jh(),Pne(t),t}function Pne(e){let t=e.get(Js,null);Za(e,()=>{t?.forEach(e=>e())})}function Fne(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;Ac(_c.BootstrapApplicationStart);try{let e=i?.injector??Nne(r);return kne({r3Injector:new eh({providers:[_ne(),Ws,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{Ac(_c.BootstrapApplicationEnd)}}function lv(e){return typeof e==`boolean`?e:e!=null&&e!==`false`}var uv=Symbol(`NOT_SET`),dv=new Set,Ine={...jn,kind:`afterRenderEffectPhase`,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:uv,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase<this.phase)return;this.sequence.erroredOrDestroyed=!0}this.sequence.scheduler.notify(7)},phaseFn(e){if(this.sequence.lastPhase=this.phase,!this.dirty||(this.dirty=!1,this.value!==uv&&!hn(this)))return this.signal;try{for(let e of this.cleanup??dv)e()}finally{this.cleanup?.clear()}let t=[];e!==void 0&&t.push(e),t.push(this.registerCleanupFn);let n=dn(this),r;try{r=this.userFn.apply(null,t)}finally{pn(this,n)}return(this.value===uv||!this.equal(this.value,r))&&(this.value=r,this.version++),this.signal}},Lne=class extends $u{scheduler;lastPhase=null;nodes=[void 0,void 0,void 0,void 0];onDestroyFns=null;constructor(e,t,n,r,i,a=null){super(e,[void 0,void 0,void 0,void 0],n,!1,i.get(vs),a),this.scheduler=r;for(let e of Zu){let n=t[e];if(n===void 0)continue;let r=Object.create(Ine);r.sequence=this,r.phase=e,r.userFn=n,r.dirty=!0,r.signal=()=>(rn(r),r.value),r.signal[$t]=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??dv)t()}finally{gn(e)}}};function fv(e,t){let n=t?.injector??S(gs),r=n.get($s),i=n.get(Xu),a=n.get(qu,null,{optional:!0});i.impl??=n.get(Qu);let o=e;typeof o==`function`&&(o={mixedReadWrite:e});let s=n.get(Zs,null,{optional:!0}),c=new Lne(i.impl,[o.earlyRead,o.write,o.mixedReadWrite,o.read],s?.view,r,n,a?.snapshot(null));return i.impl.register(c),c}var pv=null;function mv(){return pv}function Rne(e){pv??=e}var zne=class{},hv=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(hv||{}),gv=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(gv||{}),_v=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(_v||{}),vv={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 Bne(e){return gg(e)[vg.LocaleId]}function Vne(e,t,n){let r=gg(e);return wv(wv([r[vg.DayPeriodsFormat],r[vg.DayPeriodsStandalone]],t),n)}function Hne(e,t,n){let r=gg(e);return wv(wv([r[vg.DaysFormat],r[vg.DaysStandalone]],t),n)}function Une(e,t,n){let r=gg(e);return wv(wv([r[vg.MonthsFormat],r[vg.MonthsStandalone]],t),n)}function Wne(e,t){let n=gg(e)[vg.Eras];return wv(n,t)}function yv(e,t){return wv(gg(e)[vg.DateFormat],t)}function bv(e,t){return wv(gg(e)[vg.TimeFormat],t)}function xv(e,t){let n=gg(e)[vg.DateTimeFormat];return wv(n,t)}function Sv(e,t){let n=gg(e),r=n[vg.NumberSymbols][t];if(r===void 0){if(t===vv.CurrencyDecimal)return n[vg.NumberSymbols][vv.Decimal];if(t===vv.CurrencyGroup)return n[vg.NumberSymbols][vv.Group]}return r}function Cv(e){if(!e[vg.ExtraData])throw new ui(2303,!1)}function Gne(e){let t=gg(e);return Cv(t),(t[vg.ExtraData][2]||[]).map(e=>typeof e==`string`?Tv(e):[Tv(e[0]),Tv(e[1])])}function Kne(e,t,n){let r=gg(e);return Cv(r),wv(wv([r[vg.ExtraData][0],r[vg.ExtraData][1]],t)||[],n)||[]}function wv(e,t){for(let n=t;n>-1;n--)if(e[n]!==void 0)return e[n];throw new ui(2304,!1)}function Tv(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var qne=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Ev=Object.create(null),Jne=/((?:[^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]*)/,Yne=256;function Xne(e,t,n,r){let i=ore(e);Zne(t),t=Ov(n,t)||t;let a=[],o;for(;t;)if(o=Jne.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=zv(r,s),i=are(i,r));let c=``;return a.forEach(e=>{let t=rre(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function Zne(e){if(e.length>Yne)throw new ui(2300,!1)}function Dv(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function Ov(e,t){let n=Bne(e);if(Ev[n]??=Object.create(null),Ev[n][t])return Ev[n][t];let r=``;switch(t){case`shortDate`:r=yv(e,_v.Short);break;case`mediumDate`:r=yv(e,_v.Medium);break;case`longDate`:r=yv(e,_v.Long);break;case`fullDate`:r=yv(e,_v.Full);break;case`shortTime`:r=bv(e,_v.Short);break;case`mediumTime`:r=bv(e,_v.Medium);break;case`longTime`:r=bv(e,_v.Long);break;case`fullTime`:r=bv(e,_v.Full);break;case`short`:let t=Ov(e,`shortTime`),n=Ov(e,`shortDate`);r=kv(xv(e,_v.Short),[t,n]);break;case`medium`:let i=Ov(e,`mediumTime`),a=Ov(e,`mediumDate`);r=kv(xv(e,_v.Medium),[i,a]);break;case`long`:let o=Ov(e,`longTime`),s=Ov(e,`longDate`);r=kv(xv(e,_v.Long),[o,s]);break;case`full`:let c=Ov(e,`fullTime`),l=Ov(e,`fullDate`);r=kv(xv(e,_v.Full),[c,l])}return r&&(Ev[n][t]=r),r}function kv(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return Object.hasOwn(t,n)?t[n]:e})),e}function Av(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.length<t;)o=`0`+o;return r&&(o=o.slice(o.length-t)),a+o}function Qne(e,t){return Av(e,3).substring(0,t)}function jv(e,t,n=0,r=!1,i=!1){return function(a,o){let s=$ne(e,a);if((n>0||s>-n)&&(s+=n),e===3)s===0&&n===-12&&(s=12);else if(e===6)return Qne(s,t);let c=Sv(o,vv.MinusSign);return Av(s,t,c,r,i)}}function $ne(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 ui(2301,!1)}}function Mv(e,t,n=hv.Format,r=!1){return function(i,a){return ere(i,a,e,t,n,r)}}function ere(e,t,n,r,i,a){switch(n){case 2:return Une(t,i,r)[e.getMonth()];case 1:return Hne(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=Gne(t),a=Kne(t,i,r),s=e.findIndex(e=>{if(Array.isArray(e)){let[t,r]=e,i=n>=t.hours&&o>=t.minutes,a=n<r.hours||n===r.hours&&o<r.minutes;if(t.hours<r.hours){if(i&&a)return!0}else if(i||a)return!0}else if(e.hours===n&&e.minutes===o)return!0;return!1});if(s!==-1)return a[s]}return Vne(t,i,r)[n<12?0:1];case 3:return Wne(t,r)[e.getFullYear()<=0?0:1];default:throw new ui(2302,!1)}}function Nv(e){return function(t,n,r){let i=-1*r,a=Sv(n,vv.MinusSign),o=i>0?Math.floor(i/60):Math.ceil(i/60);switch(e){case 0:return(i>=0?`+`:``)+Av(o,2,a)+Av(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+Av(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+Av(o,2,a)+`:`+Av(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+Av(o,2,a)+`:`+Av(Math.abs(i%60),2,a);default:throw new ui(2310,!1)}}}var tre=0,Pv=4;function nre(e){let t=Dv(e,tre,1).getDay();return Dv(e,0,1+(t<=Pv?Pv:11)-t)}function Fv(e){let t=e.getDay(),n=t===0?-3:Pv-t;return Dv(e.getFullYear(),e.getMonth(),e.getDate()+n)}function Iv(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=Fv(n),t=nre(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return Av(i,e,Sv(r,vv.MinusSign))}}function Lv(e,t=!1){return function(n,r){return Av(Fv(n).getFullYear(),e,Sv(r,vv.MinusSign),t)}}var Rv=Object.create(null);function rre(e){if(Rv[e])return Rv[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=Mv(3,gv.Abbreviated);break;case`GGGG`:t=Mv(3,gv.Wide);break;case`GGGGG`:t=Mv(3,gv.Narrow);break;case`y`:t=jv(0,1,0,!1,!0);break;case`yy`:t=jv(0,2,0,!0,!0);break;case`yyy`:t=jv(0,3,0,!1,!0);break;case`yyyy`:t=jv(0,4,0,!1,!0);break;case`Y`:t=Lv(1);break;case`YY`:t=Lv(2,!0);break;case`YYY`:t=Lv(3);break;case`YYYY`:t=Lv(4);break;case`M`:case`L`:t=jv(1,1,1);break;case`MM`:case`LL`:t=jv(1,2,1);break;case`MMM`:t=Mv(2,gv.Abbreviated);break;case`MMMM`:t=Mv(2,gv.Wide);break;case`MMMMM`:t=Mv(2,gv.Narrow);break;case`LLL`:t=Mv(2,gv.Abbreviated,hv.Standalone);break;case`LLLL`:t=Mv(2,gv.Wide,hv.Standalone);break;case`LLLLL`:t=Mv(2,gv.Narrow,hv.Standalone);break;case`w`:t=Iv(1);break;case`ww`:t=Iv(2);break;case`W`:t=Iv(1,!0);break;case`d`:t=jv(2,1);break;case`dd`:t=jv(2,2);break;case`c`:case`cc`:t=jv(7,1);break;case`ccc`:t=Mv(1,gv.Abbreviated,hv.Standalone);break;case`cccc`:t=Mv(1,gv.Wide,hv.Standalone);break;case`ccccc`:t=Mv(1,gv.Narrow,hv.Standalone);break;case`cccccc`:t=Mv(1,gv.Short,hv.Standalone);break;case`E`:case`EE`:case`EEE`:t=Mv(1,gv.Abbreviated);break;case`EEEE`:t=Mv(1,gv.Wide);break;case`EEEEE`:t=Mv(1,gv.Narrow);break;case`EEEEEE`:t=Mv(1,gv.Short);break;case`a`:case`aa`:case`aaa`:t=Mv(0,gv.Abbreviated);break;case`aaaa`:t=Mv(0,gv.Wide);break;case`aaaaa`:t=Mv(0,gv.Narrow);break;case`b`:case`bb`:case`bbb`:t=Mv(0,gv.Abbreviated,hv.Standalone,!0);break;case`bbbb`:t=Mv(0,gv.Wide,hv.Standalone,!0);break;case`bbbbb`:t=Mv(0,gv.Narrow,hv.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=Mv(0,gv.Abbreviated,hv.Format,!0);break;case`BBBB`:t=Mv(0,gv.Wide,hv.Format,!0);break;case`BBBBB`:t=Mv(0,gv.Narrow,hv.Format,!0);break;case`h`:t=jv(3,1,-12);break;case`hh`:t=jv(3,2,-12);break;case`H`:t=jv(3,1);break;case`HH`:t=jv(3,2);break;case`m`:t=jv(4,1);break;case`mm`:t=jv(4,2);break;case`s`:t=jv(5,1);break;case`ss`:t=jv(5,2);break;case`S`:t=jv(6,1);break;case`SS`:t=jv(6,2);break;case`SSS`:t=jv(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=Nv(0);break;case`ZZZZZ`:t=Nv(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=Nv(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=Nv(2);break;default:return null}return Rv[e]=t,t}function zv(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function ire(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function are(e,t,n){let r=e.getTimezoneOffset();return ire(e,-1*(zv(t,r)-r))}function ore(e){if(Bv(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 Dv(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(qne))return sre(n)}let t=new Date(e);if(!Bv(t))throw new ui(2311,!1);return t}function sre(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 Bv(e){return e instanceof Date&&!isNaN(e.valueOf())}var Vv=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=S(gs);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)(Lp(_m))};static ɵdir=oh({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[xc]})}return e})();function cre(e,t){return new ui(2100,!1)}var lre=`mediumDate`,ure=new Ti(``),dre=new Ti(``),Hv=(()=>{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??lre,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Xne(t,e,i||this.locale,a)}catch(t){throw cre(e,t.message)}}static ɵfac=function(t){return new(t||e)(Lp(K_,16),Lp(ure,24),Lp(dre,24))};static ɵpipe=sh({name:`date`,type:e,pure:!0})}return e})(),Uv=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=sh({name:`json`,type:e,pure:!1})}return e})();function fre(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 pre=`browser`,Wv=class{_doc;constructor(e){this._doc=e}manager},Gv=(()=>{class e extends Wv{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)(ea(_s))};static ɵprov=vi({token:e,factory:e.ɵfac})}return e})(),Kv=new Ti(``),qv=(()=>{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 Gv));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof Gv);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 ui(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(ea(Kv),ea(As))};static ɵprov=vi({token:e,factory:e.ɵfac})}return e})(),Jv=`ng-app-id`;function Yv(e){for(let t of e)t.remove()}function Xv(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function mre(e,t,n,r){let i=e.head?.querySelectorAll(`style[${Jv}="${t}"],link[${Jv}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(Jv),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 Zv(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var Qv=(()=>{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,mre(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,Xv);t?.forEach(e=>this.addUsage(e,this.external,Zv))}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&&(Yv(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Yv(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,Xv(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,Zv(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)(ea(_s),ea(Ks),ea(Xs,8),ea(Ys))};static ɵprov=vi({token:e,factory:e.ɵfac})}return e})(),$v={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,ty=`%COMP%`,hre=`_nghost-${ty}`,gre=`_ngcontent-${ty}`,_re=!0,vre=new Ti(``,{factory:()=>_re}),yre=new Ti(``);function bre(e){return gre.replace(ey,e)}function xre(e){return hre.replace(ey,e)}function ny(e,t){return t.map(t=>t.replace(ey,e))}var ry=(()=>{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 iy(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 cy?n.applyToHost(e):n instanceof sy&&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 iu.Emulated:r=new cy(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case iu.ShadowDom:return new oy(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case iu.ExperimentalIsolatedShadowDom:return new oy(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new sy(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)(ea(qv),ea(Fp),ea(Ks),ea(vre),ea(_s),ea(As),ea(Xs),ea(qu,8),ea(yre,8))};static ɵprov=vi({token:e,factory:e.ɵfac})}return e})(),iy=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($v[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(ay(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=ay(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new ui(-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 ui(-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=$v[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=$v[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&(Ou.DashCase|Ou.Important)?e.style.setProperty(t,n,r&Ou.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&Ou.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=mv().getGlobalEventTarget(this.doc,e),!e))throw new ui(-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 ay(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var oy=class extends iy{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=ny(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=Zv(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)}},sy=class extends iy{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?ny(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&&Fu.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},cy=class extends sy{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=bre(l),this.hostAttr=xre(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}},Sre=class e extends zne{supportsDOMEvents=!0;static makeCurrent(){Rne(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=Cre();return t==null?null:wre(t)}resetBaseElement(){ly=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return fre(document.cookie,e)}},ly=null;function Cre(){return ly||=document.head.querySelector(`base`),ly?ly.getAttribute(`href`):null}function wre(e){return new URL(e,document.baseURI).pathname}var uy=[`alt`,`control`,`meta`,`shift`],Tre={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},Ere={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},Dre=(()=>{class e extends Wv{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(()=>mv().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.`),uy.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=Tre[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`),uy.forEach(t=>{if(t!==n){let n=Ere[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)(ea(_s))};static ɵprov=vi({token:e,factory:e.ɵfac})}return e})();async function Ore(e,t,n){return Fne({rootComponent:e,...kre(t,n)})}function kre(e,t){return{platformRef:t?.platformRef,appProviders:[...my,...e?.providers??[]],platformProviders:py}}function Are(){Sre.makeCurrent()}function dy(){return new Hs}function fy(){return Kl(document),document}var py=[{provide:Ys,useValue:pre},{provide:Js,useValue:Are,multi:!0},{provide:_s,useFactory:fy}],my=[{provide:Pa,useValue:`root`},{provide:Hs,useFactory:dy},{provide:Kv,useClass:Gv,multi:!0},{provide:Kv,useClass:Dre,multi:!0},ry,{provide:Fp,useClass:Qv},{provide:Qv,useExisting:Fp},qv,{provide:tp,useExisting:ry},[]];function hy(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<i.length;e++)a+=i[e],e<t.length&&(a+=String(t[e]));return`${n}${a}${r}`}return`${n}${String(e)}${r}`})}var gy={blue:hy(34,39),cyan:hy(36,39),gray:hy(90,39),green:hy(32,39),red:hy(31,39),yellow:hy(33,39),bold:hy(1,22),dim:hy(2,22),reset:hy(0,0),underline:hy(4,24)};function _y(e,...t){return typeof e==`function`?e(...t):e}var vy=Error.captureStackTrace,yy=class e extends Error{name;code;docs;fix;sources;data;get why(){return this.message}constructor(t,n=e){super(t.why,{cause:t.cause}),this.code=this.name=t.code,this.fix=t.fix,this.docs=t.docs,this.sources=t.sources,this.data=t.data,vy?.(this,n)}toJSON(){return{name:this.name,why:this.why,fix:this.fix,docs:this.docs,sources:this.sources,cause:this.cause,data:this.data,stack:this.stack}}};function by(e,t){return typeof e==`string`?`${e}/${t.toLowerCase()}`:e?.(t)}function xy(e){let t=e.reporters??[],n={},{docsBase:r}=e;for(let i of Object.keys(e.codes)){let a=e.codes[i],o=a.docs===!1?void 0:a.docs||by(r,i),s=(e={},n={})=>{let r=new yy({code:i,why:_y(a.why,e),fix:_y(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:_y(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function Sy(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<r.length-1?`├▶`:`╰▶`)} ${t}`)].join(` +`);return r>=0?n.slice(0,r):n}function mi(e,t){return e?t?`${e} ${t}`:e:t||``}var Wee=fi({__forward_ref__:fi});function hi(e){return e.__forward_ref__=hi,e}function gi(e){return _i(e)?e():e}function _i(e){return typeof e==`function`&&Object.hasOwn(e,Wee)&&e.__forward_ref__===hi}function vi(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function yi(e){return bi(e,Ci)}function bi(e,t){return Object.hasOwn(e,t)&&e[t]||null}function xi(e){return(e?.[Ci]??null)||null}function Si(e){return e&&Object.hasOwn(e,wi)?e[wi]:null}var Ci=fi({ɵprov:fi}),wi=fi({ɵinj:fi}),Ti=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=vi({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Ei(e){return e&&!!e.ɵproviders}var Di=fi({ɵcmp:fi}),Oi=fi({ɵdir:fi}),ki=fi({ɵpipe:fi}),Ai=fi({ɵfac:fi}),ji=fi({__NG_ELEMENT_ID__:fi}),Mi=fi({__NG_ENV_ID__:fi});function Ni(e){return Ii(e,`@Component`),e[Di]||null}function Pi(e){return Ii(e,`@Directive`),e[Oi]||null}function Fi(e){return Ii(e,`@Pipe`),e[ki]||null}function Ii(e,t){if(e==null)throw new ui(-919,!1)}function Li(e){return typeof e==`string`?e:e==null?``:String(e)}var Ri=fi({ngErrorCode:fi}),zi=fi({ngErrorMessage:fi}),Bi=fi({ngTokenPath:fi});function Vi(e,t){return Ui(``,-200,t)}function Hi(e,t){throw new ui(-201,!1)}function Ui(e,t,n){let r=new ui(t,e);return r[Ri]=t,r[zi]=e,n&&(r[Bi]=n),r}function Wi(e){return e[Ri]}var Gi;function Ki(){return Gi}function qi(e){let t=Gi;return Gi=e,t}function Ji(e,t,n){let r=yi(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;Hi(e,``)}var Yi=globalThis,Xi={},Zi=`__NG_DI_FLAG__`,Qi=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=ta(t)||0;try{return this.injector.get(e,n&8?null:Xi,n)}catch(e){if(zn(e))return e;throw e}}};function $i(e,t=0){let n=In();if(n===void 0)throw new ui(-203,!1);if(n===null)return Ji(e,void 0,t);{let r=na(t),i=n.retrieve(e,r);if(zn(i)){if(r.optional)return null;throw i}return i}}function ea(e,t=0){return(Ki()||$i)(gi(e),t)}function S(e,t){return ea(e,ta(t))}function ta(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function na(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function ra(e){let t=[];for(let n=0;n<e.length;n++){let r=gi(e[n]);if(Array.isArray(r)){if(r.length===0)throw new ui(900,!1);let e,n=0;for(let t=0;t<r.length;t++){let i=r[t],a=ia(i);typeof a==`number`?a===-1?e=i.token:n|=a:e=i}t.push(ea(e,n))}else t.push(ea(r))}return t}function ia(e){return e[Zi]}function aa(e,t){return Object.hasOwn(e,Ai)?e[Ai]:null}function oa(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],a=t[r];if(n&&(i=n(i),a=n(a)),a!==i)return!1}return!0}function sa(e){return e.flat(1/0)}function ca(e,t){e.forEach(e=>Array.isArray(e)?ca(e,t):t(e))}function la(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function ua(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function da(e,t){let n=[];for(let r=0;r<e;r++)n.push(t);return n}function fa(e,t,n,r){let i=e.length;if(i==t)e.push(n,r);else if(i===1)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;){let t=i-2;e[i]=e[t],i--}e[t]=n,e[t+1]=r}}function pa(e,t,n){let r=ha(e,t);return r>=0?e[r|1]=n:(r=~r,fa(e,r,t,n)),r}function ma(e,t){let n=ha(e,t);if(n>=0)return e[n|1]}function ha(e,t){return ga(e,t,1)}function ga(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){let a=r+(i-r>>1),o=e[a<<n];if(t===o)return a<<n;o>t?i=a:r=a+1}return~(i<<n)}var _a={},va=[],ya=new Ti(``),ba=new Ti(``,-1),xa=new Ti(``),Sa=class{get(e,t=Xi){if(t===Xi){let e=Ui(``,-201);throw e.name=`ɵNotFound`,e}return t}};function Ca(...e){return{ɵproviders:wa(!0,e),ɵfromNgModule:!0}}function wa(e,...t){let n=[],r=new Set,i,a=e=>{n.push(e)};return ca(t,e=>{let t=e;Ea(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&Ta(i,a),n}function Ta(e,t){for(let n=0;n<e.length;n++){let{ngModule:r,providers:i}=e[n];Da(i,e=>{t(e,r)})}}function Ea(e,t,n,r){if(e=gi(e),!e)return!1;let i=null,a=Si(e),o=!a&&Ni(e);if(!a&&!o){let t=e.ngModule;if(a=Si(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)Ea(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{ca(a.imports,i=>{Ea(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&Ta(e,t)}if(!s){let e=aa(i)||(()=>new i);t({provide:i,useFactory:e,deps:va},i),t({provide:xa,useValue:i,multi:!0},i),t({provide:ya,useValue:()=>ea(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;Da(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function Da(e,t){for(let n of e)Ei(n)&&(n=n.ɵproviders),Array.isArray(n)?Da(n,t):t(n)}var Oa=fi({provide:String,useValue:fi});function ka(e){return typeof e==`object`&&!!e&&Oa in e}function Aa(e){return!!(e&&e.useExisting)}function ja(e){return!!(e&&e.useFactory)}function Ma(e){return typeof e==`function`}function Na(e){return!!e.useClass}var Pa=new Ti(``),Fa={},Ia={},La=void 0;function Ra(){return La===void 0&&(La=new Sa),La}var za=class{},Ba=class extends za{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,Xa(e,e=>this.processProvider(e)),this.records.set(ba,Ka(void 0,this)),r.has(`environment`)&&this.records.set(za,Ka(void 0,this));let i=this.records.get(Pa);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(xa,va,{self:!0}))}retrieve(e,t){let n=ta(t)||0;try{return this.get(e,Xi,n)}catch(e){if(zn(e))return e;throw e}}destroy(){Ga(this),this._destroyed=!0;let e=en(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(),en(e)}}onDestroy(e){return Ga(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Ga(this);let t=Ln(this),n=qi(void 0);try{return e()}finally{Ln(t),qi(n)}}get(e,t=Xi,n){if(Ga(this),Object.hasOwn(e,Mi))return e[Mi](this);let r=ta(n),i=Ln(this),a=qi(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=Ya(e)&&yi(e);t=n&&this.injectableDefInScope(n)?Ka(Va(e),Fa):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?Ra():this.parent;return t=r&8&&t===Xi?null:t,n.get(e,t)}catch(e){let t=Wi(e);throw t===-200||t===-201?new ui(t,null):e}finally{qi(a),Ln(i)}}resolveInjectorInitializers(){let e=en(null),t=Ln(this),n=qi(void 0);try{let e=this.get(ya,va,{self:!0});for(let t of e)t()}finally{Ln(t),qi(n),en(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=gi(e);let t=Ma(e)?e:gi(e&&e.provide),n=Ua(e);if(!Ma(e)&&e.multi===!0){let n=this.records.get(t);n||(n=Ka(void 0,Fa,!0),n.factory=()=>ra(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=en(null);try{if(t.value===Ia)throw Vi(``);return t.value===Fa&&(t.value=Ia,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&Ja(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{en(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=gi(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 Va(e){let t=yi(e),n=t===null?aa(e):t.factory;if(n!==null)return n;if(e instanceof Ti)throw new ui(-204,!1);if(e instanceof Function)return Ha(e);throw new ui(-204,!1)}function Ha(e){if(e.length>0)throw new ui(-204,!1);let t=xi(e);return t===null?()=>new e:()=>t.factory(e)}function Ua(e){return ka(e)?Ka(void 0,e.useValue):Ka(Wa(e),Fa)}function Wa(e,t,n){let r;if(Ma(e)){let t=gi(e);return aa(t)||Va(t)}if(ka(e))r=()=>gi(e.useValue);else if(ja(e))r=()=>e.useFactory(...ra(e.deps||[]));else if(Aa(e))r=(t,n)=>ea(gi(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=gi(e&&(e.useClass||e.provide));if(qa(e))r=()=>new t(...ra(e.deps));else return aa(t)||Va(t)}return r}function Ga(e){if(e.destroyed)throw new ui(-205,!1)}function Ka(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function qa(e){return!!e.deps}function Ja(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function Ya(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function Xa(e,t){for(let n of e)Array.isArray(n)?Xa(n,t):n&&Ei(n)?Xa(n.ɵproviders,t):t(n)}function Za(e,t){let n;e instanceof Ba?(Ga(e),n=e):n=new Qi(e);let r=Ln(n),i=qi(void 0);try{return t()}finally{Ln(r),qi(i)}}function Qa(){return Ki()!==void 0||In()!=null}var $a=1;function eo(e){return Array.isArray(e)&&typeof e[$a]==`object`}function to(e){return Array.isArray(e)&&e[$a]===!0}function no(e){return!!(e.flags&4)}function ro(e){return e.componentOffset>-1}function io(e){return(e.flags&1)==1}function ao(e){return!!e.template}function oo(e){return!!(e[2]&512)}function so(e){return(e[2]&256)==256}var co=(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})(co||{}),lo=`math`;function uo(e){for(;Array.isArray(e);)e=e[0];return e}function fo(e,t){return uo(t[e])}function po(e,t){return uo(t[e.index])}function mo(e,t){return e.data[t]}function ho(e,t){return e[t]}function go(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function _o(e,t){let n=t[e];return eo(n)?n:n[0]}function vo(e){return(e[2]&128)==128}function Gee(e){return to(e[3])}function yo(e,t){return t==null?null:e[t]}function bo(e){e[17]=0}function xo(e){e[2]&1024||(e[2]|=1024,vo(e)&&wo(e))}function Kee(e,t){for(;e>0;)t=t[14],e--;return t}function So(e){return!!(e[2]&9216||e[24]?.dirty)}function Co(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),So(e)&&wo(e)}function wo(e){e[10].changeDetectionScheduler?.notify(0);let t=Eo(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!vo(t)));)t=Eo(t)}function To(e,t){if(so(e))throw new ui(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function qee(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function Eo(e){let t=e[3];return to(t)?t[3]:t}function Do(e){return e[7]??=[]}function Oo(e){return e.cleanup??=[]}function Jee(e,t,n,r){let i=Do(t);i.push(n),e.firstCreatePass&&Oo(e).push(r,i.length-1)}var ko={lFrame:ts(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Ao=!1;function Yee(){return ko.lFrame.elementDepthCount}function Xee(){ko.lFrame.elementDepthCount++}function jo(){ko.lFrame.elementDepthCount--}function Mo(){return ko.bindingsEnabled}function No(){return ko.skipHydrationRootTNode!==null}function Po(e){return ko.skipHydrationRootTNode===e}function Fo(){ko.skipHydrationRootTNode=null}function Io(){return ko.lFrame.lView}function Lo(){return ko.lFrame.tView}function C(e){return ko.lFrame.contextLView=e,e[8]}function w(e){return ko.lFrame.contextLView=null,e}function Ro(){let e=zo();for(;e!==null&&e.type===64;)e=e.parent;return e}function zo(){return ko.lFrame.currentTNode}function Zee(){let e=ko.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Bo(e,t){let n=ko.lFrame;n.currentTNode=e,n.isParent=t}function Vo(){return ko.lFrame.isParent}function Ho(){ko.lFrame.isParent=!1}function Uo(){return ko.lFrame.contextLView}function Wo(){return Ao}function Go(e){let t=Ao;return Ao=e,t}function Ko(){let e=ko.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function qo(){return ko.lFrame.bindingIndex}function Qee(e){return ko.lFrame.bindingIndex=e}function Jo(){return ko.lFrame.bindingIndex++}function Yo(e){let t=ko.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function $ee(){return ko.lFrame.inI18n}function ete(e,t){let n=ko.lFrame;n.bindingIndex=n.bindingRootIndex=e,Xo(t)}function tte(){return ko.lFrame.currentDirectiveIndex}function Xo(e){ko.lFrame.currentDirectiveIndex=e}function nte(e){let t=ko.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function rte(){return ko.lFrame.currentQueryIndex}function Zo(e){ko.lFrame.currentQueryIndex=e}function ite(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function Qo(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=ite(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=ko.lFrame=es();return r.currentTNode=t,r.lView=e,!0}function $o(e){let t=es(),n=e[1];ko.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function es(){let e=ko.lFrame,t=e===null?null:e.child;return t===null?ts(e):t}function ts(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 ns(){let e=ko.lFrame;return ko.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var rs=ns;function is(){let e=ns();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 ate(e){return(ko.lFrame.contextLView=Kee(e,ko.lFrame.contextLView))[8]}function as(){return ko.lFrame.selectedIndex}function os(e){ko.lFrame.selectedIndex=e}function ss(){let e=ko.lFrame;return mo(e.tView,e.selectedIndex)}function T(){ko.lFrame.currentNamespace=`svg`}function cs(){ls()}function ls(){ko.lFrame.currentNamespace=null}function us(){return ko.lFrame.currentNamespace}var ds=!0;function fs(){return ds}function ps(e){ds=e}function ms(e,t=null,n=null,r){let i=hs(e,t,n,r);return i.resolveInjectorInitializers(),i}function hs(e,t=null,n=null,r,i=new Set){return new Ba([n||va,Ca(e)],t||Ra(),null,i)}var gs=class e{static THROW_IF_NOT_FOUND=Xi;static NULL=new Sa;static create(e,t){if(Array.isArray(e))return ms({name:``},t,e,``);{let t=e.name??``;return ms({name:t},e.parent,e.providers,t)}}static ɵprov=vi({token:e,providedIn:`any`,factory:()=>ea(ba)});static __NG_ELEMENT_ID__=-1},_s=new Ti(``),vs=class{static __NG_ELEMENT_ID__=bs;static __NG_ENV_ID__=e=>e},ys=class extends vs{_lView;constructor(e){super(),this._lView=e}get destroyed(){return so(this._lView)}onDestroy(e){let t=this._lView;return To(t,e),()=>qee(t,e)}};function bs(){return new ys(Io())}var xs=new Ti(``),Ss=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Ur(!1);debugTaskTracker=S(xs,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Mr(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=vi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Cs=class extends Vr{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,Qa()&&(this.destroyRef=S(vs,{optional:!0})??void 0,this.pendingTasks=S(Ss,{optional:!0})??void 0)}emit(e){let t=en(null);try{super.next(e)}finally{en(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 ar&&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 ws(...e){}function Ts(e){let t,n;function r(){e=ws;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 Es(e){return queueMicrotask(()=>e()),()=>{e=ws}}var Ds=`isAngularZone`,Os=`isAngularZone_ID`,ks=0,As=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Cs(!1);onMicrotaskEmpty=new Cs(!1);onStable=new Cs(!1);onError=new Cs(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new ui(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,Ps(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(Ds)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new ui(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new ui(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,js,ws,ws);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)}},js={};function Ms(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 Ns(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Ts(()=>{e.callbackScheduled=!1,Fs(e),e.isCheckStableRunning=!0,Ms(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Fs(e)}function Ps(e){let t=()=>{Ns(e)},n=ks++;e._inner=e._inner.fork({name:`angular`,properties:{[Ds]:!0,[Os]:n,[Os+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(zs(s))return n.invokeTask(i,a,o,s);try{return Is(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),Ls(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return Is(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!Bs(s)&&t(),Ls(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,Fs(e),Ms(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 Fs(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function Is(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Ls(e){e._nesting--,Ms(e)}var Rs=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Cs;onMicrotaskEmpty=new Cs;onStable=new Cs;onError=new Cs;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 zs(e){return Vs(e,`__ignore_ng_zone__`)}function Bs(e){return Vs(e,`__scheduler_tick__`)}function Vs(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Hs=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},Us=new Ti(``,{factory:()=>{let e=S(As),t=S(za),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Hs),n.handleError(r))})}}}),Ws={provide:ya,useValue:()=>{S(Hs,{optional:!0})},multi:!0};function E(e,t){let[n,r,i]=_ee(e,t?.equal),a=n;return a[$t],a.set=r,a.update=i,a.asReadonly=Gs.bind(a),a}function Gs(){let e=this[$t];if(e.readonlyFn===void 0){let t=()=>this();t[$t]=e,e.readonlyFn=t}return e.readonlyFn}var Ks=new Ti(``,{factory:()=>qs}),qs=`ng`,Js=new Ti(``),Ys=new Ti(``,{providedIn:`platform`,factory:()=>`unknown`}),Xs=new Ti(``,{factory:()=>S(_s).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),Zs=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=Qs}return e})();function Qs(){return new Zs(Io(),Ro())}var $s=class{},ec=new Ti(``,{factory:()=>!0}),tc=new Ti(``),nc=(()=>{class e{static ɵprov=vi({token:e,providedIn:`root`,factory:()=>new rc})}return e})(),rc=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}},ic=class{[$t];constructor(e){this[$t]=e}destroy(){this[$t].destroy()}};function ac(e,t){let n=t?.injector??S(gs),r=t?.manualCleanup===!0?null:n.get(vs),i,a=n.get(Zs,null,{optional:!0}),o=n.get($s);return a===null?i=uc(e,n.get(nc),o):(i=lc(a.view,o,e),r instanceof ys&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new ic(i)}var oc={...Nn,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=Go(!1);try{Pn(this)}finally{Go(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=en(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],en(e)}}},sc={...oc,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(gn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},cc={...oc,consumerMarkedDirty(){this.view[2]|=8192,wo(this.view),this.notifier.notify(13)},destroy(){if(gn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[23]?.delete(this)}};function lc(e,t,n){let r=Object.create(cc);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=dc(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function uc(e,t,n){let r=Object.create(sc);return r.fn=dc(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 dc(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}function fc(e){return typeof e==`function`&&e[$t]!==void 0}function pc(e){return fc(e)&&typeof e.set==`function`}var mc=Symbol(`InputSignalNode#UNSET`),hc={...jn,transformFn:void 0,applyValueToInputSignal(e,t){kn(e,t)}};function gc(e){return{toString:e}.toString()}var _c=(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})(_c||{}),vc=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function yc(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var bc=null,xc=(()=>{bc=Cc;let e=()=>Cc;return e.ngInherit=!0,e})();function Sc(){return bc}function Cc(e){return e.type.prototype.ngOnChanges&&(e.setInput=Tc),wc}function wc(){let e=Dc(this),t=e?.current;if(t){let n=e.previous;if(n===_a)e.previous=t;else for(let e in t)n[e]=t[e];e.current=null,this.ngOnChanges(t)}}function Tc(e,t,n,r,i){let a=this.declaredInputs[r],o=Dc(e)||Oc(e,{previous:_a,current:null}),s=o.current||={},c=o.previous,l=c[a];s[a]=new vc(l&&l.currentValue,n,c===_a),yc(e,t,i,n)}var Ec=`__ngSimpleChanges__`;function Dc(e){return Object.hasOwn(e,Ec)&&e[Ec]||null}function Oc(e,t){return e[Ec]=t}var kc=[],Ac=function(e,t=null,n){for(let r=0;r<kc.length;r++){let i=kc[r];i(e,t,n)}};function jc(e,t,n){let{ngOnChanges:r,ngOnInit:i,ngDoCheck:a}=t.type.prototype;if(r){let r=Sc()(t);(n.preOrderHooks??=[]).push(e,r),(n.preOrderCheckHooks??=[]).push(e,r)}i&&(n.preOrderHooks??=[]).push(0-e,i),a&&((n.preOrderHooks??=[]).push(e,a),(n.preOrderCheckHooks??=[]).push(e,a))}function Mc(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n<r;n++){let{ngAfterContentInit:t,ngAfterContentChecked:r,ngAfterViewInit:i,ngAfterViewChecked:a,ngOnDestroy:o}=e.data[n].type.prototype;t&&(e.contentHooks??=[]).push(-n,t),r&&((e.contentHooks??=[]).push(n,r),(e.contentCheckHooks??=[]).push(n,r)),i&&(e.viewHooks??=[]).push(-n,i),a&&((e.viewHooks??=[]).push(n,a),(e.viewCheckHooks??=[]).push(n,a)),o!=null&&(e.destroyHooks??=[]).push(n,o)}}function Nc(e,t,n){Ic(e,t,3,n)}function Pc(e,t,n,r){(e[2]&3)===n&&Ic(e,t,n,r)}function Fc(e,t){let n=e[2];(n&3)===t&&(n&=16383,n+=1,e[2]=n)}function Ic(e,t,n,r){let i=r===void 0?0:e[17]&65535,a=r??-1,o=t.length-1,s=0;for(let c=i;c<o;c++)if(typeof t[c+1]==`number`){if(s=t[c],r!=null&&s>=r)break}else t[c]<0&&(e[17]+=65536),(s<a||a==-1)&&(Rc(e,n,t,c),e[17]=(e[17]&4294901760)+c+2),c++}function Lc(e,t){Ac(_c.LifecycleHookStart,e,t);let n=en(null);try{t.call(e)}finally{en(n),Ac(_c.LifecycleHookEnd,e,t)}}function Rc(e,t,n,r){let i=n[r]<0,a=n[r+1],o=e[i?-n[r]:n[r]];i?e[2]>>14<e[17]>>16&&(e[2]&3)===t&&(e[2]+=16384,Lc(o,a)):Lc(o,a)}var zc=-1,Bc=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 Vc(e){return!!(e.flags&8)}function Hc(e){return!!(e.flags&16)}function Uc(e,t,n){let r=0;for(;r<n.length;){let i=n[r];if(typeof i==`number`){if(i!==0)break;r++;let a=n[r++],o=n[r++],s=n[r++];e.setAttribute(t,o,s,a)}else{let a=i,o=n[++r];Gc(a)?e.setProperty(t,a,o):e.setAttribute(t,a,o),r++}}return r}function Wc(e){return e===3||e===4||e===6}function Gc(e){return e.charCodeAt(0)===64}function Kc(e,t){if(t!==null&&t.length!==0){if(e===null||e.length===0)e=t.slice();else{let n=-1;for(let r=0;r<t.length;r++){let i=t[r];typeof i==`number`?n=i:n===0||(n===-1||n===2?qc(e,n,i,null,t[++r]):qc(e,n,i,null,null))}}}return e}function qc(e,t,n,r,i){let a=0,o=e.length;if(t===-1)o=-1;else for(;a<e.length;){let n=e[a++];if(typeof n==`number`){if(n===t){o=-1;break}if(n>t){o=a-1;break}}}for(;a<e.length;){let t=e[a];if(typeof t==`number`)break;if(t===n){i!==null&&(e[a+1]=i);return}a++,i!==null&&a++}o!==-1&&(e.splice(o,0,t),a=o+1),e.splice(a++,0,n),i!==null&&e.splice(a++,0,i)}function Jc(e){return e!==zc}function Yc(e){return e&32767}function Xc(e){return e>>16}function Zc(e,t){let n=Xc(e),r=t;for(;n>0;)r=r[14],n--;return r}var Qc=!0;function $c(e){let t=Qc;return Qc=e,t}var el=255,tl=5,nl=0,rl={};function il(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,ji)&&(r=n[ji]),r??=n[ji]=nl++;let i=r&el,a=1<<i;t.data[e+(i>>tl)]|=a}function al(e,t){let n=sl(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,ol(r.data,e),ol(t,null),ol(r.blueprint,null));let i=cl(e,t),a=e.injectorIndex;if(Jc(i)){let e=Yc(i),n=Zc(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 ol(e,t){e.push(0,0,0,0,0,0,0,0,t)}function sl(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function cl(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=Tl(i),r===null)return zc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return zc}function ll(e,t,n){il(e,t,n)}function ul(e,t,n){if(n&8||e!==void 0)return e;Hi(t,`NodeInjector`)}function dl(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=qi(void 0);try{return i?i.get(t,r,n&8):Ji(t,r,n&8)}finally{qi(a)}}return ul(r,t,n)}function fl(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=wl(e,t,n,r,rl);if(i!==rl)return i}let i=pl(e,t,n,r,rl);if(i!==rl)return i}return dl(t,n,r,i)}function pl(e,t,n,r,i){let a=_l(n);if(typeof a==`function`){if(!Qo(t,e,r))return r&1?ul(i,n,r):dl(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))Hi(n);else return e}finally{rs()}}else if(typeof a==`number`){let i=null,o=sl(e,t),s=zc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?cl(e,t):t[o+8],s===zc||!yl(r,!1)?o=-1:(i=t[1],o=Yc(s),t=Zc(s,t)));o!==-1;){let e=t[1];if(vl(a,o,e.data)){let e=ml(o,t,n,i,r,c);if(e!==rl)return e}s=t[o+8],s!==zc&&yl(r,t[1].data[o+8]===c)&&vl(a,o,t)?(i=e,o=Yc(s),t=Zc(s,t)):o=-1}}return i}function ml(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=hl(s,o,n,r==null?ro(s)&&Qc:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?rl:gl(t,o,c,s,i)}function hl(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<f;e++){let t=o[e];if(e<c&&n===t||e>=c&&t.type===n)return e}if(i){let e=o[c];if(e&&ao(e)&&e.type===n)return c}return null}function gl(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof Bc){let s=a;if(s.resolving)throw Vi(``);let c=$c(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?qi(s.injectImpl):null;Qo(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&jc(n,o[n],t)}finally{l!==null&&qi(l),$c(c),s.resolving=!1,rs()}}return a}function _l(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,ji)?e[ji]:void 0;return typeof t==`number`?t>=0?t&el:xl:t}function vl(e,t,n){let r=1<<e;return!!(n[t+(e>>tl)]&r)}function yl(e,t){return!(e&2)&&!(e&1&&t)}var bl=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return fl(this._tNode,this._lView,e,ta(n),t)}};function xl(){return new bl(Ro(),Io())}function Sl(e){return gc(()=>{let t=e.prototype.constructor,n=t[Ai]||Cl(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let e=i[Ai]||Cl(i);if(e&&e!==n)return e;i=Object.getPrototypeOf(i)}return e=>new e})}function Cl(e){return _i(e)?()=>{let t=Cl(gi(e));return t&&t()}:aa(e)}function wl(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!oo(o);){let e=pl(a,o,n,r|2,rl);if(e!==rl)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,rl,r);if(t!==rl)return t}t=Tl(o),o=o[14]}a=t}return i}function Tl(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}function El(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function Dl(){return Ol(Ro(),Io())}function Ol(e,t){return new kl(po(e,t))}var kl=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=Dl}return e})();function Al(e){return e instanceof kl?e.nativeElement:e}function jl(){return this._results[Symbol.iterator]()}var Ml=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 Vr}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=sa(e);(this._changesDetected=!oa(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]=jl};function Nl(e){return(e.flags&128)==128}var Pl=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Pl||{}),Fl=new Map,Il=0;function Ll(){return Il++}function Rl(e){Fl.set(e[19],e)}function zl(e){Fl.delete(e[19])}var Bl=`__ngContext__`;function Vl(e,t){eo(t)?(e[Bl]=t[19],Rl(t)):e[Bl]=t}function Hl(e){return Wl(e[12])}function Ul(e){return Wl(e[4])}function Wl(e){for(;e!==null&&!to(e);)e=e[4];return e}var Gl=void 0;function Kl(e){Gl=e}function ql(){if(Gl!==void 0)return Gl;if(typeof document<`u`)return document;throw new ui(210,!1)}var Jl=!1,Yl=new Ti(``,{factory:()=>Jl}),Xl=new WeakMap;function Zl(e,t){if(typeof e!=`object`||!e)return;let n=Xl.get(e);n||(n=new WeakSet,Xl.set(e,n)),n.add(t)}function Ql(e){return(e.flags&32)==32}var $l=()=>null;function eu(e,t,n=!1){return $l(e,t,n)}function tu(e,t){let n=e.contentQueries;if(n!==null){let r=en(null);try{for(let r=0;r<n.length;r+=2){let i=n[r],a=n[r+1];if(a!==-1){let n=e.data[a];Zo(i),n.contentQueries(2,t[a],a)}}}finally{en(r)}}}function nu(e,t,n){Zo(0);let r=en(null);try{t(e,n)}finally{en(r)}}function ru(e,t,n){if(no(t)){let r=en(null);try{let r=t.directiveStart,i=t.directiveEnd;for(let t=r;t<i;t++){let r=e.data[t];if(r.contentQueries){let e=n[t];r.contentQueries(1,e,t)}}}finally{en(r)}}}var iu=(function(e){return e[e.Emulated=0]=`Emulated`,e[e.None=2]=`None`,e[e.ShadowDom=3]=`ShadowDom`,e[e.ExperimentalIsolatedShadowDom=4]=`ExperimentalIsolatedShadowDom`,e})(iu||{}),au=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${li})`}};function ou(e){return e instanceof au?e.changingThisBreaksApplicationSecurity:e}function su(e,t){let n=cu(e);if(n!=null&&n!==t){if(n===`ResourceURL`&&t===`URL`)return!0;throw Error(`Required a safe ${t}, got a ${n} (see ${li})`)}return n===t}function cu(e){return e instanceof au&&e.getTypeName()||null}var lu=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function uu(e){return e=String(e),e.match(lu)?e:`unsafe:`+e}var du=/^>|^->|<!--|-->|--!>|<!-$/g,fu=/(<|>)/g,pu=`​$1​`;function ote(e){return e.replace(du,e=>e.replace(fu,pu))}function ste(e,t){return e.createText(t)}function cte(e,t,n){e.setValue(t,n)}function lte(e,t){return e.createComment(ote(t))}function mu(e,t,n){return e.createElement(t,n)}function hu(e,t,n,r,i){e.insertBefore(t,n,r,i)}function gu(e,t,n){e.appendChild(t,n)}function _u(e,t,n,r,i){r===null?gu(e,t,n):hu(e,t,n,r,i)}function vu(e,t,n,r){e.removeChild(null,t,n,r)}function ute(e,t,n){e.setAttribute(t,`style`,n)}function dte(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function yu(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&Uc(e,t,r),i!==null&&dte(e,t,i),a!==null&&ute(e,t,a)}function bu(e){let t=fte();return t?t.sanitize(co.URL,e)||``:su(e,`URL`)?ou(e):uu(Li(e))}function fte(){let e=Io();return e&&e[10].sanitizer}function xu(e){return e.ownerDocument.defaultView}function Su(e){return e.ownerDocument}function pte(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 Cu=`ng-template`;function mte(e,t,n,r){let i=0;if(r){for(;i<t.length&&typeof t[i]==`string`;i+=2)if(t[i]===`class`&&pte(t[i+1].toLowerCase(),n,0)!==-1)return!0}else if(wu(e))return!1;if(i=t.indexOf(1,i),i>-1){let e;for(;++i<t.length&&typeof(e=t[i])==`string`;)if(e.toLowerCase()===n)return!0}return!1}function wu(e){return e.type===4&&e.value!==Cu}function hte(e,t,n){return t===(e.type===4&&!n?Cu:e.value)}function gte(e,t,n){let r=4,i=e.attrs,a=i===null?0:yte(i),o=!1;for(let s=0;s<t.length;s++){let c=t[s];if(typeof c==`number`){if(!o&&!Tu(r)&&!Tu(c))return!1;if(o&&Tu(c))continue;o=!1,r=c|r&1;continue}if(!o){if(r&4){if(r=2|r&1,c!==``&&!hte(e,c,n)||c===``&&t.length===1){if(Tu(r))return!1;o=!0}}else if(r&8){if(i===null||!mte(e,i,c,n)){if(Tu(r))return!1;o=!0}}else{let l=t[++s],u=_te(c,i,wu(e),n);if(u===-1){if(Tu(r))return!1;o=!0;continue}if(l!==``){let e;if(e=u>a?``:i[u+1].toLowerCase(),r&2&&l!==e){if(Tu(r))return!1;o=!0}}}}}return Tu(r)||o}function Tu(e){return!(e&1)}function _te(e,t,n,r){if(t===null)return-1;let i=0;if(r||!n){let n=!1;for(;i<t.length;){let r=t[i];if(r===e)return i;if(r===3||r===6)n=!0;else if(r===1||r===2){let e=t[++i];for(;typeof e==`string`;)e=t[++i];continue}else if(r===4)break;else if(r===0){i+=4;continue}i+=n?1:2}return-1}return bte(t,e)}function Eu(e,t,n=!1){for(let r=0;r<t.length;r++)if(gte(e,t[r],n))return!0;return!1}function vte(e){let t=e.attrs;if(t!=null){let e=t.indexOf(5);if(!(e&1))return t[e+1]}return null}function yte(e){for(let t=0;t<e.length;t++){let n=e[t];if(Wc(n))return t}return e.length}function bte(e,t){let n=e.indexOf(4);if(n>-1)for(n++;n<e.length;){let r=e[n];if(typeof r==`number`)return-1;if(r===t)return n;n++}return-1}function xte(e,t){selectorListLoop:for(let n=0;n<t.length;n++){let r=t[n];if(e.length===r.length){for(let t=0;t<e.length;t++)if(e[t]!==r[t])continue selectorListLoop;return!0}}return!1}function Du(e,t){return e?`:not(`+t.trim()+`)`:t}function Ste(e){let t=e[0],n=1,r=2,i=``,a=!1;for(;n<e.length;){let o=e[n];if(typeof o==`string`){if(r&2){let t=e[++n];i+=`[`+o+(t.length>0?`="`+t+`"`:``)+`]`}else r&8?i+=`.`+o:r&4&&(i+=` `+o)}else i!==``&&!Tu(o)&&(t+=Du(a,i),i=``),r=o,a||=!Tu(r);n++}return i!==``&&(t+=Du(a,i)),t}function Cte(e){return e.map(Ste).join(`,`)}function wte(e){let t=[],n=[],r=1,i=2;for(;r<e.length;){let a=e[r];if(typeof a==`string`)i===2?a!==``&&t.push(a,e[++r]):i===8&&n.push(a);else{if(!Tu(i))break;i=a}r++}return n.length&&t.push(1,...n),t}var Ou={},ku=(function(e){return e[e.Important=1]=`Important`,e[e.DashCase=2]=`DashCase`,e})(ku||{}),Tte;function Au(e,t){return Tte(e,t)}var Ete=new Ti(``,{factory:()=>!1});function ju(e){if(!e)return 0;let t=e.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(e)*t}function Mu(e,t){return e.getPropertyValue(t).split(`,`).map(e=>e.trim())}function Dte(e){let t=Mu(e,`transition-property`),n=Mu(e,`transition-duration`),r=Mu(e,`transition-delay`),i={propertyName:``,duration:0,animationName:void 0};for(let e=0;e<t.length;e++){let a=ju(r[e])+ju(n[e]);a>i.duration&&(i.propertyName=t[e],i.duration=a)}return i}function Ote(e){let t=Mu(e,`animation-name`),n=Mu(e,`animation-delay`),r=Mu(e,`animation-duration`),i=Mu(e,`animation-iteration-count`),a={animationName:``,propertyName:void 0,duration:0};for(let e=0;e<t.length;e++){let o=ju(n[e])+ju(r[e]),s=i[e];o>a.duration&&s!==`infinite`&&(a.animationName=t[e],a.duration=o)}return a}function Nu(e,t){return e!==void 0&&e.duration>t.duration}function Pu(e){return(e.animationName!=null||e.propertyName!=null)&&e.duration>0}function Fu(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 kte(e,t){let n=getComputedStyle(e),r=Ote(n),i=Dte(n),a=r.duration>i.duration?r:i;Nu(t.get(e),a)||Pu(a)&&t.set(e,a)}function Ate(e,t,n){if(!n)return;let r=e.getAnimations();return r.length===0?kte(e,t):jte(e,t,r)}function jte(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=Fu(e)??0,n,i;e.animationName?i=e.animationName:n=e.transitionProperty,t>=r.duration&&(r={animationName:i,propertyName:n,duration:t})}Nu(t.get(e),r)||Pu(r)&&t.set(e,r)}var Iu=new Set,Mte=!1,Nte=1,Lu=typeof document<`u`&&typeof document?.documentElement?.getAnimations==`function`;function Pte(e){return e[9].get(Ete,Mte)}function Fte(e,t,n){let r=zu.get(e);if(r){for(let e of t)r.classList.push(e);for(let e of n)r.cleanupFns.push(e)}else zu.set(e,{classList:t,cleanupFns:n})}function Ru(e){let t=zu.get(e);if(t){for(let e of t.cleanupFns)e();zu.delete(e)}Bu.delete(e)}var zu=new WeakMap,Bu=new WeakMap,Vu=new WeakMap;function Hu(e){return e?e[14]??e:null}var Uu=new WeakSet;function Ite(e,t,n){let r=Vu.get(e);if(!r||r.length===0)return;let i=t.parentNode,a=t.previousSibling,o=Hu(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),Uu.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 Lte(e,t,n){let r=Hu(n),i=Vu.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):Vu.set(e,[{el:t,declarationView:r}])}function Wu(e){let t=e[26]??={};return t.enter??=new Map}function Rte(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 Gu(e){return e.composedPath?e.composedPath()[0]:e.target}function Ku(e,t){let n=Bu.get(t);if(n===void 0)return!0;if(t!==Gu(e))return!1;let r=e.animation;if(r){let e=Fu(r);if(e!==void 0&&e+Nte<n.duration)return!1}return n.animationName===void 0?n.propertyName===void 0?!1:n.propertyName===`all`||e.propertyName===n.propertyName:e.animationName===n.animationName}function zte(e,t,n){let r=e.get(t.index)??{animateFns:[]};r.animateFns.push(n),e.set(t.index,r)}var qu=(function(e){return e[e.CHANGE_DETECTION=0]=`CHANGE_DETECTION`,e[e.AFTER_NEXT_RENDER=1]=`AFTER_NEXT_RENDER`,e})(qu||{}),Ju=new Ti(``),Yu=new Set;function Xu(e){Yu.has(e)||(Yu.add(e),performance?.mark?.(`mark_feature_usage`,{detail:{feature:e}}))}var Zu=(()=>{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=vi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Qu=[0,1,2,3],$u=(()=>{class e{ngZone=S(As);scheduler=S($s);errorHandler=S(Hs,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){S(Ju,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Ac(_c.AfterRenderHooksStart),this.executing=!0;for(let e of Qu)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&&Ac(_c.AfterRenderHooksEnd)}register(e){let{view:t}=e;t===void 0?this.executing?this.deferredRegistrations.add(e):this.addSequence(e):((t[25]??=[]).push(e),wo(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(qu.AFTER_NEXT_RENDER,e):e()}static ɵprov=vi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),ed=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 td(e,t){let n=t?.injector??S(gs);return Xu(`NgAfterNextRender`),Vte(e,n,t,!0)}function Bte(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function Vte(e,t,n,r){let i=t.get(Zu);i.impl??=t.get($u);let a=t.get(Ju,null,{optional:!0}),o=n?.manualCleanup===!0?null:t.get(vs),s=t.get(Zs,null,{optional:!0}),c=new ed(i.impl,Bte(e),s?.view,r,o,a?.snapshot(null));return i.impl.register(c),c}var nd=new Ti(``,{factory:()=>{let e=S(za),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function rd(e,t,n){let r=e.get(nd);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 Hte(e,t){let n=e.get(nd);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Ute(e,t){let n=e.get(nd);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function Wte(e){let t=e.get(nd);t.isScheduled||=(td(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:t.injector}),!0)}function Gte(e){let t=e.get(nd);t.scheduler=Wte,t.scheduler(e)}function id(e,t){for(let[n,r]of t)rd(e,r.animateFns)}function ad(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&id(r,i)}function od(e,t,n,r){try{n.get(ba)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&Hte(n,i.enter.get(t.index).animateFns);let a=Kte(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];sd(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&Iu.add(e[19]),rd(n,()=>qte(e,t,i||void 0,a,r),i||void 0)}function Kte(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 qte(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&&sd(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),Yte(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&Iu.delete(e[19]),i(!0)})}else e&&Iu.delete(e[19]),i(!1)}function sd(e,t,n){if(t.type&12){let r=e[t.index];if(to(r))for(let e=10;e<r.length;e++){let t=r[e];t[1].type===2&&Jte(t,n)}}let r=t.child;for(;r;)sd(e,r,n),r=r.next}function Jte(e,t){let n=e[26];if(n&&n.leave)for(let e of n.leave.values())for(let n of e.animateFns){let{promise:e}=n();t.push(e)}let r=e[1].firstChild;for(;r;)sd(e,r,t),r=r.next}function Yte(e,t,n){t.then(()=>{e[26]?.running===t&&(e[26].running=void 0,Iu.delete(e[19])),n(!0)})}function cd(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;to(i)?c=i:eo(i)&&(l=!0,i=i[0]);let u=uo(i);e===0&&r!==null?(ad(s,r,a,n),o==null?gu(t,r,u):hu(t,r,u,o||null,!0)):e===1&&r!==null?(ad(s,r,a,n),hu(t,r,u,o||null,!0),Ite(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&Lte(a,u,s),Uu.delete(u),od(s,a,n,e=>{if(Uu.has(u)){Uu.delete(u);return}vu(t,u,l,e)})):e===3&&(Uu.delete(u),od(s,a,n,()=>{t.destroyNode(u)})),c!=null&&wd(t,e,n,c,a,r,o)}}function Xte(e,t){ld(e,t),t[0]=null,t[5]=null}function Zte(e,t,n,r,i,a){r[0]=i,r[5]=t,bd(e,r,n,1,i,a)}function ld(e,t){t[10].changeDetectionScheduler?.notify(9),bd(e,t,t[11],2,null,null)}function Qte(e){let t=e[12];if(!t)return fd(e[1],e);for(;t;){let n=null;if(eo(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)eo(t)&&fd(t[1],t),t=t[3];t===null&&(t=e),eo(t)&&fd(t[1],t),n=t&&t[4]}t=n}}function ud(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function dd(e,t){if(so(t))return;let n=t[11];n.destroyNode&&bd(e,t,n,3,null,null),Qte(t)}function fd(e,t){if(so(t))return;let n=en(null);try{t[2]&=-129,t[2]|=256,t[24]&&gn(t[24]),ene(e,t),$te(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&to(t[3])){n!==t[3]&&ud(n,t);let r=t[18];r!==null&&r.detachView(e)}zl(t)}finally{en(n)}}function $te(e,t){let n=e.cleanup,r=t[7];if(n!==null)for(let e=0;e<n.length-1;e+=2)if(typeof n[e]==`string`){let t=n[e+3];t>=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;e<i.length;e++){let t=i[e];t()}}let a=t[23];if(a!==null){t[23]=null;for(let e of a)e.destroy()}}function ene(e,t){let n;if(e!=null&&(n=e.destroyHooks)!=null)for(let e=0;e<n.length;e+=2){let r=t[n[e]];if(!(r instanceof Bc)){let t=n[e+1];if(Array.isArray(t))for(let e=0;e<t.length;e+=2){let n=r[t[e]],i=t[e+1];Ac(_c.LifecycleHookStart,n,i);try{i.call(n)}finally{Ac(_c.LifecycleHookEnd,n,i)}}else{Ac(_c.LifecycleHookStart,r,t);try{t.call(r)}finally{Ac(_c.LifecycleHookEnd,r,t)}}}}}function pd(e,t,n){if(t===null)throw new ui(510,!1);return tne(e,t.parent,n)}function tne(e,t,n){let r=t;for(;r!==null&&r.type&168;)t=r,r=t.parent;if(r===null)return n[0];if(ro(r)){let{encapsulation:t}=e.data[r.directiveStart+r.componentOffset];if(t===iu.None||t===iu.Emulated)return null}return po(r,n)}function md(e,t,n){return rne(e,t,n)}function nne(e,t,n){return e.type&40?po(e,n):null}var rne=nne;function hd(e,t,n,r){let i=pd(e,r,t),a=t[11],o=md(r.parent||t[5],r,t);if(i!=null){if(Array.isArray(n))for(let e=0;e<n.length;e++)_u(a,i,n[e],o,!1);else _u(a,i,n,o,!1)}}function gd(e,t){if(t!==null){let n=t.type;if(n&3)return po(t,e);if(n&4)return vd(-1,e[t.index]);if(n&8){let n=t.child;if(n!==null)return gd(e,n);{let n=e[t.index];return to(n)?vd(-1,n):uo(n)}}if(n&128)return gd(e,t.next);if(n&32)return Au(t,e)()||uo(e[t.index]);{let n=_d(e,t);return n===null?gd(e,t.next):Array.isArray(n)?n[0]:gd(Eo(e[15]),n)}}return null}function _d(e,t){if(t!==null){let n=e[15][5],r=t.projection;return n.projection[r]}return null}function vd(e,t){let n=10+e+1;if(n<t.length){let e=t[n],r=e[1].firstChild;if(r!==null)return gd(e,r)}return t[7]}function yd(e,t,n,r,i,a,o){for(;n!=null;){let s=r[9];if(n.type===128){n=n.next;continue}let c=r[n.index],l=n.type;if(o&&t===0&&(c&&Vl(uo(c),r),n.flags|=2),!Ql(n)){if(l&8)yd(e,t,n.child,r,i,a,!1),cd(t,e,s,i,c,n,a,r);else if(l&32){let o=Au(n,r),l;for(;l=o();)cd(t,e,s,i,l,n,a,r);cd(t,e,s,i,c,n,a,r)}else l&16?Cd(e,t,r,n,i,a):cd(t,e,s,i,c,n,a,r)}n=o?n.projectionNext:n.next}}function bd(e,t,n,r,i,a){e.type===3?xd(n,r,t,i,a):yd(n,r,e.firstChild,t,i,a,!1)}function xd(e,t,n,r,i){let a=n[1].firstChild,o=a.next,s=uo(n[a.index]),c=uo(n[o.index]),l=o.index+1,u=n[l];if(t===1||t===0)r!==null&&(u&&u.hasChildNodes()?hu(e,r,u,i,!0):(hu(e,r,s,i,!0),hu(e,r,c,i,!0)));else if(t===2){if(u||(u=document.createDocumentFragment(),n[l]=u),s&&s.parentNode===u)return;let e=s;for(;e!==null;){let t=e.nextSibling;if(u.appendChild(e),e===c)break;e=t}}}function Sd(e,t,n){let r=t[11];Cd(r,0,t,n,pd(e,n,t),md(n.parent||t[5],n,t))}function Cd(e,t,n,r,i,a){let o=n[15],s=o[5].projection[r.projection];if(Array.isArray(s))for(let o=0;o<s.length;o++){let c=s[o];cd(t,e,n[9],i,c,r,a,n)}else{let n=s,c=o[3];Nl(r)&&(n.flags|=128),yd(e,t,n,c,i,a,!0)}}function wd(e,t,n,r,i,a,o){let s=r[7];if(s!==uo(r)&&cd(t,e,n,a,s,i,o),!(r[2]&4))for(let n=10;n<r.length;n++){let i=r[n];bd(i[1],i,e,t,a,s)}}function Td(e,t,n,r,i){if(t)i?e.addClass(n,r):e.removeClass(n,r);else{let t=r.indexOf(`-`)===-1?void 0:ku.DashCase;i==null?e.removeStyle(n,r,t):(typeof i==`string`&&i.endsWith(`!important`)&&(i=i.slice(0,-10),t|=ku.Important),e.setStyle(n,r,i,t))}}function Ed(e,t,n,r,i,a,o,s,c,l,u){let d=27+r,f=d+i,p=Dd(d,f),m=typeof l==`function`?l():l;return p[1]={type:e,blueprint:p,template:n,queries:null,viewQuery:s,declTNode:t,data:p.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:f,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof a==`function`?a():a,pipeRegistry:typeof o==`function`?o():o,firstChild:null,schemas:c,consts:m,incompleteFirstPass:!1,ssrId:u}}function Dd(e,t){let n=[];for(let r=0;r<t;r++)n.push(r<e?null:Ou);return n}function Od(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=Ed(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function kd(e,t,n,r,i,a,o,s,c,l,u){let d=t.blueprint.slice();return d[0]=i,d[2]=r|1228,(l!==null||e&&e[2]&2048)&&(d[2]|=2048),bo(d),d[3]=d[14]=e,d[8]=n,d[10]=o||e&&e[10],d[11]=s||e&&e[11],d[9]=c||e&&e[9]||null,d[5]=a,d[19]=Ll(),d[6]=u,d[20]=l,d[15]=t.type==2?e[15]:d,d}function Ad(e,t,n){let r=po(t,e),i=Od(n),a=e[10].rendererFactory,o=Nd(e,kd(e,i,null,jd(n),r,t,null,a.createRenderer(r,n),null,null,null));return e[t.index]=o}function jd(e){let t=16;return e.signals?t=4096:e.onPush&&(t=64),t}function Md(e,t,n,r){if(n===0)return-1;let i=t.length;for(let i=0;i<n;i++)t.push(r),e.blueprint.push(r),e.data.push(null);return i}function Nd(e,t){return e[12]?e[13][4]=t:e[12]=t,e[13]=t,t}function D(e=1){Pd(Lo(),Io(),as()+e,!1)}function Pd(e,t,n,r){if(!r){if((t[2]&3)==3){let r=e.preOrderCheckHooks;r!==null&&Nc(t,r,n)}else{let r=e.preOrderHooks;r!==null&&Pc(t,r,0,n)}}os(n)}var Fd=(function(e){return e[e.None=0]=`None`,e[e.SignalBased=1]=`SignalBased`,e[e.HasDecoratorInputTransform=2]=`HasDecoratorInputTransform`,e})(Fd||{});function Id(e,t,n,r){let i=en(null);try{let[i,a,o]=e.inputs[n],s=null;(a&Fd.SignalBased)!==0&&(s=t[i][$t]),s!==null&&s.transformFn!==void 0?r=s.transformFn(r):o!==null&&(r=o.call(t,r)),e.setInput===null?yc(t,s,i,r):e.setInput(t,s,r,n,i)}finally{en(i)}}function Ld(e,t,n,r,i){let a=as(),o=r&2;try{os(-1),o&&t.length>27&&Pd(e,t,27,!1),Ac(o?_c.TemplateUpdateStart:_c.TemplateCreateStart,i,n),n(r,i)}finally{os(a),Ac(o?_c.TemplateUpdateEnd:_c.TemplateCreateEnd,i,n)}}function Rd(e,t,n){Gd(e,t,n),(n.flags&64)==64&&Kd(e,t,n)}function zd(e,t,n=po){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a<r.length;a+=2){let o=r[a+1],s=o===-1?n(t,e):e[o];e[i++]=s}}}function Bd(e,t,n,r){let i=r.get(Yl,Jl)||n===iu.ShadowDom||n===iu.ExperimentalIsolatedShadowDom;return e.selectRootElement(t,i)}function Vd(e){return e===`class`?`className`:e===`for`?`htmlFor`:e===`formaction`?`formAction`:e===`innerHtml`?`innerHTML`:e===`readonly`?`readOnly`:e===`tabindex`?`tabIndex`:e}function Hd(e,t,n,r,i,a){let o=t[1];if(tf(e,o,t,n,r)){ro(e)&&Wd(t,e.index);return}e.type&3&&(n=Vd(n)),Ud(e,t,n,r,i,a)}function Ud(e,t,n,r,i,a){if(e.type&3){let o=po(e,t);r=a==null?r:a(r,e.value||``,n),i.setProperty(o,n,r)}else e.type&12}function Wd(e,t){let n=_o(t,e);n[2]&16||(n[2]|=64)}function Gd(e,t,n){let r=n.directiveStart,i=n.directiveEnd;ro(n)&&Ad(t,n,e.data[r+n.componentOffset]),e.firstCreatePass||al(n,t);let a=n.initialInputs;for(let o=r;o<i;o++){let i=e.data[o],s=gl(t,e,o,n);if(Vl(s,t),a!==null&&Zd(t,o-r,s,i,n,a),ao(i)){let r=_o(n.index,t);r[8]=gl(t,e,o,n)}}}function Kd(e,t,n){let r=n.directiveStart,i=n.directiveEnd,a=n.index,o=tte();try{os(a);for(let n=r;n<i;n++){let r=e.data[n],i=t[n];Xo(n),(r.hostBindings!==null||r.hostVars!==0||r.hostAttrs!==null)&&qd(r,i)}}finally{os(-1),Xo(o)}}function qd(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function Jd(e,t){let n=e.directiveRegistry,r=null;if(n)for(let e=0;e<n.length;e++){let i=n[e];Eu(t,i.selectors,!1)&&(r??=[],ao(i)?r.unshift(i):r.push(i))}return r}function Yd(e,t,n,r,i,a){let o=po(e,t);Xd(t[11],o,a,e.value,n,r,i)}function Xd(e,t,n,r,i,a,o){if(a==null)o?.(a,r||``,i),e.removeAttribute(t,i,n);else{let s=o==null?Li(a):o(a,r||``,i);e.setAttribute(t,i,s,n)}}function Zd(e,t,n,r,i,a){let o=a[t];if(o!==null)for(let e=0;e<o.length;e+=2){let t=o[e],i=o[e+1];Id(r,n,t,i)}}function Qd(e,t,n,r,i){let a=27+n,o=t[1],s=i(o,t,e,r,n);t[a]=s,Bo(e,!0);let c=e.type===2;return c?(yu(t[11],s,e),(Yee()===0||io(e))&&Vl(s,t),Xee()):Vl(s,t),fs()&&(!c||!Ql(e))&&hd(o,t,s,e),e}function $d(e){let t=e;return Vo()?Ho():(t=t.parent,Bo(t,!1)),t}function ef(e,t){let n=e[9];if(!n)return;let r;try{r=n.get(Us,null)}catch{r=null}r?.(t)}function tf(e,t,n,r,i){let a=e.inputs?.[r],o=e.hostDirectiveInputs?.[r],s=!1;if(o)for(let e=0;e<o.length;e+=2){let r=o[e],a=o[e+1],c=t.data[r];Id(c,n[r],a,i),s=!0}if(a)for(let e of a){let a=n[e],o=t.data[e];Id(o,a,r,i),s=!0}return s}function nf(e,t,n,r,i,a){let o=null,s=null,c=null,l=!1,u=e.directiveToIndex.get(r.type);if(typeof u==`number`?o=u:[o,s,c]=u,s!==null&&c!==null&&e.hostDirectiveInputs&&Object.hasOwn(e.hostDirectiveInputs,i)){let r=e.hostDirectiveInputs[i];for(let e=0;e<r.length;e+=2){let i=r[e];if(i>=s&&i<=c){let o=t.data[i],s=r[e+1];Id(o,n[i],s,a),l=!0}else if(i>c)break}}return o!==null&&Object.hasOwn(r.inputs,i)&&(Id(r,n[o],i,a),l=!0),l}function rf(e,t){let n=_o(t,e),r=n[1];af(r,n);let i=n[0];i!==null&&n[6]===null&&(n[6]=eu(i,n[9])),Ac(_c.ComponentStart);try{of(r,n,n[8])}finally{Ac(_c.ComponentEnd,n[8])}}function af(e,t){for(let n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}function of(e,t,n){$o(t);try{let r=e.viewQuery;r!==null&&nu(1,r,n);let i=e.template;i!==null&&Ld(e,t,i,1,n),e.firstCreatePass&&=!1,t[18]?.finishViewCreation(e),e.staticContentQueries&&tu(e,t),e.staticViewQueries&&nu(2,e.viewQuery,n);let a=e.components;a!==null&&sf(t,a)}catch(t){throw e.firstCreatePass&&=(e.incompleteFirstPass=!0,!1),t}finally{t[2]&=-5,is()}}function sf(e,t){for(let n=0;n<t.length;n++)rf(e,t[n])}function cf(e,t,n,r){let i=en(null);try{let i=t.tView,a=kd(e,i,n,e[2]&4096?4096:16,null,t,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null);a[16]=e[t.index];let o=e[18];return o!==null&&(a[18]=o.createEmbeddedView(i)),of(i,a,n),a}finally{en(i)}}function lf(e,t){return!t||t.firstChild===null||Nl(e)}function uf(e,t,n,r,i=!1){if(e.type===3){let n=e.firstChild,i=n.next,a=uo(t[n.index]),o=uo(t[i.index]),s=a;for(;s!==null&&(r.push(s),s!==o);)s=s.nextSibling;return r}for(;n!==null;){if(n.type===128){n=i?n.projectionNext:n.next;continue}let a=t[n.index];if(a!==null){if(to(a)){let e=a[7];e!==a[0]&&r.push(uo(a)),a[2]&4||df(a,r),r.push(e)}else r.push(uo(a))}let o=n.type;if(o&8)uf(e,t,n.child,r);else if(o&32){let e=Au(n,t),i;for(;i=e();)r.push(i)}else if(o&16){let e=_d(t,n);if(Array.isArray(e))r.push(...e);else{let n=Eo(t[15]);uf(n[1],n,e,r,!0)}}n=i?n.projectionNext:n.next}return r}function df(e,t){for(let n=10;n<e.length;n++){let r=e[n],i=r[1].firstChild;i!==null&&uf(r[1],r,i,t)}}function ff(e){if(e[25]!==null){for(let t of e[25])t.impl.addSequence(t);e[25].length=0}}var pf=[];function mf(e){return e[24]??hf(e)}function hf(e){let t=pf.pop()??Object.create(_f);return t.lView=e,t}function gf(e){e.lView[24]!==e&&(e.lView=null,pf.push(e))}var _f={...nn,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{wo(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function vf(e){let t=e[24]??Object.create(yf);return t.lView=e,t}var yf={...nn,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=Eo(e.lView);for(;t&&!bf(t[1]);)t=Eo(t);t&&xo(t)},consumerOnSignalRead(){this.lView[24]=this}};function bf(e){return e.type!==2}function xf(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 Sf=100;function Cf(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{wf(e,t)}finally{n.end?.()}}function wf(e,t){let n=Wo();try{Go(!0),Af(e,t);let n=0;for(;So(e);){if(n===Sf)throw new ui(103,!1);n++,Af(e,1)}}finally{Go(n)}}function Tf(e,t,n,r){if(so(t))return;let i=t[2];$o(t);let a=!0,o=null,s=null;bf(e)?(s=mf(t),o=dn(s)):tn()===null?(a=!1,s=vf(t),o=dn(s)):t[24]&&=(gn(t[24]),null);try{bo(t),Qee(e.bindingStartIndex),n!==null&&Ld(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&Nc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&Pc(t,n,0,null),Fc(t,0)}if(Df(t),xf(t),Ef(t,0),e.contentQueries!==null&&tu(e,t),a){let n=e.contentCheckHooks;n!==null&&Nc(t,n)}else{let n=e.contentHooks;n!==null&&Pc(t,n,1),Fc(t,1)}Mf(e,t);let o=e.components;o!==null&&jf(t,o,0);let s=e.viewQuery;if(s!==null&&nu(2,s,r),a){let n=e.viewCheckHooks;n!==null&&Nc(t,n)}else{let n=e.viewHooks;n!==null&&Pc(t,n,2),Fc(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}ff(t),t[2]&=-73}catch(e){throw wo(t),e}finally{s!==null&&(pn(s,o),a&&gf(s)),is()}}function Ef(e,t){for(let n=Hl(e);n!==null;n=Ul(n))for(let e=10;e<n.length;e++){let r=n[e];kf(r,t)}}function Df(e){for(let t=Hl(e);t!==null;t=Ul(t)){if(!(t[2]&2))continue;let e=t[9];for(let t=0;t<e.length;t++){let n=e[t];xo(n)}}}function Of(e,t,n){Ac(_c.ComponentStart);let r=_o(t,e);try{kf(r,n)}finally{Ac(_c.ComponentEnd,r[8])}}function kf(e,t){vo(e)&&Af(e,t)}function Af(e,t){let n=e[1],r=e[2],i=e[24],a=!!(t===0&&r&16);if(a||=!!(r&64&&t===0),a||=!!(r&1024),a||=!!(i?.dirty&&hn(i)),a||=!1,i&&(i.dirty=!1),e[2]&=-9217,a)Tf(n,e,n.template,e[8]);else if(r&8192){let t=en(null);try{xf(e),Ef(e,1);let t=n.components;t!==null&&jf(e,t,1),ff(e)}finally{en(t)}}}function jf(e,t,n){for(let r=0;r<t.length;r++)Of(e,t[r],n)}function Mf(e,t){let n=e.hostBindingOpCodes;if(n!==null)try{for(let e=0;e<n.length;e++){let r=n[e];if(r<0)os(~r);else{let i=r,a=n[++e],o=n[++e];ete(a,i);let s=t[i];Ac(_c.HostBindingsUpdateStart,s);try{o(2,s)}finally{Ac(_c.HostBindingsUpdateEnd,s)}}}}finally{os(-1)}}function Nf(e,t){let n=Wo()?64:1088;for(e[10].changeDetectionScheduler?.notify(t);e;){e[2]|=n;let t=Eo(e);if(oo(e)&&!t)return e;e=t}return null}function Pf(e,t,n,r){return[e,!0,0,t,null,r,null,n,null,null]}function Ff(e,t){let n=10+t;if(n<e.length)return e[n]}function If(e,t,n,r=!0){let i=t[1];if(zf(i,t,e,n),r){let r=vd(n,e),a=t[11],o=a.parentNode(e[7]);o!==null&&Zte(i,e[5],a,t,o,r)}let a=t[6];a!==null&&a.firstChild!==null&&(a.firstChild=null)}function Lf(e,t){let n=Rf(e,t);return n!==void 0&&dd(n[1],n),n}function Rf(e,t){if(e.length<=10)return;let n=10+t,r=e[n];if(r){let i=r[16];i!==null&&i!==e&&ud(i,r),t>0&&(e[n-1][4]=r[4]);let a=ua(e,10+t);Xte(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 zf(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r<a-10?(t[4]=n[i],la(n,10+r,t)):(n.push(t),t[4]=null),t[3]=n;let o=t[16];o!==null&&n!==o&&Bf(o,t);let s=t[18];s!==null&&s.insertView(e),Co(t),t[2]|=128}function Bf(e,t){let n=e[9],r=t[3];if(eo(r))e[2]|=2;else{let n=r[3][15];t[15]!==n&&(e[2]|=2)}n===null?e[9]=[t]:n.push(t)}var Vf=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let e=this._lView,t=e[1];return uf(t,e,t.firstChild,[])}constructor(e,t){this._lView=e,this._cdRefInjectingView=t}get context(){return this._lView[8]}set context(e){this._lView[8]=e}get destroyed(){return so(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[3];if(to(e)){let t=e[8],n=t?t.indexOf(this):-1;n>-1&&(Rf(e,n),ua(t,n))}this._attachedToViewContainer=!1}dd(this._lView[1],this._lView)}onDestroy(e){To(this._lView,e)}markForCheck(){Nf(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){Co(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,Cf(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new ui(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=oo(this._lView),t=this._lView[16];t!==null&&!e&&ud(t,this._lView),ld(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new ui(902,!1);this._appRef=e;let t=oo(this._lView),n=this._lView[16];n!==null&&!t&&Bf(n,this._lView),Co(this._lView)}},Hf=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=Uf;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 Vf(cf(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n}))}}return e})();function Uf(){return Wf(Ro(),Io())}function Wf(e,t){return e.type&4?new Hf(t,e,Ol(e,t)):null}function Gf(e,t,n,r,i){let a=e.data[t];if(a===null)a=Kf(e,t,n,r,i),$ee()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Zee();a.injectorIndex=e===null?-1:e.injectorIndex}return Bo(a,!0),a}function Kf(e,t,n,r,i){let a=zo(),o=Vo(),s=o?a:a&&a.parent,c=e.data[t]=Jf(e,s,n,t,r,i);return qf(e,c,a,o),c}function qf(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 Jf(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return No()&&(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:us(),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 Yf(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?Xf(e,n):r.push(e);e[6]=r}function Xf(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;n<i;){let e=r.nextSibling;vu(t,r,!1),r=e,n++}}}var Zf=()=>null,Qf=()=>null;function $f(e,t){return Zf(e,t)}function ep(e,t,n){return Qf(e,t,n)}var tp=class{},np=class{},rp=class{destroyNode=null;static __NG_ELEMENT_ID__=()=>ip()};function ip(){let e=Io(),t=_o(Ro().index,e);return(eo(t)?t:e)[11]}var ap=(()=>{class e{static ɵprov=vi({token:e,providedIn:`root`,factory:()=>null})}return e})();function op(e){return e.debugInfo?.className||e.type.name||null}var sp={},cp=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,sp,n);return r!==sp||t===sp?r:this.parentInjector.get(e,t,n)}};function lp(e,t,n){return e[t]=n}function up(e,t){return e[t]}function dp(e,t,n){if(n===Ou)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function fp(e,t,n,r){let i=dp(e,t,n);return dp(e,t+1,r)||i}function pp(e,t,n,r,i){let a=fp(e,t,n,r);return dp(e,t+2,i)||a}function mp(e,t,n,r,i,a){let o=fp(e,t,n,r);return fp(e,t+2,i,a)||o}function hp(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&Zl(i,a),Nf(ro(e)?_o(e.index,t):t,5);let o=t[8],s=gp(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=gp(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function gp(e,t,n,r){let i=en(null);try{return Ac(_c.OutputStart,t,n),n(r)!==!1}catch(t){return ef(e,t),!1}finally{Ac(_c.OutputEnd,t,n),en(i)}}function _p(e,t,n,r,i,a,o,s){let c=io(e),l=!1,u=null;if(!r&&c&&(u=yp(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=po(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);vp(a)||bp(r?t=>r(uo(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function vp(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function yp(e,t,n,r){let i=e.cleanup;if(i!=null)for(let e=0;e<i.length-1;e+=2){let a=i[e];if(a===n&&i[e+1]===r){let n=t[7],r=i[e+2];return n&&n.length>r?n[r]:null}typeof a==`string`&&(e+=2)}return null}function bp(e,t,n,r,i,a,o){let s=t.firstCreatePass?Oo(t):null,c=Do(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function xp(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<n.length;a+=2){let l=n[a];if(l>=o&&l<=s)c=!0,Sp(e,t,l,n[a+1],r,i);else if(l>s)break}}return Object.hasOwn(n.outputs,r)&&(c=!0,Sp(e,t,a,r,r,i)),c}function Sp(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 Cp(){wp()}function wp(){let e=Io(),t=Lo(),n=Ro();if(t.firstCreatePass&&Ap(t,n),n.controlDirectiveIndex===-1)return;Xu(`NgSignalForms`);let r=e[n.controlDirectiveIndex];t.data[n.controlDirectiveIndex].controlDef.create(r,new Dp(e,t,n))}function Tp(){Ep()}function Ep(){let e=Io(),t=Lo(),n=ss();if(n.controlDirectiveIndex===-1)return;let r=t.data[n.controlDirectiveIndex].controlDef,i=e[n.controlDirectiveIndex];r.update(i,new Dp(e,t,n))}var Dp=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 po(this.tNode,this.lView)}get descriptor(){return`<${this.tNode.value}>`}listenToCustomControlOutput(e,t){let n=this.tView.data[this.tNode.customControlIndex];xp(this.tNode,this.lView,n,e,hp(this.tNode,this.lView,t))}listenToCustomControlModel(e){let t=this.tNode.flags&1024?`valueChange`:`checkedChange`,n=this.tView.data[this.tNode.customControlIndex];xp(this.tNode,this.lView,n,t,hp(this.tNode,this.lView,e))}listenToDom(e,t){_p(this.tNode,this.tView,this.lView,void 0,this.lView[11],e,t,hp(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(kp(r,o,e)))&&(Id(o,r,e,t),a=!0)}if(i)for(let r=0;r<i.length;r+=2){let o=i[r];if(o===this.tNode.controlDirectiveIndex)continue;let s=this.lView[o],c=i[r+1],l=this.tView.data[o];(!n||n(kp(s,l,e)))&&(Id(l,s,c,t),a=!0)}return a}setCustomControlModelInput(e){let t=this.tView.data[this.tNode.customControlIndex],n=this.tNode.flags&1024?`value`:`checked`;nf(this.tNode,this.tView,this.lView,t,n,e)}customControlHasInput(e){if(this.tNode.customControlIndex===-1)return!1;let t=this.tView.data[this.tNode.customControlIndex];return(t.signalFormsInputPresence??=this._buildCustomControlInputCache(t))[e]===!0}_buildCustomControlInputCache(e){let t={};for(let n in e.inputs)t[n]=!0;if(e.hostDirectives!==null){let n=[...e.hostDirectives];for(;n.length>0;){let e=n.shift();if(typeof e!=`function`){for(let n in e.inputs)t[e.inputs[n]]=!0;let r=Op(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;e<r.inputs.length;e+=2){let n=r.inputs[e+1]||r.inputs[e];t[n]=!0}let e=Op(r.directive);e!==null&&n.push(...e)}}}return t}};function Op(e){return typeof e==`function`&&`ɵdir`in e?e.ɵdir.hostDirectives??null:null}function kp(e,t,n){if(!t.inputs||!Object.hasOwn(t.inputs,n))return;let[r,i]=t.inputs[n];if((i&Fd.SignalBased)!==0){let t=e[r][$t];return t.value===mc?void 0:t.value}return e[r]}function Ap(e,t,n){for(let n=t.directiveStart;n<t.directiveEnd;n++)if(e.data[n].controlDef){t.controlDirectiveIndex=n;break}if(t.controlDirectiveIndex===-1)return;let r=e.data[t.controlDirectiveIndex].controlDef;if(r.passThroughInput&&(t.inputs?.[r.passThroughInput]?.length??0)>1){t.flags|=4096;return}jp(e,t)}function jp(e,t){for(let n=t.directiveStart;n<t.directiveEnd;n++){let r=e.data[n];if(!t.directiveToIndex||t.directiveToIndex.has(r.type)){if(Mp(r,`value`)){t.flags|=1024,t.customControlIndex=n;return}if(Mp(r,`checked`)){t.flags|=2048,t.customControlIndex=n;return}}}if(t.hostDirectiveInputs!==null&&t.hostDirectiveOutputs!==null&&t.directiveToIndex!==null){let e=(e,n)=>{let r=t.hostDirectiveInputs[e],i=t.hostDirectiveOutputs[e+`Change`];if(!r||!i)return!1;for(let e=0;e<r.length;e+=2){let a=r[e];for(let e=0;e<i.length;e+=2)if(a===i[e])for(let e of t.directiveToIndex.values()){if(!Array.isArray(e))continue;let[r,i,o]=e;if(a>=i&&a<=o)return t.flags|=n,t.customControlIndex=r,!0}}return!1};if(e(`value`,1024)||e(`checked`,2048))return}}function Mp(e,t){return Np(e,t)&&Pp(e,t+`Change`)}function Np(e,t){return t in e.inputs}function Pp(e,t){return t in e.outputs}var Fp=Symbol(`BINDING`),Ip=new Ti(``);function Lp(e,t,n){let r=n?e.styles:null,i=n?e.classes:null,a=0;if(t!==null)for(let e=0;e<t.length;e++){let n=t[e];if(typeof n==`number`)a=n;else if(a==1)i=mi(i,n);else if(a==2){let i=n,a=t[++e];r=mi(r,i+`: `+a+`;`)}}n?e.styles=r:e.stylesWithoutHost=r,n?e.classes=i:e.classesWithoutHost=i}function Rp(e,t=0){let n=Io();return n===null?ea(e,t):fl(Ro(),n,gi(e),t)}function zp(e,t,n,r,i){let a=r===null?null:{"":-1},o=i(e,n);if(o!==null){let r=o,i=null,s=null;for(let e of o)if(e.resolveHostDirectives!==null){[r,i,s]=e.resolveHostDirectives(o);break}Hp(e,t,n,r,a,i,s)}a!==null&&r!==null&&Bp(n,r,a)}function Bp(e,t,n){let r=e.localNames=[];for(let e=0;e<t.length;e+=2){let i=n[t[e+1]];if(i==null)throw new ui(-301,!1);r.push(t[e],i)}}function Vp(e,t,n){t.componentOffset=n,(e.components??=[]).push(t.index)}function Hp(e,t,n,r,i,a,o){let s=r.length,c=null;for(let i=0;i<s;i++){let a=r[i];c===null&&ao(a)&&(c=a,Vp(e,n,i)),ll(al(n,t),e,a.type)}Qp(n,e.data.length,s),c?.viewProvidersResolver&&c.viewProvidersResolver(c);for(let e=0;e<s;e++){let t=r[e];t.providersResolver&&t.providersResolver(t)}let l=!1,u=!1,d=Md(e,t,s,null);s>0&&(n.directiveToIndex=new Map);for(let c=0;c<s;c++){let s=r[c];if(n.mergedAttrs=Kc(n.mergedAttrs,s.hostAttrs),Jp(e,n,t,d,s),Zp(d,s,i),o!==null&&o.has(s)){let[e,t]=o.get(s);n.directiveToIndex.set(s.type,[d,e+n.directiveStart,t+n.directiveStart])}else(a===null||!a.has(s))&&n.directiveToIndex.set(s.type,d);s.contentQueries!==null&&(n.flags|=4),(s.hostBindings!==null||s.hostAttrs!==null||s.hostVars!==0)&&(n.flags|=64);let f=s.type.prototype;!l&&(f.ngOnChanges||f.ngOnInit||f.ngDoCheck)&&((e.preOrderHooks??=[]).push(n.index),l=!0),!u&&(f.ngOnChanges||f.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(n.index),u=!0),d++}Up(e,n,a)}function Up(e,t,n){for(let r=t.directiveStart;r<t.directiveEnd;r++){let i=e.data[r];if(n===null||!n.has(i))Wp(0,t,i,r),Wp(1,t,i,r),qp(t,r,!1);else{let e=n.get(i);Gp(0,t,e,r),Gp(1,t,e,r),qp(t,r,!0)}}}function Wp(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let n in i)if(Object.hasOwn(i,n)){let i;i=e===0?t.inputs??={}:t.outputs??={},i[n]??=[],i[n].push(r),Kp(t,n)}}function Gp(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let n in i)if(Object.hasOwn(i,n)){let a=i[n],o;o=e===0?t.hostDirectiveInputs??={}:t.hostDirectiveOutputs??={},o[a]??=[],o[a].push(r,n),Kp(t,a)}}function Kp(e,t){t===`class`?e.flags|=8:t===`style`&&(e.flags|=16)}function qp(e,t,n){let{attrs:r,inputs:i,hostDirectiveInputs:a}=e;if(r===null||!n&&i===null||n&&a===null||wu(e)){e.initialInputs??=[],e.initialInputs.push(null);return}let o=null,s=0;for(;s<r.length;){let e=r[s];if(e===0){s+=4;continue}if(e===5){s+=2;continue}if(typeof e==`number`)break;if(!n&&Object.hasOwn(i,e)){let n=i[e];for(let i of n)if(i===t){o??=[],o.push(e,r[s+1]);break}}else if(n&&Object.hasOwn(a,e)){let n=a[e];for(let e=0;e<n.length;e+=2)if(n[e]===t){o??=[],o.push(n[e+1],r[s+1]);break}}s+=2}e.initialInputs??=[],e.initialInputs.push(o)}function Jp(e,t,n,r,i){e.data[r]=i;let a=new Bc(i.factory||=aa(i.type,!0),ao(i),Rp,null);e.blueprint[r]=a,n[r]=a,Yp(e,t,r,Md(e,n,i.hostVars,Ou),i)}function Yp(e,t,n,r,i){let a=i.hostBindings;if(a){let i=e.hostBindingOpCodes;i===null&&(i=e.hostBindingOpCodes=[]);let o=~t.index;Xp(i)!=o&&i.push(o),i.push(n,r,a)}}function Xp(e){let t=e.length;for(;t>0;){let n=e[--t];if(typeof n==`number`&&n<0)return n}return 0}function Zp(e,t,n){if(n){if(t.exportAs)for(let r=0;r<t.exportAs.length;r++)n[t.exportAs[r]]=e;ao(t)&&(n[``]=e)}}function Qp(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function $p(e,t,n,r,i,a,o,s){let c=t[1],l=c.consts,u=Gf(c,e,n,r,yo(l,o));return a&&zp(c,t,u,yo(l,s),i),u.mergedAttrs=Kc(u.mergedAttrs,u.attrs),u.attrs!==null&&Lp(u,u.attrs,!1),u.mergedAttrs!==null&&Lp(u,u.mergedAttrs,!0),c.queries!==null&&c.queries.elementStart(c,u),u}function em(e,t){Mc(e,t),no(t)&&e.queries.elementEnd(t)}function tm(e,t,n,r,i,a){let o=t.consts,s=Gf(t,e,n,r,yo(o,i));if(s.mergedAttrs=Kc(s.mergedAttrs,s.attrs),a!=null){let e=yo(o,a);s.localNames=[];for(let t=0;t<e.length;t+=2)s.localNames.push(e[t],-1)}return s.attrs!==null&&Lp(s,s.attrs,!1),s.mergedAttrs!==null&&Lp(s,s.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,s),s}var nm=typeof ShadowRoot<`u`,rm=typeof Document<`u`;function im(e){return Object.keys(e).map(t=>{let[n,r,i]=e[t],a={propName:n,templateName:t,isSignal:(r&Fd.SignalBased)!==0};return i&&(a.transform=i),a})}function am(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function om(e,t,n){let r=t instanceof za?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new cp(n,r):n}function sm(e){let t=e.get(np,null);if(t===null)throw new ui(407,!1);return{rendererFactory:t,sanitizer:e.get(ap,null),changeDetectionScheduler:e.get($s,null),ngReflect:!1,tracingService:e.get(Ju,null,{optional:!0})}}function cm(e,t,n){let r=um(e);return mu(t,r,r===`svg`?`svg`:r===`math`?lo:n)}function lm(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new ui(905,!1)}function um(e){return(e.selectors[0][0]||`div`).toLowerCase()}var dm=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=im(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=am(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=Cte(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){Ac(_c.DynamicComponentStart);let s=en(null);try{let s=this.componentDef,c=om(s,r||this.ngModule,e),l=sm(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(op(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{en(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=fm(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?Bd(l,r,s.encapsulation,t):cm(s,l,o??null);lm(u);let d=t.get(Ip,null),f=pm(u,()=>t.get(_s,null)??ql());d&&d.addHost(f);let p=a?.some(hm)||i?.some(e=>typeof e!=`function`&&e.bindings.some(hm)),m=kd(null,c,null,512|jd(s),null,null,e,l,t,null,eu(u,t,!0));d&&nm&&f instanceof ShadowRoot&&To(m,()=>{d.removeHost(f)}),m[27]=u,$o(m);let h=null;try{let e=$p(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);yu(l,u,e),Vl(u,m),Rd(c,m,e),ru(c,e,m),em(c,e),n!==void 0&&_m(e,this.ngContentSelectors,n),h=_o(e.index,m),m[8]=h[8],of(c,m,null)}catch(e){throw h!==null&&zl(h),zl(m),e}finally{Ac(_c.DynamicComponentEnd),is()}return new gm(this.componentType,m,!!p)}};function fm(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:wte(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[Fp].requiredVars,e.create&&(e.targetIdx=0,(a??=[]).push(e)),e.update&&(e.targetIdx=0,(o??=[]).push(e));if(r)for(let e=0;e<r.length;e++){let t=r[e];if(typeof t!=`function`)for(let n of t.bindings){s+=n[Fp].requiredVars;let t=e+1;n.create&&(n.targetIdx=t,(a??=[]).push(n)),n.update&&(n.targetIdx=t,(o??=[]).push(n))}}let c=[t];if(r)for(let e of r){let t=Pi(typeof e==`function`?e:e.type);c.push(t)}return Ed(0,null,mm(a,o),1,s,c,null,null,null,[i],null)}function pm(e,t){let n=e.getRootNode?.();return rm&&n instanceof Document?n.head:n&&nm&&n instanceof ShadowRoot?n:t().head}function mm(e,t){return!e&&!t?null:n=>{if(n&1&&e)for(let t of e)t.create();if(n&2&&t)for(let e of t)e.update()}}function hm(e){let t=e[Fp].kind;return t===`input`||t===`twoWay`}var gm=class extends tp{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=mo(t[1],27),this.location=Ol(this._tNode,t),this.instance=_o(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new Vf(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;tf(n,r[1],r,e,t),this.previousInputValues.set(e,t),Nf(_o(n.index,r),1)}get injector(){return new bl(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function _m(e,t,n){let r=e.projection=[];for(let e=0;e<t.length;e++){let t=n[e];r.push(t!=null&&t.length?Array.from(t):null)}}var vm=(()=>{class e{static __NG_ELEMENT_ID__=ym}return e})();function ym(){return Cm(Ro(),Io())}var bm=class e extends vm{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Ol(this._hostTNode,this._hostLView)}get injector(){return new bl(this._hostTNode,this._hostLView)}get parentInjector(){let e=cl(this._hostTNode,this._hostLView);if(Jc(e)){let t=Zc(e,this._hostLView),n=Yc(e),r=t[1].data[n+8];return new bl(r,t)}return new bl(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=xm(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=$f(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,lf(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 dm(Ni(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(za,null);e&&(i=e)}let d=Ni(l.componentType??{}),f=$f(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,lf(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(Gee(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 If(o,i,a,r),t.attachToViewContainerRef(),la(Sm(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=xm(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=Rf(this._lContainer,t);n&&(ua(Sm(this._lContainer),t),dd(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=Rf(this._lContainer,t);return n&&ua(Sm(this._lContainer),t)!=null?new Vf(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function xm(e){return e[8]}function Sm(e){return e[8]||=[]}function Cm(e,t){let n,r=t[e.index];return to(r)?n=r:(n=Pf(r,t,null,e),t[e.index]=n,Nd(t,n)),Tm(n,t,e,r),new bm(n,e,t)}function wm(e,t){let n=e[11],r=n.createComment(``),i=po(t,e);return hu(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var Tm=Om,Em=()=>!1;function Dm(e,t,n){return Em(e,t,n)}function Om(e,t,n,r){if(e[7])return;let i;i=n.type&8?uo(r):wm(t,n),e[7]=i}var km=class e{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},Am=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;e<r;e++){let t=n.getByIndex(e),r=this.queries[t.indexInDeclarationView];i.push(r.clone())}return new e(i)}return null}insertView(e){this.dirtyQueriesWithMatches(e)}detachView(e){this.dirtyQueriesWithMatches(e)}finishViewCreation(e){this.dirtyQueriesWithMatches(e)}dirtyQueriesWithMatches(e){for(let t=0;t<this.queries.length;t++)Gm(e,t).matches!==null&&this.queries[t].setDirty()}},jm=class{flags;read;predicate;constructor(e,t,n=null){this.flags=t,this.read=n,this.predicate=typeof e==`string`?Um(e):e}},Mm=class e{queries;constructor(e=[]){this.queries=e}elementStart(e,t){for(let n=0;n<this.queries.length;n++)this.queries[n].elementStart(e,t)}elementEnd(e){for(let t=0;t<this.queries.length;t++)this.queries[t].elementEnd(e)}embeddedTView(t){let n=null;for(let e=0;e<this.length;e++){let r=n===null?0:n.length,i=this.getByIndex(e).embeddedTView(t,r);i&&(i.indexInDeclarationView=e,n===null?n=[i]:n.push(i))}return n===null?null:new e(n)}template(e,t){for(let n=0;n<this.queries.length;n++)this.queries[n].template(e,t)}getByIndex(e){return this.queries[e]}get length(){return this.queries.length}track(e){this.queries.push(e)}},Nm=class e{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(e,t=-1){this.metadata=e,this._declarationNodeIndex=t}elementStart(e,t){this.isApplyingToNode(t)&&this.matchTNode(e,t)}elementEnd(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}template(e,t){this.elementStart(e,t)}embeddedTView(t,n){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,n),new e(this.metadata)):null}isApplyingToNode(e){if(this._appliesToNextNode&&(this.metadata.flags&1)!=1){let t=this._declarationNodeIndex,n=e.parent;for(;n!==null&&n.type&8&&n.index!==t;)n=n.parent;return t===(n===null?-1:n.index)}return this._appliesToNextNode}matchTNode(e,t){let n=this.metadata.predicate;if(Array.isArray(n))for(let r=0;r<n.length;r++){let i=n[r];this.matchTNodeWithReadOption(e,t,Pm(t,i)),this.matchTNodeWithReadOption(e,t,hl(t,e,i,!1,!1))}else n===Hf?t.type&4&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,hl(t,e,n,!1,!1))}matchTNodeWithReadOption(e,t,n){if(n!==null){let r=this.metadata.read;if(r!==null){if(r===kl||r===vm||r===Hf&&t.type&4)this.addMatch(t.index,-2);else{let n=hl(t,e,r,!1,!1);n!==null&&this.addMatch(t.index,n)}}else this.addMatch(t.index,n)}}addMatch(e,t){this.matches===null?this.matches=[e,t]:this.matches.push(e,t)}};function Pm(e,t){let n=e.localNames;if(n!==null){for(let e=0;e<n.length;e+=2)if(n[e]===t)return n[e+1]}return null}function Fm(e,t){return e.type&11?Ol(e,t):e.type&4?Wf(e,t):null}function Im(e,t,n,r){return n===-1?Fm(t,e):n===-2?Lm(e,t,r):gl(e,e[1],n,t)}function Lm(e,t,n){if(n===kl)return Ol(t,e);if(n===Hf)return Wf(t,e);if(n===vm)return Cm(t,e)}function Rm(e,t,n,r){let i=t[18].queries[r];if(i.matches===null){let r=e.data,a=n.matches,o=[];for(let e=0;a!==null&&e<a.length;e+=2){let i=a[e];if(i<0)o.push(null);else{let s=r[i];o.push(Im(t,s,a[e+1],n.metadata.read))}}i.matches=o}return i.matches}function zm(e,t,n,r){let i=e.queries.getByIndex(n),a=i.matches;if(a!==null){let o=Rm(e,t,i,n);for(let e=0;e<a.length;e+=2){let n=a[e];if(n>0)r.push(o[e/2]);else{let i=a[e+1],o=t[-n];for(let e=10;e<o.length;e++){let t=o[e];t[16]===t[3]&&zm(t[1],t,i,r)}if(o[9]!==null){let e=o[9];for(let t=0;t<e.length;t++){let n=e[t];zm(n[1],n,i,r)}}}}}return r}function Bm(e,t){return e[18].queries[t].queryList}function Vm(e,t,n){let r=new Ml((n&4)==4);return Jee(e,t,r,r.destroy),(t[18]??=new Am).queries.push(new km(r))-1}function Hm(e,t,n){let r=Lo();return r.firstCreatePass&&(Wm(r,new jm(e,t,n),-1),(t&2)==2&&(r.staticViewQueries=!0)),Vm(r,Io(),t)}function Um(e){return e.split(`,`).map(e=>e.trim())}function Wm(e,t,n){e.queries===null&&(e.queries=new Mm),e.queries.track(new Nm(t,n))}function Gm(e,t){return e.queries.getByIndex(t)}function Km(e,t){let n=e[1],r=Gm(n,t);return r.crossesNgTemplate?zm(n,e,t,[]):Rm(n,e,r,t)}function qm(e,t,n){let r,i=Sn(()=>{r._dirtyCounter();let n=Zm(r,e);if(t&&n===void 0)throw new ui(-951,!1);return n});return r=i[$t],r._dirtyCounter=E(0),r._flatValue=void 0,i}function Jm(e){return qm(!0,!1,e)}function Ym(e){return qm(!0,!0,e)}function Xm(e,t){let n=e[$t];n._lView=Io(),n._queryIndex=t,n._queryList=Bm(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(e=>e+1))}function Zm(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[2]&4)return t?void 0:va;let i=Bm(n,r),a=Km(n,r);return i.reset(a,Al),t?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}function Qm(e){return!!e&&typeof e.then==`function`}function $m(e){return!!e&&typeof e.subscribe==`function`}var eh=class{},th=class extends eh{injector;instance=null;constructor(e){super();let t=new Ba([...e.providers,{provide:eh,useValue:this}],e.parent||Ra(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function nh(e,t,n=null){return new th({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var rh=(()=>{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=wa(!1,e.type),n=t.length>0?nh([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=vi({token:e,providedIn:`environment`,factory:()=>new e(ea(za))})}return e})();function O(e){return gc(()=>{let t=lh(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Pl.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(rh).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||iu.Emulated,styles:e.styles||va,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&Xu(`NgStandalone`),uh(n);let r=e.dependencies;return n.directiveDefs=dh(r,ih),n.pipeDefs=dh(r,Fi),n.id=fh(n),n})}function ih(e){return Ni(e)||Pi(e)}function ah(e,t){if(e==null)return _a;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=Fd.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function oh(e){if(e==null)return _a;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function sh(e){return gc(()=>{let t=lh(e);return uh(t),t})}function ch(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 lh(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||_a,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||va,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:ah(e.inputs,t),outputs:oh(e.outputs),debugInfo:null}}function uh(e){e.features?.forEach(t=>t(e))}function dh(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 fh(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 Ti(``),mh=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=S(ph,{optional:!0})??[];injector=S(gs);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=Za(this.injector,t);if(Qm(n))e.push(n);else if($m(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=El({token:e,factory:e.ɵfac})}return e})();function hh(e){return t=>{t.controlDef={create:(e,t)=>{e?.ɵngControlCreate(t)},update:(e,t)=>{e?.ɵngControlUpdate?.(t)},passThroughInput:e}}}function gh(e){return Object.getPrototypeOf(e.prototype).constructor}function _h(e){let t=gh(e.type),n=!0,r=[e];for(;t&&t!==Function.prototype&&t!==Object.prototype;){let i,a=Object.hasOwn(t,Di)?t[Di]:void 0,o=Object.hasOwn(t,Oi)?t[Oi]:void 0;if(ao(e))i=a??o;else{if(a)throw new ui(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&&Ch(e,n);let a=i.viewQuery,o=i.contentQueries;if(a&&xh(e,a),o&&Sh(e,o),vh(e,i),Uee(e.outputs,i.outputs),ao(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<t.length;r++){let i=t[r];i&&i.ngInherit&&i(e),i===_h&&(n=!1)}}t=Object.getPrototypeOf(t)}yh(r)}function vh(e,t){for(let n in t.inputs){if(!Object.hasOwn(t.inputs,n)||Object.hasOwn(e.inputs,n))continue;let r=t.inputs[n];r!==void 0&&(e.inputs[n]=r,e.declaredInputs[n]=t.declaredInputs[n])}}function yh(e){let t=0,n=null;for(let r=e.length-1;r>=0;r--){let i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=Kc(i.hostAttrs,n=Kc(n,i.hostAttrs))}}function bh(e){return e===_a?{}:e===va?[]:e}function xh(e,t){let n=e.viewQuery;e.viewQuery=n?(e,r)=>{t(e,r),n(e,r)}:t}function Sh(e,t){let n=e.contentQueries;e.contentQueries=n?(e,r,i)=>{t(e,r,i),n(e,r,i)}:t}function Ch(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=Kc(e.mergedAttrs,e.attrs);let t=e.tView=Ed(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),Bo(e,!1);let c=Oh(n,t,e,r);fs()&&hd(n,t,c,e),Vl(c,t);let l=Pf(c,t,c,e);t[r+27]=l,Nd(t,l),Dm(l,e,t)}function Th(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;return t.firstCreatePass?(f=Gf(t,d,4,o||null,s||null),Mo()&&zp(t,e,f,yo(t.consts,l),Jd),Mc(t,f)):f=t.data[d],wh(f,e,t,n,r,i,a,c),io(f)&&Rd(t,e,f),l!=null&&zd(e,f,u),f}function Eh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=Gf(t,d,4,o||null,s||null),l!=null){let e=yo(t.consts,l);f.localNames=[];for(let t=0;t<e.length;t+=2)f.localNames.push(e[t],-1)}}else f=t.data[d];return wh(f,e,t,n,r,i,a,c),l!=null&&zd(e,f,u),f}function Dh(e,t,n,r,i,a,o,s){let c=Io(),l=Lo();return Th(c,l,e,t,n,r,i,yo(l.consts,a),void 0,o,s),Dh}var Oh=kh;function kh(e,t,n,r){return ps(!0),t[11].createComment(``)}var Ah=new Ti(``),jh=new Ti(``);function Mh(){hee(()=>{throw new ui(600,``)})}var Nh=10,Ph=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=S(Us);afterRenderManager=S(Zu);zonelessEnabled=S(ec);rootEffectScheduler=S(nc);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Vr;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=S(Ss);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(ci(e=>!e))}constructor(){S(Ju,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=S(za);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=gs.NULL){return this._injector.get(As).run(()=>{if(Ac(_c.BootstrapComponentStart),!this._injector.get(mh).done)throw new ui(405,``);let r=Ni(e),i=this._injector.get(eh),a=new dm(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=Fh(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(Ah,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),Ih(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),Ac(_c.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Ac(_c.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(qu.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw Ac(_c.ChangeDetectionEnd),new ui(101,!1);let e=en(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,en(e),this.afterTick.next(),Ac(_c.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(np,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++<Nh;){Ac(_c.ChangeDetectionSyncStart);try{this.synchronizeOnce()}finally{Ac(_c.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||So(n))&&(Cf(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})=>So(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;Ih(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(jh,[]).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),()=>Ih(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new ui(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=El({token:e,factory:e.ɵfac})}return e})();function Fh(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function Ih(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function k(e,t,n,r){let i=Io();return dp(i,Jo(),t)&&(Lo(),Yd(ss(),i,e,t,n,r)),k}function Lh(e){if(Xu(`NgAnimateEnter`),!Lu)return Lh;let t=Io();if(Pte(t))return Lh;let n=Ro(),r=t[9].get(As);return zte(Wu(t),n,()=>Rh(t,n,e,r)),Gte(t[9]),id(t[9],Wu(t)),Lh}function Rh(e,t,n,r){let i=po(t,e),a=e[11],o=Rte(n),s=[],c=!1,l=e=>{if(Gu(e)!==i)return;let t=e instanceof AnimationEvent?`animationend`:`transitionend`;r.runOutsideAngular(()=>{a.listen(i,t,u)})},u=e=>{Gu(e)===i&&(Ku(e,i)&&(c=!0),zh(e,i,a))};if(o&&o.length>0){r.runOutsideAngular(()=>{s.push(a.listen(i,`animationstart`,l)),s.push(a.listen(i,`transitionstart`,l))}),Fte(i,o,s);for(let e of o)a.addClass(i,e);r.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(!c&&(Ate(i,Bu,Lu),!Bu.has(i))){for(let e of o)a.removeClass(i,e);Ru(i)}})})}}function zh(e,t,n){let r=zu.get(t);if(Gu(e)===t&&r&&Ku(e,t)){e.stopPropagation();for(let e of r.classList)n.removeClass(t,e);Ru(t)}}var Bh=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 Vh(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function Hh(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){en(r);let c=t.length-1;for(en(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=Vh(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=Vh(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 Kh,a??=Gh(e,o,s,n),Uh(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;)Wh(e,i,n,o,t[o]),o++}else if(t!=null){en(r);let c=t[Symbol.iterator]();en(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=Vh(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new Kh,a??=Gh(e,o,s,n);let u=n(o,r);if(Uh(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;)Wh(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 Uh(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Wh(e,t,n,r,i){if(Uh(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function Gh(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 Kh=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 A(e,t,n,r,i,a,o,s){Xu(`NgControlFlow`);let c=Io(),l=Lo();return Eh(c,l,e,t,n,r,i,yo(l.consts,a),256,o,s),qh}function qh(e,t,n,r,i,a,o,s){Xu(`NgControlFlow`);let c=Io(),l=Lo();return Eh(c,l,e,t,n,r,i,yo(l.consts,a),512,o,s),qh}function j(e,t){Xu(`NgControlFlow`);let n=Io(),r=Jo(),i=n[r]===Ou?-1:n[r],a=i===-1?void 0:$h(n,27+i);if(dp(n,r,e)){let r=en(null);try{if(a!==void 0&&Lf(a,0),e!==-1){let r=27+e,i=$h(n,r),a=ig(n[1],r),o=ep(i,a,n);If(i,cf(n,a,t,{dehydratedView:o}),0,lf(a,o))}}finally{en(r)}}else if(a!==void 0){let e=Ff(a,0);e!==void 0&&(e[8]=t)}}var Jh=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 Yh(e){return e}function Xh(e,t){return t}var Zh=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function M(e,t,n,r,i,a,o,s,c,l,u,d,f){Xu(`NgControlFlow`);let p=Io(),m=Lo(),h=c!==void 0,g=Io(),_=new Zh(h,s?o.bind(g[15][8]):o);g[27+e]=_,Eh(p,m,e+1,t,n,r,i,yo(m.consts,a),256),h&&Eh(p,m,e+2,c,l,u,d,yo(m.consts,f),512)}var Qh=class extends Bh{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,If(this.lContainer,t,e,lf(this.templateTNode,n)),eg(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,tg(this.lContainer,e),ng(this.lContainer,e)}create(e,t){let n=$f(this.lContainer,this.templateTNode.tView.ssrId);return cf(this.hostLView,this.templateTNode,new Jh(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;e<this.length;e++)this.getLView(e)[8].$index=e}getLView(e){return rg(this.lContainer,e)}};function N(e){let t=en(null),n=as();try{let r=Io(),i=r[1],a=r[n],o=n+1,s=$h(r,o);a.liveCollection===void 0?a.liveCollection=new Qh(s,r,ig(i,o)):a.liveCollection.reset();let c=a.liveCollection;if(Hh(c,e,a.trackByFn,t),c.updateIndexes(),a.hasEmptyBlock){let e=Jo(),t=c.length===0;if(dp(r,e,t)){let e=n+2,a=$h(r,e);if(t){let t=ig(i,e),n=ep(a,t,r);If(a,cf(r,t,void 0,{dehydratedView:n}),0,lf(t,n))}else i.firstUpdatePass&&Yf(a),Lf(a,0)}}}finally{en(t)}}function $h(e,t){return e[t]}function eg(e,t){if(e.length<=10)return;let n=e[10+t],r=n?n[26]:void 0;if(n&&r&&r.detachedLeaveAnimationFns&&r.detachedLeaveAnimationFns.length>0){let e=n[9];Ute(e,r),Iu.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function tg(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 ng(e,t){return Rf(e,t)}function rg(e,t){return Ff(e,t)}function ig(e,t){return mo(e,t)}function P(e,t,n){let r=Io();return dp(r,Jo(),t)&&(Lo(),Hd(ss(),r,e,t,r[11],n)),P}function ag(e,t,n,r,i){tf(t,e,n,i?`class`:`style`,r)}function F(e,t,n,r){let i=Io(),a=i[1],o=e+27,s=a.firstCreatePass?$p(o,i,2,t,Jd,Mo(),n,r):a.data[o];if(ro(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(op(o),()=>(og(e,t,i,s,r),F))}}return og(e,t,i,s,r),F}function og(e,t,n,r,i){if(Qd(r,n,e,t,cg),io(r)){let e=n[1];Rd(e,n,r),ru(e,r,n)}i!=null&&zd(n,r)}function I(){let e=Lo(),t=$d(Ro());return e.firstCreatePass&&em(e,t),Po(t)&&Fo(),jo(),t.classesWithoutHost!=null&&Vc(t)&&ag(e,t,Io(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&Hc(t)&&ag(e,t,Io(),t.stylesWithoutHost,!1),I}function L(e,t,n,r){return F(e,t,n,r),I(),L}function R(e,t,n,r){let i=Io(),a=i[1],o=e+27,s=a.firstCreatePass?tm(o,a,2,t,n,r):a.data[o];return Qd(s,i,e,t,cg),r!=null&&zd(i,s),R}function z(){return Po($d(Ro()))&&Fo(),jo(),z}function sg(e,t,n,r){return R(e,t,n,r),z(),sg}var cg=(e,t,n,r,i)=>(ps(!0),mu(t[11],r,us()));function lg(e,t,n){let r=Io(),i=r[1],a=e+27,o=i.firstCreatePass?$p(a,r,8,`ng-container`,Jd,Mo(),t,n):i.data[a];if(Qd(o,r,e,`ng-container`,fg),io(o)){let e=r[1];Rd(e,r,o),ru(e,o,r)}return n!=null&&zd(r,o),lg}function ug(){let e=Lo(),t=$d(Ro());return e.firstCreatePass&&em(e,t),ug}function dg(e,t,n){return lg(e,t,n),ug(),dg}var fg=(e,t,n,r,i)=>(ps(!0),lte(t[11],``));function B(){return Io()}function V(e,t,n){let r=Io();return dp(r,Jo(),t)&&(Lo(),Ud(ss(),r,e,t,r[11],n)),V}var pg=void 0;function mg(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var hg=[`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`,mg],gg=Object.create(null);function _g(e){let t=bg(e),n=vg(t);if(n)return n;let r=t.split(`-`)[0];if(n=vg(r),n)return n;if(r===`en`)return hg;throw new ui(701,!1)}function vg(e){if(!(e in gg)){let t=Yi.ng&&Yi.ng.common&&Yi.ng.common.locales&&Yi.ng.common.locales[e];return t!==void 0&&(gg[e]=t),t}return gg[e]}var yg={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 bg(e){return e.toLowerCase().replace(/_/g,`-`)}var xg=`en-US`;function Sg(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function H(e,t,n){let r=Io(),i=Lo(),a=Ro();return Cg(i,r,r[11],a,e,t,n),H}function U(e,t,n){let r=Io(),i=Lo(),a=Ro();return(a.type&3||n)&&_p(a,i,r,n,r[11],e,t,hp(a,r,t)),U}function Cg(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=hp(r,t,a),_p(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<n.length;e+=2){let o=n[e],s=n[e+1];c??=hp(r,t,a),Sp(r,t,o,s,i,c)}if(e&&e.length)for(let n of e)c??=hp(r,t,a),Sp(r,t,n,i,i,c)}}function W(e=1){return ate(e)}function wg(e,t){let n=null,r=vte(e);for(let i=0;i<t.length;i++){let a=t[i];if(a===`*`){n=i;continue}if(r===null?Eu(e,a,!0):xte(r,a))return i}return n}function Tg(e){let t=Io()[15][5];if(!t.projection){let n=t.projection=da(e?e.length:1,null),r=n.slice(),i=t.child;for(;i!==null;){if(i.type!==128){let t=e?wg(i,e):0;t!==null&&(r[t]?r[t].projectionNext=i:n[t]=i,r[t]=i)}i=i.next}}}function Eg(e,t=0,n,r,i,a){let o=Io(),s=Lo(),c=r?e+1:null;c!==null&&Eh(o,s,c,r,i,a,null,n);let l=Gf(s,27+e,16,null,n||null);l.projection===null&&(l.projection=t),Ho();let u=!o[6]||No();o[15][5].projection[l.projection]===null&&c!==null?Dg(o,s,c):u&&!Ql(l)&&Sd(s,o,l)}function Dg(e,t,n){let r=27+n,i=t.data[r],a=e[r],o=$f(a,i.tView.ssrId);If(a,cf(e,i,void 0,{dehydratedView:o}),0,lf(i,o))}function Og(e,t,n,r){return Xm(e,Hm(t,n,r)),Og}function kg(e=1){Zo(rte()+e)}function Ag(e){return ho(Uo(),27+e)}function jg(e,t){return e<<17|t<<2}function Mg(e){return e>>17&32767}function Ng(e){return(e&2)==2}function Pg(e,t){return e&131071|t<<17}function Fg(e){return e|2}function Ig(e){return(e&131068)>>2}function Lg(e,t){return e&-131069|t<<2}function Rg(e){return(e&1)==1}function zg(e){return e|1}function Bg(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=Mg(o),c=Ig(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||ha(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=Mg(e[s+1]);e[r+1]=jg(t,s),t!==0&&(e[t+1]=Lg(e[t+1],r)),e[s+1]=Pg(e[s+1],r)}else e[r+1]=jg(s,0),s!==0&&(e[s+1]=Lg(e[s+1],r)),s=r}else e[r+1]=jg(c,0),s===0?s=r:e[c+1]=Lg(e[c+1],r),c=r;l&&(e[r+1]=Fg(e[r+1])),Hg(e,u,r,!0),Hg(e,u,r,!1),Vg(t,u,e,r,a),o=jg(s,c),a?t.classBindings=o:t.styleBindings=o}function Vg(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&ha(a,t)>=0&&(n[r+1]=zg(n[r+1]))}function Hg(e,t,n,r){let i=e[n+1],a=t===null,o=r?Mg(i):Ig(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];Ug(n,t)&&(s=!0,e[o+1]=r?zg(i):Fg(i)),o=r?Mg(i):Ig(i)}s&&(e[n+1]=r?Fg(i):zg(i))}function Ug(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?ha(e,t)>=0:!1}var Wg={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Gg(e){return e.substring(Wg.key,Wg.keyEnd)}function Kg(e){return Jg(e),qg(e,Yg(e,0,Wg.textEnd))}function qg(e,t){let n=Wg.textEnd;return n===t?-1:(t=Wg.keyEnd=Xg(e,Wg.key=t,n),Yg(e,t,n))}function Jg(e){Wg.key=0,Wg.keyEnd=0,Wg.value=0,Wg.valueEnd=0,Wg.textEnd=e.length}function Yg(e,t,n){for(;t<n&&e.charCodeAt(t)<=32;)t++;return t}function Xg(e,t,n){for(;t<n&&e.charCodeAt(t)>32;)t++;return t}function Zg(e,t,n){return e_(e,t,n,!1),Zg}function G(e,t){return e_(e,t,null,!0),G}function Qg(e){t_(d_,$g,e,!0)}function $g(e,t){for(let n=Kg(t);n>=0;n=qg(t,n))pa(e,Gg(t),!0)}function e_(e,t,n,r){let i=Io(),a=Lo(),o=Yo(2);if(a.firstUpdatePass&&r_(a,e,o,r),t!==Ou&&dp(i,o,t)){let s=a.data[as()];p_(a,s,i,i[11],e,i[o+1]=g_(t,n),r,o)}}function t_(e,t,n,r){let i=Lo(),a=Yo(2);i.firstUpdatePass&&r_(i,null,a,r);let o=Io();if(n!==Ou&&dp(o,a,n)){let s=i.data[as()];if(__(s,r)&&!n_(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=mi(e,n||``)),ag(i,s,o,n,r)}else f_(i,s,o,o[11],o[a+1],o[a+1]=u_(e,t,n),r,a)}}function n_(e,t){return t>=e.expandoStartIndex}function r_(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[as()],o=n_(e,n);__(a,r)&&t===null&&!o&&(t=!1),t=i_(i,a,t,r),Bg(i,a,t,n,o,r)}}function i_(e,t,n,r){let i=nte(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=c_(null,e,t,n,r),n=l_(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=c_(i,e,t,n,r),a===null){let n=a_(e,t,r);n!==void 0&&Array.isArray(n)&&(n=c_(null,e,t,n[1],r),n=l_(n,t.attrs,r),o_(e,t,r,n))}else a=s_(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function a_(e,t,n){let r=n?t.classBindings:t.styleBindings;if(Ig(r)!==0)return e[Mg(r)]}function o_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[Mg(i)]=r}function s_(e,t,n){let r,i=t.directiveEnd;for(let a=1+t.directiveStylingLast;a<i;a++){let t=e[a].hostAttrs;r=l_(r,t,n)}return l_(r,t.attrs,n)}function c_(e,t,n,r,i){let a=null,o=n.directiveEnd,s=n.directiveStylingLast;for(s===-1?s=n.directiveStart:s++;s<o&&(a=t[s],r=l_(r,a.hostAttrs,i),a!==e);)s++;return e!==null&&(n.directiveStylingLast=s),r}function l_(e,t,n){let r=n?1:2,i=-1;if(t!==null)for(let a=0;a<t.length;a++){let o=t[a];typeof o==`number`?i=o:i===r&&(Array.isArray(e)||(e=e===void 0?[]:[``,e]),pa(e,o,n?!0:t[++a]))}return e===void 0?null:e}function u_(e,t,n){if(n==null||n===``)return va;let r=[],i=ou(n);if(Array.isArray(i))for(let t=0;t<i.length;t++)e(r,i[t],!0);else if(i instanceof Set)for(let t of i)e(r,t,!0);else if(typeof i==`object`)for(let t in i)Object.hasOwn(i,t)&&e(r,t,i[t]);else typeof i==`string`&&t(r,i);return r}function d_(e,t,n){let r=String(t);r!==``&&!r.includes(` `)&&pa(e,r,n)}function f_(e,t,n,r,i,a,o,s){i===Ou&&(i=va);let c=0,l=0,u=0<i.length?i[0]:null,d=0<a.length?a[0]:null;for(;u!==null||d!==null;){let f=c<i.length?i[c+1]:void 0,p=l<a.length?a[l+1]:void 0,m=null,h;u===d?(c+=2,l+=2,f!==p&&(m=d,h=p)):d===null||u!==null&&u<d?(c+=2,m=u):(l+=2,m=d,h=p),m!==null&&p_(e,t,n,r,m,h,o,s),u=c<i.length?i[c]:null,d=l<a.length?a[l]:null}}function p_(e,t,n,r,i,a,o,s){if(!(t.type&3))return;let c=e.data,l=c[s+1];h_(Rg(l)?m_(c,t,n,i,Ig(l),o):void 0)||(h_(a)||Ng(l)&&(a=m_(c,null,n,i,s,o)),Td(r,o,fo(as(),n),i,a))}function m_(e,t,n,r,i,a){let o=t===null,s;for(;i>0;){let t=e[i],a=Array.isArray(t),c=a?t[1]:t,l=c===null,u=n[i+1];u===Ou&&(u=l?va:void 0);let d=l?ma(u,r):c===r?u:void 0;if(a&&!h_(d)&&(d=ma(t,r)),h_(d)&&(s=d,o))return s;let f=e[i+1];i=o?Mg(f):Ig(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=ma(e,r))}return s}function h_(e){return e!==void 0}function g_(e,t){return e==null||e===``||(typeof t==`string`?e=ou(e)+t:typeof e==`object`&&(e=pi(ou(e)))),e}function __(e,t){return!!(e.flags&(t?8:16))}function K(e,t=``){let n=Io(),r=Lo(),i=e+27,a=r.firstCreatePass?Gf(r,i,1,t,null):r.data[i],o=ine(r,n,a,t);n[i]=o,fs()&&hd(r,n,o,a),Bo(a,!1)}var ine=(e,t,n,r)=>(ps(!0),ste(t[11],r));function v_(e,t,n,r=``){return dp(e,Jo(),n)?t+Li(n)+r:Ou}function ane(e,t,n,r,i,a=``){let o=fp(e,qo(),n,i);return Yo(2),o?t+Li(n)+r+Li(i)+a:Ou}function one(e,t,n,r,i,a,o,s=``){let c=pp(e,qo(),n,i,o);return Yo(3),c?t+Li(n)+r+Li(i)+a+Li(o)+s:Ou}function sne(e,t,n,r,i,a,o,s,c,l=``){let u=mp(e,qo(),n,i,o,c);return Yo(4),u?t+Li(n)+r+Li(i)+a+Li(o)+s+Li(c)+l:Ou}function q(e){return J(``,e),q}function J(e,t,n){let r=Io(),i=v_(r,e,t,n);return i!==Ou&&x_(r,as(),i),J}function Y(e,t,n,r,i){let a=Io(),o=ane(a,e,t,n,r,i);return o!==Ou&&x_(a,as(),o),Y}function y_(e,t,n,r,i,a,o){let s=Io(),c=one(s,e,t,n,r,i,a,o);return c!==Ou&&x_(s,as(),c),y_}function b_(e,t,n,r,i,a,o,s,c){let l=Io(),u=sne(l,e,t,n,r,i,a,o,s,c);return u!==Ou&&x_(l,as(),u),b_}function x_(e,t,n){let r=fo(t,e);cte(e[11],r,n)}function S_(e,t,n){pc(t)&&(t=t());let r=Io();return dp(r,Jo(),t)&&(Lo(),Hd(ss(),r,e,t,r[11],n)),S_}function C_(e,t){let n=pc(e);return n&&e.set(t),n}function w_(e,t){let n=Io(),r=Lo(),i=Ro();return Cg(r,n,n[11],i,e,t),w_}var T_={};function E_(e){Xu(`NgLet`);let t=Lo(),n=Io(),r=e+27;return Bo(Gf(t,r,128,null,null),!1),go(t,n,r,T_),E_}function D_(e){return go(Lo(),Io(),as(),e),e}function O_(e){let t=ho(Uo(),27+e);if(t===T_)throw new ui(314,!1);return t}function k_(e,t,n=``){return v_(Io(),e,t,n)}function A_(e,t,n){let r=Lo();r.firstCreatePass&&j_(t,r.data,r.blueprint,ao(e),n)}function j_(e,t,n,r,i){if(e=gi(e),Array.isArray(e))for(let a=0;a<e.length;a++)j_(e[a],t,n,r,i);else{let a=Lo(),o=Io(),s=Ro(),c=Ma(e)?e:gi(e.provide),l=Wa(e),u=s.providerIndexes&1048575,d=s.directiveStart,f=s.providerIndexes>>20;if(Ma(e)||!e.multi){let r=new Bc(l,i,Rp,null),p=P_(c,t,i?u:u+f,d);p===-1?(ll(al(s,o),a,c),M_(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=P_(c,t,u+f,d),m=P_(c,t,u,u+f),h=p>=0&&n[p],g=m>=0&&n[m];if(i&&!g||!i&&!h){ll(al(s,o),a,c);let u=une(i?lne:cne,n.length,i,r,l,e);!i&&g&&(n[m].providerFactory=u),M_(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=N_(n[i?m:p],l,!i&&r);M_(a,e,p>-1?p:m,t)}!i&&r&&g&&n[m].componentProviders++}}}function M_(e,t,n,r){let i=Ma(t),a=Na(t);if(i||a){let o=(a?gi(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 N_(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function P_(e,t,n,r){for(let i=n;i<r;i++)if(t[i]===e)return i;return-1}function cne(e,t,n,r,i){return F_(this.multi,[])}function lne(e,t,n,r,i){let a=this.multi,o;if(this.providerFactory){let e=this.providerFactory.componentProviders,t=gl(r,r[1],this.providerFactory.index,i);o=t.slice(0,e),F_(a,o);for(let n=e;n<t.length;n++)o.push(t[n])}else o=[],F_(a,o);return o}function F_(e,t){for(let n=0;n<e.length;n++){let r=e[n];t.push(r())}return t}function une(e,t,n,r,i,a){let o=new Bc(e,n,Rp,null);return o.multi=[],o.index=t,o.componentProviders=0,N_(o,i,r&&!n),o}function I_(e,t){return n=>{n.providersResolver=(t,n)=>A_(t,n?n(e):e,!1),t&&(n.viewProvidersResolver=(e,n)=>A_(e,n?n(t):t,!0))}}function L_(e,t){let n=Ko()+e,r=Io();return r[n]===Ou?lp(r,n,t()):up(r,n)}function R_(e,t,n){return V_(Io(),Ko(),e,t,n)}function z_(e,t,n,r){return H_(Io(),Ko(),e,t,n,r)}function dne(e,t,n,r,i,a,o){return fne(Io(),Ko(),e,t,n,r,i,a)}function B_(e,t){let n=e[t];return n===Ou?void 0:n}function V_(e,t,n,r,i,a){let o=t+n;return dp(e,o,i)?lp(e,o+1,a?r.call(a,i):r(i)):B_(e,o+1)}function H_(e,t,n,r,i,a,o){let s=t+n;return fp(e,s,i,a)?lp(e,s+2,o?r.call(o,i,a):r(i,a)):B_(e,s+2)}function fne(e,t,n,r,i,a,o,s,c){let l=t+n;return mp(e,l,i,a,o,s)?lp(e,l+4,c?r.call(c,i,a,o,s):r(i,a,o,s)):B_(e,l+4)}function U_(e,t){let n=Lo(),r,i=e+27;n.firstCreatePass?(r=pne(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=aa(r.type,!0)),o=qi(Rp);try{let e=$c(!1),t=a();return $c(e),go(n,Io(),i,t),t}finally{qi(o)}}function pne(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function W_(e,t,n){let r=e+27,i=Io(),a=ho(i,r);return K_(i,r)?V_(i,Ko(),t,a.transform,n,a):a.transform(n)}function G_(e,t,n,r){let i=e+27,a=Io(),o=ho(a,i);return K_(a,i)?H_(a,Ko(),t,o.transform,n,r,o):o.transform(n,r)}function K_(e,t){return e[1].data[t].pure}function q_(e,t){return Wf(e,t)}var mne=(()=>{class e{applicationErrorHandler=S(Us);appRef=S(Ph);taskService=S(Ss);ngZone=S(As);zonelessEnabled=S(ec);tracing=S(Ju,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new ar;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Os):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(S(tc,{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?Es:Ts;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=El({token:e,factory:e.ɵfac})}return e})();function hne(){return[{provide:$s,useExisting:mne},{provide:As,useClass:Rs},{provide:ec,useValue:!0}]}function gne(){return typeof $localize<`u`&&$localize.locale||`en-US`}var J_=new Ti(``,{factory:()=>S(J_,{optional:!0,skipSelf:!0})||gne()}),Y_=class{destroyed=!1;listeners=null;errorHandler=S(Hs,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=S(vs);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new ui(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(di(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let t=en(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&&_ne(this.listeners)),en(t),this.isEmitting=!1}}};function _ne(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function X(e,t){return Sn(e,t?.equal)}function Z(e){return Wn(e)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var vne=e=>e;function Q(e,t){return typeof e==`function`?X_(Bn(e,vne,t?.equal),t?.debugName,t?.set):X_(Bn(e.source,e.computation,e.equal),e.debugName,e.set)}function X_(e,t,n){let r=e[$t],i=e;if(n!==void 0){let t=e=>Vn(r,e);i.set=e=>n(e,t),i.update=r=>n(r(Z(e)),t)}else i.set=e=>Vn(r,e),i.update=e=>Hn(r,e);return i.asReadonly=Gs.bind(e),i}var Z_=!1;function yne(){return Z_}function Q_(e){Z_=e}function $_(e,t){let n=Object.create(hc);n.value=e,n.transformFn=t?.transform;function r(){if(rn(n),n.value===mc)throw new ui(-950,null);return n.value}return r[$t]=n,r}function ev(e){return new Y_}function tv(e,t){return $_(e,t)}function bne(e){return $_(mc,e)}var $=(tv.required=bne,tv);function nv(e,t){let n=Object.create(hc),r=new Y_;n.value=e;function i(){return rn(n),rv(n.value),n.value}return i[$t]=n,i.asReadonly=Gs.bind(i),i.set=e=>{n.equal(n.value,e)||(kn(n,e),r.emit(e))},i.update=e=>{rv(n.value),i.set(e(n.value))},i.subscribe=r.subscribe.bind(r),i.destroyRef=r.destroyRef,i}function rv(e){if(e===mc)throw new ui(952,!1)}function iv(e,t){return nv(e,t)}function xne(e){return nv(mc,e)}var av=(iv.required=xne,iv);function ov(e,t){return Jm(t)}function Sne(e,t){return Ym(t)}var sv=(ov.required=Sne,ov),Cne=(()=>{class e{static __NG_ELEMENT_ID__=wne}return e})();function wne(e){return Tne(Ro(),Io(),(e&16)==16)}function Tne(e,t,n){if(ro(e)&&!n){let n=_o(e.index,t);return new Vf(n,n)}if(e.type&175){let e=t[15];return new Vf(e,t)}return null}var cv=new Ti(``),Ene=new Ti(``);function lv(e){return!e.moduleRef}function Dne(e){let t=lv(e)?e.r3Injector:e.moduleRef.injector,n=t.get(As);return n.run(()=>{lv(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Us),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),lv(e)){let n=()=>t.destroy(),r=e.platformInjector.get(cv);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(cv);n.add(t),e.moduleRef.onDestroy(()=>{Ih(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return kne(r,n,()=>{let n=t.get(Ss),r=n.add(),i=t.get(mh);return i.runInitializers(),i.donePromise.then(()=>{if(Sg(t.get(J_,xg)||`en-US`),!t.get(Ene,!0))return lv(e)?t.get(Ph):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(lv(e)){let n=t.get(Ph);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return One?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var One;function kne(e,t,n){try{let r=n();return Qm(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var uv=null;function Ane(e=[],t){return gs.create({name:t,providers:[{provide:Pa,useValue:`platform`},{provide:cv,useValue:new Set([()=>uv=null])},...e]})}function jne(e=[]){if(uv)return uv;let t=Ane(e);return uv=t,Mh(),Mne(t),t}function Mne(e){let t=e.get(Js,null);Za(e,()=>{t?.forEach(e=>e())})}function Nne(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;Ac(_c.BootstrapApplicationStart);try{let e=i?.injector??jne(r);return Dne({r3Injector:new th({providers:[hne(),Ws,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{Ac(_c.BootstrapApplicationEnd)}}function dv(e){return typeof e==`boolean`?e:e!=null&&e!==`false`}var fv=Symbol(`NOT_SET`),pv=new Set,Pne={...jn,kind:`afterRenderEffectPhase`,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:fv,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase<this.phase)return;this.sequence.erroredOrDestroyed=!0}this.sequence.scheduler.notify(7)},phaseFn(e){if(this.sequence.lastPhase=this.phase,!this.dirty||(this.dirty=!1,this.value!==fv&&!hn(this)))return this.signal;try{for(let e of this.cleanup??pv)e()}finally{this.cleanup?.clear()}let t=[];e!==void 0&&t.push(e),t.push(this.registerCleanupFn);let n=dn(this),r;try{r=this.userFn.apply(null,t)}finally{pn(this,n)}return(this.value===fv||!this.equal(this.value,r))&&(this.value=r,this.version++),this.signal}},Fne=class extends ed{scheduler;lastPhase=null;nodes=[void 0,void 0,void 0,void 0];onDestroyFns=null;constructor(e,t,n,r,i,a=null){super(e,[void 0,void 0,void 0,void 0],n,!1,i.get(vs),a),this.scheduler=r;for(let e of Qu){let n=t[e];if(n===void 0)continue;let r=Object.create(Pne);r.sequence=this,r.phase=e,r.userFn=n,r.dirty=!0,r.signal=()=>(rn(r),r.value),r.signal[$t]=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??pv)t()}finally{gn(e)}}};function mv(e,t){let n=t?.injector??S(gs),r=n.get($s),i=n.get(Zu),a=n.get(Ju,null,{optional:!0});i.impl??=n.get($u);let o=e;typeof o==`function`&&(o={mixedReadWrite:e});let s=n.get(Zs,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 hv=null;function gv(){return hv}function Ine(e){hv??=e}var Lne=class{},_v=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(_v||{}),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||{}),yv=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(yv||{}),bv={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 Rne(e){return _g(e)[yg.LocaleId]}function zne(e,t,n){let r=_g(e);return Ev(Ev([r[yg.DayPeriodsFormat],r[yg.DayPeriodsStandalone]],t),n)}function Bne(e,t,n){let r=_g(e);return Ev(Ev([r[yg.DaysFormat],r[yg.DaysStandalone]],t),n)}function Vne(e,t,n){let r=_g(e);return Ev(Ev([r[yg.MonthsFormat],r[yg.MonthsStandalone]],t),n)}function Hne(e,t){let n=_g(e)[yg.Eras];return Ev(n,t)}function xv(e,t){return Ev(_g(e)[yg.DateFormat],t)}function Sv(e,t){return Ev(_g(e)[yg.TimeFormat],t)}function Cv(e,t){let n=_g(e)[yg.DateTimeFormat];return Ev(n,t)}function wv(e,t){let n=_g(e),r=n[yg.NumberSymbols][t];if(r===void 0){if(t===bv.CurrencyDecimal)return n[yg.NumberSymbols][bv.Decimal];if(t===bv.CurrencyGroup)return n[yg.NumberSymbols][bv.Group]}return r}function Tv(e){if(!e[yg.ExtraData])throw new ui(2303,!1)}function Une(e){let t=_g(e);return Tv(t),(t[yg.ExtraData][2]||[]).map(e=>typeof e==`string`?Dv(e):[Dv(e[0]),Dv(e[1])])}function Wne(e,t,n){let r=_g(e);return Tv(r),Ev(Ev([r[yg.ExtraData][0],r[yg.ExtraData][1]],t)||[],n)||[]}function Ev(e,t){for(let n=t;n>-1;n--)if(e[n]!==void 0)return e[n];throw new ui(2304,!1)}function Dv(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var Gne=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Ov=Object.create(null),Kne=/((?:[^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]*)/,qne=256;function Jne(e,t,n,r){let i=ire(e);Yne(t),t=Av(n,t)||t;let a=[],o;for(;t;)if(o=Kne.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=Vv(r,s),i=rre(i,r));let c=``;return a.forEach(e=>{let t=tre(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function Yne(e){if(e.length>qne)throw new ui(2300,!1)}function kv(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function Av(e,t){let n=Rne(e);if(Ov[n]??=Object.create(null),Ov[n][t])return Ov[n][t];let r=``;switch(t){case`shortDate`:r=xv(e,yv.Short);break;case`mediumDate`:r=xv(e,yv.Medium);break;case`longDate`:r=xv(e,yv.Long);break;case`fullDate`:r=xv(e,yv.Full);break;case`shortTime`:r=Sv(e,yv.Short);break;case`mediumTime`:r=Sv(e,yv.Medium);break;case`longTime`:r=Sv(e,yv.Long);break;case`fullTime`:r=Sv(e,yv.Full);break;case`short`:let t=Av(e,`shortTime`),n=Av(e,`shortDate`);r=jv(Cv(e,yv.Short),[t,n]);break;case`medium`:let i=Av(e,`mediumTime`),a=Av(e,`mediumDate`);r=jv(Cv(e,yv.Medium),[i,a]);break;case`long`:let o=Av(e,`longTime`),s=Av(e,`longDate`);r=jv(Cv(e,yv.Long),[o,s]);break;case`full`:let c=Av(e,`fullTime`),l=Av(e,`fullDate`);r=jv(Cv(e,yv.Full),[c,l])}return r&&(Ov[n][t]=r),r}function jv(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return Object.hasOwn(t,n)?t[n]:e})),e}function Mv(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.length<t;)o=`0`+o;return r&&(o=o.slice(o.length-t)),a+o}function Xne(e,t){return Mv(e,3).substring(0,t)}function Nv(e,t,n=0,r=!1,i=!1){return function(a,o){let s=Zne(e,a);if((n>0||s>-n)&&(s+=n),e===3)s===0&&n===-12&&(s=12);else if(e===6)return Xne(s,t);let c=wv(o,bv.MinusSign);return Mv(s,t,c,r,i)}}function Zne(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 ui(2301,!1)}}function Pv(e,t,n=_v.Format,r=!1){return function(i,a){return Qne(i,a,e,t,n,r)}}function Qne(e,t,n,r,i,a){switch(n){case 2:return Vne(t,i,r)[e.getMonth()];case 1:return Bne(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=Une(t),a=Wne(t,i,r),s=e.findIndex(e=>{if(Array.isArray(e)){let[t,r]=e,i=n>=t.hours&&o>=t.minutes,a=n<r.hours||n===r.hours&&o<r.minutes;if(t.hours<r.hours){if(i&&a)return!0}else if(i||a)return!0}else if(e.hours===n&&e.minutes===o)return!0;return!1});if(s!==-1)return a[s]}return zne(t,i,r)[n<12?0:1];case 3:return Hne(t,r)[e.getFullYear()<=0?0:1];default:throw new ui(2302,!1)}}function Fv(e){return function(t,n,r){let i=-1*r,a=wv(n,bv.MinusSign),o=i>0?Math.floor(i/60):Math.ceil(i/60);switch(e){case 0:return(i>=0?`+`:``)+Mv(o,2,a)+Mv(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+Mv(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+Mv(o,2,a)+`:`+Mv(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+Mv(o,2,a)+`:`+Mv(Math.abs(i%60),2,a);default:throw new ui(2310,!1)}}}var $ne=0,Iv=4;function ere(e){let t=kv(e,$ne,1).getDay();return kv(e,0,1+(t<=Iv?Iv:11)-t)}function Lv(e){let t=e.getDay(),n=t===0?-3:Iv-t;return kv(e.getFullYear(),e.getMonth(),e.getDate()+n)}function Rv(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=Lv(n),t=ere(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return Mv(i,e,wv(r,bv.MinusSign))}}function zv(e,t=!1){return function(n,r){return Mv(Lv(n).getFullYear(),e,wv(r,bv.MinusSign),t)}}var Bv=Object.create(null);function tre(e){if(Bv[e])return Bv[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=Pv(3,vv.Abbreviated);break;case`GGGG`:t=Pv(3,vv.Wide);break;case`GGGGG`:t=Pv(3,vv.Narrow);break;case`y`:t=Nv(0,1,0,!1,!0);break;case`yy`:t=Nv(0,2,0,!0,!0);break;case`yyy`:t=Nv(0,3,0,!1,!0);break;case`yyyy`:t=Nv(0,4,0,!1,!0);break;case`Y`:t=zv(1);break;case`YY`:t=zv(2,!0);break;case`YYY`:t=zv(3);break;case`YYYY`:t=zv(4);break;case`M`:case`L`:t=Nv(1,1,1);break;case`MM`:case`LL`:t=Nv(1,2,1);break;case`MMM`:t=Pv(2,vv.Abbreviated);break;case`MMMM`:t=Pv(2,vv.Wide);break;case`MMMMM`:t=Pv(2,vv.Narrow);break;case`LLL`:t=Pv(2,vv.Abbreviated,_v.Standalone);break;case`LLLL`:t=Pv(2,vv.Wide,_v.Standalone);break;case`LLLLL`:t=Pv(2,vv.Narrow,_v.Standalone);break;case`w`:t=Rv(1);break;case`ww`:t=Rv(2);break;case`W`:t=Rv(1,!0);break;case`d`:t=Nv(2,1);break;case`dd`:t=Nv(2,2);break;case`c`:case`cc`:t=Nv(7,1);break;case`ccc`:t=Pv(1,vv.Abbreviated,_v.Standalone);break;case`cccc`:t=Pv(1,vv.Wide,_v.Standalone);break;case`ccccc`:t=Pv(1,vv.Narrow,_v.Standalone);break;case`cccccc`:t=Pv(1,vv.Short,_v.Standalone);break;case`E`:case`EE`:case`EEE`:t=Pv(1,vv.Abbreviated);break;case`EEEE`:t=Pv(1,vv.Wide);break;case`EEEEE`:t=Pv(1,vv.Narrow);break;case`EEEEEE`:t=Pv(1,vv.Short);break;case`a`:case`aa`:case`aaa`:t=Pv(0,vv.Abbreviated);break;case`aaaa`:t=Pv(0,vv.Wide);break;case`aaaaa`:t=Pv(0,vv.Narrow);break;case`b`:case`bb`:case`bbb`:t=Pv(0,vv.Abbreviated,_v.Standalone,!0);break;case`bbbb`:t=Pv(0,vv.Wide,_v.Standalone,!0);break;case`bbbbb`:t=Pv(0,vv.Narrow,_v.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=Pv(0,vv.Abbreviated,_v.Format,!0);break;case`BBBB`:t=Pv(0,vv.Wide,_v.Format,!0);break;case`BBBBB`:t=Pv(0,vv.Narrow,_v.Format,!0);break;case`h`:t=Nv(3,1,-12);break;case`hh`:t=Nv(3,2,-12);break;case`H`:t=Nv(3,1);break;case`HH`:t=Nv(3,2);break;case`m`:t=Nv(4,1);break;case`mm`:t=Nv(4,2);break;case`s`:t=Nv(5,1);break;case`ss`:t=Nv(5,2);break;case`S`:t=Nv(6,1);break;case`SS`:t=Nv(6,2);break;case`SSS`:t=Nv(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=Fv(0);break;case`ZZZZZ`:t=Fv(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=Fv(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=Fv(2);break;default:return null}return Bv[e]=t,t}function Vv(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function nre(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function rre(e,t,n){let r=e.getTimezoneOffset();return nre(e,-1*(Vv(t,r)-r))}function ire(e){if(Hv(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 kv(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(Gne))return are(n)}let t=new Date(e);if(!Hv(t))throw new ui(2311,!1);return t}function are(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 Hv(e){return e instanceof Date&&!isNaN(e.valueOf())}var Uv=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=S(gs);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)(Rp(vm))};static ɵdir=sh({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[xc]})}return e})();function ore(e,t){return new ui(2100,!1)}var sre=`mediumDate`,cre=new Ti(``),lre=new Ti(``),Wv=(()=>{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??sre,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Jne(t,e,i||this.locale,a)}catch(t){throw ore(e,t.message)}}static ɵfac=function(t){return new(t||e)(Rp(J_,16),Rp(cre,24),Rp(lre,24))};static ɵpipe=ch({name:`date`,type:e,pure:!0})}return e})(),Gv=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=ch({name:`json`,type:e,pure:!1})}return e})();function ure(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 dre=`browser`,Kv=class{_doc;constructor(e){this._doc=e}manager},qv=(()=>{class e extends Kv{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)(ea(_s))};static ɵprov=vi({token:e,factory:e.ɵfac})}return e})(),Jv=new Ti(``),Yv=(()=>{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 qv));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof qv);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 ui(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(ea(Jv),ea(As))};static ɵprov=vi({token:e,factory:e.ɵfac})}return e})(),Xv=`ng-app-id`;function Zv(e){for(let t of e)t.remove()}function Qv(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function fre(e,t,n,r){let i=e.head?.querySelectorAll(`style[${Xv}="${t}"],link[${Xv}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(Xv),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 $v(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var ey=(()=>{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,fre(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,Qv);t?.forEach(e=>this.addUsage(e,this.external,$v))}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&&(Zv(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Zv(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,Qv(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,$v(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)(ea(_s),ea(Ks),ea(Xs,8),ea(Ys))};static ɵprov=vi({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`},ny=/%COMP%/g,ry=`%COMP%`,pre=`_nghost-${ry}`,mre=`_ngcontent-${ry}`,hre=!0,gre=new Ti(``,{factory:()=>hre}),_re=new Ti(``);function vre(e){return mre.replace(ny,e)}function yre(e){return pre.replace(ny,e)}function iy(e,t){return t.map(t=>t.replace(ny,e))}var ay=(()=>{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 oy(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 uy?n.applyToHost(e):n instanceof ly&&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 iu.Emulated:r=new uy(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case iu.ShadowDom:return new cy(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case iu.ExperimentalIsolatedShadowDom:return new cy(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new ly(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)(ea(Yv),ea(Ip),ea(Ks),ea(gre),ea(_s),ea(As),ea(Xs),ea(Ju,8),ea(_re,8))};static ɵprov=vi({token:e,factory:e.ɵfac})}return e})(),oy=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){(sy(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=sy(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new ui(-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 ui(-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&(ku.DashCase|ku.Important)?e.style.setProperty(t,n,r&ku.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&ku.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=gv().getGlobalEventTarget(this.doc,e),!e))throw new ui(-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 sy(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var cy=class extends oy{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=iy(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=$v(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)}},ly=class extends oy{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?iy(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&&Iu.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},uy=class extends ly{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=vre(l),this.hostAttr=yre(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}},bre=class e extends Lne{supportsDOMEvents=!0;static makeCurrent(){Ine(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=xre();return t==null?null:Sre(t)}resetBaseElement(){dy=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return ure(document.cookie,e)}},dy=null;function xre(){return dy||=document.head.querySelector(`base`),dy?dy.getAttribute(`href`):null}function Sre(e){return new URL(e,document.baseURI).pathname}var fy=[`alt`,`control`,`meta`,`shift`],Cre={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},wre={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},Tre=(()=>{class e extends Kv{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(()=>gv().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.`),fy.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=Cre[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`),fy.forEach(t=>{if(t!==n){let n=wre[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)(ea(_s))};static ɵprov=vi({token:e,factory:e.ɵfac})}return e})();async function Ere(e,t,n){return Nne({rootComponent:e,...Dre(t,n)})}function Dre(e,t){return{platformRef:t?.platformRef,appProviders:[...my,...e?.providers??[]],platformProviders:py}}function Ore(){bre.makeCurrent()}function kre(){return new Hs}function Are(){return Kl(document),document}var py=[{provide:Ys,useValue:dre},{provide:Js,useValue:Ore,multi:!0},{provide:_s,useFactory:Are}],my=[{provide:Pa,useValue:`root`},{provide:Hs,useFactory:kre},{provide:Jv,useClass:qv,multi:!0},{provide:Jv,useClass:Tre,multi:!0},ay,{provide:Ip,useClass:ey},{provide:ey,useExisting:Ip},Yv,{provide:np,useExisting:ay},[]];function hy(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<i.length;e++)a+=i[e],e<t.length&&(a+=String(t[e]));return`${n}${a}${r}`}return`${n}${String(e)}${r}`})}var gy={blue:hy(34,39),cyan:hy(36,39),gray:hy(90,39),green:hy(32,39),red:hy(31,39),yellow:hy(33,39),bold:hy(1,22),dim:hy(2,22),reset:hy(0,0),underline:hy(4,24)};function _y(e,...t){return typeof e==`function`?e(...t):e}var vy=Error.captureStackTrace,yy=class e extends Error{name;code;docs;fix;sources;data;get why(){return this.message}constructor(t,n=e){super(t.why,{cause:t.cause}),this.code=this.name=t.code,this.fix=t.fix,this.docs=t.docs,this.sources=t.sources,this.data=t.data,vy?.(this,n)}toJSON(){return{name:this.name,why:this.why,fix:this.fix,docs:this.docs,sources:this.sources,cause:this.cause,data:this.data,stack:this.stack}}};function by(e,t){return typeof e==`string`?`${e}/${t.toLowerCase()}`:e?.(t)}function xy(e){let t=e.reporters??[],n={},{docsBase:r}=e;for(let i of Object.keys(e.codes)){let a=e.codes[i],o=a.docs===!1?void 0:a.docs||by(r,i),s=(e={},n={})=>{let r=new yy({code:i,why:_y(a.why,e),fix:_y(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:_y(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function Sy(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<r.length-1?`├▶`:`╰▶`)} ${t}`)].join(` `)}}var Cy={bus:{agentManifestChanged:`agent:manifest:changed`,agentToolRegistered:`agent:tool:registered`,agentToolUnregistered:`agent:tool:unregistered`,agentResourceRegistered:`agent:resource:registered`,agentResourceUnregistered:`agent:resource:unregistered`},client:{isTrustedUpdated:`rpc:is-trusted:updated`,error:`rpc:error`,connectionStatus:`connection:status`,connectionError:`connection:error`},broadcast:{authRevoked:`devframe:auth:revoked`,cacheInvalidate:`devframe:rpc:cache:invalidate`,clientStateUpdated:`devframe:rpc:client-state:updated`,clientStatePatch:`devframe:rpc:client-state:patch`,streamingChunk:`devframe:streaming:chunk`,streamingEnd:`devframe:streaming:end`,streamingUploadCancel:`devframe:streaming:upload-cancel`},inPageChannel:{panelStateUpdated:`devframe:in-page:panel-state:updated`,panelStatePatch:`devframe:in-page:panel-state:patch`},postMessage:{remoteAssetsError:`devframe:remote-assets-error`,inPageChannel:`devframe:in-page-channel`}},wy=Sy(gy);function Ty(e,{method:t=`warn`}={}){console[t](wy(e))}function Ey(e){return xy({...e,reporters:[Ty,...e.reporters??[]]})}function Dy(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var Oy=Math.random.bind(Math),ky=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Ay(e=21){let t=``,n=e;for(;n--;)t+=ky[Oy()*64|0];return t}var jy=6e4,My=e=>e,Ny=My,{clearTimeout:Py,setTimeout:Fy}=globalThis;function Iy(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=My,deserialize:s=Ny,resolver:c,bind:l=`rpc`,timeout:u=jy,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}=Dy(),_=Ay();s.i=_;let ee;async function te(n=s){return u>=0&&(ee=Fy(()=>{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{Py(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&&(Py(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(ne),h}function Ly(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var Ry=Object.freeze({type:`object`,additionalProperties:!0});function zy(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return Ry}return Ry}function By(e){if(!e||e.length===0)return{type:`object`,properties:{}};let t={},n=[];for(let r=0;r<e.length;r++){let i=`arg${r}`;t[i]=zy(e[r]),n.push(i)}return{type:`object`,properties:t,required:n,additionalProperties:!1}}function Vy(e,t){if(Array.isArray(e))return e;if(e==null)return[];if(typeof e!=`object`)return;let n=e;if(t!=null)return Array.from({length:t},(e,t)=>n[`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 Hy(e,t){return Vy(e,t)??[e]}function Uy(e){return typeof e==`string`?`'${e}'`:new qy().serialize(e)}var Wy=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Gy=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Wy.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Ky(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length),r=0;for(let i=0;i<n;i++){let n=e.charCodeAt(i),a=t.charCodeAt(i);if(n===a)continue;let o=n<128&&Gy[n]?Gy[n]:n+128,s=a<128&&Gy[a]?Gy[a]:a+128;if(o!==s)return o<s?-1:1;r===0&&(r=n>a?-1:1)}return e.length===t.length?r:e.length<t.length?-1:1}var qy=(function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?Ky(e,t):n===`number`&&r===`number`?e-t:Ky(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0?``:n.name;if(r!==``&&globalThis[r]===n)return this.serializeBuiltInType(r,e);if(`toJSON`in e&&typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}let i=Object.keys(e).sort(Ky),a=`${r}{`;for(let t=0;t<i.length;t++){let n=i[t];a+=`${n}:${this.serialize(e[n])}`,t<i.length-1&&(a+=`,`)}return a+`}`}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r=`${e}{`;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+=`${this.serialize(t,!0)}:${this.serialize(i)}`,e<n.length-1&&(r+=`,`)}return r+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.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})(),Jy=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Yy=[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],Xy=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,Zy=[],Qy=class{_data=new $y;_hash=new $y([...Jy]);_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)Zy[n]=e[t+n]|0;else{let e=Zy[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=Zy[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;Zy[n]=t+Zy[n-7]+i+Zy[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+Yy[n]+Zy[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=$y.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<r;e+=16)this._doProcessBlock(this._data.words,e);t=this._data.words.splice(0,r),this._data.sigBytes-=i}return new $y(t,i)}},$y=class e{words;sigBytes;constructor(e,t){e=this.words=e||[],this.sigBytes=t===void 0?e.length*4:t}static fromUtf8(t){let n=unescape(encodeURIComponent(t)),r=n.length,i=[];for(let e=0;e<r;e++)i[e>>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(i,r)}toBase64(){let e=[];for(let t=0;t<this.sigBytes;t+=3){let n=this.words[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<this.sigBytes*8;n++)e.push(Xy.charAt(a>>>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<e.sigBytes;t++){let n=e.words[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<e.sigBytes;t+=4)this.words[this.sigBytes+t>>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function eb(e){return new Qy().finalize(e).toBase64()}function tb(e){return eb(Uy(e))}function nb(e){return tb(e)}function rb(){let e={};function t(t,...n){let r=e[t]||[];for(let e=0,t=r.length;e<t;e++){let t=r[e];t&&t(...n)}}function n(n,...r){t(n,...r),delete e[n]}function r(t,n){return(e[t]||=[]).push(n),()=>{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 ib=/^[\w+.-]{2,}:\/\//;function ab(e){return e.endsWith(`/`)?e:`${e}/`}function ob(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function sb(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?ab(n)+e.replace(/^\.?\//,``):e);return n}function cb(e,t){if(!t||t===`/`||ib.test(e))return e;let n=ob(t);return e.startsWith(n)?e:sb(n,e)}function lb(e,t){let n=e.match(ib);return t+(n?e.slice(n[0].length):e)}var ub=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function db(e=21){let t=``,n=e;for(;n--;)t+=ub[Math.random()*64|0];return t}var fb=Symbol.for(`immer-nothing`),pb=Symbol.for(`immer-draftable`),mb=Symbol.for(`immer-state`),hb=[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 gb(e,...t){{let n=hb[e],r=Bb(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var _b=Object,vb=_b.getPrototypeOf,yb=`constructor`,bb=`prototype`,xb=`configurable`,Sb=`enumerable`,Cb=`writable`,wb=`value`,Tb=e=>!!e&&!!e[mb];function Eb(e){return e?kb(e)||Ib(e)||!!e[pb]||!!e[yb]?.[pb]||Lb(e)||Rb(e):!1}var Db=_b[bb][yb].toString(),Ob=new WeakMap;function kb(e){if(!e||!zb(e))return!1;let t=vb(e);if(t===null||t===_b[bb])return!0;let n=_b.hasOwnProperty.call(t,yb)&&t[yb];if(n===Object)return!0;if(!Bb(n))return!1;let r=Ob.get(n);return r===void 0&&(r=Function.toString.call(n),Ob.set(n,r)),r===Db}function Ab(e,t,n=!0){jb(e)===0?(n?Reflect.ownKeys(e):_b.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function jb(e){let t=e[mb];return t?t.type_:Ib(e)?1:Lb(e)?2:Rb(e)?3:0}var Mb=(e,t,n=jb(e))=>n===2?e.has(t):_b[bb].hasOwnProperty.call(e,t),Nb=(e,t,n=jb(e))=>n===2?e.get(t):e[t],Pb=(e,t,n,r=jb(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Fb(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var Ib=Array.isArray,Lb=e=>e instanceof Map,Rb=e=>e instanceof Set,zb=e=>typeof e==`object`,Bb=e=>typeof e==`function`,Vb=e=>typeof e==`boolean`;function Hb(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Ub=e=>zb(e)?e?.[mb]:null,Wb=e=>e.copy_||e.base_,Gb=e=>e.modified_?e.copy_:e.base_;function Kb(e,t){if(Lb(e))return new Map(e);if(Rb(e))return new Set(e);if(Ib(e))return Array[bb].slice.call(e);let n=kb(e);if(t===!0||t===`class_only`&&!n){let t=_b.getOwnPropertyDescriptors(e);delete t[mb];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[Cb]===!1&&(a[Cb]=!0,a[xb]=!0),(a.get||a.set)&&(t[i]={[xb]:!0,[Cb]:!0,[Sb]:a[Sb],[wb]:e[i]})}return _b.create(vb(e),t)}{let t=vb(e);if(t!==null&&n)return{...e};let r=_b.create(t);return _b.assign(r,e)}}function qb(e,t=!1){return Xb(e)||Tb(e)||!Eb(e)?e:(jb(e)>1&&_b.defineProperties(e,{set:Yb,add:Yb,clear:Yb,delete:Yb}),_b.freeze(e),t&&Ab(e,(e,t)=>{qb(t,!0)},!1),e)}function Jb(){gb(2)}var Yb={[wb]:Jb};function Xb(e){return e===null||!zb(e)||_b.isFrozen(e)}var Zb=`MapSet`,Qb=`Patches`,$b=`ArrayMethods`,ex={};function tx(e){let t=ex[e];return t||gb(0,e),t}var nx=e=>!!ex[e];function rx(e,t){ex[e]||(ex[e]=t)}var ix,ax=()=>ix,ox=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:nx(Zb)?tx(Zb):void 0,arrayMethodsPlugin_:nx($b)?tx($b):void 0});function sx(e,t){t&&(e.patchPlugin_=tx(Qb),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function cx(e){lx(e),e.drafts_.forEach(dx),e.drafts_=null}function lx(e){e===ix&&(ix=e.parent_)}var ux=e=>ix=ox(ix,e);function dx(e){let t=e[mb];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function fx(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[mb].modified_&&(cx(t),gb(4)),Eb(e)&&(e=px(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[mb].base_,e,t)}else e=px(t,n);return mx(t,e,!0),cx(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===fb?void 0:e}function px(e,t){if(Xb(t))return t;let n=t[mb];if(!n)return Sx(t,e.handledSet_,e);if(!gx(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);bx(n,e)}return n.copy_}function mx(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&qb(t,n)}function hx(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var gx=(e,t)=>e.scope_===t,_x=[];function vx(e,t,n,r){let i=Wb(e),a=e.type_;if(r!==void 0&&Nb(i,r,a)===t){Pb(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Ab(i,(e,n)=>{if(Tb(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??_x;for(let e of o)Pb(i,e,n,a)}function yx(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!gx(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Gb(i);vx(e,i.draft_??i,a,n),bx(i,r)})}function bx(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)}hx(e)}}function xx(e,t,n){let{scope_:r}=e;if(Tb(n)){let i=n[mb];gx(i,r)&&i.callbacks_.push(function(){jx(e),vx(e,n,Gb(i),t)})}else Eb(n)&&e.callbacks_.push(function(){let i=Wb(e);e.type_===3?i.has(n)&&Sx(n,r.handledSet_,r):Nb(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Sx(Nb(e.copy_,t,e.type_),r.handledSet_,r)})}function Sx(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Tb(e)||t.has(e)||!Eb(e)||Xb(e)?e:(t.add(e),Ab(e,(r,i)=>{if(Tb(i)){let t=i[mb];gx(t,n)&&(Pb(e,r,Gb(t),e.type_),hx(t))}else Eb(i)&&Sx(i,t,n)}),e)}function Cx(e,t){let n=Ib(e),r={type_:+!!n,scope_:t?t.scope_:ax(),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=wx;n&&(i=[r],a=Tx);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var wx={get(e,t){if(t===mb)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=Wb(e);if(!Mb(i,t,e.type_))return Ox(e,i,t);let a=i[t];if(e.finalized_||!Eb(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Hb(t))return a;if(a===Ex(e.base_,t)||Dx(e,t,a)){jx(e);let n=e.type_===1?+t:t,r=Nx(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in Wb(e)},ownKeys(e){return Reflect.ownKeys(Wb(e))},set(e,t,n){let r=kx(Wb(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Ex(Wb(e),t),i=r?.[mb];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(Fb(n,r)&&(n!==void 0||Mb(e.base_,t,e.type_)))return!0;jx(e),Ax(e)}return e.copy_[t]===n&&(n!==void 0||Mb(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),xx(e,t,n),!0)},deleteProperty(e,t){return jx(e),Ex(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Ax(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Wb(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Cb]:!0,[xb]:e.type_!==1||t!==`length`,[Sb]:r[Sb],[wb]:n[t]}},defineProperty(){gb(11)},getPrototypeOf(e){return vb(e.base_)},setPrototypeOf(){gb(12)}},Tx={};for(let e in wx){let t=wx[e];Tx[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}Tx.deleteProperty=function(e,t){return isNaN(parseInt(t))&&gb(13),Tx.set.call(this,e,t,void 0)},Tx.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&gb(14),wx.set.call(this,e[0],t,n,e[0])};function Ex(e,t){let n=e[mb];return(n?Wb(n):e)[t]}function Dx(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Eb(n)||n[mb]?!1:e.baseRefs_.has(n)}function Ox(e,t,n){let r=kx(t,n);return r?wb in r?r[wb]:r.get?.call(e.draft_):void 0}function kx(e,t){if(!(t in e))return;let n=vb(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=vb(n)}}function Ax(e){e.modified_||(e.modified_=!0,e.parent_&&Ax(e.parent_))}function jx(e){e.copy_||=(e.assigned_=new Map,Kb(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Mx=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Bb(e)&&!Bb(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Bb(t)||gb(6),n!==void 0&&!Bb(n)&&gb(7);let r;if(Eb(e)){let i=ux(this),a=Nx(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?cx(i):lx(i)}return sx(i,n),fx(r,i)}if(!e||!zb(e)){if(r=t(e),r===void 0&&(r=e),r===fb&&(r=void 0),this.autoFreeze_&&qb(r,!0),n){let t=[],i=[];tx(Qb).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}gb(1,e)},this.produceWithPatches=(e,t)=>{if(Bb(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]},Vb(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Vb(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Vb(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Eb(e)||gb(8),Tb(e)&&(e=Px(e));let t=ux(this),n=Nx(t,e,void 0);return n[mb].isManual_=!0,lx(t),n}finishDraft(e,t){let n=e&&e[mb];(!n||!n.isManual_)&&gb(9);let{scope_:r}=n;return sx(r,t),fx(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=tx(Qb).applyPatches_;return Tb(e)?r(e,t):this.produce(e,e=>r(e,t))}};function Nx(e,t,n,r){let[i,a]=Lb(t)?tx(Zb).proxyMap_(t,n):Rb(t)?tx(Zb).proxySet_(t,n):Cx(t,n);return(n?.scope_??ax()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?yx(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 Px(e){return Tb(e)||gb(10,e),Fx(e)}function Fx(e){if(!Eb(e)||Xb(e))return e;let t=e[mb],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Kb(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Kb(e,!0);let i=n;return Rb(n)&&(n=new Set),Ab(i,(e,t)=>{Pb(n,e,Fx(t))},r),t&&(t.finalized_=!1),n}function Ix(){hb.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=Ub(Nb(e,n.key_)),i=Nb(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||Mb(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<t.length-1;e++){let r=t[e];if(n=Nb(n,r),!zb(n)||n===null)throw Error(`Cannot resolve path at '${t.join(`/`)}'`)}return n}let n=`replace`,r=`remove`;function i(e,t,n){if(e.scope_.processedForPatches_.has(e))return;e.scope_.processedForPatches_.add(e);let{patches_:r,inversePatches_:i}=n;switch(e.type_){case 0:case 2:return o(e,t,r,i);case 1:return a(e,t,r,i);case 3:return s(e,t,r,i)}}function a(e,t,i,a){let{base_:o,assigned_:s}=e,c=e.copy_;c.length<o.length&&([o,c]=[c,o],[i,a]=[a,i]);let l=e.allIndicesReassigned_===!0;for(let e=0;e<o.length;e++){let r=c[e],u=o[e];if((l||s?.get(e.toString()))&&r!==u){let o=r?.[mb];if(o&&o.modified_)continue;let s=t.concat([e]);i.push({op:n,path:s,value:d(r)}),a.push({op:n,path:s,value:d(u)})}}for(let e=o.length;e<c.length;e++){let n=t.concat([e]);i.push({op:`add`,path:n,value:d(c[e])})}for(let e=c.length-1;o.length<=e;--e){let n=t.concat([e]);a.push({op:r,path:n})}}function o(e,t,i,a){let{base_:o,copy_:s,type_:c}=e;Ab(e.assigned_,(e,l)=>{let u=Nb(o,e,c),f=Nb(s,e,c),p=l?Mb(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===fb?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<i.length-1;e++){let t=jb(o),n=i[e];typeof n!=`string`&&typeof n!=`number`&&(n=``+n),(t===0||t===1)&&(n===`__proto__`||n===yb)&&gb(19),Bb(o)&&n===bb&&gb(19),o=Nb(o,n),(o===null||!zb(o))&&gb(18,i.join(`/`))}let s=jb(o),c=u(t.value),l=i[i.length-1];switch(a){case n:switch(s){case 2:return o.set(l,c);case 3:gb(16);default:return o[l]=c}case`add`:switch(s){case 1:return l===`-`?o.push(c):o.splice(l,0,c);case 2:return o.set(l,c);case 3:return o.add(c);default:return o[l]=c}case r:switch(s){case 1:return o.splice(l,1);case 2:return o.delete(l);case 3:return o.delete(t.value);default:return delete o[l]}default:gb(17,a)}}),e}function u(e){if(!Eb(e))return e;if(Ib(e))return e.map(u);if(Lb(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,u(t)]));if(Rb(e))return new Set(Array.from(e).map(u));let t=Object.create(vb(e));for(let n in e)t[n]=u(e[n]);return Mb(e,pb)&&(t[pb]=e[pb]),t}function d(e){return Tb(e)?u(e):e}rx(Qb,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var Lx=new Mx,Rx=Lx.produce,zx=Lx.produceWithPatches.bind(Lx),Bx=Lx.applyPatches.bind(Lx),Vx=1e3;function Hx(e,t){if(e.add(t),e.size>Vx){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function Ux(e){let{enablePatches:t=!1}=e;t&&Ix();let n=rb(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=db())=>{i.has(t)||(Ix(),r=Bx(r,e),Hx(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=db())=>{if(!i.has(a)){if(Hx(i,a),t){let[t,i]=zx(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=Rx(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var Wx=typeof self==`object`?self:globalThis,Gx=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),Kx=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function qx(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=Gx.has(e)?Wx[e]:void 0;return n(new(r??Wx.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`&&Kx.has(a))return n(new Wx[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function Jx(e){return qx(new Map,e)(0)}var Yx=``,{toString:Xx}={},{keys:Zx}=Object;function Qx(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Xx.call(e).slice(8,-1);switch(n){case`Array`:return[1,Yx];case`Object`:return[2,Yx];case`Date`:return[3,Yx];case`RegExp`:return[4,Yx];case`Map`:return[5,Yx];case`Set`:return[6,Yx];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function $x([e,t]){return e===0&&(t===`function`||t===`symbol`)}function eS(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]=Qx(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 Zx(r))(e||!$x(Qx(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||!($x(Qx(n))||$x(Qx(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!$x(Qx(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function tS(e,t={}){let n=[];return eS(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:nS,stringify:rS}=JSON,iS={json:!0,lossy:!0};function aS(e){return Jx(nS(e))}function oS(e){return rS(tS(e,iS))}function sS(e){return Jx(e)}function cS(e){return oS(e)}function lS(e){return aS(e)}var uS=256,dS=class extends Error{name=`StreamClosedError`};function fS(e={}){let t=e.id??db(),n=Math.max(0,e.replayWindow??0),r=rb(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new dS(`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=mS(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 pS(e={}){let t=e.id??db(),n=Math.max(1,e.highWaterMark??uS),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 mS(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 hS=128;function gS(e){return e.replace(/[^\w-]+/g,`_`).slice(0,hS)}var _S=`modulepreload`,vS=function(e,t){return new URL(e,t).href},yS={},bS=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=vS(t,n),t=s(t),t in yS)return;yS[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`:_S,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)})},xS=`__connection.json`,SS=`__DEVFRAME_CONNECTION__`,CS=`x-birpc-session`,wS=`__rpc-dump/index.json`,TS=`devframe:services`,ES=`devframe_otp`,DS=`devframe_auth_token`;Cy.postMessage.remoteAssetsError;var OS=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>nb(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()}},kS=Ey({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 AS(e){if(e.agent&&e.jsonSerializable===!1)throw kS.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function jS(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function MS(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 NS(e,t,n){let r=n.slice();if(!t||t.length===0)return r;for(let r=0;r<t.length;r++){let i=t[r];if(!i)continue;let a=await jS(i,n[r]);if(a.issues)throw kS.DF0043({name:e,index:r,issues:MS(a.issues)})}return r}async function PS(e,t,n){if(!t)return n;let r=await jS(t,n);if(r.issues)throw kS.DF0044({name:e,issues:MS(r.issues)});return n}async function FS(e,t){if(!e.setup)return{};if(typeof t==`object`&&t){e.__cache??=new WeakMap;let n=e.__cache,r=n.get(t);return r||(r=Promise.resolve(e.setup(t)),r.catch(()=>{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 IS(e,t){let n=e.handler;if(!n){let r=await FS(e,t);if(!r.handler)throw kS.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 NS(e.name,r,t),o=await a(...n);return await PS(e.name,i,o)}}var LS=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 IS(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 kS.DF0021({name:e.name});AS(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 kS.DF0022({name:e.name});AS(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 IS(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw kS.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 RS(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 BS(t,`undefined`,r,e);return n}return i!==null&&zS(i,r,e,t),n})}function zS(e,t,n,r){if(typeof e==`bigint`)throw BS(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw BS(r,`Map`,t,n);if(e instanceof Set)throw BS(r,`Set`,t,n);if(e instanceof Date)throw BS(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw BS(r,e.constructor?.name??`class instance`,t,n)}function BS(e,t,n,r){let i=VS(n,r);return kS.DF0020({name:e||`<anonymous>`,type:t,path:i})}function VS(e,t){return Array.isArray(e)?`[${t}]`:t===``?`<root>`:t}var HS=`__DEVFRAME_CONNECTION_META__`,US=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function WS(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 GS(){return WS(SS)}function KS(){return WS(HS)}function qS(e){if(e)return e;try{let e=localStorage.getItem(US);if(e)return e}catch{}return WS(US)}function JS(e){globalThis[SS]=e,globalThis[HS]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&YS(e.authToken)}function YS(e){try{localStorage.setItem(US,e)}catch{}globalThis[US]=e;let t=GS();t&&(globalThis[SS]={...t,authToken:e})}function XS(e){let t=cb(xS,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function ZS(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function QS(){let e=GS();if(e)return ZS(e,qS()??e.authToken??e.connectionMeta.authToken);let t=KS();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??XS(`./`),authToken:qS(t.authToken)}}async function $S(e={}){if(e.connection){let t=ZS(e.connection,qS(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return JS(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:XS(t[0]??`./`),authToken:qS(e.authToken??e.connectionMeta.authToken)};return JS(n),n}let n=QS();if(n){let t=ZS(n,qS(e.authToken??n.authToken??n.connectionMeta.authToken));return JS(t),t}let r=[];for(let n of t){let t=cb(xS,n),i=XS(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:qS(e.authToken??r.authToken)};return JS(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var eC=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function tC(e=ES){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function nC(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 rC(e=ES){let t=tC(e);return t&&nC(e),t}async function iC(e,t={}){let n=rC(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function aC(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(TS,{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 oC(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:Cy.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:Cy.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=Ux({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(Cy.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var sC=new Map;function cC(e=sC){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?RS(n,r??``):`s:${cS(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?lS(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function lC(){}function uC(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 dC(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 fC(e){let{onConnected:t=lC,onError:n=lC,onDisconnected:r=lC,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${DS}=${encodeURIComponent(e.authToken)}`);let s=cC(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=uC(r);if(!e)break;r=e.rest;let{event:t,data:n}=dC(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`,[CS]: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 pC(e,t){let{channel:n,rpcOptions:r={}}=t;return Iy(e,{...n,timeout:-1,...r,proxify:!1})}function mC(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(Cy.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 eC(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new eC(`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(Cy.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 eC(`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(Cy.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(Cy.client.connectionError,e),m(new eC(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new eC(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),te=pC(a.functions,{channel:ee,rpcOptions:o});a.register({name:Cy.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new eC(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(Cy.client.connectionError,e),m(e),i.emit(Cy.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 eC(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(Cy.client.connectionError,e)}return i.emit(Cy.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(Cy.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(Cy.client.error,n,t),Promise.reject(n)):g(te.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(Cy.client.error,t,String(e[0]));return}return te.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(Cy.client.error,n,t),Promise.reject(n)):g(te.$callOptional(...e),t)},close:()=>{ee.close()}}}function hC(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 gC(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=hC(n.sse,r??`./`,location);return mC({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>fC({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 _C(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:vC(r)?_C(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function vC(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function yC(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function bC(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function xC(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function SC(e){if(e.error)throw _C(e.error);return e.output}function CC(e){return e.some(e=>e!=null)}function wC(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function TC(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?sS(e):e}function a(e,t){return i(wC(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 xC(r)?SC(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(yC(r)){if(CC(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(bC(r)){let e=nb(n),i=r.records[e];if(i)return SC(await s(i,r.serialization));if(r.fallback)return SC(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!CC(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 EC(e){let t=TC(await e.fetchJsonFromBases(wS),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 DC=``;function OC(e,t){return`${e}${DC}${t}`}function kC(e){let t=new Map,n=new Map;e.client.register({name:Cy.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(OC(e,n))?._push(r,i)}}),e.client.register({name:Cy.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=OC(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:Cy.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=OC(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(Cy.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(DC);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=OC(n,r),o=t.get(a);if(o)return o;let s=pS({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(Cy.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=OC(t,r),a=n.get(i);if(a)return a;let o=fS({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 AC(){}var jC=new Map;function MC(e){let t=e.url;e.authToken&&(t=`${t}?${DS}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=AC,onError:i=AC,onDisconnected:a=AC,definitions:o=jC}=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=cC(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 NC(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 lb(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function PC(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=NC(n.websocket,r??`./`,location);return mC({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>MC({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 FC(e){return e.includes(`:`)}function IC(e,t){return FC(t)?t:`${e}:${t}`}function LC(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 RC(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 LC(a)}function zC(e,t){return{global:RC(e,t,`global`),project:RC(e,t,`project`)}}function BC(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(FC(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(IC(t,n),...r)),callEvent:((n,...r)=>e.callEvent(IC(t,n),...r)),callOptional:((n,...r)=>e.callOptional(IC(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(IC(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(IC(t,n),r,i),upload:(n,r)=>e.streaming.upload(IC(t,n),r)}},settings:zC(e,t),scope:e.scope}}function VC(){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 HC(e,t={}){let n=t.modelContext??VC();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=gS(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=Ly(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:By(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>UC(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 UC(e,t,n){try{let r=Hy(n,e.args?.length);return{content:[{type:`text`,text:WC(await(await IS(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:GC(e)}]}}}function WC(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function GC(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 KC(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 qC(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=rb(),a=Array.isArray(t)?t:[t],o=await $S(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new OS({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new LS(f),m=e.webmcp===!1?void 0:HC(p),h,g=!1,_=0,ee;function te(){_++,ee=void 0,d.clear(),r===!0&&d.updateOptions({functions:[]})}r&&(p.register({name:Cy.broadcast.cacheInvalidate,type:`event`,handler:te}),i.on(Cy.client.connectionStatus,te),i.on(Cy.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(cb(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 eC(`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=KC(e.transport??`auto`,s);ae=se===`static`?await EC({fetchJsonFromBases:ne}):se===`sse`?gC({...oe,sseOptions:e.sseOptions}):PC({...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=>(YS(e),o={...o,authToken:e},ae.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await ae.requestTrustWithCode(e);if(!t)return!1;YS(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=oC(pe),pe.streaming=kC(pe),pe.services=aC(pe);let me=new Map;pe.scope=(e=>{if(!e)return pe;let t=me.get(e);return t||(t=BC(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 iC(pe,{param:n}):!1;t||r||pe.isTrusted||await ge()}return le=_e().then(()=>{ue=!0},()=>{ue=!0}),s.mcp&&bS(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-KH4HHvHf-BjQp5LKx.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 JC=qC,YC=[`components`,`injectors`,`signals`,`ngrx`,`tanstackQuery`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`,`errors`,`plugins`],XC=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function ZC(e){return`pangular:${e}`}var QC=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`,`tanstackQuery`,`plugins`],$C={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}},ew={"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`},tw=[[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 nw(e){return tw.some(([t])=>t===e)}var rw=/^[a-z][a-z0-9-]{0,39}$/;function iw(e,t){let n=t.plugins?.[e],r=t.inspectors.plugins&&rw.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 aw=`pangular`,ow={mod:`Mod`,ctrl:`Ctrl`,control:`Ctrl`,meta:`Meta`,cmd:`Meta`,command:`Meta`,alt:`Alt`,option:`Alt`,opt:`Alt`,shift:`Shift`},sw=[`Mod`,`Ctrl`,`Meta`,`Alt`,`Shift`];function cw(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=ow[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[...sw.filter(e=>n.has(e)),r].join(`+`)}function lw(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 uw(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 dw=[{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`}],fw=1e4;function pw(e){return dw.filter(t=>!(`inspector`in t)||e.inspectors[t.inspector])}var mw={components:`a component instance, by its id in the component tree`,injectors:`a component's element injector, by the component's id`,signals:`a component's signal graph, by the component's id`,forms:`a form, by its id`},hw=200;function gw(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 _w(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=e=>{let n=t.get(e)?.trim();return n&&n.length<=hw?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 vw=[{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 yw(e){let t=pw(e).map(e=>({id:`tab:${e.id}`,title:`Go to ${e.label}`,group:`Go to`,keywords:`tab open`})),n=vw.filter(t=>!t.inspector||e.inspectors[t.inspector]).map(({inspector:e,...t})=>t);return[...t,...n]}function bw(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}var xw=Object.freeze({minLength:24,threshold:4.5}),Sw={min:16,max:512},Cw={min:2,max:6};function ww(e){return typeof e==`number`&&Number.isInteger(e)&&e>=Sw.min&&e<=Sw.max}function Tw(e){return typeof e==`number`&&Number.isFinite(e)&&e>=Cw.min&&e<=Cw.max}function Ew(e){if(e===!0)return{...xw};if(!e||typeof e!=`object`||Array.isArray(e))return;let{minLength:t,threshold:n}=e;return{minLength:ww(t)?t:xw.minLength,threshold:Tw(n)?n:xw.threshold}}function Dw(e){let t=Ew(e);return t?{entropy:t}:{}}function Ow(e,t){return typeof e==`boolean`?e:t}var kw=100,Aw=100;function jw(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=Aw);return[...new Set(t)].slice(0,kw)}function Mw(e,t){let{default:n,min:r,max:i}=$C[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function Nw(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function Pw(e){let t=bw(e),n=bw(t.agent),r=bw(t.inspectors),i=bw(n.tools),a=bw(t.actions),o=Ow(t.actions,!0),s=bw(t.redaction),c=bw(t.limits),l=Nw(YC,e=>Ow(r[e],!0));return{inspectors:l,agent:{readOnly:Ow(n.readOnly,!1),tools:Nw(YC,e=>l[e]&&Ow(i[e],!0)),browserTools:Ow(n.browserTools,!1)},actions:Nw(QC,e=>l[e]&&Ow(a[e],o)),redaction:{secretNames:jw(s.secretNames),unmask:jw(s.unmask),...Dw(s.entropy)},limits:Object.fromEntries(Object.keys($C).map(e=>[e,Mw(c[e],e)])),popup:{hotkey:Vw(bw(t.popup).hotkey)},plugins:Bw(t.plugins),lint:{rules:Rw(t.lint)},analog:Iw(t.analog),ngrx:{trace:Ow(bw(t.ngrx).trace,!1)}}}var Fw=500;function Iw(e){let t=bw(e).contentSchema;return typeof t==`string`&&t.trim()&&t.length<=Fw?{contentSchema:t.trim()}:{}}var Lw=200;function Rw(e){let t=bw(bw(e).rules),n={};for(let[e,r]of Object.entries(t).slice(0,Lw))typeof r==`boolean`&&(n[e]=r);return n}var zw=100;function Bw(e){let t={};for(let[n,r]of Object.entries(bw(e)).slice(0,zw)){if(!rw.test(n))continue;if(typeof r==`boolean`){t[n]={enabled:r,tools:!0,actions:!0};continue}let e=bw(r);r!==void 0&&Object.keys(e).length&&(t[n]={enabled:Ow(e.enabled,!0),tools:Ow(e.tools,!0),actions:Ow(e.actions,!0)})}return t}function Vw(e){return e===!1?!1:cw(e)??`Alt+Shift+P`}function Hw(e){let t=e?.configs;return Pw(t?.[aw])}function Uw(e){return`${{forms:`Writing to forms`,router:`Navigating and clearing navigations`,ngrx:`Restoring NgRx state, dispatching actions and changing the Store DevTools history`,http:`Changing HTTP mock rules and SSR overrides, and clearing HTTP calls`,analog:`Calling API routes, clearing server calls, running Nitro tasks and purging the Nitro cache`,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 Ww=[`pangular:build-meta`],Gw={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`},Kw={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore, dispatch and Store DevTools`,http:`HTTP mocking`,analog:`Analog API calls`,components:`Component edits`,tanstackQuery:`TanStack Query invalidate and refetch`,plugins:`Plugin actions`},qw={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 Jw(e){if(!e)return[];let t=[`On`];return e.minLength!==xw.minLength&&t.push(`${e.minLength} characters or more`),e.threshold!==xw.threshold&&t.push(`up to ${e.threshold} bits per character`),t}function Yw(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=YC.filter(t=>e.inspectors[t]);n(`Inspectors off`,YC.filter(t=>!e.inspectors[t]).map(e=>Gw[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>Gw[e])),n(`Blocked actions`,QC.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>Kw[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Entropy masking`,Jw(e.redaction.entropy)),n(`Limits`,Object.keys($C).filter(t=>e.limits[t]!==$C[t].default).map(t=>qw[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 Xw(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 Zw(e){return!e.tags.length&&!e.directives.length&&!e.text}function Qw(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 $w={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 eT(e){let t=/^(\d+)\.(\d+)/.exec(e.trim());return t?`${t[1]}.${t[2]}`:e.trim()}function tT(e){let t=/^(\d+)(?:\.(\d+))?/.exec(e.trim());return t?[Number(t[1]),Number(t[2]??0)]:null}function nT(e,t){let n=tT(e),r=tT(t);return!n||!r?!1:n[0]===r[0]?n[1]>=r[1]:n[0]>r[0]}function rT(e,t){return e?.capabilities?.[t]===!1}function iT(e,t){let n=$w[e],r=`${n.subject} needs Angular ${n.since} or later`;if(!t)return`${r}; this page's Angular version is unknown.`;let i=eT(t);return nT(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}.`}function aT(e){return e.hydration===`hydrated`&&e.hydratedAt===void 0?`hydrated before inspection`:e.hydration}var oT=/^on (viewport|interaction|hover)\b/;function sT(e){let t=e.filter(e=>!/^(prefetch|hydrate) /.test(e));return t.length>0&&t.every(e=>oT.test(e))}function cT(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(sT(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 lT=`pangular-page-id`,uT=null;function dT(e){uT=e}function fT(){if(uT)return uT;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(lT)||null)}catch{return null}}function pT(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 mT(e,t){return e?t?e.pages?.[t]??null:e:null}function hT(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function gT(){return{functions:[...Ww]}}function _T(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function vT(e,t,n){return _T(e,t,n).then(e=>e,()=>null)}function yT(e){return e?.connectionMeta.backend===`static`}function bT(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 xT(e=globalThis){delete e.__DEVFRAME_CONNECTION__,delete e.__DEVFRAME_CONNECTION_META__}function ST(e){return e.split(`@`)[1]??``}var CT={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},wT={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},TT=vT,ET={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 DT(e){return ET[e]??e}var OT=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function kT(e,t){return await TT(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function AT(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 jT=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function MT(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(jT,(e,t)=>t??(e===`**`?``:e))}function NT(e){return Hw(e?.connectionMeta)}function PT(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)?[...e]:void 0}function FT(e,t){if(!t||typeof t!=`object`)return e;let n=PT(t.secretNames),r=PT(t.unmask);if(!n||!r)return e;let i=Ew(t.entropy);return{...e,redaction:i?{secretNames:n,unmask:r,entropy:i}:{secretNames:n,unmask:r}}}function IT(e,t){return NT(e).actions[t]}var LT={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 RT(e){return LT[e]}var zT=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function BT(e,t){let n=LT[e];return!n||t.inspectors[n]}function VT(e,t){e&1&&(T(),og(0,`rect`,5)(1,`rect`,6)(2,`rect`,7)(3,`rect`,8))}function HT(e,t){e&1&&(T(),og(0,`path`,9)(1,`circle`,10)(2,`circle`,11)(3,`path`,12))}function UT(e,t){e&1&&(T(),og(0,`path`,13)(1,`path`,14))}function WT(e,t){e&1&&(T(),og(0,`path`,15)(1,`path`,16)(2,`path`,17))}function GT(e,t){e&1&&(T(),og(0,`circle`,18)(1,`path`,19)(2,`circle`,20))}function KT(e,t){e&1&&(T(),og(0,`path`,1))}function qT(e,t){e&1&&(T(),og(0,`path`,21)(1,`path`,22)(2,`path`,23)(3,`path`,24))}function JT(e,t){e&1&&(T(),og(0,`ellipse`,25)(1,`path`,26)(2,`path`,27))}function YT(e,t){e&1&&(T(),og(0,`rect`,28)(1,`path`,29)(2,`path`,30)(3,`path`,31))}function XT(e,t){e&1&&(T(),og(0,`circle`,32)(1,`path`,9)(2,`path`,33))}function ZT(e,t){e&1&&(T(),og(0,`path`,34)(1,`path`,35)(2,`path`,36)(3,`path`,37)(4,`circle`,38))}function QT(e,t){e&1&&(T(),og(0,`circle`,39)(1,`path`,40))}function $T(e,t){e&1&&(T(),og(0,`ellipse`,41)(1,`path`,42)(2,`path`,43)(3,`path`,44)(4,`path`,45))}function eE(e,t){e&1&&(T(),og(0,`circle`,32)(1,`path`,46)(2,`path`,47))}function tE(e,t){e&1&&(T(),og(0,`path`,2))}function nE(e,t){e&1&&(T(),og(0,`path`,3))}function rE(e,t){e&1&&(T(),og(0,`path`,4))}var iE=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&(T(),R(0,`svg`,0),A(1,VT,4,0)(2,HT,4,0)(3,UT,2,0)(4,WT,3,0)(5,GT,3,0)(6,KT,1,0,`:svg:path`,1)(7,qT,4,0)(8,JT,3,0)(9,YT,4,0)(10,XT,3,0)(11,ZT,5,0)(12,QT,2,0)(13,$T,5,0)(14,eE,3,0)(15,tE,1,0,`:svg:path`,2)(16,nE,1,0,`:svg:path`,3)(17,rE,1,0,`:svg:path`,4),z()),e&2){let e;D(),j((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`,[CS]: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 pC(e,t){let{channel:n,rpcOptions:r={}}=t;return Iy(e,{...n,timeout:-1,...r,proxify:!1})}function mC(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(Cy.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 eC(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new eC(`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(Cy.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 eC(`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(Cy.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(Cy.client.connectionError,e),m(new eC(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new eC(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),te=pC(a.functions,{channel:ee,rpcOptions:o});a.register({name:Cy.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new eC(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(Cy.client.connectionError,e),m(e),i.emit(Cy.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 eC(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(Cy.client.connectionError,e)}return i.emit(Cy.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(Cy.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(Cy.client.error,n,t),Promise.reject(n)):g(te.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(Cy.client.error,t,String(e[0]));return}return te.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(Cy.client.error,n,t),Promise.reject(n)):g(te.$callOptional(...e),t)},close:()=>{ee.close()}}}function hC(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 gC(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=hC(n.sse,r??`./`,location);return mC({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>fC({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 _C(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:vC(r)?_C(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function vC(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function yC(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function bC(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function xC(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function SC(e){if(e.error)throw _C(e.error);return e.output}function CC(e){return e.some(e=>e!=null)}function wC(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function TC(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?sS(e):e}function a(e,t){return i(wC(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 xC(r)?SC(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(yC(r)){if(CC(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(bC(r)){let e=nb(n),i=r.records[e];if(i)return SC(await s(i,r.serialization));if(r.fallback)return SC(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!CC(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 EC(e){let t=TC(await e.fetchJsonFromBases(wS),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 DC=``;function OC(e,t){return`${e}${DC}${t}`}function kC(e){let t=new Map,n=new Map;e.client.register({name:Cy.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(OC(e,n))?._push(r,i)}}),e.client.register({name:Cy.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=OC(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:Cy.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=OC(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(Cy.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(DC);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=OC(n,r),o=t.get(a);if(o)return o;let s=pS({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(Cy.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=OC(t,r),a=n.get(i);if(a)return a;let o=fS({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 AC(){}var jC=new Map;function MC(e){let t=e.url;e.authToken&&(t=`${t}?${DS}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=AC,onError:i=AC,onDisconnected:a=AC,definitions:o=jC}=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=cC(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 NC(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 lb(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function PC(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=NC(n.websocket,r??`./`,location);return mC({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>MC({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 FC(e){return e.includes(`:`)}function IC(e,t){return FC(t)?t:`${e}:${t}`}function LC(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 RC(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 LC(a)}function zC(e,t){return{global:RC(e,t,`global`),project:RC(e,t,`project`)}}function BC(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(FC(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(IC(t,n),...r)),callEvent:((n,...r)=>e.callEvent(IC(t,n),...r)),callOptional:((n,...r)=>e.callOptional(IC(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(IC(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(IC(t,n),r,i),upload:(n,r)=>e.streaming.upload(IC(t,n),r)}},settings:zC(e,t),scope:e.scope}}function VC(){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 HC(e,t={}){let n=t.modelContext??VC();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=gS(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=Ly(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:By(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>UC(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 UC(e,t,n){try{let r=Hy(n,e.args?.length);return{content:[{type:`text`,text:WC(await(await IS(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:GC(e)}]}}}function WC(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function GC(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 KC(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 qC(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=rb(),a=Array.isArray(t)?t:[t],o=await $S(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new OS({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new LS(f),m=e.webmcp===!1?void 0:HC(p),h,g=!1,_=0,ee;function te(){_++,ee=void 0,d.clear(),r===!0&&d.updateOptions({functions:[]})}r&&(p.register({name:Cy.broadcast.cacheInvalidate,type:`event`,handler:te}),i.on(Cy.client.connectionStatus,te),i.on(Cy.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(cb(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 eC(`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=KC(e.transport??`auto`,s);ae=se===`static`?await EC({fetchJsonFromBases:ne}):se===`sse`?gC({...oe,sseOptions:e.sseOptions}):PC({...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=>(YS(e),o={...o,authToken:e},ae.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await ae.requestTrustWithCode(e);if(!t)return!1;YS(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=oC(pe),pe.streaming=kC(pe),pe.services=aC(pe);let me=new Map;pe.scope=(e=>{if(!e)return pe;let t=me.get(e);return t||(t=BC(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 iC(pe,{param:n}):!1;t||r||pe.isTrusted||await ge()}return le=_e().then(()=>{ue=!0},()=>{ue=!0}),s.mcp&&bS(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-KH4HHvHf-BG-qZj2p.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 JC=qC,YC=[`components`,`injectors`,`signals`,`ngrx`,`tanstackQuery`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`,`errors`,`plugins`],XC=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function ZC(e){return`pangular:${e}`}var QC=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`,`tanstackQuery`,`plugins`],$C={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}},ew={"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`},tw=[[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 nw(e){return tw.some(([t])=>t===e)}var rw=/^[a-z][a-z0-9-]{0,39}$/;function iw(e,t){let n=t.plugins?.[e],r=t.inspectors.plugins&&rw.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 aw=`pangular`,ow={mod:`Mod`,ctrl:`Ctrl`,control:`Ctrl`,meta:`Meta`,cmd:`Meta`,command:`Meta`,alt:`Alt`,option:`Alt`,opt:`Alt`,shift:`Shift`},sw=[`Mod`,`Ctrl`,`Meta`,`Alt`,`Shift`];function cw(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=ow[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[...sw.filter(e=>n.has(e)),r].join(`+`)}function lw(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 uw(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 dw=[{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`}],fw=1e4;function pw(e){return dw.filter(t=>!(`inspector`in t)||e.inspectors[t.inspector])}var mw={components:`a component instance, by its id in the component tree`,injectors:`a component's element injector, by the component's id`,signals:`a component's signal graph, by the component's id`,forms:`a form, by its id`},hw=200;function gw(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 _w(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=e=>{let n=t.get(e)?.trim();return n&&n.length<=hw?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 vw=[{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 yw(e){let t=pw(e).map(e=>({id:`tab:${e.id}`,title:`Go to ${e.label}`,group:`Go to`,keywords:`tab open`})),n=vw.filter(t=>!t.inspector||e.inspectors[t.inspector]).map(({inspector:e,...t})=>t);return[...t,...n]}function bw(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}var xw=Object.freeze({minLength:24,threshold:4.5}),Sw={min:16,max:512},Cw={min:2,max:6};function ww(e){return typeof e==`number`&&Number.isInteger(e)&&e>=Sw.min&&e<=Sw.max}function Tw(e){return typeof e==`number`&&Number.isFinite(e)&&e>=Cw.min&&e<=Cw.max}function Ew(e){if(e===!0)return{...xw};if(!e||typeof e!=`object`||Array.isArray(e))return;let{minLength:t,threshold:n}=e;return{minLength:ww(t)?t:xw.minLength,threshold:Tw(n)?n:xw.threshold}}function Dw(e){let t=Ew(e);return t?{entropy:t}:{}}function Ow(e,t){return typeof e==`boolean`?e:t}var kw=100,Aw=100;function jw(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=Aw);return[...new Set(t)].slice(0,kw)}function Mw(e,t){let{default:n,min:r,max:i}=$C[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function Nw(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function Pw(e){let t=bw(e),n=bw(t.agent),r=bw(t.inspectors),i=bw(n.tools),a=bw(t.actions),o=Ow(t.actions,!0),s=bw(t.redaction),c=bw(t.limits),l=Nw(YC,e=>Ow(r[e],!0));return{inspectors:l,agent:{readOnly:Ow(n.readOnly,!1),tools:Nw(YC,e=>l[e]&&Ow(i[e],!0)),browserTools:Ow(n.browserTools,!1)},actions:Nw(QC,e=>l[e]&&Ow(a[e],o)),redaction:{secretNames:jw(s.secretNames),unmask:jw(s.unmask),...Dw(s.entropy)},limits:Object.fromEntries(Object.keys($C).map(e=>[e,Mw(c[e],e)])),popup:{hotkey:Vw(bw(t.popup).hotkey)},plugins:Bw(t.plugins),lint:{rules:Rw(t.lint)},analog:Iw(t.analog),ngrx:{trace:Ow(bw(t.ngrx).trace,!1)}}}var Fw=500;function Iw(e){let t=bw(e).contentSchema;return typeof t==`string`&&t.trim()&&t.length<=Fw?{contentSchema:t.trim()}:{}}var Lw=200;function Rw(e){let t=bw(bw(e).rules),n={};for(let[e,r]of Object.entries(t).slice(0,Lw))typeof r==`boolean`&&(n[e]=r);return n}var zw=100;function Bw(e){let t={};for(let[n,r]of Object.entries(bw(e)).slice(0,zw)){if(!rw.test(n))continue;if(typeof r==`boolean`){t[n]={enabled:r,tools:!0,actions:!0};continue}let e=bw(r);r!==void 0&&Object.keys(e).length&&(t[n]={enabled:Ow(e.enabled,!0),tools:Ow(e.tools,!0),actions:Ow(e.actions,!0)})}return t}function Vw(e){return e===!1?!1:cw(e)??`Alt+Shift+P`}function Hw(e){let t=e?.configs;return Pw(t?.[aw])}function Uw(e){return`${{forms:`Writing to forms`,router:`Navigating and clearing navigations`,ngrx:`Restoring NgRx state, dispatching actions and changing the Store DevTools history`,http:`Changing HTTP mock rules and SSR overrides, refetching the TransferState payload, and clearing HTTP calls`,analog:`Calling API routes, clearing server calls, running Nitro tasks and purging the Nitro cache`,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 Ww=[`pangular:build-meta`],Gw={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`},Kw={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore, dispatch and Store DevTools`,http:`HTTP mocking`,analog:`Analog API calls`,components:`Component edits`,tanstackQuery:`TanStack Query invalidate and refetch`,plugins:`Plugin actions`},qw={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 Jw(e){if(!e)return[];let t=[`On`];return e.minLength!==xw.minLength&&t.push(`${e.minLength} characters or more`),e.threshold!==xw.threshold&&t.push(`up to ${e.threshold} bits per character`),t}function Yw(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=YC.filter(t=>e.inspectors[t]);n(`Inspectors off`,YC.filter(t=>!e.inspectors[t]).map(e=>Gw[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>Gw[e])),n(`Blocked actions`,QC.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>Kw[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Entropy masking`,Jw(e.redaction.entropy)),n(`Limits`,Object.keys($C).filter(t=>e.limits[t]!==$C[t].default).map(t=>qw[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 Xw(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 Zw(e){return!e.tags.length&&!e.directives.length&&!e.text}function Qw(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 $w={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 eT(e){let t=/^(\d+)\.(\d+)/.exec(e.trim());return t?`${t[1]}.${t[2]}`:e.trim()}function tT(e){let t=/^(\d+)(?:\.(\d+))?/.exec(e.trim());return t?[Number(t[1]),Number(t[2]??0)]:null}function nT(e,t){let n=tT(e),r=tT(t);return!n||!r?!1:n[0]===r[0]?n[1]>=r[1]:n[0]>r[0]}function rT(e,t){return e?.capabilities?.[t]===!1}function iT(e,t){let n=$w[e],r=`${n.subject} needs Angular ${n.since} or later`;if(!t)return`${r}; this page's Angular version is unknown.`;let i=eT(t);return nT(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}.`}function aT(e){return e.hydration===`hydrated`&&e.hydratedAt===void 0?`hydrated before inspection`:e.hydration}var oT=/^on (viewport|interaction|hover)\b/;function sT(e){let t=e.filter(e=>!/^(prefetch|hydrate) /.test(e));return t.length>0&&t.every(e=>oT.test(e))}function cT(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(sT(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 lT=`pangular-page-id`,uT=null;function dT(e){uT=e}function fT(){if(uT)return uT;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(lT)||null)}catch{return null}}function pT(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 mT(e,t){return e?t?e.pages?.[t]??null:e:null}function hT(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function gT(){return{functions:[...Ww]}}function _T(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function vT(e,t,n){return _T(e,t,n).then(e=>e,()=>null)}function yT(e){return e?.connectionMeta.backend===`static`}function bT(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 xT(e=globalThis){delete e.__DEVFRAME_CONNECTION__,delete e.__DEVFRAME_CONNECTION_META__}function ST(e){return e.split(`@`)[1]??``}var CT={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},wT={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},TT=vT,ET={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 DT(e){return ET[e]??e}var OT=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function kT(e,t){return await TT(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function AT(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 jT=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function MT(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(jT,(e,t)=>t??(e===`**`?``:e))}function NT(e){return Hw(e?.connectionMeta)}function PT(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)?[...e]:void 0}function FT(e,t){if(!t||typeof t!=`object`)return e;let n=PT(t.secretNames),r=PT(t.unmask);if(!n||!r)return e;let i=Ew(t.entropy);return{...e,redaction:i?{secretNames:n,unmask:r,entropy:i}:{secretNames:n,unmask:r}}}function IT(e,t){return NT(e).actions[t]}var LT={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 RT(e){return LT[e]}var zT=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function BT(e,t){let n=LT[e];return!n||t.inspectors[n]}function VT(e,t){e&1&&(T(),sg(0,`rect`,5)(1,`rect`,6)(2,`rect`,7)(3,`rect`,8))}function HT(e,t){e&1&&(T(),sg(0,`path`,9)(1,`circle`,10)(2,`circle`,11)(3,`path`,12))}function UT(e,t){e&1&&(T(),sg(0,`path`,13)(1,`path`,14))}function WT(e,t){e&1&&(T(),sg(0,`path`,15)(1,`path`,16)(2,`path`,17))}function GT(e,t){e&1&&(T(),sg(0,`circle`,18)(1,`path`,19)(2,`circle`,20))}function KT(e,t){e&1&&(T(),sg(0,`path`,1))}function qT(e,t){e&1&&(T(),sg(0,`path`,21)(1,`path`,22)(2,`path`,23)(3,`path`,24))}function JT(e,t){e&1&&(T(),sg(0,`ellipse`,25)(1,`path`,26)(2,`path`,27))}function YT(e,t){e&1&&(T(),sg(0,`rect`,28)(1,`path`,29)(2,`path`,30)(3,`path`,31))}function XT(e,t){e&1&&(T(),sg(0,`circle`,32)(1,`path`,9)(2,`path`,33))}function ZT(e,t){e&1&&(T(),sg(0,`path`,34)(1,`path`,35)(2,`path`,36)(3,`path`,37)(4,`circle`,38))}function QT(e,t){e&1&&(T(),sg(0,`circle`,39)(1,`path`,40))}function $T(e,t){e&1&&(T(),sg(0,`ellipse`,41)(1,`path`,42)(2,`path`,43)(3,`path`,44)(4,`path`,45))}function eE(e,t){e&1&&(T(),sg(0,`circle`,32)(1,`path`,46)(2,`path`,47))}function tE(e,t){e&1&&(T(),sg(0,`path`,2))}function nE(e,t){e&1&&(T(),sg(0,`path`,3))}function rE(e,t){e&1&&(T(),sg(0,`path`,4))}var iE=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&(T(),R(0,`svg`,0),A(1,VT,4,0)(2,HT,4,0)(3,UT,2,0)(4,WT,3,0)(5,GT,3,0)(6,KT,1,0,`:svg:path`,1)(7,qT,4,0)(8,JT,3,0)(9,YT,4,0)(10,XT,3,0)(11,ZT,5,0)(12,QT,2,0)(13,$T,5,0)(14,eE,3,0)(15,tE,1,0,`:svg:path`,2)(16,nE,1,0,`:svg:path`,3)(17,rE,1,0,`:svg:path`,4),z()),e&2){let e;D(),j((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; -}`]})},aE=(e,t)=>t.tab,oE=(e,t)=>t.label;function sE(e,t){e&1&&K(0),e&2&&J(` `,W().meta()?.projectName,` `)}function cE(e,t){e&1&&K(0,` Project details unavailable `)}function lE(e,t){e&1&&K(0,` Loading… `)}function uE(e,t){e&1&&(K(0,` Run `),F(1,`code`),K(2,`pangular build`),I(),K(3,` again to rebuild the report. `))}function dE(e,t){e&1&&K(0,` Check that the dev server is running. `)}function fE(e,t){if(e&1){let e=B();F(0,`button`,12),H(`click`,function(){return C(e),w(W(2).loadMeta())}),K(1,`Try again`),I()}}function pE(e,t){if(e&1&&(F(0,`p`,10),A(1,uE,4,0)(2,dE,1,0),I(),A(3,fE,2,0,`button`,11)),e&2){let e=W();D(),j(e.staticReport()?1:2),D(2),j(e.staticReport()?-1:3)}}function mE(e,t){e&1&&(F(0,`li`,5)(1,`span`),K(2,`Analog`),I(),K(3),I()),e&2&&(D(3),q(t))}function hE(e,t){e&1&&(F(0,`li`)(1,`span`),K(2,`Change detection`),I(),K(3),I()),e&2&&(D(3),q(t))}function gE(e,t){if(e&1&&(F(0,`span`,19),K(1),I(),F(2,`span`,20),K(3),I()),e&2){let e=W().$implicit,t=W();D(),q(t.cards()[e.tab]?.value),D(2),q(t.cards()[e.tab]?.sub)}}function _E(e,t){e&1&&(F(0,`span`,21),K(1,`–`),I(),F(2,`span`,20),K(3,`Count unavailable`),I())}function vE(e,t){e&1&&(L(0,`span`,22),F(1,`span`,20),K(2,`Counting…`),I())}function yE(e,t){if(e&1){let e=B();F(0,`button`,13),H(`click`,function(){let t=C(e).$implicit;return w(W().navigate.emit(t.tab))}),F(1,`span`,14)(2,`span`,15),L(3,`app-tab-icon`,16),I(),F(4,`span`,17),K(5,`→`),I()(),F(6,`span`,18),K(7),I(),A(8,gE,4,2)(9,_E,4,0)(10,vE,3,0),I()}if(e&2){let e,n=t.$implicit,r=t.$index,i=W().stateOf(n.tab);Xg(`animation-delay`,60*r,`ms`),k(`aria-busy`,i===`loading`),D(3),P(`name`,n.tab),D(4),q(n.label),D(),j((e=i)===`ready`?8:e===`error`?9:10)}}function bE(e,t){e&1&&(F(0,`p`),K(1,`Loading…`),I())}function xE(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2),I(),F(3,`dd`),K(4),I()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.value)}}function SE(e,t){if(e&1&&(F(0,`dl`),M(1,xE,5,2,`div`,null,oE),I()),e&2){let e=W();D(),N(e.configItems())}}function CE(e,t){e&1&&(F(0,`p`),K(1,`Defaults`),I())}var wE=[{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 TE(e){return wE.filter(t=>BT(t.tab,e))}var EE={zoneless:`Zoneless`,zone:`zone.js`,"zone-unused":`Zoneless, zone.js loaded`};function DE(e){return e&&Object.hasOwn(EE,e)?EE[e]:null}var OE=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),kE={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 AE(e,t,n){return`${e} ${e===1?t:n}`}function jE(e,t){for(let n of e??[])t(n),jE(n.children,t)}function ME(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 · ${AE(t,`directive`,`directives`)}`}}function NE(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 · ${AE(t,`redirect`,`redirects`)}`}}function PE(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]=kE[e]??[e,e];return AE(t,n,r)});return{value:e.length,sub:n.join(` · `)}}function FE(e,t){let n=e?.forms??[],r=t?n.filter(e=>ST(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 IE(e){return e.cancelled||e.status===void 0?!1:e.status===0||e.status>=400}function LE(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(IE).length;return{value:o.length,sub:`${o.length===1?`call`:`calls`} · ${s} failed`}}var RE=class e{rpc=$(null);navigate=Q_();staticReport=X(()=>yT(this.rpc()));meta=E(null);redaction=E(null);config=X(()=>FT(NT(this.rpc()),this.redaction()));stats=X(()=>this.rpc()?TE(this.config()):[]);configItems=X(()=>Yw(this.config()));metaState=E(`loading`);states=E({});rows=E({});injectorTree=E(null);signalGraph=E(null);formsState=E(null);httpState=E(null);pageId=fT();destroyRef=S(vs);stopLive=[];zone=X(()=>DE(mT(this.injectorTree(),this.pageId)?.zone));liveInjectors=X(()=>{let e=mT(this.injectorTree(),this.pageId);if(!e?.roots?.length)return null;let t=0,n=0,r=e=>{t++,n+=e.providers?.length??0};return jE(e.roots,r),jE(e.environment,r),{injectors:t,providers:n}});liveSignals=X(()=>{let e=hT(this.signalGraph(),this.pageId);return e?.nodes?.length?e.nodes.filter(e=>OE.has(e.kind??``)).length:null});cards=X(()=>{let e=this.rows(),t={};if(e.components&&(t.components=ME(e.components)),e.routes&&(t.routes=NE(e.routes)),e.store&&(t.store=PE(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 · ${AE(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=FE(i,this.pageId));let a=this.httpState();return a&&(t.network=LE(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),!yT(e)&&_T(e,`redaction-config`).then(t=>{this.rpc()===e&&this.redaction.set(t)}).catch(()=>{})}constructor(){ac(()=>{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=NT(e),r=e=>BT(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)),BT(`forms`,t)&&r(`forms`,e=>this.formsState.set(e??{}),`forms`),BT(`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=O({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&&(F(0,`section`,0)(1,`div`,1)(2,`p`,2),K(3,`Project`),I(),F(4,`h2`,3),A(5,sE,1,1)(6,cE,1,0)(7,lE,1,0),I(),A(8,pE,4,2),I(),F(9,`ul`,4)(10,`li`)(11,`span`),K(12,`Angular`),I(),K(13),I(),F(14,`li`)(15,`span`),K(16,`TypeScript`),I(),K(17),I(),F(18,`li`)(19,`span`),K(20,`SSR`),I(),K(21),I(),A(22,mE,4,1,`li`,5),A(23,hE,4,1,`li`),I()(),F(24,`div`,6),M(25,yE,11,6,`button`,7,aE),I(),F(27,`section`,8)(28,`h2`,9),K(29,`Configuration`),I(),A(30,bE,2,0,`p`)(31,SE,3,0,`dl`)(32,CE,2,0,`p`),I()),e&2){let e,n,r;k(`aria-busy`,t.metaState()===`loading`),D(4),G(`muted`,t.metaState()!==`ready`),D(),j((e=t.metaState())===`ready`?5:e===`error`?6:7),D(3),j(t.metaState()===`error`?8:-1),D(),G(`pending`,t.metaState()===`loading`),D(4),q(t.meta()?.angularVersion??`…`),D(4),q(t.meta()?.typescript??`…`),D(4),q(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),D(),j((n=t.meta()?.analog)?22:-1,n),D(),j((r=t.zone())?23:-1,r),D(2),N(t.stats()),D(2),k(`aria-busy`,!t.rpc()),D(3),j(t.rpc()?t.configItems().length?31:32:30)}},dependencies:[iE],styles:[`[_nghost-%COMP%] { +}`]})},aE=(e,t)=>t.tab,oE=(e,t)=>t.label;function sE(e,t){e&1&&K(0),e&2&&J(` `,W().meta()?.projectName,` `)}function cE(e,t){e&1&&K(0,` Project details unavailable `)}function lE(e,t){e&1&&K(0,` Loading… `)}function uE(e,t){e&1&&(K(0,` Run `),F(1,`code`),K(2,`pangular build`),I(),K(3,` again to rebuild the report. `))}function dE(e,t){e&1&&K(0,` Check that the dev server is running. `)}function fE(e,t){if(e&1){let e=B();F(0,`button`,12),H(`click`,function(){return C(e),w(W(2).loadMeta())}),K(1,`Try again`),I()}}function pE(e,t){if(e&1&&(F(0,`p`,10),A(1,uE,4,0)(2,dE,1,0),I(),A(3,fE,2,0,`button`,11)),e&2){let e=W();D(),j(e.staticReport()?1:2),D(2),j(e.staticReport()?-1:3)}}function mE(e,t){e&1&&(F(0,`li`,5)(1,`span`),K(2,`Analog`),I(),K(3),I()),e&2&&(D(3),q(t))}function hE(e,t){e&1&&(F(0,`li`)(1,`span`),K(2,`Change detection`),I(),K(3),I()),e&2&&(D(3),q(t))}function gE(e,t){if(e&1&&(F(0,`span`,19),K(1),I(),F(2,`span`,20),K(3),I()),e&2){let e=W().$implicit,t=W();D(),q(t.cards()[e.tab]?.value),D(2),q(t.cards()[e.tab]?.sub)}}function _E(e,t){e&1&&(F(0,`span`,21),K(1,`–`),I(),F(2,`span`,20),K(3,`Count unavailable`),I())}function vE(e,t){e&1&&(L(0,`span`,22),F(1,`span`,20),K(2,`Counting…`),I())}function yE(e,t){if(e&1){let e=B();F(0,`button`,13),H(`click`,function(){let t=C(e).$implicit;return w(W().navigate.emit(t.tab))}),F(1,`span`,14)(2,`span`,15),L(3,`app-tab-icon`,16),I(),F(4,`span`,17),K(5,`→`),I()(),F(6,`span`,18),K(7),I(),A(8,gE,4,2)(9,_E,4,0)(10,vE,3,0),I()}if(e&2){let e,n=t.$implicit,r=t.$index,i=W().stateOf(n.tab);Zg(`animation-delay`,60*r,`ms`),k(`aria-busy`,i===`loading`),D(3),P(`name`,n.tab),D(4),q(n.label),D(),j((e=i)===`ready`?8:e===`error`?9:10)}}function bE(e,t){e&1&&(F(0,`p`),K(1,`Loading…`),I())}function xE(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2),I(),F(3,`dd`),K(4),I()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.value)}}function SE(e,t){if(e&1&&(F(0,`dl`),M(1,xE,5,2,`div`,null,oE),I()),e&2){let e=W();D(),N(e.configItems())}}function CE(e,t){e&1&&(F(0,`p`),K(1,`Defaults`),I())}var wE=[{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 TE(e){return wE.filter(t=>BT(t.tab,e))}var EE={zoneless:`Zoneless`,zone:`zone.js`,"zone-unused":`Zoneless, zone.js loaded`};function DE(e){return e&&Object.hasOwn(EE,e)?EE[e]:null}var OE=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),kE={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 AE(e,t,n){return`${e} ${e===1?t:n}`}function jE(e,t){for(let n of e??[])t(n),jE(n.children,t)}function ME(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 · ${AE(t,`directive`,`directives`)}`}}function NE(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 · ${AE(t,`redirect`,`redirects`)}`}}function PE(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]=kE[e]??[e,e];return AE(t,n,r)});return{value:e.length,sub:n.join(` · `)}}function FE(e,t){let n=e?.forms??[],r=t?n.filter(e=>ST(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 IE(e){return e.cancelled||e.status===void 0?!1:e.status===0||e.status>=400}function LE(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(IE).length;return{value:o.length,sub:`${o.length===1?`call`:`calls`} · ${s} failed`}}var RE=class e{rpc=$(null);navigate=ev();staticReport=X(()=>yT(this.rpc()));meta=E(null);redaction=E(null);config=X(()=>FT(NT(this.rpc()),this.redaction()));stats=X(()=>this.rpc()?TE(this.config()):[]);configItems=X(()=>Yw(this.config()));metaState=E(`loading`);states=E({});rows=E({});injectorTree=E(null);signalGraph=E(null);formsState=E(null);httpState=E(null);pageId=fT();destroyRef=S(vs);stopLive=[];zone=X(()=>DE(mT(this.injectorTree(),this.pageId)?.zone));liveInjectors=X(()=>{let e=mT(this.injectorTree(),this.pageId);if(!e?.roots?.length)return null;let t=0,n=0,r=e=>{t++,n+=e.providers?.length??0};return jE(e.roots,r),jE(e.environment,r),{injectors:t,providers:n}});liveSignals=X(()=>{let e=hT(this.signalGraph(),this.pageId);return e?.nodes?.length?e.nodes.filter(e=>OE.has(e.kind??``)).length:null});cards=X(()=>{let e=this.rows(),t={};if(e.components&&(t.components=ME(e.components)),e.routes&&(t.routes=NE(e.routes)),e.store&&(t.store=PE(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 · ${AE(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=FE(i,this.pageId));let a=this.httpState();return a&&(t.network=LE(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),!yT(e)&&_T(e,`redaction-config`).then(t=>{this.rpc()===e&&this.redaction.set(t)}).catch(()=>{})}constructor(){ac(()=>{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=NT(e),r=e=>BT(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)),BT(`forms`,t)&&r(`forms`,e=>this.formsState.set(e??{}),`forms`),BT(`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=O({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&&(F(0,`section`,0)(1,`div`,1)(2,`p`,2),K(3,`Project`),I(),F(4,`h2`,3),A(5,sE,1,1)(6,cE,1,0)(7,lE,1,0),I(),A(8,pE,4,2),I(),F(9,`ul`,4)(10,`li`)(11,`span`),K(12,`Angular`),I(),K(13),I(),F(14,`li`)(15,`span`),K(16,`TypeScript`),I(),K(17),I(),F(18,`li`)(19,`span`),K(20,`SSR`),I(),K(21),I(),A(22,mE,4,1,`li`,5),A(23,hE,4,1,`li`),I()(),F(24,`div`,6),M(25,yE,11,6,`button`,7,aE),I(),F(27,`section`,8)(28,`h2`,9),K(29,`Configuration`),I(),A(30,bE,2,0,`p`)(31,SE,3,0,`dl`)(32,CE,2,0,`p`),I()),e&2){let e,n,r;k(`aria-busy`,t.metaState()===`loading`),D(4),G(`muted`,t.metaState()!==`ready`),D(),j((e=t.metaState())===`ready`?5:e===`error`?6:7),D(3),j(t.metaState()===`error`?8:-1),D(),G(`pending`,t.metaState()===`loading`),D(4),q(t.meta()?.angularVersion??`…`),D(4),q(t.meta()?.typescript??`…`),D(4),q(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),D(),j((n=t.meta()?.analog)?22:-1,n),D(),j((r=t.zone())?23:-1,r),D(2),N(t.stats()),D(2),k(`aria-busy`,!t.rpc()),D(3),j(t.rpc()?t.configItems().length?31:32:30)}},dependencies:[iE],styles:[`[_nghost-%COMP%] { display: block; max-width: 1200px; } @@ -325,7 +325,7 @@ h2.muted[_ngcontent-%COMP%] { .skeleton[_ngcontent-%COMP%] { animation: none; } -}`]})},zE=`pangular:panel-action-result`,BE=6e3,VE=0;function HE(e=window){return e.location.protocol===`chrome-extension:`&&e.parent!==e}function UE(e,t=window){let n=`pa-${Date.now().toString(36)}-${++VE}`;return new Promise(r=>{let i=e=>{t.clearTimeout(o),t.removeEventListener(`message`,a),r(e)},a=({source:e,origin:r,data:a})=>{if(e!==t.parent||r!==t.location.origin)return;let o=a;if(o?.type!==zE||o.requestId!==n)return;let{opened:s,error:c}=a;i({ok:o.ok===!0,...s===`file`||s===`class`?{opened:s}:{},...typeof c==`string`?{error:c}:{}})},o=t.setTimeout(()=>i({ok:!1,error:`timeout`}),BE);t.addEventListener(`message`,a),t.parent.postMessage({...e,requestId:n},t.location.origin)})}var WE=class e{available=HE();reveal(e,t){return UE({type:`pangular:reveal-element`,pageId:e,id:t})}openSource(e,t,n){return UE({type:`pangular:open-source`,pageId:e,id:t,...n?{file:n.file,line:n.line}:{}})}static ɵfac=function(t){return new(t||e)};static ɵprov=El({token:e,factory:e.ɵfac})};function GE(e){return new Date(e).toLocaleTimeString()}var KE=/[ \t\n\r]/;function qE(e){let t=e.trim(),n;try{n=JSON.parse(t)}catch{return null}if(typeof n!=`object`||!n)return null;let r=``,i=0,a=()=>`\n${` `.repeat(i)}`;for(let e=0;e<t.length;e++){let n=t[e];if(n===`"`){let n=e+1;for(;t[n]!==`"`;)n+=t[n]===`\\`?2:1;r+=t.slice(e,n+1),e=n}else if(n===`{`||n===`[`){let o=n===`{`?`}`:`]`,s=e+1;for(;KE.test(t[s]);)s++;t[s]===o?(r+=n+o,e=s):(i++,r+=n+a())}else n===`}`||n===`]`?(i--,r+=a()+n):n===`,`?r+=`,${a()}`:n===`:`?r+=`: `:KE.test(n)||(r+=n)}return r}function JE(e,t,n=`${t}s`){return`${e} ${e===1?t:n}`}var YE=(e,t)=>t.name;function XE(e,t){e&1&&(R(0,`span`,11),K(1,`impure`),z())}function ZE(e,t){e&1&&(R(0,`span`,11),K(1,`churning`),z())}function QE(e,t){e&1&&(R(0,`span`,11),K(1,`stale?`),z())}function $E(e,t){if(e&1&&(R(0,`span`,10),K(1),z()),e&2){let e=W(2).$implicit,t=W(3);D(),q(t.plural(e.calls,`call`))}}function eD(e,t){if(e&1){let e=B();R(0,`button`,7),U(`click`,function(){C(e);let t=W().$implicit;return w(W(3).showPipe.emit(t.name))}),R(1,`span`,8),K(2,`Show in Pipes:`),z(),R(3,`span`,9),K(4),z(),R(5,`span`,10),K(6),z(),A(7,XE,2,0,`span`,11),A(8,ZE,2,0,`span`,11),A(9,QE,2,0,`span`,11),A(10,$E,2,1,`span`,10),z()}if(e&2){let e=W().$implicit;D(4),q(e.name),D(2),J(``,e.uses,`×`),D(),j(e.isPure?-1:7),D(),j(e.churn?8:-1),D(),j(e.stale?9:-1),D(),j(e.calls===void 0?-1:10)}}function tD(e,t){e&1&&(R(0,`span`,11),K(1,`impure`),z())}function nD(e,t){if(e&1&&(R(0,`span`,6)(1,`span`,9),K(2),z(),R(3,`span`,10),K(4),z(),A(5,tD,2,0,`span`,11),z()),e&2){let e=W().$implicit;D(2),q(e.name),D(2),J(``,e.uses,`×`),D(),j(e.isPure?-1:5)}}function rD(e,t){if(e&1&&(R(0,`li`),A(1,eD,11,6,`button`,5)(2,nD,6,3,`span`,6),z()),e&2){let e=W(3);D(),j(e.canShowPipes()?1:2)}}function iD(e,t){if(e&1&&(R(0,`ul`,3),M(1,rD,3,1,`li`,null,YE),z(),R(3,`p`,4),K(4,` Call counts cover every component that uses the pipe. Record calls in the Pipes tab to see them. `),z()),e&2){let e=W(2);D(),N(e.rows())}}function aD(e,t){e&1&&(R(0,`p`,2),K(1,`No pipe is in use in the rendered part of its template.`),z())}function oD(e,t){if(e&1&&(R(0,`div`,0)(1,`h3`),K(2,` Pipes in template `),R(3,`span`,1),K(4),z()(),A(5,iD,5,0)(6,aD,2,0,`p`,2),z()),e&2){let e=W();D(4),q(e.rows().length),D(),j(e.rows().length?5:6)}}function sD(e,t,n){let r=(t?e?.pages?.find(e=>e.pageId===t):void 0)?.pipes??e?.pipes??[],i=[];for(let e of r){let t=e.components.find(e=>e.name===n);t&&i.push({name:e.name,isPure:e.isPure,uses:t.count,...e.call?{calls:e.call.callCount}:{},churn:!!e.churn,stale:!!e.stale})}return i.sort((e,t)=>e.name.localeCompare(t.name))}var cD=class e{plural=JE;destroyRef=S(vs);rpc=$(null);pageId=$(void 0);component=$.required();canShowPipes=$(!1);showPipe=Q_();snapshot=E(void 0);loaded=E(!1);rows=X(()=>sD(this.snapshot(),this.pageId(),this.component()));unsubscribe;constructor(){ac(()=>{let e=this.rpc();e&&this.subscribe(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async subscribe(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`pipe-usage`);if(this.destroyRef.destroyed)return;let n=e=>{this.snapshot.set(e),this.loaded.set(!0)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-component-pipes`]],inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`],component:[1,`component`],canShowPipes:[1,`canShowPipes`]},outputs:{showPipe:`showPipe`},decls:1,vars:1,consts:[[1,`block`],[1,`pill`],[1,`empty-line`],[1,`chips`],[1,`hint`],[`type`,`button`,1,`pipe`],[1,`pipe`],[`type`,`button`,1,`pipe`,3,`click`],[1,`sr-only`],[1,`mono`],[1,`note`],[1,`flag`,`warn`]],template:function(e,t){e&1&&A(0,oD,7,2,`div`,0),e&2&&j(t.loaded()?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})},zE=`pangular:panel-action-result`,BE=6e3,VE=0;function HE(e=window){return e.location.protocol===`chrome-extension:`&&e.parent!==e}function UE(e,t=window){let n=`pa-${Date.now().toString(36)}-${++VE}`;return new Promise(r=>{let i=e=>{t.clearTimeout(o),t.removeEventListener(`message`,a),r(e)},a=({source:e,origin:r,data:a})=>{if(e!==t.parent||r!==t.location.origin)return;let o=a;if(o?.type!==zE||o.requestId!==n)return;let{opened:s,error:c}=a;i({ok:o.ok===!0,...s===`file`||s===`class`?{opened:s}:{},...typeof c==`string`?{error:c}:{}})},o=t.setTimeout(()=>i({ok:!1,error:`timeout`}),BE);t.addEventListener(`message`,a),t.parent.postMessage({...e,requestId:n},t.location.origin)})}var WE=class e{available=HE();reveal(e,t){return UE({type:`pangular:reveal-element`,pageId:e,id:t})}openSource(e,t,n){return UE({type:`pangular:open-source`,pageId:e,id:t,...n?{file:n.file,line:n.line}:{}})}static ɵfac=function(t){return new(t||e)};static ɵprov=El({token:e,factory:e.ɵfac})};function GE(e){return new Date(e).toLocaleTimeString()}var KE=/[ \t\n\r]/;function qE(e){let t=e.trim(),n;try{n=JSON.parse(t)}catch{return null}if(typeof n!=`object`||!n)return null;let r=``,i=0,a=()=>`\n${` `.repeat(i)}`;for(let e=0;e<t.length;e++){let n=t[e];if(n===`"`){let n=e+1;for(;t[n]!==`"`;)n+=t[n]===`\\`?2:1;r+=t.slice(e,n+1),e=n}else if(n===`{`||n===`[`){let o=n===`{`?`}`:`]`,s=e+1;for(;KE.test(t[s]);)s++;t[s]===o?(r+=n+o,e=s):(i++,r+=n+a())}else n===`}`||n===`]`?(i--,r+=a()+n):n===`,`?r+=`,${a()}`:n===`:`?r+=`: `:KE.test(n)||(r+=n)}return r}function JE(e,t,n=`${t}s`){return`${e} ${e===1?t:n}`}var YE=(e,t)=>t.name;function XE(e,t){e&1&&(R(0,`span`,11),K(1,`impure`),z())}function ZE(e,t){e&1&&(R(0,`span`,11),K(1,`churning`),z())}function QE(e,t){e&1&&(R(0,`span`,11),K(1,`stale?`),z())}function $E(e,t){if(e&1&&(R(0,`span`,10),K(1),z()),e&2){let e=W(2).$implicit,t=W(3);D(),q(t.plural(e.calls,`call`))}}function eD(e,t){if(e&1){let e=B();R(0,`button`,7),U(`click`,function(){C(e);let t=W().$implicit;return w(W(3).showPipe.emit(t.name))}),R(1,`span`,8),K(2,`Show in Pipes:`),z(),R(3,`span`,9),K(4),z(),R(5,`span`,10),K(6),z(),A(7,XE,2,0,`span`,11),A(8,ZE,2,0,`span`,11),A(9,QE,2,0,`span`,11),A(10,$E,2,1,`span`,10),z()}if(e&2){let e=W().$implicit;D(4),q(e.name),D(2),J(``,e.uses,`×`),D(),j(e.isPure?-1:7),D(),j(e.churn?8:-1),D(),j(e.stale?9:-1),D(),j(e.calls===void 0?-1:10)}}function tD(e,t){e&1&&(R(0,`span`,11),K(1,`impure`),z())}function nD(e,t){if(e&1&&(R(0,`span`,6)(1,`span`,9),K(2),z(),R(3,`span`,10),K(4),z(),A(5,tD,2,0,`span`,11),z()),e&2){let e=W().$implicit;D(2),q(e.name),D(2),J(``,e.uses,`×`),D(),j(e.isPure?-1:5)}}function rD(e,t){if(e&1&&(R(0,`li`),A(1,eD,11,6,`button`,5)(2,nD,6,3,`span`,6),z()),e&2){let e=W(3);D(),j(e.canShowPipes()?1:2)}}function iD(e,t){if(e&1&&(R(0,`ul`,3),M(1,rD,3,1,`li`,null,YE),z(),R(3,`p`,4),K(4,` Call counts cover every component that uses the pipe. Record calls in the Pipes tab to see them. `),z()),e&2){let e=W(2);D(),N(e.rows())}}function aD(e,t){e&1&&(R(0,`p`,2),K(1,`No pipe is in use in the rendered part of its template.`),z())}function oD(e,t){if(e&1&&(R(0,`div`,0)(1,`h3`),K(2,` Pipes in template `),R(3,`span`,1),K(4),z()(),A(5,iD,5,0)(6,aD,2,0,`p`,2),z()),e&2){let e=W();D(4),q(e.rows().length),D(),j(e.rows().length?5:6)}}function sD(e,t,n){let r=(t?e?.pages?.find(e=>e.pageId===t):void 0)?.pipes??e?.pipes??[],i=[];for(let e of r){let t=e.components.find(e=>e.name===n);t&&i.push({name:e.name,isPure:e.isPure,uses:t.count,...e.call?{calls:e.call.callCount}:{},churn:!!e.churn,stale:!!e.stale})}return i.sort((e,t)=>e.name.localeCompare(t.name))}var cD=class e{plural=JE;destroyRef=S(vs);rpc=$(null);pageId=$(void 0);component=$.required();canShowPipes=$(!1);showPipe=ev();snapshot=E(void 0);loaded=E(!1);rows=X(()=>sD(this.snapshot(),this.pageId(),this.component()));unsubscribe;constructor(){ac(()=>{let e=this.rpc();e&&this.subscribe(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async subscribe(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`pipe-usage`);if(this.destroyRef.destroyed)return;let n=e=>{this.snapshot.set(e),this.loaded.set(!0)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-component-pipes`]],inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`],component:[1,`component`],canShowPipes:[1,`canShowPipes`]},outputs:{showPipe:`showPipe`},decls:1,vars:1,consts:[[1,`block`],[1,`pill`],[1,`empty-line`],[1,`chips`],[1,`hint`],[`type`,`button`,1,`pipe`],[1,`pipe`],[`type`,`button`,1,`pipe`,3,`click`],[1,`sr-only`],[1,`mono`],[1,`note`],[1,`flag`,`warn`]],template:function(e,t){e&1&&A(0,oD,7,2,`div`,0),e&2&&j(t.loaded()?0:-1)},styles:[`[_nghost-%COMP%] { display: block; } @@ -436,7 +436,7 @@ button.pipe[_ngcontent-%COMP%]:focus-visible { button.pipe[_ngcontent-%COMP%] { transition: none; } -}`]})};function lD(e){let t=e?.pages;return t&&typeof t==`object`?t:{}}function uD(e){let t=S(vs),n=E({}),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(lD(e));o(a.value()),i=a.on(`updated`,o)}catch{r===e&&n.set({})}};return ac(()=>{let t=e();t&&t!==r&&Z(()=>void a(t))}),t.onDestroy(()=>i?.()),n.asReadonly()}function dD(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 fD=[`*`];function pD(e,t){if(e&1&&(R(0,`div`,1)(1,`p`,2),K(2),z(),R(3,`p`,3),K(4),Tg(5),R(6,`a`,4),K(7,`Supported versions`),z()()()),e&2){let e=W();G(`compact`,e.compact()),D(2),q(e.title()),D(2),J(` `,t,` `),D(2),V(`href`,e.docsUrl,yu)}}var mD=`https://pangular-inspector.dev/getting-started/installation/#supported-angular-versions`,hD=class e{page=$(null);capability=$.required();missing=$(!1,{transform:lv});compact=$(!1,{transform:lv});docsUrl=mD;text=X(()=>{let e=this.page();return!this.missing()&&!rT(e,this.capability())?null:iT(this.capability(),e?.version)});title=X(()=>{let e=this.page()?.version;return e?`Not available on Angular ${eT(e)}`:`Not available on this page`});static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-angular-unavailable`]],inputs:{page:[1,`page`],capability:[1,`capability`],missing:[1,`missing`],compact:[1,`compact`]},ngContentSelectors:fD,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&&(wg(),A(0,pD,8,5,`div`,0)),e&2){let e;j((e=t.text())?0:-1,e)}},styles:[`[_nghost-%COMP%] { +}`]})};function lD(e){let t=e?.pages;return t&&typeof t==`object`?t:{}}function uD(e){let t=S(vs),n=E({}),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(lD(e));o(a.value()),i=a.on(`updated`,o)}catch{r===e&&n.set({})}};return ac(()=>{let t=e();t&&t!==r&&Z(()=>void a(t))}),t.onDestroy(()=>i?.()),n.asReadonly()}function dD(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 fD=[`*`];function pD(e,t){if(e&1&&(R(0,`div`,1)(1,`p`,2),K(2),z(),R(3,`p`,3),K(4),Eg(5),R(6,`a`,4),K(7,`Supported versions`),z()()()),e&2){let e=W();G(`compact`,e.compact()),D(2),q(e.title()),D(2),J(` `,t,` `),D(2),V(`href`,e.docsUrl,bu)}}var mD=`https://pangular-inspector.dev/getting-started/installation/#supported-angular-versions`,hD=class e{page=$(null);capability=$.required();missing=$(!1,{transform:dv});compact=$(!1,{transform:dv});docsUrl=mD;text=X(()=>{let e=this.page();return!this.missing()&&!rT(e,this.capability())?null:iT(this.capability(),e?.version)});title=X(()=>{let e=this.page()?.version;return e?`Not available on Angular ${eT(e)}`:`Not available on this page`});static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-angular-unavailable`]],inputs:{page:[1,`page`],capability:[1,`capability`],missing:[1,`missing`],compact:[1,`compact`]},ngContentSelectors:fD,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&&(Tg(),A(0,pD,8,5,`div`,0)),e&2){let e;j((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 gD(e){return e?.platform===`angular-native`}function _D(e){return gD(e)||e?.platform===`nativescript`}function vD(e,t){let n=Object.values(e??{}).filter(gD);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 yD=[`trigger`],bD=[`list`],xD=(e,t)=>t.value;function SD(e,t){if(e&1&&(R(0,`span`,4),K(1),z()),e&2){let e=W();D(),q(e.current().hint)}}function CD(e,t){if(e&1&&(R(0,`span`,15),K(1),z()),e&2){let e=W().$implicit;D(),q(e.hint)}}function wD(e,t){if(e&1){let e=B();R(0,`li`,11),U(`pointerenter`,function(){let t=C(e).$index;return w(W(2).active.set(t))})(`pointerdown`,function(e){return e.preventDefault()})(`click`,function(){let t=C(e).$index;return w(W(2).choose(t))}),T(),R(1,`svg`,12),og(2,`path`,13),z(),cs(),R(3,`span`,14),K(4),z(),A(5,CD,2,1,`span`,15),z()}if(e&2){let e=t.$implicit,n=t.$index,r=W(2);G(`active`,n===r.active())(`selected`,e.value===r.value()),k(`id`,r.uid+`-opt-`+n)(`aria-selected`,e.value===r.value())(`aria-disabled`,e.disabled||null),D(4),q(e.label),D(),j(e.hint?5:-1)}}function TD(e,t){if(e&1&&(R(0,`li`,10),K(1),z()),e&2){let e=W(2);D(),q(e.emptyText())}}function ED(e,t){if(e&1&&(R(0,`ul`,8,1),Ih(`list-in`),U(`pointerdown`,function(e){return e.preventDefault()}),M(2,wD,6,9,`li`,9,xD,!1,TD,2,1,`li`,10),z()),e&2){let e=W();G(`up`,e.dropUp()),k(`id`,e.uid+`-list`)(`aria-labelledby`,e.labelledBy()||e.uid+`-trigger`),D(2),N(e.options())}}var DD=0,OD=class e{options=$.required();value=rv(null);placeholder=$(`Select…`);ariaLabel=$(``);labelledBy=$(``);describedBy=$(``);disabled=$(!1);emptyText=$(`Nothing to choose`);uid=`app-select-${++DD}`;open=E(!1);active=E(-1);dropUp=E(!1);current=X(()=>this.options().find(e=>e.value===this.value())??null);host=S(kl);injector=S(gs);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<n.length;r+=t)if(!n[r].disabled)return r;return-1}setActive(e){this.active.set(e),!(e<0)&&ed(()=>{(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=O({type:e,selectors:[[`app-select`]],viewQuery:function(e,t){e&1&&Dg(t.trigger,yD,5)(t.list,bD,5),e&2&&Og(2)},hostAttrs:[1,`app-select`],hostVars:2,hostBindings:function(e,t){e&1&&H(`pointerdown`,function(e){return t.onOutside(e)},xu),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&&(R(0,`button`,2,0),U(`click`,function(){return t.toggle()})(`keydown`,function(e){return t.onKey(e)})(`blur`,function(e){return t.onBlur(e)}),R(2,`span`,3),K(3),z(),A(4,SD,2,1,`span`,4),T(),R(5,`svg`,5),og(6,`path`,6),z()(),A(7,ED,5,5,`ul`,7)),e&2&&(V(`disabled`,t.disabled()),k(`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),D(2),G(`placeholder`,!t.current()),D(),J(` `,t.current()?.label??t.placeholder(),` `),D(),j(t.current()?.hint?4:-1),D(3),j(t.open()?7:-1))},styles:[`[_nghost-%COMP%] { +}`]})};function gD(e){return e?.platform===`angular-native`}function _D(e){return gD(e)||e?.platform===`nativescript`}function vD(e,t){let n=Object.values(e??{}).filter(gD);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 yD=[`trigger`],bD=[`list`],xD=(e,t)=>t.value;function SD(e,t){if(e&1&&(R(0,`span`,4),K(1),z()),e&2){let e=W();D(),q(e.current().hint)}}function CD(e,t){if(e&1&&(R(0,`span`,15),K(1),z()),e&2){let e=W().$implicit;D(),q(e.hint)}}function wD(e,t){if(e&1){let e=B();R(0,`li`,11),U(`pointerenter`,function(){let t=C(e).$index;return w(W(2).active.set(t))})(`pointerdown`,function(e){return e.preventDefault()})(`click`,function(){let t=C(e).$index;return w(W(2).choose(t))}),T(),R(1,`svg`,12),sg(2,`path`,13),z(),cs(),R(3,`span`,14),K(4),z(),A(5,CD,2,1,`span`,15),z()}if(e&2){let e=t.$implicit,n=t.$index,r=W(2);G(`active`,n===r.active())(`selected`,e.value===r.value()),k(`id`,r.uid+`-opt-`+n)(`aria-selected`,e.value===r.value())(`aria-disabled`,e.disabled||null),D(4),q(e.label),D(),j(e.hint?5:-1)}}function TD(e,t){if(e&1&&(R(0,`li`,10),K(1),z()),e&2){let e=W(2);D(),q(e.emptyText())}}function ED(e,t){if(e&1&&(R(0,`ul`,8,1),Lh(`list-in`),U(`pointerdown`,function(e){return e.preventDefault()}),M(2,wD,6,9,`li`,9,xD,!1,TD,2,1,`li`,10),z()),e&2){let e=W();G(`up`,e.dropUp()),k(`id`,e.uid+`-list`)(`aria-labelledby`,e.labelledBy()||e.uid+`-trigger`),D(2),N(e.options())}}var DD=0,OD=class e{options=$.required();value=av(null);placeholder=$(`Select…`);ariaLabel=$(``);labelledBy=$(``);describedBy=$(``);disabled=$(!1);emptyText=$(`Nothing to choose`);uid=`app-select-${++DD}`;open=E(!1);active=E(-1);dropUp=E(!1);current=X(()=>this.options().find(e=>e.value===this.value())??null);host=S(kl);injector=S(gs);trigger=sv.required(`trigger`);list=sv(`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<n.length;r+=t)if(!n[r].disabled)return r;return-1}setActive(e){this.active.set(e),!(e<0)&&td(()=>{(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=O({type:e,selectors:[[`app-select`]],viewQuery:function(e,t){e&1&&Og(t.trigger,yD,5)(t.list,bD,5),e&2&&kg(2)},hostAttrs:[1,`app-select`],hostVars:2,hostBindings:function(e,t){e&1&&H(`pointerdown`,function(e){return t.onOutside(e)},Su),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&&(R(0,`button`,2,0),U(`click`,function(){return t.toggle()})(`keydown`,function(e){return t.onKey(e)})(`blur`,function(e){return t.onBlur(e)}),R(2,`span`,3),K(3),z(),A(4,SD,2,1,`span`,4),T(),R(5,`svg`,5),sg(6,`path`,6),z()(),A(7,ED,5,5,`ul`,7)),e&2&&(V(`disabled`,t.disabled()),k(`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),D(2),G(`placeholder`,!t.current()),D(),J(` `,t.current()?.label??t.placeholder(),` `),D(),j(t.current()?.hint?4:-1),D(3),j(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 kD(e,t){let n=Xw(t);if(Zw(n))return{nodes:e,matches:0};let r=0,i=e=>e.flatMap(e=>{let t=Qw(e,n);t&&r++;let a=i(e.children);return t||a.length?[{...e,children:a}]:[]});return{nodes:i(e),matches:r}}function AD(e){return e.flatMap(e=>e.kind===`directive`?AD(e.children):[{...e,children:AD(e.children)}])}function jD(e){return(e.attributes?.length?e.attributes:e.directives??[e.name]).map(e=>`[${e}]`).join(` `)}var MD={hydrated:`Hydrated`,skipped:`Skipped`,mismatched:`Mismatch`,client:`Client`};function ND(e){return MD[e]}function PD(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 FD(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 ID(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 LD(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&&!RD(t.roots,i)?{pageId:r,selectedId:null,detailId:n,destroyed:i}:{pageId:r,selectedId:i,detailId:n,destroyed:null}}function RD(e,t){return e.some(e=>e.id===t||RD(e.children,t))}function zD(e,t,n){let r=e.indexOf(n);if(r<0)return null;for(let n=r+1;n<e.length;n++)if(t.has(e[n]))return e[n];for(let n=r-1;n>=0;n--)if(t.has(e[n]))return e[n];return null}var BD=(e,t)=>t.key,VD=(e,t)=>t.id;function HD(e,t){e&1&&(R(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 `),R(2,`code`),K(3,`provideClientHydration()`),z(),K(4,` and use a development build to see each component's status. `),z())}function UD(e,t){if(e&1&&(R(0,`li`)(1,`span`,9),K(2),z(),K(3),z()),e&2){let e=t.$implicit;Zg(`count count-`+e.key),D(2),q(e.value),D(),J(` `,e.label,` `)}}function WD(e,t){if(e&1&&(R(0,`span`,15),K(1,`Expected `),R(2,`code`),K(3),z()()),e&2){let e=W().$implicit;D(3),q(e.expected)}}function GD(e,t){if(e&1&&(R(0,`span`,15),K(1,`Found `),R(2,`code`),K(3),z()()),e&2){let e=W().$implicit;D(3),q(e.actual)}}function KD(e,t){if(e&1){let e=B();R(0,`li`)(1,`button`,12),U(`click`,function(){let t=C(e).$implicit;return w(W(4).showNode.emit(t.id))})(`focus`,function(){let t=C(e).$implicit;return w(W(4).highlight.emit(t.id))})(`blur`,function(){return C(e),w(W(4).highlight.emit(null))})(`mouseenter`,function(){let t=C(e).$implicit;return w(W(4).highlight.emit(t.id))})(`mouseleave`,function(){return C(e),w(W(4).highlight.emit(null))}),R(2,`span`,13),K(3),z(),R(4,`span`,14),K(5),z(),A(6,WD,4,1,`span`,15),A(7,GD,4,1,`span`,15),z()()}if(e&2){let e=t.$implicit;D(3),q(e.name),D(2),J(`<`,e.tag,`>`),D(),j(e.expected?6:-1),D(),j(e.actual?7:-1)}}function qD(e,t){if(e&1&&(R(0,`h3`,10),K(1,`Mismatches`),z(),R(2,`ul`,11),M(3,KD,8,4,`li`,null,VD),z()),e&2){let e=W(2);D(3),N(e.mismatches)}}function JD(e,t){if(e&1){let e=B();R(0,`div`,3)(1,`ul`,4),M(2,UD,4,4,`li`,5,BD),z(),R(4,`button`,6),U(`click`,function(){return C(e),w(W(2).toggleOverlay())}),T(),R(5,`svg`,7),og(6,`rect`,8),z(),K(7,` Outline on page `),z()(),A(8,qD,5,0)}if(e&2){let e=W(),t=W();D(2),N(t.counts()),D(2),k(`aria-pressed`,t.overlayOn()),D(4),j(e.mismatches.length?8:-1)}}function YD(e,t){e&1&&A(0,HD,5,0,`p`,2)(1,JD,9,2),e&2&&j(+!!t.hydrated)}function XD(e,t){e&1&&(R(0,`p`,2),K(1,` This page was not rendered on the server, so there is nothing to hydrate. With server-side rendering and `),R(2,`code`),K(3,`provideClientHydration()`),z(),K(4,`, each component shows whether it was hydrated, skipped or mismatched. `),z())}var ZD=class e{report=$(void 0);overlay=Q_();showNode=Q_();highlight=Q_();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=O({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&&(R(0,`section`,0)(1,`h2`,1),K(2,`Hydration`),z(),A(3,YD,2,1)(4,XD,5,0,`p`,2),z()),e&2){let e;D(3),j((e=t.report())?3:4,e)}},styles:[`.hydration[_ngcontent-%COMP%] { +}`]})};function kD(e,t){let n=Xw(t);if(Zw(n))return{nodes:e,matches:0};let r=0,i=e=>e.flatMap(e=>{let t=Qw(e,n);t&&r++;let a=i(e.children);return t||a.length?[{...e,children:a}]:[]});return{nodes:i(e),matches:r}}function AD(e){return e.flatMap(e=>e.kind===`directive`?AD(e.children):[{...e,children:AD(e.children)}])}function jD(e){return(e.attributes?.length?e.attributes:e.directives??[e.name]).map(e=>`[${e}]`).join(` `)}var MD={hydrated:`Hydrated`,skipped:`Skipped`,mismatched:`Mismatch`,client:`Client`};function ND(e){return MD[e]}function PD(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 FD(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 ID(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 LD(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&&!RD(t.roots,i)?{pageId:r,selectedId:null,detailId:n,destroyed:i}:{pageId:r,selectedId:i,detailId:n,destroyed:null}}function RD(e,t){return e.some(e=>e.id===t||RD(e.children,t))}function zD(e,t,n){let r=e.indexOf(n);if(r<0)return null;for(let n=r+1;n<e.length;n++)if(t.has(e[n]))return e[n];for(let n=r-1;n>=0;n--)if(t.has(e[n]))return e[n];return null}var BD=(e,t)=>t.key,VD=(e,t)=>t.id;function HD(e,t){e&1&&(R(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 `),R(2,`code`),K(3,`provideClientHydration()`),z(),K(4,` and use a development build to see each component's status. `),z())}function UD(e,t){if(e&1&&(R(0,`li`)(1,`span`,9),K(2),z(),K(3),z()),e&2){let e=t.$implicit;Qg(`count count-`+e.key),D(2),q(e.value),D(),J(` `,e.label,` `)}}function WD(e,t){if(e&1&&(R(0,`span`,15),K(1,`Expected `),R(2,`code`),K(3),z()()),e&2){let e=W().$implicit;D(3),q(e.expected)}}function GD(e,t){if(e&1&&(R(0,`span`,15),K(1,`Found `),R(2,`code`),K(3),z()()),e&2){let e=W().$implicit;D(3),q(e.actual)}}function KD(e,t){if(e&1){let e=B();R(0,`li`)(1,`button`,12),U(`click`,function(){let t=C(e).$implicit;return w(W(4).showNode.emit(t.id))})(`focus`,function(){let t=C(e).$implicit;return w(W(4).highlight.emit(t.id))})(`blur`,function(){return C(e),w(W(4).highlight.emit(null))})(`mouseenter`,function(){let t=C(e).$implicit;return w(W(4).highlight.emit(t.id))})(`mouseleave`,function(){return C(e),w(W(4).highlight.emit(null))}),R(2,`span`,13),K(3),z(),R(4,`span`,14),K(5),z(),A(6,WD,4,1,`span`,15),A(7,GD,4,1,`span`,15),z()()}if(e&2){let e=t.$implicit;D(3),q(e.name),D(2),J(`<`,e.tag,`>`),D(),j(e.expected?6:-1),D(),j(e.actual?7:-1)}}function qD(e,t){if(e&1&&(R(0,`h3`,10),K(1,`Mismatches`),z(),R(2,`ul`,11),M(3,KD,8,4,`li`,null,VD),z()),e&2){let e=W(2);D(3),N(e.mismatches)}}function JD(e,t){if(e&1){let e=B();R(0,`div`,3)(1,`ul`,4),M(2,UD,4,4,`li`,5,BD),z(),R(4,`button`,6),U(`click`,function(){return C(e),w(W(2).toggleOverlay())}),T(),R(5,`svg`,7),sg(6,`rect`,8),z(),K(7,` Outline on page `),z()(),A(8,qD,5,0)}if(e&2){let e=W(),t=W();D(2),N(t.counts()),D(2),k(`aria-pressed`,t.overlayOn()),D(4),j(e.mismatches.length?8:-1)}}function YD(e,t){e&1&&A(0,HD,5,0,`p`,2)(1,JD,9,2),e&2&&j(+!!t.hydrated)}function XD(e,t){e&1&&(R(0,`p`,2),K(1,` This page was not rendered on the server, so there is nothing to hydrate. With server-side rendering and `),R(2,`code`),K(3,`provideClientHydration()`),z(),K(4,`, each component shows whether it was hydrated, skipped or mismatched. `),z())}var ZD=class e{report=$(void 0);overlay=ev();showNode=ev();highlight=ev();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=O({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&&(R(0,`section`,0)(1,`h2`,1),K(2,`Hydration`),z(),A(3,YD,2,1)(4,XD,5,0,`p`,2),z()),e&2){let e;D(3),j((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 QD(e,t){if(e&1&&(R(0,`p`,0),K(1),R(2,`code`),K(3),z(),K(4,` to keep more. `),R(5,`a`,1),K(6,`About limits`),z()()),e&2){let e=W();D(),v_(` Showing the latest `,e.max(),` `,e.what(),`. `,e.dropped(),` older `,e.dropped()===1?`entry was`:`entries were`,` dropped. Raise `),D(2),J(`limits.`,e.limit()),D(2),V(`href`,e.docsUrl,yu)}}var $D=`https://pangular-inspector.dev/getting-started/configuration/#limits`,eO=class e{dropped=$(0);max=$.required();what=$.required();limit=$.required();docsUrl=$D;static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&A(0,QD,7,6,`p`,0),e&2&&j(t.dropped()>0?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})};function QD(e,t){if(e&1&&(R(0,`p`,0),K(1),R(2,`code`),K(3),z(),K(4,` to keep more. `),R(5,`a`,1),K(6,`About limits`),z()()),e&2){let e=W();D(),b_(` Showing the latest `,e.max(),` `,e.what(),`. `,e.dropped(),` older `,e.dropped()===1?`entry was`:`entries were`,` dropped. Raise `),D(2),J(`limits.`,e.limit()),D(2),V(`href`,e.docsUrl,bu)}}var $D=`https://pangular-inspector.dev/getting-started/configuration/#limits`,eO=class e{dropped=$(0);max=$.required();what=$.required();limit=$.required();docsUrl=$D;static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&A(0,QD,7,6,`p`,0),e&2&&j(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; -}`]})},tO=864e13,nO=200,rO=300,iO=100,aO=10,oO=100,sO=2e3,cO=2e3,lO=4e3,uO=1e3,dO=100,fO=3,pO=50,mO={component:`c`,hook:`h`,afterRender:`r`,output:`o`},hO=Object.values(mO),gO=e=>!!e&&typeof e==`object`&&!Array.isArray(e),_O=e=>typeof e==`number`&&Number.isFinite(e)&&e>=0?e:0,vO=(e,t)=>typeof e==`string`?e.slice(0,t):``,yO=e=>_O(e)>0?_O(e):void 0,bO=(e,t)=>Array.isArray(e)?e.slice(0,t):[];function xO(e){if(!gO(e))return null;let t=vO(e.name,nO);return t?{name:t,checks:_O(e.checks),ms:_O(e.ms)}:null}function SO(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>uO||typeof o!=`string`||!hO.includes(o)?null:[n,r,_O(i),a,o]}function CO(e,t){if(!gO(e)||typeof e.id!=`number`)return null;let n=bO(e.components,aO).map(xO).filter(e=>!!e),r=vO(e.trigger,rO),i=bO(e.spans,40).map(e=>SO(e,t)).filter(e=>!!e),a=Array.isArray(e.spans)?e.spans.length-40:0,o=Math.floor(_O(e.droppedSpans))+Math.max(0,a),s={t:typeof e.t==`number`?_O(e.t):void 0,hookMs:yO(e.hookMs),afterRenderMs:yO(e.afterRenderMs),outputMs:yO(e.outputMs)},c=DO(e.cause),l=yO(e.refreshed),u=yO(e.unchanged);return{id:_O(e.id),at:_O(e.at),ms:_O(e.ms),passes:_O(e.passes),...r?{trigger:r}:{},checks:_O(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 wO=[`event`,`http`,`timer`,`signal`,`effect`,`markForCheck`,`input`,`view`,`tick`,`zone`,`unknown`],TO={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`},EO=e=>typeof e==`string`&&wO.includes(e);function DO(e){if(!gO(e)||!EO(e.kind))return;let t=[`component`,`listener`,`event`,`target`,`signal`,`task`],n={kind:e.kind};EO(e.via)&&(n.via=e.via);for(let r of t){let t=vO(e[r],nO);t&&(n[r]=t)}e.zone===!0&&(n.zone=!0);let r=bO(e.stack,fO).map(e=>vO(e,rO)).filter(Boolean);r.length&&(n.stack=r);let i=Math.floor(_O(e.more));return i&&(n.more=i),n}function OO(e){if(!gO(e))return null;let t=vO(e.name,nO);if(!t)return null;let n=e.strategy;return{name:t,refreshed:Math.floor(_O(e.refreshed)),unchanged:Math.floor(_O(e.unchanged)),...n===`OnPush`||n===`Eager`?{strategy:n}:{}}}function kO(e){if(!gO(e))return null;let t=vO(e.name,nO),n=vO(e.input,nO);if(!t||!n)return null;let r=vO(e.parent,nO);return{name:t,input:n,...r?{parent:r}:{},inPlace:Math.floor(_O(e.inPlace)),sameContents:Math.floor(_O(e.sameContents))}}function AO(e){if(!gO(e))return null;let t=vO(e.name,nO);if(!t)return null;let n=bO(e.tasks,3).map(e=>vO(e,nO)).filter(Boolean);return{name:t,ticks:Math.floor(_O(e.ticks)),...n.length?{tasks:n}:{}}}function jO(e){if(!gO(e))return;let t={};if(gO(e.causes))for(let n of wO){let r=Math.floor(_O(e.causes[n]));r&&(t[n]=r)}let n=bO(e.components,oO).map(OO).filter(e=>!!e),r=bO(e.inputs,pO).map(kO).filter(e=>!!e),i=bO(e.zone,pO).map(AO).filter(e=>!!e),a=Math.floor(_O(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 MO(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(`${TO[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 ${TO[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 NO(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 PO(e){let t=xO(e);return!t||!gO(e)?null:{...t,maxMs:_O(e.maxMs),cycles:_O(e.cycles)}}function FO(e){if(!gO(e))return null;let t=vO(e.name,nO),n=vO(e.hook,iO);if(!t||!n)return null;let{calls:r,ms:i,maxMs:a}=e;return{name:t,hook:n,calls:_O(r),ms:_O(i),maxMs:_O(a)}}function IO(e){if(!gO(e))return null;let t=vO(e.name,nO);if(!t)return null;let n=vO(e.listener,nO);return{name:t,...n?{listener:n}:{},calls:_O(e.calls),ms:_O(e.ms),maxMs:_O(e.maxMs)}}function LO(e){if(gO(e)&&_O(e.runs))return{runs:_O(e.runs),ms:_O(e.ms),maxMs:_O(e.maxMs)}}function RO(e,t){if(!gO(e))return null;let n=bO(e.spanNames,lO).map(e=>vO(e,rO)),r=Array.isArray(e.cycles)?e.cycles.slice(-Math.min(t,cO)).map(e=>CO(e,n.length)).filter(e=>!!e):[],i={},a=0;if(gO(e.hosts)){let t=Object.entries(e.hosts);a=Math.max(0,t.length-sO);for(let[e,n]of t.slice(0,sO))e.length<50&&_O(n)&&(i[e]=_O(n))}let o=Array.isArray(e.components)?e.components:[],s=Math.floor(_O(e.droppedClasses))+Math.max(0,o.length-oO),c=Math.floor(_O(e.droppedHosts))+a,l=bO(e.hooks,dO).map(FO).filter(e=>!!e),u=bO(e.outputs,dO).map(IO).filter(e=>!!e),d=Math.max(0,bO(e.hooks,1/0).length-dO)+Math.max(0,bO(e.outputs,1/0).length-dO),f=Math.floor(_O(e.droppedTimings))+d,p=LO(e.afterRender),m=r.some(e=>e.spans?.length),h=jO(e.diagnosis);return{recording:e.recording===!0,startedAt:typeof e.startedAt==`number`&&e.startedAt<=tO?_O(e.startedAt):null,dropped:_O(e.dropped),cycles:r,components:o.slice(0,oO).map(PO).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 zO=`pangular-inspector/change-detection`;function BO(e,t,n=Date.now()){return{format:zO,version:1,exportedAt:n,pageId:t,recording:{...RO(e,cO)??e,recording:!1,hosts:{}}}}function VO(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(!gO(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=gO(n.recording)?n.recording:n;if(!Array.isArray(r.cycles))return{ok:!1,error:`The file has no change detection cycles.`};let i=RO(r,t);if(!i)return{ok:!1,error:`The file is not a recording.`};let a=vO(n.pageId??r.pageId,49)||`imported`,o=yO(n.exportedAt);return{ok:!0,pageId:a,...o?{exportedAt:o}:{},recording:{...i,recording:!1}}}var HO=1,UO=1,WO=2,GO={c:`component`,h:`lifecycle-hook`,r:`after-render`,o:`output`},KO=e=>Math.round(e*1e6)/1e3;function qO(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:HO,tid:UO,ts:KO(e),dur:KO(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:MO(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===mO.output){let n=e+i;a.push({name:l,cat:GO[d],ph:`X`,pid:HO,tid:WO,ts:KO(n),dur:KO(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);m<f||(c.push({end:m}),a.push({name:l,cat:GO[d],ph:`X`,pid:HO,tid:UO,ts:KO(f),dur:KO(m-f),args:{cycle:t.id,depth:u}}))}}let c=Math.min(0,...a.map(e=>e.ts??0));if(c<0)for(let e of a)e.ts=KO((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:HO,tid:e,args:{name:n}});return{traceEvents:[l(0,`process_name`,`Angular change detection (page ${t})`),l(UO,`thread_name`,`Change detection`),l(WO,`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<=tO?{startedAt:new Date(e.startedAt).toISOString()}:{}}}}var JO=16.6;function YO(e){return e.ms>JO}function XO(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}function ZO(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 QO(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 $O(e){let t=e.reduce((e,t)=>Math.max(e,t.ms),0);return Math.max(t,JO*1.25)}function ek(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 tk={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 rk(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&&o<a[m].start+a[m].ms+1e-6?m:null,g={index:a.length,cycleId:e.id,name:r,kind:p,start:o,ms:u,selfMs:u,depth:f,parent:h,component:nk(r,p),x:(s+o-l)/i*100,w:u/i*100};h!==null&&(a[h].selfMs=Math.max(a[h].selfMs-u,0)),a.push(g),d[f]=g.index,d.length=f+1,c=Math.max(c,f+1)}s+=u}return{blocks:a,cycles:o,depth:c,totalMs:i}}var ik=(e,t)=>t.kind,ak=(e,t)=>t.name,ok=(e,t)=>t.name+`.`+t.input;function sk(e,t){e&1&&(R(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. `),z())}function ck(e,t){if(e&1&&(R(0,`tr`)(1,`td`),K(2),z(),R(3,`td`,6),K(4),z()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.count)}}function lk(e,t){if(e&1&&(R(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Trigger`),z(),R(5,`th`,5),K(6,`Cycles`),z()()(),R(7,`tbody`),M(8,ck,5,2,`tr`,null,ik),z()()),e&2){let e=W(2);D(8),N(e.causes())}}function uk(e,t){e&1&&(R(0,`p`,3),K(1,`No cycle has a cause yet.`),z())}function dk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,7),K(2),z(),R(3,`td`,6),K(4),z(),R(5,`td`,7),K(6),z()()),e&2){let e=t.$implicit;D(2),q(e.name),D(2),q(e.ticks),D(2),q(e.tasks?.join(`, `))}}function fk(e,t){if(e&1&&(R(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Component`),z(),R(5,`th`,5),K(6,`Zone-only ticks`),z(),R(7,`th`,4),K(8,`After`),z()()(),R(9,`tbody`),M(10,dk,7,3,`tr`,null,ak),z()()),e&2){let e=W(3);D(10),N(e.zone())}}function pk(e,t){if(e&1&&(R(0,`p`,3),K(1),z()),e&2){let e=W(3);D(),q(e.zoneNote())}}function mk(e,t){if(e&1&&(R(0,`div`)(1,`h4`),K(2,`Depends on zone.js`),z(),A(3,fk,12,0,`table`)(4,pk,2,1,`p`,3),z()),e&2){let e=W(),t=W();D(3),j(t.zone().length?3:e.triggers?4:-1)}}function hk(e,t){e&1&&(R(0,`p`,3),K(1,`The page can't watch DOM updates, so wasted checks are not counted.`),z())}function gk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,7),K(2),z(),R(3,`td`,6),K(4),z(),R(5,`td`,6),K(6),z(),R(7,`td`),K(8),z()()),e&2){let e=t.$implicit,n=W(3);D(2),q(e.name),D(2),q(e.refreshed),D(2),Y(``,e.unchanged,` (`,n.share(e.unchanged,e.refreshed),`)`),D(2),q(e.strategy??`Unknown`)}}function _k(e,t){if(e&1&&(R(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Component`),z(),R(5,`th`,5),K(6,`Refreshed`),z(),R(7,`th`,5),K(8,`Changed nothing`),z(),R(9,`th`,4),K(10,`Strategy`),z()()(),R(11,`tbody`),M(12,gk,9,5,`tr`,null,ak),z()()),e&2){let e=W(2);D(12),N(e.wasted())}}function vk(e,t){e&1&&(R(0,`p`,3),K(1,`Every refreshed check changed something.`),z())}function yk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,7),K(2),z(),R(3,`td`,7),K(4),z(),R(5,`td`,6),K(6),z(),R(7,`td`,6),K(8),z()()),e&2){let e=t.$implicit;D(2),Y(``,e.name,`.`,e.input),D(2),q(e.parent??`Unknown`),D(2),q(e.inPlace),D(2),q(e.sameContents)}}function bk(e,t){if(e&1&&(R(0,`h4`),K(1,`Inputs that break OnPush`),z(),R(2,`table`)(3,`thead`)(4,`tr`)(5,`th`,4),K(6,`Input`),z(),R(7,`th`,4),K(8,`Set by`),z(),R(9,`th`,5),K(10,`Changed in place`),z(),R(11,`th`,5),K(12,`Same contents, new reference`),z()()(),R(13,`tbody`),M(14,yk,9,5,`tr`,null,ok),z()()),e&2){let e=W(2);D(14),N(e.inputs())}}function xk(e,t){if(e&1&&(R(0,`li`),K(1),z()),e&2){let e=t.$implicit;D(),q(e.text)}}function Sk(e,t){if(e&1&&(R(0,`h4`),K(1,`Hints`),z(),R(2,`ul`,8),M(3,xk,2,1,`li`,null,Jh),z()),e&2){let e=W(2);D(3),N(e.hints())}}function Ck(e,t){if(e&1&&(R(0,`section`,0)(1,`h3`,1),K(2,`Why it ran and what it wasted`),z(),R(3,`div`,2)(4,`div`)(5,`h4`),K(6,`What started the cycles`),z(),A(7,sk,2,0,`p`,3)(8,lk,10,0,`table`)(9,uk,2,0,`p`,3),z(),A(10,mk,5,1,`div`),z(),R(11,`h4`),K(12,`Wasted checks`),z(),A(13,hk,2,0,`p`,3)(14,_k,14,0,`table`)(15,vk,2,0,`p`,3),A(16,bk,16,0),A(17,Sk,5,0),z()),e&2){let e=t,n=W();D(7),j(e.triggers?n.causes().length?8:9:7),D(3),j(n.hasZone()?10:-1),D(3),j(e.waste?n.wasted().length?14:15:13),D(3),j(n.inputs().length?16:-1),D(),j(n.hints().length?17:-1)}}var wk=10,Tk=class e{page=$(null);diagnosis=X(()=>this.page()?.diagnosis??null);causes=X(()=>{let e=this.diagnosis()?.causes??{};return wO.filter(t=>e[t]).map(t=>({kind:t,label:TO[t],count:e[t]}))});zone=X(()=>(this.diagnosis()?.zone??[]).slice(0,wk));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,wk));inputs=X(()=>(this.diagnosis()?.inputs??[]).slice(0,wk));hints=X(()=>NO(this.diagnosis()??void 0).slice(0,wk));share(e,t){return t?`${Math.round(e/t*100)}%`:`0%`}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&A(0,Ck,18,5,`section`,0),e&2){let e;j((e=t.diagnosis())?0:-1,e)}},styles:[`[_nghost-%COMP%] { +}`]})},tO=864e13,nO=200,rO=300,iO=100,aO=10,oO=100,sO=2e3,cO=2e3,lO=4e3,uO=1e3,dO=100,fO=3,pO=50,mO={component:`c`,hook:`h`,afterRender:`r`,output:`o`},hO=Object.values(mO),gO=e=>!!e&&typeof e==`object`&&!Array.isArray(e),_O=e=>typeof e==`number`&&Number.isFinite(e)&&e>=0?e:0,vO=(e,t)=>typeof e==`string`?e.slice(0,t):``,yO=e=>_O(e)>0?_O(e):void 0,bO=(e,t)=>Array.isArray(e)?e.slice(0,t):[];function xO(e){if(!gO(e))return null;let t=vO(e.name,nO);return t?{name:t,checks:_O(e.checks),ms:_O(e.ms)}:null}function SO(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>uO||typeof o!=`string`||!hO.includes(o)?null:[n,r,_O(i),a,o]}function CO(e,t){if(!gO(e)||typeof e.id!=`number`)return null;let n=bO(e.components,aO).map(xO).filter(e=>!!e),r=vO(e.trigger,rO),i=bO(e.spans,40).map(e=>SO(e,t)).filter(e=>!!e),a=Array.isArray(e.spans)?e.spans.length-40:0,o=Math.floor(_O(e.droppedSpans))+Math.max(0,a),s={t:typeof e.t==`number`?_O(e.t):void 0,hookMs:yO(e.hookMs),afterRenderMs:yO(e.afterRenderMs),outputMs:yO(e.outputMs)},c=DO(e.cause),l=yO(e.refreshed),u=yO(e.unchanged);return{id:_O(e.id),at:_O(e.at),ms:_O(e.ms),passes:_O(e.passes),...r?{trigger:r}:{},checks:_O(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 wO=[`event`,`http`,`timer`,`signal`,`effect`,`markForCheck`,`input`,`view`,`tick`,`zone`,`unknown`],TO={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`},EO=e=>typeof e==`string`&&wO.includes(e);function DO(e){if(!gO(e)||!EO(e.kind))return;let t=[`component`,`listener`,`event`,`target`,`signal`,`task`],n={kind:e.kind};EO(e.via)&&(n.via=e.via);for(let r of t){let t=vO(e[r],nO);t&&(n[r]=t)}e.zone===!0&&(n.zone=!0);let r=bO(e.stack,fO).map(e=>vO(e,rO)).filter(Boolean);r.length&&(n.stack=r);let i=Math.floor(_O(e.more));return i&&(n.more=i),n}function OO(e){if(!gO(e))return null;let t=vO(e.name,nO);if(!t)return null;let n=e.strategy;return{name:t,refreshed:Math.floor(_O(e.refreshed)),unchanged:Math.floor(_O(e.unchanged)),...n===`OnPush`||n===`Eager`?{strategy:n}:{}}}function kO(e){if(!gO(e))return null;let t=vO(e.name,nO),n=vO(e.input,nO);if(!t||!n)return null;let r=vO(e.parent,nO);return{name:t,input:n,...r?{parent:r}:{},inPlace:Math.floor(_O(e.inPlace)),sameContents:Math.floor(_O(e.sameContents))}}function AO(e){if(!gO(e))return null;let t=vO(e.name,nO);if(!t)return null;let n=bO(e.tasks,3).map(e=>vO(e,nO)).filter(Boolean);return{name:t,ticks:Math.floor(_O(e.ticks)),...n.length?{tasks:n}:{}}}function jO(e){if(!gO(e))return;let t={};if(gO(e.causes))for(let n of wO){let r=Math.floor(_O(e.causes[n]));r&&(t[n]=r)}let n=bO(e.components,oO).map(OO).filter(e=>!!e),r=bO(e.inputs,pO).map(kO).filter(e=>!!e),i=bO(e.zone,pO).map(AO).filter(e=>!!e),a=Math.floor(_O(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 MO(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(`${TO[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 ${TO[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 NO(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 PO(e){let t=xO(e);return!t||!gO(e)?null:{...t,maxMs:_O(e.maxMs),cycles:_O(e.cycles)}}function FO(e){if(!gO(e))return null;let t=vO(e.name,nO),n=vO(e.hook,iO);if(!t||!n)return null;let{calls:r,ms:i,maxMs:a}=e;return{name:t,hook:n,calls:_O(r),ms:_O(i),maxMs:_O(a)}}function IO(e){if(!gO(e))return null;let t=vO(e.name,nO);if(!t)return null;let n=vO(e.listener,nO);return{name:t,...n?{listener:n}:{},calls:_O(e.calls),ms:_O(e.ms),maxMs:_O(e.maxMs)}}function LO(e){if(gO(e)&&_O(e.runs))return{runs:_O(e.runs),ms:_O(e.ms),maxMs:_O(e.maxMs)}}function RO(e,t){if(!gO(e))return null;let n=bO(e.spanNames,lO).map(e=>vO(e,rO)),r=Array.isArray(e.cycles)?e.cycles.slice(-Math.min(t,cO)).map(e=>CO(e,n.length)).filter(e=>!!e):[],i={},a=0;if(gO(e.hosts)){let t=Object.entries(e.hosts);a=Math.max(0,t.length-sO);for(let[e,n]of t.slice(0,sO))e.length<50&&_O(n)&&(i[e]=_O(n))}let o=Array.isArray(e.components)?e.components:[],s=Math.floor(_O(e.droppedClasses))+Math.max(0,o.length-oO),c=Math.floor(_O(e.droppedHosts))+a,l=bO(e.hooks,dO).map(FO).filter(e=>!!e),u=bO(e.outputs,dO).map(IO).filter(e=>!!e),d=Math.max(0,bO(e.hooks,1/0).length-dO)+Math.max(0,bO(e.outputs,1/0).length-dO),f=Math.floor(_O(e.droppedTimings))+d,p=LO(e.afterRender),m=r.some(e=>e.spans?.length),h=jO(e.diagnosis);return{recording:e.recording===!0,startedAt:typeof e.startedAt==`number`&&e.startedAt<=tO?_O(e.startedAt):null,dropped:_O(e.dropped),cycles:r,components:o.slice(0,oO).map(PO).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 zO=`pangular-inspector/change-detection`;function BO(e,t,n=Date.now()){return{format:zO,version:1,exportedAt:n,pageId:t,recording:{...RO(e,cO)??e,recording:!1,hosts:{}}}}function VO(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(!gO(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=gO(n.recording)?n.recording:n;if(!Array.isArray(r.cycles))return{ok:!1,error:`The file has no change detection cycles.`};let i=RO(r,t);if(!i)return{ok:!1,error:`The file is not a recording.`};let a=vO(n.pageId??r.pageId,49)||`imported`,o=yO(n.exportedAt);return{ok:!0,pageId:a,...o?{exportedAt:o}:{},recording:{...i,recording:!1}}}var HO=1,UO=1,WO=2,GO={c:`component`,h:`lifecycle-hook`,r:`after-render`,o:`output`},KO=e=>Math.round(e*1e6)/1e3;function qO(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:HO,tid:UO,ts:KO(e),dur:KO(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:MO(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===mO.output){let n=e+i;a.push({name:l,cat:GO[d],ph:`X`,pid:HO,tid:WO,ts:KO(n),dur:KO(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);m<f||(c.push({end:m}),a.push({name:l,cat:GO[d],ph:`X`,pid:HO,tid:UO,ts:KO(f),dur:KO(m-f),args:{cycle:t.id,depth:u}}))}}let c=Math.min(0,...a.map(e=>e.ts??0));if(c<0)for(let e of a)e.ts=KO((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:HO,tid:e,args:{name:n}});return{traceEvents:[l(0,`process_name`,`Angular change detection (page ${t})`),l(UO,`thread_name`,`Change detection`),l(WO,`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<=tO?{startedAt:new Date(e.startedAt).toISOString()}:{}}}}var JO=16.6;function YO(e){return e.ms>JO}function XO(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}function ZO(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 QO(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 $O(e){let t=e.reduce((e,t)=>Math.max(e,t.ms),0);return Math.max(t,JO*1.25)}function ek(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 tk={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 rk(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&&o<a[m].start+a[m].ms+1e-6?m:null,g={index:a.length,cycleId:e.id,name:r,kind:p,start:o,ms:u,selfMs:u,depth:f,parent:h,component:nk(r,p),x:(s+o-l)/i*100,w:u/i*100};h!==null&&(a[h].selfMs=Math.max(a[h].selfMs-u,0)),a.push(g),d[f]=g.index,d.length=f+1,c=Math.max(c,f+1)}s+=u}return{blocks:a,cycles:o,depth:c,totalMs:i}}var ik=(e,t)=>t.kind,ak=(e,t)=>t.name,ok=(e,t)=>t.name+`.`+t.input;function sk(e,t){e&1&&(R(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. `),z())}function ck(e,t){if(e&1&&(R(0,`tr`)(1,`td`),K(2),z(),R(3,`td`,6),K(4),z()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.count)}}function lk(e,t){if(e&1&&(R(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Trigger`),z(),R(5,`th`,5),K(6,`Cycles`),z()()(),R(7,`tbody`),M(8,ck,5,2,`tr`,null,ik),z()()),e&2){let e=W(2);D(8),N(e.causes())}}function uk(e,t){e&1&&(R(0,`p`,3),K(1,`No cycle has a cause yet.`),z())}function dk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,7),K(2),z(),R(3,`td`,6),K(4),z(),R(5,`td`,7),K(6),z()()),e&2){let e=t.$implicit;D(2),q(e.name),D(2),q(e.ticks),D(2),q(e.tasks?.join(`, `))}}function fk(e,t){if(e&1&&(R(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Component`),z(),R(5,`th`,5),K(6,`Zone-only ticks`),z(),R(7,`th`,4),K(8,`After`),z()()(),R(9,`tbody`),M(10,dk,7,3,`tr`,null,ak),z()()),e&2){let e=W(3);D(10),N(e.zone())}}function pk(e,t){if(e&1&&(R(0,`p`,3),K(1),z()),e&2){let e=W(3);D(),q(e.zoneNote())}}function mk(e,t){if(e&1&&(R(0,`div`)(1,`h4`),K(2,`Depends on zone.js`),z(),A(3,fk,12,0,`table`)(4,pk,2,1,`p`,3),z()),e&2){let e=W(),t=W();D(3),j(t.zone().length?3:e.triggers?4:-1)}}function hk(e,t){e&1&&(R(0,`p`,3),K(1,`The page can't watch DOM updates, so wasted checks are not counted.`),z())}function gk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,7),K(2),z(),R(3,`td`,6),K(4),z(),R(5,`td`,6),K(6),z(),R(7,`td`),K(8),z()()),e&2){let e=t.$implicit,n=W(3);D(2),q(e.name),D(2),q(e.refreshed),D(2),Y(``,e.unchanged,` (`,n.share(e.unchanged,e.refreshed),`)`),D(2),q(e.strategy??`Unknown`)}}function _k(e,t){if(e&1&&(R(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Component`),z(),R(5,`th`,5),K(6,`Refreshed`),z(),R(7,`th`,5),K(8,`Changed nothing`),z(),R(9,`th`,4),K(10,`Strategy`),z()()(),R(11,`tbody`),M(12,gk,9,5,`tr`,null,ak),z()()),e&2){let e=W(2);D(12),N(e.wasted())}}function vk(e,t){e&1&&(R(0,`p`,3),K(1,`Every refreshed check changed something.`),z())}function yk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,7),K(2),z(),R(3,`td`,7),K(4),z(),R(5,`td`,6),K(6),z(),R(7,`td`,6),K(8),z()()),e&2){let e=t.$implicit;D(2),Y(``,e.name,`.`,e.input),D(2),q(e.parent??`Unknown`),D(2),q(e.inPlace),D(2),q(e.sameContents)}}function bk(e,t){if(e&1&&(R(0,`h4`),K(1,`Inputs that break OnPush`),z(),R(2,`table`)(3,`thead`)(4,`tr`)(5,`th`,4),K(6,`Input`),z(),R(7,`th`,4),K(8,`Set by`),z(),R(9,`th`,5),K(10,`Changed in place`),z(),R(11,`th`,5),K(12,`Same contents, new reference`),z()()(),R(13,`tbody`),M(14,yk,9,5,`tr`,null,ok),z()()),e&2){let e=W(2);D(14),N(e.inputs())}}function xk(e,t){if(e&1&&(R(0,`li`),K(1),z()),e&2){let e=t.$implicit;D(),q(e.text)}}function Sk(e,t){if(e&1&&(R(0,`h4`),K(1,`Hints`),z(),R(2,`ul`,8),M(3,xk,2,1,`li`,null,Yh),z()),e&2){let e=W(2);D(3),N(e.hints())}}function Ck(e,t){if(e&1&&(R(0,`section`,0)(1,`h3`,1),K(2,`Why it ran and what it wasted`),z(),R(3,`div`,2)(4,`div`)(5,`h4`),K(6,`What started the cycles`),z(),A(7,sk,2,0,`p`,3)(8,lk,10,0,`table`)(9,uk,2,0,`p`,3),z(),A(10,mk,5,1,`div`),z(),R(11,`h4`),K(12,`Wasted checks`),z(),A(13,hk,2,0,`p`,3)(14,_k,14,0,`table`)(15,vk,2,0,`p`,3),A(16,bk,16,0),A(17,Sk,5,0),z()),e&2){let e=t,n=W();D(7),j(e.triggers?n.causes().length?8:9:7),D(3),j(n.hasZone()?10:-1),D(3),j(e.waste?n.wasted().length?14:15:13),D(3),j(n.inputs().length?16:-1),D(),j(n.hints().length?17:-1)}}var wk=10,Tk=class e{page=$(null);diagnosis=X(()=>this.page()?.diagnosis??null);causes=X(()=>{let e=this.diagnosis()?.causes??{};return wO.filter(t=>e[t]).map(t=>({kind:t,label:TO[t],count:e[t]}))});zone=X(()=>(this.diagnosis()?.zone??[]).slice(0,wk));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,wk));inputs=X(()=>(this.diagnosis()?.inputs??[]).slice(0,wk));hints=X(()=>NO(this.diagnosis()??void 0).slice(0,wk));share(e,t){return t?`${Math.round(e/t*100)}%`:`0%`}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&A(0,Ck,18,5,`section`,0),e&2){let e;j((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; -}`]})},Ek=(e,t)=>t.cycle.id,Dk=(e,t)=>t.id;function Ok(e,t){if(e&1){let e=B();R(0,`button`,27),U(`click`,function(){return C(e),w(W().showAll())}),K(1,`Show all cycles`),z()}}function kk(e,t){if(e&1&&og(0,`div`,28),e&2){let e=t;Xg(`left`,e.left,`%`)(`width`,e.width,`%`)}}function Ak(e,t){if(e&1&&(R(0,`div`,29),og(1,`span`,30),z()),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),V(`id`,n.optionId(e.index)),k(`data-index`,e.index)(`aria-selected`,n.inRange(e.index))(`aria-label`,e.label),D(),Xg(`height`,e.height,`%`)}}function jk(e,t){e&1&&(R(0,`span`,33),K(1,`over budget`),z())}function Mk(e,t){if(e&1&&(R(0,`p`),K(1,` after `),R(2,`span`,35),K(3),z()()),e&2){let e=W();D(3),q(e.cycle.trigger)}}function Nk(e,t){if(e&1&&(R(0,`p`,34)(1,`span`,36),K(2),z(),R(3,`span`),K(4),z()()),e&2){let e=t.$implicit,n=W(2);D(2),q(e.name),D(2),q(n.fmt(e.ms))}}function Pk(e,t){if(e&1&&(R(0,`div`,31)(1,`p`,32)(2,`strong`),K(3),z(),R(4,`span`),K(5),z(),A(6,jk,2,0,`span`,33),z(),A(7,Mk,4,1,`p`),R(8,`p`),K(9),z(),M(10,Nk,5,2,`p`,34,Jh),z()),e&2){let e=t,n=W();Xg(`left`,e.left)(`right`,e.right),D(3),q(n.fmt(e.cycle.ms)),D(2),J(`cycle `,e.cycle.id),D(),j(e.over?6:-1),D(),j(e.cycle.trigger?7:-1),D(2),v_(` `,e.cycle.checks,` `,e.cycle.checks===1?`check`:`checks`,`, `,e.cycle.passes,` `,e.cycle.passes===1?`pass`:`passes`,` `),D(),N(e.top)}}function Fk(e,t){if(e&1&&og(0,`span`),e&2){let e=t.$implicit;G(`over`,e.over)}}function Ik(e,t){if(e&1&&K(0),e&2){let e=t,n=W(2);Y(` `,e.name,` (`,n.fmt(e.ms),`) `)}}function Lk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,37),K(2),z(),R(3,`td`,37),K(4),z(),R(5,`td`),K(6),z(),R(7,`td`,37),K(8),z(),R(9,`td`,37),K(10),z(),R(11,`td`,35),K(12),z(),R(13,`td`,35),A(14,Ik,1,2),z()()),e&2){let e,n=t.$implicit,r=W();D(2),q(n.id),D(2),q(r.fmt(n.ms)),D(2),q(r.isOver(n)?`Over`:`Within`),D(2),q(n.checks),D(2),q(n.passes),D(2),q(n.trigger??``),D(2),j((e=n.components[0])?14:-1,e)}}var Rk=0,zk=80,Bk=10,Vk=class e{cycles=$([]);range=rv(null);gapUntil=zk;budgetLabel=`${JO} ms budget`;uid=`cd-chart-${Rk++}`;hintId=`${this.uid}-hint`;active=E(null);anchor=null;dragging=!1;hover=E(null);focused=E(!1);max=X(()=>$O(this.cycles()));budgetAt=X(()=>JO/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:YO(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||a<i?null:{start:i,end:a}});selected=X(()=>ZO(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(YO).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 ${JO} 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<this.cycles().length?this.optionId(e):null});tip=X(()=>{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:YO(t),top:t.components.slice(0,3),...this.tipSide(e)}});tipSide(e){let t=this.cycles().length;return e+.5<t/2?{left:`min(calc(${(e+1)/t*100}% + 6px), max(0px, calc(100% - 240px)))`,right:null}:{left:null,right:`min(calc(${(t-e)/t*100}% + 6px), max(0px, calc(100% - 240px)))`}}fmt(e){return XO(e)}isOver(e){return YO(e)}optionId(e){return`${this.uid}-${e}`}inRange(e){let t=this.span();return!!t&&e>=t.start&&e<=t.end}describe(e){let t=[`Cycle ${e.id}`,XO(e.ms)];YO(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} ${XO(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+Bk;break;case`PageUp`:r=n-Bk;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=O({type:e,selectors:[[`app-cd-cycle-chart`]],hostBindings:function(e,t){e&1&&H(`pointerup`,function(){return t.endDrag()},bu)(`pointercancel`,function(){return t.endDrag()},bu)},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&&(R(0,`div`,0)(1,`label`)(2,`span`),K(3,`Start`),z(),R(4,`input`,1),U(`change`,function(e){return t.setEnd(`from`,e)}),z()(),R(5,`label`)(6,`span`),K(7,`End`),z(),R(8,`input`,1),U(`change`,function(e){return t.setEnd(`to`,e)}),z()(),A(9,Ok,2,0,`button`,2),R(10,`p`,3),K(11),z()(),R(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. `),z(),R(14,`div`,5)(15,`div`,6)(16,`span`,7),K(17),z(),R(18,`span`,8),K(19,`0 ms`),z()(),R(20,`div`,9),A(21,kk,1,4,`div`,10),R(22,`div`,11)(23,`span`),K(24),z()(),R(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)}),M(26,Ak,2,12,`div`,13,Ek),z(),A(28,Pk,12,12,`div`,14),z()(),R(29,`div`,15),M(30,Fk,1,2,`span`,16,Ek),z(),R(32,`ul`,17)(33,`li`),og(34,`span`,18),K(35,`Within budget`),z(),R(36,`li`),og(37,`span`,19)(38,`span`,20),K(39,`Over budget `),z(),R(40,`li`),og(41,`span`,21),K(42),z()(),R(43,`details`,22)(44,`summary`),K(45,`Show the cycles as a table`),z(),R(46,`div`,23)(47,`table`)(48,`caption`,24),K(49),z(),R(50,`thead`)(51,`tr`)(52,`th`,25),K(53,`Cycle`),z(),R(54,`th`,25),K(55,`Duration`),z(),R(56,`th`,26),K(57,`Budget`),z(),R(58,`th`,25),K(59,`Checks`),z(),R(60,`th`,25),K(61,`Passes`),z(),R(62,`th`,26),K(63,`After`),z(),R(64,`th`,26),K(65,`Slowest component`),z()()(),R(66,`tbody`),M(67,Lk,15,7,`tr`,null,Dk),z()()()()),e&2){let e,n;D(4),V(`min`,t.firstId())(`max`,t.lastId())(`value`,t.startId()),D(4),V(`min`,t.firstId())(`max`,t.lastId())(`value`,t.endId()),D(),j(t.range()?9:-1),D(2),q(t.summary()),D(),V(`id`,t.hintId),D(2),G(`flush`,t.bars().length>t.gapUntil),D(3),q(t.fmt(t.max())),D(4),j((e=t.band())?21:-1,e),D(),Xg(`bottom`,t.budgetAt(),`%`),D(2),q(t.budgetLabel),D(),k(`aria-label`,`Change detection cycles, `+t.summary())(`aria-describedby`,t.hintId)(`aria-activedescendant`,t.activeOptionId()),D(),N(t.bars()),D(2),j((n=t.tip())?28:-1,n),D(),G(`flush`,t.bars().length>t.gapUntil),D(),N(t.bars()),D(12),q(t.budgetLabel),D(4),k(`aria-label`,t.tableLabel()),D(3),J(` `,t.tableLabel(),` `),D(18),N(t.selected())}},styles:[`[_nghost-%COMP%] { +}`]})},Ek=(e,t)=>t.cycle.id,Dk=(e,t)=>t.id;function Ok(e,t){if(e&1){let e=B();R(0,`button`,27),U(`click`,function(){return C(e),w(W().showAll())}),K(1,`Show all cycles`),z()}}function kk(e,t){if(e&1&&sg(0,`div`,28),e&2){let e=t;Zg(`left`,e.left,`%`)(`width`,e.width,`%`)}}function Ak(e,t){if(e&1&&(R(0,`div`,29),sg(1,`span`,30),z()),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),V(`id`,n.optionId(e.index)),k(`data-index`,e.index)(`aria-selected`,n.inRange(e.index))(`aria-label`,e.label),D(),Zg(`height`,e.height,`%`)}}function jk(e,t){e&1&&(R(0,`span`,33),K(1,`over budget`),z())}function Mk(e,t){if(e&1&&(R(0,`p`),K(1,` after `),R(2,`span`,35),K(3),z()()),e&2){let e=W();D(3),q(e.cycle.trigger)}}function Nk(e,t){if(e&1&&(R(0,`p`,34)(1,`span`,36),K(2),z(),R(3,`span`),K(4),z()()),e&2){let e=t.$implicit,n=W(2);D(2),q(e.name),D(2),q(n.fmt(e.ms))}}function Pk(e,t){if(e&1&&(R(0,`div`,31)(1,`p`,32)(2,`strong`),K(3),z(),R(4,`span`),K(5),z(),A(6,jk,2,0,`span`,33),z(),A(7,Mk,4,1,`p`),R(8,`p`),K(9),z(),M(10,Nk,5,2,`p`,34,Yh),z()),e&2){let e=t,n=W();Zg(`left`,e.left)(`right`,e.right),D(3),q(n.fmt(e.cycle.ms)),D(2),J(`cycle `,e.cycle.id),D(),j(e.over?6:-1),D(),j(e.cycle.trigger?7:-1),D(2),b_(` `,e.cycle.checks,` `,e.cycle.checks===1?`check`:`checks`,`, `,e.cycle.passes,` `,e.cycle.passes===1?`pass`:`passes`,` `),D(),N(e.top)}}function Fk(e,t){if(e&1&&sg(0,`span`),e&2){let e=t.$implicit;G(`over`,e.over)}}function Ik(e,t){if(e&1&&K(0),e&2){let e=t,n=W(2);Y(` `,e.name,` (`,n.fmt(e.ms),`) `)}}function Lk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,37),K(2),z(),R(3,`td`,37),K(4),z(),R(5,`td`),K(6),z(),R(7,`td`,37),K(8),z(),R(9,`td`,37),K(10),z(),R(11,`td`,35),K(12),z(),R(13,`td`,35),A(14,Ik,1,2),z()()),e&2){let e,n=t.$implicit,r=W();D(2),q(n.id),D(2),q(r.fmt(n.ms)),D(2),q(r.isOver(n)?`Over`:`Within`),D(2),q(n.checks),D(2),q(n.passes),D(2),q(n.trigger??``),D(2),j((e=n.components[0])?14:-1,e)}}var Rk=0,zk=80,Bk=10,Vk=class e{cycles=$([]);range=av(null);gapUntil=zk;budgetLabel=`${JO} ms budget`;uid=`cd-chart-${Rk++}`;hintId=`${this.uid}-hint`;active=E(null);anchor=null;dragging=!1;hover=E(null);focused=E(!1);max=X(()=>$O(this.cycles()));budgetAt=X(()=>JO/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:YO(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||a<i?null:{start:i,end:a}});selected=X(()=>ZO(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(YO).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 ${JO} 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<this.cycles().length?this.optionId(e):null});tip=X(()=>{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:YO(t),top:t.components.slice(0,3),...this.tipSide(e)}});tipSide(e){let t=this.cycles().length;return e+.5<t/2?{left:`min(calc(${(e+1)/t*100}% + 6px), max(0px, calc(100% - 240px)))`,right:null}:{left:null,right:`min(calc(${(t-e)/t*100}% + 6px), max(0px, calc(100% - 240px)))`}}fmt(e){return XO(e)}isOver(e){return YO(e)}optionId(e){return`${this.uid}-${e}`}inRange(e){let t=this.span();return!!t&&e>=t.start&&e<=t.end}describe(e){let t=[`Cycle ${e.id}`,XO(e.ms)];YO(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} ${XO(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+Bk;break;case`PageUp`:r=n-Bk;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=O({type:e,selectors:[[`app-cd-cycle-chart`]],hostBindings:function(e,t){e&1&&H(`pointerup`,function(){return t.endDrag()},xu)(`pointercancel`,function(){return t.endDrag()},xu)},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&&(R(0,`div`,0)(1,`label`)(2,`span`),K(3,`Start`),z(),R(4,`input`,1),U(`change`,function(e){return t.setEnd(`from`,e)}),z()(),R(5,`label`)(6,`span`),K(7,`End`),z(),R(8,`input`,1),U(`change`,function(e){return t.setEnd(`to`,e)}),z()(),A(9,Ok,2,0,`button`,2),R(10,`p`,3),K(11),z()(),R(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. `),z(),R(14,`div`,5)(15,`div`,6)(16,`span`,7),K(17),z(),R(18,`span`,8),K(19,`0 ms`),z()(),R(20,`div`,9),A(21,kk,1,4,`div`,10),R(22,`div`,11)(23,`span`),K(24),z()(),R(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)}),M(26,Ak,2,12,`div`,13,Ek),z(),A(28,Pk,12,12,`div`,14),z()(),R(29,`div`,15),M(30,Fk,1,2,`span`,16,Ek),z(),R(32,`ul`,17)(33,`li`),sg(34,`span`,18),K(35,`Within budget`),z(),R(36,`li`),sg(37,`span`,19)(38,`span`,20),K(39,`Over budget `),z(),R(40,`li`),sg(41,`span`,21),K(42),z()(),R(43,`details`,22)(44,`summary`),K(45,`Show the cycles as a table`),z(),R(46,`div`,23)(47,`table`)(48,`caption`,24),K(49),z(),R(50,`thead`)(51,`tr`)(52,`th`,25),K(53,`Cycle`),z(),R(54,`th`,25),K(55,`Duration`),z(),R(56,`th`,26),K(57,`Budget`),z(),R(58,`th`,25),K(59,`Checks`),z(),R(60,`th`,25),K(61,`Passes`),z(),R(62,`th`,26),K(63,`After`),z(),R(64,`th`,26),K(65,`Slowest component`),z()()(),R(66,`tbody`),M(67,Lk,15,7,`tr`,null,Dk),z()()()()),e&2){let e,n;D(4),V(`min`,t.firstId())(`max`,t.lastId())(`value`,t.startId()),D(4),V(`min`,t.firstId())(`max`,t.lastId())(`value`,t.endId()),D(),j(t.range()?9:-1),D(2),q(t.summary()),D(),V(`id`,t.hintId),D(2),G(`flush`,t.bars().length>t.gapUntil),D(3),q(t.fmt(t.max())),D(4),j((e=t.band())?21:-1,e),D(),Zg(`bottom`,t.budgetAt(),`%`),D(2),q(t.budgetLabel),D(),k(`aria-label`,`Change detection cycles, `+t.summary())(`aria-describedby`,t.hintId)(`aria-activedescendant`,t.activeOptionId()),D(),N(t.bars()),D(2),j((n=t.tip())?28:-1,n),D(),G(`flush`,t.bars().length>t.gapUntil),D(),N(t.bars()),D(12),q(t.budgetLabel),D(4),k(`aria-label`,t.tableLabel()),D(3),J(` `,t.tableLabel(),` `),D(18),N(t.selected())}},styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1335,7 +1335,7 @@ td.mono[_ngcontent-%COMP%] { .bar[_ngcontent-%COMP%] { transition: none; } -}`]})},Hk=(e,t)=>t.id,Uk=(e,t)=>t.index,Wk=(e,t)=>t.kind;function Gk(e,t){if(e&1&&(R(0,`p`,0),K(1),z()),e&2){let e=W(2);D(),Y(` Pick `,e.max,` cycles or fewer to see their spans. `,e.count(),` are picked. `)}}function Kk(e,t){if(e&1&&(R(0,`span`),K(1),z()),e&2){let e=t.$implicit;Xg(`left`,e.x,`%`)(`width`,e.w,`%`),D(),J(`cycle `,e.id)}}function qk(e,t){if(e&1){let e=B();R(0,`button`,11),U(`focus`,function(){let t=C(e).$implicit;return w(W(3).current.set(t.index))})(`mouseenter`,function(){let t=C(e).$implicit;return w(W(3).hover.set(t.index))})(`mouseleave`,function(){return C(e),w(W(3).hover.set(null))})(`click`,function(){let t=C(e).$implicit;return w(W(3).choose(t))}),R(1,`span`,12),K(2),z()()}if(e&2){let e=t.$implicit,n=W(3);Zg(D_(`block kind-`,e.kind)),Xg(`left`,e.x,`%`)(`width`,e.w,`%`)(`top`,e.depth*n.row,`px`),G(`narrow`,e.w<4),k(`tabindex`,e.index===n.tabStop()?0:-1)(`data-index`,e.index)(`aria-label`,n.describe(e))(`aria-disabled`,e.component?null:`true`),D(2),q(e.name)}}function Jk(e,t){if(e&1&&(R(0,`li`),og(1,`span`,13),K(2),z()),e&2){let e=t.$implicit;D(),Zg(D_(`key kind-`,e.kind)),D(),q(e.label)}}function Yk(e,t){if(e&1&&(R(0,`p`,0),K(1),z()),e&2){let e=W(3);D(),Y(` Each cycle keeps its longest spans. `,e.dropped(),` shorter `,e.dropped()===1?`span was`:`spans were`,` left out. `)}}function Xk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,17),K(2),z(),R(3,`td`,18),K(4),z(),R(5,`td`),K(6),z(),R(7,`td`,17),K(8),z(),R(9,`td`,17),K(10),z(),R(11,`td`,17),K(12),z(),R(13,`td`,17),K(14),z()()),e&2){let e=t.$implicit,n=W(4);D(2),q(e.cycleId),D(),Xg(`padding-left`,6+e.depth*8,`px`),D(),q(e.name),D(2),q(n.kindLabel(e)),D(2),q(e.depth),D(2),q(n.fmt(e.start)),D(2),q(n.fmt(e.ms)),D(2),q(n.fmt(e.selfMs))}}function Zk(e,t){if(e&1&&(R(0,`div`,10)(1,`table`)(2,`caption`,14),K(3),z(),R(4,`thead`)(5,`tr`)(6,`th`,15),K(7,`Cycle`),z(),R(8,`th`,16),K(9,`Span`),z(),R(10,`th`,16),K(11,`Kind`),z(),R(12,`th`,15),K(13,`Depth`),z(),R(14,`th`,15),K(15,`Start`),z(),R(16,`th`,15),K(17,`Total`),z(),R(18,`th`,15),K(19,`Self`),z()()(),R(20,`tbody`),M(21,Xk,15,9,`tr`,null,Uk),z()()()),e&2){let e=W(),t=W(2);k(`aria-label`,t.tableLabel()),D(3),J(` `,t.tableLabel(),` `),D(18),N(e.blocks)}}function Qk(e,t){if(e&1){let e=B();R(0,`div`,1),U(`keydown`,function(t){return C(e),w(W(2).onKey(t))}),R(1,`div`,2),M(2,Kk,2,5,`span`,3,Hk),z(),R(4,`div`,4),M(5,qk,3,16,`button`,5,Uk),z()(),R(7,`p`,6),K(8),z(),R(9,`ul`,7),M(10,Jk,3,4,`li`,null,Wk),z(),R(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. `),z(),A(14,Yk,2,2,`p`,0),R(15,`details`,9),U(`toggle`,function(t){return C(e),w(W(2).onToggle(t))}),R(16,`summary`),K(17,`Show the spans as a table`),z(),A(18,Zk,23,2,`div`,10),z()}if(e&2){let e=t,n=W(2);k(`aria-label`,n.label()),D(2),N(e.cycles),D(2),Xg(`height`,e.depth*n.row,`px`),D(),N(e.blocks),D(3),q(n.readout()),D(2),N(n.kinds),D(4),j(n.dropped()?14:-1),D(4),j(n.tableOpen()?18:-1)}}function $k(e,t){if(e&1&&(R(0,`h3`),K(1,`Spans in the picked cycles`),z(),A(2,Gk,2,2,`p`,0)(3,Qk,19,6)),e&2){let e,t=W();D(2),j(t.tooMany()?2:(e=t.graph())?3:-1,e)}}var eA=22;function tA(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=Q_();row=eA;max=30;kinds=[`c`,`h`,`r`,`o`].map(e=>({kind:e,label:tk[e]}));current=E(0);tableOpen=E(!1);hover=E(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:rk(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 XO(e)}kindLabel(e){return tk[e.kind]}onToggle(e){this.tableOpen.set(e.target.open)}describe(e){let t=[e.name,tk[e.kind],`${XO(e.ms)} total`];return e.selfMs!==e.ms&&t.push(`${XO(e.selfMs)} self`),t.push(e.start<0?`cycle ${e.cycleId}, ${XO(-e.start)} before it started`:`cycle ${e.cycleId} at ${XO(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=tA(t,e=>e.index<n.index&&e.depth===n.depth);break;case`ArrowUp`:r=n.parent===null?tA(t,e=>e.index<n.index&&e.depth===n.depth-1):t[n.parent];break;case`ArrowDown`:r=t.find(e=>e.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=O({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&&A(0,$k,4,1),e&2&&j(t.hasSpans()?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})},Hk=(e,t)=>t.id,Uk=(e,t)=>t.index,Wk=(e,t)=>t.kind;function Gk(e,t){if(e&1&&(R(0,`p`,0),K(1),z()),e&2){let e=W(2);D(),Y(` Pick `,e.max,` cycles or fewer to see their spans. `,e.count(),` are picked. `)}}function Kk(e,t){if(e&1&&(R(0,`span`),K(1),z()),e&2){let e=t.$implicit;Zg(`left`,e.x,`%`)(`width`,e.w,`%`),D(),J(`cycle `,e.id)}}function qk(e,t){if(e&1){let e=B();R(0,`button`,11),U(`focus`,function(){let t=C(e).$implicit;return w(W(3).current.set(t.index))})(`mouseenter`,function(){let t=C(e).$implicit;return w(W(3).hover.set(t.index))})(`mouseleave`,function(){return C(e),w(W(3).hover.set(null))})(`click`,function(){let t=C(e).$implicit;return w(W(3).choose(t))}),R(1,`span`,12),K(2),z()()}if(e&2){let e=t.$implicit,n=W(3);Qg(k_(`block kind-`,e.kind)),Zg(`left`,e.x,`%`)(`width`,e.w,`%`)(`top`,e.depth*n.row,`px`),G(`narrow`,e.w<4),k(`tabindex`,e.index===n.tabStop()?0:-1)(`data-index`,e.index)(`aria-label`,n.describe(e))(`aria-disabled`,e.component?null:`true`),D(2),q(e.name)}}function Jk(e,t){if(e&1&&(R(0,`li`),sg(1,`span`,13),K(2),z()),e&2){let e=t.$implicit;D(),Qg(k_(`key kind-`,e.kind)),D(),q(e.label)}}function Yk(e,t){if(e&1&&(R(0,`p`,0),K(1),z()),e&2){let e=W(3);D(),Y(` Each cycle keeps its longest spans. `,e.dropped(),` shorter `,e.dropped()===1?`span was`:`spans were`,` left out. `)}}function Xk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,17),K(2),z(),R(3,`td`,18),K(4),z(),R(5,`td`),K(6),z(),R(7,`td`,17),K(8),z(),R(9,`td`,17),K(10),z(),R(11,`td`,17),K(12),z(),R(13,`td`,17),K(14),z()()),e&2){let e=t.$implicit,n=W(4);D(2),q(e.cycleId),D(),Zg(`padding-left`,6+e.depth*8,`px`),D(),q(e.name),D(2),q(n.kindLabel(e)),D(2),q(e.depth),D(2),q(n.fmt(e.start)),D(2),q(n.fmt(e.ms)),D(2),q(n.fmt(e.selfMs))}}function Zk(e,t){if(e&1&&(R(0,`div`,10)(1,`table`)(2,`caption`,14),K(3),z(),R(4,`thead`)(5,`tr`)(6,`th`,15),K(7,`Cycle`),z(),R(8,`th`,16),K(9,`Span`),z(),R(10,`th`,16),K(11,`Kind`),z(),R(12,`th`,15),K(13,`Depth`),z(),R(14,`th`,15),K(15,`Start`),z(),R(16,`th`,15),K(17,`Total`),z(),R(18,`th`,15),K(19,`Self`),z()()(),R(20,`tbody`),M(21,Xk,15,9,`tr`,null,Uk),z()()()),e&2){let e=W(),t=W(2);k(`aria-label`,t.tableLabel()),D(3),J(` `,t.tableLabel(),` `),D(18),N(e.blocks)}}function Qk(e,t){if(e&1){let e=B();R(0,`div`,1),U(`keydown`,function(t){return C(e),w(W(2).onKey(t))}),R(1,`div`,2),M(2,Kk,2,5,`span`,3,Hk),z(),R(4,`div`,4),M(5,qk,3,16,`button`,5,Uk),z()(),R(7,`p`,6),K(8),z(),R(9,`ul`,7),M(10,Jk,3,4,`li`,null,Wk),z(),R(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. `),z(),A(14,Yk,2,2,`p`,0),R(15,`details`,9),U(`toggle`,function(t){return C(e),w(W(2).onToggle(t))}),R(16,`summary`),K(17,`Show the spans as a table`),z(),A(18,Zk,23,2,`div`,10),z()}if(e&2){let e=t,n=W(2);k(`aria-label`,n.label()),D(2),N(e.cycles),D(2),Zg(`height`,e.depth*n.row,`px`),D(),N(e.blocks),D(3),q(n.readout()),D(2),N(n.kinds),D(4),j(n.dropped()?14:-1),D(4),j(n.tableOpen()?18:-1)}}function $k(e,t){if(e&1&&(R(0,`h3`),K(1,`Spans in the picked cycles`),z(),A(2,Gk,2,2,`p`,0)(3,Qk,19,6)),e&2){let e,t=W();D(2),j(t.tooMany()?2:(e=t.graph())?3:-1,e)}}var eA=22;function tA(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=ev();row=eA;max=30;kinds=[`c`,`h`,`r`,`o`].map(e=>({kind:e,label:tk[e]}));current=E(0);tableOpen=E(!1);hover=E(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:rk(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 XO(e)}kindLabel(e){return tk[e.kind]}onToggle(e){this.tableOpen.set(e.target.open)}describe(e){let t=[e.name,tk[e.kind],`${XO(e.ms)} total`];return e.selfMs!==e.ms&&t.push(`${XO(e.selfMs)} self`),t.push(e.start<0?`cycle ${e.cycleId}, ${XO(-e.start)} before it started`:`cycle ${e.cycleId} at ${XO(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=tA(t,e=>e.index<n.index&&e.depth===n.depth);break;case`ArrowUp`:r=n.parent===null?tA(t,e=>e.index<n.index&&e.depth===n.depth-1):t[n.parent];break;case`ArrowDown`:r=t.find(e=>e.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=O({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&&A(0,$k,4,1),e&2&&j(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 rA(e,t){if(e&1&&(R(0,`tr`)(1,`td`,5),K(2),z(),R(3,`td`,6),K(4),z(),R(5,`td`,6),K(6),z(),R(7,`td`,6),K(8),z()()),e&2){let e=t.$implicit,n=W(3);D(2),Y(``,e.name,`.`,e.hook),D(2),q(e.calls),D(2),q(n.ms(e.ms)),D(2),q(n.ms(e.maxMs))}}function iA(e,t){if(e&1&&(R(0,`div`)(1,`h3`),K(2,`Lifecycle hooks`),z(),R(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),K(7,`Hook`),z(),R(8,`th`,4),K(9,`Calls`),z(),R(10,`th`,4),K(11,`Time`),z(),R(12,`th`,4),K(13,`Slowest`),z()()(),R(14,`tbody`),M(15,rA,9,5,`tr`,null,Jh),z()()()),e&2){let e=W(2);D(15),N(e.hooks())}}function aA(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` (`,e.listener,`) `)}}function oA(e,t){if(e&1&&(R(0,`tr`)(1,`td`,5),K(2),A(3,aA,1,1),z(),R(4,`td`,6),K(5),z(),R(6,`td`,6),K(7),z(),R(8,`td`,6),K(9),z()()),e&2){let e=t.$implicit,n=W(3);D(2),J(` `,e.name,` `),D(),j(e.listener?3:-1),D(2),q(e.calls),D(2),q(n.ms(e.ms)),D(2),q(n.ms(e.maxMs))}}function sA(e,t){if(e&1&&(R(0,`div`)(1,`h3`),K(2,`Output listeners`),z(),R(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),K(7,`Listener`),z(),R(8,`th`,4),K(9,`Calls`),z(),R(10,`th`,4),K(11,`Time`),z(),R(12,`th`,4),K(13,`Slowest`),z()()(),R(14,`tbody`),M(15,oA,10,5,`tr`,null,Jh),z()()()),e&2){let e=W(2);D(15),N(e.outputs())}}function cA(e,t){if(e&1&&(R(0,`p`,1),K(1),z()),e&2){let e=t,n=W(2);D(),v_(` afterRender callbacks ran `,e.runs,` `,e.runs===1?`time`:`times`,`, `,n.ms(e.ms),` in total, slowest `,n.ms(e.maxMs),`. `)}}function lA(e,t){if(e&1&&(R(0,`p`,2),K(1),z()),e&2){let e=W(2);D(),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 uA(e,t){if(e&1&&(R(0,`div`,0),A(1,iA,17,0,`div`),A(2,sA,17,0,`div`),z(),A(3,cA,2,4,`p`,1),A(4,lA,2,2,`p`,2)),e&2){let e,t=W();D(),j(t.hooks().length?1:-1),D(),j(t.outputs().length?2:-1),D(),j((e=t.afterRender())?3:-1,e),D(),j(t.dropped()?4:-1)}}var dA=10;function fA(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}var pA=class e{page=$(null);hooks=X(()=>(this.page()?.hooks??[]).slice(0,dA));outputs=X(()=>(this.page()?.outputs??[]).slice(0,dA));afterRender=X(()=>{let e=this.page()?.afterRender;return e?.runs?e:null});dropped=X(()=>this.page()?.droppedTimings??0);ms(e){return fA(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&A(0,uA,5,4),e&2&&j(t.hooks().length||t.outputs().length||t.afterRender()?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})};function rA(e,t){if(e&1&&(R(0,`tr`)(1,`td`,5),K(2),z(),R(3,`td`,6),K(4),z(),R(5,`td`,6),K(6),z(),R(7,`td`,6),K(8),z()()),e&2){let e=t.$implicit,n=W(3);D(2),Y(``,e.name,`.`,e.hook),D(2),q(e.calls),D(2),q(n.ms(e.ms)),D(2),q(n.ms(e.maxMs))}}function iA(e,t){if(e&1&&(R(0,`div`)(1,`h3`),K(2,`Lifecycle hooks`),z(),R(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),K(7,`Hook`),z(),R(8,`th`,4),K(9,`Calls`),z(),R(10,`th`,4),K(11,`Time`),z(),R(12,`th`,4),K(13,`Slowest`),z()()(),R(14,`tbody`),M(15,rA,9,5,`tr`,null,Yh),z()()()),e&2){let e=W(2);D(15),N(e.hooks())}}function aA(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` (`,e.listener,`) `)}}function oA(e,t){if(e&1&&(R(0,`tr`)(1,`td`,5),K(2),A(3,aA,1,1),z(),R(4,`td`,6),K(5),z(),R(6,`td`,6),K(7),z(),R(8,`td`,6),K(9),z()()),e&2){let e=t.$implicit,n=W(3);D(2),J(` `,e.name,` `),D(),j(e.listener?3:-1),D(2),q(e.calls),D(2),q(n.ms(e.ms)),D(2),q(n.ms(e.maxMs))}}function sA(e,t){if(e&1&&(R(0,`div`)(1,`h3`),K(2,`Output listeners`),z(),R(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),K(7,`Listener`),z(),R(8,`th`,4),K(9,`Calls`),z(),R(10,`th`,4),K(11,`Time`),z(),R(12,`th`,4),K(13,`Slowest`),z()()(),R(14,`tbody`),M(15,oA,10,5,`tr`,null,Yh),z()()()),e&2){let e=W(2);D(15),N(e.outputs())}}function cA(e,t){if(e&1&&(R(0,`p`,1),K(1),z()),e&2){let e=t,n=W(2);D(),b_(` afterRender callbacks ran `,e.runs,` `,e.runs===1?`time`:`times`,`, `,n.ms(e.ms),` in total, slowest `,n.ms(e.maxMs),`. `)}}function lA(e,t){if(e&1&&(R(0,`p`,2),K(1),z()),e&2){let e=W(2);D(),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 uA(e,t){if(e&1&&(R(0,`div`,0),A(1,iA,17,0,`div`),A(2,sA,17,0,`div`),z(),A(3,cA,2,4,`p`,1),A(4,lA,2,2,`p`,2)),e&2){let e,t=W();D(),j(t.hooks().length?1:-1),D(),j(t.outputs().length?2:-1),D(),j((e=t.afterRender())?3:-1,e),D(),j(t.dropped()?4:-1)}}var dA=10;function fA(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}var pA=class e{page=$(null);hooks=X(()=>(this.page()?.hooks??[]).slice(0,dA));outputs=X(()=>(this.page()?.outputs??[]).slice(0,dA));afterRender=X(()=>{let e=this.page()?.afterRender;return e?.runs?e:null});dropped=X(()=>this.page()?.droppedTimings??0);ms(e){return fA(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&A(0,uA,5,4),e&2&&j(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 mA(e,t){if(e&1&&(R(0,`p`,5),K(1),z()),e&2){let e=W();D(),q(e.error())}}function hA(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 gA=class e{page=$(null);maxCycles=$(200);imported=Q_();error=E(``);hasCycles(){return(this.page()?.cycles.length??0)>0}exportJson(){let e=this.page();e&&hA(BO(e,e.pageId),`change-detection-${e.pageId}.json`)}exportTrace(){let e=this.page();e&&hA(qO(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=VO(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=O({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=B();R(0,`div`,1)(1,`button`,2),U(`click`,function(){return t.exportJson()}),K(2,`Export JSON`),z(),R(3,`button`,2),U(`click`,function(){return t.exportTrace()}),K(4,` Export trace (Perfetto) `),z(),R(5,`button`,3),U(`click`,function(){return C(e),w(kg(8).click())}),K(6,`Import`),z(),R(7,`input`,4,0),U(`change`,function(){C(e);let n=kg(8);return w(t.read(n))}),z()(),A(9,mA,2,1,`p`,5)}e&2&&(D(),V(`disabled`,!t.hasCycles()),D(2),V(`disabled`,!t.hasCycles()),D(6),j(t.error()?9:-1))},styles:[`[_nghost-%COMP%] { +}`]})};function mA(e,t){if(e&1&&(R(0,`p`,5),K(1),z()),e&2){let e=W();D(),q(e.error())}}function hA(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 gA=class e{page=$(null);maxCycles=$(200);imported=ev();error=E(``);hasCycles(){return(this.page()?.cycles.length??0)>0}exportJson(){let e=this.page();e&&hA(BO(e,e.pageId),`change-detection-${e.pageId}.json`)}exportTrace(){let e=this.page();e&&hA(qO(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=VO(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=O({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=B();R(0,`div`,1)(1,`button`,2),U(`click`,function(){return t.exportJson()}),K(2,`Export JSON`),z(),R(3,`button`,2),U(`click`,function(){return t.exportTrace()}),K(4,` Export trace (Perfetto) `),z(),R(5,`button`,3),U(`click`,function(){return C(e),w(Ag(8).click())}),K(6,`Import`),z(),R(7,`input`,4,0),U(`change`,function(){C(e);let n=Ag(8);return w(t.read(n))}),z()(),A(9,mA,2,1,`p`,5)}e&2&&(D(),V(`disabled`,!t.hasCycles()),D(2),V(`disabled`,!t.hasCycles()),D(6),j(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; -}`]})},_A=(e,t)=>t.stat.name;function vA(e,t){if(e&1&&(R(0,`span`,8),K(1),z()),e&2){let e=W(2).$implicit;D(),J(``,e.other,` more`)}}function yA(e,t){if(e&1&&(R(0,`div`,6)(1,`span`,7),K(2),z(),A(3,vA,2,1,`span`,8),z()),e&2){let e=W().$implicit;Xg(`--%NS%tone`,e.tone+`%`),D(2),q(e.label),D(),j(e.roomy?3:-1)}}function bA(e,t){if(e&1&&(R(0,`span`,10),K(1),z(),R(2,`span`,11),K(3),z()),e&2){let e=W(2).$implicit,t=W(2);D(),q(e.stat.name),D(2),q(t.fmt(e.stat.ms))}}function xA(e,t){if(e&1){let e=B();R(0,`button`,9),U(`focus`,function(){C(e);let t=W().$index;return w(W(2).current.set(t))})(`click`,function(){C(e);let t=W().$implicit;return w(W(2).pick.emit(t.stat.name))}),A(1,bA,4,2),z()}if(e&2){let e=W(),t=e.$implicit,n=e.$index,r=W(2);Xg(`--%NS%tone`,t.tone+`%`),k(`tabindex`,n===r.tabStop()?0:-1)(`aria-label`,t.label)(`data-index`,n),D(),j(t.roomy?1:-1)}}function SA(e,t){if(e&1&&(R(0,`li`),A(1,yA,4,4,`div`,4)(2,xA,2,6,`button`,5),z()),e&2){let e=t.$implicit;Xg(`left`,e.x,`%`)(`top`,e.y,`%`)(`width`,e.w,`%`)(`height`,e.h,`%`),D(),j(e.other?1:2)}}function CA(e,t){if(e&1){let e=B();R(0,`ul`,2),U(`keydown`,function(t){return C(e),w(W().onKey(t))}),M(1,SA,3,9,`li`,3,_A),z()}if(e&2){let e=W();k(`aria-label`,e.label()),D(),N(e.cells())}}function wA(e,t){e&1&&(R(0,`p`,1),K(1,`No component time in these cycles.`),z())}var TA=24,EA=3,DA=class e{stats=$([]);scope=$(`the recording`);pick=Q_();current=E(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,TA),n=e.slice(TA),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=ek(i,e=>e.stat.ms,EA);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, ${XO(t.ms)}, ${r}% of self time`:`${t.name}, ${XO(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 XO(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=O({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&&A(0,CA,3,1,`ul`,0)(1,wA,2,0,`p`,1),e&2&&j(+!t.cells().length)},styles:[`[_nghost-%COMP%] { +}`]})},_A=(e,t)=>t.stat.name;function vA(e,t){if(e&1&&(R(0,`span`,8),K(1),z()),e&2){let e=W(2).$implicit;D(),J(``,e.other,` more`)}}function yA(e,t){if(e&1&&(R(0,`div`,6)(1,`span`,7),K(2),z(),A(3,vA,2,1,`span`,8),z()),e&2){let e=W().$implicit;Zg(`--%NS%tone`,e.tone+`%`),D(2),q(e.label),D(),j(e.roomy?3:-1)}}function bA(e,t){if(e&1&&(R(0,`span`,10),K(1),z(),R(2,`span`,11),K(3),z()),e&2){let e=W(2).$implicit,t=W(2);D(),q(e.stat.name),D(2),q(t.fmt(e.stat.ms))}}function xA(e,t){if(e&1){let e=B();R(0,`button`,9),U(`focus`,function(){C(e);let t=W().$index;return w(W(2).current.set(t))})(`click`,function(){C(e);let t=W().$implicit;return w(W(2).pick.emit(t.stat.name))}),A(1,bA,4,2),z()}if(e&2){let e=W(),t=e.$implicit,n=e.$index,r=W(2);Zg(`--%NS%tone`,t.tone+`%`),k(`tabindex`,n===r.tabStop()?0:-1)(`aria-label`,t.label)(`data-index`,n),D(),j(t.roomy?1:-1)}}function SA(e,t){if(e&1&&(R(0,`li`),A(1,yA,4,4,`div`,4)(2,xA,2,6,`button`,5),z()),e&2){let e=t.$implicit;Zg(`left`,e.x,`%`)(`top`,e.y,`%`)(`width`,e.w,`%`)(`height`,e.h,`%`),D(),j(e.other?1:2)}}function CA(e,t){if(e&1){let e=B();R(0,`ul`,2),U(`keydown`,function(t){return C(e),w(W().onKey(t))}),M(1,SA,3,9,`li`,3,_A),z()}if(e&2){let e=W();k(`aria-label`,e.label()),D(),N(e.cells())}}function wA(e,t){e&1&&(R(0,`p`,1),K(1,`No component time in these cycles.`),z())}var TA=24,EA=3,DA=class e{stats=$([]);scope=$(`the recording`);pick=ev();current=E(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,TA),n=e.slice(TA),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=ek(i,e=>e.stat.ms,EA);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, ${XO(t.ms)}, ${r}% of self time`:`${t.name}, ${XO(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 XO(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=O({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&&A(0,CA,3,1,`ul`,0)(1,wA,2,0,`p`,1),e&2&&j(+!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); -}`]})},OA=(e,t)=>t.id;function kA(e,t){if(e&1){let e=B();F(0,`button`,14),H(`click`,function(){return C(e),w(W(2).clear())}),K(1,`Clear`),I()}}function AA(e,t){if(e&1){let e=B();F(0,`button`,11),H(`click`,function(){return C(e),w(W().toggle())}),L(1,`span`,12),K(2),I(),A(3,kA,2,0,`button`,13)}if(e&2){let e=W();G(`on`,e.recording()),P(`disabled`,!e.pageId()),D(2),J(` `,e.recording()?`Stop recording`:`Record`,` `),D(),j(e.cycles().length?3:-1)}}function jA(e,t){if(e&1){let e=B();F(0,`p`,6)(1,`span`,15),K(2,`Imported recording`),I(),F(3,`span`,16),K(4),I(),F(5,`button`,14),H(`click`,function(){return C(e),w(W().closeImport())}),K(6,`Back to live recording`),I()()}e&2&&(D(4),q(t.fileName))}function MA(e,t){e&1&&K(0,` An app on a device has no DOM, so checks that changed nothing are not counted there. `)}function NA(e,t){e&1&&K(0,` A recording keeps running when the tab reloads, so it catches the next start of the app. The cycles from before the reload are gone with the old page. `)}function PA(e,t){e&1&&(F(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. `),I())}function FA(e,t){e&1&&L(0,`app-angular-unavailable`,17),e&2&&P(`page`,W(2).angularPage())}function IA(e,t){e&1&&A(0,PA,2,0,`p`,9)(1,FA,1,1,`app-angular-unavailable`,17),e&2&&j(+!W().attachPending())}function LA(e,t){e&1&&(F(0,`p`,9),K(1,`Angular profiling stays on until the page reloads.`),I())}function RA(e,t){e&1&&L(0,`app-angular-unavailable`,21),e&2&&P(`page`,W(2).angularPage())}function zA(e,t){if(e&1){let e=B();F(0,`div`,18)(1,`span`,19),K(2,`Live views`),I(),F(3,`button`,20),H(`click`,function(){C(e);let t=W();return w(t.setView(`flash`,!t.views().flash))}),L(4,`span`,12),K(5,` Flash checks `),I(),F(6,`button`,20),H(`click`,function(){C(e);let t=W();return w(t.setView(`track`,!t.views().track))}),L(7,`span`,12),K(8,` Performance track `),I(),F(9,`button`,20),H(`click`,function(){return C(e),w(W().setView(`angularProfiling`,!0))}),L(10,`span`,12),K(11,` Angular profiling `),I()(),F(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. `),I(),A(14,LA,2,0,`p`,9)(15,RA,1,1,`app-angular-unavailable`,21)}if(e&2){let e=W();D(3),P(`disabled`,!e.canShowViews()),k(`aria-pressed`,e.views().flash),D(3),P(`disabled`,!e.canShowViews()),k(`aria-pressed`,e.views().track),D(3),P(`disabled`,!e.canShowViews()||e.views().angularProfiling||!e.views().angularProfilingAvailable),k(`aria-pressed`,e.views().angularProfiling),D(5),j(e.views().angularProfiling?14:e.views().angularProfilingAvailable?-1:15)}}function BA(e,t){if(e&1&&(F(0,`p`,9),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function VA(e,t){if(e&1&&(F(0,`p`,24),K(1),I()),e&2){let e=W(2);D(),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 HA(e,t){e&1&&(F(0,`p`,9),K(1,` For picked cycles, totals come from the 10 slowest components each cycle lists. `),I())}function UA(e,t){if(e&1){let e=B();F(0,`h3`),K(1,`Cycles`),I(),F(2,`app-cd-cycle-chart`,22),S_(`rangeChange`,function(t){C(e);let n=W();return x_(n.range,t)||(n.range=t),w(t)}),I(),F(3,`app-cd-flame-graph`,23),H(`pick`,function(t){return C(e),w(W().showComponent.emit(t))}),I(),A(4,VA,2,1,`p`,24),F(5,`h3`),K(6,`Self time by component`),I(),A(7,HA,2,0,`p`,9),F(8,`app-cd-treemap`,25),H(`pick`,function(t){return C(e),w(W().showComponent.emit(t))}),I()}if(e&2){let e=W();D(2),P(`cycles`,e.cycles()),b_(`range`,e.range),D(),P(`cycles`,e.picked())(`names`,e.spanNames())(`scope`,e.scope()),D(),j(e.hasSpans()?-1:4),D(3),j(e.range()?7:-1),D(),P(`stats`,e.stats())(`scope`,e.scope())}}function WA(e,t){if(e&1){let e=B();F(0,`tr`)(1,`td`,16)(2,`button`,31),H(`click`,function(){let t=C(e).$implicit;return w(W(2).showComponent.emit(t.name))}),K(3),I()(),F(4,`td`,32),K(5),I(),F(6,`td`,32),K(7),I(),F(8,`td`,32),K(9),I()()}if(e&2){let e=t.$implicit,n=W(2);D(3),J(` `,e.name,` `),D(2),q(e.checks),D(2),q(n.ms(e.ms)),D(2),q(n.ms(e.maxMs))}}function GA(e,t){e&1&&(F(0,`tr`)(1,`td`,33),K(2,`No component time in the picked cycles.`),I()())}function KA(e,t){if(e&1){let e=B();F(0,`tr`)(1,`td`,16)(2,`button`,31),H(`click`,function(){let t=C(e).$implicit;return w(W(2).showComponent.emit(t.name))}),K(3),I()(),F(4,`td`,32),K(5),I(),F(6,`td`,32),K(7),I(),F(8,`td`,32),K(9),I()()}if(e&2){let e=t.$implicit,n=W(2);D(3),J(` `,e.name,` `),D(2),q(e.checks),D(2),q(e.cycles),D(2),q(n.ms(e.ms))}}function qA(e,t){e&1&&(F(0,`tr`)(1,`td`,33),K(2,`No component checks in the picked cycles.`),I()())}function JA(e,t){if(e&1&&(F(0,`span`,35),K(1,`from `),F(2,`span`,16),K(3),I()()),e&2){let e=W(3);D(3),q(e.causeText(t))}}function YA(e,t){if(e&1&&(F(0,`span`,35),K(1,`after `),F(2,`span`,16),K(3),I()()),e&2){let e=W().$implicit;D(3),q(e.trigger)}}function XA(e,t){if(e&1&&(F(0,`span`,36),K(1),I()),e&2){let e=W().$implicit;D(),J(``,e.unchanged,` changed nothing`)}}function ZA(e,t){if(e&1&&(F(0,`span`,36),K(1),I()),e&2){let e=W().$implicit,t=W(2);D(),J(`hooks `,t.ms(e.hookMs))}}function QA(e,t){if(e&1&&(F(0,`span`,36),K(1),I()),e&2){let e=W().$implicit,t=W(2);D(),J(`afterRender `,t.ms(e.afterRenderMs))}}function $A(e,t){if(e&1&&(F(0,`span`,37),K(1,` slowest `),F(2,`span`,16),K(3),I(),K(4),I()),e&2){let e=t,n=W(3);D(3),q(e.name),D(),J(` `,n.ms(e.ms),` `)}}function ej(e,t){if(e&1&&(F(0,`li`)(1,`span`,34),K(2),I(),F(3,`span`,16),K(4),I(),F(5,`span`),K(6),I(),A(7,JA,4,1,`span`,35)(8,YA,4,1,`span`,35),A(9,XA,2,1,`span`,36),A(10,ZA,2,1,`span`,36),A(11,QA,2,1,`span`,36),A(12,$A,5,2,`span`,37),I()),e&2){let e,n,r=t.$implicit,i=W(2);D(2),q(i.clock(r.at)),D(2),q(i.ms(r.ms)),D(2),v_(` `,r.checks,` `,r.checks===1?`check`:`checks`,`, `,r.passes,` `,r.passes===1?`pass`:`passes`,` `),D(),j((e=r.cause)?7:r.trigger?8:-1,e),D(2),j(r.unchanged?9:-1),D(),j(r.hookMs?10:-1),D(),j(r.afterRenderMs?11:-1),D(),j((n=r.components[0])?12:-1,n)}}function tj(e,t){if(e&1&&(F(0,`div`,26)(1,`div`)(2,`h3`),K(3),I(),F(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,27),K(8,`Component`),I(),F(9,`th`,28),K(10,`Checks`),I(),F(11,`th`,28),K(12,`Self time`),I(),F(13,`th`,28),K(14,`Slowest`),I()()(),F(15,`tbody`),M(16,WA,10,4,`tr`,null,Jh,!1,GA,3,0,`tr`),I()(),F(19,`h3`),K(20),I(),F(21,`table`)(22,`thead`)(23,`tr`)(24,`th`,27),K(25,`Component`),I(),F(26,`th`,28),K(27,`Checks`),I(),F(28,`th`,28),K(29,`Cycles`),I(),F(30,`th`,28),K(31,`Self time`),I()()(),F(32,`tbody`),M(33,KA,10,4,`tr`,null,Jh,!1,qA,3,0,`tr`),I()(),F(36,`p`,7),K(37,` Select a component name to show its most checked instance in the tree. `),I()(),F(38,`div`)(39,`h3`),K(40,`Latest cycles`),I(),F(41,`ol`,29),M(42,ej,13,11,`li`,null,OA),I()()(),L(44,`app-cd-timing`,30)(45,`app-cd-diagnosis`,30)),e&2){let e=W();D(3),J(` `,e.range()?`Slowest components in the picked cycles`:`Slowest components`,` `),D(13),N(e.slowest()),D(4),J(` `,e.range()?`Most often checked in the picked cycles`:`Most often checked`,` `),D(13),N(e.busiest()),D(9),N(e.latest()),D(2),P(`page`,e.page()),D(),P(`page`,e.page())}}function nj(e,t){e&1&&(F(0,`p`,10),K(1,`Use the app. Cycles show up here as Angular runs change detection.`),I())}var rj=3e3,ij=10,aj=class e{livePage=$(null,{alias:`page`});pageId=$(null);rpc=$(null);native=$(!1);angularPages=uD(()=>this.rpc());angularPage=X(()=>dD(this.angularPages(),this.pageId()));attachPending=X(()=>this.angularPage()?.capabilities.profiler===!0);showComponent=Q_();range=E(null);imported=E(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=E(``);announcement=E(``);recording=X(()=>this.page()?.recording===!0);cycles=X(()=>this.page()?.cycles??[]);maxCycles=X(()=>NT(this.rpc()).limits.cdCycles);picked=X(()=>ZO(this.cycles(),this.range()));hasSpans=X(()=>this.picked().some(e=>e.spans?.length));spanNames=X(()=>this.page()?.spanNames??[]);stats=X(()=>this.range()?QO(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,ij));busiest=X(()=>[...this.stats()].sort((e,t)=>t.checks-e.checks).slice(0,ij));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 GE(e)}causeText(e){return MO(e)}confirming=E(null);confirmTimer;constructor(){ac(()=>{let e=this.confirming();e!==null&&this.livePage()?.recording===!0===e&&Z(()=>this.confirmed(e))}),S(vs).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)},rj))}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 _T(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=O({type:e,selectors:[[`app-cd-recording`]],inputs:{livePage:[1,`page`,`livePage`],pageId:[1,`pageId`],rpc:[1,`rpc`],native:[1,`native`]},outputs:{showComponent:`showComponent`},decls:23,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`],[`type`,`button`,1,`name-link`,3,`click`],[1,`num`],[`colspan`,`4`],[1,`when`],[1,`trigger`],[1,`timing`],[1,`top`]],template:function(e,t){if(e&1&&(F(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Change detection`),I(),A(4,AA,4,5),F(5,`app-cd-transfer`,3),H(`imported`,function(e){return t.showImport(e)}),I(),F(6,`p`,4),K(7),I(),F(8,`p`,5),K(9),I()(),A(10,jA,7,1,`p`,6),F(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. `),A(13,MA,1,0)(14,NA,1,0),I(),A(15,IA,2,1),A(16,zA,16,7),L(17,`app-limit-note`,8),M(18,BA,2,1,`p`,9,Yh),A(20,UA,9,9),A(21,tj,46,6)(22,nj,2,0,`p`,10),I()),e&2){let e;D(4),j(t.imported()?-1:4),D(),P(`page`,t.page())(`maxCycles`,t.maxCycles()),D(2),q(t.status()),D(2),q(t.announcement()),D(),j((e=t.imported())?10:-1,e),D(3),j(t.native()?13:14),D(2),j(t.page()?.supported===!1?15:-1),D(),j(!t.imported()&&!t.native()?16:-1),D(),P(`dropped`,t.page()?.dropped??0)(`max`,t.maxCycles()),D(),N(t.capNotes()),D(2),j(t.cycles().length?20:-1),D(),j(t.page()?.components?.length?21:t.recording()?22:-1)}},dependencies:[hD,eO,pA,Tk,gA,Vk,nA,DA],styles:[`[_nghost-%COMP%] { +}`]})},OA=(e,t)=>t.id;function kA(e,t){if(e&1){let e=B();F(0,`button`,14),H(`click`,function(){return C(e),w(W(2).clear())}),K(1,`Clear`),I()}}function AA(e,t){if(e&1){let e=B();F(0,`button`,11),H(`click`,function(){return C(e),w(W().toggle())}),L(1,`span`,12),K(2),I(),A(3,kA,2,0,`button`,13)}if(e&2){let e=W();G(`on`,e.recording()),P(`disabled`,!e.pageId()),D(2),J(` `,e.recording()?`Stop recording`:`Record`,` `),D(),j(e.cycles().length?3:-1)}}function jA(e,t){if(e&1){let e=B();F(0,`p`,6)(1,`span`,15),K(2,`Imported recording`),I(),F(3,`span`,16),K(4),I(),F(5,`button`,14),H(`click`,function(){return C(e),w(W().closeImport())}),K(6,`Back to live recording`),I()()}e&2&&(D(4),q(t.fileName))}function MA(e,t){e&1&&K(0,` An app on a device has no DOM, so checks that changed nothing are not counted there. `)}function NA(e,t){e&1&&K(0,` A recording keeps running when the tab reloads, so it catches the next start of the app. The cycles from before the reload are gone with the old page. `)}function PA(e,t){e&1&&(F(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. `),I())}function FA(e,t){e&1&&L(0,`app-angular-unavailable`,17),e&2&&P(`page`,W(2).angularPage())}function IA(e,t){e&1&&A(0,PA,2,0,`p`,9)(1,FA,1,1,`app-angular-unavailable`,17),e&2&&j(+!W().attachPending())}function LA(e,t){e&1&&(F(0,`p`,9),K(1,`Angular profiling stays on until the page reloads.`),I())}function RA(e,t){e&1&&L(0,`app-angular-unavailable`,21),e&2&&P(`page`,W(2).angularPage())}function zA(e,t){if(e&1){let e=B();F(0,`div`,18)(1,`span`,19),K(2,`Live views`),I(),F(3,`button`,20),H(`click`,function(){C(e);let t=W();return w(t.setView(`flash`,!t.views().flash))}),L(4,`span`,12),K(5,` Flash checks `),I(),F(6,`button`,20),H(`click`,function(){C(e);let t=W();return w(t.setView(`track`,!t.views().track))}),L(7,`span`,12),K(8,` Performance track `),I(),F(9,`button`,20),H(`click`,function(){return C(e),w(W().setView(`angularProfiling`,!0))}),L(10,`span`,12),K(11,` Angular profiling `),I()(),F(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. `),I(),A(14,LA,2,0,`p`,9)(15,RA,1,1,`app-angular-unavailable`,21)}if(e&2){let e=W();D(3),P(`disabled`,!e.canShowViews()),k(`aria-pressed`,e.views().flash),D(3),P(`disabled`,!e.canShowViews()),k(`aria-pressed`,e.views().track),D(3),P(`disabled`,!e.canShowViews()||e.views().angularProfiling||!e.views().angularProfilingAvailable),k(`aria-pressed`,e.views().angularProfiling),D(5),j(e.views().angularProfiling?14:e.views().angularProfilingAvailable?-1:15)}}function BA(e,t){if(e&1&&(F(0,`p`,9),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function VA(e,t){if(e&1&&(F(0,`p`,24),K(1),I()),e&2){let e=W(2);D(),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 HA(e,t){e&1&&(F(0,`p`,9),K(1,` For picked cycles, totals come from the 10 slowest components each cycle lists. `),I())}function UA(e,t){if(e&1){let e=B();F(0,`h3`),K(1,`Cycles`),I(),F(2,`app-cd-cycle-chart`,22),w_(`rangeChange`,function(t){C(e);let n=W();return C_(n.range,t)||(n.range=t),w(t)}),I(),F(3,`app-cd-flame-graph`,23),H(`pick`,function(t){return C(e),w(W().showComponent.emit(t))}),I(),A(4,VA,2,1,`p`,24),F(5,`h3`),K(6,`Self time by component`),I(),A(7,HA,2,0,`p`,9),F(8,`app-cd-treemap`,25),H(`pick`,function(t){return C(e),w(W().showComponent.emit(t))}),I()}if(e&2){let e=W();D(2),P(`cycles`,e.cycles()),S_(`range`,e.range),D(),P(`cycles`,e.picked())(`names`,e.spanNames())(`scope`,e.scope()),D(),j(e.hasSpans()?-1:4),D(3),j(e.range()?7:-1),D(),P(`stats`,e.stats())(`scope`,e.scope())}}function WA(e,t){if(e&1){let e=B();F(0,`tr`)(1,`td`,16)(2,`button`,31),H(`click`,function(){let t=C(e).$implicit;return w(W(2).showComponent.emit(t.name))}),K(3),I()(),F(4,`td`,32),K(5),I(),F(6,`td`,32),K(7),I(),F(8,`td`,32),K(9),I()()}if(e&2){let e=t.$implicit,n=W(2);D(3),J(` `,e.name,` `),D(2),q(e.checks),D(2),q(n.ms(e.ms)),D(2),q(n.ms(e.maxMs))}}function GA(e,t){e&1&&(F(0,`tr`)(1,`td`,33),K(2,`No component time in the picked cycles.`),I()())}function KA(e,t){if(e&1){let e=B();F(0,`tr`)(1,`td`,16)(2,`button`,31),H(`click`,function(){let t=C(e).$implicit;return w(W(2).showComponent.emit(t.name))}),K(3),I()(),F(4,`td`,32),K(5),I(),F(6,`td`,32),K(7),I(),F(8,`td`,32),K(9),I()()}if(e&2){let e=t.$implicit,n=W(2);D(3),J(` `,e.name,` `),D(2),q(e.checks),D(2),q(e.cycles),D(2),q(n.ms(e.ms))}}function qA(e,t){e&1&&(F(0,`tr`)(1,`td`,33),K(2,`No component checks in the picked cycles.`),I()())}function JA(e,t){if(e&1&&(F(0,`span`,35),K(1,`from `),F(2,`span`,16),K(3),I()()),e&2){let e=W(3);D(3),q(e.causeText(t))}}function YA(e,t){if(e&1&&(F(0,`span`,35),K(1,`after `),F(2,`span`,16),K(3),I()()),e&2){let e=W().$implicit;D(3),q(e.trigger)}}function XA(e,t){if(e&1&&(F(0,`span`,36),K(1),I()),e&2){let e=W().$implicit;D(),J(``,e.unchanged,` changed nothing`)}}function ZA(e,t){if(e&1&&(F(0,`span`,36),K(1),I()),e&2){let e=W().$implicit,t=W(2);D(),J(`hooks `,t.ms(e.hookMs))}}function QA(e,t){if(e&1&&(F(0,`span`,36),K(1),I()),e&2){let e=W().$implicit,t=W(2);D(),J(`afterRender `,t.ms(e.afterRenderMs))}}function $A(e,t){if(e&1&&(F(0,`span`,37),K(1,` slowest `),F(2,`span`,16),K(3),I(),K(4),I()),e&2){let e=t,n=W(3);D(3),q(e.name),D(),J(` `,n.ms(e.ms),` `)}}function ej(e,t){if(e&1&&(F(0,`li`)(1,`span`,34),K(2),I(),F(3,`span`,16),K(4),I(),F(5,`span`),K(6),I(),A(7,JA,4,1,`span`,35)(8,YA,4,1,`span`,35),A(9,XA,2,1,`span`,36),A(10,ZA,2,1,`span`,36),A(11,QA,2,1,`span`,36),A(12,$A,5,2,`span`,37),I()),e&2){let e,n,r=t.$implicit,i=W(2);D(2),q(i.clock(r.at)),D(2),q(i.ms(r.ms)),D(2),b_(` `,r.checks,` `,r.checks===1?`check`:`checks`,`, `,r.passes,` `,r.passes===1?`pass`:`passes`,` `),D(),j((e=r.cause)?7:r.trigger?8:-1,e),D(2),j(r.unchanged?9:-1),D(),j(r.hookMs?10:-1),D(),j(r.afterRenderMs?11:-1),D(),j((n=r.components[0])?12:-1,n)}}function tj(e,t){if(e&1&&(F(0,`div`,26)(1,`div`)(2,`h3`),K(3),I(),F(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,27),K(8,`Component`),I(),F(9,`th`,28),K(10,`Checks`),I(),F(11,`th`,28),K(12,`Self time`),I(),F(13,`th`,28),K(14,`Slowest`),I()()(),F(15,`tbody`),M(16,WA,10,4,`tr`,null,Yh,!1,GA,3,0,`tr`),I()(),F(19,`h3`),K(20),I(),F(21,`table`)(22,`thead`)(23,`tr`)(24,`th`,27),K(25,`Component`),I(),F(26,`th`,28),K(27,`Checks`),I(),F(28,`th`,28),K(29,`Cycles`),I(),F(30,`th`,28),K(31,`Self time`),I()()(),F(32,`tbody`),M(33,KA,10,4,`tr`,null,Yh,!1,qA,3,0,`tr`),I()(),F(36,`p`,7),K(37,` Select a component name to show its most checked instance in the tree. `),I()(),F(38,`div`)(39,`h3`),K(40,`Latest cycles`),I(),F(41,`ol`,29),M(42,ej,13,11,`li`,null,OA),I()()(),L(44,`app-cd-timing`,30)(45,`app-cd-diagnosis`,30)),e&2){let e=W();D(3),J(` `,e.range()?`Slowest components in the picked cycles`:`Slowest components`,` `),D(13),N(e.slowest()),D(4),J(` `,e.range()?`Most often checked in the picked cycles`:`Most often checked`,` `),D(13),N(e.busiest()),D(9),N(e.latest()),D(2),P(`page`,e.page()),D(),P(`page`,e.page())}}function nj(e,t){e&1&&(F(0,`p`,10),K(1,`Use the app. Cycles show up here as Angular runs change detection.`),I())}var rj=3e3,ij=10,aj=class e{livePage=$(null,{alias:`page`});pageId=$(null);rpc=$(null);native=$(!1);angularPages=uD(()=>this.rpc());angularPage=X(()=>dD(this.angularPages(),this.pageId()));attachPending=X(()=>this.angularPage()?.capabilities.profiler===!0);showComponent=ev();range=E(null);imported=E(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=E(``);announcement=E(``);recording=X(()=>this.page()?.recording===!0);cycles=X(()=>this.page()?.cycles??[]);maxCycles=X(()=>NT(this.rpc()).limits.cdCycles);picked=X(()=>ZO(this.cycles(),this.range()));hasSpans=X(()=>this.picked().some(e=>e.spans?.length));spanNames=X(()=>this.page()?.spanNames??[]);stats=X(()=>this.range()?QO(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,ij));busiest=X(()=>[...this.stats()].sort((e,t)=>t.checks-e.checks).slice(0,ij));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 GE(e)}causeText(e){return MO(e)}confirming=E(null);confirmTimer;constructor(){ac(()=>{let e=this.confirming();e!==null&&this.livePage()?.recording===!0===e&&Z(()=>this.confirmed(e))}),S(vs).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)},rj))}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 _T(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=O({type:e,selectors:[[`app-cd-recording`]],inputs:{livePage:[1,`page`,`livePage`],pageId:[1,`pageId`],rpc:[1,`rpc`],native:[1,`native`]},outputs:{showComponent:`showComponent`},decls:23,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`],[`type`,`button`,1,`name-link`,3,`click`],[1,`num`],[`colspan`,`4`],[1,`when`],[1,`trigger`],[1,`timing`],[1,`top`]],template:function(e,t){if(e&1&&(F(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Change detection`),I(),A(4,AA,4,5),F(5,`app-cd-transfer`,3),H(`imported`,function(e){return t.showImport(e)}),I(),F(6,`p`,4),K(7),I(),F(8,`p`,5),K(9),I()(),A(10,jA,7,1,`p`,6),F(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. `),A(13,MA,1,0)(14,NA,1,0),I(),A(15,IA,2,1),A(16,zA,16,7),L(17,`app-limit-note`,8),M(18,BA,2,1,`p`,9,Xh),A(20,UA,9,9),A(21,tj,46,6)(22,nj,2,0,`p`,10),I()),e&2){let e;D(4),j(t.imported()?-1:4),D(),P(`page`,t.page())(`maxCycles`,t.maxCycles()),D(2),q(t.status()),D(2),q(t.announcement()),D(),j((e=t.imported())?10:-1,e),D(3),j(t.native()?13:14),D(2),j(t.page()?.supported===!1?15:-1),D(),j(!t.imported()&&!t.native()?16:-1),D(),P(`dropped`,t.page()?.dropped??0)(`max`,t.maxCycles()),D(),N(t.capNotes()),D(2),j(t.cycles().length?20:-1),D(),j(t.page()?.components?.length?21:t.recording()?22:-1)}},dependencies:[hD,eO,pA,Tk,gA,Vk,nA,DA],styles:[`[_nghost-%COMP%] { display: block; margin-top: 16px; } @@ -1946,7 +1946,7 @@ td.mono[_ngcontent-%COMP%] { .trigger[_ngcontent-%COMP%] .mono[_ngcontent-%COMP%], .top[_ngcontent-%COMP%] .mono[_ngcontent-%COMP%] { overflow-wrap: anywhere; -}`]})};function oj(e){return Object.fromEntries(e.map(e=>[e.name,e.value??null]))}function sj(e){return e.map(e=>({name:e.name,listened:!!e.listened}))}function cj(e){let t={component:e.name,tag:e.tag,hostPath:e.path};e.selector&&(t.selector=e.selector),e.source&&(t.source=e.source),e.changeDetection&&(t.changeDetection=e.changeDetection),e.encapsulation&&(t.encapsulation=e.encapsulation),t.inputs=oj(e.inputs),t.outputs=sj(e.outputs),t.properties=oj(e.properties??[]),e.listeners.length&&(t.listeners=e.listeners),e.directives.length&&(t.directives=e.directives.map(e=>({name:e.name,inputs:oj(e.inputs),outputs:sj(e.outputs)}))),t.injected=e.dependencies.map(e=>({token:e.token,providedBy:e.providedBy?e.providedByName??`an injector`:null}));try{return JSON.stringify(t,null,2)}catch{return JSON.stringify({component:e.name,tag:e.tag,hostPath:e.path})}}function lj(e){return e.selector||e.path}var uj=1e3;function dj(e,t){let n=[];for(let[r,i]of t){let t=e.get(r);t!==void 0&&t!==i&&n.push(r)}return n}function fj(e){try{return JSON.stringify(e)??`undefined`}catch{return String(e)}}var pj=class{ms;changed=E(new Set);owner=null;last=new Map;timers=new Map;constructor(e=uj){this.ms=e}update(e,t){let n=new Map([...t].map(([e,t])=>[e,fj(t)]));if(e!==this.owner){this.clear(),this.owner=e,this.last=n;return}let r=dj(this.last,n);if(this.last=n,r.length){this.changed.update(e=>new Set([...e,...r]));for(let e of r)clearTimeout(this.timers.get(e)),this.timers.set(e,setTimeout(()=>{this.timers.delete(e),this.changed.update(t=>{let n=new Set(t);return n.delete(e),n})},this.ms))}}clear(){for(let e of this.timers.values())clearTimeout(e);this.timers.clear(),this.changed().size&&this.changed.set(new Set)}};function mj(e,t,n=0){return e===`directive`?`directive:${n}:${t}`:`${e}:${t}`}var hj=[`*`];function gj(e,t){e&1&&K(0),e&2&&q(W(2).label())}function _j(e,t){e&1&&Tg(0,0,null,gj,1,1)}function vj(e,t){if(e&1&&(F(0,`span`,4),K(1),I()),e&2){let e=W(2);D(),q(e.message())}}function yj(e,t){if(e&1){let e=B();F(0,`button`,2),H(`click`,function(){return C(e),w(W().open())}),ug(1,3),I(),A(2,vj,2,1,`span`,4)}if(e&2){let e=W(),t=kg(1);P(`title`,`Open `+e.label()+` in your editor`),k(`aria-label`,`Open `+e.label()+` in your editor`),D(),P(`ngTemplateOutlet`,t),D(),j(e.message()?2:-1)}}function bj(e,t){if(e&1&&(F(0,`span`,1),ug(1,3),I()),e&2){let e=W(),t=kg(1);P(`title`,e.label()),D(),P(`ngTemplateOutlet`,t)}}var xj=class e{source=E(E(null));client=X(()=>this.source()());available=X(()=>{let e=this.client();return!!e&&!yT(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 _T(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=El({token:e,factory:e.ɵfac})};function Sj(e,t){return t?`${e}:${t}`:e}var Cj=class e{editor=S(xj);file=$.required();line=$(void 0);label=X(()=>Sj(this.file(),this.line()));message=E(``);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=O({type:e,selectors:[[`app-source-link`]],inputs:{file:[1,`file`],line:[1,`line`]},ngContentSelectors:hj,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&&(wg(),Eh(0,_j,2,0,`ng-template`,null,0,G_),A(2,yj,3,4)(3,bj,2,2,`span`,1)),e&2&&(D(2),j(t.editor.available()?2:3))},dependencies:[Vv],styles:[`[_nghost-%COMP%] { +}`]})};function oj(e){return Object.fromEntries(e.map(e=>[e.name,e.value??null]))}function sj(e){return e.map(e=>({name:e.name,listened:!!e.listened}))}function cj(e){let t={component:e.name,tag:e.tag,hostPath:e.path};e.selector&&(t.selector=e.selector),e.source&&(t.source=e.source),e.changeDetection&&(t.changeDetection=e.changeDetection),e.encapsulation&&(t.encapsulation=e.encapsulation),t.inputs=oj(e.inputs),t.outputs=sj(e.outputs),t.properties=oj(e.properties??[]),e.listeners.length&&(t.listeners=e.listeners),e.directives.length&&(t.directives=e.directives.map(e=>({name:e.name,inputs:oj(e.inputs),outputs:sj(e.outputs)}))),t.injected=e.dependencies.map(e=>({token:e.token,providedBy:e.providedBy?e.providedByName??`an injector`:null}));try{return JSON.stringify(t,null,2)}catch{return JSON.stringify({component:e.name,tag:e.tag,hostPath:e.path})}}function lj(e){return e.selector||e.path}var uj=1e3;function dj(e,t){let n=[];for(let[r,i]of t){let t=e.get(r);t!==void 0&&t!==i&&n.push(r)}return n}function fj(e){try{return JSON.stringify(e)??`undefined`}catch{return String(e)}}var pj=class{ms;changed=E(new Set);owner=null;last=new Map;timers=new Map;constructor(e=uj){this.ms=e}update(e,t){let n=new Map([...t].map(([e,t])=>[e,fj(t)]));if(e!==this.owner){this.clear(),this.owner=e,this.last=n;return}let r=dj(this.last,n);if(this.last=n,r.length){this.changed.update(e=>new Set([...e,...r]));for(let e of r)clearTimeout(this.timers.get(e)),this.timers.set(e,setTimeout(()=>{this.timers.delete(e),this.changed.update(t=>{let n=new Set(t);return n.delete(e),n})},this.ms))}}clear(){for(let e of this.timers.values())clearTimeout(e);this.timers.clear(),this.changed().size&&this.changed.set(new Set)}};function mj(e,t,n=0){return e===`directive`?`directive:${n}:${t}`:`${e}:${t}`}var hj=[`*`];function gj(e,t){e&1&&K(0),e&2&&q(W(2).label())}function _j(e,t){e&1&&Eg(0,0,null,gj,1,1)}function vj(e,t){if(e&1&&(F(0,`span`,4),K(1),I()),e&2){let e=W(2);D(),q(e.message())}}function yj(e,t){if(e&1){let e=B();F(0,`button`,2),H(`click`,function(){return C(e),w(W().open())}),dg(1,3),I(),A(2,vj,2,1,`span`,4)}if(e&2){let e=W(),t=Ag(1);P(`title`,`Open `+e.label()+` in your editor`),k(`aria-label`,`Open `+e.label()+` in your editor`),D(),P(`ngTemplateOutlet`,t),D(),j(e.message()?2:-1)}}function bj(e,t){if(e&1&&(F(0,`span`,1),dg(1,3),I()),e&2){let e=W(),t=Ag(1);P(`title`,e.label()),D(),P(`ngTemplateOutlet`,t)}}var xj=class e{source=E(E(null));client=X(()=>this.source()());available=X(()=>{let e=this.client();return!!e&&!yT(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 _T(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=El({token:e,factory:e.ɵfac})};function Sj(e,t){return t?`${e}:${t}`:e}var Cj=class e{editor=S(xj);file=$.required();line=$(void 0);label=X(()=>Sj(this.file(),this.line()));message=E(``);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=O({type:e,selectors:[[`app-source-link`]],inputs:{file:[1,`file`],line:[1,`line`]},ngContentSelectors:hj,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&&(Tg(),Dh(0,_j,2,0,`ng-template`,null,0,q_),A(2,yj,3,4)(3,bj,2,2,`span`,1)),e&2&&(D(2),j(t.editor.available()?2:3))},dependencies:[Uv],styles:[`[_nghost-%COMP%] { display: inline; min-width: 0; } @@ -1981,7 +1981,7 @@ td.mono[_ngcontent-%COMP%] { color: var(--%NS%danger-text); font-family: var(--%NS%font-sans); font-size: 0.92em; -}`]})},wj=[`field`],Tj=[`editButton`],Ej=[`valueBox`];function Dj(e,t){if(e&1){let e=B();R(0,`div`,5)(1,`label`,6),K(2),z(),R(3,`input`,7,0),U(`input`,function(t){return C(e),w(W().draft.set(t.target.value))})(`keydown.enter`,function(t){C(e);let n=W();return t.preventDefault(),w(n.apply())})(`keydown.escape`,function(t){C(e);let n=W();return t.preventDefault(),t.stopPropagation(),w(n.cancel())}),z(),R(5,`button`,8),U(`click`,function(){return C(e),w(W().apply())}),K(6,`Apply`),z(),R(7,`button`,9),U(`click`,function(){return C(e),w(W().cancel())}),K(8,`Cancel`),z()(),R(9,`p`,10),K(10),z()}if(e&2){let e=W();D(),V(`htmlFor`,e.fieldId),D(),J(`New value of `,e.prop().name,`, as JSON`),D(),V(`id`,e.fieldId)(`value`,e.draft())(`readOnly`,e.busy()),k(`aria-busy`,e.busy()?`true`:null)(`aria-invalid`,e.error()?`true`:null)(`aria-describedby`,e.hintId+(e.error()?` `+e.errorId:``)),D(2),V(`disabled`,e.busy()),D(4),V(`id`,e.hintId),D(),J(` JSON, such as "text", 42, true or `,e.objectSample,`. Enter applies, Escape cancels. `)}}function Oj(e,t){if(e&1&&(R(0,`pre`,null,1),K(2),V_(3,`json`),z()),e&2){let e=W(2);k(`tabindex`,e.scrollable()?0:null)(`role`,e.scrollable()?`region`:null)(`aria-label`,e.scrollable()?`Value of `+e.prop().name:null),D(2),q(H_(3,4,e.prop().value))}}function kj(e,t){if(e&1){let e=B();R(0,`button`,14,2),U(`click`,function(){return C(e),w(W(2).start())}),K(2,` Edit `),z()}if(e&2){let e=W(2);V(`disabled`,e.busy()),k(`aria-label`,`Edit `+e.prop().name)}}function Aj(e,t){if(e&1&&(R(0,`p`,13),K(1),z()),e&2){let e=W(2);D(),q(e.prop().locked)}}function jj(e,t){if(e&1&&(R(0,`div`,11),A(1,Oj,4,6,`pre`),A(2,kj,3,2,`button`,12),z(),A(3,Aj,2,1,`p`,13)),e&2){let e=W();D(),j(e.bare()?-1:1),D(),j(e.editable()?2:-1),D(),j(e.writes()&&e.prop().locked?3:-1)}}function Mj(e,t){if(e&1&&(R(0,`p`,3),K(1),z()),e&2){let e=W();V(`id`,e.errorId),D(),q(e.error())}}var Nj=0;function Pj(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 Fj=class e{prop=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);bare=$(!1);readDraft=$(null);fieldId=`prop-edit-${++Nj}`;hintId=`${this.fieldId}-hint`;errorId=`${this.fieldId}-error`;objectSample=`{"a": 1}`;editing=E(!1);draft=E(``);busy=E(!1);error=E(``);done=E(``);editable=X(()=>this.writes()&&!!this.prop().edit&&!!this.pageId()&&!!this.rpc());field=av(`field`);editButton=av(`editButton`);valueBox=av(`valueBox`);injector=S(gs);scrollable=E(!1);constructor(){fv(()=>{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),ed(()=>{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=Pj(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(){ed(()=>this.editButton()?.nativeElement.focus(),{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-prop-value`]],viewQuery:function(e,t){e&1&&Dg(t.field,wj,5)(t.editButton,Tj,5)(t.valueBox,Ej,5),e&2&&Og(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&&(A(0,Dj,11,11)(1,jj,4,3),A(2,Mj,2,2,`p`,3),R(3,`p`,4),K(4),z()),e&2&&(j(+!t.editing()),D(2),j(t.error()?2:-1),D(2),q(t.done()))},dependencies:[Uv],styles:[`[_nghost-%COMP%] { +}`]})},wj=[`field`],Tj=[`editButton`],Ej=[`valueBox`];function Dj(e,t){if(e&1){let e=B();R(0,`div`,5)(1,`label`,6),K(2),z(),R(3,`input`,7,0),U(`input`,function(t){return C(e),w(W().draft.set(t.target.value))})(`keydown.enter`,function(t){C(e);let n=W();return t.preventDefault(),w(n.apply())})(`keydown.escape`,function(t){C(e);let n=W();return t.preventDefault(),t.stopPropagation(),w(n.cancel())}),z(),R(5,`button`,8),U(`click`,function(){return C(e),w(W().apply())}),K(6,`Apply`),z(),R(7,`button`,9),U(`click`,function(){return C(e),w(W().cancel())}),K(8,`Cancel`),z()(),R(9,`p`,10),K(10),z()}if(e&2){let e=W();D(),V(`htmlFor`,e.fieldId),D(),J(`New value of `,e.prop().name,`, as JSON`),D(),V(`id`,e.fieldId)(`value`,e.draft())(`readOnly`,e.busy()),k(`aria-busy`,e.busy()?`true`:null)(`aria-invalid`,e.error()?`true`:null)(`aria-describedby`,e.hintId+(e.error()?` `+e.errorId:``)),D(2),V(`disabled`,e.busy()),D(4),V(`id`,e.hintId),D(),J(` JSON, such as "text", 42, true or `,e.objectSample,`. Enter applies, Escape cancels. `)}}function Oj(e,t){if(e&1&&(R(0,`pre`,null,1),K(2),U_(3,`json`),z()),e&2){let e=W(2);k(`tabindex`,e.scrollable()?0:null)(`role`,e.scrollable()?`region`:null)(`aria-label`,e.scrollable()?`Value of `+e.prop().name:null),D(2),q(W_(3,4,e.prop().value))}}function kj(e,t){if(e&1){let e=B();R(0,`button`,14,2),U(`click`,function(){return C(e),w(W(2).start())}),K(2,` Edit `),z()}if(e&2){let e=W(2);V(`disabled`,e.busy()),k(`aria-label`,`Edit `+e.prop().name)}}function Aj(e,t){if(e&1&&(R(0,`p`,13),K(1),z()),e&2){let e=W(2);D(),q(e.prop().locked)}}function jj(e,t){if(e&1&&(R(0,`div`,11),A(1,Oj,4,6,`pre`),A(2,kj,3,2,`button`,12),z(),A(3,Aj,2,1,`p`,13)),e&2){let e=W();D(),j(e.bare()?-1:1),D(),j(e.editable()?2:-1),D(),j(e.writes()&&e.prop().locked?3:-1)}}function Mj(e,t){if(e&1&&(R(0,`p`,3),K(1),z()),e&2){let e=W();V(`id`,e.errorId),D(),q(e.error())}}var Nj=0;function Pj(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 Fj=class e{prop=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);bare=$(!1);readDraft=$(null);fieldId=`prop-edit-${++Nj}`;hintId=`${this.fieldId}-hint`;errorId=`${this.fieldId}-error`;objectSample=`{"a": 1}`;editing=E(!1);draft=E(``);busy=E(!1);error=E(``);done=E(``);editable=X(()=>this.writes()&&!!this.prop().edit&&!!this.pageId()&&!!this.rpc());field=sv(`field`);editButton=sv(`editButton`);valueBox=sv(`valueBox`);injector=S(gs);scrollable=E(!1);constructor(){mv(()=>{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),td(()=>{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=Pj(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(){td(()=>this.editButton()?.nativeElement.focus(),{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-prop-value`]],viewQuery:function(e,t){e&1&&Og(t.field,wj,5)(t.editButton,Tj,5)(t.valueBox,Ej,5),e&2&&kg(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&&(A(0,Dj,11,11)(1,jj,4,3),A(2,Mj,2,2,`p`,3),R(3,`p`,4),K(4),z()),e&2&&(j(+!t.editing()),D(2),j(t.error()?2:-1),D(2),q(t.done()))},dependencies:[Gv],styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -2104,7 +2104,7 @@ button.edit[_ngcontent-%COMP%] { .error[_ngcontent-%COMP%] { color: var(--%NS%danger-text); -}`]})},Ij=1e3,Lj={depth:5,limit:100},Rj=`[redacted]`;function zj(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function Bj(e){return zj(e)&&typeof e.$more==`number`&&Object.keys(e).length===1}function Vj(e){return zj(e)&&typeof e.$collapsed==`string`&&typeof e.size==`number`&&Object.keys(e).length===2}function Hj(e){return e===`Array`?`array`:e===`Map`?`map`:e===`Set`?`set`:`object`}function Uj(e){return e.$type===`Map`&&Array.isArray(e.entries)}function Wj(e){return e.$type===`Set`&&Array.isArray(e.values)}function Gj(e){return Object.keys(e).filter(e=>e!==`$type`&&e!==`$more`)}function Kj(e){if(!e||typeof e!=`object`)return null;if(Vj(e))return e.size<=0?null:{kind:Hj(e.$collapsed),type:e.$collapsed,size:e.size,collapsed:!0};if(Bj(e))return null;if(Array.isArray(e)){let t=e.at(-1),n=Bj(t)?t.$more:0,r=e.length-+!!n+n;return r?{kind:`array`,type:`Array`,size:r,collapsed:!1}:null}let t=e;if(Uj(t)||Wj(t)){let e=typeof t.size==`number`?t.size:0,n=Uj(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=Gj(t).length+n,i=typeof t.$type==`string`?t.$type:`Object`;return r?{kind:`object`,type:i,size:r,collapsed:!1}:null}function qj(e){if(typeof e==`string`)return JSON.stringify(e);let t=Kj(e);if(t)return Xj(t);try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function Jj(e){let t=Kj(e);if(!t||t.collapsed)return{children:[],more:0};if(Array.isArray(e)){let n=(Bj(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:qj(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:Gj(n).map(e=>({key:e,label:e,value:n[e]})),more:typeof n.$more==`number`?n.$more:0}}function Yj(e,t,n){return`${e} ${e===1?t:n}`}function Xj(e){let t={array:Yj(e.size,`item`,`items`),object:Yj(e.size,`key`,`keys`),map:Yj(e.size,`entry`,`entries`),set:Yj(e.size,`value`,`values`)}[e.kind];return`${e.type} (${t})`}function Zj(e,t){return JSON.stringify(t===void 0?e:[t,...e])}function Qj(e,t){return e.map((e,n)=>n===0?e:(t?t[n-1]!==`object`:/^\d+$/.test(e))?`[${e}]`:`.${e}`).join(``)}function $j(e){return e.every(e=>e&&e===e.trim()&&!/[.[\]]/.test(e))?e.join(`.`):null}var eM=/^\[(Getter|Unreadable|Circular|Truncated|Function\b.*|Promise)\]$/;function tM(e){return e===null||typeof e==`boolean`?!0:typeof e==`number`?Number.isFinite(e):typeof e==`string`&&e!==Rj&&!eM.test(e)&&!e.endsWith(`…`)}function nM(e,t){return!e||t.kind===`map`||t.kind===`set`||e===`signal`&&t.kind===`object`&&t.type!==`Object`?null:e}function rM(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=Zj(e);if(!(s.has(r)||a.length>=i)){s.add(r);for(let r of Jj(t).children){let t=[...e,r.key];if(r.label.toLowerCase().includes(o)&&a.push(t),!Kj(r.value))continue;let i=n(t)??(Kj(r.value)?.collapsed?void 0:r.value);i!==void 0&&c(t,i)}}};return c(e,n(e)??t),a}var iM=(e,t)=>t.id;function aM(e,t){if(e&1){let e=B();F(0,`button`,2),H(`click`,function(){C(e);let t=W().$implicit;return w(W(3).toggle(t))}),T(),F(1,`svg`,3),L(2,`path`,4),I(),cs(),F(3,`span`,14),K(4),I(),F(5,`span`,5),K(6),I()()}if(e&2){let e=W().$implicit;k(`aria-expanded`,e.open)(`aria-label`,e.label+`: `+e.text),D(4),J(``,e.label,`:`),D(2),q(e.text)}}function oM(e,t){if(e&1&&L(0,`app-prop-value`,15),e&2){let e=W(5);P(`prop`,t)(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}function sM(e,t){if(e&1&&(F(0,`span`,16),K(1),I()),e&2){let e=W(2).$implicit;D(),q(e.text)}}function cM(e,t){if(e&1&&(F(0,`span`,14),K(1),I(),A(2,oM,1,5,`app-prop-value`,15)(3,sM,2,1,`span`,16)),e&2){let e,t=W().$implicit;D(),J(``,t.label,`:`),D(),j((e=t.edit)?2:3,e)}}function lM(e,t){if(e&1){let e=B();F(0,`button`,17),H(`click`,function(){C(e);let t=W().$implicit;return w(W(3).more(t))}),K(1),F(2,`span`,18),K(3),I()()}if(e&2){let e=W().$implicit,t=W(3);D(),J(` Show `,t.step(e),` more `),D(2),J(`(`,e.more,` not listed)`)}}function uM(e,t){e&1&&(F(0,`span`,12),K(1,`Reading from the page…`),I())}function dM(e,t){if(e&1&&(F(0,`span`,13),K(1),I()),e&2){let e=W().$implicit;D(),q(e.text)}}function fM(e,t){if(e&1&&(F(0,`li`,9),A(1,aM,7,4,`button`,10)(2,cM,4,2)(3,lM,4,2,`button`,11)(4,uM,2,0,`span`,12)(5,dM,2,1,`span`,13),I()),e&2){let e,n=t.$implicit;Xg(`padding-left`,n.depth*14,`px`),D(),j((e=n.kind)===`node`?1:e===`leaf`?2:e===`more`?3:e===`loading`?4:e===`error`?5:-1)}}function pM(e,t){if(e&1&&(F(0,`ul`,7),M(1,fM,6,3,`li`,8,iM),I()),e&2){let e=W(2);P(`id`,e.listId),k(`aria-label`,e.prop().name+` entries`),D(),N(e.rows())}}function mM(e,t){if(e&1){let e=B();F(0,`div`,1)(1,`button`,2),H(`click`,function(){return C(e),w(W().toggleRoot())}),T(),F(2,`svg`,3),L(3,`path`,4),I(),cs(),F(4,`span`,5),K(5),I()(),L(6,`app-prop-value`,6),I(),A(7,pM,3,2,`ul`,7)}if(e&2){let e=t,n=W();D(),k(`aria-expanded`,n.rootOpen())(`aria-controls`,n.rootOpen()?n.listId:null)(`aria-label`,n.prop().name+`: `+n.summaryOf(e)),D(4),q(n.summaryOf(e)),D(),P(`bare`,!0)(`prop`,n.prop())(`componentId`,n.componentId())(`pageId`,n.pageId())(`rpc`,n.rpc())(`writes`,n.writes())(`readDraft`,n.readWhole),D(),j(n.rootOpen()?7:-1)}}function hM(e,t){if(e&1&&L(0,`app-prop-value`,0),e&2){let e=W();P(`prop`,e.prop())(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}var gM=0;function _M(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function vM(e){if(Array.isArray(e))return e.every(vM);if(e&&typeof e==`object`){let t=e;return![`$collapsed`,`$more`,`$type`].some(e=>Object.hasOwn(t,e))&&Object.values(t).every(vM)}return tM(e)}var yM=class e{prop=$.required();store=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);directive=$(void 0);query=$(``);listId=`value-tree-${++gM}`;host=S(kl);pendingMore=null;constructor(){fv(()=>{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(()=>Kj(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 rM(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(Zj(e));for(let t=2;t<=e.length;t++)i.add(Zj(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}=Jj(e);for(let e of h){let h=[...o,e.key],g=Zj(h);if(r&&!m&&!i.has(g))continue;let _=Kj(e.value),ee=Zj(h,n);if(!_){let t=p&&tM(e.value)?$j(h):null;c.push({id:ee,kind:`leaf`,depth:f,path:h,label:e.label,text:_M(e.value),edit:s&&t&&p?{name:Qj(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:Xj(_),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,nM(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:`${Zj(e,n)}:${r}`,kind:r,depth:t,path:e,label:``,text:``});return l(this.rootValue(),this.rootPath(),[e.kind],0,s?nM(o.editInside??null,e):null,!r),c});readWhole=async()=>{let e=await this.store().read(this.rootPath(),Lj.depth,Lj.limit);return e.ok?vM(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 Xj(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=O({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&&A(0,mM,8,12)(1,hM,1,5,`app-prop-value`,0),e&2){let e;j((e=t.root())?0:1,e)}},dependencies:[Fj],styles:[`[_nghost-%COMP%] { +}`]})},Ij=1e3,Lj={depth:5,limit:100},Rj=`[redacted]`;function zj(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function Bj(e){return zj(e)&&typeof e.$more==`number`&&Object.keys(e).length===1}function Vj(e){return zj(e)&&typeof e.$collapsed==`string`&&typeof e.size==`number`&&Object.keys(e).length===2}function Hj(e){return e===`Array`?`array`:e===`Map`?`map`:e===`Set`?`set`:`object`}function Uj(e){return e.$type===`Map`&&Array.isArray(e.entries)}function Wj(e){return e.$type===`Set`&&Array.isArray(e.values)}function Gj(e){return Object.keys(e).filter(e=>e!==`$type`&&e!==`$more`)}function Kj(e){if(!e||typeof e!=`object`)return null;if(Vj(e))return e.size<=0?null:{kind:Hj(e.$collapsed),type:e.$collapsed,size:e.size,collapsed:!0};if(Bj(e))return null;if(Array.isArray(e)){let t=e.at(-1),n=Bj(t)?t.$more:0,r=e.length-+!!n+n;return r?{kind:`array`,type:`Array`,size:r,collapsed:!1}:null}let t=e;if(Uj(t)||Wj(t)){let e=typeof t.size==`number`?t.size:0,n=Uj(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=Gj(t).length+n,i=typeof t.$type==`string`?t.$type:`Object`;return r?{kind:`object`,type:i,size:r,collapsed:!1}:null}function qj(e){if(typeof e==`string`)return JSON.stringify(e);let t=Kj(e);if(t)return Xj(t);try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function Jj(e){let t=Kj(e);if(!t||t.collapsed)return{children:[],more:0};if(Array.isArray(e)){let n=(Bj(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:qj(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:Gj(n).map(e=>({key:e,label:e,value:n[e]})),more:typeof n.$more==`number`?n.$more:0}}function Yj(e,t,n){return`${e} ${e===1?t:n}`}function Xj(e){let t={array:Yj(e.size,`item`,`items`),object:Yj(e.size,`key`,`keys`),map:Yj(e.size,`entry`,`entries`),set:Yj(e.size,`value`,`values`)}[e.kind];return`${e.type} (${t})`}function Zj(e,t){return JSON.stringify(t===void 0?e:[t,...e])}function Qj(e,t){return e.map((e,n)=>n===0?e:(t?t[n-1]!==`object`:/^\d+$/.test(e))?`[${e}]`:`.${e}`).join(``)}function $j(e){return e.every(e=>e&&e===e.trim()&&!/[.[\]]/.test(e))?e.join(`.`):null}var eM=/^\[(Getter|Unreadable|Circular|Truncated|Function\b.*|Promise)\]$/;function tM(e){return e===null||typeof e==`boolean`?!0:typeof e==`number`?Number.isFinite(e):typeof e==`string`&&e!==Rj&&!eM.test(e)&&!e.endsWith(`…`)}function nM(e,t){return!e||t.kind===`map`||t.kind===`set`||e===`signal`&&t.kind===`object`&&t.type!==`Object`?null:e}function rM(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=Zj(e);if(!(s.has(r)||a.length>=i)){s.add(r);for(let r of Jj(t).children){let t=[...e,r.key];if(r.label.toLowerCase().includes(o)&&a.push(t),!Kj(r.value))continue;let i=n(t)??(Kj(r.value)?.collapsed?void 0:r.value);i!==void 0&&c(t,i)}}};return c(e,n(e)??t),a}var iM=(e,t)=>t.id;function aM(e,t){if(e&1){let e=B();F(0,`button`,2),H(`click`,function(){C(e);let t=W().$implicit;return w(W(3).toggle(t))}),T(),F(1,`svg`,3),L(2,`path`,4),I(),cs(),F(3,`span`,14),K(4),I(),F(5,`span`,5),K(6),I()()}if(e&2){let e=W().$implicit;k(`aria-expanded`,e.open)(`aria-label`,e.label+`: `+e.text),D(4),J(``,e.label,`:`),D(2),q(e.text)}}function oM(e,t){if(e&1&&L(0,`app-prop-value`,15),e&2){let e=W(5);P(`prop`,t)(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}function sM(e,t){if(e&1&&(F(0,`span`,16),K(1),I()),e&2){let e=W(2).$implicit;D(),q(e.text)}}function cM(e,t){if(e&1&&(F(0,`span`,14),K(1),I(),A(2,oM,1,5,`app-prop-value`,15)(3,sM,2,1,`span`,16)),e&2){let e,t=W().$implicit;D(),J(``,t.label,`:`),D(),j((e=t.edit)?2:3,e)}}function lM(e,t){if(e&1){let e=B();F(0,`button`,17),H(`click`,function(){C(e);let t=W().$implicit;return w(W(3).more(t))}),K(1),F(2,`span`,18),K(3),I()()}if(e&2){let e=W().$implicit,t=W(3);D(),J(` Show `,t.step(e),` more `),D(2),J(`(`,e.more,` not listed)`)}}function uM(e,t){e&1&&(F(0,`span`,12),K(1,`Reading from the page…`),I())}function dM(e,t){if(e&1&&(F(0,`span`,13),K(1),I()),e&2){let e=W().$implicit;D(),q(e.text)}}function fM(e,t){if(e&1&&(F(0,`li`,9),A(1,aM,7,4,`button`,10)(2,cM,4,2)(3,lM,4,2,`button`,11)(4,uM,2,0,`span`,12)(5,dM,2,1,`span`,13),I()),e&2){let e,n=t.$implicit;Zg(`padding-left`,n.depth*14,`px`),D(),j((e=n.kind)===`node`?1:e===`leaf`?2:e===`more`?3:e===`loading`?4:e===`error`?5:-1)}}function pM(e,t){if(e&1&&(F(0,`ul`,7),M(1,fM,6,3,`li`,8,iM),I()),e&2){let e=W(2);P(`id`,e.listId),k(`aria-label`,e.prop().name+` entries`),D(),N(e.rows())}}function mM(e,t){if(e&1){let e=B();F(0,`div`,1)(1,`button`,2),H(`click`,function(){return C(e),w(W().toggleRoot())}),T(),F(2,`svg`,3),L(3,`path`,4),I(),cs(),F(4,`span`,5),K(5),I()(),L(6,`app-prop-value`,6),I(),A(7,pM,3,2,`ul`,7)}if(e&2){let e=t,n=W();D(),k(`aria-expanded`,n.rootOpen())(`aria-controls`,n.rootOpen()?n.listId:null)(`aria-label`,n.prop().name+`: `+n.summaryOf(e)),D(4),q(n.summaryOf(e)),D(),P(`bare`,!0)(`prop`,n.prop())(`componentId`,n.componentId())(`pageId`,n.pageId())(`rpc`,n.rpc())(`writes`,n.writes())(`readDraft`,n.readWhole),D(),j(n.rootOpen()?7:-1)}}function hM(e,t){if(e&1&&L(0,`app-prop-value`,0),e&2){let e=W();P(`prop`,e.prop())(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}var gM=0;function _M(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function vM(e){if(Array.isArray(e))return e.every(vM);if(e&&typeof e==`object`){let t=e;return![`$collapsed`,`$more`,`$type`].some(e=>Object.hasOwn(t,e))&&Object.values(t).every(vM)}return tM(e)}var yM=class e{prop=$.required();store=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);directive=$(void 0);query=$(``);listId=`value-tree-${++gM}`;host=S(kl);pendingMore=null;constructor(){mv(()=>{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(()=>Kj(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 rM(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(Zj(e));for(let t=2;t<=e.length;t++)i.add(Zj(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}=Jj(e);for(let e of h){let h=[...o,e.key],g=Zj(h);if(r&&!m&&!i.has(g))continue;let _=Kj(e.value),ee=Zj(h,n);if(!_){let t=p&&tM(e.value)?$j(h):null;c.push({id:ee,kind:`leaf`,depth:f,path:h,label:e.label,text:_M(e.value),edit:s&&t&&p?{name:Qj(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:Xj(_),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,nM(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:`${Zj(e,n)}:${r}`,kind:r,depth:t,path:e,label:``,text:``});return l(this.rootValue(),this.rootPath(),[e.kind],0,s?nM(o.editInside??null,e):null,!r),c});readWhole=async()=>{let e=await this.store().read(this.rootPath(),Lj.depth,Lj.limit);return e.ok?vM(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 Xj(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=O({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&&A(0,mM,8,12)(1,hM,1,5,`app-prop-value`,0),e&2){let e;j((e=t.root())?0:1,e)}},dependencies:[Fj],styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -2275,7 +2275,7 @@ button.edit[_ngcontent-%COMP%] { .status[_ngcontent-%COMP%]:empty { display: none; -}`]})},DM=(e,t)=>t.block.id,OM=(e,t)=>t.kind,kM=(e,t)=>t.id;function AM(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,e.label,` `)}}function jM(e,t){if(e&1&&(K(0),R(1,`span`,18),K(2),z()),e&2){let e=W().$implicit;J(` `,e.kind,` `),D(2),J(``,e.seconds,`s`)}}function MM(e,t){if(e&1&&(R(0,`span`,9),A(1,AM,1,1)(2,jM,3,2),z()),e&2){let e=t.$implicit;Zg(`note-`+e.kind),k(`title`,e.text),D(),j(e.seconds===void 0?1:2)}}function NM(e,t){if(e&1&&(R(0,`span`,9),K(1),z()),e&2){let e=W().$implicit;k(`title`,e.block.hydratedAt===void 0?`The block hydrated before the devtools attached to the page.`:null),D(),q(e.hydrated)}}function PM(e,t){e&1&&(R(0,`span`,9),K(1,`@error block`),z())}function FM(e,t){if(e&1&&(R(0,`span`,10),K(1),z()),e&2){let e=W().$implicit;D(),q(e.timings)}}function IM(e,t){e&1&&(R(0,`span`,11),K(1,`mismatch`),z())}function LM(e,t){if(e&1&&(R(0,`dt`),K(1,`Template of`),z(),R(2,`dd`,19),K(3),z()),e&2){let e=t;D(3),Y(``,e.name,` <`,e.tag,`>`)}}function RM(e,t){if(e&1&&(R(0,`dt`),K(1,`In this state since`),z(),R(2,`dd`),K(3),z()),e&2){let e=W(2).$implicit,t=W(2);D(3),q(t.clock(e.block.since))}}function zM(e,t){if(e&1&&(R(0,`dt`),K(1,`Hydrated`),z(),R(2,`dd`),K(3),z()),e&2){let e=W(2).$implicit,t=W(2);D(3),J(` `,e.block.hydratedAt===void 0?`Before the devtools attached`:t.clock(e.block.hydratedAt),` `)}}function BM(e,t){if(e&1&&(R(0,`span`,23),K(1),z()),e&2){let e=W().$implicit;D(),q(e.hydration)}}function VM(e,t){if(e&1&&(R(0,`li`)(1,`span`,22),K(2),z(),R(3,`span`,19),K(4),z(),A(5,BM,2,1,`span`,23),z()),e&2){let e=t.$implicit,n=W(5);D(2),q(n.clock(e.at)),D(2),q(e.state),D(),j(e.hydration===`not-configured`?-1:5)}}function HM(e,t){if(e&1&&(R(0,`h3`,20),K(1,`Transitions`),z(),R(2,`ol`,21),M(3,VM,6,3,`li`,null,Jh),z()),e&2){let e=W(2).$implicit;D(3),N(e.block.transitions)}}function UM(e,t){if(e&1){let e=B();R(0,`li`)(1,`button`,25),U(`click`,function(){let t=C(e).$implicit;return w(W(5).showNode.emit(t.id))}),K(2),R(3,`span`,19),K(4),z()()()}if(e&2){let e=t.$implicit;D(2),J(` Show `,e.name,` `),D(2),J(`<`,e.tag,`>`)}}function WM(e,t){if(e&1&&(R(0,`h3`,20),K(1,`Hydration mismatches`),z(),R(2,`ul`,24),M(3,UM,5,2,`li`,null,kM),z()),e&2){let e=W(2).$implicit;D(3),N(e.mismatches)}}function GM(e,t){if(e&1&&(R(0,`div`,17)(1,`dl`)(2,`dt`),K(3,`Block`),z(),R(4,`dd`,19),K(5),z(),A(6,LM,4,2),A(7,RM,4,1),A(8,zM,4,1),R(9,`dt`),K(10,`Root elements`),z(),R(11,`dd`),K(12),z(),R(13,`dt`),K(14,`Triggers`),z(),R(15,`dd`,19),K(16),z()(),A(17,HM,5,0),A(18,WM,5,0),z()),e&2){let e,t=W().$implicit;V(`id`,`defer-detail-`+t.block.id),D(5),q(t.block.id),D(),j((e=t.block.owner)?6:-1,e),D(),j(t.block.since?7:-1),D(),j(t.block.hydration===`hydrated`?8:-1),D(4),q(t.block.rootIds.length||`None rendered`),D(4),q(t.block.triggers.join(`, `)||`None`),D(),j(t.block.transitions?.length?17:-1),D(),j(t.mismatches.length?18:-1)}}function KM(e,t){if(e&1){let e=B();R(0,`li`,4)(1,`button`,5),U(`click`,function(){let t=C(e).$implicit;return w(W(2).showOwner.emit(t.block))})(`focus`,function(){let t=C(e).$implicit;return w(W(2).highlight.emit(t.block))})(`blur`,function(){return C(e),w(W(2).highlight.emit(null))})(`mouseenter`,function(){let t=C(e).$implicit;return w(W(2).highlight.emit(t.block))})(`mouseleave`,function(){return C(e),w(W(2).highlight.emit(null))}),R(2,`span`,6),K(3),z(),R(4,`span`,7),K(5),z(),M(6,MM,3,4,`span`,8,OM),A(8,NM,2,2,`span`,9),A(9,PM,2,0,`span`,9),A(10,FM,2,1,`span`,10),A(11,IM,2,0,`span`,11),R(12,`span`,12),K(13),z()(),R(14,`button`,13),U(`click`,function(){let t=C(e).$implicit;return w(W(2).toggle(t.block.id))}),T(),R(15,`svg`,14),og(16,`path`,15),z(),cs(),R(17,`span`,16),K(18),z()(),A(19,GM,19,9,`div`,17),z()}if(e&2){let e=t.$implicit,n=W(2);D(),k(`aria-disabled`,e.block.owner?null:`true`),D(2),q(e.block.owner?.name??`Unknown component`),D(),Zg(`defer-state-`+e.block.state),D(),q(e.block.state),D(),N(e.notes),D(2),j(e.hydrated?8:-1),D(),j(e.block.hasErrorBlock?9:-1),D(),j(e.timings?10:-1),D(),j(e.mismatches.length?11:-1),D(2),q(e.block.triggers.join(`, `)||`no triggers`),D(),k(`aria-expanded`,n.isOpen(e.block.id))(`aria-controls`,n.isOpen(e.block.id)?`defer-detail-`+e.block.id:null),D(4),J(`Details of the block in `,e.block.owner?.name??`an unknown component`),D(),j(n.isOpen(e.block.id)?19:-1)}}function qM(e,t){if(e&1&&(R(0,`section`,0)(1,`h2`,1),K(2,` Defer blocks `),R(3,`span`,2),K(4),z()(),R(5,`ul`,3),M(6,KM,20,14,`li`,4,DM),z()()),e&2){let e=W();D(4),Y(``,e.rows().length,``,e.truncated()?`+`:``),D(2),N(e.rows())}}function JM(e){return e<1e3?`${e}ms`:`${Number((e/1e3).toFixed(2))}s`}function YM(e){let t=[],n=e.placeholder?.minimumTime;n!=null&&t.push(`placeholder min ${JM(n)}`);let r=[e.loading?.afterTime==null?``:`after ${JM(e.loading.afterTime)}`,e.loading?.minimumTime==null?``:`min ${JM(e.loading.minimumTime)}`].filter(Boolean);return r.length&&t.push(`loading ${r.join(`, `)}`),t.join(` · `)}var XM=class e{blocks=$([]);truncated=$(!1);clockOffset=$(0);showOwner=Q_();mismatches=$([]);showNode=Q_();open=E(new Set);highlight=Q_();now=E(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:cT({...t,since:t.since||e},e),timings:YM(t),mismatches:this.mismatches().filter(e=>t.rootIds.includes(e.id)),hydrated:t.hydration===`hydrated`?aT(t):``}))});isOpen(e){return this.open().has(e)}toggle(e){this.open.update(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n})}clock(e){return GE(e)}constructor(){let e,t=()=>{clearInterval(e),e=void 0};ac(()=>{if(!this.waiting())return t();e===void 0&&(this.now.set(Date.now()),e=setInterval(()=>this.now.set(Date.now()),1e3))}),S(vs).onDestroy(t)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-defer-blocks`]],inputs:{blocks:[1,`blocks`],truncated:[1,`truncated`],clockOffset:[1,`clockOffset`],mismatches:[1,`mismatches`]},outputs:{showOwner:`showOwner`,showNode:`showNode`,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`],[1,`defer-item`],[`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,`flag`,`note-failed`],[1,`triggers`,`mono`],[`type`,`button`,1,`defer-toggle`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`m9 6 6 6-6 6`],[1,`sr-only`],[1,`defer-detail`,3,`id`],[`aria-hidden`,`true`],[1,`mono`],[1,`detail-label`],[1,`transitions`],[1,`when`],[1,`muted`],[1,`mismatch-links`],[`type`,`button`,3,`click`]],template:function(e,t){e&1&&A(0,qM,8,2,`section`,0),e&2&&j(t.rows().length?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})},DM=(e,t)=>t.block.id,OM=(e,t)=>t.kind,kM=(e,t)=>t.id;function AM(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,e.label,` `)}}function jM(e,t){if(e&1&&(K(0),R(1,`span`,18),K(2),z()),e&2){let e=W().$implicit;J(` `,e.kind,` `),D(2),J(``,e.seconds,`s`)}}function MM(e,t){if(e&1&&(R(0,`span`,9),A(1,AM,1,1)(2,jM,3,2),z()),e&2){let e=t.$implicit;Qg(`note-`+e.kind),k(`title`,e.text),D(),j(e.seconds===void 0?1:2)}}function NM(e,t){if(e&1&&(R(0,`span`,9),K(1),z()),e&2){let e=W().$implicit;k(`title`,e.block.hydratedAt===void 0?`The block hydrated before the devtools attached to the page.`:null),D(),q(e.hydrated)}}function PM(e,t){e&1&&(R(0,`span`,9),K(1,`@error block`),z())}function FM(e,t){if(e&1&&(R(0,`span`,10),K(1),z()),e&2){let e=W().$implicit;D(),q(e.timings)}}function IM(e,t){e&1&&(R(0,`span`,11),K(1,`mismatch`),z())}function LM(e,t){if(e&1&&(R(0,`dt`),K(1,`Template of`),z(),R(2,`dd`,19),K(3),z()),e&2){let e=t;D(3),Y(``,e.name,` <`,e.tag,`>`)}}function RM(e,t){if(e&1&&(R(0,`dt`),K(1,`In this state since`),z(),R(2,`dd`),K(3),z()),e&2){let e=W(2).$implicit,t=W(2);D(3),q(t.clock(e.block.since))}}function zM(e,t){if(e&1&&(R(0,`dt`),K(1,`Hydrated`),z(),R(2,`dd`),K(3),z()),e&2){let e=W(2).$implicit,t=W(2);D(3),J(` `,e.block.hydratedAt===void 0?`Before the devtools attached`:t.clock(e.block.hydratedAt),` `)}}function BM(e,t){if(e&1&&(R(0,`span`,23),K(1),z()),e&2){let e=W().$implicit;D(),q(e.hydration)}}function VM(e,t){if(e&1&&(R(0,`li`)(1,`span`,22),K(2),z(),R(3,`span`,19),K(4),z(),A(5,BM,2,1,`span`,23),z()),e&2){let e=t.$implicit,n=W(5);D(2),q(n.clock(e.at)),D(2),q(e.state),D(),j(e.hydration===`not-configured`?-1:5)}}function HM(e,t){if(e&1&&(R(0,`h3`,20),K(1,`Transitions`),z(),R(2,`ol`,21),M(3,VM,6,3,`li`,null,Yh),z()),e&2){let e=W(2).$implicit;D(3),N(e.block.transitions)}}function UM(e,t){if(e&1){let e=B();R(0,`li`)(1,`button`,25),U(`click`,function(){let t=C(e).$implicit;return w(W(5).showNode.emit(t.id))}),K(2),R(3,`span`,19),K(4),z()()()}if(e&2){let e=t.$implicit;D(2),J(` Show `,e.name,` `),D(2),J(`<`,e.tag,`>`)}}function WM(e,t){if(e&1&&(R(0,`h3`,20),K(1,`Hydration mismatches`),z(),R(2,`ul`,24),M(3,UM,5,2,`li`,null,kM),z()),e&2){let e=W(2).$implicit;D(3),N(e.mismatches)}}function GM(e,t){if(e&1&&(R(0,`div`,17)(1,`dl`)(2,`dt`),K(3,`Block`),z(),R(4,`dd`,19),K(5),z(),A(6,LM,4,2),A(7,RM,4,1),A(8,zM,4,1),R(9,`dt`),K(10,`Root elements`),z(),R(11,`dd`),K(12),z(),R(13,`dt`),K(14,`Triggers`),z(),R(15,`dd`,19),K(16),z()(),A(17,HM,5,0),A(18,WM,5,0),z()),e&2){let e,t=W().$implicit;V(`id`,`defer-detail-`+t.block.id),D(5),q(t.block.id),D(),j((e=t.block.owner)?6:-1,e),D(),j(t.block.since?7:-1),D(),j(t.block.hydration===`hydrated`?8:-1),D(4),q(t.block.rootIds.length||`None rendered`),D(4),q(t.block.triggers.join(`, `)||`None`),D(),j(t.block.transitions?.length?17:-1),D(),j(t.mismatches.length?18:-1)}}function KM(e,t){if(e&1){let e=B();R(0,`li`,4)(1,`button`,5),U(`click`,function(){let t=C(e).$implicit;return w(W(2).showOwner.emit(t.block))})(`focus`,function(){let t=C(e).$implicit;return w(W(2).highlight.emit(t.block))})(`blur`,function(){return C(e),w(W(2).highlight.emit(null))})(`mouseenter`,function(){let t=C(e).$implicit;return w(W(2).highlight.emit(t.block))})(`mouseleave`,function(){return C(e),w(W(2).highlight.emit(null))}),R(2,`span`,6),K(3),z(),R(4,`span`,7),K(5),z(),M(6,MM,3,4,`span`,8,OM),A(8,NM,2,2,`span`,9),A(9,PM,2,0,`span`,9),A(10,FM,2,1,`span`,10),A(11,IM,2,0,`span`,11),R(12,`span`,12),K(13),z()(),R(14,`button`,13),U(`click`,function(){let t=C(e).$implicit;return w(W(2).toggle(t.block.id))}),T(),R(15,`svg`,14),sg(16,`path`,15),z(),cs(),R(17,`span`,16),K(18),z()(),A(19,GM,19,9,`div`,17),z()}if(e&2){let e=t.$implicit,n=W(2);D(),k(`aria-disabled`,e.block.owner?null:`true`),D(2),q(e.block.owner?.name??`Unknown component`),D(),Qg(`defer-state-`+e.block.state),D(),q(e.block.state),D(),N(e.notes),D(2),j(e.hydrated?8:-1),D(),j(e.block.hasErrorBlock?9:-1),D(),j(e.timings?10:-1),D(),j(e.mismatches.length?11:-1),D(2),q(e.block.triggers.join(`, `)||`no triggers`),D(),k(`aria-expanded`,n.isOpen(e.block.id))(`aria-controls`,n.isOpen(e.block.id)?`defer-detail-`+e.block.id:null),D(4),J(`Details of the block in `,e.block.owner?.name??`an unknown component`),D(),j(n.isOpen(e.block.id)?19:-1)}}function qM(e,t){if(e&1&&(R(0,`section`,0)(1,`h2`,1),K(2,` Defer blocks `),R(3,`span`,2),K(4),z()(),R(5,`ul`,3),M(6,KM,20,14,`li`,4,DM),z()()),e&2){let e=W();D(4),Y(``,e.rows().length,``,e.truncated()?`+`:``),D(2),N(e.rows())}}function JM(e){return e<1e3?`${e}ms`:`${Number((e/1e3).toFixed(2))}s`}function YM(e){let t=[],n=e.placeholder?.minimumTime;n!=null&&t.push(`placeholder min ${JM(n)}`);let r=[e.loading?.afterTime==null?``:`after ${JM(e.loading.afterTime)}`,e.loading?.minimumTime==null?``:`min ${JM(e.loading.minimumTime)}`].filter(Boolean);return r.length&&t.push(`loading ${r.join(`, `)}`),t.join(` · `)}var XM=class e{blocks=$([]);truncated=$(!1);clockOffset=$(0);showOwner=ev();mismatches=$([]);showNode=ev();open=E(new Set);highlight=ev();now=E(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:cT({...t,since:t.since||e},e),timings:YM(t),mismatches:this.mismatches().filter(e=>t.rootIds.includes(e.id)),hydrated:t.hydration===`hydrated`?aT(t):``}))});isOpen(e){return this.open().has(e)}toggle(e){this.open.update(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n})}clock(e){return GE(e)}constructor(){let e,t=()=>{clearInterval(e),e=void 0};ac(()=>{if(!this.waiting())return t();e===void 0&&(this.now.set(Date.now()),e=setInterval(()=>this.now.set(Date.now()),1e3))}),S(vs).onDestroy(t)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-defer-blocks`]],inputs:{blocks:[1,`blocks`],truncated:[1,`truncated`],clockOffset:[1,`clockOffset`],mismatches:[1,`mismatches`]},outputs:{showOwner:`showOwner`,showNode:`showNode`,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`],[1,`defer-item`],[`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,`flag`,`note-failed`],[1,`triggers`,`mono`],[`type`,`button`,1,`defer-toggle`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`m9 6 6 6-6 6`],[1,`sr-only`],[1,`defer-detail`,3,`id`],[`aria-hidden`,`true`],[1,`mono`],[1,`detail-label`],[1,`transitions`],[1,`when`],[1,`muted`],[1,`mismatch-links`],[`type`,`button`,3,`click`]],template:function(e,t){e&1&&A(0,qM,8,2,`section`,0),e&2&&j(t.rows().length?0:-1)},styles:[`[_nghost-%COMP%] { display: block; } @@ -2513,7 +2513,7 @@ button.edit[_ngcontent-%COMP%] { min-width: 0; text-overflow: ellipsis; white-space: nowrap; -}`]})},ZM=(e,t)=>t.id;function QM(e,t){if(e&1&&(F(0,`p`,4),K(1),I()),e&2){let e=W(2);D(),J(`The page has more @for blocks than the `,e.length,` listed.`)}}function $M(e,t){e&1&&(F(0,`span`,9),K(1,`@empty showing`),I())}function eN(e,t){e&1&&(F(0,`span`,10),K(1,`@empty`),I())}function tN(e,t){e&1&&(F(0,`span`,10),K(1,`renders nothing`),I())}function nN(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,6),H(`click`,function(){let t=C(e).$implicit;return w(W(3).showOwner.emit(t))})(`focus`,function(){let t=C(e).$implicit,n=W(3);return w(n.highlight.emit(n.target(t)))})(`blur`,function(){return C(e),w(W(3).highlight.emit(null))})(`mouseenter`,function(){let t=C(e).$implicit,n=W(3);return w(n.highlight.emit(n.target(t)))})(`mouseleave`,function(){return C(e),w(W(3).highlight.emit(null))}),F(2,`span`,7),K(3),I(),F(4,`span`,8),K(5),I(),A(6,$M,2,0,`span`,9)(7,eN,2,0,`span`,10)(8,tN,2,0,`span`,10),F(9,`span`,11),K(10),I()()()}if(e&2){let e=t.$implicit,n=W(3);D(),k(`aria-disabled`,e.owner?null:`true`),D(2),q(e.owner?.name??`Unknown component`),D(2),Y(` `,e.count,` `,e.count===1?`item`:`items`,` `),D(),j(e.showingEmpty?6:e.hasEmptyBlock?7:e.count===0?8:-1),D(4),q(n.trackLabel(e))}}function rN(e,t){if(e&1&&(F(0,`section`,1)(1,`h2`,2),K(2,` @for blocks `),F(3,`span`,3),K(4),I()(),A(5,QM,2,1,`p`,4),F(6,`ul`,5),M(7,nN,11,6,`li`,null,ZM),I()()),e&2){let e=W(),t=W();D(4),q(t.truncated()?e.length+`+`:e.length),D(),j(t.truncated()?5:-1),D(2),N(e)}}function iN(e,t){e&1&&A(0,rN,9,2,`section`,1),e&2&&j(t.length?0:-1)}function aN(e,t){e&1&&L(0,`app-angular-unavailable`,0),e&2&&P(`page`,W().angular())}var oN={$index:`track $index`,item:`track item`,function:`track expression`},sN=class e{blocks=$(void 0);truncated=$(!1);supported=$(null);angular=$(null);showOwner=Q_();highlight=Q_();target(e){return e.rootIds[0]??e.owner?.id??null}trackLabel(e){return e.track?oN[e.track]:`track unknown`}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-for-blocks`]],inputs:{blocks:[1,`blocks`],truncated:[1,`truncated`],supported:[1,`supported`],angular:[1,`angular`]},outputs:{showOwner:`showOwner`,highlight:`highlight`},decls:2,vars:1,consts:[[`capability`,`forBlocks`,`missing`,``,`compact`,``,1,`for`,3,`page`],[`aria-labelledby`,`ct-for-title`,1,`for`],[`id`,`ct-for-title`,1,`for-title`],[1,`pill`],[1,`note`],[1,`for-list`],[`type`,`button`,1,`for-row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`name`,`mono`],[1,`count`],[1,`flag`,`empty`],[1,`flag`],[1,`track`,`mono`]],template:function(e,t){if(e&1&&A(0,iN,1,1)(1,aN,1,1,`app-angular-unavailable`,0),e&2){let e;j((e=t.blocks())?0:t.supported()===!1?1:-1,e)}},dependencies:[hD],styles:[`[_nghost-%COMP%] { +}`]})},ZM=(e,t)=>t.id;function QM(e,t){if(e&1&&(F(0,`p`,4),K(1),I()),e&2){let e=W(2);D(),J(`The page has more @for blocks than the `,e.length,` listed.`)}}function $M(e,t){e&1&&(F(0,`span`,9),K(1,`@empty showing`),I())}function eN(e,t){e&1&&(F(0,`span`,10),K(1,`@empty`),I())}function tN(e,t){e&1&&(F(0,`span`,10),K(1,`renders nothing`),I())}function nN(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,6),H(`click`,function(){let t=C(e).$implicit;return w(W(3).showOwner.emit(t))})(`focus`,function(){let t=C(e).$implicit,n=W(3);return w(n.highlight.emit(n.target(t)))})(`blur`,function(){return C(e),w(W(3).highlight.emit(null))})(`mouseenter`,function(){let t=C(e).$implicit,n=W(3);return w(n.highlight.emit(n.target(t)))})(`mouseleave`,function(){return C(e),w(W(3).highlight.emit(null))}),F(2,`span`,7),K(3),I(),F(4,`span`,8),K(5),I(),A(6,$M,2,0,`span`,9)(7,eN,2,0,`span`,10)(8,tN,2,0,`span`,10),F(9,`span`,11),K(10),I()()()}if(e&2){let e=t.$implicit,n=W(3);D(),k(`aria-disabled`,e.owner?null:`true`),D(2),q(e.owner?.name??`Unknown component`),D(2),Y(` `,e.count,` `,e.count===1?`item`:`items`,` `),D(),j(e.showingEmpty?6:e.hasEmptyBlock?7:e.count===0?8:-1),D(4),q(n.trackLabel(e))}}function rN(e,t){if(e&1&&(F(0,`section`,1)(1,`h2`,2),K(2,` @for blocks `),F(3,`span`,3),K(4),I()(),A(5,QM,2,1,`p`,4),F(6,`ul`,5),M(7,nN,11,6,`li`,null,ZM),I()()),e&2){let e=W(),t=W();D(4),q(t.truncated()?e.length+`+`:e.length),D(),j(t.truncated()?5:-1),D(2),N(e)}}function iN(e,t){e&1&&A(0,rN,9,2,`section`,1),e&2&&j(t.length?0:-1)}function aN(e,t){e&1&&L(0,`app-angular-unavailable`,0),e&2&&P(`page`,W().angular())}var oN={$index:`track $index`,item:`track item`,function:`track expression`},sN=class e{blocks=$(void 0);truncated=$(!1);supported=$(null);angular=$(null);showOwner=ev();highlight=ev();target(e){return e.rootIds[0]??e.owner?.id??null}trackLabel(e){return e.track?oN[e.track]:`track unknown`}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-for-blocks`]],inputs:{blocks:[1,`blocks`],truncated:[1,`truncated`],supported:[1,`supported`],angular:[1,`angular`]},outputs:{showOwner:`showOwner`,highlight:`highlight`},decls:2,vars:1,consts:[[`capability`,`forBlocks`,`missing`,``,`compact`,``,1,`for`,3,`page`],[`aria-labelledby`,`ct-for-title`,1,`for`],[`id`,`ct-for-title`,1,`for-title`],[1,`pill`],[1,`note`],[1,`for-list`],[`type`,`button`,1,`for-row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`name`,`mono`],[1,`count`],[1,`flag`,`empty`],[1,`flag`],[1,`track`,`mono`]],template:function(e,t){if(e&1&&A(0,iN,1,1)(1,aN,1,1,`app-angular-unavailable`,0),e&2){let e;j((e=t.blocks())?0:t.supported()===!1?1:-1,e)}},dependencies:[hD],styles:[`[_nghost-%COMP%] { display: block; } @@ -2631,7 +2631,7 @@ button.edit[_ngcontent-%COMP%] { min-width: 0; text-overflow: ellipsis; white-space: nowrap; -}`]})},cN=(e,t)=>t.id;function lN(e,t){if(e&1&&(F(0,`p`,11),K(1),I(),F(2,`h3`,7),K(3,`Still retained`),I(),F(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. `),I()),e&2){let e=W(),t=W();D(),q(t.plural(e.navigations,`navigation`))}}function uN(e,t){e&1&&(F(0,`p`,6),K(1,` This page cannot track destroyed components. It needs WeakRef, FinalizationRegistry and the Angular debug API of a development build. `),I())}function dN(e,t){if(e&1&&(F(0,`span`,18),K(1),I()),e&2){let e=W().$implicit,t=W(4);D(),q(t.plural(e.subscriptions,`open subscription`))}}function fN(e,t){if(e&1&&(F(0,`li`,13)(1,`span`,14),K(2),I(),F(3,`span`,15),K(4),I(),F(5,`span`,16),K(6),I(),F(7,`span`,17),K(8),I(),A(9,dN,2,1,`span`,18),I()),e&2){let e=t.$implicit,n=W(4);D(2),q(e.name),D(2),q(e.route||`/`),D(2),J(``,n.plural(e.navigations,`navigation`),` ago`),D(2),q(n.ageOf(e)),D(),j(e.subscriptions?9:-1)}}function pN(e,t){if(e&1&&(F(0,`p`,6),K(1),I(),F(2,`ul`,12),M(3,fN,10,5,`li`,13,cN),I()),e&2){let e=W(3);D(),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. `),D(2),N(e.retained().slice(0,e.shown))}}function mN(e,t){e&1&&(F(0,`p`,6),K(1,`No destroyed component is still in memory after a few navigations.`),I())}function hN(e,t){if(e&1&&(F(0,`p`,6),K(1),F(2,`span`,19),K(3),I(),K(4,`. Navigate a few times to see whether they stay. `),I()),e&2){let e=W(3);D(),J(` `,e.plural(e.recent().length,`instance`),` destroyed recently and not collected yet: `),D(2),q(e.names(e.recent()))}}function gN(e,t){if(e&1&&(A(0,uN,2,0,`p`,6),F(1,`p`,11),K(2),I(),F(3,`h3`,7),K(4,` Still retained `),F(5,`span`,8),K(6),I()(),A(7,pN,5,2)(8,mN,2,0,`p`,6),A(9,hN,5,2,`p`,6)),e&2){let e=W(),t=W();j(e.support.retention?-1:0),D(2),__(` `,t.plural(e.navigations,`navigation`),` · `,t.retained().length,` still retained · `,t.plural(e.totals.collected,`instance`),` collected `),D(4),q(t.retained().length),D(),j(t.retained().length?7:8),D(2),j(t.recent().length?9:-1)}}function _N(e,t){if(e&1&&(F(0,`p`,6),K(1,` Off the page but not destroyed (detached views, such as a route reuse cache): `),F(2,`span`,19),K(3),I(),K(4,`. `),I()),e&2){let e=W(2);D(3),q(e.names(e.detached()))}}function vN(e,t){if(e&1&&(F(0,`span`,8),K(1),I()),e&2){let e=W();D(),q(e.subscriptions.length)}}function yN(e,t){if(e&1&&(F(0,`span`,15),K(1),I()),e&2){let e=W().$implicit;D(),q(e.source)}}function bN(e,t){if(e&1&&(F(0,`li`,13)(1,`span`,14),K(2),I(),F(3,`span`,16),K(4),I(),F(5,`span`,18),K(6),I(),A(7,yN,2,1,`span`,15),I()),e&2){let e=t.$implicit;D(2),q(e.name),D(2),J(``,e.count,` open`),D(2),J(` `,e.reason===`instance-destroyed`?`instance destroyed`:`no instance left`,` `),D(),j(e.source?7:-1)}}function xN(e,t){if(e&1&&(F(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. `),I(),F(2,`ul`,12),M(3,bN,8,4,`li`,13,Jh),I()),e&2){let e=W(2),t=W();D(3),N(e.subscriptions.slice(0,t.shown))}}function SN(e,t){e&1&&(F(0,`p`,6),K(1,`No subscription is still open after its component went away.`),I())}function CN(e,t){e&1&&(F(0,`p`,6),K(1,` Subscriptions are tied to component classes only; Angular 20 profiler hooks tie them to instances. `),I())}function wN(e,t){if(e&1&&(A(0,xN,5,0)(1,SN,2,0,`p`,6),A(2,CN,2,0,`p`,6)),e&2){let e=W();j(+!e.subscriptions.length),D(2),j(e.support.instances?-1:2)}}function TN(e,t){e&1&&(F(0,`p`,9),K(1,` Tracking could not start: the page has no RxJS the overlay can load. `),I())}function EN(e,t){e&1&&(F(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. `),I())}function DN(e,t){e&1&&L(0,`app-angular-unavailable`,10),e&2&&P(`page`,W(2).angular())}function ON(e,t){if(e&1&&(F(0,`span`,16),K(1),I()),e&2){let e=W().$implicit,t=W(3);D(),q(t.plural(e.subscriptions,`subscription`))}}function kN(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,20),H(`click`,function(){let t=C(e).$implicit;return w(W(3).showComponent.emit(t.id))})(`focus`,function(){let t=C(e).$implicit;return w(W(3).highlight.emit(t.id))})(`blur`,function(){return C(e),w(W(3).highlight.emit(null))})(`mouseenter`,function(){let t=C(e).$implicit;return w(W(3).highlight.emit(t.id))})(`mouseleave`,function(){return C(e),w(W(3).highlight.emit(null))}),F(2,`span`,14),K(3),I(),F(4,`span`,16),K(5),I(),A(6,ON,2,1,`span`,16),I()()}if(e&2){let e=t.$implicit,n=W(2),r=W();D(3),q(e.name),D(2),q(r.effectsText(e)),D(),j(n.support.subscriptions===`on`?6:-1)}}function AN(e,t){e&1&&(F(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. `),I())}function jN(e,t){if(e&1&&(F(0,`ul`,12),M(1,kN,7,3,`li`,null,cN),I(),A(3,AN,2,0,`p`,6)),e&2){let e=W(),t=W();D(),N(e.components.slice(0,t.shown)),D(2),j(e.components.some(t.hasShared)?3:-1)}}function MN(e,t){e&1&&(F(0,`p`,6),K(1,`No component on the page has a live effect or a tracked subscription.`),I())}function NN(e,t){if(e&1&&(A(0,lN,6,1)(1,gN,10,7),A(2,_N,5,1,`p`,6),F(3,`h3`,7),K(4,` Open subscriptions after destroy `),A(5,vN,2,1,`span`,8),I(),A(6,wN,3,2)(7,TN,2,0,`p`,9)(8,EN,2,0,`p`,6),F(9,`h3`,7),K(10,` Live effects and subscriptions `),F(11,`span`,8),K(12),I()(),A(13,DN,1,1,`app-angular-unavailable`,10),A(14,jN,4,1)(15,MN,2,0,`p`,6)),e&2){let e,n=t,r=W();j(n.support.retention===`dev-di-debug`?0:1),D(2),j(r.detached().length?2:-1),D(3),j(n.support.subscriptions===`on`?5:-1),D(),j((e=n.support.subscriptions)===`on`?6:e===`unavailable`?7:8),D(6),q(n.components.length),D(),j(n.support.effects?-1:13),D(),j(n.components.length?14:15)}}function PN(e,t){e&1&&(F(0,`p`,6),K(1,`No leak data from this page yet. It comes with the next report.`),I())}var FN=20;function IN(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 LN=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,RN=class e{report=$(null);pageId=$(null);rpc=$(null);angular=$(null);now=$(()=>Date.now());showComponent=Q_();highlight=Q_();shown=FN;minNavigations=2;minSeconds=fw/1e3;plural=LN;busy=E(!1);announcement=E(``);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?`${IN(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=LN(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 _T(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=O({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&&(F(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Leaks`),I(),F(4,`button`,3),H(`click`,function(){return t.toggle()}),K(5,` Track subscriptions `),I(),F(6,`p`,4),K(7),I()(),F(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. `),I(),A(10,NN,16,7)(11,PN,2,0,`p`,6),I()),e&2){let e;D(4),P(`disabled`,!t.pageId()||!t.report()),k(`aria-pressed`,t.tracking())(`aria-disabled`,t.busy()||null),D(3),q(t.announcement()),D(3),j((e=t.report())?10:11,e)}},dependencies:[hD],styles:[`[_nghost-%COMP%] { +}`]})},cN=(e,t)=>t.id;function lN(e,t){if(e&1&&(F(0,`p`,11),K(1),I(),F(2,`h3`,7),K(3,`Still retained`),I(),F(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. `),I()),e&2){let e=W(),t=W();D(),q(t.plural(e.navigations,`navigation`))}}function uN(e,t){e&1&&(F(0,`p`,6),K(1,` This page cannot track destroyed components. It needs WeakRef, FinalizationRegistry and the Angular debug API of a development build. `),I())}function dN(e,t){if(e&1&&(F(0,`span`,18),K(1),I()),e&2){let e=W().$implicit,t=W(4);D(),q(t.plural(e.subscriptions,`open subscription`))}}function fN(e,t){if(e&1&&(F(0,`li`,13)(1,`span`,14),K(2),I(),F(3,`span`,15),K(4),I(),F(5,`span`,16),K(6),I(),F(7,`span`,17),K(8),I(),A(9,dN,2,1,`span`,18),I()),e&2){let e=t.$implicit,n=W(4);D(2),q(e.name),D(2),q(e.route||`/`),D(2),J(``,n.plural(e.navigations,`navigation`),` ago`),D(2),q(n.ageOf(e)),D(),j(e.subscriptions?9:-1)}}function pN(e,t){if(e&1&&(F(0,`p`,6),K(1),I(),F(2,`ul`,12),M(3,fN,10,5,`li`,13,cN),I()),e&2){let e=W(3);D(),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. `),D(2),N(e.retained().slice(0,e.shown))}}function mN(e,t){e&1&&(F(0,`p`,6),K(1,`No destroyed component is still in memory after a few navigations.`),I())}function hN(e,t){if(e&1&&(F(0,`p`,6),K(1),F(2,`span`,19),K(3),I(),K(4,`. Navigate a few times to see whether they stay. `),I()),e&2){let e=W(3);D(),J(` `,e.plural(e.recent().length,`instance`),` destroyed recently and not collected yet: `),D(2),q(e.names(e.recent()))}}function gN(e,t){if(e&1&&(A(0,uN,2,0,`p`,6),F(1,`p`,11),K(2),I(),F(3,`h3`,7),K(4,` Still retained `),F(5,`span`,8),K(6),I()(),A(7,pN,5,2)(8,mN,2,0,`p`,6),A(9,hN,5,2,`p`,6)),e&2){let e=W(),t=W();j(e.support.retention?-1:0),D(2),y_(` `,t.plural(e.navigations,`navigation`),` · `,t.retained().length,` still retained · `,t.plural(e.totals.collected,`instance`),` collected `),D(4),q(t.retained().length),D(),j(t.retained().length?7:8),D(2),j(t.recent().length?9:-1)}}function _N(e,t){if(e&1&&(F(0,`p`,6),K(1,` Off the page but not destroyed (detached views, such as a route reuse cache): `),F(2,`span`,19),K(3),I(),K(4,`. `),I()),e&2){let e=W(2);D(3),q(e.names(e.detached()))}}function vN(e,t){if(e&1&&(F(0,`span`,8),K(1),I()),e&2){let e=W();D(),q(e.subscriptions.length)}}function yN(e,t){if(e&1&&(F(0,`span`,15),K(1),I()),e&2){let e=W().$implicit;D(),q(e.source)}}function bN(e,t){if(e&1&&(F(0,`li`,13)(1,`span`,14),K(2),I(),F(3,`span`,16),K(4),I(),F(5,`span`,18),K(6),I(),A(7,yN,2,1,`span`,15),I()),e&2){let e=t.$implicit;D(2),q(e.name),D(2),J(``,e.count,` open`),D(2),J(` `,e.reason===`instance-destroyed`?`instance destroyed`:`no instance left`,` `),D(),j(e.source?7:-1)}}function xN(e,t){if(e&1&&(F(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. `),I(),F(2,`ul`,12),M(3,bN,8,4,`li`,13,Yh),I()),e&2){let e=W(2),t=W();D(3),N(e.subscriptions.slice(0,t.shown))}}function SN(e,t){e&1&&(F(0,`p`,6),K(1,`No subscription is still open after its component went away.`),I())}function CN(e,t){e&1&&(F(0,`p`,6),K(1,` Subscriptions are tied to component classes only; Angular 20 profiler hooks tie them to instances. `),I())}function wN(e,t){if(e&1&&(A(0,xN,5,0)(1,SN,2,0,`p`,6),A(2,CN,2,0,`p`,6)),e&2){let e=W();j(+!e.subscriptions.length),D(2),j(e.support.instances?-1:2)}}function TN(e,t){e&1&&(F(0,`p`,9),K(1,` Tracking could not start: the page has no RxJS the overlay can load. `),I())}function EN(e,t){e&1&&(F(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. `),I())}function DN(e,t){e&1&&L(0,`app-angular-unavailable`,10),e&2&&P(`page`,W(2).angular())}function ON(e,t){if(e&1&&(F(0,`span`,16),K(1),I()),e&2){let e=W().$implicit,t=W(3);D(),q(t.plural(e.subscriptions,`subscription`))}}function kN(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,20),H(`click`,function(){let t=C(e).$implicit;return w(W(3).showComponent.emit(t.id))})(`focus`,function(){let t=C(e).$implicit;return w(W(3).highlight.emit(t.id))})(`blur`,function(){return C(e),w(W(3).highlight.emit(null))})(`mouseenter`,function(){let t=C(e).$implicit;return w(W(3).highlight.emit(t.id))})(`mouseleave`,function(){return C(e),w(W(3).highlight.emit(null))}),F(2,`span`,14),K(3),I(),F(4,`span`,16),K(5),I(),A(6,ON,2,1,`span`,16),I()()}if(e&2){let e=t.$implicit,n=W(2),r=W();D(3),q(e.name),D(2),q(r.effectsText(e)),D(),j(n.support.subscriptions===`on`?6:-1)}}function AN(e,t){e&1&&(F(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. `),I())}function jN(e,t){if(e&1&&(F(0,`ul`,12),M(1,kN,7,3,`li`,null,cN),I(),A(3,AN,2,0,`p`,6)),e&2){let e=W(),t=W();D(),N(e.components.slice(0,t.shown)),D(2),j(e.components.some(t.hasShared)?3:-1)}}function MN(e,t){e&1&&(F(0,`p`,6),K(1,`No component on the page has a live effect or a tracked subscription.`),I())}function NN(e,t){if(e&1&&(A(0,lN,6,1)(1,gN,10,7),A(2,_N,5,1,`p`,6),F(3,`h3`,7),K(4,` Open subscriptions after destroy `),A(5,vN,2,1,`span`,8),I(),A(6,wN,3,2)(7,TN,2,0,`p`,9)(8,EN,2,0,`p`,6),F(9,`h3`,7),K(10,` Live effects and subscriptions `),F(11,`span`,8),K(12),I()(),A(13,DN,1,1,`app-angular-unavailable`,10),A(14,jN,4,1)(15,MN,2,0,`p`,6)),e&2){let e,n=t,r=W();j(n.support.retention===`dev-di-debug`?0:1),D(2),j(r.detached().length?2:-1),D(3),j(n.support.subscriptions===`on`?5:-1),D(),j((e=n.support.subscriptions)===`on`?6:e===`unavailable`?7:8),D(6),q(n.components.length),D(),j(n.support.effects?-1:13),D(),j(n.components.length?14:15)}}function PN(e,t){e&1&&(F(0,`p`,6),K(1,`No leak data from this page yet. It comes with the next report.`),I())}var FN=20;function IN(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 LN=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,RN=class e{report=$(null);pageId=$(null);rpc=$(null);angular=$(null);now=$(()=>Date.now());showComponent=ev();highlight=ev();shown=FN;minNavigations=2;minSeconds=fw/1e3;plural=LN;busy=E(!1);announcement=E(``);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?`${IN(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=LN(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 _T(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=O({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&&(F(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Leaks`),I(),F(4,`button`,3),H(`click`,function(){return t.toggle()}),K(5,` Track subscriptions `),I(),F(6,`p`,4),K(7),I()(),F(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. `),I(),A(10,NN,16,7)(11,PN,2,0,`p`,6),I()),e&2){let e;D(4),P(`disabled`,!t.pageId()||!t.report()),k(`aria-pressed`,t.tracking())(`aria-disabled`,t.busy()||null),D(3),q(t.announcement()),D(3),j((e=t.report())?10:11,e)}},dependencies:[hD],styles:[`[_nghost-%COMP%] { display: block; } @@ -2787,7 +2787,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); -}`]})},zN=12,BN=900;function VN(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 HN=class{options;injector=S(gs);visibleTop=E(0);viewport=E(BN);rowHeight;host=null;scroller=null;detach=null;enabled;range;padTop;padBottom;constructor(e){this.options=e,this.rowHeight=E(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)-zN));return{start:a,end:Math.min(t,Math.max(a,Math.ceil((i+r)/n)+zN))}}),this.padTop=X(()=>this.enabled()?this.range().start*this.rowHeight():0),this.padBottom=X(()=>this.enabled()?(e.count()-this.range().end)*this.rowHeight():0),ac(()=>{e.count(),ed(()=>this.update(),{injector:this.injector})}),S(vs).onDestroy(()=>this.detach?.())}get count(){return this.options.count()}rendered(e){let{start:t,end:n}=this.range();return e>=t&&e<n}attach(e){if(this.host===e)return;this.detach?.(),this.host=e,e.style.overflowAnchor=`none`,e.style.transitionProperty=`none`;let t=/(auto|scroll|overlay)/.test(getComputedStyle(e).overflowY);this.scroller=t?e:VN(e);let n=this.scroller??window,r=()=>this.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:BN)}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&&ed(t,{injector:this.injector})}};function UN(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 WN=e=>{let t=parseFloat(e);return Number.isFinite(t)?t:0};function GN(e,t=8){let n=e.ownerDocument.defaultView;if(!n)return e.offsetHeight+t;let r=UN(e),i=r?n.getComputedStyle(r):null,a=i?WN(i.paddingTop):0,o=i?WN(i.scrollPaddingTop):0,s=WN(n.getComputedStyle(e).top);return Math.max(0,Math.ceil(a+s+e.offsetHeight+t-o))}function KN(e,t,n=8){let r=UN(e),i=t.getBoundingClientRect().bottom+n-e.getBoundingClientRect().top;i<=0||(r?r.scrollTop-=i:e.ownerDocument.defaultView?.scrollBy(0,-i))}var qN=[`input`];function JN(e,t){if(e&1){let e=B();R(0,`button`,9),U(`click`,function(){return C(e),w(W().save())}),T(),R(1,`svg`,10),og(2,`path`,11),z(),cs(),R(3,`span`,12),K(4,`Save`),z()()}e&2&&k(`aria-label`,`Save filter `+W().query())}function YN(e,t){if(e&1){let e=B();R(0,`li`,14)(1,`button`,15),U(`click`,function(){let t=C(e).$implicit;return w(W(2).apply(t))}),K(2),z(),R(3,`button`,16),U(`click`,function(){let t=C(e).$implicit;return w(W(2).remove(t))}),T(),R(4,`svg`,10),og(5,`path`,17),z()()()}if(e&2){let e=t.$implicit,n=W(2);G(`active`,e===n.query()),D(),k(`aria-pressed`,e===n.query())(`title`,e),D(),J(` `,e,` `),D(),k(`aria-label`,`Remove saved filter `+e)}}function XN(e,t){if(e&1&&(R(0,`ul`,7),M(1,YN,6,6,`li`,13,Yh),z()),e&2){let e=W();D(),N(e.saved())}}function ZN(e,t){if(e&1&&(R(0,`span`,8),K(1),z()),e&2){let e=W();D(),q(e.announcement())}}var QN=`pangular-pref:filters`,$N=200;function eP(e){try{let t=localStorage.getItem(`${QN}:${e}`),n=t?JSON.parse(t):[];if(!Array.isArray(n))return[];let r=n.filter(e=>typeof e==`string`&&!!e.trim()&&e.length<=$N);return[...new Set(r)].slice(-8)}catch{return[]}}function tP(e,t){try{t.length?localStorage.setItem(`${QN}:${e}`,JSON.stringify(t)):localStorage.removeItem(`${QN}:${e}`)}catch{}}var nP=class e{value=rv(``);label=$(`Filter`);placeholder=$(`Filter`);inputId=$(null);describedBy=$(null);saveKey=$(null);input=av.required(`input`);host=S(kl);injector=S(gs);announcement=E(``);query=X(()=>this.value().trim());saved=Q(()=>{let e=this.saveKey();return e?eP(e):[]});canSave=X(()=>{let e=this.query();return!!this.saveKey()&&!!e&&e.length<=$N&&!this.saved().includes(e)&&this.saved().length<8});focus(){this.input().nativeElement.focus()}clear(e){this.value()&&(e.preventDefault(),e.stopPropagation(),this.value.set(``))}save(){let e=this.saveKey(),t=this.query();if(!e||!this.canSave())return;let n=[...this.saved(),t];this.saved.set(n),tP(e,n),this.say(`Filter ${t} saved.`),this.focusAfterRender(`.chip:last-child .apply`)}apply(e){this.value.set(this.query()===e?``:e)}remove(e){let t=this.saveKey();if(!t)return;let n=this.saved().indexOf(e),r=this.saved().filter(t=>t!==e);if(this.saved.set(r),tP(t,r),this.say(`Saved filter ${e} removed.`),!r.length){this.focus();return}let i=Math.min(n,r.length-1)+1;this.focusAfterRender(`.chip:nth-child(${i}) .apply`)}focusAfterRender(e){ed(()=>{let t=this.host.nativeElement.querySelector(e);t?t.focus():this.focus()},{injector:this.injector})}say(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-search-field`]],viewQuery:function(e,t){e&1&&Dg(t.input,qN,5),e&2&&Og()},inputs:{value:[1,`value`],label:[1,`label`],placeholder:[1,`placeholder`],inputId:[1,`inputId`],describedBy:[1,`describedBy`],saveKey:[1,`saveKey`]},outputs:{value:`valueChange`},decls:9,vars:8,consts:[[`input`,``],[1,`box`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`placeholder`,`value`],[`type`,`button`,1,`save`],[`aria-label`,`Saved filters`,1,`chips`],[`role`,`status`,1,`sr-only`],[`type`,`button`,1,`save`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M6 4h12v16l-6-4-6 4z`],[1,`save-text`],[1,`chip`,3,`active`],[1,`chip`],[`type`,`button`,1,`apply`,3,`click`],[`type`,`button`,1,`remove`,3,`click`],[`d`,`M7 7l10 10M17 7 7 17`]],template:function(e,t){e&1&&(R(0,`div`,1),T(),R(1,`svg`,2),og(2,`circle`,3)(3,`path`,4),z(),cs(),R(4,`input`,5,0),U(`input`,function(e){return t.value.set(e.target.value)})(`keydown.escape`,function(e){return t.clear(e)}),z()(),A(6,JN,5,1,`button`,6),A(7,XN,3,0,`ul`,7),A(8,ZN,2,1,`span`,8)),e&2&&(D(4),V(`placeholder`,t.placeholder())(`value`,t.value()),k(`id`,t.inputId())(`aria-label`,t.label())(`aria-describedby`,t.describedBy()),D(2),j(t.canSave()?6:-1),D(),j(t.saveKey()&&t.saved().length?7:-1),D(),j(t.saveKey()?8:-1))},styles:[`[_nghost-%COMP%] { +}`]})},zN=12,BN=900;function VN(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 HN=class{options;injector=S(gs);visibleTop=E(0);viewport=E(BN);rowHeight;host=null;scroller=null;detach=null;enabled;range;padTop;padBottom;constructor(e){this.options=e,this.rowHeight=E(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)-zN));return{start:a,end:Math.min(t,Math.max(a,Math.ceil((i+r)/n)+zN))}}),this.padTop=X(()=>this.enabled()?this.range().start*this.rowHeight():0),this.padBottom=X(()=>this.enabled()?(e.count()-this.range().end)*this.rowHeight():0),ac(()=>{e.count(),td(()=>this.update(),{injector:this.injector})}),S(vs).onDestroy(()=>this.detach?.())}get count(){return this.options.count()}rendered(e){let{start:t,end:n}=this.range();return e>=t&&e<n}attach(e){if(this.host===e)return;this.detach?.(),this.host=e,e.style.overflowAnchor=`none`,e.style.transitionProperty=`none`;let t=/(auto|scroll|overlay)/.test(getComputedStyle(e).overflowY);this.scroller=t?e:VN(e);let n=this.scroller??window,r=()=>this.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:BN)}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&&td(t,{injector:this.injector})}};function UN(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 WN=e=>{let t=parseFloat(e);return Number.isFinite(t)?t:0};function GN(e,t=8){let n=e.ownerDocument.defaultView;if(!n)return e.offsetHeight+t;let r=UN(e),i=r?n.getComputedStyle(r):null,a=i?WN(i.paddingTop):0,o=i?WN(i.scrollPaddingTop):0,s=WN(n.getComputedStyle(e).top);return Math.max(0,Math.ceil(a+s+e.offsetHeight+t-o))}function KN(e,t,n=8){let r=UN(e),i=t.getBoundingClientRect().bottom+n-e.getBoundingClientRect().top;i<=0||(r?r.scrollTop-=i:e.ownerDocument.defaultView?.scrollBy(0,-i))}var qN=[`input`];function JN(e,t){if(e&1){let e=B();R(0,`button`,9),U(`click`,function(){return C(e),w(W().save())}),T(),R(1,`svg`,10),sg(2,`path`,11),z(),cs(),R(3,`span`,12),K(4,`Save`),z()()}e&2&&k(`aria-label`,`Save filter `+W().query())}function YN(e,t){if(e&1){let e=B();R(0,`li`,14)(1,`button`,15),U(`click`,function(){let t=C(e).$implicit;return w(W(2).apply(t))}),K(2),z(),R(3,`button`,16),U(`click`,function(){let t=C(e).$implicit;return w(W(2).remove(t))}),T(),R(4,`svg`,10),sg(5,`path`,17),z()()()}if(e&2){let e=t.$implicit,n=W(2);G(`active`,e===n.query()),D(),k(`aria-pressed`,e===n.query())(`title`,e),D(),J(` `,e,` `),D(),k(`aria-label`,`Remove saved filter `+e)}}function XN(e,t){if(e&1&&(R(0,`ul`,7),M(1,YN,6,6,`li`,13,Xh),z()),e&2){let e=W();D(),N(e.saved())}}function ZN(e,t){if(e&1&&(R(0,`span`,8),K(1),z()),e&2){let e=W();D(),q(e.announcement())}}var QN=`pangular-pref:filters`,$N=200;function eP(e){try{let t=localStorage.getItem(`${QN}:${e}`),n=t?JSON.parse(t):[];if(!Array.isArray(n))return[];let r=n.filter(e=>typeof e==`string`&&!!e.trim()&&e.length<=$N);return[...new Set(r)].slice(-8)}catch{return[]}}function tP(e,t){try{t.length?localStorage.setItem(`${QN}:${e}`,JSON.stringify(t)):localStorage.removeItem(`${QN}:${e}`)}catch{}}var nP=class e{value=av(``);label=$(`Filter`);placeholder=$(`Filter`);inputId=$(null);describedBy=$(null);saveKey=$(null);input=sv.required(`input`);host=S(kl);injector=S(gs);announcement=E(``);query=X(()=>this.value().trim());saved=Q(()=>{let e=this.saveKey();return e?eP(e):[]});canSave=X(()=>{let e=this.query();return!!this.saveKey()&&!!e&&e.length<=$N&&!this.saved().includes(e)&&this.saved().length<8});focus(){this.input().nativeElement.focus()}clear(e){this.value()&&(e.preventDefault(),e.stopPropagation(),this.value.set(``))}save(){let e=this.saveKey(),t=this.query();if(!e||!this.canSave())return;let n=[...this.saved(),t];this.saved.set(n),tP(e,n),this.say(`Filter ${t} saved.`),this.focusAfterRender(`.chip:last-child .apply`)}apply(e){this.value.set(this.query()===e?``:e)}remove(e){let t=this.saveKey();if(!t)return;let n=this.saved().indexOf(e),r=this.saved().filter(t=>t!==e);if(this.saved.set(r),tP(t,r),this.say(`Saved filter ${e} removed.`),!r.length){this.focus();return}let i=Math.min(n,r.length-1)+1;this.focusAfterRender(`.chip:nth-child(${i}) .apply`)}focusAfterRender(e){td(()=>{let t=this.host.nativeElement.querySelector(e);t?t.focus():this.focus()},{injector:this.injector})}say(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-search-field`]],viewQuery:function(e,t){e&1&&Og(t.input,qN,5),e&2&&kg()},inputs:{value:[1,`value`],label:[1,`label`],placeholder:[1,`placeholder`],inputId:[1,`inputId`],describedBy:[1,`describedBy`],saveKey:[1,`saveKey`]},outputs:{value:`valueChange`},decls:9,vars:8,consts:[[`input`,``],[1,`box`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`placeholder`,`value`],[`type`,`button`,1,`save`],[`aria-label`,`Saved filters`,1,`chips`],[`role`,`status`,1,`sr-only`],[`type`,`button`,1,`save`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M6 4h12v16l-6-4-6 4z`],[1,`save-text`],[1,`chip`,3,`active`],[1,`chip`],[`type`,`button`,1,`apply`,3,`click`],[`type`,`button`,1,`remove`,3,`click`],[`d`,`M7 7l10 10M17 7 7 17`]],template:function(e,t){e&1&&(R(0,`div`,1),T(),R(1,`svg`,2),sg(2,`circle`,3)(3,`path`,4),z(),cs(),R(4,`input`,5,0),U(`input`,function(e){return t.value.set(e.target.value)})(`keydown.escape`,function(e){return t.clear(e)}),z()(),A(6,JN,5,1,`button`,6),A(7,XN,3,0,`ul`,7),A(8,ZN,2,1,`span`,8)),e&2&&(D(4),V(`placeholder`,t.placeholder())(`value`,t.value()),k(`id`,t.inputId())(`aria-label`,t.label())(`aria-describedby`,t.describedBy()),D(2),j(t.canSave()?6:-1),D(),j(t.saveKey()&&t.saved().length?7:-1),D(),j(t.saveKey()?8:-1))},styles:[`[_nghost-%COMP%] { display: flex; flex: 1 1 220px; flex-wrap: wrap; @@ -2955,7 +2955,21 @@ input[_ngcontent-%COMP%]:focus { .save[_ngcontent-%COMP%] { transition: none; } -}`]})},rP=[`filterInput`],iP=[`treeEl`],aP=[`propFilterInput`],oP=()=>[],sP=e=>({$implicit:e}),cP=e=>({kind:`component`,id:e}),lP=(e,t)=>t.row.node.id,uP=(e,t)=>t.outlet+t.route,dP=(e,t)=>t+e;function fP(e,t){return this.sourceKey(t)}var pP=(e,t)=>t.formId,mP=(e,t)=>t.name+t.index,hP=(e,t)=>t.name,gP=(e,t)=>t.id,_P=(e,t)=>t.token+e;function vP(e,t){if(e&1){let e=B();F(0,`span`,37),K(1,`Page`),I(),F(2,`app-select`,38),H(`valueChange`,function(t){return C(e),w(W(2).selectPage(t))}),I()}if(e&2){let e=W(2);D(2),P(`options`,e.pageOptions())(`value`,e.page()?.pageId??null)}}function yP(e,t){if(e&1){let e=B();F(0,`button`,39),H(`click`,function(){return C(e),w(W(2).toggleDirectiveHosts())}),T(),F(1,`svg`,12),L(2,`path`,40)(3,`path`,41),I(),cs(),F(4,`span`,15),K(5,`Directive hosts`),I()()}e&2&&k(`aria-pressed`,W(2).showDirectiveHosts())}function bP(e,t){if(e&1){let e=B();F(0,`button`,42),H(`click`,function(){C(e);let t=W(2);return w(t.picking()?t.cancelPick():t.pick())}),T(),F(1,`svg`,12),L(2,`path`,43),I(),cs(),F(3,`span`,15),K(4),I()()}if(e&2){let e=W(2);G(`on`,e.picking()),k(`title`,e.pickLabel()),D(4),q(e.pickLabel())}}function xP(e,t){if(e&1&&(F(0,`p`,21),K(1),I()),e&2){let e=W(2);D(),q(e.pickMessage())}}function SP(e,t){if(e&1&&(F(0,`p`,22),K(1),I()),e&2){let e=W(2);D(),q(e.truncationText())}}function CP(e,t){e&1&&(F(0,`p`,45),K(1,`The filter only searches the components the tree lists.`),I())}function wP(e,t){e&1&&(F(0,`p`,45),K(1,`Directive hosts are hidden, so they are not searched.`),I())}function TP(e,t){if(e&1){let e=B();F(0,`div`,26)(1,`p`,44),K(2),I(),A(3,CP,2,0,`p`,45),A(4,wP,2,0,`p`,45),F(5,`button`,46),H(`click`,function(){return C(e),w(W(2).clearFilter())}),K(6,`Clear filters`),I()()}if(e&2){let e=W(2);D(2),J(`No components match “`,e.filter().trim(),`”`),D(),j(e.page().truncated?3:-1),D(),j(!e.showDirectiveHosts()&&e.page().directiveHostCount?4:-1)}}function EP(e,t){if(e&1&&(F(0,`p`,27),K(1),I()),e&2){let e=W(2);D(),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 DP(e,t){if(e&1){let e=B();F(0,`span`,54),H(`click`,function(t){C(e),W();let n=E_(0);return w(W(2).toggle(n.node.id,t))}),T(),F(1,`svg`,55),L(2,`path`,56),I()()}e&2&&(W(),G(`open`,E_(0).expanded))}function OP(e,t){e&1&&L(0,`span`,49)}function kP(e,t){if(e&1&&(F(0,`span`,57),K(1),I(),F(2,`span`,58),K(3),I(),F(4,`span`,25),K(5,`directive host`),I()),e&2){W();let e=E_(0),t=W(2);D(),J(`<`,e.node.tag,`>`),D(),k(`title`,e.node.directives?.join(`, `)),D(),q(t.hostLabel(e.node))}}function AP(e,t){if(e&1&&(F(0,`span`,59),K(1),I(),F(2,`span`,60),K(3),I()),e&2){W();let e=E_(0);k(`title`,e.node.name),D(),q(e.node.name),D(),k(`title`,`<`+e.node.tag+`>`),D(),J(`<`,e.node.tag,`>`)}}function jP(e,t){if(e&1&&(F(0,`span`)(1,`span`,25),K(2,`Hydration: `),I(),K(3),I()),e&2){let e=t,n=W(3);Zg(`hyd hyd-`+e),D(3),q(n.hydrationText(e))}}function MP(e,t){if(e&1&&(F(0,`span`,51),K(1),I()),e&2){let e=t.$implicit;D(),q(e.route||`/`)}}function NP(e,t){if(e&1&&(F(0,`span`,52),K(1),F(2,`span`,25),K(3),I()()),e&2){let e=t;D(),J(` `,e),D(2),J(` `,e===1?`check`:`checks`,` while recording`)}}function PP(e,t){if(e&1&&(F(0,`span`,53),K(1),F(2,`span`,25),K(3),I()()),e&2){W();let e=E_(0);k(`title`,e.node.directives.join(`, `)),D(),J(` +`,e.node.directives.length,` `),D(2),J(` `,e.node.directives.length===1?`directive`:`directives`,` `)}}function FP(e,t){if(e&1){let e=B();w_(0),F(1,`div`,47),H(`click`,function(){C(e);let t=E_(0);return w(W(2).select(t.node.id))})(`focus`,function(t){C(e);let n=E_(0),r=W(2);return r.focusId.set(n.node.id),r.highlight(n.node.id),w(r.showNameTip(t))})(`blur`,function(){C(e);let t=W(2);return t.highlight(null),w(t.nameTip.set(null))})(`keydown.escape`,function(){return C(e),w(W(2).nameTip.set(null))})(`mouseenter`,function(){C(e);let t=E_(0);return w(W(2).highlight(t.node.id))})(`mouseleave`,function(){return C(e),w(W(2).highlight(null))}),A(2,DP,3,2,`span`,48)(3,OP,1,0,`span`,49),A(4,kP,6,3)(5,AP,4,4),A(6,jP,4,3,`span`,50),M(7,MP,2,1,`span`,51,uP),A(9,NP,4,2,`span`,52),A(10,PP,4,3,`span`,53),I()}if(e&2){let e,n,r=t.$implicit,i=W(2),a=T_(r.row);D(),Xg(`--%NS%depth`,a.depth),G(`selected`,i.selectedId()===a.node.id)(`dir-host`,a.node.kind===`directive`),k(`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),D(),j(a.hasChildren?2:3),D(2),j(a.node.kind===`directive`?4:5),D(2),j((e=a.node.hydration)?6:-1,e),D(),N(i.routedById().get(a.node.id)??F_(20,oP)),D(2),j((n=i.cdHosts()[a.node.id])?9:-1,n),D(),j(a.node.kind!==`directive`&&a.node.directives?.length?10:-1)}}function IP(e,t){if(e&1&&(F(0,`div`,61),K(1),I()),e&2){let e=t;Xg(`top`,e.top,`px`),D(),J(` `,e.text,` `)}}function LP(e,t){if(e&1&&(F(0,`li`,69),K(1),ug(2,72),I()),e&2){let e=t.$implicit;W(3);let n=kg(3);D(),J(` `,e,` `),D(),P(`ngTemplateOutlet`,n)(`ngTemplateOutletContext`,I_(3,sP,e))}}function RP(e,t){if(e&1){let e=B();F(0,`div`,71)(1,`button`,46),H(`click`,function(){let t=C(e);return w(W(3).reveal(t.id,!0))}),K(2),I()()}e&2&&(D(2),J(` Show `,t.name,` `))}function zP(e,t){if(e&1&&(F(0,`section`,31)(1,`header`,62)(2,`span`,63),K(3,`directive host`),I(),F(4,`h2`,64),K(5),I(),F(6,`span`,65),K(7),I()(),F(8,`div`,66)(9,`h3`),K(10,` Directives `),F(11,`span`,67),K(12),I()(),F(13,`ul`,68),M(14,LP,3,5,`li`,69,dP),I()(),F(16,`div`,66)(17,`p`,70),K(18,` This element hosts directives but no component. Their inputs are bound in the template of the component that renders it. `),I(),A(19,RP,3,1,`div`,71),I()()),e&2){let e,n=t,r=W(2);D(5),J(`<`,n.tag,`>`),D(2),q(r.hostLabel(n)),D(5),q(n.directives?.length??0),D(2),N(n.directives??F_(4,oP)),D(5),j((e=r.ownerOf(n.id))?19:-1,e)}}function BP(e,t){if(e&1&&(F(0,`p`,73),L(1,`app-source-link`,77),I()),e&2){let e=t;D(),P(`file`,e.file)(`line`,e.line)}}function VP(e,t){if(e&1&&(F(0,`p`,78)(1,`span`,80),K(2,`Likely`),I(),F(3,`span`,25),K(4,`, matched by class name: `),I(),L(5,`app-source-link`,77),I()),e&2){W();let e=E_(0);P(`title`,W(3).guessTitle),D(5),P(`file`,e[0].file)(`line`,e[0].line)}}function HP(e,t){if(e&1&&(F(0,`li`),L(1,`app-source-link`,77),I()),e&2){let e=t.$implicit;D(),P(`file`,e.file)(`line`,e.line)}}function UP(e,t){if(e&1&&(F(0,`div`,79)(1,`p`,81)(2,`span`,80),K(3,`Not certain`),I(),K(4),I(),F(5,`ul`,82),M(6,HP,2,2,`li`,null,fP,!0),I()()),e&2){W();let e=E_(0),t=W(),n=W(2);P(`title`,n.guessTitle),D(4),Y(` `,e.length,` source files define `,n.bareName(t.name),`: `),D(2),N(e)}}function WP(e,t){if(e&1&&(w_(0),A(1,VP,6,3,`p`,78)(2,UP,8,3,`div`,79)),e&2){let e=W(),t=T_(W(2).sourceCandidates(e));D(),j(t.length===1?1:t.length>1?2:-1)}}function GP(e,t){if(e&1){let e=B();F(0,`div`,83)(1,`button`,46),H(`click`,function(){C(e);let t=W();return w(W(2).revealInElements(t))}),K(2,`Reveal in Elements`),I(),F(3,`button`,46),H(`click`,function(){C(e);let t=W();return w(W(2).openSource(t))}),K(4,`Open source`),I()(),F(5,`p`,84),K(6),I()}if(e&2){let e=W(3);D(6),q(e.actionMessage())}}function KP(e,t){if(e&1){let e=B();F(0,`button`,86),H(`click`,function(){let t=C(e).$implicit;return w(W(5).showForm.emit(t.formId))}),K(1),I()}if(e&2){let e=t.$implicit;D(),J(` Show `,e.label,` in Forms `)}}function qP(e,t){if(e&1&&(F(0,`div`,74),M(1,KP,2,1,`button`,85,pP),I()),e&2){let e=W(),t=W(3);D(),N(t.formsIn(e.file))}}function JP(e,t){e&1&&A(0,qP,3,0,`div`,74),e&2&&j(W(3).formsIn(t.file).length?0:-1)}function YP(e,t){if(e&1){let e=B();F(0,`button`,46),H(`click`,function(){C(e);let t=W(2);return w(W(2).openInjector(t))}),K(1,` Show in Injectors `),F(2,`span`,25),K(3),I()()}if(e&2){let e=W(2);D(3),J(`: `,e.name)}}function XP(e,t){if(e&1){let e=B();F(0,`button`,46),H(`click`,function(){C(e);let t=W(2);return w(W(2).openSignals(t))}),K(1,` Show in Signals `),F(2,`span`,25),K(3),I()()}if(e&2){let e=W(2);D(3),J(`: `,e.name)}}function ZP(e,t){if(e&1&&(F(0,`div`,74),A(1,YP,4,1,`button`,87),A(2,XP,4,1,`button`,87),I()),e&2){let e=W(3);D(),j(e.canShowInjector()?1:-1),D(),j(e.canShowSignals()?2:-1)}}function QP(e,t){if(e&1){let e=B();F(0,`div`,88)(1,`button`,46),H(`click`,function(){let t=C(e);return w(W(3).copyJson(t))}),K(2,`Copy as JSON`),I(),F(3,`button`,46),H(`click`,function(){let t=C(e);return w(W(3).copyHostPath(t))}),K(4,`Copy host path`),I()(),F(5,`p`,84),K(6),I()}if(e&2){let e=W(3);D(6),q(e.copyMessage())}}function $P(e,t){if(e&1&&L(0,`app-store-global`,75),e&2){let e=W(),t=W(2);P(`rpc`,t.rpc())(`pageId`,t.page()?.pageId)(`target`,I_(4,cP,e.id))(`label`,e.name)}}function eF(e,t){if(e&1&&(F(0,`dt`),K(1,`Routed`),I(),F(2,`dd`,90),K(3),I()),e&2){let e=t.$implicit;D(3),Y(``,e.route||`/`,` in outlet `,e.outlet)}}function tF(e,t){if(e&1&&(F(0,`span`,8),K(1),I()),e&2){let e=W(4);D(),Y(``,e.shownValues()?.count??0,` of `,e.valueTotal())}}function nF(e,t){if(e&1){let e=B();F(0,`div`,95)(1,`p`,44),K(2),I(),F(3,`p`,45),K(4,` The filter searches names, and the nested keys of values you opened. `),I(),F(5,`button`,46),H(`click`,function(){return C(e),w(W(5).clearPropFilter())}),K(6,`Clear filters`),I()()}if(e&2){let e=W(5);D(2),J(` No inputs, outputs or properties match “`,e.propFilter().trim(),`” `)}}function rF(e,t){if(e&1&&(F(0,`span`,100),K(1),I()),e&2){let e=W().$implicit;D(),J(`(`,e.prop,`)`)}}function iF(e,t){if(e&1&&(F(0,`li`,98)(1,`span`,99),K(2),A(3,rF,2,1,`span`,100),I(),L(4,`app-value-tree`,101),I()),e&2){let e=t.$implicit,n=W(4),r=W(3);G(`changed`,r.flashed(`input`,e.name)),D(2),J(` `,e.name,` `),D(),j(e.prop===e.name?-1:3),D(),P(`prop`,e)(`store`,r.values)(`query`,r.propFilter())(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function aF(e,t){if(e&1&&(F(0,`ul`,96),M(1,iF,5,11,`li`,97,hP),I()),e&2){let e=W(2);D(),N(e.inputs)}}function oF(e,t){e&1&&(F(0,`p`,70),K(1,`No inputs.`),I())}function sF(e,t){if(e&1&&(F(0,`div`,66)(1,`h3`),K(2,` Inputs `),F(3,`span`,67),K(4),I()(),A(5,aF,3,0,`ul`,96)(6,oF,2,0,`p`,70),I()),e&2){let e=W();D(4),q(e.inputs.length),D(),j(e.inputs.length?5:6)}}function cF(e,t){if(e&1&&(F(0,`li`,103)(1,`span`,90),K(2),I(),F(3,`span`,104),K(4),I()()),e&2){let e=t.$implicit;G(`on`,e.listened),D(2),q(e.name),D(2),q(e.listened?`listened`:`no listener`)}}function lF(e,t){if(e&1&&(F(0,`ul`,68),M(1,cF,5,4,`li`,102,hP),I()),e&2){let e=W(2);D(),N(e.outputs)}}function uF(e,t){e&1&&(F(0,`p`,70),K(1,`No outputs.`),I())}function dF(e,t){if(e&1&&(F(0,`div`,66)(1,`h3`),K(2,` Outputs `),F(3,`span`,67),K(4),I()(),A(5,lF,3,0,`ul`,68)(6,uF,2,0,`p`,70),I()),e&2){let e=W();D(4),q(e.outputs.length),D(),j(e.outputs.length?5:6)}}function fF(e,t){if(e&1&&(F(0,`span`,105),K(1),I()),e&2){let e=W().$implicit;D(),q(e.kind)}}function pF(e,t){if(e&1){let e=B();F(0,`button`,107),H(`click`,function(){C(e);let t=W().$implicit,n=W(5);return w(W(2).openSignals(n,t.prop))}),K(1,` Show in Signals`),F(2,`span`,25),K(3),I()()}if(e&2){let e=W().$implicit;D(3),J(`: `,e.name)}}function mF(e,t){if(e&1&&(F(0,`li`,98)(1,`span`,99),K(2),A(3,fF,2,1,`span`,105),A(4,pF,4,1,`button`,106),I(),L(5,`app-value-tree`,101),I()),e&2){let e=t.$implicit,n=W(4),r=W(3);G(`changed`,r.flashed(`property`,e.name)),D(2),J(` `,e.name,` `),D(),j(e.kind?3:-1),D(),j(e.kind===`signal`&&r.canShowSignals()&&!r.staticReport()?4:-1),D(),P(`prop`,e)(`store`,r.values)(`query`,r.propFilter())(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function hF(e,t){if(e&1&&(F(0,`ul`,96),M(1,mF,6,12,`li`,97,hP),I()),e&2){let e=W(2);D(),N(e.properties)}}function gF(e,t){e&1&&(F(0,`p`,70),K(1,`No other properties.`),I())}function _F(e,t){if(e&1&&(F(0,`div`,66)(1,`h3`),K(2,` Properties `),F(3,`span`,67),K(4),I()(),A(5,hF,3,0,`ul`,96)(6,gF,2,0,`p`,70),I()),e&2){let e=W();D(4),q(e.properties.length),D(),j(e.properties.length?5:6)}}function vF(e,t){if(e&1&&(F(0,`li`,69),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function yF(e,t){if(e&1&&(F(0,`div`,66)(1,`h3`),K(2,` DOM listeners `),F(3,`span`,67),K(4),I()(),F(5,`ul`,68),M(6,vF,2,1,`li`,69,Yh),I()()),e&2){let e=W(2);D(4),q(e.listeners.length),D(2),N(e.listeners)}}function bF(e,t){if(e&1&&(F(0,`li`,103)(1,`span`,90),K(2),I(),F(3,`span`,104),K(4),I()()),e&2){let e=t.$implicit;D(2),q(e.state),D(2),q(e.triggers.join(`, `)||`no triggers`)}}function xF(e,t){if(e&1&&(F(0,`div`,66)(1,`h3`),K(2,` Defer blocks `),F(3,`span`,67),K(4),I()(),F(5,`ul`,68),M(6,bF,5,2,`li`,103,gP),I()()),e&2){let e=W(5);D(4),q(e.ownedDeferBlocks().length),D(2),N(e.ownedDeferBlocks())}}function SF(e,t){if(e&1&&(F(0,`li`,98)(1,`span`,99),K(2),I(),L(3,`app-value-tree`,109),I()),e&2){let e=t.$implicit,n=W(2).$implicit,r=W(2),i=W(3);G(`changed`,i.flashed(`directive`,e.name,n.index)),D(2),q(e.name),D(),P(`prop`,e)(`store`,i.values)(`query`,i.propFilter())(`directive`,n.index)(`componentId`,r.id)(`pageId`,i.page()?.pageId??null)(`rpc`,i.rpc())}}function CF(e,t){if(e&1&&(F(0,`ul`,96),M(1,SF,4,10,`li`,97,hP),I()),e&2){let e=W().$implicit;D(),N(e.inputs)}}function wF(e,t){if(e&1&&(F(0,`li`,103)(1,`span`,90),K(2),I(),F(3,`span`,104),K(4),I()()),e&2){let e=t.$implicit;G(`on`,e.listened),D(2),q(e.name),D(2),q(e.listened?`listened`:`no listener`)}}function TF(e,t){if(e&1&&(F(0,`ul`,68),M(1,wF,5,4,`li`,102,hP),I()),e&2){let e=W().$implicit;D(),N(e.outputs)}}function EF(e,t){e&1&&(F(0,`p`,70),K(1,`No inputs or outputs.`),I())}function DF(e,t){if(e&1&&(F(0,`div`,66)(1,`h3`)(2,`span`,90),K(3),I(),F(4,`span`,105),K(5,`directive on host`),I()(),F(6,`p`,108),ug(7,72),I(),A(8,CF,3,0,`ul`,96),A(9,TF,3,0,`ul`,68),A(10,EF,2,0,`p`,70),I()),e&2){let e=t.$implicit;W(5);let n=kg(3);D(3),q(e.name),D(4),P(`ngTemplateOutlet`,n)(`ngTemplateOutletContext`,I_(6,sP,e.name)),D(),j(e.inputs.length?8:-1),D(),j(e.outputs.length?9:-1),D(),j(!e.inputs.length&&!e.outputs.length?10:-1)}}function OF(e,t){if(e&1&&(A(0,nF,7,1,`div`,95),A(1,sF,7,2,`div`,66),A(2,dF,7,2,`div`,66),A(3,_F,7,2,`div`,66),A(4,yF,8,1,`div`,66),A(5,xF,8,1,`div`,66),M(6,DF,11,8,`div`,66,mP)),e&2){let e=t,n=W(),r=W(3);j(r.propQuery()&&!e.count?0:-1),D(),j(!r.propQuery()||e.inputs.length?1:-1),D(),j(!r.propQuery()||e.outputs.length?2:-1),D(),j(!r.propQuery()||e.properties.length?3:-1),D(),j(!r.propQuery()&&n.listeners.length?4:-1),D(),j(!r.propQuery()&&r.ownedDeferBlocks().length?5:-1),D(),N(e.directives)}}function kF(e,t){if(e&1&&(F(0,`span`,105),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function AF(e,t){if(e&1&&(F(0,`span`,112),K(1,`from `),F(2,`span`,90),K(3),I()()),e&2){let e=W().$implicit;D(3),q(e.providedByName??`an injector`)}}function jF(e,t){e&1&&(F(0,`span`,113),K(1,`not provided`),I())}function MF(e,t){if(e&1&&(F(0,`li`,110)(1,`span`,111),K(2),I(),M(3,kF,2,1,`span`,105,Yh),A(5,AF,4,1,`span`,112)(6,jF,2,0,`span`,113),I()),e&2){let e=t.$implicit;D(2),q(e.token),D(),N(e.flags),D(2),j(e.providedBy?5:6)}}function NF(e,t){if(e&1&&(F(0,`ul`,93),M(1,MF,7,2,`li`,110,_P),I()),e&2){let e=W();D(),N(e.dependencies)}}function PF(e,t){e&1&&(F(0,`p`,70),K(1,`Nothing is injected through the constructor or inject().`),I())}function FF(e,t){if(e&1){let e=B();F(0,`app-component-pipes`,114),H(`showPipe`,function(t){return C(e),w(W(4).showPipe.emit(t))}),I()}if(e&2){let e=W(2),t=W(2);P(`rpc`,t.rpc())(`pageId`,t.page()?.pageId)(`component`,t.bareName(e.name))(`canShowPipes`,!t.staticReport())}}function IF(e,t){if(e&1){let e=B();F(0,`dl`,89)(1,`dt`),K(2,`Change detection`),I(),F(3,`dd`),K(4),I(),F(5,`dt`),K(6,`Encapsulation`),I(),F(7,`dd`),K(8),I(),F(9,`dt`),K(10,`Host path`),I(),F(11,`dd`,90),K(12),I(),M(13,eF,4,2,null,null,uP),I(),F(15,`div`,91)(16,`app-search-field`,92,3),S_(`valueChange`,function(t){C(e);let n=W(3);return x_(n.propFilter,t)||(n.propFilter=t),w(t)}),I(),A(18,tF,2,2,`span`,8),F(19,`p`,20),K(20),I()(),A(21,OF,8,6),F(22,`div`,66)(23,`h3`),K(24,` Injected `),F(25,`span`,67),K(26),I()(),A(27,NF,3,0,`ul`,93)(28,PF,2,0,`p`,70),I(),A(29,FF,1,4,`app-component-pipes`,94)}if(e&2){let e,n=t,r=W(),i=W(2);D(4),q(n.changeDetection??`Unknown`),D(4),q(n.encapsulation??`Unknown`),D(4),q(n.path),D(),N(i.routedById().get(r.id)??F_(10,oP)),D(3),b_(`value`,i.propFilter),D(2),j(i.propQuery()?18:-1),D(2),q(i.propFilterStatus()),D(),j((e=i.shownValues())?21:-1,e),D(5),q(n.dependencies.length),D(),j(n.dependencies.length?27:28),D(2),j(i.canShowPipes()?29:-1)}}function LF(e,t){e&1&&(F(0,`div`,76),L(1,`span`,115),F(2,`p`,45),K(3,`Reading live values from the page…`),I()())}function RF(e,t){if(e&1&&(F(0,`section`,31)(1,`header`,62)(2,`span`,63),K(3,`component`),I(),F(4,`h2`,64),K(5),I(),F(6,`span`,65),K(7),I(),A(8,BP,2,2,`p`,73)(9,WP,3,2),A(10,GP,7,1),A(11,JP,1,1),A(12,ZP,3,2,`div`,74),A(13,QP,7,1),A(14,$P,1,6,`app-store-global`,75),I(),A(15,IF,30,11)(16,LF,4,0,`div`,76),I()),e&2){let e,n,r,i,a=t,o=W(2);D(5),q(a.name),D(2),J(`<`,a.tag,`>`),D(),j((e=o.detail()?.source)?8:9,e),D(2),j(o.devtoolsActions()?10:-1),D(),j((n=o.sourceFor(a))?11:-1,n),D(),j((o.canShowInjector()||o.canShowSignals())&&!o.staticReport()?12:-1),D(),j((r=o.detail())?13:-1,r),D(),j(!o.staticReport()&&!o.native()?14:-1),D(),j((i=o.detail())?15:16,i)}}function zF(e,t){e&1&&(F(0,`p`,44),K(1,`The selected component was destroyed`),I(),F(2,`p`,45)(3,`span`,90),K(4),I(),K(5,` is no longer on the page. Select another component to see its live values. `),I()),e&2&&(D(4),q(t))}function BF(e,t){e&1&&(F(0,`p`,45),K(1,` Select a component to see its live inputs, properties, outputs, change detection and injected services. `),I())}function VF(e,t){if(e&1&&(F(0,`div`,32),A(1,zF,6,1)(2,BF,2,0,`p`,45),I()),e&2){let e,t=W(2);D(),j((e=t.destroyed())?1:2,e)}}function HF(e,t){e&1&&L(0,`app-angular-unavailable`,34),e&2&&P(`page`,W(2).angularPage())}function UF(e,t){if(e&1){let e=B();F(0,`app-hydration-section`,116),H(`overlay`,function(t){return C(e),w(W(2).setHydrationOverlay(t))})(`showNode`,function(t){return C(e),w(W(2).revealNode(t))})(`highlight`,function(t){return C(e),w(W(2).highlight(t))}),I()}e&2&&P(`report`,W(2).page()?.hydration)}function WF(e,t){if(e&1){let e=B();F(0,`app-cd-recording`,117),H(`showComponent`,function(t){return C(e),w(W(2).showCdComponent(t))}),I(),F(1,`app-leaks-section`,118),H(`showComponent`,function(t){return C(e),w(W(2).showLeakComponent(t))})(`highlight`,function(t){return C(e),w(W(2).highlight(t))}),I()}if(e&2){let e=W(2);P(`page`,e.cdPage())(`pageId`,e.page().pageId)(`rpc`,e.rpc())(`native`,e.native()),D(),P(`report`,e.leaksPage())(`pageId`,e.page().pageId)(`rpc`,e.rpc())(`angular`,e.angularPage())}}function GF(e,t){if(e&1){let e=B();F(0,`p`,4),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. `),I(),F(2,`div`,5)(3,`app-search-field`,6,1),H(`valueChange`,function(t){return C(e),w(W().setFilter(t))}),I(),F(5,`span`,7),K(6,` Type plain text, a tag such as <button>, or a directive such as [routerLink]. Combine them to narrow the tree. `),I(),A(7,vP,3,2),F(8,`span`,8),K(9),I(),F(10,`div`,9),A(11,yP,6,1,`button`,10),F(12,`button`,11),H(`click`,function(){return C(e),w(W().expandAll())}),T(),F(13,`svg`,12),L(14,`path`,13)(15,`path`,14),I(),cs(),F(16,`span`,15),K(17,`Expand all`),I()(),F(18,`button`,16),H(`click`,function(){return C(e),w(W().collapseAll())}),T(),F(19,`svg`,12),L(20,`path`,17)(21,`path`,18),I(),cs(),F(22,`span`,15),K(23,`Collapse all`),I()(),A(24,bP,5,4,`button`,19),I()(),F(25,`p`,20),K(26),I(),A(27,xP,2,1,`p`,21),A(28,SP,2,1,`p`,22),F(29,`div`,23)(30,`div`,24)(31,`h2`,25),K(32,`Component tree`),I(),A(33,TP,7,3,`div`,26),A(34,EP,2,1,`p`,27),F(35,`div`,28,2),H(`keydown`,function(t){return C(e),w(W().onTreeKey(t))}),M(37,FP,11,21,`div`,29,lP),I(),A(39,IP,2,3,`div`,30),I(),A(40,zP,20,5,`section`,31)(41,RF,17,9,`section`,31)(42,VF,3,1,`div`,32),I(),F(43,`app-defer-blocks`,33),H(`showOwner`,function(t){return C(e),w(W().showOwner(t))})(`showNode`,function(t){return C(e),w(W().revealNode(t))})(`highlight`,function(t){C(e);let n=W();return w(t?n.highlightBlock(t):n.highlight(null))}),I(),A(44,HF,1,1,`app-angular-unavailable`,34),A(45,UF,1,1,`app-hydration-section`,35),F(46,`app-for-blocks`,36),H(`showOwner`,function(t){return C(e),w(W().showForOwner(t))})(`highlight`,function(t){return C(e),w(W().highlight(t))}),I(),A(47,WF,2,8)}if(e&2){let e,t,n=W();D(3),P(`value`,n.filter()),D(4),j(n.pageOptions().length>1?7:-1),D(2),q(n.countLabel()),D(2),j(n.page().directiveHostCount?11:-1),D(),P(`disabled`,!!n.filter().trim()),D(6),P(`disabled`,!!n.filter().trim()),D(6),j(n.native()?-1:24),D(2),q(n.announcement()),D(),j(n.pickMessage()?27:-1),D(),j(n.page().truncated?28:-1),D(5),j(n.rows().length?-1:33),D(),j(n.rowWindow.enabled()?34:-1),D(),Xg(`padding-top`,n.rowWindow.enabled()?6+n.rowWindow.padTop():null,`px`)(`padding-bottom`,n.rowWindow.enabled()?6+n.rowWindow.padBottom():null,`px`),G(`windowed`,n.rowWindow.enabled()),P(`hidden`,!n.rows().length),D(2),N(n.shownRows()),D(2),j((e=n.nameTip())?39:-1,e),D(),j((t=n.selectedHost())?40:(t=n.selectedNode())?41:42,t),D(3),P(`blocks`,n.deferBlocks())(`truncated`,n.page()?.deferTruncated===!0)(`clockOffset`,n.page()?.clockOffset??0)(`mismatches`,n.page()?.hydration?.mismatches??F_(32,oP)),D(),j(n.deferUnavailable()?44:-1),D(),j(n.native()?-1:45),D(),P(`blocks`,n.page()?.forBlocks)(`truncated`,n.page()?.forBlocksTruncated===!0)(`supported`,n.page()?.deferBlocks&&!n.page()?.forBlocks||n.forUnavailable()?!1:null)(`angular`,n.angularPage()),D(),j(n.staticReport()?-1:47)}}function KF(e,t){e&1&&(F(0,`p`,22),K(1,` The page reported no component instances. The live tree needs a development build with Angular's debug API. Showing what the source declares instead. `),I())}function qF(e,t){e&1&&(F(0,`p`,22),K(1,`Loading the live component tree…`),I())}function JF(e,t){e&1&&(F(0,`p`,119),K(1,` No page is connected, so this lists what the source declares. Open the app in a browser with the devtools connected to see each rendered instance. `),I())}function YF(e,t){if(e&1&&K(0),e&2){let e=W(3);Y(` `,e.filteredSource().length,` of `,e.source().length,` `)}}function XF(e,t){if(e&1&&K(0),e&2){let e=W(3);v_(` `,e.sourceCounts().components,` `,e.sourceCounts().components===1?`component`:`components`,` · `,e.sourceCounts().directives,` `,e.sourceCounts().directives===1?`directive`:`directives`,` `)}}function ZF(e,t){if(e&1&&(F(0,`span`,121),A(1,YF,1,2)(2,XF,1,4),I()),e&2){let e=W(2);D(),j(e.filter().trim()?1:2)}}function QF(e,t){e&1&&(F(0,`div`,125),L(1,`span`,115),F(2,`p`,44),K(3,`Scanning components…`),I()())}function $F(e,t){e&1&&(K(0,` Run `),F(1,`code`),K(2,`pangular build`),I(),K(3,` again to rebuild the report. `))}function eI(e,t){e&1&&K(0,` Check that the dev server is running, then try again. `)}function tI(e,t){if(e&1){let e=B();F(0,`div`,126)(1,`p`,44),K(2,`Could not load components`),I(),F(3,`p`,45),A(4,$F,4,0)(5,eI,1,0),I(),F(6,`button`,46),H(`click`,function(){return C(e),w(W(2).refresh())}),K(7,`Retry`),I()()}if(e&2){let e=W(2);D(4),j(e.staticReport()?4:5)}}function nI(e,t){e&1&&(F(0,`div`,127)(1,`p`,44),K(2,`No components found`),I(),F(3,`p`,45),K(4,`No @Component or @Directive was found in the source.`),I()())}function rI(e,t){if(e&1){let e=B();F(0,`div`,127)(1,`p`,44),K(2),I(),F(3,`button`,46),H(`click`,function(){return C(e),w(W(2).clearFilter())}),K(4,`Clear filters`),I()()}if(e&2){let e=W(2);D(2),J(`No components match “`,e.filter().trim(),`”`)}}function iI(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,W(3).bareName(e.className),` · `)}}function aI(e,t){if(e&1&&(F(0,`dt`),K(1,`Change detection`),I(),F(2,`dd`),K(3),I()),e&2){let e=W(2).$implicit;D(3),q(e.changeDetection??`Unknown`)}}function oI(e,t){if(e&1){let e=B();F(0,`button`,86),H(`click`,function(){let t=C(e).$implicit;return w(W(5).showForm.emit(t.formId))}),K(1),I()}if(e&2){let e=t.$implicit;D(),J(` Show `,e.label,` in Forms `)}}function sI(e,t){if(e&1&&(F(0,`div`,137)(1,`dl`,89)(2,`dt`),K(3,`Class`),I(),F(4,`dd`,90),K(5),I(),F(6,`dt`),K(7,`File`),I(),F(8,`dd`,90),L(9,`app-source-link`,77),I(),F(10,`dt`),K(11,`Standalone`),I(),F(12,`dd`),K(13),I(),A(14,aI,4,1),F(15,`dt`),K(16,`Inputs`),I(),F(17,`dd`,90),K(18),I(),F(19,`dt`),K(20,`Outputs`),I(),F(21,`dd`,90),K(22),I()(),M(23,oI,2,1,`button`,85,pP),I()),e&2){let e=W(),t=e.$implicit,n=e.$index,r=W(3);P(`id`,`ct-source-`+n),D(5),q(r.bareName(t.className)),D(4),P(`file`,t.file)(`line`,t.line),D(4),q(t.isStandalone?`Yes`:`No`),D(),j(t.kind===`component`?14:-1),D(4),q(t.inputs.join(`, `)||`None`),D(4),q(t.outputs.join(`, `)||`None`),D(),N(r.formsIn(t.file))}}function cI(e,t){if(e&1){let e=B();F(0,`li`,130)(1,`button`,131),H(`click`,function(){let t=C(e).$implicit,n=W(3);return w(n.openKey.set(n.openKey()===n.sourceKey(t)?null:n.sourceKey(t)))}),F(2,`span`,132),K(3),I(),F(4,`span`,133)(5,`span`,134),K(6),I(),F(7,`span`,135),A(8,iI,1,1),K(9),I()(),T(),F(10,`svg`,136),L(11,`path`,56),I()(),A(12,sI,25,8,`div`,137),I()}if(e&2){let e=t.$implicit,n=t.$index,r=W(3);G(`expanded`,r.openKey()===r.sourceKey(e)),D(),k(`aria-expanded`,r.openKey()===r.sourceKey(e))(`aria-controls`,r.openKey()===r.sourceKey(e)?`ct-source-`+n:null),D(),G(`directive`,e.kind===`directive`),D(),q(e.kind),D(3),q(r.sourceLabel(e)),D(2),j(e.selector?8:-1),D(),Y(` `,e.file,`:`,e.line,` `),D(3),j(r.openKey()===r.sourceKey(e)?12:-1)}}function lI(e,t){if(e&1&&(F(0,`ul`,128),M(1,cI,13,12,`li`,129,fP,!0),I()),e&2){let e=W(2);D(),N(e.filteredSource())}}function uI(e,t){if(e&1){let e=B();A(0,KF,2,0,`p`,22)(1,qF,2,0,`p`,22)(2,JF,2,0,`p`,119),F(3,`div`,5)(4,`app-search-field`,120,1),S_(`valueChange`,function(t){C(e);let n=W();return x_(n.filter,t)||(n.filter=t),w(t)}),I(),A(6,ZF,3,1,`span`,121),F(7,`button`,122),H(`click`,function(){return C(e),w(W().refresh())}),T(),F(8,`svg`,12),L(9,`path`,123)(10,`path`,124),I(),K(11,` Refresh `),I()(),A(12,QF,4,0,`div`,125)(13,tI,8,1,`div`,126)(14,nI,5,0,`div`,127)(15,rI,5,1,`div`,127)(16,lI,3,0,`ul`,128)}if(e&2){let e=W();j(e.page()?0:e.pagesKnown()?2:1),D(4),b_(`value`,e.filter),D(2),j(e.source().length?6:-1),D(),G(`spinning`,e.loading()),k(`aria-busy`,e.loading()),D(5),j(e.loading()&&!e.source().length?12:e.error()&&!e.source().length?13:e.source().length?e.filteredSource().length?16:15:14)}}function dI(e,t){if(e&1&&(F(0,`span`,138)(1,`span`,80),K(2,`Likely`),I(),F(3,`span`,25),K(4,`, matched by class name: `),I(),L(5,`app-source-link`,77),I()),e&2){W();let e=E_(0);P(`title`,W().guessTitle),D(5),P(`file`,e[0].file)(`line`,e[0].line)}}function fI(e,t){if(e&1&&(F(0,`span`,139),K(1),I()),e&2){let e=W().$implicit,t=E_(0),n=W();P(`title`,n.guessTitle),D(),Y(``,t.length,` source files define `,n.bareName(e))}}function pI(e,t){if(e&1&&(w_(0),A(1,dI,6,3,`span`,138)(2,fI,2,3,`span`,139)),e&2){let e=t.$implicit,n=T_(W().directiveSources(e));D(),j(n.length===1?1:n.length>1?2:-1)}}var mI=32;function hI(e){return e.replace(/^_(?=[A-Z])/,``)}function gI(e,t){let n=e=>e.replace(/\\/g,`/`).replace(/^\.\//,``),[r,i]=[n(e),n(t)];return r===i||r.endsWith(`/`+i)||i.endsWith(`/`+r)}function _I(e,t){let n=[],r=new Set([t]);for(let i=e.get(t);i&&!r.has(i);i=e.get(i))r.add(i),n.push(i);return n}var vI={ArrowDown:`next`,ArrowUp:`previous`,ArrowLeft:`parent`,ArrowRight:`child`,Enter:`pick`},yI=`pangular:components:directive-hosts`;function bI(){try{return localStorage.getItem(yI)!==`hidden`}catch{return!0}}var xI=class e{rpc=$(null);staticReport=X(()=>yT(this.rpc()));focus=$(null);showForm=Q_();focusHandled=Q_();command=$(null);commandHandled=Q_();canShowInjector=$(!1);canShowPipes=$(!1);showPipe=Q_();showInjector=Q_();canShowSignals=$(!1);showSignals=Q_();filter=E(``);loading=E(!1);error=E(!1);source=E([]);formOwners=E([]);pages=E({});chosenPageId=E(null);selectedId=E(null);destroyed=E(null);announcement=E(``);picking=E(!1);pickMessage=E(``);pickPageId=null;pickSeq=0;focusId=E(null);nameTip=E(null);pickLabel=X(()=>this.picking()?`Cancel pick`:`Pick component on page`);bridge=S(WE);actionMessage=Q({source:this.selectedId,computation:()=>``});copyMessage=Q({source:this.selectedId,computation:()=>``});flash=new pj;collapsed=E(new Set);showDirectiveHosts=E(bI());openKey=E(null);routerPages=E([]);pageId=fT();angularPages=uD(()=>this.rpc());angularPage=X(()=>dD(this.angularPages(),this.page()?.pageId??this.pageId));hasControlFlow=X(()=>{let e=this.angularPage()?.version;return!e||nT(e,`17.0`)});deferUnavailable=X(()=>this.hasControlFlow()&&rT(this.angularPage(),`deferBlocks`));forUnavailable=X(()=>this.hasControlFlow()&&rT(this.angularPage(),`forBlocks`));destroyRef=S(vs);injector=S(gs);host=S(kl);filterInput=av(`filterInput`);cdRecording=av(aj);pagesKnown=E(!1);cleanups=[];selection={pageId:null,detailId:null};shownPageId=Q({source:()=>({pages:this.pages(),chosen:this.chosenPageId()}),computation:({pages:e,chosen:t},n)=>pT(e,{chosen:t,host:this.pageId,previous:n?.value??null})});page=X(()=>{let e=this.shownPageId();return e?this.pages()[e]??null:null});pageOptions=X(()=>Object.values(this.pages()).map(e=>({value:e.pageId,label:e.title||e.url||`Page ${e.pageId}`,hint:e.url})));live=X(()=>(this.page()?.roots.length??0)>0);native=X(()=>_D(this.page()));canEdit=X(()=>this.live()&&!this.native()&&!this.staticReport()&&IT(this.rpc(),`components`));devtoolsActions=X(()=>this.bridge.available&&!!this.page()&&!this.native()&&!this.staticReport());cdPages=E({});cdPage=X(()=>{let e=this.page()?.pageId;return e?this.cdPages()[e]??null:null});cdHosts=X(()=>this.cdPage()?.hosts??{});leaksPages=E({});leaksPage=X(()=>{let e=this.page()?.pageId;return e?this.leaksPages()[e]??null:null});visibleRoots=X(()=>{let e=this.page()?.roots??[];return this.showDirectiveHosts()||!this.page()?.directiveHostCount?e:AD(e)});index=X(()=>{let e=new Map,t=new Map,n=(r,i)=>{for(let a of r)e.has(a.id)||(e.set(a.id,a),i&&t.set(a.id,i),n(a.children,a.id))};return n(this.visibleRoots(),null),{map:e,parents:t}});query=X(()=>this.filter().trim().toLowerCase());filtered=X(()=>kD(this.visibleRoots(),this.query()));shownDirectiveHosts=X(()=>this.showDirectiveHosts()?this.page()?.directiveHostCount??0:0);deferBlocks=X(()=>this.page()?.deferBlocks??[]);ownedDeferBlocks=X(()=>{let e=this.selectedId();return e?this.deferBlocks().filter(t=>t.owner?.id===e):[]});countLabel=X(()=>PD(this.page()?.count??0,this.filtered().matches,!!this.query(),!!this.page()?.truncated,this.shownDirectiveHosts()));truncationText=X(()=>ID(this.page()?.truncatedBy));rows=X(()=>{let e=[],t=this.collapsed(),n=!!this.query(),r=(i,a)=>{i.forEach((o,s)=>{let c=n||!t.has(o.id);e.push({node:o,depth:a,hasChildren:o.children.length>0,expanded:c,posinset:s+1,setsize:i.length}),c&&r(o.children,a+1)})};return r(this.filtered().nodes,0),e});rowWindow=new HN({count:X(()=>this.rows().length),estimate:mI,fixed:!0});shownRows=X(()=>{let{start:e,end:t}=this.rowWindow.range();return this.rows().slice(e,t).map((t,n)=>({row:t,index:e+n}))});tabStop=X(()=>{let e=this.rovingId(),t=this.shownRows();return t.some(({row:t})=>t.node.id===e)?e:t[0]?.row.node.id??null});treeEl=av(`treeEl`);selectedNode=X(()=>{let e=this.selectedId();return e?this.index().map.get(e)??null:null});selectedHost=X(()=>{let e=this.selectedNode();return e?.kind===`directive`?e:null});detail=X(()=>{let e=this.page()?.detail;return e&&e.id===this.selectedId()?e:null});values=new xM;propFilter=E(``);propQuery=X(()=>this.propFilter().trim().toLowerCase());propFilterInput=av(`propFilterInput`);shownValues=X(()=>{let e=this.detail();if(!e)return null;let t=this.propQuery(),n=e=>!t||e.name.toLowerCase().includes(t)||e.prop.toLowerCase().includes(t),r=(e,r)=>n(e)||rM([e.prop],e.value,e=>this.values.level(e,r),t,1).length>0,i=e.inputs.filter(e=>r(e)),a=e.outputs.filter(n),o=(e.properties??[]).filter(e=>r(e)),s=e.directives.map((e,t)=>({...e,index:t,inputs:e.inputs.filter(e=>r(e,t)),outputs:e.outputs.filter(n)})).filter(e=>!t||e.inputs.length||e.outputs.length);return{inputs:i,outputs:a,properties:o,directives:s,count:i.length+a.length+o.length+s.reduce((e,t)=>e+t.inputs.length+t.outputs.length,0)}});valueTotal=X(()=>{let e=this.detail();return e?e.inputs.length+e.outputs.length+(e.properties?.length??0)+e.directives.reduce((e,t)=>e+t.inputs.length+t.outputs.length,0):0});propFilterStatus=X(()=>{if(!this.propQuery())return``;let e=this.shownValues()?.count??0;return e?`${e} of ${this.valueTotal()} values match.`:`No inputs, outputs or properties match.`});clearPropFilter(e){e&&this.propFilter()&&(e.stopPropagation(),e.preventDefault()),this.propFilter.set(``),this.propFilterInput()?.focus()}rovingId=X(()=>{let e=this.rows(),t=new Set(e.map(e=>e.node.id)),n=this.focusId();if(n&&t.has(n))return n;let r=this.selectedId();return r&&t.has(r)?r:e[0]?.node.id??null});outlets=X(()=>{let e=this.page()?.pageId;return this.routerPages().find(t=>t.pageId===e)?.outlets??[]});routedById=X(()=>{let e=new Map,t=n=>{for(let r of n){if(r.activated&&r.devtoolsId){let t=e.get(r.devtoolsId)??[];t.push({route:r.route??``,outlet:r.outlet}),e.set(r.devtoolsId,t)}r.children&&t(r.children)}};return t(this.outlets()),e});sourceByClass=X(()=>{let e=new Map;for(let t of this.source()){let n=hI(t.className);e.set(n,[...e.get(n)??[],t])}return e});filteredSource=X(()=>{let e=this.query(),t=this.source();return e?t.filter(t=>t.selector.toLowerCase().includes(e)||t.className.toLowerCase().includes(e)||t.file.toLowerCase().includes(e)):t});sourceCounts=X(()=>{let e=this.source().filter(e=>e.kind===`component`).length;return{components:e,directives:this.source().length-e}});constructor(){ac(()=>{let e=this.treeEl()?.nativeElement;e&&this.rowWindow.attach(e)}),ac(()=>{let e=this.detail(),t={rpc:this.rpc(),pageId:this.page()?.pageId??null,componentId:e?.id??null};Z(()=>this.values.follow(t,e?.expanded))}),ac(()=>{let e=this.page()?.pageId??null;Z(()=>{this.picking()&&e!==this.pickPageId&&this.dropPick()})}),ac(()=>{let e=this.detail(),t=e?`${this.page()?.pageId??``}|${e.id}`:null,n=new Map;for(let t of e?.inputs??[])n.set(mj(`input`,t.name),t.value);for(let t of e?.properties??[])n.set(mj(`property`,t.name),t.value);e?.directives.forEach((e,t)=>{for(let r of e.inputs)n.set(mj(`directive`,r.name,t),r.value)}),Z(()=>this.flash.update(t,n))}),this.destroyRef.onDestroy(()=>this.flash.clear()),ac(()=>{let e=this.rpc();e&&(this.refresh(),this.watch(e))}),ac(()=>{let e=this.focus();if(!e)return;let t=this.page()?.pageId??null;if(e.pageId&&t!==e.pageId&&this.pages()[e.pageId]){Z(()=>this.selectPage(e.pageId));return}this.live()&&Z(()=>{(!e.pageId||t===e.pageId)&&this.index().map.has(e.id)?this.reveal(e.id):this.announcement.set(`That component is no longer on the page.`),this.focusHandled.emit()})}),ac(()=>{let e=this.command();if(!e)return;if(!this.live()){this.pagesKnown()&&Z(()=>this.commandHandled.emit());return}if(e.kind===`pick`){Z(()=>{this.native()?this.say(`Picking needs a page in a browser.`):this.picking()||this.pick(),this.commandHandled.emit()});return}let t=this.cdRecording();if(!t){(this.native()||this.staticReport())&&Z(()=>{this.say(`This page cannot record change detection.`),this.commandHandled.emit()});return}Z(()=>{e.kind===`cd-clear`?t.clear():e.kind===`cd-start`!==t.recording()&&t.toggle(),this.commandHandled.emit()})}),this.destroyRef.onDestroy(()=>{this.highlight(null);for(let e of this.cleanups.splice(0))e()})}async watch(e){for(let e of this.cleanups.splice(0))e();let t=e.scope(`pangular`);try{let e=await t.rpc.sharedState(`component-tree`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e?.pages;this.applyPages(t&&typeof t==`object`?t:{}),e!==void 0&&this.pagesKnown.set(!0)};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.applyPages({}),this.pagesKnown.set(!0)}try{let e=await t.rpc.sharedState(`change-detection`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e?.pages;this.cdPages.set(t&&typeof t==`object`?t:{})};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.cdPages.set({})}try{let e=await t.rpc.sharedState(`leaks`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e?.pages;this.leaksPages.set(t&&typeof t==`object`?t:{})};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.leaksPages.set({})}try{let e=await t.rpc.sharedState(`router`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e?.pages;this.routerPages.set(Array.isArray(t)?t:[])};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.routerPages.set([])}}async refresh(){let e=this.rpc();if(!e)return;this.loading.set(!0);let t=e.scope(`pangular`);try{this.source.set(await t.rpc.call(`get-components`)),this.error.set(!1)}catch{this.error.set(!0)}finally{this.loading.set(!1)}let n=await t.rpc.call(`forms-owners`).catch(()=>[]);this.formOwners.set(n??[])}formsIn(e){return this.formOwners().filter(t=>t.file===e)}whereOf(e){let t=this.detail()?.source;if(t)return t;let n=this.sourceCandidates(e);return n.length===1?n[0]:null}async revealInElements(e){let t=this.page()?.pageId;if(!t)return;this.actionMessage.set(``);let n=await this.bridge.reveal(t,e.id);this.selectedId()===e.id&&this.actionMessage.set(n.ok?``:`Could not reveal it. The component must be rendered in the tab these DevTools inspect.`)}flashed(e,t,n){return this.flash.changed().has(mj(e,t,n))}openSignals(e,t){let n=this.page()?.pageId;this.showSignals.emit({componentId:e.id,...n?{pageId:n}:{},...t?{key:t}:{}})}async copyJson(e){await this.copy(e.id,cj(e),`Copied ${e.name} as JSON.`)}async copyHostPath(e){await this.copy(e.id,lj(e),e.selector?`Copied the host selector.`:`Copied the host path.`)}async copy(e,t,n){let r=n;try{await navigator.clipboard.writeText(t)}catch{r=`The clipboard is not available here.`}this.selectedId()===e&&this.copyMessage.set(r)}openInjector(e){let t=this.page()?.pageId;this.showInjector.emit(t?{componentId:e.id,pageId:t}:{componentId:e.id})}async openSource(e){let t=this.page()?.pageId;if(!t)return;let n=this.whereOf(e);this.actionMessage.set(``);let r=await this.bridge.openSource(t,e.id,n);this.selectedId()===e.id&&(r.ok||this.actionMessage.set(n?`Not found in Sources. Open ${n.file}:${n.line} in your editor.`:`Could not open the source. The component must be rendered in the tab these DevTools inspect.`))}guessTitle=`The page gave no exact location. This comes from the source scan, matched by class name.`;sourceCandidates(e){let t=(this.sourceByClass().get(hI(e.name))??[]).filter(e=>e.kind===`component`),n=t.filter(t=>t.selector===e.tag);return n.length?n:t}sourceFor(e){let t=this.sourceCandidates(e),n=this.detail()?.source;return n?t.find(e=>gI(e.file,n.file))??null:t.length===1?t[0]:null}directiveSources(e){return(this.sourceByClass().get(hI(e))??[]).filter(e=>e.kind===`directive`)}sourceKey(e){return`${e.file}#${e.className}`}sourceLabel(e){return e.selector?e.kind===`component`&&/^[a-z][\w-]*$/i.test(e.selector)?`<${e.selector}>`:e.selector:hI(e.className)}bareName(e){return hI(e)}applyPages(e){let t=document.activeElement,n=t instanceof HTMLElement&&this.host.nativeElement.contains(t)?t.closest(`.row`)?.dataset.id??null:null,r=n?this.rows().map(e=>e.node.id):[],i=this.index().map;if(this.pages.set(e),this.syncSelection(i),!n)return;let a=new Set(this.rows().map(e=>e.node.id));if(a.has(n))return;let o=zD(r,a,n);o&&(this.focusId.set(o),ed(()=>this.rowElement(o)?.focus(),{injector:this.injector}))}syncSelection(e=this.index().map){let t=this.page(),n=LD({...this.selection,selectedId:this.selectedId()},t?{pageId:t.pageId,roots:t.roots,detail:t.detail,truncated:t.truncated}:null),r=n.destroyed?e.get(n.destroyed)?.name:void 0;this.selection={pageId:n.pageId,detailId:n.detailId},n.selectedId!==this.selectedId()&&this.selectedId.set(n.selectedId),n.selectedId&&this.destroyed.set(null),n.destroyed&&(this.destroyed.set(r??`The component`),this.announcement.set(`The selected component was destroyed.`),this.sendSelection(null))}selectPage(e){e&&(this.chosenPageId.set(e),this.destroyed.set(null),this.syncSelection())}setFilter(e){this.filter.set(e);let{matches:t}=this.filtered();this.announcement.set(FD(this.page()?.count??0,t,e,!!this.page()?.truncated,this.shownDirectiveHosts()))}clearFilter(){this.live()?this.setFilter(``):this.filter.set(``),this.filterInput()?.focus()}async pick(){let e=this.rpc();if(!e||this.picking())return;let t=++this.pickSeq;this.pickPageId=this.page()?.pageId??null,this.picking.set(!0),this.say(`Click a component in the app, or use the arrow keys to move between components and Enter to pick one. Press Escape to cancel.`);let n=await e.scope(`pangular`).rpc.call(`request-component-pick`,{pageId:this.pickPageId??void 0}).catch(()=>({ok:!1,error:`Could not reach the devtools server.`}));if(t===this.pickSeq){if(this.picking.set(!1),!n?.ok||!n.id){this.say(n?.error??`No component was picked.`);return}n.pageId&&n.pageId!==this.page()?.pageId&&this.selectPage(n.pageId),this.say(`Picked ${n.name??`a component`}.`),this.destroyed.set(null),this.index().map.has(n.id)?this.reveal(n.id):this.selectedId.set(n.id)}}pickKey(e){let t=vI[e.key];if(!this.picking()||!t||e.altKey||e.ctrlKey||e.metaKey)return;e.preventDefault();let n=this.rpc();if(!n)return;let r=this.pickSeq;n.scope(`pangular`).rpc.call(`request-component-pick-move`,{pageId:this.pickPageId??void 0,key:t}).then(e=>{let n=e;r===this.pickSeq&&this.picking()&&t!==`pick`&&this.say(n?.moved?`${n.name??`Component`} <${n.tag??``}>. Press Enter to pick it.`:n?.error??`The page did not move.`)}).catch(()=>{})}cancelPick(){let e=this.rpc();e&&this.picking()&&e.scope(`pangular`).rpc.call(`cancel-component-pick`,{pageId:this.pickPageId??void 0}).catch(()=>{})}dropPick(){this.cancelPick(),this.pickSeq++,this.picking.set(!1),this.say(`Picking stopped because the page changed.`)}say(e){this.pickMessage.set(e),this.announcement.set(e)}sendSelection(e){let t=this.rpc();t&&t.scope(`pangular`).rpc.call(`select-component`,{pageId:this.page()?.pageId,id:e,console:!0}).catch(()=>{})}rowElement(e){return this.host.nativeElement.querySelector(`.row[data-id="${CSS.escape(e)}"]`)}select(e){let t=this.selectedId()===e?null:e;this.selectedId.set(t),this.destroyed.set(null),this.focusId.set(e),!(t&&this.index().map.get(t)?.kind===`directive`)&&this.sendSelection(t)}hostLabel(e){return jD(e)}hydrationText(e){return ND(e)}ownerOf(e){let{map:t,parents:n}=this.index();for(let r of _I(n,e)){let e=t.get(r);if(e&&e.kind!==`directive`)return e}return null}toggleDirectiveHosts(){let e=!this.showDirectiveHosts();this.showDirectiveHosts.set(e);try{localStorage.setItem(yI,e?`shown`:`hidden`)}catch{}let t=this.selectedId();!e&&t&&!this.index().map.has(t)&&this.selectedId.set(null),this.announce(e?`Directive hosts are shown.`:`Directive hosts are hidden.`)}setHydrationOverlay(e){let t=this.rpc(),n=this.page()?.pageId;t&&n&&(t.scope(`pangular`).rpc.call(`request-hydration-overlay`,{pageId:n,on:e}).catch(()=>{}),this.announce(e?`Outlining hydration on the page.`:`Hydration outline removed.`))}revealNode(e){this.index().map.has(e)&&this.reveal(e)}showLeakComponent(e){this.index().map.has(e)&&this.reveal(e,!0)}reveal(e,t=!1){let{parents:n}=this.index();this.collapsed.update(t=>{let r=new Set(t);for(let t of _I(n,e))r.delete(t);return r}),this.rows().some(t=>t.node.id===e)||this.setFilter(``),this.selectedId()!==e&&this.select(e),t&&this.focusId.set(e);let r=this.rows().findIndex(t=>t.node.id===e);r>=0&&this.rowWindow.reveal(r),ed(()=>{let n=document.querySelector(`.row[data-id="${CSS.escape(e)}"]`);this.clearToolbar(),n?.scrollIntoView({block:`nearest`}),n&&this.keepBelowToolbar(n),t&&n?.focus({preventScroll:!0})},{injector:this.injector})}clearToolbar(){let e=this.host.nativeElement.querySelector(`.toolbar`);e&&this.host.nativeElement.style.setProperty(`--ct-toolbar-clearance`,`${GN(e)}px`)}keepBelowToolbar(e){let t=this.host.nativeElement.querySelector(`.toolbar`);t&&KN(e,t)}toggle(e,t){t?.stopPropagation(),!this.query()&&this.collapsed.update(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}expandAll(){this.query()||(this.collapsed.set(new Set),this.announce(`Expanded every component.`))}collapseAll(){if(this.query())return;let{map:e,parents:t}=this.index(),n=this.rovingId(),r=new Set;for(let t of e.values())t.children.length&&r.add(t.id);if(this.collapsed.set(r),n){let e=new Set(this.rows().map(e=>e.node.id)),r=n;for(;r&&!e.has(r);)r=t.get(r);r&&this.focusId.set(r)}this.announce(`Collapsed every component. Only the top level is shown.`)}announce(e){this.announcement.update(t=>t===e?`${e}\u00a0`:e)}expandSiblings(e){if(this.query())return;let t=this.index().parents.get(e),n=t?this.index().map.get(t)?.children??[]:this.page()?.roots??[];this.collapsed.update(e=>{let t=new Set(e);for(let e of n)t.delete(e.id);return t})}showNameTip(e){let t=e.currentTarget,n=Array.from(t.querySelectorAll(`.name, .tag, .host-dirs`));if(!n.some(e=>e.scrollWidth>e.clientWidth+1)){this.nameTip.set(null);return}let r=n.map(e=>e.title||e.textContent?.trim()).join(` `);this.nameTip.set({text:r,top:t.offsetTop+t.offsetHeight+2})}highlight(e){this.requestHighlight(e?{id:e}:null)}highlightBlock(e){e.rootIds.length>1?this.requestHighlight({ids:e.rootIds}):this.highlight(e.rootIds[0]??e.owner?.id??null)}requestHighlight(e){let t=this.rpc();t&&t.scope(`pangular`).rpc.call(`request-page-highlight`,e&&{pageId:this.page()?.pageId,...e}).catch(()=>{})}showOwner(e){e.owner&&this.index().map.has(e.owner.id)&&this.reveal(e.owner.id)}showCdComponent(e){let t=this.cdHosts(),n=null;for(let r of this.index().map.values())r.name===e&&(!n||(t[r.id]??0)>(t[n.id]??0))&&(n=r);if(!n){this.say(`No ${e} is in the tree now.`);return}this.say(`Showing ${e} in the tree.`),this.reveal(n.id)}showForOwner(e){e.owner&&this.index().map.has(e.owner.id)&&this.reveal(e.owner.id)}onTreeKey(e){let t=this.rows();if(!t.length)return;let n=t.findIndex(e=>e.node.id===this.rovingId()),r=Math.max(n,0),i=t[r],a=-1;switch(e.key){case`ArrowDown`:a=Math.min(r+1,t.length-1);break;case`ArrowUp`:a=Math.max(r-1,0);break;case`Home`:a=0;break;case`End`:a=t.length-1;break;case`ArrowRight`:i.hasChildren&&!i.expanded?this.toggle(i.node.id):i.hasChildren&&(a=r+1);break;case`ArrowLeft`:if(i.hasChildren&&i.expanded&&!this.query())this.toggle(i.node.id);else{let e=this.index().parents.get(i.node.id);a=t.findIndex(t=>t.node.id===e)}break;case`Enter`:case` `:this.select(i.node.id);break;case`*`:this.expandSiblings(i.node.id);break;default:return}if(e.preventDefault(),a>=0){let e=t[a].node.id;this.focusId.set(e);let n=()=>{let t=document.querySelector(`.row[data-id="${CSS.escape(e)}"]`);this.clearToolbar(),t?.focus({preventScroll:!0}),t?.scrollIntoView({block:`nearest`}),t&&this.keepBelowToolbar(t)};this.rowWindow.rendered(a)?queueMicrotask(n):this.rowWindow.reveal(a,n)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-component-tree`]],viewQuery:function(e,t){e&1&&Dg(t.filterInput,rP,5)(t.cdRecording,aj,5)(t.treeEl,iP,5)(t.propFilterInput,aP,5),e&2&&Og(4)},hostBindings:function(e,t){e&1&&H(`keydown.escape`,function(){return t.cancelPick()})(`keydown`,function(e){return t.pickKey(e)})},inputs:{rpc:[1,`rpc`],focus:[1,`focus`],command:[1,`command`],canShowInjector:[1,`canShowInjector`],canShowPipes:[1,`canShowPipes`],canShowSignals:[1,`canShowSignals`]},outputs:{showForm:`showForm`,focusHandled:`focusHandled`,commandHandled:`commandHandled`,showPipe:`showPipe`,showInjector:`showInjector`,showSignals:`showSignals`},decls:4,vars:1,consts:[[`directiveSource`,``],[`filterInput`,``],[`treeEl`,``],[`propFilterInput`,``],[1,`intro`],[1,`toolbar`],[`placeholder`,`Filter by text, <tag> or [directive]`,`describedBy`,`ct-filter-hint`,`saveKey`,`components`,1,`search`,3,`valueChange`,`value`],[`id`,`ct-filter-hint`,1,`sr-only`],[1,`count`],[1,`tree-actions`],[`type`,`button`,`title`,`Directive hosts`,1,`tree-action`],[`type`,`button`,`title`,`Expand all`,1,`tree-action`,3,`click`,`disabled`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`m7 15 5 5 5-5`],[`d`,`m7 9 5-5 5 5`],[1,`label`],[`type`,`button`,`title`,`Collapse all`,1,`tree-action`,3,`click`,`disabled`],[`d`,`m7 20 5-5 5 5`],[`d`,`m7 4 5 5 5-5`],[`type`,`button`,1,`pick`,3,`on`],[`role`,`status`,1,`sr-only`],[1,`pick-message`],[`role`,`status`,1,`notice`],[1,`layout`],[1,`tree-col`],[1,`sr-only`],[1,`state`,`compact`,`tree`],[1,`window-note`],[`role`,`tree`,`aria-label`,`Component instances`,1,`tree`,3,`keydown`,`hidden`],[`role`,`treeitem`,1,`row`,3,`selected`,`dir-host`,`--%NS%depth`],[`aria-hidden`,`true`,1,`name-tip`,`mono`,3,`top`],[`aria-labelledby`,`ct-detail-title`,1,`detail`],[1,`detail`,`placeholder`],[3,`showOwner`,`showNode`,`highlight`,`blocks`,`truncated`,`clockOffset`,`mismatches`],[`capability`,`deferBlocks`,`compact`,``,1,`defer`,3,`page`],[3,`report`],[3,`showOwner`,`highlight`,`blocks`,`truncated`,`supported`,`angular`],[`id`,`ct-page-label`,1,`sr-only`],[`labelledBy`,`ct-page-label`,1,`page-select`,3,`valueChange`,`options`,`value`],[`type`,`button`,`title`,`Directive hosts`,1,`tree-action`,3,`click`],[`d`,`M8 4H5v16h3`],[`d`,`M16 4h3v16h-3`],[`type`,`button`,1,`pick`,3,`click`],[`d`,`M4 4l6.5 16 2.3-6.7L19.5 11z`],[1,`state-title`],[1,`state-hint`],[`type`,`button`,3,`click`],[`role`,`treeitem`,1,`row`,3,`click`,`focus`,`blur`,`keydown.escape`,`mouseenter`,`mouseleave`],[`aria-hidden`,`true`,1,`twisty`,3,`open`],[`aria-hidden`,`true`,1,`twisty-space`],[3,`class`],[1,`routed`],[1,`checks`],[1,`dirs`],[`aria-hidden`,`true`,1,`twisty`,3,`click`],[`viewBox`,`0 0 24 24`],[`d`,`m9 6 6 6-6 6`],[1,`tag`,`host-tag`,`mono`],[1,`host-dirs`,`mono`],[1,`name`,`mono`],[1,`tag`,`mono`],[`aria-hidden`,`true`,1,`name-tip`,`mono`],[1,`detail-head`],[1,`badge`],[`id`,`ct-detail-title`,1,`mono`],[1,`mono`,`muted`],[1,`block`],[1,`pill`],[1,`chips`],[1,`chip`,`mono`],[1,`empty-line`],[1,`actions`,`owner-action`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[1,`where`,`mono`],[1,`actions`],[1,`console-global`,3,`rpc`,`pageId`,`target`,`label`],[`role`,`status`,1,`state`,`compact`],[3,`file`,`line`],[1,`where`,`mono`,`guess`,3,`title`],[1,`where`,`guess`,3,`title`],[1,`likely`],[1,`guess-text`],[1,`guess-list`,`mono`],[`role`,`group`,`aria-label`,`Chrome DevTools`,1,`actions`],[`role`,`status`,1,`where`,`action-message`],[`type`,`button`,1,`show-form`],[`type`,`button`,1,`show-form`,3,`click`],[`type`,`button`],[`role`,`group`,`aria-label`,`Copy`,1,`actions`],[1,`facts`],[1,`mono`],[1,`prop-filter`],[`label`,`Filter values`,`placeholder`,`Filter inputs, outputs and properties by name`,1,`search`,3,`valueChange`,`value`],[1,`deps`],[3,`rpc`,`pageId`,`component`,`canShowPipes`],[1,`state`,`compact`],[1,`props`],[1,`prop`,3,`changed`],[1,`prop`],[1,`prop-name`,`mono`],[1,`muted`],[3,`prop`,`store`,`query`,`componentId`,`pageId`,`rpc`,`writes`],[1,`chip`,3,`on`],[1,`chip`],[1,`chip-note`],[1,`flag`],[`type`,`button`,1,`signal-link`],[`type`,`button`,1,`signal-link`,3,`click`],[1,`directive-where`,`mono`],[3,`prop`,`store`,`query`,`directive`,`componentId`,`pageId`,`rpc`],[1,`dep`],[1,`token`,`mono`],[1,`from`],[1,`from`,`missing`],[3,`showPipe`,`rpc`,`pageId`,`component`,`canShowPipes`],[`aria-hidden`,`true`,1,`spinner`],[3,`overlay`,`showNode`,`highlight`,`report`],[3,`showComponent`,`page`,`pageId`,`rpc`,`native`],[3,`showComponent`,`highlight`,`report`,`pageId`,`rpc`,`angular`],[1,`notice`],[`placeholder`,`Filter by selector, class or file`,`saveKey`,`components-source`,1,`search`,3,`valueChange`,`value`],[`aria-live`,`polite`,1,`count`],[`type`,`button`,1,`refresh`,3,`click`],[`d`,`M20 12a8 8 0 1 1-2.34-5.66`],[`d`,`M20 4v5h-5`],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[1,`state`],[`role`,`list`,1,`source-list`],[1,`source-item`,3,`expanded`],[1,`source-item`],[`type`,`button`,1,`source-toggle`,3,`click`],[1,`kind-flag`],[1,`row-main`],[1,`selector`,`mono`],[1,`file`,`mono`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[1,`inline-detail`,3,`id`],[1,`directive-guess`,3,`title`],[1,`chip-note`,3,`title`]],template:function(e,t){e&1&&(A(0,GF,48,33)(1,uI,17,7),Eh(2,pI,3,2,`ng-template`,null,0,G_)),e&2&&j(+!t.live())},dependencies:[nP,Vv,OD,aj,Cj,yM,EM,XM,sN,ZD,RN,hD,cD],styles:[`[_nghost-%COMP%] { +}`]})},rP=[`[redacted]`,`[email]`],iP=2e4;function aP(e){let t=0;for(let n of rP)for(let r=e.indexOf(n);r>=0;r=e.indexOf(n,r+n.length))t++;return t}function oP(e,t=iP){let n=0,r=t,i=new Set,a=[e];for(;a.length;){let e=a.pop();if(typeof e==`string`){if(--r<0)return{count:n,capped:!0};n+=aP(e);continue}if(typeof e==`object`&&e&&!i.has(e)){if(i.add(e),Array.isArray(e)){for(let t of e)a.push(t);continue}for(let[t,i]of Object.entries(e)){if(--r<0)return{count:n,capped:!0};n+=aP(t),a.push(i)}}}return{count:n,capped:!1}}function sP(e,t){if(e&1&&(R(0,`p`,0),K(1),R(2,`span`,1),K(3),z()()),e&2){let e=W();D(),y_(` `,e.result().capped?`At least `:``,``,e.result().count,` `,e.result().count===1?`value`:`values`,` masked `),D(2),q(e.why())}}var cP=class e{value=$(void 0);why=$(`by redaction (secret names, tokens and emails).`);result=X(()=>oP(this.value()));static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-redaction-count`]],inputs:{value:[1,`value`],why:[1,`why`]},decls:1,vars:1,consts:[[`data-redaction-count`,``,1,`count`],[1,`why`]],template:function(e,t){e&1&&A(0,sP,4,4,`p`,0),e&2&&j(t.result().count>0?0:-1)},styles:[`[_nghost-%COMP%] { + display: block; +} + +.count[_ngcontent-%COMP%] { + margin: 0 0 8px; + color: var(--%NS%text-2); + font-size: 12px; + line-height: 1.5; + font-variant-numeric: tabular-nums; +} + +.why[_ngcontent-%COMP%] { + color: var(--%NS%text-2); +}`]})},lP=[`filterInput`],uP=[`treeEl`],dP=[`propFilterInput`],fP=()=>[],pP=e=>({$implicit:e}),mP=e=>({kind:`component`,id:e}),hP=(e,t)=>t.row.node.id,gP=(e,t)=>t.outlet+t.route,_P=(e,t)=>t+e;function vP(e,t){return this.sourceKey(t)}var yP=(e,t)=>t.formId,bP=(e,t)=>t.name+t.index,xP=(e,t)=>t.name,SP=(e,t)=>t.id,CP=(e,t)=>t.token+e;function wP(e,t){if(e&1){let e=B();F(0,`span`,38),K(1,`Page`),I(),F(2,`app-select`,39),H(`valueChange`,function(t){return C(e),w(W(2).selectPage(t))}),I()}if(e&2){let e=W(2);D(2),P(`options`,e.pageOptions())(`value`,e.page()?.pageId??null)}}function TP(e,t){if(e&1){let e=B();F(0,`button`,40),H(`click`,function(){return C(e),w(W(2).toggleDirectiveHosts())}),T(),F(1,`svg`,12),L(2,`path`,41)(3,`path`,42),I(),cs(),F(4,`span`,15),K(5,`Directive hosts`),I()()}e&2&&k(`aria-pressed`,W(2).showDirectiveHosts())}function EP(e,t){if(e&1&&(F(0,`p`,22),K(1),I()),e&2){let e=W(2);D(),q(e.pickMessage())}}function DP(e,t){if(e&1&&(F(0,`p`,23),K(1),I()),e&2){let e=W(2);D(),q(e.truncationText())}}function OP(e,t){e&1&&(F(0,`p`,44),K(1,`The filter only searches the components the tree lists.`),I())}function kP(e,t){e&1&&(F(0,`p`,44),K(1,`Directive hosts are hidden, so they are not searched.`),I())}function AP(e,t){if(e&1){let e=B();F(0,`div`,27)(1,`p`,43),K(2),I(),A(3,OP,2,0,`p`,44),A(4,kP,2,0,`p`,44),F(5,`button`,45),H(`click`,function(){return C(e),w(W(2).clearFilter())}),K(6,`Clear filters`),I()()}if(e&2){let e=W(2);D(2),J(`No components match “`,e.filter().trim(),`”`),D(),j(e.page().truncated?3:-1),D(),j(!e.showDirectiveHosts()&&e.page().directiveHostCount?4:-1)}}function jP(e,t){if(e&1&&(F(0,`p`,28),K(1),I()),e&2){let e=W(2);D(),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 MP(e,t){if(e&1){let e=B();F(0,`span`,53),H(`click`,function(t){C(e),W();let n=O_(0);return w(W(2).toggle(n.node.id,t))}),T(),F(1,`svg`,54),L(2,`path`,55),I()()}e&2&&(W(),G(`open`,O_(0).expanded))}function NP(e,t){e&1&&L(0,`span`,48)}function PP(e,t){if(e&1&&(F(0,`span`,56),K(1),I(),F(2,`span`,57),K(3),I(),F(4,`span`,26),K(5,`directive host`),I()),e&2){W();let e=O_(0),t=W(2);D(),J(`<`,e.node.tag,`>`),D(),k(`title`,e.node.directives?.join(`, `)),D(),q(t.hostLabel(e.node))}}function FP(e,t){if(e&1&&(F(0,`span`,58),K(1),I(),F(2,`span`,59),K(3),I()),e&2){W();let e=O_(0);k(`title`,e.node.name),D(),q(e.node.name),D(),k(`title`,`<`+e.node.tag+`>`),D(),J(`<`,e.node.tag,`>`)}}function IP(e,t){if(e&1&&(F(0,`span`)(1,`span`,26),K(2,`Hydration: `),I(),K(3),I()),e&2){let e=t,n=W(3);Qg(`hyd hyd-`+e),D(3),q(n.hydrationText(e))}}function LP(e,t){if(e&1&&(F(0,`span`,50),K(1),I()),e&2){let e=t.$implicit;D(),q(e.route||`/`)}}function RP(e,t){if(e&1&&(F(0,`span`,51),K(1),F(2,`span`,26),K(3),I()()),e&2){let e=t;D(),J(` `,e),D(2),J(` `,e===1?`check`:`checks`,` while recording`)}}function zP(e,t){if(e&1&&(F(0,`span`,52),K(1),F(2,`span`,26),K(3),I()()),e&2){W();let e=O_(0);k(`title`,e.node.directives.join(`, `)),D(),J(` +`,e.node.directives.length,` `),D(2),J(` `,e.node.directives.length===1?`directive`:`directives`,` `)}}function BP(e,t){if(e&1){let e=B();E_(0),F(1,`div`,46),H(`click`,function(){C(e);let t=O_(0);return w(W(2).select(t.node.id))})(`focus`,function(t){C(e);let n=O_(0),r=W(2);return r.focusId.set(n.node.id),r.highlight(n.node.id),w(r.showNameTip(t))})(`blur`,function(){C(e);let t=W(2);return t.highlight(null),w(t.nameTip.set(null))})(`keydown.escape`,function(){return C(e),w(W(2).nameTip.set(null))})(`mouseenter`,function(){C(e);let t=O_(0);return w(W(2).highlight(t.node.id))})(`mouseleave`,function(){return C(e),w(W(2).highlight(null))}),A(2,MP,3,2,`span`,47)(3,NP,1,0,`span`,48),A(4,PP,6,3)(5,FP,4,4),A(6,IP,4,3,`span`,49),M(7,LP,2,1,`span`,50,gP),A(9,RP,4,2,`span`,51),A(10,zP,4,3,`span`,52),I()}if(e&2){let e,n,r=t.$implicit,i=W(2),a=D_(r.row);D(),Zg(`--%NS%depth`,a.depth),G(`selected`,i.selectedId()===a.node.id)(`dir-host`,a.node.kind===`directive`),k(`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),D(),j(a.hasChildren?2:3),D(2),j(a.node.kind===`directive`?4:5),D(2),j((e=a.node.hydration)?6:-1,e),D(),N(i.routedById().get(a.node.id)??L_(20,fP)),D(2),j((n=i.cdHosts()[a.node.id])?9:-1,n),D(),j(a.node.kind!==`directive`&&a.node.directives?.length?10:-1)}}function VP(e,t){if(e&1&&(F(0,`div`,60),K(1),I()),e&2){let e=t;Zg(`top`,e.top,`px`),D(),J(` `,e.text,` `)}}function HP(e,t){if(e&1&&(F(0,`li`,68),K(1),dg(2,71),I()),e&2){let e=t.$implicit;W(3);let n=Ag(3);D(),J(` `,e,` `),D(),P(`ngTemplateOutlet`,n)(`ngTemplateOutletContext`,R_(3,pP,e))}}function UP(e,t){if(e&1){let e=B();F(0,`div`,70)(1,`button`,45),H(`click`,function(){let t=C(e);return w(W(3).reveal(t.id,!0))}),K(2),I()()}e&2&&(D(2),J(` Show `,t.name,` `))}function WP(e,t){if(e&1&&(F(0,`section`,32)(1,`header`,61)(2,`span`,62),K(3,`directive host`),I(),F(4,`h2`,63),K(5),I(),F(6,`span`,64),K(7),I()(),F(8,`div`,65)(9,`h3`),K(10,` Directives `),F(11,`span`,66),K(12),I()(),F(13,`ul`,67),M(14,HP,3,5,`li`,68,_P),I()(),F(16,`div`,65)(17,`p`,69),K(18,` This element hosts directives but no component. Their inputs are bound in the template of the component that renders it. `),I(),A(19,UP,3,1,`div`,70),I()()),e&2){let e,n=t,r=W(2);D(5),J(`<`,n.tag,`>`),D(2),q(r.hostLabel(n)),D(5),q(n.directives?.length??0),D(2),N(n.directives??L_(4,fP)),D(5),j((e=r.ownerOf(n.id))?19:-1,e)}}function GP(e,t){if(e&1&&(F(0,`p`,72),L(1,`app-source-link`,76),I()),e&2){let e=t;D(),P(`file`,e.file)(`line`,e.line)}}function KP(e,t){if(e&1&&(F(0,`p`,77)(1,`span`,79),K(2,`Likely`),I(),F(3,`span`,26),K(4,`, matched by class name: `),I(),L(5,`app-source-link`,76),I()),e&2){W();let e=O_(0);P(`title`,W(3).guessTitle),D(5),P(`file`,e[0].file)(`line`,e[0].line)}}function qP(e,t){if(e&1&&(F(0,`li`),L(1,`app-source-link`,76),I()),e&2){let e=t.$implicit;D(),P(`file`,e.file)(`line`,e.line)}}function JP(e,t){if(e&1&&(F(0,`div`,78)(1,`p`,80)(2,`span`,79),K(3,`Not certain`),I(),K(4),I(),F(5,`ul`,81),M(6,qP,2,2,`li`,null,vP,!0),I()()),e&2){W();let e=O_(0),t=W(),n=W(2);P(`title`,n.guessTitle),D(4),Y(` `,e.length,` source files define `,n.bareName(t.name),`: `),D(2),N(e)}}function YP(e,t){if(e&1&&(E_(0),A(1,KP,6,3,`p`,77)(2,JP,8,3,`div`,78)),e&2){let e=W(),t=D_(W(2).sourceCandidates(e));D(),j(t.length===1?1:t.length>1?2:-1)}}function XP(e,t){if(e&1){let e=B();F(0,`div`,82)(1,`button`,45),H(`click`,function(){C(e);let t=W();return w(W(2).revealInElements(t))}),K(2,`Reveal in Elements`),I(),F(3,`button`,45),H(`click`,function(){C(e);let t=W();return w(W(2).openSource(t))}),K(4,`Open source`),I()(),F(5,`p`,83),K(6),I()}if(e&2){let e=W(3);D(6),q(e.actionMessage())}}function ZP(e,t){if(e&1){let e=B();F(0,`button`,85),H(`click`,function(){let t=C(e).$implicit;return w(W(5).showForm.emit(t.formId))}),K(1),I()}if(e&2){let e=t.$implicit;D(),J(` Show `,e.label,` in Forms `)}}function QP(e,t){if(e&1&&(F(0,`div`,73),M(1,ZP,2,1,`button`,84,yP),I()),e&2){let e=W(),t=W(3);D(),N(t.formsIn(e.file))}}function $P(e,t){e&1&&A(0,QP,3,0,`div`,73),e&2&&j(W(3).formsIn(t.file).length?0:-1)}function eF(e,t){if(e&1){let e=B();F(0,`button`,45),H(`click`,function(){C(e);let t=W(2);return w(W(2).openInjector(t))}),K(1,` Show in Injectors `),F(2,`span`,26),K(3),I()()}if(e&2){let e=W(2);D(3),J(`: `,e.name)}}function tF(e,t){if(e&1){let e=B();F(0,`button`,45),H(`click`,function(){C(e);let t=W(2);return w(W(2).openSignals(t))}),K(1,` Show in Signals `),F(2,`span`,26),K(3),I()()}if(e&2){let e=W(2);D(3),J(`: `,e.name)}}function nF(e,t){if(e&1&&(F(0,`div`,73),A(1,eF,4,1,`button`,86),A(2,tF,4,1,`button`,86),I()),e&2){let e=W(3);D(),j(e.canShowInjector()?1:-1),D(),j(e.canShowSignals()?2:-1)}}function rF(e,t){if(e&1){let e=B();F(0,`div`,87)(1,`button`,45),H(`click`,function(){let t=C(e);return w(W(3).copyJson(t))}),K(2,`Copy as JSON`),I(),F(3,`button`,45),H(`click`,function(){let t=C(e);return w(W(3).copyHostPath(t))}),K(4,`Copy host path`),I()(),F(5,`p`,83),K(6),I()}if(e&2){let e=W(3);D(6),q(e.copyMessage())}}function iF(e,t){if(e&1&&L(0,`app-store-global`,74),e&2){let e=W(),t=W(2);P(`rpc`,t.rpc())(`pageId`,t.page()?.pageId)(`target`,R_(4,mP,e.id))(`label`,e.name)}}function aF(e,t){if(e&1&&(F(0,`dt`),K(1,`Routed`),I(),F(2,`dd`,89),K(3),I()),e&2){let e=t.$implicit;D(3),Y(``,e.route||`/`,` in outlet `,e.outlet)}}function oF(e,t){if(e&1&&(F(0,`span`,8),K(1),I()),e&2){let e=W(4);D(),Y(``,e.shownValues()?.count??0,` of `,e.valueTotal())}}function sF(e,t){if(e&1){let e=B();F(0,`div`,95)(1,`p`,43),K(2),I(),F(3,`p`,44),K(4,` The filter searches names, and the nested keys of values you opened. `),I(),F(5,`button`,45),H(`click`,function(){return C(e),w(W(5).clearPropFilter())}),K(6,`Clear filters`),I()()}if(e&2){let e=W(5);D(2),J(` No inputs, outputs or properties match “`,e.propFilter().trim(),`” `)}}function cF(e,t){if(e&1&&(F(0,`span`,100),K(1),I()),e&2){let e=W().$implicit;D(),J(`(`,e.prop,`)`)}}function lF(e,t){if(e&1&&(F(0,`li`,98)(1,`span`,99),K(2),A(3,cF,2,1,`span`,100),I(),L(4,`app-value-tree`,101),I()),e&2){let e=t.$implicit,n=W(4),r=W(3);G(`changed`,r.flashed(`input`,e.name)),D(2),J(` `,e.name,` `),D(),j(e.prop===e.name?-1:3),D(),P(`prop`,e)(`store`,r.values)(`query`,r.propFilter())(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function uF(e,t){if(e&1&&(F(0,`ul`,96),M(1,lF,5,11,`li`,97,xP),I()),e&2){let e=W(2);D(),N(e.inputs)}}function dF(e,t){e&1&&(F(0,`p`,69),K(1,`No inputs.`),I())}function fF(e,t){if(e&1&&(F(0,`div`,65)(1,`h3`),K(2,` Inputs `),F(3,`span`,66),K(4),I()(),A(5,uF,3,0,`ul`,96)(6,dF,2,0,`p`,69),I()),e&2){let e=W();D(4),q(e.inputs.length),D(),j(e.inputs.length?5:6)}}function pF(e,t){if(e&1&&(F(0,`li`,103)(1,`span`,89),K(2),I(),F(3,`span`,104),K(4),I()()),e&2){let e=t.$implicit;G(`on`,e.listened),D(2),q(e.name),D(2),q(e.listened?`listened`:`no listener`)}}function mF(e,t){if(e&1&&(F(0,`ul`,67),M(1,pF,5,4,`li`,102,xP),I()),e&2){let e=W(2);D(),N(e.outputs)}}function hF(e,t){e&1&&(F(0,`p`,69),K(1,`No outputs.`),I())}function gF(e,t){if(e&1&&(F(0,`div`,65)(1,`h3`),K(2,` Outputs `),F(3,`span`,66),K(4),I()(),A(5,mF,3,0,`ul`,67)(6,hF,2,0,`p`,69),I()),e&2){let e=W();D(4),q(e.outputs.length),D(),j(e.outputs.length?5:6)}}function _F(e,t){if(e&1&&(F(0,`span`,105),K(1),I()),e&2){let e=W().$implicit;D(),q(e.kind)}}function vF(e,t){if(e&1){let e=B();F(0,`button`,107),H(`click`,function(){C(e);let t=W().$implicit,n=W(5);return w(W(2).openSignals(n,t.prop))}),K(1,` Show in Signals`),F(2,`span`,26),K(3),I()()}if(e&2){let e=W().$implicit;D(3),J(`: `,e.name)}}function yF(e,t){if(e&1&&(F(0,`li`,98)(1,`span`,99),K(2),A(3,_F,2,1,`span`,105),A(4,vF,4,1,`button`,106),I(),L(5,`app-value-tree`,101),I()),e&2){let e=t.$implicit,n=W(4),r=W(3);G(`changed`,r.flashed(`property`,e.name)),D(2),J(` `,e.name,` `),D(),j(e.kind?3:-1),D(),j(e.kind===`signal`&&r.canShowSignals()&&!r.staticReport()?4:-1),D(),P(`prop`,e)(`store`,r.values)(`query`,r.propFilter())(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function bF(e,t){if(e&1&&(F(0,`ul`,96),M(1,yF,6,12,`li`,97,xP),I()),e&2){let e=W(2);D(),N(e.properties)}}function xF(e,t){e&1&&(F(0,`p`,69),K(1,`No other properties.`),I())}function SF(e,t){if(e&1&&(F(0,`div`,65)(1,`h3`),K(2,` Properties `),F(3,`span`,66),K(4),I()(),A(5,bF,3,0,`ul`,96)(6,xF,2,0,`p`,69),I()),e&2){let e=W();D(4),q(e.properties.length),D(),j(e.properties.length?5:6)}}function CF(e,t){if(e&1&&(F(0,`li`,68),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function wF(e,t){if(e&1&&(F(0,`div`,65)(1,`h3`),K(2,` DOM listeners `),F(3,`span`,66),K(4),I()(),F(5,`ul`,67),M(6,CF,2,1,`li`,68,Xh),I()()),e&2){let e=W(2);D(4),q(e.listeners.length),D(2),N(e.listeners)}}function TF(e,t){if(e&1&&(F(0,`li`,103)(1,`span`,89),K(2),I(),F(3,`span`,104),K(4),I()()),e&2){let e=t.$implicit;D(2),q(e.state),D(2),q(e.triggers.join(`, `)||`no triggers`)}}function EF(e,t){if(e&1&&(F(0,`div`,65)(1,`h3`),K(2,` Defer blocks `),F(3,`span`,66),K(4),I()(),F(5,`ul`,67),M(6,TF,5,2,`li`,103,SP),I()()),e&2){let e=W(5);D(4),q(e.ownedDeferBlocks().length),D(2),N(e.ownedDeferBlocks())}}function DF(e,t){if(e&1&&(F(0,`li`,98)(1,`span`,99),K(2),I(),L(3,`app-value-tree`,109),I()),e&2){let e=t.$implicit,n=W(2).$implicit,r=W(2),i=W(3);G(`changed`,i.flashed(`directive`,e.name,n.index)),D(2),q(e.name),D(),P(`prop`,e)(`store`,i.values)(`query`,i.propFilter())(`directive`,n.index)(`componentId`,r.id)(`pageId`,i.page()?.pageId??null)(`rpc`,i.rpc())}}function OF(e,t){if(e&1&&(F(0,`ul`,96),M(1,DF,4,10,`li`,97,xP),I()),e&2){let e=W().$implicit;D(),N(e.inputs)}}function kF(e,t){if(e&1&&(F(0,`li`,103)(1,`span`,89),K(2),I(),F(3,`span`,104),K(4),I()()),e&2){let e=t.$implicit;G(`on`,e.listened),D(2),q(e.name),D(2),q(e.listened?`listened`:`no listener`)}}function AF(e,t){if(e&1&&(F(0,`ul`,67),M(1,kF,5,4,`li`,102,xP),I()),e&2){let e=W().$implicit;D(),N(e.outputs)}}function jF(e,t){e&1&&(F(0,`p`,69),K(1,`No inputs or outputs.`),I())}function MF(e,t){if(e&1&&(F(0,`div`,65)(1,`h3`)(2,`span`,89),K(3),I(),F(4,`span`,105),K(5,`directive on host`),I()(),F(6,`p`,108),dg(7,71),I(),A(8,OF,3,0,`ul`,96),A(9,AF,3,0,`ul`,67),A(10,jF,2,0,`p`,69),I()),e&2){let e=t.$implicit;W(5);let n=Ag(3);D(3),q(e.name),D(4),P(`ngTemplateOutlet`,n)(`ngTemplateOutletContext`,R_(6,pP,e.name)),D(),j(e.inputs.length?8:-1),D(),j(e.outputs.length?9:-1),D(),j(!e.inputs.length&&!e.outputs.length?10:-1)}}function NF(e,t){if(e&1&&(L(0,`app-redaction-count`,94),A(1,sF,7,1,`div`,95),A(2,fF,7,2,`div`,65),A(3,gF,7,2,`div`,65),A(4,SF,7,2,`div`,65),A(5,wF,8,1,`div`,65),A(6,EF,8,1,`div`,65),M(7,MF,11,8,`div`,65,bP)),e&2){let e=t,n=W(),r=W(3);P(`value`,e),D(),j(r.propQuery()&&!e.count?1:-1),D(),j(!r.propQuery()||e.inputs.length?2:-1),D(),j(!r.propQuery()||e.outputs.length?3:-1),D(),j(!r.propQuery()||e.properties.length?4:-1),D(),j(!r.propQuery()&&n.listeners.length?5:-1),D(),j(!r.propQuery()&&r.ownedDeferBlocks().length?6:-1),D(),N(e.directives)}}function PF(e,t){if(e&1&&(F(0,`span`,105),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function FF(e,t){if(e&1&&(F(0,`span`,112),K(1,`from `),F(2,`span`,89),K(3),I()()),e&2){let e=W().$implicit;D(3),q(e.providedByName??`an injector`)}}function IF(e,t){e&1&&(F(0,`span`,113),K(1,`not provided`),I())}function LF(e,t){if(e&1&&(F(0,`li`,110)(1,`span`,111),K(2),I(),M(3,PF,2,1,`span`,105,Xh),A(5,FF,4,1,`span`,112)(6,IF,2,0,`span`,113),I()),e&2){let e=t.$implicit;D(2),q(e.token),D(),N(e.flags),D(2),j(e.providedBy?5:6)}}function RF(e,t){if(e&1&&(F(0,`ul`,92),M(1,LF,7,2,`li`,110,CP),I()),e&2){let e=W();D(),N(e.dependencies)}}function zF(e,t){e&1&&(F(0,`p`,69),K(1,`Nothing is injected through the constructor or inject().`),I())}function BF(e,t){if(e&1){let e=B();F(0,`app-component-pipes`,114),H(`showPipe`,function(t){return C(e),w(W(4).showPipe.emit(t))}),I()}if(e&2){let e=W(2),t=W(2);P(`rpc`,t.rpc())(`pageId`,t.page()?.pageId)(`component`,t.bareName(e.name))(`canShowPipes`,!t.staticReport())}}function VF(e,t){if(e&1){let e=B();F(0,`dl`,88)(1,`dt`),K(2,`Change detection`),I(),F(3,`dd`),K(4),I(),F(5,`dt`),K(6,`Encapsulation`),I(),F(7,`dd`),K(8),I(),F(9,`dt`),K(10,`Host path`),I(),F(11,`dd`,89),K(12),I(),M(13,aF,4,2,null,null,gP),I(),F(15,`div`,90)(16,`app-search-field`,91,3),w_(`valueChange`,function(t){C(e);let n=W(3);return C_(n.propFilter,t)||(n.propFilter=t),w(t)}),I(),A(18,oF,2,2,`span`,8),F(19,`p`,21),K(20),I()(),A(21,NF,9,7),F(22,`div`,65)(23,`h3`),K(24,` Injected `),F(25,`span`,66),K(26),I()(),A(27,RF,3,0,`ul`,92)(28,zF,2,0,`p`,69),I(),A(29,BF,1,4,`app-component-pipes`,93)}if(e&2){let e,n=t,r=W(),i=W(2);D(4),q(n.changeDetection??`Unknown`),D(4),q(n.encapsulation??`Unknown`),D(4),q(n.path),D(),N(i.routedById().get(r.id)??L_(10,fP)),D(3),S_(`value`,i.propFilter),D(2),j(i.propQuery()?18:-1),D(2),q(i.propFilterStatus()),D(),j((e=i.shownValues())?21:-1,e),D(5),q(n.dependencies.length),D(),j(n.dependencies.length?27:28),D(2),j(i.canShowPipes()?29:-1)}}function HF(e,t){e&1&&(F(0,`div`,75),L(1,`span`,115),F(2,`p`,44),K(3,`Reading live values from the page…`),I()())}function UF(e,t){if(e&1&&(F(0,`section`,32)(1,`header`,61)(2,`span`,62),K(3,`component`),I(),F(4,`h2`,63),K(5),I(),F(6,`span`,64),K(7),I(),A(8,GP,2,2,`p`,72)(9,YP,3,2),A(10,XP,7,1),A(11,$P,1,1),A(12,nF,3,2,`div`,73),A(13,rF,7,1),A(14,iF,1,6,`app-store-global`,74),I(),A(15,VF,30,11)(16,HF,4,0,`div`,75),I()),e&2){let e,n,r,i,a=t,o=W(2);D(5),q(a.name),D(2),J(`<`,a.tag,`>`),D(),j((e=o.detail()?.source)?8:9,e),D(2),j(o.devtoolsActions()?10:-1),D(),j((n=o.sourceFor(a))?11:-1,n),D(),j((o.canShowInjector()||o.canShowSignals())&&!o.staticReport()?12:-1),D(),j((r=o.detail())?13:-1,r),D(),j(!o.staticReport()&&!o.native()?14:-1),D(),j((i=o.detail())?15:16,i)}}function WF(e,t){e&1&&(F(0,`p`,43),K(1,`The selected component was destroyed`),I(),F(2,`p`,44)(3,`span`,89),K(4),I(),K(5,` is no longer on the page. Select another component to see its live values. `),I()),e&2&&(D(4),q(t))}function GF(e,t){e&1&&(F(0,`p`,44),K(1,` Select a component to see its live inputs, properties, outputs, change detection and injected services. `),I())}function KF(e,t){if(e&1&&(F(0,`div`,33),A(1,WF,6,1)(2,GF,2,0,`p`,44),I()),e&2){let e,t=W(2);D(),j((e=t.destroyed())?1:2,e)}}function qF(e,t){e&1&&L(0,`app-angular-unavailable`,35),e&2&&P(`page`,W(2).angularPage())}function JF(e,t){if(e&1){let e=B();F(0,`app-hydration-section`,116),H(`overlay`,function(t){return C(e),w(W(2).setHydrationOverlay(t))})(`showNode`,function(t){return C(e),w(W(2).revealNode(t))})(`highlight`,function(t){return C(e),w(W(2).highlight(t))}),I()}e&2&&P(`report`,W(2).page()?.hydration)}function YF(e,t){if(e&1){let e=B();F(0,`app-cd-recording`,117),H(`showComponent`,function(t){return C(e),w(W(2).showCdComponent(t))}),I(),F(1,`app-leaks-section`,118),H(`showComponent`,function(t){return C(e),w(W(2).showLeakComponent(t))})(`highlight`,function(t){return C(e),w(W(2).highlight(t))}),I()}if(e&2){let e=W(2);P(`page`,e.cdPage())(`pageId`,e.page().pageId)(`rpc`,e.rpc())(`native`,e.native()),D(),P(`report`,e.leaksPage())(`pageId`,e.page().pageId)(`rpc`,e.rpc())(`angular`,e.angularPage())}}function XF(e,t){if(e&1){let e=B();F(0,`p`,4),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. `),I(),F(2,`div`,5)(3,`app-search-field`,6,1),H(`valueChange`,function(t){return C(e),w(W().setFilter(t))}),I(),F(5,`span`,7),K(6,` Type plain text, a tag such as <button>, or a directive such as [routerLink]. Combine them to narrow the tree. `),I(),A(7,wP,3,2),F(8,`span`,8),K(9),I(),F(10,`div`,9),A(11,TP,6,1,`button`,10),F(12,`button`,11),H(`click`,function(){return C(e),w(W().expandAll())}),T(),F(13,`svg`,12),L(14,`path`,13)(15,`path`,14),I(),cs(),F(16,`span`,15),K(17,`Expand all`),I()(),F(18,`button`,16),H(`click`,function(){return C(e),w(W().collapseAll())}),T(),F(19,`svg`,12),L(20,`path`,17)(21,`path`,18),I(),cs(),F(22,`span`,15),K(23,`Collapse all`),I()(),F(24,`button`,19),H(`click`,function(){C(e);let t=W();return w(t.picking()?t.cancelPick():t.pick())}),T(),F(25,`svg`,12),L(26,`path`,20),I(),cs(),F(27,`span`,15),K(28),I()()()(),F(29,`p`,21),K(30),I(),A(31,EP,2,1,`p`,22),A(32,DP,2,1,`p`,23),F(33,`div`,24)(34,`div`,25)(35,`h2`,26),K(36,`Component tree`),I(),A(37,AP,7,3,`div`,27),A(38,jP,2,1,`p`,28),F(39,`div`,29,2),H(`keydown`,function(t){return C(e),w(W().onTreeKey(t))}),M(41,BP,11,21,`div`,30,hP),I(),A(43,VP,2,3,`div`,31),I(),A(44,WP,20,5,`section`,32)(45,UF,17,9,`section`,32)(46,KF,3,1,`div`,33),I(),F(47,`app-defer-blocks`,34),H(`showOwner`,function(t){return C(e),w(W().showOwner(t))})(`showNode`,function(t){return C(e),w(W().revealNode(t))})(`highlight`,function(t){C(e);let n=W();return w(t?n.highlightBlock(t):n.highlight(null))}),I(),A(48,qF,1,1,`app-angular-unavailable`,35),A(49,JF,1,1,`app-hydration-section`,36),F(50,`app-for-blocks`,37),H(`showOwner`,function(t){return C(e),w(W().showForOwner(t))})(`highlight`,function(t){return C(e),w(W().highlight(t))}),I(),A(51,YF,2,8)}if(e&2){let e,t,n=W();D(3),P(`value`,n.filter()),D(4),j(n.pageOptions().length>1?7:-1),D(2),q(n.countLabel()),D(2),j(n.page().directiveHostCount?11:-1),D(),P(`disabled`,!!n.filter().trim()),D(6),P(`disabled`,!!n.filter().trim()),D(6),G(`on`,n.picking()),k(`title`,n.pickLabel()),D(4),q(n.pickLabel()),D(2),q(n.announcement()),D(),j(n.pickMessage()?31:-1),D(),j(n.page().truncated?32:-1),D(5),j(n.rows().length?-1:37),D(),j(n.rowWindow.enabled()?38:-1),D(),Zg(`padding-top`,n.rowWindow.enabled()?6+n.rowWindow.padTop():null,`px`)(`padding-bottom`,n.rowWindow.enabled()?6+n.rowWindow.padBottom():null,`px`),G(`windowed`,n.rowWindow.enabled()),P(`hidden`,!n.rows().length),D(2),N(n.shownRows()),D(2),j((e=n.nameTip())?43:-1,e),D(),j((t=n.selectedHost())?44:(t=n.selectedNode())?45:46,t),D(3),P(`blocks`,n.deferBlocks())(`truncated`,n.page()?.deferTruncated===!0)(`clockOffset`,n.page()?.clockOffset??0)(`mismatches`,n.page()?.hydration?.mismatches??L_(35,fP)),D(),j(n.deferUnavailable()?48:-1),D(),j(n.native()?-1:49),D(),P(`blocks`,n.page()?.forBlocks)(`truncated`,n.page()?.forBlocksTruncated===!0)(`supported`,n.page()?.deferBlocks&&!n.page()?.forBlocks||n.forUnavailable()?!1:null)(`angular`,n.angularPage()),D(),j(n.staticReport()?-1:51)}}function ZF(e,t){e&1&&(F(0,`p`,23),K(1,` The page reported no component instances. The live tree needs a development build with Angular's debug API. Showing what the source declares instead. `),I())}function QF(e,t){e&1&&(F(0,`p`,23),K(1,`Loading the live component tree…`),I())}function $F(e,t){e&1&&(F(0,`p`,119),K(1,` No page is connected, so this lists what the source declares. Open the app in a browser with the devtools connected to see each rendered instance. `),I())}function eI(e,t){if(e&1&&K(0),e&2){let e=W(3);Y(` `,e.filteredSource().length,` of `,e.source().length,` `)}}function tI(e,t){if(e&1&&K(0),e&2){let e=W(3);b_(` `,e.sourceCounts().components,` `,e.sourceCounts().components===1?`component`:`components`,` · `,e.sourceCounts().directives,` `,e.sourceCounts().directives===1?`directive`:`directives`,` `)}}function nI(e,t){if(e&1&&(F(0,`span`,121),A(1,eI,1,2)(2,tI,1,4),I()),e&2){let e=W(2);D(),j(e.filter().trim()?1:2)}}function rI(e,t){e&1&&(F(0,`div`,125),L(1,`span`,115),F(2,`p`,43),K(3,`Scanning components…`),I()())}function iI(e,t){e&1&&(K(0,` Run `),F(1,`code`),K(2,`pangular build`),I(),K(3,` again to rebuild the report. `))}function aI(e,t){e&1&&K(0,` Check that the dev server is running, then try again. `)}function oI(e,t){if(e&1){let e=B();F(0,`div`,126)(1,`p`,43),K(2,`Could not load components`),I(),F(3,`p`,44),A(4,iI,4,0)(5,aI,1,0),I(),F(6,`button`,45),H(`click`,function(){return C(e),w(W(2).refresh())}),K(7,`Retry`),I()()}if(e&2){let e=W(2);D(4),j(e.staticReport()?4:5)}}function sI(e,t){e&1&&(F(0,`div`,127)(1,`p`,43),K(2,`No components found`),I(),F(3,`p`,44),K(4,`No @Component or @Directive was found in the source.`),I()())}function cI(e,t){if(e&1){let e=B();F(0,`div`,127)(1,`p`,43),K(2),I(),F(3,`button`,45),H(`click`,function(){return C(e),w(W(2).clearFilter())}),K(4,`Clear filters`),I()()}if(e&2){let e=W(2);D(2),J(`No components match “`,e.filter().trim(),`”`)}}function lI(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,W(3).bareName(e.className),` · `)}}function uI(e,t){if(e&1&&(F(0,`dt`),K(1,`Change detection`),I(),F(2,`dd`),K(3),I()),e&2){let e=W(2).$implicit;D(3),q(e.changeDetection??`Unknown`)}}function dI(e,t){if(e&1){let e=B();F(0,`button`,85),H(`click`,function(){let t=C(e).$implicit;return w(W(5).showForm.emit(t.formId))}),K(1),I()}if(e&2){let e=t.$implicit;D(),J(` Show `,e.label,` in Forms `)}}function fI(e,t){if(e&1&&(F(0,`div`,137)(1,`dl`,88)(2,`dt`),K(3,`Class`),I(),F(4,`dd`,89),K(5),I(),F(6,`dt`),K(7,`File`),I(),F(8,`dd`,89),L(9,`app-source-link`,76),I(),F(10,`dt`),K(11,`Standalone`),I(),F(12,`dd`),K(13),I(),A(14,uI,4,1),F(15,`dt`),K(16,`Inputs`),I(),F(17,`dd`,89),K(18),I(),F(19,`dt`),K(20,`Outputs`),I(),F(21,`dd`,89),K(22),I()(),M(23,dI,2,1,`button`,84,yP),I()),e&2){let e=W(),t=e.$implicit,n=e.$index,r=W(3);P(`id`,`ct-source-`+n),D(5),q(r.bareName(t.className)),D(4),P(`file`,t.file)(`line`,t.line),D(4),q(t.isStandalone?`Yes`:`No`),D(),j(t.kind===`component`?14:-1),D(4),q(t.inputs.join(`, `)||`None`),D(4),q(t.outputs.join(`, `)||`None`),D(),N(r.formsIn(t.file))}}function pI(e,t){if(e&1){let e=B();F(0,`li`,130)(1,`button`,131),H(`click`,function(){let t=C(e).$implicit,n=W(3);return w(n.openKey.set(n.openKey()===n.sourceKey(t)?null:n.sourceKey(t)))}),F(2,`span`,132),K(3),I(),F(4,`span`,133)(5,`span`,134),K(6),I(),F(7,`span`,135),A(8,lI,1,1),K(9),I()(),T(),F(10,`svg`,136),L(11,`path`,55),I()(),A(12,fI,25,8,`div`,137),I()}if(e&2){let e=t.$implicit,n=t.$index,r=W(3);G(`expanded`,r.openKey()===r.sourceKey(e)),D(),k(`aria-expanded`,r.openKey()===r.sourceKey(e))(`aria-controls`,r.openKey()===r.sourceKey(e)?`ct-source-`+n:null),D(),G(`directive`,e.kind===`directive`),D(),q(e.kind),D(3),q(r.sourceLabel(e)),D(2),j(e.selector?8:-1),D(),Y(` `,e.file,`:`,e.line,` `),D(3),j(r.openKey()===r.sourceKey(e)?12:-1)}}function mI(e,t){if(e&1&&(F(0,`ul`,128),M(1,pI,13,12,`li`,129,vP,!0),I()),e&2){let e=W(2);D(),N(e.filteredSource())}}function hI(e,t){if(e&1){let e=B();A(0,ZF,2,0,`p`,23)(1,QF,2,0,`p`,23)(2,$F,2,0,`p`,119),F(3,`div`,5)(4,`app-search-field`,120,1),w_(`valueChange`,function(t){C(e);let n=W();return C_(n.filter,t)||(n.filter=t),w(t)}),I(),A(6,nI,3,1,`span`,121),F(7,`button`,122),H(`click`,function(){return C(e),w(W().refresh())}),T(),F(8,`svg`,12),L(9,`path`,123)(10,`path`,124),I(),K(11,` Refresh `),I()(),A(12,rI,4,0,`div`,125)(13,oI,8,1,`div`,126)(14,sI,5,0,`div`,127)(15,cI,5,1,`div`,127)(16,mI,3,0,`ul`,128)}if(e&2){let e=W();j(e.page()?0:e.pagesKnown()?2:1),D(4),S_(`value`,e.filter),D(2),j(e.source().length?6:-1),D(),G(`spinning`,e.loading()),k(`aria-busy`,e.loading()),D(5),j(e.loading()&&!e.source().length?12:e.error()&&!e.source().length?13:e.source().length?e.filteredSource().length?16:15:14)}}function gI(e,t){if(e&1&&(F(0,`span`,138)(1,`span`,79),K(2,`Likely`),I(),F(3,`span`,26),K(4,`, matched by class name: `),I(),L(5,`app-source-link`,76),I()),e&2){W();let e=O_(0);P(`title`,W().guessTitle),D(5),P(`file`,e[0].file)(`line`,e[0].line)}}function _I(e,t){if(e&1&&(F(0,`span`,139),K(1),I()),e&2){let e=W().$implicit,t=O_(0),n=W();P(`title`,n.guessTitle),D(),Y(``,t.length,` source files define `,n.bareName(e))}}function vI(e,t){if(e&1&&(E_(0),A(1,gI,6,3,`span`,138)(2,_I,2,3,`span`,139)),e&2){let e=t.$implicit,n=D_(W().directiveSources(e));D(),j(n.length===1?1:n.length>1?2:-1)}}var yI=32;function bI(e){return e.replace(/^_(?=[A-Z])/,``)}function xI(e,t){let n=e=>e.replace(/\\/g,`/`).replace(/^\.\//,``),[r,i]=[n(e),n(t)];return r===i||r.endsWith(`/`+i)||i.endsWith(`/`+r)}function SI(e,t){let n=[],r=new Set([t]);for(let i=e.get(t);i&&!r.has(i);i=e.get(i))r.add(i),n.push(i);return n}var CI={ArrowDown:`next`,ArrowUp:`previous`,ArrowLeft:`parent`,ArrowRight:`child`,Enter:`pick`},wI=`pangular:components:directive-hosts`;function TI(){try{return localStorage.getItem(wI)!==`hidden`}catch{return!0}}var EI=class e{rpc=$(null);staticReport=X(()=>yT(this.rpc()));focus=$(null);showForm=ev();focusHandled=ev();command=$(null);commandHandled=ev();canShowInjector=$(!1);canShowPipes=$(!1);showPipe=ev();showInjector=ev();canShowSignals=$(!1);showSignals=ev();filter=E(``);loading=E(!1);error=E(!1);source=E([]);formOwners=E([]);pages=E({});chosenPageId=E(null);selectedId=E(null);destroyed=E(null);announcement=E(``);picking=E(!1);pickMessage=E(``);pickPageId=null;pickSeq=0;focusId=E(null);nameTip=E(null);pickLabel=X(()=>this.picking()?`Cancel pick`:this.native()?`Pick component on device`:`Pick component on page`);bridge=S(WE);actionMessage=Q({source:this.selectedId,computation:()=>``});copyMessage=Q({source:this.selectedId,computation:()=>``});flash=new pj;collapsed=E(new Set);showDirectiveHosts=E(TI());openKey=E(null);routerPages=E([]);pageId=fT();angularPages=uD(()=>this.rpc());angularPage=X(()=>dD(this.angularPages(),this.page()?.pageId??this.pageId));hasControlFlow=X(()=>{let e=this.angularPage()?.version;return!e||nT(e,`17.0`)});deferUnavailable=X(()=>this.hasControlFlow()&&rT(this.angularPage(),`deferBlocks`));forUnavailable=X(()=>this.hasControlFlow()&&rT(this.angularPage(),`forBlocks`));destroyRef=S(vs);injector=S(gs);host=S(kl);filterInput=sv(`filterInput`);cdRecording=sv(aj);pagesKnown=E(!1);cleanups=[];selection={pageId:null,detailId:null};shownPageId=Q({source:()=>({pages:this.pages(),chosen:this.chosenPageId()}),computation:({pages:e,chosen:t},n)=>pT(e,{chosen:t,host:this.pageId,previous:n?.value??null})});page=X(()=>{let e=this.shownPageId();return e?this.pages()[e]??null:null});pageOptions=X(()=>Object.values(this.pages()).map(e=>({value:e.pageId,label:e.title||e.url||`Page ${e.pageId}`,hint:e.url})));live=X(()=>(this.page()?.roots.length??0)>0);native=X(()=>_D(this.page()));canEdit=X(()=>this.live()&&!this.native()&&!this.staticReport()&&IT(this.rpc(),`components`));devtoolsActions=X(()=>this.bridge.available&&!!this.page()&&!this.native()&&!this.staticReport());cdPages=E({});cdPage=X(()=>{let e=this.page()?.pageId;return e?this.cdPages()[e]??null:null});cdHosts=X(()=>this.cdPage()?.hosts??{});leaksPages=E({});leaksPage=X(()=>{let e=this.page()?.pageId;return e?this.leaksPages()[e]??null:null});visibleRoots=X(()=>{let e=this.page()?.roots??[];return this.showDirectiveHosts()||!this.page()?.directiveHostCount?e:AD(e)});index=X(()=>{let e=new Map,t=new Map,n=(r,i)=>{for(let a of r)e.has(a.id)||(e.set(a.id,a),i&&t.set(a.id,i),n(a.children,a.id))};return n(this.visibleRoots(),null),{map:e,parents:t}});query=X(()=>this.filter().trim().toLowerCase());filtered=X(()=>kD(this.visibleRoots(),this.query()));shownDirectiveHosts=X(()=>this.showDirectiveHosts()?this.page()?.directiveHostCount??0:0);deferBlocks=X(()=>this.page()?.deferBlocks??[]);ownedDeferBlocks=X(()=>{let e=this.selectedId();return e?this.deferBlocks().filter(t=>t.owner?.id===e):[]});countLabel=X(()=>PD(this.page()?.count??0,this.filtered().matches,!!this.query(),!!this.page()?.truncated,this.shownDirectiveHosts()));truncationText=X(()=>ID(this.page()?.truncatedBy));rows=X(()=>{let e=[],t=this.collapsed(),n=!!this.query(),r=(i,a)=>{i.forEach((o,s)=>{let c=n||!t.has(o.id);e.push({node:o,depth:a,hasChildren:o.children.length>0,expanded:c,posinset:s+1,setsize:i.length}),c&&r(o.children,a+1)})};return r(this.filtered().nodes,0),e});rowWindow=new HN({count:X(()=>this.rows().length),estimate:yI,fixed:!0});shownRows=X(()=>{let{start:e,end:t}=this.rowWindow.range();return this.rows().slice(e,t).map((t,n)=>({row:t,index:e+n}))});tabStop=X(()=>{let e=this.rovingId(),t=this.shownRows();return t.some(({row:t})=>t.node.id===e)?e:t[0]?.row.node.id??null});treeEl=sv(`treeEl`);selectedNode=X(()=>{let e=this.selectedId();return e?this.index().map.get(e)??null:null});selectedHost=X(()=>{let e=this.selectedNode();return e?.kind===`directive`?e:null});detail=X(()=>{let e=this.page()?.detail;return e&&e.id===this.selectedId()?e:null});values=new xM;propFilter=E(``);propQuery=X(()=>this.propFilter().trim().toLowerCase());propFilterInput=sv(`propFilterInput`);shownValues=X(()=>{let e=this.detail();if(!e)return null;let t=this.propQuery(),n=e=>!t||e.name.toLowerCase().includes(t)||e.prop.toLowerCase().includes(t),r=(e,r)=>n(e)||rM([e.prop],e.value,e=>this.values.level(e,r),t,1).length>0,i=e.inputs.filter(e=>r(e)),a=e.outputs.filter(n),o=(e.properties??[]).filter(e=>r(e)),s=e.directives.map((e,t)=>({...e,index:t,inputs:e.inputs.filter(e=>r(e,t)),outputs:e.outputs.filter(n)})).filter(e=>!t||e.inputs.length||e.outputs.length);return{inputs:i,outputs:a,properties:o,directives:s,count:i.length+a.length+o.length+s.reduce((e,t)=>e+t.inputs.length+t.outputs.length,0)}});valueTotal=X(()=>{let e=this.detail();return e?e.inputs.length+e.outputs.length+(e.properties?.length??0)+e.directives.reduce((e,t)=>e+t.inputs.length+t.outputs.length,0):0});propFilterStatus=X(()=>{if(!this.propQuery())return``;let e=this.shownValues()?.count??0;return e?`${e} of ${this.valueTotal()} values match.`:`No inputs, outputs or properties match.`});clearPropFilter(e){e&&this.propFilter()&&(e.stopPropagation(),e.preventDefault()),this.propFilter.set(``),this.propFilterInput()?.focus()}rovingId=X(()=>{let e=this.rows(),t=new Set(e.map(e=>e.node.id)),n=this.focusId();if(n&&t.has(n))return n;let r=this.selectedId();return r&&t.has(r)?r:e[0]?.node.id??null});outlets=X(()=>{let e=this.page()?.pageId;return this.routerPages().find(t=>t.pageId===e)?.outlets??[]});routedById=X(()=>{let e=new Map,t=n=>{for(let r of n){if(r.activated&&r.devtoolsId){let t=e.get(r.devtoolsId)??[];t.push({route:r.route??``,outlet:r.outlet}),e.set(r.devtoolsId,t)}r.children&&t(r.children)}};return t(this.outlets()),e});sourceByClass=X(()=>{let e=new Map;for(let t of this.source()){let n=bI(t.className);e.set(n,[...e.get(n)??[],t])}return e});filteredSource=X(()=>{let e=this.query(),t=this.source();return e?t.filter(t=>t.selector.toLowerCase().includes(e)||t.className.toLowerCase().includes(e)||t.file.toLowerCase().includes(e)):t});sourceCounts=X(()=>{let e=this.source().filter(e=>e.kind===`component`).length;return{components:e,directives:this.source().length-e}});constructor(){ac(()=>{let e=this.treeEl()?.nativeElement;e&&this.rowWindow.attach(e)}),ac(()=>{let e=this.detail(),t={rpc:this.rpc(),pageId:this.page()?.pageId??null,componentId:e?.id??null};Z(()=>this.values.follow(t,e?.expanded))}),ac(()=>{let e=this.page()?.pageId??null;Z(()=>{this.picking()&&e!==this.pickPageId&&this.dropPick()})}),ac(()=>{let e=this.detail(),t=e?`${this.page()?.pageId??``}|${e.id}`:null,n=new Map;for(let t of e?.inputs??[])n.set(mj(`input`,t.name),t.value);for(let t of e?.properties??[])n.set(mj(`property`,t.name),t.value);e?.directives.forEach((e,t)=>{for(let r of e.inputs)n.set(mj(`directive`,r.name,t),r.value)}),Z(()=>this.flash.update(t,n))}),this.destroyRef.onDestroy(()=>this.flash.clear()),ac(()=>{let e=this.rpc();e&&(this.refresh(),this.watch(e))}),ac(()=>{let e=this.focus();if(!e)return;let t=this.page()?.pageId??null;if(e.pageId&&t!==e.pageId&&this.pages()[e.pageId]){Z(()=>this.selectPage(e.pageId));return}this.live()&&Z(()=>{(!e.pageId||t===e.pageId)&&this.index().map.has(e.id)?this.reveal(e.id):this.announcement.set(`That component is no longer on the page.`),this.focusHandled.emit()})}),ac(()=>{let e=this.command();if(!e)return;if(!this.live()){this.pagesKnown()&&Z(()=>this.commandHandled.emit());return}if(e.kind===`pick`){Z(()=>{this.picking()||this.pick(),this.commandHandled.emit()});return}let t=this.cdRecording();if(!t){(this.native()||this.staticReport())&&Z(()=>{this.say(`This page cannot record change detection.`),this.commandHandled.emit()});return}Z(()=>{e.kind===`cd-clear`?t.clear():e.kind===`cd-start`!==t.recording()&&t.toggle(),this.commandHandled.emit()})}),this.destroyRef.onDestroy(()=>{this.highlight(null);for(let e of this.cleanups.splice(0))e()})}async watch(e){for(let e of this.cleanups.splice(0))e();let t=e.scope(`pangular`);try{let e=await t.rpc.sharedState(`component-tree`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e?.pages;this.applyPages(t&&typeof t==`object`?t:{}),e!==void 0&&this.pagesKnown.set(!0)};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.applyPages({}),this.pagesKnown.set(!0)}try{let e=await t.rpc.sharedState(`change-detection`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e?.pages;this.cdPages.set(t&&typeof t==`object`?t:{})};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.cdPages.set({})}try{let e=await t.rpc.sharedState(`leaks`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e?.pages;this.leaksPages.set(t&&typeof t==`object`?t:{})};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.leaksPages.set({})}try{let e=await t.rpc.sharedState(`router`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e?.pages;this.routerPages.set(Array.isArray(t)?t:[])};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.routerPages.set([])}}async refresh(){let e=this.rpc();if(!e)return;this.loading.set(!0);let t=e.scope(`pangular`);try{this.source.set(await t.rpc.call(`get-components`)),this.error.set(!1)}catch{this.error.set(!0)}finally{this.loading.set(!1)}let n=await t.rpc.call(`forms-owners`).catch(()=>[]);this.formOwners.set(n??[])}formsIn(e){return this.formOwners().filter(t=>t.file===e)}whereOf(e){let t=this.detail()?.source;if(t)return t;let n=this.sourceCandidates(e);return n.length===1?n[0]:null}async revealInElements(e){let t=this.page()?.pageId;if(!t)return;this.actionMessage.set(``);let n=await this.bridge.reveal(t,e.id);this.selectedId()===e.id&&this.actionMessage.set(n.ok?``:`Could not reveal it. The component must be rendered in the tab these DevTools inspect.`)}flashed(e,t,n){return this.flash.changed().has(mj(e,t,n))}openSignals(e,t){let n=this.page()?.pageId;this.showSignals.emit({componentId:e.id,...n?{pageId:n}:{},...t?{key:t}:{}})}async copyJson(e){await this.copy(e.id,cj(e),`Copied ${e.name} as JSON.`)}async copyHostPath(e){await this.copy(e.id,lj(e),e.selector?`Copied the host selector.`:`Copied the host path.`)}async copy(e,t,n){let r=n;try{await navigator.clipboard.writeText(t)}catch{r=`The clipboard is not available here.`}this.selectedId()===e&&this.copyMessage.set(r)}openInjector(e){let t=this.page()?.pageId;this.showInjector.emit(t?{componentId:e.id,pageId:t}:{componentId:e.id})}async openSource(e){let t=this.page()?.pageId;if(!t)return;let n=this.whereOf(e);this.actionMessage.set(``);let r=await this.bridge.openSource(t,e.id,n);this.selectedId()===e.id&&(r.ok||this.actionMessage.set(n?`Not found in Sources. Open ${n.file}:${n.line} in your editor.`:`Could not open the source. The component must be rendered in the tab these DevTools inspect.`))}guessTitle=`The page gave no exact location. This comes from the source scan, matched by class name.`;sourceCandidates(e){let t=(this.sourceByClass().get(bI(e.name))??[]).filter(e=>e.kind===`component`),n=t.filter(t=>t.selector===e.tag);return n.length?n:t}sourceFor(e){let t=this.sourceCandidates(e),n=this.detail()?.source;return n?t.find(e=>xI(e.file,n.file))??null:t.length===1?t[0]:null}directiveSources(e){return(this.sourceByClass().get(bI(e))??[]).filter(e=>e.kind===`directive`)}sourceKey(e){return`${e.file}#${e.className}`}sourceLabel(e){return e.selector?e.kind===`component`&&/^[a-z][\w-]*$/i.test(e.selector)?`<${e.selector}>`:e.selector:bI(e.className)}bareName(e){return bI(e)}applyPages(e){let t=document.activeElement,n=t instanceof HTMLElement&&this.host.nativeElement.contains(t)?t.closest(`.row`)?.dataset.id??null:null,r=n?this.rows().map(e=>e.node.id):[],i=this.index().map;if(this.pages.set(e),this.syncSelection(i),!n)return;let a=new Set(this.rows().map(e=>e.node.id));if(a.has(n))return;let o=zD(r,a,n);o&&(this.focusId.set(o),td(()=>this.rowElement(o)?.focus(),{injector:this.injector}))}syncSelection(e=this.index().map){let t=this.page(),n=LD({...this.selection,selectedId:this.selectedId()},t?{pageId:t.pageId,roots:t.roots,detail:t.detail,truncated:t.truncated}:null),r=n.destroyed?e.get(n.destroyed)?.name:void 0;this.selection={pageId:n.pageId,detailId:n.detailId},n.selectedId!==this.selectedId()&&this.selectedId.set(n.selectedId),n.selectedId&&this.destroyed.set(null),n.destroyed&&(this.destroyed.set(r??`The component`),this.announcement.set(`The selected component was destroyed.`),this.sendSelection(null))}selectPage(e){e&&(this.chosenPageId.set(e),this.destroyed.set(null),this.syncSelection())}setFilter(e){this.filter.set(e);let{matches:t}=this.filtered();this.announcement.set(FD(this.page()?.count??0,t,e,!!this.page()?.truncated,this.shownDirectiveHosts()))}clearFilter(){this.live()?this.setFilter(``):this.filter.set(``),this.filterInput()?.focus()}async pick(){let e=this.rpc();if(!e||this.picking())return;let t=++this.pickSeq;this.pickPageId=this.page()?.pageId??null,this.picking.set(!0),this.say(this.native()?`Tap a component on the device, or use the arrow keys to move between components and Enter to pick one. Press Escape to cancel.`:`Click a component in the app, or use the arrow keys to move between components and Enter to pick one. Press Escape to cancel.`);let n=await e.scope(`pangular`).rpc.call(`request-component-pick`,{pageId:this.pickPageId??void 0}).catch(()=>({ok:!1,error:`Could not reach the devtools server.`}));if(t===this.pickSeq){if(this.picking.set(!1),!n?.ok||!n.id){this.say(n?.error??`No component was picked.`);return}n.pageId&&n.pageId!==this.page()?.pageId&&this.selectPage(n.pageId),this.say(`Picked ${n.name??`a component`}.`),this.destroyed.set(null),this.index().map.has(n.id)?this.reveal(n.id):this.selectedId.set(n.id)}}pickKey(e){let t=CI[e.key];if(!this.picking()||!t||e.altKey||e.ctrlKey||e.metaKey)return;e.preventDefault();let n=this.rpc();if(!n)return;let r=this.pickSeq;n.scope(`pangular`).rpc.call(`request-component-pick-move`,{pageId:this.pickPageId??void 0,key:t}).then(e=>{let n=e;r===this.pickSeq&&this.picking()&&t!==`pick`&&this.say(n?.moved?`${n.name??`Component`} <${n.tag??``}>. Press Enter to pick it.`:n?.error??`The page did not move.`)}).catch(()=>{})}cancelPick(){let e=this.rpc();e&&this.picking()&&e.scope(`pangular`).rpc.call(`cancel-component-pick`,{pageId:this.pickPageId??void 0}).catch(()=>{})}dropPick(){this.cancelPick(),this.pickSeq++,this.picking.set(!1),this.say(`Picking stopped because the page changed.`)}say(e){this.pickMessage.set(e),this.announcement.set(e)}sendSelection(e){let t=this.rpc();t&&t.scope(`pangular`).rpc.call(`select-component`,{pageId:this.page()?.pageId,id:e,console:!0}).catch(()=>{})}rowElement(e){return this.host.nativeElement.querySelector(`.row[data-id="${CSS.escape(e)}"]`)}select(e){let t=this.selectedId()===e?null:e;this.selectedId.set(t),this.destroyed.set(null),this.focusId.set(e),!(t&&this.index().map.get(t)?.kind===`directive`)&&this.sendSelection(t)}hostLabel(e){return jD(e)}hydrationText(e){return ND(e)}ownerOf(e){let{map:t,parents:n}=this.index();for(let r of SI(n,e)){let e=t.get(r);if(e&&e.kind!==`directive`)return e}return null}toggleDirectiveHosts(){let e=!this.showDirectiveHosts();this.showDirectiveHosts.set(e);try{localStorage.setItem(wI,e?`shown`:`hidden`)}catch{}let t=this.selectedId();!e&&t&&!this.index().map.has(t)&&this.selectedId.set(null),this.announce(e?`Directive hosts are shown.`:`Directive hosts are hidden.`)}setHydrationOverlay(e){let t=this.rpc(),n=this.page()?.pageId;t&&n&&(t.scope(`pangular`).rpc.call(`request-hydration-overlay`,{pageId:n,on:e}).catch(()=>{}),this.announce(e?`Outlining hydration on the page.`:`Hydration outline removed.`))}revealNode(e){this.index().map.has(e)&&this.reveal(e)}showLeakComponent(e){this.index().map.has(e)&&this.reveal(e,!0)}reveal(e,t=!1){let{parents:n}=this.index();this.collapsed.update(t=>{let r=new Set(t);for(let t of SI(n,e))r.delete(t);return r}),this.rows().some(t=>t.node.id===e)||this.setFilter(``),this.selectedId()!==e&&this.select(e),t&&this.focusId.set(e);let r=this.rows().findIndex(t=>t.node.id===e);r>=0&&this.rowWindow.reveal(r),td(()=>{let n=document.querySelector(`.row[data-id="${CSS.escape(e)}"]`);this.clearToolbar(),n?.scrollIntoView({block:`nearest`}),n&&this.keepBelowToolbar(n),t&&n?.focus({preventScroll:!0})},{injector:this.injector})}clearToolbar(){let e=this.host.nativeElement.querySelector(`.toolbar`);e&&this.host.nativeElement.style.setProperty(`--ct-toolbar-clearance`,`${GN(e)}px`)}keepBelowToolbar(e){let t=this.host.nativeElement.querySelector(`.toolbar`);t&&KN(e,t)}toggle(e,t){t?.stopPropagation(),!this.query()&&this.collapsed.update(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}expandAll(){this.query()||(this.collapsed.set(new Set),this.announce(`Expanded every component.`))}collapseAll(){if(this.query())return;let{map:e,parents:t}=this.index(),n=this.rovingId(),r=new Set;for(let t of e.values())t.children.length&&r.add(t.id);if(this.collapsed.set(r),n){let e=new Set(this.rows().map(e=>e.node.id)),r=n;for(;r&&!e.has(r);)r=t.get(r);r&&this.focusId.set(r)}this.announce(`Collapsed every component. Only the top level is shown.`)}announce(e){this.announcement.update(t=>t===e?`${e}\u00a0`:e)}expandSiblings(e){if(this.query())return;let t=this.index().parents.get(e),n=t?this.index().map.get(t)?.children??[]:this.page()?.roots??[];this.collapsed.update(e=>{let t=new Set(e);for(let e of n)t.delete(e.id);return t})}showNameTip(e){let t=e.currentTarget,n=Array.from(t.querySelectorAll(`.name, .tag, .host-dirs`));if(!n.some(e=>e.scrollWidth>e.clientWidth+1)){this.nameTip.set(null);return}let r=n.map(e=>e.title||e.textContent?.trim()).join(` `);this.nameTip.set({text:r,top:t.offsetTop+t.offsetHeight+2})}highlight(e){this.requestHighlight(e?{id:e}:null)}highlightBlock(e){e.rootIds.length>1?this.requestHighlight({ids:e.rootIds}):this.highlight(e.rootIds[0]??e.owner?.id??null)}requestHighlight(e){let t=this.rpc();t&&t.scope(`pangular`).rpc.call(`request-page-highlight`,e&&{pageId:this.page()?.pageId,...e}).catch(()=>{})}showOwner(e){e.owner&&this.index().map.has(e.owner.id)&&this.reveal(e.owner.id)}showCdComponent(e){let t=this.cdHosts(),n=null;for(let r of this.index().map.values())r.name===e&&(!n||(t[r.id]??0)>(t[n.id]??0))&&(n=r);if(!n){this.say(`No ${e} is in the tree now.`);return}this.say(`Showing ${e} in the tree.`),this.reveal(n.id)}showForOwner(e){e.owner&&this.index().map.has(e.owner.id)&&this.reveal(e.owner.id)}onTreeKey(e){let t=this.rows();if(!t.length)return;let n=t.findIndex(e=>e.node.id===this.rovingId()),r=Math.max(n,0),i=t[r],a=-1;switch(e.key){case`ArrowDown`:a=Math.min(r+1,t.length-1);break;case`ArrowUp`:a=Math.max(r-1,0);break;case`Home`:a=0;break;case`End`:a=t.length-1;break;case`ArrowRight`:i.hasChildren&&!i.expanded?this.toggle(i.node.id):i.hasChildren&&(a=r+1);break;case`ArrowLeft`:if(i.hasChildren&&i.expanded&&!this.query())this.toggle(i.node.id);else{let e=this.index().parents.get(i.node.id);a=t.findIndex(t=>t.node.id===e)}break;case`Enter`:case` `:this.select(i.node.id);break;case`*`:this.expandSiblings(i.node.id);break;default:return}if(e.preventDefault(),a>=0){let e=t[a].node.id;this.focusId.set(e);let n=()=>{let t=document.querySelector(`.row[data-id="${CSS.escape(e)}"]`);this.clearToolbar(),t?.focus({preventScroll:!0}),t?.scrollIntoView({block:`nearest`}),t&&this.keepBelowToolbar(t)};this.rowWindow.rendered(a)?queueMicrotask(n):this.rowWindow.reveal(a,n)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-component-tree`]],viewQuery:function(e,t){e&1&&Og(t.filterInput,lP,5)(t.cdRecording,aj,5)(t.treeEl,uP,5)(t.propFilterInput,dP,5),e&2&&kg(4)},hostBindings:function(e,t){e&1&&H(`keydown.escape`,function(){return t.cancelPick()})(`keydown`,function(e){return t.pickKey(e)})},inputs:{rpc:[1,`rpc`],focus:[1,`focus`],command:[1,`command`],canShowInjector:[1,`canShowInjector`],canShowPipes:[1,`canShowPipes`],canShowSignals:[1,`canShowSignals`]},outputs:{showForm:`showForm`,focusHandled:`focusHandled`,commandHandled:`commandHandled`,showPipe:`showPipe`,showInjector:`showInjector`,showSignals:`showSignals`},decls:4,vars:1,consts:[[`directiveSource`,``],[`filterInput`,``],[`treeEl`,``],[`propFilterInput`,``],[1,`intro`],[1,`toolbar`],[`placeholder`,`Filter by text, <tag> or [directive]`,`describedBy`,`ct-filter-hint`,`saveKey`,`components`,1,`search`,3,`valueChange`,`value`],[`id`,`ct-filter-hint`,1,`sr-only`],[1,`count`],[1,`tree-actions`],[`type`,`button`,`title`,`Directive hosts`,1,`tree-action`],[`type`,`button`,`title`,`Expand all`,1,`tree-action`,3,`click`,`disabled`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`m7 15 5 5 5-5`],[`d`,`m7 9 5-5 5 5`],[1,`label`],[`type`,`button`,`title`,`Collapse all`,1,`tree-action`,3,`click`,`disabled`],[`d`,`m7 20 5-5 5 5`],[`d`,`m7 4 5 5 5-5`],[`type`,`button`,1,`pick`,3,`click`],[`d`,`M4 4l6.5 16 2.3-6.7L19.5 11z`],[`role`,`status`,1,`sr-only`],[1,`pick-message`],[`role`,`status`,1,`notice`],[1,`layout`],[1,`tree-col`],[1,`sr-only`],[1,`state`,`compact`,`tree`],[1,`window-note`],[`role`,`tree`,`aria-label`,`Component instances`,1,`tree`,3,`keydown`,`hidden`],[`role`,`treeitem`,1,`row`,3,`selected`,`dir-host`,`--%NS%depth`],[`aria-hidden`,`true`,1,`name-tip`,`mono`,3,`top`],[`aria-labelledby`,`ct-detail-title`,1,`detail`],[1,`detail`,`placeholder`],[3,`showOwner`,`showNode`,`highlight`,`blocks`,`truncated`,`clockOffset`,`mismatches`],[`capability`,`deferBlocks`,`compact`,``,1,`defer`,3,`page`],[3,`report`],[3,`showOwner`,`highlight`,`blocks`,`truncated`,`supported`,`angular`],[`id`,`ct-page-label`,1,`sr-only`],[`labelledBy`,`ct-page-label`,1,`page-select`,3,`valueChange`,`options`,`value`],[`type`,`button`,`title`,`Directive hosts`,1,`tree-action`,3,`click`],[`d`,`M8 4H5v16h3`],[`d`,`M16 4h3v16h-3`],[1,`state-title`],[1,`state-hint`],[`type`,`button`,3,`click`],[`role`,`treeitem`,1,`row`,3,`click`,`focus`,`blur`,`keydown.escape`,`mouseenter`,`mouseleave`],[`aria-hidden`,`true`,1,`twisty`,3,`open`],[`aria-hidden`,`true`,1,`twisty-space`],[3,`class`],[1,`routed`],[1,`checks`],[1,`dirs`],[`aria-hidden`,`true`,1,`twisty`,3,`click`],[`viewBox`,`0 0 24 24`],[`d`,`m9 6 6 6-6 6`],[1,`tag`,`host-tag`,`mono`],[1,`host-dirs`,`mono`],[1,`name`,`mono`],[1,`tag`,`mono`],[`aria-hidden`,`true`,1,`name-tip`,`mono`],[1,`detail-head`],[1,`badge`],[`id`,`ct-detail-title`,1,`mono`],[1,`mono`,`muted`],[1,`block`],[1,`pill`],[1,`chips`],[1,`chip`,`mono`],[1,`empty-line`],[1,`actions`,`owner-action`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[1,`where`,`mono`],[1,`actions`],[1,`console-global`,3,`rpc`,`pageId`,`target`,`label`],[`role`,`status`,1,`state`,`compact`],[3,`file`,`line`],[1,`where`,`mono`,`guess`,3,`title`],[1,`where`,`guess`,3,`title`],[1,`likely`],[1,`guess-text`],[1,`guess-list`,`mono`],[`role`,`group`,`aria-label`,`Chrome DevTools`,1,`actions`],[`role`,`status`,1,`where`,`action-message`],[`type`,`button`,1,`show-form`],[`type`,`button`,1,`show-form`,3,`click`],[`type`,`button`],[`role`,`group`,`aria-label`,`Copy`,1,`actions`],[1,`facts`],[1,`mono`],[1,`prop-filter`],[`label`,`Filter values`,`placeholder`,`Filter inputs, outputs and properties by name`,1,`search`,3,`valueChange`,`value`],[1,`deps`],[3,`rpc`,`pageId`,`component`,`canShowPipes`],[3,`value`],[1,`state`,`compact`],[1,`props`],[1,`prop`,3,`changed`],[1,`prop`],[1,`prop-name`,`mono`],[1,`muted`],[3,`prop`,`store`,`query`,`componentId`,`pageId`,`rpc`,`writes`],[1,`chip`,3,`on`],[1,`chip`],[1,`chip-note`],[1,`flag`],[`type`,`button`,1,`signal-link`],[`type`,`button`,1,`signal-link`,3,`click`],[1,`directive-where`,`mono`],[3,`prop`,`store`,`query`,`directive`,`componentId`,`pageId`,`rpc`],[1,`dep`],[1,`token`,`mono`],[1,`from`],[1,`from`,`missing`],[3,`showPipe`,`rpc`,`pageId`,`component`,`canShowPipes`],[`aria-hidden`,`true`,1,`spinner`],[3,`overlay`,`showNode`,`highlight`,`report`],[3,`showComponent`,`page`,`pageId`,`rpc`,`native`],[3,`showComponent`,`highlight`,`report`,`pageId`,`rpc`,`angular`],[1,`notice`],[`placeholder`,`Filter by selector, class or file`,`saveKey`,`components-source`,1,`search`,3,`valueChange`,`value`],[`aria-live`,`polite`,1,`count`],[`type`,`button`,1,`refresh`,3,`click`],[`d`,`M20 12a8 8 0 1 1-2.34-5.66`],[`d`,`M20 4v5h-5`],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[1,`state`],[`role`,`list`,1,`source-list`],[1,`source-item`,3,`expanded`],[1,`source-item`],[`type`,`button`,1,`source-toggle`,3,`click`],[1,`kind-flag`],[1,`row-main`],[1,`selector`,`mono`],[1,`file`,`mono`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[1,`inline-detail`,3,`id`],[1,`directive-guess`,3,`title`],[1,`chip-note`,3,`title`]],template:function(e,t){e&1&&(A(0,XF,52,36)(1,hI,17,7),Dh(2,vI,3,2,`ng-template`,null,0,q_)),e&2&&j(+!t.live())},dependencies:[nP,cP,Uv,OD,aj,Cj,yM,EM,XM,sN,ZD,RN,hD,cD],styles:[`[_nghost-%COMP%] { display: block; color: var(--%NS%text); font-size: 13px; @@ -3913,7 +3927,7 @@ pre[_ngcontent-%COMP%] { .inline-detail[_ngcontent-%COMP%] .show-form[_ngcontent-%COMP%] { margin: 0 16px; -}`]})};function SI(e){return e.line?`${e.file}:${e.line}`:e.file}function CI(e,t){let n=t.filter(t=>t.fullPath===e.fullPath&&t.redirectTo!==void 0==(e.redirectTo!==void 0));return n.find(t=>!!e.component&&t.component===e.component)??n.find(t=>!t.component||!e.component)}var wI=vT;function TI(e){return e.startsWith(`/`)&&!e.startsWith(`//`)&&!/^\/*[a-z][a-z0-9+.-]*:/i.test(e)&&!e.includes(`[redacted]`)&&e.length<=2e3}var EI=`Could not reach the page.`;async function DI(e,t,n){return await wI(e,`request-router-action`,{pageId:t,request:n})??{error:`Could not reach the page.`}}function OI(e){return e===`succeeded`?`good`:e===`redirected`||e===`pending`||e===`skipped`?`warn`:e===`cancelled`||e===`failed`?`bad`:``}var kI=()=>[],AI=(e,t)=>t[0],jI=(e,t)=>t.input;function MI(e,t){if(e&1&&(R(0,`p`,3),K(1,` The browser shows `),R(2,`code`),K(3),z(),K(4,`, not the router URL (skipLocationChange, browserUrl, a failed navigation or code that changed history). `),z()),e&2){let e=W();D(3),q(e.browserUrl)}}function NI(e,t){if(e&1&&(R(0,`p`,13),K(1),z()),e&2){let e=W(3);D(),q(e.navigationOff)}}function PI(e,t){if(e&1){let e=B();R(0,`div`,9),og(1,`span`,10),R(2,`span`,11),K(3,`Navigating to `),R(4,`code`),K(5),z(),K(6),z(),R(7,`button`,12),U(`click`,function(){return C(e),w(W(2).abort())}),K(8,` Abort `),z()(),A(9,NI,2,1,`p`,13)}if(e&2){let e=t,n=W(2);D(5),q(e.url),D(),J(` (#`,e.id,`)`),D(),V(`disabled`,!n.navigationAllowed()),k(`aria-describedby`,n.navigationAllowed()?null:`route-current-writes-off`),D(2),j(n.navigationAllowed()?-1:9)}}function FI(e,t){if(e&1&&(R(0,`p`,4),K(1),z()),e&2){let e=W(2);D(),q(e.message())}}function II(e,t){if(e&1&&(R(0,`dt`),K(1,`Document title`),z(),R(2,`dd`),K(3),z()),e&2){let e=W();D(3),q(e.title)}}function LI(e,t){if(e&1&&(R(0,`dt`),K(1,`Query params`),z(),R(2,`dd`)(3,`code`),K(4),V_(5,`json`),z()()),e&2){let e=W();D(4),q(H_(5,1,e.queryParams))}}function RI(e,t){if(e&1&&(R(0,`dt`),K(1,`Fragment`),z(),R(2,`dd`)(3,`code`),K(4),z()()),e&2){let e=W();D(4),q(e.fragment)}}function zI(e,t){if(e&1&&(R(0,`span`,15),K(1),z()),e&2){let e=W().$implicit;D(),J(`, `,e.nesting)}}function BI(e,t){if(e&1&&(R(0,`span`,16),K(1),z()),e&2){let e=W().$implicit;D(),q(e.route.outlet)}}function VI(e,t){e&1&&(R(0,`span`,16),K(1,`lazy`),z())}function HI(e,t){if(e&1&&(R(0,`div`,17),K(1),z()),e&2){let e=W().$implicit;D(),Y(` title `,e.route.title,``,e.route.ownTitle===!1?` (inherited)`:``,` `)}}function UI(e,t){if(e&1&&(R(0,`code`,18),K(1),z()),e&2){let e=W().$implicit;D(),q(e.route.component)}}function WI(e,t){e&1&&(R(0,`span`,21),K(1,`–`),z(),R(2,`span`,15),K(3,`none`),z())}function GI(e,t){e&1&&(R(0,`span`,16),K(1,`inherited`),z())}function KI(e,t){if(e&1&&(R(0,`div`,19)(1,`code`),K(2),V_(3,`json`),z(),A(4,GI,2,0,`span`,16),z()),e&2){let e=t.$implicit,n=W().$implicit;D(2),Y(``,e[0],`: `,H_(3,3,e[1])),D(2),j(n.route.paramSources?.[e[0]]===`inherited`?4:-1)}}function qI(e,t){e&1&&(R(0,`span`,21),K(1,`–`),z(),R(2,`span`,15),K(3,`none`),z())}function JI(e,t){e&1&&(R(0,`span`,16),K(1),z()),e&2&&(D(),q(t))}function YI(e,t){if(e&1&&(R(0,`div`,20)(1,`code`),K(2),V_(3,`json`),z(),A(4,JI,2,1,`span`,16),z()),e&2){let e,n=t.$implicit,r=W().$implicit;D(2),Y(``,n[0],`: `,H_(3,3,n[1])),D(2),j((e=r.route.dataSources?.[n[0]])?4:-1,e)}}function XI(e,t){e&1&&(R(0,`span`,21),K(1,`–`),z(),R(2,`span`,15),K(3,`none`),z())}function ZI(e,t){if(e&1&&(R(0,`span`,16),K(1),z()),e&2){let e=t.$implicit;D(),q(e)}}function QI(e,t){if(e&1&&(R(0,`span`,16),K(1),z()),e&2){let e=t.$implicit;D(),J(`resolve `,e)}}function $I(e,t){e&1&&(R(0,`span`,21),K(1,`–`),z(),R(2,`span`,15),K(3,`none`),z())}function eL(e,t){if(e&1&&(R(0,`tr`)(1,`td`,14),K(2),A(3,zI,2,1,`span`,15),A(4,BI,2,1,`span`,16),A(5,VI,2,0,`span`,16),A(6,HI,2,2,`div`,17),z(),R(7,`td`),A(8,UI,2,1,`code`,18)(9,WI,4,0),z(),R(10,`td`),M(11,KI,5,5,`div`,19,AI,!1,qI,4,0),z(),R(14,`td`),M(15,YI,5,5,`div`,20,AI,!1,XI,4,0),z(),R(18,`td`),M(19,ZI,2,1,`span`,16,Yh),M(21,QI,2,1,`span`,16,Yh),A(23,$I,4,0),z()()),e&2){let e=t.$implicit,n=W(2);D(),Xg(`padding-left`,14+e.depth*16,`px`),D(),J(` `,e.label,` `),D(),j(e.nesting?3:-1),D(),j(e.route.outlet===`primary`?-1:4),D(),j(e.route.lazy?5:-1),D(),j(e.route.title?6:-1),D(2),j(e.route.component?8:9),D(3),N(n.entries(e.route.params)),D(4),N(n.entries(e.route.data)),D(4),N(n.guardList(e.route)),D(2),N(e.route.resolvers??F_(11,kI)),D(2),j(!n.guardList(e.route).length&&!e.route.resolvers?.length?23:-1)}}function tL(e,t){if(e&1&&(R(0,`span`,15),K(1),z()),e&2){let e=W().$implicit;D(),J(``,e.nesting,`, `)}}function nL(e,t){if(e&1){let e=B();R(0,`button`,27),U(`click`,function(){C(e);let t=W(2).$implicit,n=W(3);return w(n.showComponent.emit({pageId:n.page().pageId,id:t.outlet.devtoolsId}))}),K(1,` Show in Components`),R(2,`span`,15),K(3),z()()}if(e&2){let e=W(2).$implicit;D(3),J(`: `,e.outlet.component??e.outlet.element??`routed component`)}}function rL(e,t){if(e&1&&(R(0,`code`),K(1),z(),K(2,` for `),R(3,`code`),K(4),z(),A(5,nL,4,1,`button`,26)),e&2){let e=W().$implicit,t=W(3);D(),q(e.outlet.component??`?`),D(3),q(e.outlet.route??`?`),D(),j(e.outlet.devtoolsId&&t.componentsOn()?5:-1)}}function iL(e,t){e&1&&(R(0,`span`,24),K(1,`not activated`),z())}function aL(e,t){e&1&&(R(0,`span`,16),K(1,`detached by reuse strategy`),z())}function oL(e,t){if(e&1&&(R(0,`span`,16),K(1),z()),e&2){let e=t.$implicit;D(),Y(`input `,e.input,` ← `,e.source)}}function sL(e,t){if(e&1&&(R(0,`span`,25),K(1,`routerOutletData `),R(2,`code`),K(3),z()()),e&2){let e=W().$implicit;D(3),q(e.outlet.data)}}function cL(e,t){if(e&1&&(R(0,`li`)(1,`span`,16),K(2),z(),A(3,tL,2,1,`span`,15),A(4,rL,6,3)(5,iL,2,0,`span`,24),A(6,aL,2,0,`span`,16),M(7,oL,2,2,`span`,16,jI),A(9,sL,4,1,`span`,25),z()),e&2){let e=t.$implicit,n=W(3);Xg(`padding-left`,10+e.depth*16,`px`),D(2),q(e.outlet.outlet),D(),j(e.nesting?3:-1),D(),j(e.outlet.activated?4:5),D(2),j(e.outlet.detached?6:-1),D(),N(n.boundInputs(e.outlet)),D(2),j(e.outlet.data===void 0?-1:9)}}function lL(e,t){if(e&1&&(R(0,`h3`),K(1,`Outlets`),z(),R(2,`ul`,22),M(3,cL,10,7,`li`,23,Jh),z()),e&2){let e=W(2);D(3),N(e.outletRows())}}function uL(e,t){if(e&1&&(R(0,`p`,1)(1,`span`,2),K(2,`URL`),z(),R(3,`code`),K(4),z()(),A(5,MI,5,1,`p`,3),A(6,PI,10,5),A(7,FI,2,1,`p`,4),R(8,`dl`,5),A(9,II,4,1),A(10,LI,6,3),A(11,RI,5,1),z(),R(12,`h3`),K(13,`Active routes`),z(),R(14,`div`,6)(15,`table`,7)(16,`thead`)(17,`tr`)(18,`th`,8),K(19,`Route`),z(),R(20,`th`,8),K(21,`Component`),z(),R(22,`th`,8),K(23,`Params`),z(),R(24,`th`,8),K(25,`Data`),z(),R(26,`th`,8),K(27,`Guards and resolvers`),z()()(),R(28,`tbody`),M(29,eL,24,12,`tr`,null,Jh),z()()(),A(31,lL,5,0)),e&2){let e,n=t,r=W();D(4),q(n.url),D(),j(n.urlDrift&&n.browserUrl?5:-1),D(),j((e=n.pending)?6:-1,e),D(),j(r.message()?7:-1),D(2),j(n.title?9:-1),D(),j(r.hasKeys(n.queryParams)?10:-1),D(),j(n.fragment?11:-1),D(18),N(r.rows()),D(2),j(r.outletRows().length?31:-1)}}function dL(e,t){e&1&&(R(0,`div`,0)(1,`p`,28),K(2,`This page reports no Router.`),z(),R(3,`p`,24),K(4,` Add `),R(5,`code`),K(6,`provideRouter()`),z(),K(7,` to the app config and navigate once to see the active routes here. `),z()())}function fL(e){return e.component?`${e.component} in the ${e.outlet} outlet`:`the ${e.outlet} outlet`}var pL=class e{page=$.required();rpc=$(null);navigationAllowed=X(()=>IT(this.rpc(),`router`));navigationOff=Uw(`router`);componentsOn=X(()=>NT(this.rpc()).inspectors.components);showComponent=Q_();pageId=X(()=>this.page().pageId);message=Q({source:this.pageId,computation:()=>``});rows=X(()=>{let e=[],t=(n,r,i)=>{let a=r===0&&!n.path?`(root)`:`/`+n.path,o=i===void 0?void 0:`level ${r+1}, child of ${i}`;e.push({route:n,depth:r,label:a,nesting:o});for(let e of n.children)t(e,r+1,a)},n=this.page().snapshot?.root;return n&&t(n,0),e});outletRows=X(()=>{let e=[],t=(n,r,i)=>{for(let a of n){let n=i&&`level ${r+1}, inside ${fL(i)}`;e.push({outlet:a,depth:r,nesting:n}),a.children&&t(a.children,r+1,a)}};return t(this.page().outlets??[],0),e});hasKeys(e){return Object.keys(e).length>0}entries(e){return Object.entries(e)}guardList(e){return Object.entries(e.guards??{}).flatMap(([e,t])=>t.map(t=>`${e} ${t}`))}boundInputs(e){return(e.inputs??[]).filter(e=>e.source!==`unset`)}async abort(){let e=this.pageId(),t=await DI(this.rpc(),e,{action:`abort`});e===this.pageId()&&this.message.set(t.error?String(t.error):`Aborted navigation #${t.aborted}.`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-route-current`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},outputs:{showComponent:`showComponent`},decls:2,vars:1,consts:[[1,`empty`],[1,`url`],[1,`url-label`],[`role`,`note`,1,`note`],[`role`,`status`,1,`muted`],[1,`facts`],[`role`,`region`,`aria-label`,`Active routes`,`tabindex`,`0`,1,`table-scroll`],[1,`active-routes`],[`scope`,`col`],[`role`,`status`,1,`pending`],[`aria-hidden`,`true`,1,`pulse`],[1,`pending-text`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`id`,`route-current-writes-off`,1,`muted`],[1,`path`],[1,`visually-hidden`],[1,`tag`],[1,`sub`],[1,`component`],[1,`entry`],[1,`entry`,`data`],[`aria-hidden`,`true`,1,`nil`],[1,`outlets`],[3,`padding-left`],[1,`muted`],[1,`outlet-data`],[`type`,`button`,1,`small`,`show-component`],[`type`,`button`,1,`small`,`show-component`,3,`click`],[1,`empty-title`]],template:function(e,t){if(e&1&&A(0,uL,32,8)(1,dL,8,0,`div`,0),e&2){let e;j((e=t.page().snapshot)?0:1,e)}},dependencies:[Uv],styles:[`.muted[_ngcontent-%COMP%] { +}`]})};function DI(e){return e.line?`${e.file}:${e.line}`:e.file}function OI(e,t){let n=t.filter(t=>t.fullPath===e.fullPath&&t.redirectTo!==void 0==(e.redirectTo!==void 0));return n.find(t=>!!e.component&&t.component===e.component)??n.find(t=>!t.component||!e.component)}var kI=vT;function AI(e){return e.startsWith(`/`)&&!e.startsWith(`//`)&&!/^\/*[a-z][a-z0-9+.-]*:/i.test(e)&&!e.includes(`[redacted]`)&&e.length<=2e3}var jI=`Could not reach the page.`;async function MI(e,t,n){return await kI(e,`request-router-action`,{pageId:t,request:n})??{error:`Could not reach the page.`}}function NI(e){return e===`succeeded`?`good`:e===`redirected`||e===`pending`||e===`skipped`?`warn`:e===`cancelled`||e===`failed`?`bad`:``}var PI=()=>[],FI=(e,t)=>t[0],II=(e,t)=>t.input;function LI(e,t){if(e&1&&(R(0,`p`,3),K(1,` The browser shows `),R(2,`code`),K(3),z(),K(4,`, not the router URL (skipLocationChange, browserUrl, a failed navigation or code that changed history). `),z()),e&2){let e=W();D(3),q(e.browserUrl)}}function RI(e,t){if(e&1&&(R(0,`p`,13),K(1),z()),e&2){let e=W(3);D(),q(e.navigationOff)}}function zI(e,t){if(e&1){let e=B();R(0,`div`,9),sg(1,`span`,10),R(2,`span`,11),K(3,`Navigating to `),R(4,`code`),K(5),z(),K(6),z(),R(7,`button`,12),U(`click`,function(){return C(e),w(W(2).abort())}),K(8,` Abort `),z()(),A(9,RI,2,1,`p`,13)}if(e&2){let e=t,n=W(2);D(5),q(e.url),D(),J(` (#`,e.id,`)`),D(),V(`disabled`,!n.navigationAllowed()),k(`aria-describedby`,n.navigationAllowed()?null:`route-current-writes-off`),D(2),j(n.navigationAllowed()?-1:9)}}function BI(e,t){if(e&1&&(R(0,`p`,4),K(1),z()),e&2){let e=W(2);D(),q(e.message())}}function VI(e,t){if(e&1&&(R(0,`dt`),K(1,`Document title`),z(),R(2,`dd`),K(3),z()),e&2){let e=W();D(3),q(e.title)}}function HI(e,t){if(e&1&&(R(0,`dt`),K(1,`Query params`),z(),R(2,`dd`)(3,`code`),K(4),U_(5,`json`),z()()),e&2){let e=W();D(4),q(W_(5,1,e.queryParams))}}function UI(e,t){if(e&1&&(R(0,`dt`),K(1,`Fragment`),z(),R(2,`dd`)(3,`code`),K(4),z()()),e&2){let e=W();D(4),q(e.fragment)}}function WI(e,t){if(e&1&&(R(0,`span`,15),K(1),z()),e&2){let e=W().$implicit;D(),J(`, `,e.nesting)}}function GI(e,t){if(e&1&&(R(0,`span`,16),K(1),z()),e&2){let e=W().$implicit;D(),q(e.route.outlet)}}function KI(e,t){e&1&&(R(0,`span`,16),K(1,`lazy`),z())}function qI(e,t){if(e&1&&(R(0,`div`,17),K(1),z()),e&2){let e=W().$implicit;D(),Y(` title `,e.route.title,``,e.route.ownTitle===!1?` (inherited)`:``,` `)}}function JI(e,t){if(e&1&&(R(0,`code`,18),K(1),z()),e&2){let e=W().$implicit;D(),q(e.route.component)}}function YI(e,t){e&1&&(R(0,`span`,21),K(1,`–`),z(),R(2,`span`,15),K(3,`none`),z())}function XI(e,t){e&1&&(R(0,`span`,16),K(1,`inherited`),z())}function ZI(e,t){if(e&1&&(R(0,`div`,19)(1,`code`),K(2),U_(3,`json`),z(),A(4,XI,2,0,`span`,16),z()),e&2){let e=t.$implicit,n=W().$implicit;D(2),Y(``,e[0],`: `,W_(3,3,e[1])),D(2),j(n.route.paramSources?.[e[0]]===`inherited`?4:-1)}}function QI(e,t){e&1&&(R(0,`span`,21),K(1,`–`),z(),R(2,`span`,15),K(3,`none`),z())}function $I(e,t){e&1&&(R(0,`span`,16),K(1),z()),e&2&&(D(),q(t))}function eL(e,t){if(e&1&&(R(0,`div`,20)(1,`code`),K(2),U_(3,`json`),z(),A(4,$I,2,1,`span`,16),z()),e&2){let e,n=t.$implicit,r=W().$implicit;D(2),Y(``,n[0],`: `,W_(3,3,n[1])),D(2),j((e=r.route.dataSources?.[n[0]])?4:-1,e)}}function tL(e,t){e&1&&(R(0,`span`,21),K(1,`–`),z(),R(2,`span`,15),K(3,`none`),z())}function nL(e,t){if(e&1&&(R(0,`span`,16),K(1),z()),e&2){let e=t.$implicit;D(),q(e)}}function rL(e,t){if(e&1&&(R(0,`span`,16),K(1),z()),e&2){let e=t.$implicit;D(),J(`resolve `,e)}}function iL(e,t){e&1&&(R(0,`span`,21),K(1,`–`),z(),R(2,`span`,15),K(3,`none`),z())}function aL(e,t){if(e&1&&(R(0,`tr`)(1,`td`,14),K(2),A(3,WI,2,1,`span`,15),A(4,GI,2,1,`span`,16),A(5,KI,2,0,`span`,16),A(6,qI,2,2,`div`,17),z(),R(7,`td`),A(8,JI,2,1,`code`,18)(9,YI,4,0),z(),R(10,`td`),M(11,ZI,5,5,`div`,19,FI,!1,QI,4,0),z(),R(14,`td`),M(15,eL,5,5,`div`,20,FI,!1,tL,4,0),z(),R(18,`td`),M(19,nL,2,1,`span`,16,Xh),M(21,rL,2,1,`span`,16,Xh),A(23,iL,4,0),z()()),e&2){let e=t.$implicit,n=W(2);D(),Zg(`padding-left`,14+e.depth*16,`px`),D(),J(` `,e.label,` `),D(),j(e.nesting?3:-1),D(),j(e.route.outlet===`primary`?-1:4),D(),j(e.route.lazy?5:-1),D(),j(e.route.title?6:-1),D(2),j(e.route.component?8:9),D(3),N(n.entries(e.route.params)),D(4),N(n.entries(e.route.data)),D(4),N(n.guardList(e.route)),D(2),N(e.route.resolvers??L_(11,PI)),D(2),j(!n.guardList(e.route).length&&!e.route.resolvers?.length?23:-1)}}function oL(e,t){if(e&1&&(R(0,`span`,15),K(1),z()),e&2){let e=W().$implicit;D(),J(``,e.nesting,`, `)}}function sL(e,t){if(e&1){let e=B();R(0,`button`,27),U(`click`,function(){C(e);let t=W(2).$implicit,n=W(3);return w(n.showComponent.emit({pageId:n.page().pageId,id:t.outlet.devtoolsId}))}),K(1,` Show in Components`),R(2,`span`,15),K(3),z()()}if(e&2){let e=W(2).$implicit;D(3),J(`: `,e.outlet.component??e.outlet.element??`routed component`)}}function cL(e,t){if(e&1&&(R(0,`code`),K(1),z(),K(2,` for `),R(3,`code`),K(4),z(),A(5,sL,4,1,`button`,26)),e&2){let e=W().$implicit,t=W(3);D(),q(e.outlet.component??`?`),D(3),q(e.outlet.route??`?`),D(),j(e.outlet.devtoolsId&&t.componentsOn()?5:-1)}}function lL(e,t){e&1&&(R(0,`span`,24),K(1,`not activated`),z())}function uL(e,t){e&1&&(R(0,`span`,16),K(1,`detached by reuse strategy`),z())}function dL(e,t){if(e&1&&(R(0,`span`,16),K(1),z()),e&2){let e=t.$implicit;D(),Y(`input `,e.input,` ← `,e.source)}}function fL(e,t){if(e&1&&(R(0,`span`,25),K(1,`routerOutletData `),R(2,`code`),K(3),z()()),e&2){let e=W().$implicit;D(3),q(e.outlet.data)}}function pL(e,t){if(e&1&&(R(0,`li`)(1,`span`,16),K(2),z(),A(3,oL,2,1,`span`,15),A(4,cL,6,3)(5,lL,2,0,`span`,24),A(6,uL,2,0,`span`,16),M(7,dL,2,2,`span`,16,II),A(9,fL,4,1,`span`,25),z()),e&2){let e=t.$implicit,n=W(3);Zg(`padding-left`,10+e.depth*16,`px`),D(2),q(e.outlet.outlet),D(),j(e.nesting?3:-1),D(),j(e.outlet.activated?4:5),D(2),j(e.outlet.detached?6:-1),D(),N(n.boundInputs(e.outlet)),D(2),j(e.outlet.data===void 0?-1:9)}}function mL(e,t){if(e&1&&(R(0,`h3`),K(1,`Outlets`),z(),R(2,`ul`,22),M(3,pL,10,7,`li`,23,Yh),z()),e&2){let e=W(2);D(3),N(e.outletRows())}}function hL(e,t){if(e&1&&(R(0,`p`,1)(1,`span`,2),K(2,`URL`),z(),R(3,`code`),K(4),z()(),A(5,LI,5,1,`p`,3),A(6,zI,10,5),A(7,BI,2,1,`p`,4),R(8,`dl`,5),A(9,VI,4,1),A(10,HI,6,3),A(11,UI,5,1),z(),R(12,`h3`),K(13,`Active routes`),z(),R(14,`div`,6)(15,`table`,7)(16,`thead`)(17,`tr`)(18,`th`,8),K(19,`Route`),z(),R(20,`th`,8),K(21,`Component`),z(),R(22,`th`,8),K(23,`Params`),z(),R(24,`th`,8),K(25,`Data`),z(),R(26,`th`,8),K(27,`Guards and resolvers`),z()()(),R(28,`tbody`),M(29,aL,24,12,`tr`,null,Yh),z()()(),A(31,mL,5,0)),e&2){let e,n=t,r=W();D(4),q(n.url),D(),j(n.urlDrift&&n.browserUrl?5:-1),D(),j((e=n.pending)?6:-1,e),D(),j(r.message()?7:-1),D(2),j(n.title?9:-1),D(),j(r.hasKeys(n.queryParams)?10:-1),D(),j(n.fragment?11:-1),D(18),N(r.rows()),D(2),j(r.outletRows().length?31:-1)}}function gL(e,t){e&1&&(R(0,`div`,0)(1,`p`,28),K(2,`This page reports no Router.`),z(),R(3,`p`,24),K(4,` Add `),R(5,`code`),K(6,`provideRouter()`),z(),K(7,` to the app config and navigate once to see the active routes here. `),z()())}function _L(e){return e.component?`${e.component} in the ${e.outlet} outlet`:`the ${e.outlet} outlet`}var vL=class e{page=$.required();rpc=$(null);navigationAllowed=X(()=>IT(this.rpc(),`router`));navigationOff=Uw(`router`);componentsOn=X(()=>NT(this.rpc()).inspectors.components);showComponent=ev();pageId=X(()=>this.page().pageId);message=Q({source:this.pageId,computation:()=>``});rows=X(()=>{let e=[],t=(n,r,i)=>{let a=r===0&&!n.path?`(root)`:`/`+n.path,o=i===void 0?void 0:`level ${r+1}, child of ${i}`;e.push({route:n,depth:r,label:a,nesting:o});for(let e of n.children)t(e,r+1,a)},n=this.page().snapshot?.root;return n&&t(n,0),e});outletRows=X(()=>{let e=[],t=(n,r,i)=>{for(let a of n){let n=i&&`level ${r+1}, inside ${_L(i)}`;e.push({outlet:a,depth:r,nesting:n}),a.children&&t(a.children,r+1,a)}};return t(this.page().outlets??[],0),e});hasKeys(e){return Object.keys(e).length>0}entries(e){return Object.entries(e)}guardList(e){return Object.entries(e.guards??{}).flatMap(([e,t])=>(t??[]).map(t=>`${e} ${t}`))}boundInputs(e){return(e.inputs??[]).filter(e=>e.source!==`unset`)}async abort(){let e=this.pageId(),t=await MI(this.rpc(),e,{action:`abort`});e===this.pageId()&&this.message.set(t.error?String(t.error):`Aborted navigation #${t.aborted}.`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-route-current`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},outputs:{showComponent:`showComponent`},decls:2,vars:1,consts:[[1,`empty`],[1,`url`],[1,`url-label`],[`role`,`note`,1,`note`],[`role`,`status`,1,`muted`],[1,`facts`],[`role`,`region`,`aria-label`,`Active routes`,`tabindex`,`0`,1,`table-scroll`],[1,`active-routes`],[`scope`,`col`],[`role`,`status`,1,`pending`],[`aria-hidden`,`true`,1,`pulse`],[1,`pending-text`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`id`,`route-current-writes-off`,1,`muted`],[1,`path`],[1,`visually-hidden`],[1,`tag`],[1,`sub`],[1,`component`],[1,`entry`],[1,`entry`,`data`],[`aria-hidden`,`true`,1,`nil`],[1,`outlets`],[3,`padding-left`],[1,`muted`],[1,`outlet-data`],[`type`,`button`,1,`small`,`show-component`],[`type`,`button`,1,`small`,`show-component`,3,`click`],[1,`empty-title`]],template:function(e,t){if(e&1&&A(0,hL,32,8)(1,gL,8,0,`div`,0),e&2){let e;j((e=t.page().snapshot)?0:1,e)}},dependencies:[Gv],styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); font-size: 13px; line-height: 1.5; @@ -4357,7 +4371,7 @@ h3[_ngcontent-%COMP%] { display: block; color: var(--%NS%text-2); font-size: 12px; -}`]})},mL=(e,t)=>t.title,hL=(e,t)=>t.field;function gL(e,t){e&1&&(F(0,`div`,1)(1,`p`,2),K(2,`Two navigations are needed to compare.`),I(),F(3,`p`,3),K(4,`Navigate in the app, then come back to this view.`),I()())}function _L(e,t){if(e&1&&(F(0,`p`,10),K(1),I()),e&2){let e=W();D(),q(e.error)}}function vL(e,t){if(e&1&&(F(0,`p`,10),K(1),I()),e&2){let e=W(2);D(),Y(`Nothing recorded differs between #`,e.a,` and #`,e.b,`.`)}}function yL(e,t){if(e&1&&(F(0,`code`),K(1),I()),e&2){let e=W().$implicit;D(),q(e.before)}}function bL(e,t){e&1&&(F(0,`span`,16),K(1,`none`),I())}function xL(e,t){if(e&1&&(F(0,`code`),K(1),I()),e&2){let e=W().$implicit;D(),q(e.after)}}function SL(e,t){e&1&&(F(0,`span`,16),K(1,`none`),I())}function CL(e,t){if(e&1&&(F(0,`tr`)(1,`th`,15),K(2),I(),F(3,`td`),A(4,yL,2,1,`code`)(5,bL,2,0,`span`,16),I(),F(6,`td`),A(7,xL,2,1,`code`)(8,SL,2,0,`span`,16),I()()),e&2){let e=t.$implicit;D(2),q(e.field),D(2),j(e.before===void 0?5:4),D(3),j(e.after===void 0?8:7)}}function wL(e,t){if(e&1&&(F(0,`div`,11)(1,`h3`,12),K(2),I(),F(3,`div`,13)(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,14),K(8,`Field`),I(),F(9,`th`,14),K(10),I(),F(11,`th`,14),K(12),I()()(),F(13,`tbody`),M(14,CL,9,3,`tr`,null,hL),I()()()()),e&2){let e=t.$implicit,n=t.$index,r=W(2);D(),P(`id`,`route-diff-`+n),D(),q(e.title),D(),k(`aria-label`,e.title+` changes`),D(7),J(`#`,r.a),D(2),J(`#`,r.b),D(2),N(e.changes)}}function TL(e,t){if(e&1&&(F(0,`p`,3),K(1),I()),e&2){let e=W(2);D(),J(`Same in both: `,e.same.join(`, `),`.`)}}function EL(e,t){if(e&1&&(F(0,`p`,3),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function DL(e,t){if(e&1&&(A(0,vL,2,2,`p`,10),M(1,wL,16,5,`div`,11,mL),A(3,TL,2,1,`p`,3),M(4,EL,2,1,`p`,3,Yh)),e&2){let e=W();j(e.sections.length?-1:0),D(),N(e.sections),D(2),j(e.same.length?3:-1),D(),N(e.notes)}}function OL(e,t){e&1&&A(0,_L,2,1,`p`,10)(1,DL,6,2),e&2&&j(`error`in t?0:1)}function kL(e,t){if(e&1){let e=B();F(0,`div`,4)(1,`span`,5),K(2,`Earlier`),I(),F(3,`app-select`,6),H(`valueChange`,function(t){return C(e),w(W().a.set(t))}),I(),F(4,`span`,7),K(5,`Later`),I(),F(6,`app-select`,8),H(`valueChange`,function(t){return C(e),w(W().b.set(t))}),I()(),F(7,`p`,9),K(8),I(),A(9,OL,2,1)}if(e&2){let e,t=W();D(3),P(`options`,t.options())(`value`,t.a()),D(3),P(`options`,t.options())(`value`,t.b()),D(2),q(t.announcement()),D(),j((e=t.result())?9:-1,e)}}function AL(e){let t=e.filter(e=>!e.probe&&e.outcome!==`pending`),n=t[t.length-1],r=t[t.length-2];return{a:r?String(r.id):null,b:n?String(n.id):null}}var jL=class e{page=$.required();rpc=$(null);start=$(null);pageId=X(()=>this.page().pageId);options=X(()=>[...this.page().navigations].filter(e=>!e.probe).reverse().map(e=>({value:String(e.id),label:`#${e.id} ${e.finalUrl??e.url}`,hint:e.outcome})));b=Q({source:()=>({page:this.pageId(),start:this.start()}),computation:({start:e})=>e===null?AL(this.page().navigations).b:String(e)});a=Q({source:()=>({page:this.pageId(),b:this.b()}),computation:({b:e},t)=>{let n=this.page().navigations.filter(e=>!e.probe);if(t?.value&&t.value!==e&&t.source.page===this.pageId())return t.value;let r=n.findIndex(t=>String(t.id)===e),i=r>0?n[r-1]:void 0;return i?String(i.id):null}});version=X(()=>this.page().navigations.map(e=>`${e.id}:${e.outcome}`).join(`,`));result=E(null);announcement=E(``);seq=0;constructor(){ac(()=>{let e=this.a(),t=this.b(),n=this.pageId();this.version(),this.compare(n,e,t)})}async compare(e,t,n){let r=++this.seq;if(t===null||n===null){this.result.set(null);return}let i=await wI(this.rpc(),`router-diff`,{pageId:e,a:Number(t),b:Number(n)});r===this.seq&&(this.result.set(i??{error:`Could not reach the page.`}),this.announcement.set(!i||`error`in i?i?.error??`Could not reach the page.`:`${i.sections.length} of ${i.sections.length+i.same.length} parts differ between #${i.a} and #${i.b}.`))}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-route-diff`]],inputs:{page:[1,`page`],rpc:[1,`rpc`],start:[1,`start`]},decls:4,vars:1,consts:[[1,`muted`,`intro`],[1,`empty`],[1,`empty-title`],[1,`muted`],[1,`pick`],[`id`,`route-diff-a-label`,1,`pick-label`],[`labelledBy`,`route-diff-a-label`,3,`valueChange`,`options`,`value`],[`id`,`route-diff-b-label`,1,`pick-label`],[`labelledBy`,`route-diff-b-label`,3,`valueChange`,`options`,`value`],[`role`,`status`,1,`visually-hidden`],[1,`message`],[1,`diff`],[3,`id`],[`role`,`region`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[`scope`,`row`,1,`field-name`],[1,`nil`]],template:function(e,t){e&1&&(F(0,`p`,0),K(1,` Pick two recorded navigations to see which params, data, guards, resolvers, outlets and components changed between them. `),I(),A(2,gL,5,0,`div`,1)(3,kL,10,6)),e&2&&(D(2),j(t.options().length<2?2:3))},dependencies:[OD],styles:[`.muted[_ngcontent-%COMP%] { +}`]})},yL=(e,t)=>t.title,bL=(e,t)=>t.field;function xL(e,t){e&1&&(F(0,`div`,1)(1,`p`,2),K(2,`Two navigations are needed to compare.`),I(),F(3,`p`,3),K(4,`Navigate in the app, then come back to this view.`),I()())}function SL(e,t){if(e&1&&(F(0,`p`,10),K(1),I()),e&2){let e=W();D(),q(e.error)}}function CL(e,t){if(e&1&&(F(0,`p`,10),K(1),I()),e&2){let e=W(2);D(),Y(`Nothing recorded differs between #`,e.a,` and #`,e.b,`.`)}}function wL(e,t){if(e&1&&(F(0,`code`),K(1),I()),e&2){let e=W().$implicit;D(),q(e.before)}}function TL(e,t){e&1&&(F(0,`span`,16),K(1,`none`),I())}function EL(e,t){if(e&1&&(F(0,`code`),K(1),I()),e&2){let e=W().$implicit;D(),q(e.after)}}function DL(e,t){e&1&&(F(0,`span`,16),K(1,`none`),I())}function OL(e,t){if(e&1&&(F(0,`tr`)(1,`th`,15),K(2),I(),F(3,`td`),A(4,wL,2,1,`code`)(5,TL,2,0,`span`,16),I(),F(6,`td`),A(7,EL,2,1,`code`)(8,DL,2,0,`span`,16),I()()),e&2){let e=t.$implicit;D(2),q(e.field),D(2),j(e.before===void 0?5:4),D(3),j(e.after===void 0?8:7)}}function kL(e,t){if(e&1&&(F(0,`div`,11)(1,`h3`,12),K(2),I(),F(3,`div`,13)(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,14),K(8,`Field`),I(),F(9,`th`,14),K(10),I(),F(11,`th`,14),K(12),I()()(),F(13,`tbody`),M(14,OL,9,3,`tr`,null,bL),I()()()()),e&2){let e=t.$implicit,n=t.$index,r=W(2);D(),P(`id`,`route-diff-`+n),D(),q(e.title),D(),k(`aria-label`,e.title+` changes`),D(7),J(`#`,r.a),D(2),J(`#`,r.b),D(2),N(e.changes)}}function AL(e,t){if(e&1&&(F(0,`p`,3),K(1),I()),e&2){let e=W(2);D(),J(`Same in both: `,e.same.join(`, `),`.`)}}function jL(e,t){if(e&1&&(F(0,`p`,3),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function ML(e,t){if(e&1&&(A(0,CL,2,2,`p`,10),M(1,kL,16,5,`div`,11,yL),A(3,AL,2,1,`p`,3),M(4,jL,2,1,`p`,3,Xh)),e&2){let e=W();j(e.sections.length?-1:0),D(),N(e.sections),D(2),j(e.same.length?3:-1),D(),N(e.notes)}}function NL(e,t){e&1&&A(0,SL,2,1,`p`,10)(1,ML,6,2),e&2&&j(`error`in t?0:1)}function PL(e,t){if(e&1){let e=B();F(0,`div`,4)(1,`span`,5),K(2,`Earlier`),I(),F(3,`app-select`,6),H(`valueChange`,function(t){return C(e),w(W().a.set(t))}),I(),F(4,`span`,7),K(5,`Later`),I(),F(6,`app-select`,8),H(`valueChange`,function(t){return C(e),w(W().b.set(t))}),I()(),F(7,`p`,9),K(8),I(),A(9,NL,2,1)}if(e&2){let e,t=W();D(3),P(`options`,t.options())(`value`,t.a()),D(3),P(`options`,t.options())(`value`,t.b()),D(2),q(t.announcement()),D(),j((e=t.result())?9:-1,e)}}function FL(e){let t=e.filter(e=>!e.probe&&e.outcome!==`pending`),n=t[t.length-1],r=t[t.length-2];return{a:r?String(r.id):null,b:n?String(n.id):null}}var IL=class e{page=$.required();rpc=$(null);start=$(null);pageId=X(()=>this.page().pageId);options=X(()=>[...this.page().navigations].filter(e=>!e.probe).reverse().map(e=>({value:String(e.id),label:`#${e.id} ${e.finalUrl??e.url}`,hint:e.outcome})));b=Q({source:()=>({page:this.pageId(),start:this.start()}),computation:({start:e})=>e===null?FL(this.page().navigations).b:String(e)});a=Q({source:()=>({page:this.pageId(),b:this.b()}),computation:({b:e},t)=>{let n=this.page().navigations.filter(e=>!e.probe);if(t?.value&&t.value!==e&&t.source.page===this.pageId())return t.value;let r=n.findIndex(t=>String(t.id)===e),i=r>0?n[r-1]:void 0;return i?String(i.id):null}});version=X(()=>this.page().navigations.map(e=>`${e.id}:${e.outcome}`).join(`,`));result=E(null);announcement=E(``);seq=0;constructor(){ac(()=>{let e=this.a(),t=this.b(),n=this.pageId();this.version(),this.compare(n,e,t)})}async compare(e,t,n){let r=++this.seq;if(t===null||n===null){this.result.set(null);return}let i=await kI(this.rpc(),`router-diff`,{pageId:e,a:Number(t),b:Number(n)});r===this.seq&&(this.result.set(i??{error:`Could not reach the page.`}),this.announcement.set(!i||`error`in i?i?.error??`Could not reach the page.`:`${i.sections.length} of ${i.sections.length+i.same.length} parts differ between #${i.a} and #${i.b}.`))}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-route-diff`]],inputs:{page:[1,`page`],rpc:[1,`rpc`],start:[1,`start`]},decls:4,vars:1,consts:[[1,`muted`,`intro`],[1,`empty`],[1,`empty-title`],[1,`muted`],[1,`pick`],[`id`,`route-diff-a-label`,1,`pick-label`],[`labelledBy`,`route-diff-a-label`,3,`valueChange`,`options`,`value`],[`id`,`route-diff-b-label`,1,`pick-label`],[`labelledBy`,`route-diff-b-label`,3,`valueChange`,`options`,`value`],[`role`,`status`,1,`visually-hidden`],[1,`message`],[1,`diff`],[3,`id`],[`role`,`region`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[`scope`,`row`,1,`field-name`],[1,`nil`]],template:function(e,t){e&1&&(F(0,`p`,0),K(1,` Pick two recorded navigations to see which params, data, guards, resolvers, outlets and components changed between them. `),I(),A(2,xL,5,0,`div`,1)(3,PL,10,6)),e&2&&(D(2),j(t.options().length<2?2:3))},dependencies:[OD],styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); font-size: 13px; line-height: 1.5; @@ -4724,7 +4738,7 @@ td[_ngcontent-%COMP%] code[_ngcontent-%COMP%] { .pick[_ngcontent-%COMP%] { grid-template-columns: minmax(0, 1fr); } -}`]})};function ML(e,t){if(e&1&&(R(0,`span`,8),K(1),z()),e&2){let e=W(2);D(),q(e.plural(e.counts().error,`error`))}}function NL(e,t){if(e&1&&(R(0,`span`,9),K(1),z()),e&2){let e=W(2);D(),q(e.plural(e.counts().warning,`warning`))}}function PL(e,t){if(e&1&&(R(0,`span`,10),K(1),z()),e&2){let e=W(2);D(),J(``,e.counts().info,` info`)}}function FL(e,t){if(e&1&&(R(0,`span`,3),A(1,ML,2,1,`span`,8),A(2,NL,2,1,`span`,9),A(3,PL,2,1,`span`,10),z()),e&2){let e=W();D(),j(e.counts().error?1:-1),D(),j(e.counts().warning?2:-1),D(),j(e.counts().info?3:-1)}}function IL(e,t){if(e&1){let e=B();R(0,`div`,4)(1,`p`,11),K(2,`The route checks could not run.`),z(),R(3,`p`,2),K(4,`The devtools server did not answer. Check that it is still running.`),z(),R(5,`button`,1),U(`click`,function(){return C(e),w(W().run())}),K(6,`Retry`),z()()}}function LL(e,t){e&1&&(R(0,`p`,5),K(1,`Checking…`),z())}function RL(e,t){e&1&&K(0,` The page has not reported its route config yet. It runs in events-only mode, which only limits setup detection, so the checks run once the config arrives. `)}function zL(e,t){e&1&&K(0,` The page has not reported its route config yet. It appears after the app finishes bootstrapping. `)}function BL(e,t){e&1&&K(0,` No page with a router is connected. `)}function VL(e,t){if(e&1&&(R(0,`div`,6)(1,`p`,11),K(2,`No checks ran.`),z(),R(3,`p`,2),A(4,RL,1,0)(5,zL,1,0)(6,BL,1,0),z()()),e&2){let e;D(4),j((e=t)===`events-only`?4:e===`no-config`?5:6)}}function HL(e,t){if(e&1&&(R(0,`li`)(1,`div`,12)(2,`span`,10),K(3),z(),R(4,`code`,13),K(5),z(),R(6,`code`,14),K(7),z()(),R(8,`p`,15),K(9),z(),R(10,`p`,16)(11,`span`,17),K(12,`Fix`),z(),R(13,`span`,18),K(14),R(15,`span`,2),K(16),z()()()()),e&2){let e=t.$implicit,n=W(2);k(`data-severity`,e.severity),D(2),k(`data-tone`,n.severityTone(e.severity)),D(),q(e.severity),D(2),q(e.rule),D(2),q(e.route),D(2),q(e.message),D(5),J(``,e.fix,` `),D(2),J(`(Angular `,e.angular===`throws`?`throws`:e.angular===`warns`?`warns`:`does not warn`,`)`)}}function UL(e,t){if(e&1&&(R(0,`ul`,7),M(1,HL,17,8,`li`,null,Jh),z()),e&2){let e=W();k(`aria-busy`,e.checking()),D(),N(e.findings())}}function WL(e,t){e&1&&(R(0,`div`,6)(1,`span`,19),T(),R(2,`svg`,20),og(3,`path`,21),z()(),cs(),R(4,`p`,11),K(5,`No route config problems found.`),z(),R(6,`p`,2),K(7,`The check runs again after each navigation or config change.`),z()())}var GL=class e{plural=JE;page=$.required();rpc=$(null);result=E(null);failed=E(!1);checking=E(!1);findings=X(()=>{let e=this.result();return e?.checked?e.findings:[]});notChecked=X(()=>{let e=this.result();return e&&!e.checked?e.reason:null});counts=X(()=>{let e={error:0,warning:0,info:0};for(let t of this.findings())e[t.severity]++;return e});key=X(()=>{let e=this.page(),t=e.navigations[e.navigations.length-1],n=JSON.stringify((e.links??[]).map(e=>[e.text,e.href,e.linkActive!==void 0,e.ariaCurrent===void 0])),r=`${e.setup?.mode}/${e.setup?.features?.componentInputBinding}`;return`${e.pageId}:${e.generation}:${t?.id}:${t?.outcome}:${n}:${r}`});seq=0;checkedPage=null;constructor(){ac(()=>{this.key(),Z(()=>void this.run())})}severityTone(e){return e===`error`?`bad`:e===`warning`?`warn`:``}async run(){let e=++this.seq,t=this.page().pageId;t!==this.checkedPage&&this.result.set(null),this.checking.set(!0);let n=await wI(this.rpc(),`router-lint`,t);e===this.seq&&(this.checking.set(!1),this.failed.set(!n),n&&(this.result.set(n),this.checkedPage=t))}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-route-lint`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},decls:11,vars:4,consts:[[1,`toolbar`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`],[1,`summary`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`muted`,`empty`],[1,`empty`],[1,`findings`],[`data-tone`,`bad`,1,`badge`],[`data-tone`,`warn`,1,`badge`],[1,`badge`],[1,`empty-title`],[1,`head`],[1,`rule`],[1,`route`],[1,`message`],[1,`fix`],[1,`fix-label`],[1,`fix-text`],[`aria-hidden`,`true`,1,`ok-mark`],[`width`,`16`,`height`,`16`,`viewBox`,`0 0 24 24`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`2.5`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`],[`d`,`M20 6 9 17l-5-5`]],template:function(e,t){if(e&1&&(R(0,`div`,0)(1,`button`,1),U(`click`,function(){return t.run()}),K(2),z(),R(3,`span`,2),K(4,`Checks the live config, links and recent navigations. Lazy routes that have not loaded are skipped.`),z(),A(5,FL,4,3,`span`,3),z(),A(6,IL,7,0,`div`,4)(7,LL,2,0,`p`,5)(8,VL,7,1,`div`,6)(9,UL,3,1,`ul`,7)(10,WL,8,0,`div`,6)),e&2){let e;D(),k(`aria-busy`,t.checking()),D(),J(` `,t.checking()?`Checking…`:`Check again`,` `),D(3),j(t.result()?.checked&&t.findings().length?5:-1),D(),j(t.failed()?6:t.result()?(e=t.notChecked())?8:t.findings().length?9:10:7,e)}},styles:[`.muted[_ngcontent-%COMP%] { +}`]})};function LL(e,t){if(e&1&&(R(0,`span`,8),K(1),z()),e&2){let e=W(2);D(),q(e.plural(e.counts().error,`error`))}}function RL(e,t){if(e&1&&(R(0,`span`,9),K(1),z()),e&2){let e=W(2);D(),q(e.plural(e.counts().warning,`warning`))}}function zL(e,t){if(e&1&&(R(0,`span`,10),K(1),z()),e&2){let e=W(2);D(),J(``,e.counts().info,` info`)}}function BL(e,t){if(e&1&&(R(0,`span`,3),A(1,LL,2,1,`span`,8),A(2,RL,2,1,`span`,9),A(3,zL,2,1,`span`,10),z()),e&2){let e=W();D(),j(e.counts().error?1:-1),D(),j(e.counts().warning?2:-1),D(),j(e.counts().info?3:-1)}}function VL(e,t){if(e&1){let e=B();R(0,`div`,4)(1,`p`,11),K(2,`The route checks could not run.`),z(),R(3,`p`,2),K(4,`The devtools server did not answer. Check that it is still running.`),z(),R(5,`button`,1),U(`click`,function(){return C(e),w(W().run())}),K(6,`Retry`),z()()}}function HL(e,t){e&1&&(R(0,`p`,5),K(1,`Checking…`),z())}function UL(e,t){e&1&&K(0,` The page has not reported its route config yet. It runs in events-only mode, which only limits setup detection, so the checks run once the config arrives. `)}function WL(e,t){e&1&&K(0,` The page has not reported its route config yet. It appears after the app finishes bootstrapping. `)}function GL(e,t){e&1&&K(0,` No page with a router is connected. `)}function KL(e,t){if(e&1&&(R(0,`div`,6)(1,`p`,11),K(2,`No checks ran.`),z(),R(3,`p`,2),A(4,UL,1,0)(5,WL,1,0)(6,GL,1,0),z()()),e&2){let e;D(4),j((e=t)===`events-only`?4:e===`no-config`?5:6)}}function qL(e,t){if(e&1&&(R(0,`li`)(1,`div`,12)(2,`span`,10),K(3),z(),R(4,`code`,13),K(5),z(),R(6,`code`,14),K(7),z()(),R(8,`p`,15),K(9),z(),R(10,`p`,16)(11,`span`,17),K(12,`Fix`),z(),R(13,`span`,18),K(14),R(15,`span`,2),K(16),z()()()()),e&2){let e=t.$implicit,n=W(2);k(`data-severity`,e.severity),D(2),k(`data-tone`,n.severityTone(e.severity)),D(),q(e.severity),D(2),q(e.rule),D(2),q(e.route),D(2),q(e.message),D(5),J(``,e.fix,` `),D(2),J(`(Angular `,e.angular===`throws`?`throws`:e.angular===`warns`?`warns`:`does not warn`,`)`)}}function JL(e,t){if(e&1&&(R(0,`ul`,7),M(1,qL,17,8,`li`,null,Yh),z()),e&2){let e=W();k(`aria-busy`,e.checking()),D(),N(e.findings())}}function YL(e,t){e&1&&(R(0,`div`,6)(1,`span`,19),T(),R(2,`svg`,20),sg(3,`path`,21),z()(),cs(),R(4,`p`,11),K(5,`No route config problems found.`),z(),R(6,`p`,2),K(7,`The check runs again after each navigation or config change.`),z()())}var XL=class e{plural=JE;page=$.required();rpc=$(null);result=E(null);failed=E(!1);checking=E(!1);findings=X(()=>{let e=this.result();return e?.checked?e.findings:[]});notChecked=X(()=>{let e=this.result();return e&&!e.checked?e.reason:null});counts=X(()=>{let e={error:0,warning:0,info:0};for(let t of this.findings())e[t.severity]++;return e});key=X(()=>{let e=this.page(),t=e.navigations[e.navigations.length-1],n=JSON.stringify((e.links??[]).map(e=>[e.text,e.href,e.linkActive!==void 0,e.ariaCurrent===void 0])),r=`${e.setup?.mode}/${e.setup?.features?.componentInputBinding}`;return`${e.pageId}:${e.generation}:${t?.id}:${t?.outcome}:${n}:${r}`});seq=0;checkedPage=null;constructor(){ac(()=>{this.key(),Z(()=>void this.run())})}severityTone(e){return e===`error`?`bad`:e===`warning`?`warn`:``}async run(){let e=++this.seq,t=this.page().pageId;t!==this.checkedPage&&this.result.set(null),this.checking.set(!0);let n=await kI(this.rpc(),`router-lint`,t);e===this.seq&&(this.checking.set(!1),this.failed.set(!n),n&&(this.result.set(n),this.checkedPage=t))}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-route-lint`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},decls:11,vars:4,consts:[[1,`toolbar`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`],[1,`summary`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`muted`,`empty`],[1,`empty`],[1,`findings`],[`data-tone`,`bad`,1,`badge`],[`data-tone`,`warn`,1,`badge`],[1,`badge`],[1,`empty-title`],[1,`head`],[1,`rule`],[1,`route`],[1,`message`],[1,`fix`],[1,`fix-label`],[1,`fix-text`],[`aria-hidden`,`true`,1,`ok-mark`],[`width`,`16`,`height`,`16`,`viewBox`,`0 0 24 24`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`2.5`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`],[`d`,`M20 6 9 17l-5-5`]],template:function(e,t){if(e&1&&(R(0,`div`,0)(1,`button`,1),U(`click`,function(){return t.run()}),K(2),z(),R(3,`span`,2),K(4,`Checks the live config, links and recent navigations. Lazy routes that have not loaded are skipped.`),z(),A(5,BL,4,3,`span`,3),z(),A(6,VL,7,0,`div`,4)(7,HL,2,0,`p`,5)(8,KL,7,1,`div`,6)(9,JL,3,1,`ul`,7)(10,YL,8,0,`div`,6)),e&2){let e;D(),k(`aria-busy`,t.checking()),D(),J(` `,t.checking()?`Checking…`:`Check again`,` `),D(3),j(t.result()?.checked&&t.findings().length?5:-1),D(),j(t.failed()?6:t.result()?(e=t.notChecked())?8:t.findings().length?9:10:7,e)}},styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); font-size: 13px; line-height: 1.5; @@ -5146,7 +5160,7 @@ h3[_ngcontent-%COMP%] { .fix[_ngcontent-%COMP%] .muted[_ngcontent-%COMP%] { font-size: 12px; -}`]})},KL=(e,t)=>t.name,qL=(e,t)=>t[0];function JL(e,t){e&1&&(R(0,`p`,1),K(1,` Events-only mode: this build lacks the injector provider debug helper, so setup detection is limited. The preloader, the scroller and the router providers can't be found, and the features and options below can show defaults. `),z())}function YL(e,t){if(e&1&&(R(0,`dt`),K(1,`Angular`),z(),R(2,`dd`),K(3),z()),e&2){let e=W();D(3),q(e.angularVersion)}}function XL(e,t){if(e&1&&(R(0,`dt`),K(1,`Base href`),z(),R(2,`dd`)(3,`code`),K(4),z()()),e&2){let e=W();D(4),q(e.baseHref)}}function ZL(e,t){if(e&1&&(R(0,`dt`),K(1,`Hydration`),z(),R(2,`dd`),K(3),z()),e&2){let e=W(),t=W();D(3),J(``,t.plural(e.hydrated,`component`),` hydrated from server HTML`)}}function QL(e,t){if(e&1&&(R(0,`tr`)(1,`td`,5)(2,`code`),K(3),z()(),R(4,`td`)(5,`code`),K(6),z()(),R(7,`td`,6)(8,`span`,7),K(9),z()()()),e&2){let e=t.$implicit;D(3),q(e.name),D(3),q(e.value),D(2),k(`data-tone`,e.set?`warn`:``),D(),q(e.set?`set`:`default`)}}function $L(e,t){if(e&1&&(R(0,`li`)(1,`span`,7),K(2),z()()),e&2){let e=t.$implicit;D(),k(`data-tone`,e[1]===`off`?``:`good`),D(),Y(``,e[0],`: `,e[1])}}function eR(e,t){if(e&1&&(R(0,`h3`),K(1,`Features`),z(),R(2,`ul`,8),M(3,$L,3,3,`li`,null,qL),z()),e&2){let e=W(),t=W();D(3),N(t.entries(e.features))}}function tR(e,t){if(e&1&&(R(0,`dt`),K(1),z(),R(2,`dd`)(3,`code`),K(4),z()()),e&2){let e=t.$implicit;D(),q(e[0]),D(3),q(e[1])}}function nR(e,t){if(e&1&&(R(0,`h3`),K(1,`Strategies`),z(),R(2,`dl`,2),M(3,tR,5,2,null,null,qL),z()),e&2){let e=W(),t=W();D(3),N(t.entries(e.strategies))}}function rR(e,t){if(e&1&&(A(0,JL,2,0,`p`,1),R(1,`dl`,2)(2,`dt`),K(3,`Set up with`),z(),R(4,`dd`),K(5),z(),A(6,YL,4,1),A(7,XL,5,1),A(8,ZL,4,1),z(),R(9,`h3`),K(10,`Options`),z(),R(11,`div`,3)(12,`table`)(13,`thead`)(14,`tr`)(15,`th`,4),K(16,`Option`),z(),R(17,`th`,4),K(18,`Value`),z(),R(19,`th`,4),K(20,`Source`),z()()(),R(21,`tbody`),M(22,QL,10,4,`tr`,null,KL),z()()(),A(24,eR,5,0),A(25,nR,5,0)),e&2){let e=t,n=W();j(e.mode===`events-only`?0:-1),D(5),Y(` `,e.setupKind,``,e.routers>1?`, `+e.routers+` routers on the page`:``,` `),D(),j(e.angularVersion?6:-1),D(),j(e.baseHref?7:-1),D(),j(e.hydrated?8:-1),D(14),N(e.options),D(2),j(n.entries(e.features).length?24:-1),D(),j(n.entries(e.strategies).length?25:-1)}}function iR(e,t){e&1&&(R(0,`div`,0)(1,`p`,9),K(2,`The page has not reported its router setup yet.`),z(),R(3,`p`,10),K(4,` It appears after the app finishes bootstrapping. Reload the app if it stays empty. `),z()())}var aR=class e{plural=JE;page=$.required();entries(e){return Object.entries(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-route-setup`]],inputs:{page:[1,`page`]},decls:2,vars:1,consts:[[1,`empty`],[`role`,`note`,1,`note`],[1,`facts`],[`role`,`region`,`aria-label`,`Router options`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[1,`name`],[1,`source`],[1,`badge`],[1,`chips`],[1,`empty-title`],[1,`muted`]],template:function(e,t){if(e&1&&A(0,rR,26,8)(1,iR,5,0,`div`,0),e&2){let e;j((e=t.page().setup)?0:1,e)}},styles:[`.muted[_ngcontent-%COMP%] { +}`]})},ZL=(e,t)=>t.name,QL=(e,t)=>t[0];function $L(e,t){e&1&&(R(0,`p`,1),K(1,` Events-only mode: this build lacks the injector provider debug helper, so setup detection is limited. The preloader, the scroller and the router providers can't be found, and the features and options below can show defaults. `),z())}function eR(e,t){if(e&1&&(R(0,`dt`),K(1,`Angular`),z(),R(2,`dd`),K(3),z()),e&2){let e=W();D(3),q(e.angularVersion)}}function tR(e,t){if(e&1&&(R(0,`dt`),K(1,`Base href`),z(),R(2,`dd`)(3,`code`),K(4),z()()),e&2){let e=W();D(4),q(e.baseHref)}}function nR(e,t){if(e&1&&(R(0,`dt`),K(1,`Hydration`),z(),R(2,`dd`),K(3),z()),e&2){let e=W(),t=W();D(3),J(``,t.plural(e.hydrated,`component`),` hydrated from server HTML`)}}function rR(e,t){if(e&1&&(R(0,`tr`)(1,`td`,5)(2,`code`),K(3),z()(),R(4,`td`)(5,`code`),K(6),z()(),R(7,`td`,6)(8,`span`,7),K(9),z()()()),e&2){let e=t.$implicit;D(3),q(e.name),D(3),q(e.value),D(2),k(`data-tone`,e.set?`warn`:``),D(),q(e.set?`set`:`default`)}}function iR(e,t){if(e&1&&(R(0,`li`)(1,`span`,7),K(2),z()()),e&2){let e=t.$implicit;D(),k(`data-tone`,e[1]===`off`?``:`good`),D(),Y(``,e[0],`: `,e[1])}}function aR(e,t){if(e&1&&(R(0,`h3`),K(1,`Features`),z(),R(2,`ul`,8),M(3,iR,3,3,`li`,null,QL),z()),e&2){let e=W(),t=W();D(3),N(t.entries(e.features))}}function oR(e,t){if(e&1&&(R(0,`dt`),K(1),z(),R(2,`dd`)(3,`code`),K(4),z()()),e&2){let e=t.$implicit;D(),q(e[0]),D(3),q(e[1])}}function sR(e,t){if(e&1&&(R(0,`h3`),K(1,`Strategies`),z(),R(2,`dl`,2),M(3,oR,5,2,null,null,QL),z()),e&2){let e=W(),t=W();D(3),N(t.entries(e.strategies))}}function cR(e,t){if(e&1&&(A(0,$L,2,0,`p`,1),R(1,`dl`,2)(2,`dt`),K(3,`Set up with`),z(),R(4,`dd`),K(5),z(),A(6,eR,4,1),A(7,tR,5,1),A(8,nR,4,1),z(),R(9,`h3`),K(10,`Options`),z(),R(11,`div`,3)(12,`table`)(13,`thead`)(14,`tr`)(15,`th`,4),K(16,`Option`),z(),R(17,`th`,4),K(18,`Value`),z(),R(19,`th`,4),K(20,`Source`),z()()(),R(21,`tbody`),M(22,rR,10,4,`tr`,null,ZL),z()()(),A(24,aR,5,0),A(25,sR,5,0)),e&2){let e=t,n=W();j(e.mode===`events-only`?0:-1),D(5),Y(` `,e.setupKind,``,e.routers>1?`, `+e.routers+` routers on the page`:``,` `),D(),j(e.angularVersion?6:-1),D(),j(e.baseHref?7:-1),D(),j(e.hydrated?8:-1),D(14),N(e.options),D(2),j(n.entries(e.features).length?24:-1),D(),j(n.entries(e.strategies).length?25:-1)}}function lR(e,t){e&1&&(R(0,`div`,0)(1,`p`,9),K(2,`The page has not reported its router setup yet.`),z(),R(3,`p`,10),K(4,` It appears after the app finishes bootstrapping. Reload the app if it stays empty. `),z()())}var uR=class e{plural=JE;page=$.required();entries(e){return Object.entries(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-route-setup`]],inputs:{page:[1,`page`]},decls:2,vars:1,consts:[[1,`empty`],[`role`,`note`,1,`note`],[1,`facts`],[`role`,`region`,`aria-label`,`Router options`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[1,`name`],[1,`source`],[1,`badge`],[1,`chips`],[1,`empty-title`],[1,`muted`]],template:function(e,t){if(e&1&&A(0,cR,26,8)(1,lR,5,0,`div`,0),e&2){let e;j((e=t.page().setup)?0:1,e)}},styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); font-size: 13px; line-height: 1.5; @@ -5477,7 +5491,7 @@ h3[_ngcontent-%COMP%] { .facts[_ngcontent-%COMP%] code[_ngcontent-%COMP%] { color: var(--%NS%text-strong); -}`]})},oR=(e,t)=>t.id,sR=(e,t)=>t.phase,cR=(e,t)=>t.label;function lR(e,t){if(e&1&&(F(0,`p`,8),K(1),I()),e&2){let e=W();D(),q(e.message())}}function uR(e,t){if(e&1&&(F(0,`p`,9),K(1),I()),e&2){let e=W();D(),q(e.navigationOff)}}function dR(e,t){e&1&&(F(0,`span`,19),K(1,`→`),I(),F(2,`span`,20),K(3,`then`),I())}function fR(e,t){if(e&1&&(A(0,dR,4,0),F(1,`code`),K(2),I()),e&2){let e=t.$implicit,n=t.$index;j(n===0?-1:0),D(2),q(e)}}function pR(e,t){if(e&1&&(F(0,`li`)(1,`code`),K(2),I(),F(3,`span`,19),K(4,` → `),I(),F(5,`span`,20),K(6,` to `),I(),F(7,`code`),K(8),I(),K(9),I()),e&2){let e=t.$implicit,n=W(3);D(2),q(e.from),D(6),q(e.to),D(),J(`: `,n.hopCause(e),` `)}}function mR(e,t){if(e&1&&(F(0,`div`,14)(1,`p`,15)(2,`span`,16),K(3),I(),M(4,fR,3,2,null,null,Jh),I(),F(6,`ol`,17),M(7,pR,10,3,`li`,null,Jh),I(),F(9,`p`,18),K(10),I()()),e&2){let e=t.$implicit,n=W(2);D(3),q(n.loopTitle(e)),D(),N(e.cycle),D(3),N(e.hops),D(3),q(n.loopMeta(e))}}function hR(e,t){if(e&1&&(F(0,`section`,11)(1,`h3`,13),K(2),I(),M(3,mR,11,2,`div`,14,Jh),I()),e&2){let e=W();D(2),J(` `,e.loops().length===1?`Loop detected`:e.loops().length+` loops detected`,` `),D(),N(e.loops())}}function gR(e,t){e&1&&K(0,` (started by the user) `)}function _R(e,t){if(e&1&&(F(0,`span`,23),K(1),I()),e&2){let e=W().$implicit;D(),J(`failed`,e.error?`: `+e.error:``)}}function vR(e,t){if(e&1&&(F(0,`li`)(1,`time`),K(2),I(),K(3),F(4,`code`),K(5),I(),A(6,gR,1,0),A(7,_R,2,1,`span`,23),I()),e&2){let e=t.$implicit,n=W(2);D(2),q(n.time(e.at)),D(),J(` `,e.type,` to `),D(2),q(e.url),D(),j(e.userInitiated?6:-1),D(),j(e.result===`failed`?7:-1)}}function yR(e,t){if(e&1&&(F(0,`section`,12)(1,`h3`,21),K(2,`History changes outside the router`),I(),F(3,`p`,22),K(4,` Browser Navigation API events no router navigation came with, such as `),F(5,`code`),K(6,`history.pushState`),I(),K(7,` or a hash change. They explain a browser URL that differs from the router's. `),I(),F(8,`ul`),M(9,vR,8,5,`li`,null,Jh),I()()),e&2){let e=W();D(9),N(e.outsideRouter())}}function bR(e,t){if(e&1&&(F(0,`span`),L(1,`i`),K(2),I()),e&2){let e=t.$implicit,n=W(2);D(),Xg(`background`,n.color(e)),D(),q(e)}}function xR(e,t){if(e&1&&(F(0,`time`),K(1),I()),e&2){let e=W().$implicit,t=W(2);D(),q(t.time(e.startedAt))}}function SR(e,t){if(e&1&&(F(0,`span`,19),K(1,`→`),I(),F(2,`span`,20),K(3,`redirected to`),I(),F(4,`code`,31),K(5),I()),e&2){let e=W().$implicit;D(5),q(e.finalUrl)}}function CR(e,t){if(e&1&&(F(0,`span`,22),K(1),I()),e&2){let e=W().$implicit;D(),q(e.endedAt===void 0&&e.outcome!==`pending`?`before Pangular Inspector connected`:`started before Pangular Inspector connected`)}}function wR(e,t){if(e&1&&(F(0,`span`,34),K(1),I()),e&2){let e=W().$implicit;D(),J(``,e.phases?.total,`ms`)}}function TR(e,t){if(e&1&&(F(0,`span`,34),K(1),I()),e&2){let e=W().$implicit;D(),J(``,e.endedAt-e.startedAt,`ms`)}}function ER(e,t){e&1&&(F(0,`span`,35),K(1,`probe`),I())}function DR(e,t){e&1&&(F(0,`span`,36),K(1,`open redirect risk`),I())}function OR(e,t){if(e&1&&(F(0,`span`,16),K(1,`loop`),F(2,`span`,20),K(3),I()()),e&2){let e=t,n=W(3);D(3),Y(`: part of `,n.loopTitle(e),` `,e.cycle.join(` then `))}}function kR(e,t){if(e&1&&L(0,`span`),e&2){let e=t.$implicit,n=W(4);Xg(`width`,e.width,`%`)(`background`,n.color(e.phase)),k(`title`,e.phase+` `+e.ms+`ms`)}}function AR(e,t){if(e&1&&(F(0,`div`,37),M(1,kR,1,5,`span`,44,sR),I()),e&2){let e=W().$implicit,t=W(2);k(`aria-label`,t.barLabel(e)),D(),N(t.bars(e))}}function jR(e,t){if(e&1&&(F(0,`dt`),K(1,`From`),I(),F(2,`dd`)(3,`code`),K(4),I()()),e&2){let e=W().$implicit;D(4),q(e.from)}}function MR(e,t){if(e&1&&(F(0,`dt`),K(1,`Started by`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit;D(3),Y(``,e.caller,` (`,e.trigger,`)`)}}function NR(e,t){if(e&1&&(F(0,`dt`),K(1,`Navigation API`),I(),F(2,`dd`),K(3),I()),e&2){let e=t;D(3),Y(` `,e.type,``,e.userInitiated?` (started by the user)`:``,` `)}}function PR(e,t){if(e&1&&(F(0,`dt`),K(1,`Extras`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit;D(3),q(e.extras?.join(`, `))}}function FR(e,t){if(e&1&&(F(0,`dt`),K(1,`Redirect of`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit;D(3),J(`#`,e.redirectedFrom)}}function IR(e,t){if(e&1&&(F(0,`div`),K(1,` This navigation: `),F(2,`code`),K(3),I(),K(4,` to `),F(5,`code`),K(6),I(),K(7),I()),e&2){let e=t.$implicit,n=W(4);D(3),q(e.from),D(3),q(e.to),D(),J(`, `,n.hopCause(e),` `)}}function LR(e,t){if(e&1&&(F(0,`dt`),K(1,`Loop`),I(),F(2,`dd`,45),K(3),M(4,IR,8,3,`div`,null,Jh),I()),e&2){let e=t,n=W().$implicit,r=W(2);D(3),J(` `,e.cycle.join(` → `),` `),D(),N(r.hopsOf(e,n))}}function RR(e,t){if(e&1&&(F(0,`dt`),K(1,`Redirects to`),I(),F(2,`dd`)(3,`code`),K(4),I(),K(5),I()),e&2){let e=W().$implicit;D(4),q(e.redirectTo),D(),J(` (`,e.redirectKind,`) `)}}function zR(e,t){if(e&1&&(F(0,`dt`),K(1,`Open redirect`),I(),F(2,`dd`,45),K(3,` The target came from query param `),F(4,`code`),K(5),I(),K(6),I()),e&2){let e=t;D(5),q(e.param),D(),J(` (`,e.by,`). Check return URLs against an allow list. `)}}function BR(e,t){if(e&1&&(F(0,`dt`),K(1,`Guards`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit,t=W(2);D(3),Y(``,e.guards.names.join(`, `)||`none`,`: `,t.guardResult(e))}}function VR(e,t){if(e&1&&(F(0,`div`)(1,`code`),K(2),I(),K(3),F(4,`code`),K(5),I(),K(6,`: `),F(7,`strong`),K(8),I(),K(9),I()),e&2){let e=t.$implicit,n=W(4);D(2),q(e.guard),D(),J(` `,e.kind,` on `),D(2),q(e.route),D(2),G(`bad`,n.isBad(e.result)),D(),q(e.result),D(),J(` (`,e.ms,`ms) `)}}function HR(e,t){if(e&1&&(F(0,`dt`),K(1,`Runs`),I(),F(2,`dd`),M(3,VR,10,7,`div`,null,Jh),I()),e&2){let e=W().$implicit;D(3),N(e.runs)}}function UR(e,t){if(e&1&&K(0),e&2){let e=W(2).$implicit;J(` leaving `,e.checked.deactivate.join(`, `),`; `)}}function WR(e,t){if(e&1&&(F(0,`dt`),K(1,`Checked`),I(),F(2,`dd`),A(3,UR,1,1),K(4),I()),e&2){let e=W().$implicit;D(3),j(e.checked.deactivate.length?3:-1),D(),J(` entering `,e.checked.activate.join(`, `)||`nothing new`,` `)}}function GR(e,t){if(e&1&&(F(0,`dt`),K(1,`Resolvers`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit;D(3),q(e.resolvers?.names?.join(`, `))}}function KR(e,t){if(e&1&&(F(0,`dt`),K(1,`Lazy loaded`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit;D(3),q(e.lazyLoaded?.join(`, `))}}function qR(e,t){if(e&1&&(F(0,`dt`),K(1,`Reused`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit;D(3),J(` `,e.reused?.join(`, `),` (component kept, only inputs and params change) `)}}function JR(e,t){if(e&1&&(F(0,`dt`),K(1,`HTTP`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit,t=W(2);D(3),Y(` `,t.plural(e.requests.count,`request`),`: `,e.requests.urls.join(`, `),` `)}}function YR(e,t){if(e&1&&(F(0,`dt`),K(1,`Scroll`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit;D(3),q(e.scroll)}}function XR(e,t){if(e&1&&(F(0,`dt`),K(1,`Title after`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit;D(3),q(e.title)}}function ZR(e,t){if(e&1&&(F(0,`dt`),K(1,`Warnings`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit;D(3),q(e.warnings?.join(` · `))}}function QR(e,t){if(e&1&&(F(0,`dt`),K(1,`Reason`),I(),F(2,`dd`,45),K(3),I()),e&2){let e=W().$implicit,t=W(2);D(3),q(t.reasonText(e))}}function $R(e,t){if(e&1&&(F(0,`dt`),K(1,`Error`),I(),F(2,`dd`,45),K(3),I()),e&2){let e=W().$implicit;D(3),q(e.errorCode)}}function ez(e,t){if(e&1&&(F(0,`dt`),K(1,`Error handler`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit;D(3),q(e.errorHandler)}}function tz(e,t){if(e&1&&(F(0,`dt`),K(1,`Earlier`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit,t=W(2);D(3),J(``,t.plural(e.earlier,`navigation`),` before Pangular Inspector connected`)}}function nz(e,t){if(e&1&&(F(0,`p`,42),K(1,` Replay is off: the URL is redacted or not relative. `),I()),e&2){let e=W().$implicit;P(`id`,D_(`replay-note-`,e.id))}}function rz(e,t){e&1&&(F(0,`p`,22),K(1,`Loading the HTTP calls…`),I())}function iz(e,t){e&1&&(F(0,`p`,22),K(1,`Could not load the HTTP calls.`),I())}function az(e,t){e&1&&(F(0,`p`,22),K(1,` The HTTP inspector recorded no HttpClient call for this navigation. `),I())}function oz(e,t){if(e&1&&(F(0,`li`)(1,`code`),K(2),I(),K(3,` `),F(4,`span`),K(5),I(),K(6,` `),F(7,`span`,34),K(8),I()()),e&2){let e=t.$implicit,n=W(5);D(2),Y(``,e.method,` `,e.url),D(2),G(`bad`,n.isFailedCall(e)),D(),q(n.callStatus(e)),D(3),J(``,n.round(e.durationMs),`ms`)}}function sz(e,t){if(e&1&&(F(0,`p`,46),K(1),I(),F(2,`ul`),M(3,oz,9,6,`li`,null,oR),I()),e&2){let e=t.$implicit;D(),q(e.label),D(2),N(e.calls)}}function cz(e,t){if(e&1&&(A(0,az,2,0,`p`,22),M(1,sz,5,1,null,null,cR)),e&2){let e=W().$implicit,t=W(2),n=t.httpOf(e);j(!n.during.length&&!n.after.length?0:-1),D(),N(t.httpGroups(n))}}function lz(e,t){if(e&1){let e=B();F(0,`li`)(1,`div`,29),A(2,xR,2,1,`time`),F(3,`span`,30),K(4),I(),F(5,`code`,31),K(6),I(),A(7,SR,6,1),F(8,`span`,32)(9,`span`,33),K(10),I(),A(11,CR,2,1,`span`,22)(12,wR,2,1,`span`,34)(13,TR,2,1,`span`,34),A(14,ER,2,0,`span`,35),A(15,DR,2,0,`span`,36),A(16,OR,4,2,`span`,16),I()(),A(17,AR,3,1,`div`,37),F(18,`dl`,38),A(19,jR,5,1),A(20,MR,4,2),A(21,NR,4,2),A(22,PR,4,1),A(23,FR,4,1),A(24,LR,6,1),A(25,RR,6,2),A(26,zR,7,2),A(27,BR,4,2),A(28,HR,5,0),A(29,WR,5,2),A(30,GR,4,1),A(31,KR,4,1),A(32,qR,4,1),A(33,JR,4,2),A(34,YR,4,1),A(35,XR,4,1),A(36,ZR,4,1),A(37,QR,4,1),A(38,$R,4,1),A(39,ez,4,1),A(40,tz,4,1),I(),F(41,`div`,39)(42,`button`,40),H(`click`,function(){let t=C(e).$implicit;return w(W(2).replay(t))}),K(43,` Replay `),I(),F(44,`button`,41),H(`click`,function(){let t=C(e).$implicit;return w(W(2).compare.emit(t.id))}),K(45,` Compare `),I(),F(46,`button`,41),H(`click`,function(){let t=C(e).$implicit;return w(W(2).copy(t))}),K(47,` Copy repro `),I(),F(48,`button`,41),H(`click`,function(){let t=C(e).$implicit;return w(W(2).toggleHttp(t))}),K(49,` HTTP calls `),I(),A(50,nz,2,2,`p`,42),I(),F(51,`div`,43),A(52,rz,2,0,`p`,22)(53,iz,2,0,`p`,22)(54,cz,3,1),I()()}if(e&2){let e,n,r,i,a,o=t.$implicit,s=W(2);G(`in-loop`,!!s.loopOf(o)),D(2),j(o.beforeConnect?-1:2),D(2),J(`#`,o.id),D(2),q(o.url),D(),j(o.finalUrl&&o.finalUrl!==o.url?7:-1),D(2),k(`data-tone`,s.tone(o.outcome)),D(),q(o.outcome),D(),j(o.beforeConnect?11:o.phases?.total===void 0?o.endedAt===void 0?-1:13:12),D(3),j(o.probe?14:-1),D(),j(o.queryRedirect?15:-1),D(),j((e=s.loopOf(o))?16:-1,e),D(),j(s.bars(o).length?17:-1),D(2),j(o.from?19:-1),D(),j(o.caller?20:-1),D(),j((n=o.platform)?21:-1,n),D(),j(o.extras?.length?22:-1),D(),j(o.redirectedFrom===void 0?-1:23),D(),j((r=s.loopOf(o))?24:-1,r),D(),j(o.redirectTo?25:-1),D(),j((i=o.queryRedirect)?26:-1,i),D(),j(o.guards&&(o.guards.names.length||o.guards.passed===!1)?27:-1),D(),j(o.runs?.length?28:-1),D(),j(o.checked&&(o.checked.activate.length||o.checked.deactivate.length)?29:-1),D(),j(o.resolvers?.names?.length?30:-1),D(),j(o.lazyLoaded?.length?31:-1),D(),j(o.reused?.length?32:-1),D(),j(o.requests?33:-1),D(),j(o.scroll?34:-1),D(),j(o.title?35:-1),D(),j(o.warnings?.length?36:-1),D(),j(o.reason||o.code?37:-1),D(),j(o.errorCode?38:-1),D(),j(o.errorHandler?39:-1),D(),j(o.earlier?40:-1),D(2),P(`disabled`,!s.navigationAllowed()||!s.replayable(o)),k(`aria-describedby`,s.replayNote(o))(`aria-label`,`Replay navigation `+o.id),D(2),k(`aria-label`,`Compare navigation `+o.id+` with an earlier one`),D(2),k(`aria-label`,`Copy repro for navigation `+o.id),D(2),k(`aria-expanded`,s.httpShown(o))(`aria-controls`,`nav-http-`+o.id)(`aria-label`,`HTTP calls of navigation `+o.id),D(2),j(s.replayable(o)?-1:50),D(),P(`id`,`nav-http-`+o.id)(`hidden`,!s.httpShown(o)),D(),j((a=s.httpState(o))===`loading`?52:a===`failed`?53:a===`ready`?54:-1)}}function uz(e,t){if(e&1&&(F(0,`div`,24)(1,`span`,25),K(2),I(),F(3,`div`,26),M(4,bR,3,3,`span`,null,Yh),I()(),F(6,`ol`,27),M(7,lz,55,47,`li`,28,oR),I()),e&2){let e=W();D(2),Y(``,e.items().length,` of `,e.plural(e.page().navigations.length,`navigation`)),D(2),N(e.phases),D(3),N(e.items())}}function dz(e,t){if(e&1){let e=B();F(0,`div`,47)(1,`p`,48),K(2,`No navigations match the current filters.`),I(),F(3,`p`,22),K(4),I(),F(5,`button`,41),H(`click`,function(){C(e);let t=W(2),n=kg(2);return t.clearFilters(),w(n.focus())}),K(6,` Clear filters `),I()()}if(e&2){let e=W(2);D(4),J(` `,e.plural(e.page().navigations.length,`navigation is`,`navigations are`),` hidden. Clear the filters to see them. `)}}function fz(e,t){e&1&&(F(0,`div`,47)(1,`p`,48),K(2,`No navigations since Pangular Inspector connected.`),I(),F(3,`p`,22),K(4,`Earlier ones are not visible. Click a link in the app to record one.`),I()())}function pz(e,t){e&1&&A(0,dz,7,1,`div`,47)(1,fz,5,0,`div`,47),e&2&&j(+!W().page().navigations.length)}var mz=[`recognize`,`guards`,`resolve`,`activate`],hz=class e{plural=JE;page=$.required();rpc=$(null);compare=Q_();maxNavigations=X(()=>NT(this.rpc()).limits.navigations);navigationAllowed=X(()=>IT(this.rpc(),`router`));navigationOff=Uw(`router`);phases=mz;pageId=X(()=>this.page().pageId);filter=Q({source:this.pageId,computation:()=>``});onlyProblems=Q({source:this.pageId,computation:()=>!1});message=Q({source:this.pageId,computation:()=>``});loops=X(()=>this.page().loops??[]);outsideRouter=X(()=>(this.page().platformNavigations??[]).filter(e=>e.navigationId===void 0).slice(-5).reverse());loopById=X(()=>{let e=new Map;for(let t of this.loops())for(let n of t.ids)e.set(n,t);return e});items=X(()=>{let e=this.filter().toLowerCase();return[...this.page().navigations].reverse().filter(t=>(!e||t.url.toLowerCase().includes(e)||!!t.finalUrl?.toLowerCase().includes(e))&&(!this.onlyProblems()||this.isProblem(t)))});isProblem(e){return e.probe?!1:![`succeeded`,`pending`].includes(e.outcome)||this.loopById().has(e.id)}loopOf(e){return this.loopById().get(e.id)}loopTitle(e){return e.kind===`burst`?`navigation loop`:`redirect loop`}hopsOf(e,t){return e.hops.filter(e=>e.id===t.id)}hopCause(e){return e.via===`navigate`?`#${e.id} started by ${e.by??`code`}`:`${e.via===`redirectTo`?`config`:`${e.via} redirect`}${e.by?` ${e.by}`:e.via===`redirectTo`?` redirectTo`:``} in #${e.id}`}loopMeta(e){let t=e.ids.length>1?`Navigations #${e.ids[0]} to #${e.ids[e.ids.length-1]}`:`Navigation #${e.ids[0]}`,n=e.bounces>1?`, came back ${e.bounces} times`:``,r=e.guards.length?` Guards involved: ${e.guards.join(`, `)}.`:``;return`${t}${n}; ${e.end}.${r}`}reasonText(e){return[e.code,e.reason].filter(Boolean).join(`: `)}clearFilters(){this.filter.set(``),this.onlyProblems.set(!1)}tone(e){return OI(e)}color(e){return`var(--phase-${e})`}bars(e){let t=e.phases?.total;return t?mz.filter(t=>(e.phases?.[t]??0)>0).map(n=>({phase:n,ms:e.phases[n],width:Math.max(1,e.phases[n]/t*100)})):[]}barLabel(e){return`Phases: ${this.bars(e).map(e=>`${e.phase} ${e.ms}ms`).join(`, `)}`}guardResult(e){let t=e.guards?.passed;return t===!0?`passed`:t===!1?e.outcome===`redirected`?`redirected`:`blocked`:e.outcome===`pending`?`running`:`did not finish, navigation ${e.outcome}`}isBad(e){return e===`false`||/^(UrlTree|RedirectCommand|threw)/.test(e)}time=GE;http=Q({source:this.pageId,computation:()=>({})});httpOpen=Q({source:this.pageId,computation:()=>({})});round=Math.round;httpShown(e){return!!this.httpOpen()[e.id]}httpState(e){let t=this.http()[e.id];return t===void 0?null:typeof t==`string`?t:`ready`}httpOf(e){let t=this.http()[e.id];return typeof t==`object`?t:{during:[],after:[]}}httpGroups(e){return[{label:`While it ran`,calls:e.during},{label:`After it ended`,calls:e.after}].filter(e=>e.calls.length)}callStatus(e){return e.cancelled?`cancelled`:e.status?String(e.status):`ERR`}isFailedCall(e){return e.status===0||e.status>=400||!!e.error||e.cancelled===!0}async toggleHttp(e){let t=!this.httpShown(e);if(this.httpOpen.update(n=>({...n,[e.id]:t})),!t)return;let n=this.pageId();this.http.update(t=>({...t,[e.id]:`loading`}));let r=await wI(this.rpc(),`router-http`,{pageId:n,id:e.id});n===this.pageId()&&this.http.update(t=>({...t,[e.id]:r??`failed`}))}instrumentSeq=0;async toggleInstrument(e){let t=e.target,n=t.checked,r=this.pageId(),i=++this.instrumentSeq,a=await DI(this.rpc(),r,{action:`instrument`,on:n});if(i===this.instrumentSeq){if(r!==this.pageId()){t.checked=!!this.page().instrumented;return}if(a.error){t.checked=!!this.page().instrumented,this.message.set(String(a.error));return}this.message.set(n?`Recording each guard and resolver.`:`Stopped recording guards and resolvers.`)}}replayable(e){return TI(e.url)}replayNote(e){return this.navigationAllowed()?this.replayable(e)?null:`replay-note-${e.id}`:`route-timeline-writes-off`}async replay(e){this.message.set(`Replaying #${e.id}…`);let t=this.pageId(),n=await DI(this.rpc(),t,{action:`replay`,id:e.id});if(t!==this.pageId())return;if(n.error){this.message.set(String(n.error));return}let r=n.replay;this.message.set(`Replay of #${e.id}: ${r?.outcome??`unknown`}${n.same?` (same as before)`:` (different from before)`}.`)}async copy(e){let t=this.pageId(),n=await wI(this.rpc(),`router-export`,{pageId:t,id:e.id});if(t===this.pageId()){if(!n){this.message.set(`Could not build the repro.`);return}try{await navigator.clipboard.writeText(n),t===this.pageId()&&this.message.set(`Copied a markdown repro of #${e.id}.`)}catch{t===this.pageId()&&this.message.set(`The clipboard is not available here.`)}}}async clearNavigations(){let e=this.rpc(),t=this.pageId(),n=`Clearing navigations…`;this.message.set(n);let r;try{if(!e)throw Error(`No connection`);await _T(e,`clear-router-navigations`,t),r=`Navigations cleared.`}catch{r=`Could not clear the navigations.`}t===this.pageId()?this.message.set(r):this.message()===n&&this.message.set(``)}exportJson(){let e=new Blob([JSON.stringify(this.page().navigations,null,2)],{type:`application/json`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`navigations-${this.page().pageId}.json`,n.click(),URL.revokeObjectURL(t)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-route-timeline`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},outputs:{compare:`compare`},decls:22,vars:13,consts:[[`filterInput`,``],[1,`toolbar`],[`placeholder`,`Filter by URL`,`saveKey`,`router-timeline`,3,`valueChange`,`value`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[`type`,`button`,1,`small`,`export`,3,`click`],[`type`,`button`,`aria-label`,`Clear navigations`,1,`small`,3,`click`,`disabled`],[`role`,`status`,1,`visually-hidden`],[`aria-hidden`,`true`,1,`message`],[`id`,`route-timeline-writes-off`,1,`message`],[`what`,`navigations`,`limit`,`navigations`,3,`dropped`,`max`],[`aria-labelledby`,`loops-heading`,1,`loops`],[`aria-labelledby`,`outside-heading`,1,`outside`],[`id`,`loops-heading`],[1,`loop`],[1,`chain`],[`data-tone`,`bad`,1,`badge`],[1,`hops`],[1,`muted`,`loop-meta`],[`aria-hidden`,`true`,1,`arrow`],[1,`visually-hidden`],[`id`,`outside-heading`],[1,`muted`],[1,`bad`],[1,`meta-row`],[1,`muted`,`count`],[`aria-hidden`,`true`,1,`legend`],[1,`navs`],[3,`in-loop`],[1,`head`],[1,`id`],[1,`url`],[1,`meta`],[1,`badge`],[1,`muted`,`ms`],[1,`tag`],[`data-tone`,`warn`,1,`badge`],[`role`,`img`,1,`bar`],[1,`details`],[1,`actions`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`,`replay-note`,3,`id`],[1,`http`,3,`id`,`hidden`],[3,`width`,`background`],[1,`reason`],[1,`http-label`],[1,`empty`],[1,`empty-title`]],template:function(e,t){if(e&1){let e=B();F(0,`div`,1)(1,`app-search-field`,2,0),S_(`valueChange`,function(n){return C(e),x_(t.filter,n)||(t.filter=n),w(n)}),I(),F(3,`label`,3)(4,`input`,4),H(`change`,function(e){return t.onlyProblems.set(e.target.checked)}),I(),K(5,` Only problems `),I(),F(6,`label`,3)(7,`input`,4),H(`change`,function(e){return t.toggleInstrument(e)}),I(),K(8,` Record each guard and resolver `),I(),F(9,`button`,5),H(`click`,function(){return t.exportJson()}),K(10,`Export JSON`),I(),F(11,`button`,6),H(`click`,function(){return t.clearNavigations()}),K(12,` Clear `),I()(),F(13,`p`,7),K(14),I(),A(15,lR,2,1,`p`,8),A(16,uR,2,1,`p`,9),L(17,`app-limit-note`,10),A(18,hR,5,1,`section`,11),A(19,yR,11,0,`section`,12),A(20,uz,9,2)(21,pz,2,1)}e&2&&(D(),b_(`value`,t.filter),D(3),P(`checked`,t.onlyProblems()),D(3),P(`checked`,t.page().instrumented),D(4),P(`disabled`,!t.navigationAllowed()),k(`aria-describedby`,t.navigationAllowed()?null:`route-timeline-writes-off`),D(3),q(t.message()),D(),j(t.message()?15:-1),D(),j(t.navigationAllowed()?-1:16),D(),P(`dropped`,t.page().dropped??0)(`max`,t.maxNavigations()),D(),j(t.loops().length?18:-1),D(),j(t.outsideRouter().length?19:-1),D(),j(t.items().length?20:21))},dependencies:[nP,eO],styles:[`.muted[_ngcontent-%COMP%] { +}`]})},dR=(e,t)=>t.id,fR=(e,t)=>t.phase,pR=(e,t)=>t.label;function mR(e,t){if(e&1&&(F(0,`p`,8),K(1),I()),e&2){let e=W();D(),q(e.message())}}function hR(e,t){if(e&1&&(F(0,`p`,9),K(1),I()),e&2){let e=W();D(),q(e.navigationOff)}}function gR(e,t){e&1&&(F(0,`span`,19),K(1,`→`),I(),F(2,`span`,20),K(3,`then`),I())}function _R(e,t){if(e&1&&(A(0,gR,4,0),F(1,`code`),K(2),I()),e&2){let e=t.$implicit,n=t.$index;j(n===0?-1:0),D(2),q(e)}}function vR(e,t){if(e&1&&(F(0,`li`)(1,`code`),K(2),I(),F(3,`span`,19),K(4,` → `),I(),F(5,`span`,20),K(6,` to `),I(),F(7,`code`),K(8),I(),K(9),I()),e&2){let e=t.$implicit,n=W(3);D(2),q(e.from),D(6),q(e.to),D(),J(`: `,n.hopCause(e),` `)}}function yR(e,t){if(e&1&&(F(0,`div`,14)(1,`p`,15)(2,`span`,16),K(3),I(),M(4,_R,3,2,null,null,Yh),I(),F(6,`ol`,17),M(7,vR,10,3,`li`,null,Yh),I(),F(9,`p`,18),K(10),I()()),e&2){let e=t.$implicit,n=W(2);D(3),q(n.loopTitle(e)),D(),N(e.cycle),D(3),N(e.hops),D(3),q(n.loopMeta(e))}}function bR(e,t){if(e&1&&(F(0,`section`,11)(1,`h3`,13),K(2),I(),M(3,yR,11,2,`div`,14,Yh),I()),e&2){let e=W();D(2),J(` `,e.loops().length===1?`Loop detected`:e.loops().length+` loops detected`,` `),D(),N(e.loops())}}function xR(e,t){e&1&&K(0,` (started by the user) `)}function SR(e,t){if(e&1&&(F(0,`span`,23),K(1),I()),e&2){let e=W().$implicit;D(),J(`failed`,e.error?`: `+e.error:``)}}function CR(e,t){if(e&1&&(F(0,`li`)(1,`time`),K(2),I(),K(3),F(4,`code`),K(5),I(),A(6,xR,1,0),A(7,SR,2,1,`span`,23),I()),e&2){let e=t.$implicit,n=W(2);D(2),q(n.time(e.at)),D(),J(` `,e.type,` to `),D(2),q(e.url),D(),j(e.userInitiated?6:-1),D(),j(e.result===`failed`?7:-1)}}function wR(e,t){if(e&1&&(F(0,`section`,12)(1,`h3`,21),K(2,`History changes outside the router`),I(),F(3,`p`,22),K(4,` Browser Navigation API events no router navigation came with, such as `),F(5,`code`),K(6,`history.pushState`),I(),K(7,` or a hash change. They explain a browser URL that differs from the router's. `),I(),F(8,`ul`),M(9,CR,8,5,`li`,null,Yh),I()()),e&2){let e=W();D(9),N(e.outsideRouter())}}function TR(e,t){if(e&1&&(F(0,`span`),L(1,`i`),K(2),I()),e&2){let e=t.$implicit,n=W(2);D(),Zg(`background`,n.color(e)),D(),q(e)}}function ER(e,t){if(e&1&&(F(0,`time`),K(1),I()),e&2){let e=W().$implicit,t=W(2);D(),q(t.time(e.startedAt))}}function DR(e,t){if(e&1&&(F(0,`span`,19),K(1,`→`),I(),F(2,`span`,20),K(3,`redirected to`),I(),F(4,`code`,31),K(5),I()),e&2){let e=W().$implicit;D(5),q(e.finalUrl)}}function OR(e,t){if(e&1&&(F(0,`span`,22),K(1),I()),e&2){let e=W().$implicit;D(),q(e.endedAt===void 0&&e.outcome!==`pending`?`before Pangular Inspector connected`:`started before Pangular Inspector connected`)}}function kR(e,t){if(e&1&&(F(0,`span`,34),K(1),I()),e&2){let e=W().$implicit;D(),J(``,e.phases?.total,`ms`)}}function AR(e,t){if(e&1&&(F(0,`span`,34),K(1),I()),e&2){let e=W().$implicit;D(),J(``,e.endedAt-e.startedAt,`ms`)}}function jR(e,t){e&1&&(F(0,`span`,35),K(1,`probe`),I())}function MR(e,t){e&1&&(F(0,`span`,36),K(1,`open redirect risk`),I())}function NR(e,t){if(e&1&&(F(0,`span`,16),K(1,`loop`),F(2,`span`,20),K(3),I()()),e&2){let e=t,n=W(3);D(3),Y(`: part of `,n.loopTitle(e),` `,e.cycle.join(` then `))}}function PR(e,t){if(e&1&&L(0,`span`),e&2){let e=t.$implicit,n=W(4);Zg(`width`,e.width,`%`)(`background`,n.color(e.phase)),k(`title`,e.phase+` `+e.ms+`ms`)}}function FR(e,t){if(e&1&&(F(0,`div`,37),M(1,PR,1,5,`span`,44,fR),I()),e&2){let e=W().$implicit,t=W(2);k(`aria-label`,t.barLabel(e)),D(),N(t.bars(e))}}function IR(e,t){if(e&1&&(F(0,`dt`),K(1,`From`),I(),F(2,`dd`)(3,`code`),K(4),I()()),e&2){let e=W().$implicit;D(4),q(e.from)}}function LR(e,t){if(e&1&&(F(0,`dt`),K(1,`Started by`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit;D(3),Y(``,e.caller,` (`,e.trigger,`)`)}}function RR(e,t){if(e&1&&(F(0,`dt`),K(1,`Navigation API`),I(),F(2,`dd`),K(3),I()),e&2){let e=t;D(3),Y(` `,e.type,``,e.userInitiated?` (started by the user)`:``,` `)}}function zR(e,t){if(e&1&&(F(0,`dt`),K(1,`Extras`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit;D(3),q(e.extras?.join(`, `))}}function BR(e,t){if(e&1&&(F(0,`dt`),K(1,`Redirect of`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit;D(3),J(`#`,e.redirectedFrom)}}function VR(e,t){if(e&1&&(F(0,`div`),K(1,` This navigation: `),F(2,`code`),K(3),I(),K(4,` to `),F(5,`code`),K(6),I(),K(7),I()),e&2){let e=t.$implicit,n=W(4);D(3),q(e.from),D(3),q(e.to),D(),J(`, `,n.hopCause(e),` `)}}function HR(e,t){if(e&1&&(F(0,`dt`),K(1,`Loop`),I(),F(2,`dd`,45),K(3),M(4,VR,8,3,`div`,null,Yh),I()),e&2){let e=t,n=W().$implicit,r=W(2);D(3),J(` `,e.cycle.join(` → `),` `),D(),N(r.hopsOf(e,n))}}function UR(e,t){if(e&1&&(F(0,`dt`),K(1,`Redirects to`),I(),F(2,`dd`)(3,`code`),K(4),I(),K(5),I()),e&2){let e=W().$implicit;D(4),q(e.redirectTo),D(),J(` (`,e.redirectKind,`) `)}}function WR(e,t){if(e&1&&(F(0,`dt`),K(1,`Open redirect`),I(),F(2,`dd`,45),K(3,` The target came from query param `),F(4,`code`),K(5),I(),K(6),I()),e&2){let e=t;D(5),q(e.param),D(),J(` (`,e.by,`). Check return URLs against an allow list. `)}}function GR(e,t){if(e&1&&(F(0,`dt`),K(1,`Guards`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit,t=W(2);D(3),Y(``,e.guards.names.join(`, `)||`none`,`: `,t.guardResult(e))}}function KR(e,t){if(e&1&&(F(0,`div`)(1,`code`),K(2),I(),K(3),F(4,`code`),K(5),I(),K(6,`: `),F(7,`strong`),K(8),I(),K(9),I()),e&2){let e=t.$implicit,n=W(4);D(2),q(e.guard),D(),J(` `,e.kind,` on `),D(2),q(e.route),D(2),G(`bad`,n.isBad(e.result)),D(),q(e.result),D(),J(` (`,e.ms,`ms) `)}}function qR(e,t){if(e&1&&(F(0,`dt`),K(1,`Runs`),I(),F(2,`dd`),M(3,KR,10,7,`div`,null,Yh),I()),e&2){let e=W().$implicit;D(3),N(e.runs)}}function JR(e,t){if(e&1&&K(0),e&2){let e=W(2).$implicit;J(` leaving `,e.checked.deactivate.join(`, `),`; `)}}function YR(e,t){if(e&1&&(F(0,`dt`),K(1,`Checked`),I(),F(2,`dd`),A(3,JR,1,1),K(4),I()),e&2){let e=W().$implicit;D(3),j(e.checked.deactivate.length?3:-1),D(),J(` entering `,e.checked.activate.join(`, `)||`nothing new`,` `)}}function XR(e,t){if(e&1&&(F(0,`dt`),K(1,`Resolvers`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit;D(3),q(e.resolvers?.names?.join(`, `))}}function ZR(e,t){if(e&1&&(F(0,`dt`),K(1,`Lazy loaded`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit;D(3),q(e.lazyLoaded?.join(`, `))}}function QR(e,t){if(e&1&&(F(0,`dt`),K(1,`Reused`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit;D(3),J(` `,e.reused?.join(`, `),` (component kept, only inputs and params change) `)}}function $R(e,t){if(e&1&&(F(0,`dt`),K(1,`HTTP`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit,t=W(2);D(3),Y(` `,t.plural(e.requests.count,`request`),`: `,e.requests.urls.join(`, `),` `)}}function ez(e,t){if(e&1&&(F(0,`dt`),K(1,`Scroll`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit;D(3),q(e.scroll)}}function tz(e,t){if(e&1&&(F(0,`dt`),K(1,`Title after`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit;D(3),q(e.title)}}function nz(e,t){if(e&1&&(F(0,`dt`),K(1,`Warnings`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit;D(3),q(e.warnings?.join(` · `))}}function rz(e,t){if(e&1&&(F(0,`dt`),K(1,`Reason`),I(),F(2,`dd`,45),K(3),I()),e&2){let e=W().$implicit,t=W(2);D(3),q(t.reasonText(e))}}function iz(e,t){if(e&1&&(F(0,`dt`),K(1,`Error`),I(),F(2,`dd`,45),K(3),I()),e&2){let e=W().$implicit;D(3),q(e.errorCode)}}function az(e,t){if(e&1&&(F(0,`dt`),K(1,`Error handler`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit;D(3),q(e.errorHandler)}}function oz(e,t){if(e&1&&(F(0,`dt`),K(1,`Earlier`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().$implicit,t=W(2);D(3),J(``,t.plural(e.earlier,`navigation`),` before Pangular Inspector connected`)}}function sz(e,t){if(e&1&&(F(0,`p`,42),K(1,` Replay is off: the URL is redacted or not relative. `),I()),e&2){let e=W().$implicit;P(`id`,k_(`replay-note-`,e.id))}}function cz(e,t){e&1&&(F(0,`p`,22),K(1,`Loading the HTTP calls…`),I())}function lz(e,t){e&1&&(F(0,`p`,22),K(1,`Could not load the HTTP calls.`),I())}function uz(e,t){e&1&&(F(0,`p`,22),K(1,` The HTTP inspector recorded no HttpClient call for this navigation. `),I())}function dz(e,t){if(e&1&&(F(0,`li`)(1,`code`),K(2),I(),K(3,` `),F(4,`span`),K(5),I(),K(6,` `),F(7,`span`,34),K(8),I()()),e&2){let e=t.$implicit,n=W(5);D(2),Y(``,e.method,` `,e.url),D(2),G(`bad`,n.isFailedCall(e)),D(),q(n.callStatus(e)),D(3),J(``,n.round(e.durationMs),`ms`)}}function fz(e,t){if(e&1&&(F(0,`p`,46),K(1),I(),F(2,`ul`),M(3,dz,9,6,`li`,null,dR),I()),e&2){let e=t.$implicit;D(),q(e.label),D(2),N(e.calls)}}function pz(e,t){if(e&1&&(A(0,uz,2,0,`p`,22),M(1,fz,5,1,null,null,pR)),e&2){let e=W().$implicit,t=W(2),n=t.httpOf(e);j(!n.during.length&&!n.after.length?0:-1),D(),N(t.httpGroups(n))}}function mz(e,t){if(e&1){let e=B();F(0,`li`)(1,`div`,29),A(2,ER,2,1,`time`),F(3,`span`,30),K(4),I(),F(5,`code`,31),K(6),I(),A(7,DR,6,1),F(8,`span`,32)(9,`span`,33),K(10),I(),A(11,OR,2,1,`span`,22)(12,kR,2,1,`span`,34)(13,AR,2,1,`span`,34),A(14,jR,2,0,`span`,35),A(15,MR,2,0,`span`,36),A(16,NR,4,2,`span`,16),I()(),A(17,FR,3,1,`div`,37),F(18,`dl`,38),A(19,IR,5,1),A(20,LR,4,2),A(21,RR,4,2),A(22,zR,4,1),A(23,BR,4,1),A(24,HR,6,1),A(25,UR,6,2),A(26,WR,7,2),A(27,GR,4,2),A(28,qR,5,0),A(29,YR,5,2),A(30,XR,4,1),A(31,ZR,4,1),A(32,QR,4,1),A(33,$R,4,2),A(34,ez,4,1),A(35,tz,4,1),A(36,nz,4,1),A(37,rz,4,1),A(38,iz,4,1),A(39,az,4,1),A(40,oz,4,1),I(),F(41,`div`,39)(42,`button`,40),H(`click`,function(){let t=C(e).$implicit;return w(W(2).replay(t))}),K(43,` Replay `),I(),F(44,`button`,41),H(`click`,function(){let t=C(e).$implicit;return w(W(2).compare.emit(t.id))}),K(45,` Compare `),I(),F(46,`button`,41),H(`click`,function(){let t=C(e).$implicit;return w(W(2).copy(t))}),K(47,` Copy repro `),I(),F(48,`button`,41),H(`click`,function(){let t=C(e).$implicit;return w(W(2).toggleHttp(t))}),K(49,` HTTP calls `),I(),A(50,sz,2,2,`p`,42),I(),F(51,`div`,43),A(52,cz,2,0,`p`,22)(53,lz,2,0,`p`,22)(54,pz,3,1),I()()}if(e&2){let e,n,r,i,a,o=t.$implicit,s=W(2);G(`in-loop`,!!s.loopOf(o)),D(2),j(o.beforeConnect?-1:2),D(2),J(`#`,o.id),D(2),q(o.url),D(),j(o.finalUrl&&o.finalUrl!==o.url?7:-1),D(2),k(`data-tone`,s.tone(o.outcome)),D(),q(o.outcome),D(),j(o.beforeConnect?11:o.phases?.total===void 0?o.endedAt===void 0?-1:13:12),D(3),j(o.probe?14:-1),D(),j(o.queryRedirect?15:-1),D(),j((e=s.loopOf(o))?16:-1,e),D(),j(s.bars(o).length?17:-1),D(2),j(o.from?19:-1),D(),j(o.caller?20:-1),D(),j((n=o.platform)?21:-1,n),D(),j(o.extras?.length?22:-1),D(),j(o.redirectedFrom===void 0?-1:23),D(),j((r=s.loopOf(o))?24:-1,r),D(),j(o.redirectTo?25:-1),D(),j((i=o.queryRedirect)?26:-1,i),D(),j(o.guards&&(o.guards.names.length||o.guards.passed===!1)?27:-1),D(),j(o.runs?.length?28:-1),D(),j(o.checked&&(o.checked.activate.length||o.checked.deactivate.length)?29:-1),D(),j(o.resolvers?.names?.length?30:-1),D(),j(o.lazyLoaded?.length?31:-1),D(),j(o.reused?.length?32:-1),D(),j(o.requests?33:-1),D(),j(o.scroll?34:-1),D(),j(o.title?35:-1),D(),j(o.warnings?.length?36:-1),D(),j(o.reason||o.code?37:-1),D(),j(o.errorCode?38:-1),D(),j(o.errorHandler?39:-1),D(),j(o.earlier?40:-1),D(2),P(`disabled`,!s.navigationAllowed()||!s.replayable(o)),k(`aria-describedby`,s.replayNote(o))(`aria-label`,`Replay navigation `+o.id),D(2),k(`aria-label`,`Compare navigation `+o.id+` with an earlier one`),D(2),k(`aria-label`,`Copy repro for navigation `+o.id),D(2),k(`aria-expanded`,s.httpShown(o))(`aria-controls`,`nav-http-`+o.id)(`aria-label`,`HTTP calls of navigation `+o.id),D(2),j(s.replayable(o)?-1:50),D(),P(`id`,`nav-http-`+o.id)(`hidden`,!s.httpShown(o)),D(),j((a=s.httpState(o))===`loading`?52:a===`failed`?53:a===`ready`?54:-1)}}function hz(e,t){if(e&1&&(F(0,`div`,24)(1,`span`,25),K(2),I(),F(3,`div`,26),M(4,TR,3,3,`span`,null,Xh),I()(),F(6,`ol`,27),M(7,mz,55,47,`li`,28,dR),I()),e&2){let e=W();D(2),Y(``,e.items().length,` of `,e.plural(e.page().navigations.length,`navigation`)),D(2),N(e.phases),D(3),N(e.items())}}function gz(e,t){if(e&1){let e=B();F(0,`div`,47)(1,`p`,48),K(2,`No navigations match the current filters.`),I(),F(3,`p`,22),K(4),I(),F(5,`button`,41),H(`click`,function(){C(e);let t=W(2),n=Ag(2);return t.clearFilters(),w(n.focus())}),K(6,` Clear filters `),I()()}if(e&2){let e=W(2);D(4),J(` `,e.plural(e.page().navigations.length,`navigation is`,`navigations are`),` hidden. Clear the filters to see them. `)}}function _z(e,t){e&1&&(F(0,`div`,47)(1,`p`,48),K(2,`No navigations since Pangular Inspector connected.`),I(),F(3,`p`,22),K(4,`Earlier ones are not visible. Click a link in the app to record one.`),I()())}function vz(e,t){e&1&&A(0,gz,7,1,`div`,47)(1,_z,5,0,`div`,47),e&2&&j(+!W().page().navigations.length)}var yz=[`recognize`,`guards`,`resolve`,`activate`],bz=class e{plural=JE;page=$.required();rpc=$(null);compare=ev();maxNavigations=X(()=>NT(this.rpc()).limits.navigations);navigationAllowed=X(()=>IT(this.rpc(),`router`));navigationOff=Uw(`router`);phases=yz;pageId=X(()=>this.page().pageId);filter=Q({source:this.pageId,computation:()=>``});onlyProblems=Q({source:this.pageId,computation:()=>!1});message=Q({source:this.pageId,computation:()=>``});loops=X(()=>this.page().loops??[]);outsideRouter=X(()=>(this.page().platformNavigations??[]).filter(e=>e.navigationId===void 0).slice(-5).reverse());loopById=X(()=>{let e=new Map;for(let t of this.loops())for(let n of t.ids)e.set(n,t);return e});items=X(()=>{let e=this.filter().toLowerCase();return[...this.page().navigations].reverse().filter(t=>(!e||t.url.toLowerCase().includes(e)||!!t.finalUrl?.toLowerCase().includes(e))&&(!this.onlyProblems()||this.isProblem(t)))});isProblem(e){return e.probe?!1:![`succeeded`,`pending`].includes(e.outcome)||this.loopById().has(e.id)}loopOf(e){return this.loopById().get(e.id)}loopTitle(e){return e.kind===`burst`?`navigation loop`:`redirect loop`}hopsOf(e,t){return e.hops.filter(e=>e.id===t.id)}hopCause(e){return e.via===`navigate`?`#${e.id} started by ${e.by??`code`}`:`${e.via===`redirectTo`?`config`:`${e.via} redirect`}${e.by?` ${e.by}`:e.via===`redirectTo`?` redirectTo`:``} in #${e.id}`}loopMeta(e){let t=e.ids.length>1?`Navigations #${e.ids[0]} to #${e.ids[e.ids.length-1]}`:`Navigation #${e.ids[0]}`,n=e.bounces>1?`, came back ${e.bounces} times`:``,r=e.guards.length?` Guards involved: ${e.guards.join(`, `)}.`:``;return`${t}${n}; ${e.end}.${r}`}reasonText(e){return[e.code,e.reason].filter(Boolean).join(`: `)}clearFilters(){this.filter.set(``),this.onlyProblems.set(!1)}tone(e){return NI(e)}color(e){return`var(--phase-${e})`}bars(e){let t=e.phases?.total;return t?yz.filter(t=>(e.phases?.[t]??0)>0).map(n=>({phase:n,ms:e.phases[n],width:Math.max(1,e.phases[n]/t*100)})):[]}barLabel(e){return`Phases: ${this.bars(e).map(e=>`${e.phase} ${e.ms}ms`).join(`, `)}`}guardResult(e){let t=e.guards?.passed;return t===!0?`passed`:t===!1?e.outcome===`redirected`?`redirected`:`blocked`:e.outcome===`pending`?`running`:`did not finish, navigation ${e.outcome}`}isBad(e){return e===`false`||/^(UrlTree|RedirectCommand|threw)/.test(e)}time=GE;http=Q({source:this.pageId,computation:()=>({})});httpOpen=Q({source:this.pageId,computation:()=>({})});round=Math.round;httpShown(e){return!!this.httpOpen()[e.id]}httpState(e){let t=this.http()[e.id];return t===void 0?null:typeof t==`string`?t:`ready`}httpOf(e){let t=this.http()[e.id];return typeof t==`object`?t:{during:[],after:[]}}httpGroups(e){return[{label:`While it ran`,calls:e.during},{label:`After it ended`,calls:e.after}].filter(e=>e.calls.length)}callStatus(e){return e.cancelled?`cancelled`:e.status?String(e.status):`ERR`}isFailedCall(e){return e.status===0||e.status>=400||!!e.error||e.cancelled===!0}async toggleHttp(e){let t=!this.httpShown(e);if(this.httpOpen.update(n=>({...n,[e.id]:t})),!t)return;let n=this.pageId();this.http.update(t=>({...t,[e.id]:`loading`}));let r=await kI(this.rpc(),`router-http`,{pageId:n,id:e.id});n===this.pageId()&&this.http.update(t=>({...t,[e.id]:r??`failed`}))}instrumentSeq=0;async toggleInstrument(e){let t=e.target,n=t.checked,r=this.pageId(),i=++this.instrumentSeq,a=await MI(this.rpc(),r,{action:`instrument`,on:n});if(i===this.instrumentSeq){if(r!==this.pageId()){t.checked=!!this.page().instrumented;return}if(a.error){t.checked=!!this.page().instrumented,this.message.set(String(a.error));return}this.message.set(n?`Recording each guard and resolver.`:`Stopped recording guards and resolvers.`)}}replayable(e){return AI(e.url)}replayNote(e){return this.navigationAllowed()?this.replayable(e)?null:`replay-note-${e.id}`:`route-timeline-writes-off`}async replay(e){this.message.set(`Replaying #${e.id}…`);let t=this.pageId(),n=await MI(this.rpc(),t,{action:`replay`,id:e.id});if(t!==this.pageId())return;if(n.error){this.message.set(String(n.error));return}let r=n.replay;this.message.set(`Replay of #${e.id}: ${r?.outcome??`unknown`}${n.same?` (same as before)`:` (different from before)`}.`)}async copy(e){let t=this.pageId(),n=await kI(this.rpc(),`router-export`,{pageId:t,id:e.id});if(t===this.pageId()){if(!n){this.message.set(`Could not build the repro.`);return}try{await navigator.clipboard.writeText(n),t===this.pageId()&&this.message.set(`Copied a markdown repro of #${e.id}.`)}catch{t===this.pageId()&&this.message.set(`The clipboard is not available here.`)}}}async clearNavigations(){let e=this.rpc(),t=this.pageId(),n=`Clearing navigations…`;this.message.set(n);let r;try{if(!e)throw Error(`No connection`);await _T(e,`clear-router-navigations`,t),r=`Navigations cleared.`}catch{r=`Could not clear the navigations.`}t===this.pageId()?this.message.set(r):this.message()===n&&this.message.set(``)}exportJson(){let e=new Blob([JSON.stringify(this.page().navigations,null,2)],{type:`application/json`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`navigations-${this.page().pageId}.json`,n.click(),URL.revokeObjectURL(t)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-route-timeline`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},outputs:{compare:`compare`},decls:22,vars:13,consts:[[`filterInput`,``],[1,`toolbar`],[`placeholder`,`Filter by URL`,`saveKey`,`router-timeline`,3,`valueChange`,`value`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[`type`,`button`,1,`small`,`export`,3,`click`],[`type`,`button`,`aria-label`,`Clear navigations`,1,`small`,3,`click`,`disabled`],[`role`,`status`,1,`visually-hidden`],[`aria-hidden`,`true`,1,`message`],[`id`,`route-timeline-writes-off`,1,`message`],[`what`,`navigations`,`limit`,`navigations`,3,`dropped`,`max`],[`aria-labelledby`,`loops-heading`,1,`loops`],[`aria-labelledby`,`outside-heading`,1,`outside`],[`id`,`loops-heading`],[1,`loop`],[1,`chain`],[`data-tone`,`bad`,1,`badge`],[1,`hops`],[1,`muted`,`loop-meta`],[`aria-hidden`,`true`,1,`arrow`],[1,`visually-hidden`],[`id`,`outside-heading`],[1,`muted`],[1,`bad`],[1,`meta-row`],[1,`muted`,`count`],[`aria-hidden`,`true`,1,`legend`],[1,`navs`],[3,`in-loop`],[1,`head`],[1,`id`],[1,`url`],[1,`meta`],[1,`badge`],[1,`muted`,`ms`],[1,`tag`],[`data-tone`,`warn`,1,`badge`],[`role`,`img`,1,`bar`],[1,`details`],[1,`actions`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`,`replay-note`,3,`id`],[1,`http`,3,`id`,`hidden`],[3,`width`,`background`],[1,`reason`],[1,`http-label`],[1,`empty`],[1,`empty-title`]],template:function(e,t){if(e&1){let e=B();F(0,`div`,1)(1,`app-search-field`,2,0),w_(`valueChange`,function(n){return C(e),C_(t.filter,n)||(t.filter=n),w(n)}),I(),F(3,`label`,3)(4,`input`,4),H(`change`,function(e){return t.onlyProblems.set(e.target.checked)}),I(),K(5,` Only problems `),I(),F(6,`label`,3)(7,`input`,4),H(`change`,function(e){return t.toggleInstrument(e)}),I(),K(8,` Record each guard and resolver `),I(),F(9,`button`,5),H(`click`,function(){return t.exportJson()}),K(10,`Export JSON`),I(),F(11,`button`,6),H(`click`,function(){return t.clearNavigations()}),K(12,` Clear `),I()(),F(13,`p`,7),K(14),I(),A(15,mR,2,1,`p`,8),A(16,hR,2,1,`p`,9),L(17,`app-limit-note`,10),A(18,bR,5,1,`section`,11),A(19,wR,11,0,`section`,12),A(20,hz,9,2)(21,vz,2,1)}e&2&&(D(),S_(`value`,t.filter),D(3),P(`checked`,t.onlyProblems()),D(3),P(`checked`,t.page().instrumented),D(4),P(`disabled`,!t.navigationAllowed()),k(`aria-describedby`,t.navigationAllowed()?null:`route-timeline-writes-off`),D(3),q(t.message()),D(),j(t.message()?15:-1),D(),j(t.navigationAllowed()?-1:16),D(),P(`dropped`,t.page().dropped??0)(`max`,t.maxNavigations()),D(),j(t.loops().length?18:-1),D(),j(t.outsideRouter().length?19:-1),D(),j(t.items().length?20:21))},dependencies:[nP,eO],styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); font-size: 13px; line-height: 1.5; @@ -6121,7 +6135,7 @@ time[_ngcontent-%COMP%] { .export[_ngcontent-%COMP%] { margin-left: 0; } -}`]})},gz=(e,t)=>t.path,_z=(e,t)=>t.phase;function vz(e,t){if(e&1&&(R(0,`li`),K(1,` Redirect `),R(2,`code`),K(3),z(),R(4,`span`,6),K(5,`→`),z(),R(6,`span`,7),K(7,`to`),z(),R(8,`code`),K(9),z(),K(10,` by `),R(11,`code`),K(12),z()()),e&2){let e=t.$implicit;D(3),q(e.from),D(6),q(e.to),D(3),q(e.route)}}function yz(e,t){if(e&1&&(R(0,`ol`,3),M(1,vz,13,3,`li`,null,Jh),z()),e&2){W();let e=E_(0);D(),N(e.hops)}}function bz(e,t){e&1&&(R(0,`span`,9),K(1,`active`),z())}function xz(e,t){e&1&&(R(0,`span`,6),K(1,` → `),z(),R(2,`span`,7),K(3,`then`),z())}function Sz(e,t){if(e&1&&(R(0,`code`),K(1),z(),A(2,bz,2,0,`span`,9),A(3,xz,4,0)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;D(),q(e.path),D(),j(e.active?2:-1),D(),j(n===r-1?-1:3)}}function Cz(e,t){if(e&1&&(R(0,`p`)(1,`span`,8),K(2),z(),M(3,Sz,4,3,null,null,gz),z()),e&2){W();let e=E_(0);D(),k(`data-tone`,e.matched?`good`:`warn`),D(),q(e.matched?`match`:`stops`),D(),N(e.chain)}}function wz(e,t){if(e&1&&(K(0,` Nearest: `),R(1,`code`),K(2),z()),e&2){W(2);let e=E_(0);D(2),q(e.nearest.join(`, `))}}function Tz(e,t){if(e&1&&(R(0,`p`)(1,`span`,10),K(2,`no match`),z(),K(3,` Matches no route (NG04002). `),A(4,wz,3,1),z()),e&2){W();let e=E_(0);D(4),j(e.nearest.length?4:-1)}}function Ez(e,t){e&1&&(R(0,`p`,2),K(1,` Params: `),R(2,`code`),K(3),z()()),e&2&&(D(3),q(t))}function Dz(e,t){if(e&1&&(R(0,`li`)(1,`code`),K(2),z()()),e&2){let e=t.$implicit;D(2),q(e)}}function Oz(e,t){if(e&1&&(R(0,`li`)(1,`span`,11),K(2),z(),R(3,`ul`),M(4,Dz,3,1,`li`,null,Jh),z()()),e&2){let e=t.$implicit;D(2),q(e.phase),D(2),N(e.items)}}function kz(e,t){if(e&1&&(R(0,`ol`,4),M(1,Oz,6,1,`li`,null,_z),z()),e&2){W();let e=E_(0);D(),N(e.steps)}}function Az(e,t){if(e&1&&(R(0,`code`),K(1),z(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;D(),q(e.source),D(),J(``,n===r-1?``:`, `,` `)}}function jz(e,t){if(e&1&&(R(0,`p`,2),K(1,` Declared in: `),M(2,Az,3,2,null,null,gz),z()),e&2){let e=W();D(2),N(e.sources())}}function Mz(e,t){if(e&1&&(R(0,`p`,2),K(1,` Render mode `),R(2,`code`),K(3),z(),K(4,` (ServerRoute `),R(5,`code`),K(6),z(),K(7,`) `),z()),e&2){let e=t;D(3),q(e.mode),D(3),q(e.path)}}function Nz(e,t){if(e&1&&(R(0,`p`,5),K(1),z()),e&2){W();let e=E_(0);D(),q(e.stopped)}}function Pz(e,t){if(e&1&&(R(0,`p`,2),K(1),z()),e&2){let e=t.$implicit;D(),q(e)}}var Fz=class e{preview=$.required();paramText=X(()=>Object.entries(this.preview().params).map(([e,t])=>`${e}=${t}`).join(`, `));sources=X(()=>this.preview().chain.filter(e=>e.source));static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-route-preview`]],inputs:{preview:[1,`preview`]},decls:18,vars:9,consts:[[`aria-labelledby`,`route-preview-heading`,1,`card`],[`id`,`route-preview-heading`],[1,`muted`],[`aria-label`,`Redirects`,1,`hops`],[1,`steps`],[1,`note`],[`aria-hidden`,`true`],[1,`visually-hidden`],[1,`badge`],[1,`tag`],[`data-tone`,`bad`,1,`badge`],[1,`phase`]],template:function(e,t){if(e&1&&(w_(0),R(1,`section`,0)(2,`h3`,1),K(3,` What happens if you go to `),R(4,`code`),K(5),z()(),R(6,`p`,2),K(7,`Predicted from the live route config. Nothing ran in the app.`),z(),A(8,yz,3,0,`ol`,3),A(9,Cz,5,2,`p`)(10,Tz,5,1,`p`),A(11,Ez,4,1,`p`,2),A(12,kz,3,0,`ol`,4),A(13,jz,4,0,`p`,2),A(14,Mz,8,2,`p`,2),A(15,Nz,2,1,`p`,5),M(16,Pz,2,1,`p`,2,Yh),z()),e&2){let e,n,r=T_(t.preview());D(5),q(r.url),D(3),j(r.hops.length?8:-1),D(),j(r.chain.length?9:10),D(2),j((e=t.paramText())?11:-1,e),D(),j(r.steps.length?12:-1),D(),j(t.sources().length?13:-1),D(),j((n=r.renderMode)?14:-1,n),D(),j(r.stopped?15:-1),D(),N(r.notes)}},styles:[`.muted[_ngcontent-%COMP%] { +}`]})},xz=(e,t)=>t.path,Sz=(e,t)=>t.phase;function Cz(e,t){if(e&1&&(R(0,`li`),K(1,` Redirect `),R(2,`code`),K(3),z(),R(4,`span`,6),K(5,`→`),z(),R(6,`span`,7),K(7,`to`),z(),R(8,`code`),K(9),z(),K(10,` by `),R(11,`code`),K(12),z()()),e&2){let e=t.$implicit;D(3),q(e.from),D(6),q(e.to),D(3),q(e.route)}}function wz(e,t){if(e&1&&(R(0,`ol`,3),M(1,Cz,13,3,`li`,null,Yh),z()),e&2){W();let e=O_(0);D(),N(e.hops)}}function Tz(e,t){e&1&&(R(0,`span`,9),K(1,`active`),z())}function Ez(e,t){e&1&&(R(0,`span`,6),K(1,` → `),z(),R(2,`span`,7),K(3,`then`),z())}function Dz(e,t){if(e&1&&(R(0,`code`),K(1),z(),A(2,Tz,2,0,`span`,9),A(3,Ez,4,0)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;D(),q(e.path),D(),j(e.active?2:-1),D(),j(n===r-1?-1:3)}}function Oz(e,t){if(e&1&&(R(0,`p`)(1,`span`,8),K(2),z(),M(3,Dz,4,3,null,null,xz),z()),e&2){W();let e=O_(0);D(),k(`data-tone`,e.matched?`good`:`warn`),D(),q(e.matched?`match`:`stops`),D(),N(e.chain)}}function kz(e,t){if(e&1&&(K(0,` Nearest: `),R(1,`code`),K(2),z()),e&2){W(2);let e=O_(0);D(2),q(e.nearest.join(`, `))}}function Az(e,t){if(e&1&&(R(0,`p`)(1,`span`,10),K(2,`no match`),z(),K(3,` Matches no route (NG04002). `),A(4,kz,3,1),z()),e&2){W();let e=O_(0);D(4),j(e.nearest.length?4:-1)}}function jz(e,t){e&1&&(R(0,`p`,2),K(1,` Params: `),R(2,`code`),K(3),z()()),e&2&&(D(3),q(t))}function Mz(e,t){if(e&1&&(R(0,`li`)(1,`code`),K(2),z()()),e&2){let e=t.$implicit;D(2),q(e)}}function Nz(e,t){if(e&1&&(R(0,`li`)(1,`span`,11),K(2),z(),R(3,`ul`),M(4,Mz,3,1,`li`,null,Yh),z()()),e&2){let e=t.$implicit;D(2),q(e.phase),D(2),N(e.items)}}function Pz(e,t){if(e&1&&(R(0,`ol`,4),M(1,Nz,6,1,`li`,null,Sz),z()),e&2){W();let e=O_(0);D(),N(e.steps)}}function Fz(e,t){if(e&1&&(R(0,`code`),K(1),z(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;D(),q(e.source),D(),J(``,n===r-1?``:`, `,` `)}}function Iz(e,t){if(e&1&&(R(0,`p`,2),K(1,` Declared in: `),M(2,Fz,3,2,null,null,xz),z()),e&2){let e=W();D(2),N(e.sources())}}function Lz(e,t){if(e&1&&(R(0,`p`,2),K(1,` Render mode `),R(2,`code`),K(3),z(),K(4,` (ServerRoute `),R(5,`code`),K(6),z(),K(7,`) `),z()),e&2){let e=t;D(3),q(e.mode),D(3),q(e.path)}}function Rz(e,t){if(e&1&&(R(0,`p`,5),K(1),z()),e&2){W();let e=O_(0);D(),q(e.stopped)}}function zz(e,t){if(e&1&&(R(0,`p`,2),K(1),z()),e&2){let e=t.$implicit;D(),q(e)}}var Bz=class e{preview=$.required();paramText=X(()=>Object.entries(this.preview().params).map(([e,t])=>`${e}=${t}`).join(`, `));sources=X(()=>this.preview().chain.filter(e=>e.source));static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-route-preview`]],inputs:{preview:[1,`preview`]},decls:18,vars:9,consts:[[`aria-labelledby`,`route-preview-heading`,1,`card`],[`id`,`route-preview-heading`],[1,`muted`],[`aria-label`,`Redirects`,1,`hops`],[1,`steps`],[1,`note`],[`aria-hidden`,`true`],[1,`visually-hidden`],[1,`badge`],[1,`tag`],[`data-tone`,`bad`,1,`badge`],[1,`phase`]],template:function(e,t){if(e&1&&(E_(0),R(1,`section`,0)(2,`h3`,1),K(3,` What happens if you go to `),R(4,`code`),K(5),z()(),R(6,`p`,2),K(7,`Predicted from the live route config. Nothing ran in the app.`),z(),A(8,wz,3,0,`ol`,3),A(9,Oz,5,2,`p`)(10,Az,5,1,`p`),A(11,jz,4,1,`p`,2),A(12,Pz,3,0,`ol`,4),A(13,Iz,4,0,`p`,2),A(14,Lz,8,2,`p`,2),A(15,Rz,2,1,`p`,5),M(16,zz,2,1,`p`,2,Xh),z()),e&2){let e,n,r=D_(t.preview());D(5),q(r.url),D(3),j(r.hops.length?8:-1),D(),j(r.chain.length?9:10),D(2),j((e=t.paramText())?11:-1,e),D(),j(r.steps.length?12:-1),D(),j(t.sources().length?13:-1),D(),j((n=r.renderMode)?14:-1,n),D(),j(r.stopped?15:-1),D(),N(r.notes)}},styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); font-size: 13px; line-height: 1.5; @@ -6462,7 +6476,7 @@ ul[_ngcontent-%COMP%] { .phase[_ngcontent-%COMP%] { color: var(--%NS%text-2); font-weight: 600; -}`]})},Iz=[`urlInput`],Lz=()=>[],Rz=(e,t)=>t.node.id;function zz(e,t){if(e&1&&(K(0,` with `),F(1,`code`),K(2),V_(3,`json`),I()),e&2){W(2);let e=E_(0);D(2),q(H_(3,1,e.params))}}function Bz(e,t){if(e&1&&(F(0,`span`,21),K(1,`match`),I(),K(2,` Matches `),F(3,`code`,22),K(4),I(),A(5,zz,4,3)),e&2){W();let e=E_(0),t=W();D(4),q(t.chainText(e)),D(),j(t.hasKeys(e.params)?5:-1)}}function Vz(e,t){if(e&1&&(K(0,` Nearest: `),F(1,`code`),K(2),I()),e&2){W(2);let e=E_(0);D(2),q(e.nearest.join(`, `))}}function Hz(e,t){if(e&1&&(F(0,`span`,23),K(1,`no match`),I(),K(2,` Matches no route (NG04002). `),A(3,Vz,3,1)),e&2){W();let e=E_(0);D(3),j(e.nearest.length?3:-1)}}function Uz(e,t){if(e&1&&(F(0,`div`,20),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function Wz(e,t){if(e&1&&(w_(0),F(1,`div`,9)(2,`span`,19),K(3,`Result for `),F(4,`code`),K(5),I(),K(6,`:`),I(),A(7,Bz,6,2)(8,Hz,4,1),M(9,Uz,2,1,`div`,20,Yh),I()),e&2){let e=t,n=T_(e.result);D(),k(`data-matched`,n.matched),D(4),q(e.url),D(2),j(n.matched?7:8),D(2),N(n.notes)}}function Gz(e,t){e&1&&L(0,`app-route-preview`,10),e&2&&P(`preview`,t)}function Kz(e,t){if(e&1&&(F(0,`p`,11),K(1),I()),e&2){let e=W();D(),q(e.message())}}function qz(e,t){if(e&1&&(F(0,`p`,13),K(1),I()),e&2){let e=W();D(),q(e.navigationOff)}}function Jz(e,t){if(e&1&&(F(0,`span`,24),K(1),I(),K(2,`. `)),e&2){let e=W(2);D(),q(e.countText())}}function Yz(e,t){if(e&1&&K(0),e&2){let e=W(2);J(` `,e.plural(e.rows().length,`route`),`. `)}}function Xz(e,t){e&1&&K(0),e&2&&J(` `,W(2).plural(t,`route`),` left out: the page lists at most 200 routes per level and 1000 in total. `)}function Zz(e,t){if(e&1&&(F(0,`p`,16),K(1),A(2,Jz,3,1)(3,Yz,1,1),K(4,` Lazy routes show their children once loaded. `),A(5,Xz,1,1),I()),e&2){let e,t=W();D(),J(` Generation `,t.page().generation,` · `),D(),j(t.filter()?2:3),D(3),j((e=t.page().configTruncated)?5:-1,e)}}function Qz(e,t){e&1&&(F(0,`div`,17)(1,`p`,25),K(2),I(),F(3,`p`,20),K(4),I()()),e&2&&(D(2),J(` `,`The page has not reported its route config yet.`,` `),D(2),J(` `,`It appears once the router initializes. Navigate in the app if it stays empty.`,` `))}function $z(e,t){if(e&1){let e=B();F(0,`div`,17)(1,`p`,25),K(2,`No routes match the filter.`),I(),F(3,`p`,20),K(4,`Try a shorter path or a component name.`),I(),F(5,`button`,7),H(`click`,function(){C(e);let t=W(),n=kg(19);return t.setFilter(``),w(n.focus())}),K(6,` Clear filters `),I()()}}function eB(e,t){e&1&&(F(0,`span`,29),K(1,`active`),I())}function tB(e,t){if(e&1&&(F(0,`span`,29),K(1),I()),e&2){let e=W().$implicit;D(),J(`lazy `,e.node.lazy)}}function nB(e,t){if(e&1&&(F(0,`span`,29),K(1),I()),e&2){let e=W().$implicit;D(),J(`outlet `,e.node.outlet)}}function rB(e,t){if(e&1&&(F(0,`span`,30)(1,`span`,27),K(2,`declared in `),I(),L(3,`app-source-link`,36),I()),e&2){let e=W().$implicit;D(3),P(`file`,e.at.file)(`line`,e.at.line)}}function iB(e,t){if(e&1&&(F(0,`span`,31),K(1,`redirect `),F(2,`span`,37),K(3,`→`),I(),F(4,`code`),K(5),I()()),e&2){let e=W().$implicit;D(5),q(e.node.redirectTo)}}function aB(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,e.node.component??(e.node.lazy===`unloaded`?`lazy, not loaded yet`:e.node.kind),` `)}}function oB(e,t){if(e&1&&(F(0,`span`,29),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function sB(e,t){if(e&1&&(F(0,`span`,29),K(1),I()),e&2){let e=t.$implicit;D(),J(`resolve `,e)}}function cB(e,t){e&1&&(F(0,`span`,38),K(1,`–`),I(),F(2,`span`,27),K(3,`none`),I())}function lB(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,e.node.title,` `)}}function uB(e,t){e&1&&(F(0,`span`,38),K(1,`–`),I(),F(2,`span`,27),K(3,`none`),I())}function dB(e,t){if(e&1){let e=B();F(0,`input`,40),H(`input`,function(t){let n=C(e).$implicit,r=W(2).$implicit;return w(W(2).setParam(r.node.id,n,t.target.value))}),I()}if(e&2){let e=t.$implicit,n=W(2).$implicit,r=W(2);P(`placeholder`,e)(`value`,r.paramValues()[n.node.id]?.[e]??``),k(`aria-label`,e+` for `+n.node.fullPath)(`aria-invalid`,r.isInvalid(n.node,e)?`true`:null)(`aria-describedby`,r.isInvalid(n.node,e)?`route-tree-row-result`:null)}}function fB(e,t){if(e&1){let e=B();M(0,dB,1,5,`input`,39,Yh),F(2,`button`,8),H(`click`,function(){C(e);let t=W().$implicit,n=kg(1);return w(W(2).navigate(t.node,n))}),K(3,` Go `),I()}if(e&2){let e=W().$implicit,t=W(2);N(t.params(e.node)),D(2),P(`disabled`,!t.navigationAllowed()),k(`aria-describedby`,t.navigationAllowed()?null:`route-tree-writes-off`)(`aria-label`,`Navigate to `+e.node.fullPath)}}function pB(e,t){if(e&1){let e=B();F(0,`button`,7),H(`click`,function(){C(e);let t=W().$implicit;return w(W(2).resolveLazy(t.node))}),K(1,` Read lazy `),I()}if(e&2){let e=W().$implicit;k(`aria-label`,`Read lazy routes of `+e.node.fullPath)}}function mB(e,t){if(e&1&&(F(0,`tr`,35)(1,`td`,41)(2,`p`,42),K(3),I()()()),e&2){let e=W(3);D(3),q(e.rowResult()?.text)}}function hB(e,t){if(e&1&&(F(0,`tr`,null,2)(2,`td`,28),K(3),A(4,eB,2,0,`span`,29),A(5,tB,2,1,`span`,29),A(6,nB,2,1,`span`,29),A(7,rB,4,2,`span`,30),I(),F(8,`td`),A(9,iB,6,1,`span`,31)(10,aB,1,1),I(),F(11,`td`),M(12,oB,2,1,`span`,29,Jh),M(14,sB,2,1,`span`,29,Yh),A(16,cB,4,0),I(),F(17,`td`),A(18,lB,1,1)(19,uB,4,0),I(),F(20,`td`,32)(21,`div`,33),A(22,fB,4,3),A(23,pB,2,1,`button`,34),I()()(),A(24,mB,4,1,`tr`,35)),e&2){let e=t.$implicit,n=W(2);G(`active`,n.isActive(e.node)),D(2),Xg(`padding-left`,14+e.depth*16,`px`),D(),J(` `,e.node.fullPath,` `),D(),j(n.isActive(e.node)?4:-1),D(),j(e.node.lazy?5:-1),D(),j(e.node.outlet?6:-1),D(),j(e.at?7:-1),D(2),j(e.node.redirectTo===void 0?10:9),D(3),N(n.guardList(e.node)),D(2),N(e.node.resolvers??F_(15,Lz)),D(2),j(!n.guardList(e.node).length&&!e.node.resolvers?.length?16:-1),D(2),j(e.node.title?18:19),D(4),j(n.canNavigate(e.node)?22:-1),D(),j(e.node.kind===`lazy`&&e.node.lazy===`unloaded`?23:-1),D(),j(n.rowResult()?.id===e.node.id?24:-1)}}function gB(e,t){if(e&1&&(F(0,`div`,18)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,26),K(5,`Path`),I(),F(6,`th`,26),K(7,`Target`),I(),F(8,`th`,26),K(9,`Guards and resolvers`),I(),F(10,`th`,26),K(11,`Title`),I(),F(12,`th`,26)(13,`span`,27),K(14,`Actions`),I()()()(),F(15,`tbody`),M(16,hB,25,16,null,null,Rz),I()()()),e&2){let e=W();D(16),N(e.rows())}}function _B(e,t){return`${e} of ${t} ${t===1?`route`:`routes`}`}var vB=class e{plural=JE;page=$.required();rpc=$(null);navigationAllowed=X(()=>IT(this.rpc(),`router`));navigationOff=Uw(`router`);sources=$([]);filter=E(``);testUrl=E(``);pageId=X(()=>this.page().pageId);match=Q({source:this.pageId,computation:()=>null});message=Q({source:this.pageId,computation:()=>``});rowResult=Q({source:this.pageId,computation:()=>null});paramValues=Q({source:this.pageId,computation:()=>({})});checkedRow=Q({source:this.pageId,computation:()=>null});filterAnnouncement=Q({source:this.pageId,computation:()=>``});preview=Q({source:this.pageId,computation:()=>null});predictSeq=0;announceFlip=!1;probeSeq=0;urlInput=av(`urlInput`);active=X(()=>new Set(this.page().activeIds??[]));rows=X(()=>{let e=this.filter().toLowerCase(),t=this.sources(),n=[],r=(i,a)=>{for(let o of i){let i=CI(o,t),s=i&&SI(i);(!e||o.fullPath.toLowerCase().includes(e)||o.component?.toLowerCase().includes(e)||s?.toLowerCase().includes(e))&&n.push({node:o,depth:a,source:s,at:i}),o.children&&r(o.children,a+1)}};return r(this.page().config??[],0),n});total=X(()=>{let e=t=>t.reduce((t,n)=>t+1+e(n.children??[]),0);return e(this.page().config??[])});countText=X(()=>_B(this.rows().length,this.total()));setFilter(e){this.filter.set(e);let t=this.rows().length,n=e?t?`${_B(t,this.total())} match.`:`No routes match.`:``;this.announceFlip=!this.announceFlip,this.filterAnnouncement.set(n&&(this.announceFlip?`${n}\u00a0`:n))}hasKeys(e){return Object.keys(e).length>0}isActive(e){return this.active().has(e.id)}guardList(e){return Object.entries(e.guards??{}).flatMap(([e,t])=>t.map(t=>`${e} ${t}`))}params(e){return(e.fullPath.match(/:([A-Za-z0-9_]+)/g)??[]).map(e=>e.slice(1))}canNavigate(e){return e.redirectTo===void 0&&!e.matcher&&!e.outlet&&!e.fullPath.includes(`**`)&&(!!e.component||e.kind===`component`||e.kind===`lazy`)}setParam(e,t,n){this.paramValues.update(r=>({...r,[e]:{...r[e],[t]:n}}))}missingParams(e){let t=this.paramValues()[e.id]??{};return this.params(e).filter(e=>!t[e])}isInvalid(e,t){return this.checkedRow()===e.id&&!this.paramValues()[e.id]?.[t]}chainText(e){return e.chain.map(e=>e.fullPath).join(` → `)}editUrl(e){this.testUrl.set(e),this.predictSeq++,this.probeSeq++,this.match.set(null),this.preview.set(null),this.message.set(``)}askForUrl(e){this.match.set(null),this.message.set(`Type a URL to ${e}, for example /users/42.`),this.urlInput()?.nativeElement.focus()}async predict(){let e=this.testUrl().trim(),t=++this.predictSeq;if(!e){this.askForUrl(`predict`);return}let n=this.pageId(),r=await wI(this.rpc(),`router-match`,{pageId:n,url:e});t===this.predictSeq&&n===this.pageId()&&(this.preview.set(null),this.match.set(r&&{url:e,result:r}),r?this.message()===`Could not reach the page.`&&this.message.set(``):this.message.set(EI))}async whatHappens(){let e=this.testUrl().trim(),t=++this.predictSeq;if(!e){this.preview.set(null),this.askForUrl(`preview`);return}let n=this.pageId(),r=await wI(this.rpc(),`router-preview`,{pageId:n,url:e});if(t!==this.predictSeq||n!==this.pageId())return;if(!r||`error`in r){this.preview.set(null),this.message.set(r?.error??`Could not reach the page.`);return}this.match.set(null),this.preview.set(r);let i=r.steps.length?`, ${JE(r.steps.length,`step`)} listed`:``,a=r.chain.length?`${r.matched?`Matches`:`Stops at`} ${r.chain.map(e=>e.path).join(` then `)}${i}.`:`${e} matches no route.`;this.message.set(r.stopped?`${a} ${r.stopped}`:a)}async probe(){let e=this.testUrl().trim(),t=++this.probeSeq;if(!e){this.askForUrl(`probe`);return}this.message.set(`Running the real matcher in the app…`);let n=this.pageId(),r=await DI(this.rpc(),n,{action:`probe`,url:e});if(t===this.probeSeq&&n===this.pageId()){if(r.error){this.message.set(String(r.error));return}this.message.set(r.matched?`The app recognized ${e} and its canMatch guards passed. The probe stopped before canActivate guards and resolvers, so those did not run. See the probe entry in Navigations.`:typeof r.redirectedTo==`string`?`A canMatch guard or the navigation error handler redirected ${e} to ${r.redirectedTo}. The probe stopped that navigation before it rendered anything.`:`The app could not recognize ${e}: ${String(r.reason??``)}`)}}async navigate(e,t){let n=this.missingParams(e);if(n.length){this.checkedRow.set(e.id),this.rowResult.set({id:e.id,text:`Fill in ${n.map(e=>`:${e}`).join(`, `)} to navigate.`}),Array.from(t?.querySelectorAll(`input.param`)??[]).find(e=>!e.value)?.focus();return}this.checkedRow.set(null),this.rowResult.set({id:e.id,text:`Navigating to ${e.fullPath}…`});let r=this.pageId(),i=await DI(this.rpc(),r,{action:`navigate`,pattern:e.fullPath,params:this.paramValues()[e.id]??{}});r===this.pageId()&&this.rowResult.set({id:e.id,text:i.error?String(i.error):`Navigation #${i.id}: ${i.outcome}${i.finalUrl?` at ${i.finalUrl}`:``}.`})}async resolveLazy(e){let t=this.pageId(),n=await DI(this.rpc(),t,{action:`resolve-lazy`,id:e.id});if(t!==this.pageId())return;if(n.error){this.rowResult.set({id:e.id,text:String(n.error)});return}let r=n.routes??[];this.rowResult.set({id:e.id,text:`${e.fullPath} declares ${JE(r.length,`route`)}: ${r.map(e=>`/${e.path}`).join(`, `)}. The router loads them for real on the first navigation that needs them.`})}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-route-tree`]],viewQuery:function(e,t){e&1&&Dg(t.urlInput,Iz,5),e&2&&Og()},inputs:{page:[1,`page`],rpc:[1,`rpc`],sources:[1,`sources`]},decls:26,vars:12,consts:[[`urlInput`,``],[`filterInput`,``],[`rowEl`,``],[1,`test`,3,`submit`],[`for`,`test-url`],[`id`,`test-url`,`type`,`text`,`placeholder`,`/users/42`,1,`field`,3,`input`,`value`],[`type`,`submit`,1,`small`,`primary`],[`type`,`button`,1,`small`,3,`click`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`role`,`status`,1,`result`],[3,`preview`],[`role`,`status`,1,`message`],[`role`,`status`,1,`visually-hidden`],[`id`,`route-tree-writes-off`,1,`message`],[1,`filter-row`],[`placeholder`,`Filter by path, component or file`,`saveKey`,`router-config`,1,`filter`,3,`valueChange`,`value`],[1,`muted`,`summary`],[1,`empty`],[`role`,`region`,`aria-label`,`Live route config`,`tabindex`,`0`,1,`table-scroll`],[1,`for`],[1,`muted`],[`data-tone`,`good`,1,`badge`],[1,`chain`],[`data-tone`,`bad`,1,`badge`],[1,`count`],[1,`empty-title`],[`scope`,`col`],[1,`visually-hidden`],[1,`path`],[1,`tag`],[1,`src`],[1,`redirect`],[1,`actions`],[1,`actions-inner`],[`type`,`button`,1,`small`],[1,`row-result`],[3,`file`,`line`],[`aria-hidden`,`true`],[`aria-hidden`,`true`,1,`nil`],[`type`,`text`,1,`field`,`param`,3,`placeholder`,`value`],[`type`,`text`,1,`field`,`param`,3,`input`,`placeholder`,`value`],[`colspan`,`5`],[`id`,`route-tree-row-result`]],template:function(e,t){if(e&1){let e=B();F(0,`form`,3),H(`submit`,function(n){return C(e),n.preventDefault(),w(t.predict())}),F(1,`label`,4),K(2,`Test a URL`),I(),F(3,`input`,5,0),H(`input`,function(e){return t.editUrl(e.target.value)}),I(),F(5,`button`,6),K(6,`Predict`),I(),F(7,`button`,7),H(`click`,function(){return t.whatHappens()}),K(8,`What happens`),I(),F(9,`button`,8),H(`click`,function(){return t.probe()}),K(10,` Probe in app `),I()(),A(11,Wz,11,4,`div`,9),A(12,Gz,1,1,`app-route-preview`,10),A(13,Kz,2,1,`p`,11),F(14,`p`,12),K(15),I(),A(16,qz,2,1,`p`,13),F(17,`div`,14)(18,`app-search-field`,15,1),H(`valueChange`,function(e){return t.setFilter(e)}),I(),A(20,Zz,6,3,`p`,16),I(),F(21,`p`,12),K(22),I(),A(23,Qz,5,2,`div`,17)(24,$z,7,0,`div`,17)(25,gB,18,0,`div`,18)}if(e&2){let e,n;D(3),P(`value`,t.testUrl()),D(6),P(`disabled`,!t.navigationAllowed()),k(`aria-describedby`,t.navigationAllowed()?null:`route-tree-writes-off`),D(2),j((e=t.match())?11:-1,e),D(),j((n=t.preview())?12:-1,n),D(),j(t.message()?13:-1),D(2),q(t.rowResult()?.text),D(),j(t.navigationAllowed()?-1:16),D(2),P(`value`,t.filter()),D(2),j(t.page().config?20:-1),D(2),q(t.filterAnnouncement()),D(),j(t.page().config?t.rows().length?25:24:23)}},dependencies:[nP,Fz,Cj,Uv],styles:[`.muted[_ngcontent-%COMP%] { +}`]})},Vz=[`urlInput`],Hz=()=>[],Uz=(e,t)=>t.node.id;function Wz(e,t){if(e&1&&(K(0,` with `),F(1,`code`),K(2),U_(3,`json`),I()),e&2){W(2);let e=O_(0);D(2),q(W_(3,1,e.params))}}function Gz(e,t){if(e&1&&(F(0,`span`,21),K(1,`match`),I(),K(2,` Matches `),F(3,`code`,22),K(4),I(),A(5,Wz,4,3)),e&2){W();let e=O_(0),t=W();D(4),q(t.chainText(e)),D(),j(t.hasKeys(e.params)?5:-1)}}function Kz(e,t){if(e&1&&(K(0,` Nearest: `),F(1,`code`),K(2),I()),e&2){W(2);let e=O_(0);D(2),q(e.nearest.join(`, `))}}function qz(e,t){if(e&1&&(F(0,`span`,23),K(1,`no match`),I(),K(2,` Matches no route (NG04002). `),A(3,Kz,3,1)),e&2){W();let e=O_(0);D(3),j(e.nearest.length?3:-1)}}function Jz(e,t){if(e&1&&(F(0,`div`,20),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function Yz(e,t){if(e&1&&(E_(0),F(1,`div`,9)(2,`span`,19),K(3,`Result for `),F(4,`code`),K(5),I(),K(6,`:`),I(),A(7,Gz,6,2)(8,qz,4,1),M(9,Jz,2,1,`div`,20,Xh),I()),e&2){let e=t,n=D_(e.result);D(),k(`data-matched`,n.matched),D(4),q(e.url),D(2),j(n.matched?7:8),D(2),N(n.notes)}}function Xz(e,t){e&1&&L(0,`app-route-preview`,10),e&2&&P(`preview`,t)}function Zz(e,t){if(e&1&&(F(0,`p`,11),K(1),I()),e&2){let e=W();D(),q(e.message())}}function Qz(e,t){if(e&1&&(F(0,`p`,13),K(1),I()),e&2){let e=W();D(),q(e.navigationOff)}}function $z(e,t){if(e&1&&(F(0,`span`,24),K(1),I(),K(2,`. `)),e&2){let e=W(2);D(),q(e.countText())}}function eB(e,t){if(e&1&&K(0),e&2){let e=W(2);J(` `,e.plural(e.rows().length,`route`),`. `)}}function tB(e,t){e&1&&K(0),e&2&&J(` `,W(2).plural(t,`route`),` left out: the page lists at most 200 routes per level and 1000 in total. `)}function nB(e,t){if(e&1&&(F(0,`p`,16),K(1),A(2,$z,3,1)(3,eB,1,1),K(4,` Lazy routes show their children once loaded. `),A(5,tB,1,1),I()),e&2){let e,t=W();D(),J(` Generation `,t.page().generation,` · `),D(),j(t.filter()?2:3),D(3),j((e=t.page().configTruncated)?5:-1,e)}}function rB(e,t){e&1&&(F(0,`div`,17)(1,`p`,25),K(2),I(),F(3,`p`,20),K(4),I()()),e&2&&(D(2),J(` `,`The page has not reported its route config yet.`,` `),D(2),J(` `,`It appears once the router initializes. Navigate in the app if it stays empty.`,` `))}function iB(e,t){if(e&1){let e=B();F(0,`div`,17)(1,`p`,25),K(2,`No routes match the filter.`),I(),F(3,`p`,20),K(4,`Try a shorter path or a component name.`),I(),F(5,`button`,7),H(`click`,function(){C(e);let t=W(),n=Ag(19);return t.setFilter(``),w(n.focus())}),K(6,` Clear filters `),I()()}}function aB(e,t){e&1&&(F(0,`span`,29),K(1,`active`),I())}function oB(e,t){if(e&1&&(F(0,`span`,29),K(1),I()),e&2){let e=W().$implicit;D(),J(`lazy `,e.node.lazy)}}function sB(e,t){if(e&1&&(F(0,`span`,29),K(1),I()),e&2){let e=W().$implicit;D(),J(`outlet `,e.node.outlet)}}function cB(e,t){if(e&1&&(F(0,`span`,30)(1,`span`,27),K(2,`declared in `),I(),L(3,`app-source-link`,36),I()),e&2){let e=W().$implicit;D(3),P(`file`,e.at.file)(`line`,e.at.line)}}function lB(e,t){if(e&1&&(F(0,`span`,31),K(1,`redirect `),F(2,`span`,37),K(3,`→`),I(),F(4,`code`),K(5),I()()),e&2){let e=W().$implicit;D(5),q(e.node.redirectTo)}}function uB(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,e.node.component??(e.node.lazy===`unloaded`?`lazy, not loaded yet`:e.node.kind),` `)}}function dB(e,t){if(e&1&&(F(0,`span`,29),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function fB(e,t){if(e&1&&(F(0,`span`,29),K(1),I()),e&2){let e=t.$implicit;D(),J(`resolve `,e)}}function pB(e,t){e&1&&(F(0,`span`,38),K(1,`–`),I(),F(2,`span`,27),K(3,`none`),I())}function mB(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,e.node.title,` `)}}function hB(e,t){e&1&&(F(0,`span`,38),K(1,`–`),I(),F(2,`span`,27),K(3,`none`),I())}function gB(e,t){if(e&1){let e=B();F(0,`input`,40),H(`input`,function(t){let n=C(e).$implicit,r=W(2).$implicit;return w(W(2).setParam(r.node.id,n,t.target.value))}),I()}if(e&2){let e=t.$implicit,n=W(2).$implicit,r=W(2);P(`placeholder`,e)(`value`,r.paramValues()[n.node.id]?.[e]??``),k(`aria-label`,e+` for `+n.node.fullPath)(`aria-invalid`,r.isInvalid(n.node,e)?`true`:null)(`aria-describedby`,r.isInvalid(n.node,e)?`route-tree-row-result`:null)}}function _B(e,t){if(e&1){let e=B();M(0,gB,1,5,`input`,39,Xh),F(2,`button`,8),H(`click`,function(){C(e);let t=W().$implicit,n=Ag(1);return w(W(2).navigate(t.node,n))}),K(3,` Go `),I()}if(e&2){let e=W().$implicit,t=W(2);N(t.params(e.node)),D(2),P(`disabled`,!t.navigationAllowed()),k(`aria-describedby`,t.navigationAllowed()?null:`route-tree-writes-off`)(`aria-label`,`Navigate to `+e.node.fullPath)}}function vB(e,t){if(e&1){let e=B();F(0,`button`,7),H(`click`,function(){C(e);let t=W().$implicit;return w(W(2).resolveLazy(t.node))}),K(1,` Read lazy `),I()}if(e&2){let e=W().$implicit;k(`aria-label`,`Read lazy routes of `+e.node.fullPath)}}function yB(e,t){if(e&1&&(F(0,`tr`,35)(1,`td`,41)(2,`p`,42),K(3),I()()()),e&2){let e=W(3);D(3),q(e.rowResult()?.text)}}function bB(e,t){if(e&1&&(F(0,`tr`,null,2)(2,`td`,28),K(3),A(4,aB,2,0,`span`,29),A(5,oB,2,1,`span`,29),A(6,sB,2,1,`span`,29),A(7,cB,4,2,`span`,30),I(),F(8,`td`),A(9,lB,6,1,`span`,31)(10,uB,1,1),I(),F(11,`td`),M(12,dB,2,1,`span`,29,Yh),M(14,fB,2,1,`span`,29,Xh),A(16,pB,4,0),I(),F(17,`td`),A(18,mB,1,1)(19,hB,4,0),I(),F(20,`td`,32)(21,`div`,33),A(22,_B,4,3),A(23,vB,2,1,`button`,34),I()()(),A(24,yB,4,1,`tr`,35)),e&2){let e=t.$implicit,n=W(2);G(`active`,n.isActive(e.node)),D(2),Zg(`padding-left`,14+e.depth*16,`px`),D(),J(` `,e.node.fullPath,` `),D(),j(n.isActive(e.node)?4:-1),D(),j(e.node.lazy?5:-1),D(),j(e.node.outlet?6:-1),D(),j(e.at?7:-1),D(2),j(e.node.redirectTo===void 0?10:9),D(3),N(n.guardList(e.node)),D(2),N(e.node.resolvers??L_(15,Hz)),D(2),j(!n.guardList(e.node).length&&!e.node.resolvers?.length?16:-1),D(2),j(e.node.title?18:19),D(4),j(n.canNavigate(e.node)?22:-1),D(),j(e.node.kind===`lazy`&&e.node.lazy===`unloaded`?23:-1),D(),j(n.rowResult()?.id===e.node.id?24:-1)}}function xB(e,t){if(e&1&&(F(0,`div`,18)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,26),K(5,`Path`),I(),F(6,`th`,26),K(7,`Target`),I(),F(8,`th`,26),K(9,`Guards and resolvers`),I(),F(10,`th`,26),K(11,`Title`),I(),F(12,`th`,26)(13,`span`,27),K(14,`Actions`),I()()()(),F(15,`tbody`),M(16,bB,25,16,null,null,Uz),I()()()),e&2){let e=W();D(16),N(e.rows())}}function SB(e,t){return`${e} of ${t} ${t===1?`route`:`routes`}`}var CB=class e{plural=JE;page=$.required();rpc=$(null);navigationAllowed=X(()=>IT(this.rpc(),`router`));navigationOff=Uw(`router`);sources=$([]);filter=E(``);testUrl=E(``);pageId=X(()=>this.page().pageId);match=Q({source:this.pageId,computation:()=>null});message=Q({source:this.pageId,computation:()=>``});rowResult=Q({source:this.pageId,computation:()=>null});paramValues=Q({source:this.pageId,computation:()=>({})});checkedRow=Q({source:this.pageId,computation:()=>null});filterAnnouncement=Q({source:this.pageId,computation:()=>``});preview=Q({source:this.pageId,computation:()=>null});predictSeq=0;announceFlip=!1;probeSeq=0;urlInput=sv(`urlInput`);active=X(()=>new Set(this.page().activeIds??[]));rows=X(()=>{let e=this.filter().toLowerCase(),t=this.sources(),n=[],r=(i,a)=>{for(let o of i){let i=OI(o,t),s=i&&DI(i);(!e||o.fullPath.toLowerCase().includes(e)||o.component?.toLowerCase().includes(e)||s?.toLowerCase().includes(e))&&n.push({node:o,depth:a,source:s,at:i}),o.children&&r(o.children,a+1)}};return r(this.page().config??[],0),n});total=X(()=>{let e=t=>t.reduce((t,n)=>t+1+e(n.children??[]),0);return e(this.page().config??[])});countText=X(()=>SB(this.rows().length,this.total()));setFilter(e){this.filter.set(e);let t=this.rows().length,n=e?t?`${SB(t,this.total())} match.`:`No routes match.`:``;this.announceFlip=!this.announceFlip,this.filterAnnouncement.set(n&&(this.announceFlip?`${n}\u00a0`:n))}hasKeys(e){return Object.keys(e).length>0}isActive(e){return this.active().has(e.id)}guardList(e){return Object.entries(e.guards??{}).flatMap(([e,t])=>(t??[]).map(t=>`${e} ${t}`))}params(e){return(e.fullPath.match(/:([A-Za-z0-9_]+)/g)??[]).map(e=>e.slice(1))}canNavigate(e){return e.redirectTo===void 0&&!e.matcher&&!e.outlet&&!e.fullPath.includes(`**`)&&(!!e.component||e.kind===`component`||e.kind===`lazy`)}setParam(e,t,n){this.paramValues.update(r=>({...r,[e]:{...r[e],[t]:n}}))}missingParams(e){let t=this.paramValues()[e.id]??{};return this.params(e).filter(e=>!t[e])}isInvalid(e,t){return this.checkedRow()===e.id&&!this.paramValues()[e.id]?.[t]}chainText(e){return e.chain.map(e=>e.fullPath).join(` → `)}editUrl(e){this.testUrl.set(e),this.predictSeq++,this.probeSeq++,this.match.set(null),this.preview.set(null),this.message.set(``)}askForUrl(e){this.match.set(null),this.message.set(`Type a URL to ${e}, for example /users/42.`),this.urlInput()?.nativeElement.focus()}async predict(){let e=this.testUrl().trim(),t=++this.predictSeq;if(!e){this.askForUrl(`predict`);return}let n=this.pageId(),r=await kI(this.rpc(),`router-match`,{pageId:n,url:e});t===this.predictSeq&&n===this.pageId()&&(this.preview.set(null),this.match.set(r&&{url:e,result:r}),r?this.message()===`Could not reach the page.`&&this.message.set(``):this.message.set(jI))}async whatHappens(){let e=this.testUrl().trim(),t=++this.predictSeq;if(!e){this.preview.set(null),this.askForUrl(`preview`);return}let n=this.pageId(),r=await kI(this.rpc(),`router-preview`,{pageId:n,url:e});if(t!==this.predictSeq||n!==this.pageId())return;if(!r||`error`in r){this.preview.set(null),this.message.set(r?.error??`Could not reach the page.`);return}this.match.set(null),this.preview.set(r);let i=r.steps.length?`, ${JE(r.steps.length,`step`)} listed`:``,a=r.chain.length?`${r.matched?`Matches`:`Stops at`} ${r.chain.map(e=>e.path).join(` then `)}${i}.`:`${e} matches no route.`;this.message.set(r.stopped?`${a} ${r.stopped}`:a)}async probe(){let e=this.testUrl().trim(),t=++this.probeSeq;if(!e){this.askForUrl(`probe`);return}this.message.set(`Running the real matcher in the app…`);let n=this.pageId(),r=await MI(this.rpc(),n,{action:`probe`,url:e});if(t===this.probeSeq&&n===this.pageId()){if(r.error){this.message.set(String(r.error));return}this.message.set(r.matched?`The app recognized ${e} and its canMatch guards passed. The probe stopped before canActivate guards and resolvers, so those did not run. See the probe entry in Navigations.`:typeof r.redirectedTo==`string`?`A canMatch guard or the navigation error handler redirected ${e} to ${r.redirectedTo}. The probe stopped that navigation before it rendered anything.`:`The app could not recognize ${e}: ${String(r.reason??``)}`)}}async navigate(e,t){let n=this.missingParams(e);if(n.length){this.checkedRow.set(e.id),this.rowResult.set({id:e.id,text:`Fill in ${n.map(e=>`:${e}`).join(`, `)} to navigate.`}),Array.from(t?.querySelectorAll(`input.param`)??[]).find(e=>!e.value)?.focus();return}this.checkedRow.set(null),this.rowResult.set({id:e.id,text:`Navigating to ${e.fullPath}…`});let r=this.pageId(),i=await MI(this.rpc(),r,{action:`navigate`,pattern:e.fullPath,params:this.paramValues()[e.id]??{}});r===this.pageId()&&this.rowResult.set({id:e.id,text:i.error?String(i.error):`Navigation #${i.id}: ${i.outcome}${i.finalUrl?` at ${i.finalUrl}`:``}.`})}async resolveLazy(e){let t=this.pageId(),n=await MI(this.rpc(),t,{action:`resolve-lazy`,id:e.id});if(t!==this.pageId())return;if(n.error){this.rowResult.set({id:e.id,text:String(n.error)});return}let r=n.routes??[];this.rowResult.set({id:e.id,text:`${e.fullPath} declares ${JE(r.length,`route`)}: ${r.map(e=>`/${e.path}`).join(`, `)}. The router loads them for real on the first navigation that needs them.`})}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-route-tree`]],viewQuery:function(e,t){e&1&&Og(t.urlInput,Vz,5),e&2&&kg()},inputs:{page:[1,`page`],rpc:[1,`rpc`],sources:[1,`sources`]},decls:26,vars:12,consts:[[`urlInput`,``],[`filterInput`,``],[`rowEl`,``],[1,`test`,3,`submit`],[`for`,`test-url`],[`id`,`test-url`,`type`,`text`,`placeholder`,`/users/42`,1,`field`,3,`input`,`value`],[`type`,`submit`,1,`small`,`primary`],[`type`,`button`,1,`small`,3,`click`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`role`,`status`,1,`result`],[3,`preview`],[`role`,`status`,1,`message`],[`role`,`status`,1,`visually-hidden`],[`id`,`route-tree-writes-off`,1,`message`],[1,`filter-row`],[`placeholder`,`Filter by path, component or file`,`saveKey`,`router-config`,1,`filter`,3,`valueChange`,`value`],[1,`muted`,`summary`],[1,`empty`],[`role`,`region`,`aria-label`,`Live route config`,`tabindex`,`0`,1,`table-scroll`],[1,`for`],[1,`muted`],[`data-tone`,`good`,1,`badge`],[1,`chain`],[`data-tone`,`bad`,1,`badge`],[1,`count`],[1,`empty-title`],[`scope`,`col`],[1,`visually-hidden`],[1,`path`],[1,`tag`],[1,`src`],[1,`redirect`],[1,`actions`],[1,`actions-inner`],[`type`,`button`,1,`small`],[1,`row-result`],[3,`file`,`line`],[`aria-hidden`,`true`],[`aria-hidden`,`true`,1,`nil`],[`type`,`text`,1,`field`,`param`,3,`placeholder`,`value`],[`type`,`text`,1,`field`,`param`,3,`input`,`placeholder`,`value`],[`colspan`,`5`],[`id`,`route-tree-row-result`]],template:function(e,t){if(e&1){let e=B();F(0,`form`,3),H(`submit`,function(n){return C(e),n.preventDefault(),w(t.predict())}),F(1,`label`,4),K(2,`Test a URL`),I(),F(3,`input`,5,0),H(`input`,function(e){return t.editUrl(e.target.value)}),I(),F(5,`button`,6),K(6,`Predict`),I(),F(7,`button`,7),H(`click`,function(){return t.whatHappens()}),K(8,`What happens`),I(),F(9,`button`,8),H(`click`,function(){return t.probe()}),K(10,` Probe in app `),I()(),A(11,Yz,11,4,`div`,9),A(12,Xz,1,1,`app-route-preview`,10),A(13,Zz,2,1,`p`,11),F(14,`p`,12),K(15),I(),A(16,Qz,2,1,`p`,13),F(17,`div`,14)(18,`app-search-field`,15,1),H(`valueChange`,function(e){return t.setFilter(e)}),I(),A(20,nB,6,3,`p`,16),I(),F(21,`p`,12),K(22),I(),A(23,rB,5,2,`div`,17)(24,iB,7,0,`div`,17)(25,xB,18,0,`div`,18)}if(e&2){let e,n;D(3),P(`value`,t.testUrl()),D(6),P(`disabled`,!t.navigationAllowed()),k(`aria-describedby`,t.navigationAllowed()?null:`route-tree-writes-off`),D(2),j((e=t.match())?11:-1,e),D(),j((n=t.preview())?12:-1,n),D(),j(t.message()?13:-1),D(2),q(t.rowResult()?.text),D(),j(t.navigationAllowed()?-1:16),D(2),P(`value`,t.filter()),D(2),j(t.page().config?20:-1),D(2),q(t.filterAnnouncement()),D(),j(t.page().config?t.rows().length?25:24:23)}},dependencies:[nP,Bz,Cj,Gv],styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); font-size: 13px; line-height: 1.5; @@ -6945,7 +6959,7 @@ tr.active[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child { .filter[_ngcontent-%COMP%] { flex-basis: 100%; } -}`]})},yB=(e,t)=>t.id;function bB(e,t){if(e&1){let e=B();F(0,`div`,4)(1,`span`,5),K(2,`Page`),I(),F(3,`app-select`,6),H(`valueChange`,function(t){return C(e),w(W(2).pageId.set(t))}),I()()}if(e&2){let e=W(),t=W();D(3),P(`options`,t.pageOptions())(`value`,e.pageId)}}function xB(e,t){e&1&&A(0,bB,4,2,`div`,4),e&2&&j(W().pages().length>1?0:-1)}function SB(e,t){if(e&1){let e=B();F(0,`div`,1)(1,`p`,7),K(2,`Could not load the live router state.`),I(),F(3,`p`,8),K(4,` Check that the dev server with Pangular Inspector is still running, then retry. `),I(),F(5,`button`,9),H(`click`,function(){return C(e),w(W().retry())}),K(6,`Retry`),I()()}}function CB(e,t){e&1&&(F(0,`p`,2),K(1,`Loading the live router state…`),I())}function wB(e,t){if(e&1&&(F(0,`span`,18),K(1),I(),F(2,`span`,19),K(3),I()),e&2){let e=W(3);D(),q(e.problems()),D(2),J(`, `,e.problems(),` problem navigations`)}}function TB(e,t){if(e&1){let e=B();F(0,`button`,17),H(`click`,function(){let t=C(e).$implicit;return w(W(2).selected.set(t.id))}),K(1),A(2,wB,4,2),I()}if(e&2){let e=t.$implicit,n=W(2);P(`id`,`router-tab-`+e.id),k(`aria-selected`,e.id===n.selected())(`aria-controls`,`router-panel-`+e.id)(`tabindex`,e.id===n.selected()?0:-1),D(),J(` `,e.label,` `),D(),j(e.id===`navigations`&&n.problems()>0?2:-1)}}function EB(e,t){if(e&1){let e=B();F(0,`app-route-current`,20),H(`showComponent`,function(t){return C(e),w(W(2).showComponent.emit(t))}),I()}if(e&2){let e=W(),t=W();P(`page`,e)(`rpc`,t.rpc())}}function DB(e,t){if(e&1){let e=B();F(0,`app-route-timeline`,21),H(`compare`,function(t){return C(e),w(W(2).compareFrom(t))}),I()}if(e&2){let e=W(),t=W();P(`page`,e)(`rpc`,t.rpc())}}function OB(e,t){if(e&1&&L(0,`app-route-diff`,14),e&2){let e=W(),t=W();P(`page`,e)(`rpc`,t.rpc())(`start`,t.compareStart())}}function kB(e,t){if(e&1&&L(0,`app-route-tree`,15),e&2){let e=W(),t=W();P(`page`,e)(`rpc`,t.rpc())(`sources`,t.sources())}}function AB(e,t){e&1&&L(0,`app-route-setup`,16),e&2&&P(`page`,W())}function jB(e,t){if(e&1&&L(0,`app-route-lint`,13),e&2){let e=W(),t=W();P(`page`,e)(`rpc`,t.rpc())}}function MB(e,t){if(e&1){let e=B();F(0,`div`,10),H(`keydown`,function(t){return C(e),w(W().onKey(t))}),M(1,TB,3,6,`button`,11,yB),I(),F(3,`div`,12),A(4,EB,1,2,`app-route-current`,13)(5,DB,1,2,`app-route-timeline`,13)(6,OB,1,3,`app-route-diff`,14)(7,kB,1,3,`app-route-tree`,15)(8,AB,1,1,`app-route-setup`,16)(9,jB,1,2,`app-route-lint`,13),I()}if(e&2){let e,t=W();D(),N(t.tabs),D(2),P(`id`,`router-panel-`+t.selected()),k(`aria-labelledby`,`router-tab-`+t.selected()),D(),j((e=t.selected())===`current`?4:e===`navigations`?5:e===`compare`?6:e===`routes`?7:e===`setup`?8:e===`lint`?9:-1)}}function NB(e,t){e&1&&(F(0,`div`,3)(1,`p`,7),K(2,`No page is reporting router state yet.`),I(),F(3,`p`,8),K(4,` Open the app in a browser. This view updates as soon as a page connects. `),I()())}var PB=[{id:`current`,label:`Current`},{id:`navigations`,label:`Navigations`},{id:`compare`,label:`Compare`},{id:`routes`,label:`Config`},{id:`setup`,label:`Setup`},{id:`lint`,label:`Lint`}],FB=class e{rpc=$(null);sources=$([]);showComponent=Q_();tabs=PB;selected=E(`current`);compareStart=E(null);pages=E([]);hostPageId=fT();loading=E(!0);failed=E(!1);pageId=Q({source:this.pages,computation:(e,t)=>pT(Object.fromEntries(e.map(e=>[e.pageId,e])),{chosen:t?.value??null,host:this.hostPageId,previous:null})});unsubscribe=null;destroyRef=S(vs);page=X(()=>this.pages().find(e=>e.pageId===this.pageId())??null);problems=X(()=>(this.page()?.navigations??[]).filter(e=>!e.probe&&[`failed`,`cancelled`,`redirected`].includes(e.outcome)).length);constructor(){ac(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`router`);if(this.destroyRef.destroyed)return;let n=e=>{this.pages.set(e?.pages??[])};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}compareFrom(e){this.compareStart.set(e),this.selected.set(`compare`),setTimeout(()=>document.getElementById(`router-tab-compare`)?.focus())}retry(){let e=this.rpc();e&&this.load(e)}pageOptions=X(()=>this.pages().map(e=>({value:e.pageId,label:e.snapshot?.url??e.pageId,hint:e.pageId})));onKey(e){let t=this.tabs.map(e=>e.id),n=t.indexOf(this.selected()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.selected.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#router-tab-${t[r]}`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-live-route`]],inputs:{rpc:[1,`rpc`],sources:[1,`sources`]},outputs:{showComponent:`showComponent`},decls:8,vars:2,consts:[[1,`section-head`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`muted`,`empty`],[1,`empty`],[1,`page-pick`],[`id`,`live-route-page-label`,1,`page-label`],[`labelledBy`,`live-route-page-label`,3,`valueChange`,`options`,`value`],[1,`empty-title`],[1,`muted`],[`type`,`button`,1,`retry`,3,`click`],[`role`,`tablist`,`aria-label`,`Router views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[3,`page`,`rpc`],[3,`page`,`rpc`,`start`],[3,`page`,`rpc`,`sources`],[3,`page`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[`aria-hidden`,`true`,1,`count`],[1,`visually-hidden`],[3,`showComponent`,`page`,`rpc`],[3,`compare`,`page`,`rpc`]],template:function(e,t){if(e&1&&(F(0,`div`,0)(1,`h2`),K(2,`Live router`),I(),A(3,xB,1,1),I(),A(4,SB,7,0,`div`,1)(5,CB,2,0,`p`,2)(6,MB,10,3)(7,NB,5,0,`div`,3)),e&2){let e,n;D(3),j((e=t.page())?3:-1,e),D(),j(t.failed()?4:t.loading()?5:(n=t.page())?6:7,n)}},dependencies:[pL,jL,GL,aR,hz,vB,OD],styles:[`[_nghost-%COMP%] { +}`]})},wB=(e,t)=>t.id;function TB(e,t){if(e&1){let e=B();F(0,`div`,4)(1,`span`,5),K(2,`Page`),I(),F(3,`app-select`,6),H(`valueChange`,function(t){return C(e),w(W(2).pageId.set(t))}),I()()}if(e&2){let e=W(),t=W();D(3),P(`options`,t.pageOptions())(`value`,e.pageId)}}function EB(e,t){e&1&&A(0,TB,4,2,`div`,4),e&2&&j(W().pages().length>1?0:-1)}function DB(e,t){if(e&1){let e=B();F(0,`div`,1)(1,`p`,7),K(2,`Could not load the live router state.`),I(),F(3,`p`,8),K(4,` Check that the dev server with Pangular Inspector is still running, then retry. `),I(),F(5,`button`,9),H(`click`,function(){return C(e),w(W().retry())}),K(6,`Retry`),I()()}}function OB(e,t){e&1&&(F(0,`p`,2),K(1,`Loading the live router state…`),I())}function kB(e,t){if(e&1&&(F(0,`span`,18),K(1),I(),F(2,`span`,19),K(3),I()),e&2){let e=W(3);D(),q(e.problems()),D(2),J(`, `,e.problems(),` problem navigations`)}}function AB(e,t){if(e&1){let e=B();F(0,`button`,17),H(`click`,function(){let t=C(e).$implicit;return w(W(2).selected.set(t.id))}),K(1),A(2,kB,4,2),I()}if(e&2){let e=t.$implicit,n=W(2);P(`id`,`router-tab-`+e.id),k(`aria-selected`,e.id===n.selected())(`aria-controls`,`router-panel-`+e.id)(`tabindex`,e.id===n.selected()?0:-1),D(),J(` `,e.label,` `),D(),j(e.id===`navigations`&&n.problems()>0?2:-1)}}function jB(e,t){if(e&1){let e=B();F(0,`app-route-current`,20),H(`showComponent`,function(t){return C(e),w(W(2).showComponent.emit(t))}),I()}if(e&2){let e=W(),t=W();P(`page`,e)(`rpc`,t.rpc())}}function MB(e,t){if(e&1){let e=B();F(0,`app-route-timeline`,21),H(`compare`,function(t){return C(e),w(W(2).compareFrom(t))}),I()}if(e&2){let e=W(),t=W();P(`page`,e)(`rpc`,t.rpc())}}function NB(e,t){if(e&1&&L(0,`app-route-diff`,14),e&2){let e=W(),t=W();P(`page`,e)(`rpc`,t.rpc())(`start`,t.compareStart())}}function PB(e,t){if(e&1&&L(0,`app-route-tree`,15),e&2){let e=W(),t=W();P(`page`,e)(`rpc`,t.rpc())(`sources`,t.sources())}}function FB(e,t){e&1&&L(0,`app-route-setup`,16),e&2&&P(`page`,W())}function IB(e,t){if(e&1&&L(0,`app-route-lint`,13),e&2){let e=W(),t=W();P(`page`,e)(`rpc`,t.rpc())}}function LB(e,t){if(e&1){let e=B();F(0,`div`,10),H(`keydown`,function(t){return C(e),w(W().onKey(t))}),M(1,AB,3,6,`button`,11,wB),I(),F(3,`div`,12),A(4,jB,1,2,`app-route-current`,13)(5,MB,1,2,`app-route-timeline`,13)(6,NB,1,3,`app-route-diff`,14)(7,PB,1,3,`app-route-tree`,15)(8,FB,1,1,`app-route-setup`,16)(9,IB,1,2,`app-route-lint`,13),I()}if(e&2){let e,t=W();D(),N(t.tabs),D(2),P(`id`,`router-panel-`+t.selected()),k(`aria-labelledby`,`router-tab-`+t.selected()),D(),j((e=t.selected())===`current`?4:e===`navigations`?5:e===`compare`?6:e===`routes`?7:e===`setup`?8:e===`lint`?9:-1)}}function RB(e,t){e&1&&(F(0,`div`,3)(1,`p`,7),K(2,`No page is reporting router state yet.`),I(),F(3,`p`,8),K(4,` Open the app in a browser. This view updates as soon as a page connects. `),I()())}var zB=[{id:`current`,label:`Current`},{id:`navigations`,label:`Navigations`},{id:`compare`,label:`Compare`},{id:`routes`,label:`Config`},{id:`setup`,label:`Setup`},{id:`lint`,label:`Lint`}],BB=class e{rpc=$(null);sources=$([]);showComponent=ev();tabs=zB;selected=E(`current`);compareStart=E(null);pages=E([]);hostPageId=fT();loading=E(!0);failed=E(!1);pageId=Q({source:this.pages,computation:(e,t)=>pT(Object.fromEntries(e.map(e=>[e.pageId,e])),{chosen:t?.value??null,host:this.hostPageId,previous:null})});unsubscribe=null;destroyRef=S(vs);page=X(()=>this.pages().find(e=>e.pageId===this.pageId())??null);problems=X(()=>(this.page()?.navigations??[]).filter(e=>!e.probe&&[`failed`,`cancelled`,`redirected`].includes(e.outcome)).length);constructor(){ac(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`router`);if(this.destroyRef.destroyed)return;let n=e=>{this.pages.set(e?.pages??[])};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}compareFrom(e){this.compareStart.set(e),this.selected.set(`compare`),setTimeout(()=>document.getElementById(`router-tab-compare`)?.focus())}retry(){let e=this.rpc();e&&this.load(e)}pageOptions=X(()=>this.pages().map(e=>({value:e.pageId,label:e.snapshot?.url??e.pageId,hint:e.pageId})));onKey(e){let t=this.tabs.map(e=>e.id),n=t.indexOf(this.selected()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.selected.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#router-tab-${t[r]}`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-live-route`]],inputs:{rpc:[1,`rpc`],sources:[1,`sources`]},outputs:{showComponent:`showComponent`},decls:8,vars:2,consts:[[1,`section-head`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`muted`,`empty`],[1,`empty`],[1,`page-pick`],[`id`,`live-route-page-label`,1,`page-label`],[`labelledBy`,`live-route-page-label`,3,`valueChange`,`options`,`value`],[1,`empty-title`],[1,`muted`],[`type`,`button`,1,`retry`,3,`click`],[`role`,`tablist`,`aria-label`,`Router views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[3,`page`,`rpc`],[3,`page`,`rpc`,`start`],[3,`page`,`rpc`,`sources`],[3,`page`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[`aria-hidden`,`true`,1,`count`],[1,`visually-hidden`],[3,`showComponent`,`page`,`rpc`],[3,`compare`,`page`,`rpc`]],template:function(e,t){if(e&1&&(F(0,`div`,0)(1,`h2`),K(2,`Live router`),I(),A(3,EB,1,1),I(),A(4,DB,7,0,`div`,1)(5,OB,2,0,`p`,2)(6,LB,10,3)(7,RB,5,0,`div`,3)),e&2){let e,n;D(3),j((e=t.page())?3:-1,e),D(),j(t.failed()?4:t.loading()?5:(n=t.page())?6:7,n)}},dependencies:[vL,IL,XL,uR,bz,CB,OD],styles:[`[_nghost-%COMP%] { display: grid; gap: 16px; min-width: 0; @@ -7110,7 +7124,7 @@ h2[_ngcontent-%COMP%] { line-height: 16px; text-align: center; font-variant-numeric: tabular-nums; -}`]})};function IB(e,t){e&1&&K(0,` The Config view above shows what the router uses. `)}function LB(e,t){if(e&1){let e=B();F(0,`button`,14),H(`click`,function(){C(e);let t=W();return w(t.expanded.set(!t.expanded()))}),K(1),I()}if(e&2){let e=W();k(`aria-expanded`,e.expanded()),D(),J(` `,e.expanded()?`Hide table`:`Show table`,` `)}}function RB(e,t){e&1&&(K(0,` Run `),F(1,`code`),K(2,`pangular build`),I(),K(3,` again to rebuild the report. `))}function zB(e,t){e&1&&K(0,` Check that the dev server is running, then refresh. `)}function BB(e,t){if(e&1&&(F(0,`div`,12)(1,`p`,15),K(2,`Could not scan the route files.`),I(),F(3,`p`,16),A(4,RB,4,0)(5,zB,1,0),I()()),e&2){let e=W();D(4),j(e.staticReport()?4:5)}}function VB(e,t){e&1&&(F(0,`p`,13),K(1,`Scanning routes…`),I())}function HB(e,t){if(e&1){let e=B();F(0,`div`,17)(1,`p`,15),K(2,`No routes match the filter.`),I(),F(3,`p`,16),K(4,`Search by path, component, guard, title or file name.`),I(),F(5,`button`,11),H(`click`,function(){C(e);let t=W(2),n=kg(14);return t.filter.set(``),w(n.focus())}),K(6,` Clear filters `),I()()}}function UB(e,t){e&1&&(F(0,`div`,17)(1,`p`,15),K(2,`No routes found.`),I(),F(3,`p`,16),K(4,` Routes are read from `),F(5,`code`),K(6,`*.routes.ts`),I(),K(7,` and `),F(8,`code`),K(9,`*routing.module.ts`),I(),K(10,` files, the files they lazy load, plus Analog pages. Add one and refresh. `),I()())}function WB(e,t){e&1&&A(0,HB,7,0,`div`,17)(1,UB,11,0,`div`,17),e&2&&j(+!W().routes().length)}function GB(e,t){if(e&1&&(F(0,`span`,22),K(1),I()),e&2){let e=W().$implicit;D(),q(e.kind)}}function KB(e,t){if(e&1&&(F(0,`span`,23)(1,`span`,27),K(2,`→`),I(),F(3,`span`,28),K(4,`redirects to`),I(),K(5),I()),e&2){let e=W().$implicit;D(5),J(` `,e.redirectTo)}}function qB(e,t){if(e&1&&(F(0,`code`,24),K(1),I()),e&2){let e=W().$implicit;D(),q(e.component)}}function JB(e,t){e&1&&(F(0,`span`,29),K(1,`–`),I(),F(2,`span`,28),K(3,`none`),I())}function YB(e,t){if(e&1&&(F(0,`span`,22),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function XB(e,t){e&1&&(F(0,`span`,29),K(1,`–`),I(),F(2,`span`,28),K(3,`none`),I())}function ZB(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,e.title,` `)}}function QB(e,t){e&1&&(F(0,`span`,29),K(1,`–`),I(),F(2,`span`,28),K(3,`none`),I())}function $B(e,t){if(e&1&&(F(0,`tr`)(1,`td`,21),K(2),A(3,GB,2,1,`span`,22),I(),F(4,`td`),A(5,KB,6,1,`span`,23)(6,qB,2,1,`code`,24)(7,JB,4,0),I(),F(8,`td`),M(9,YB,2,1,`span`,22,Jh,!1,XB,4,0),I(),F(12,`td`),A(13,ZB,1,1)(14,QB,4,0),I(),F(15,`td`,25),L(16,`app-source-link`,26),I()()),e&2){let e=t.$implicit,n=W(2);D(2),J(` `,e.fullPath,` `),D(),j(e.kind===`page`?-1:3),D(2),j(e.redirectTo===void 0?e.component?6:7:5),D(4),N(n.checks(e)),D(4),j(e.title?13:14),D(3),P(`file`,e.file)(`line`,e.line)}}function eV(e,t){if(e&1&&(F(0,`p`,18),K(1),I(),F(2,`div`,19)(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,20),K(7,`Path`),I(),F(8,`th`,20),K(9,`Component / Target`),I(),F(10,`th`,20),K(11,`Guards and resolvers`),I(),F(12,`th`,20),K(13,`Title`),I(),F(14,`th`,20),K(15,`Declared in`),I()()(),F(16,`tbody`),M(17,$B,17,7,`tr`,null,Jh),I()()()),e&2){let e=W();D(),__(` `,e.filtered().length,` of `,e.routes().length,` route entries, `,e.navigable(),` navigable `),D(16),N(e.filtered())}}var tV=class e{rpc=$(null);showComponent=Q_();staticReport=X(()=>yT(this.rpc()));routes=E([]);filter=E(``);loading=E(!1);error=E(!1);live=av(FB);liveHasConfig=X(()=>!!this.live()?.page()?.config);expanded=Q(()=>!this.liveHasConfig());navigable=X(()=>this.filtered().filter(e=>e.kind===`page`).length);filtered=X(()=>{let e=this.filter().toLowerCase().trim(),t=this.routes();return e?t.filter(t=>t.fullPath.toLowerCase().includes(e)||t.component&&t.component.toLowerCase().includes(e)||t.redirectTo&&t.redirectTo.toLowerCase().includes(e)||t.title&&t.title.toLowerCase().includes(e)||this.checks(t).some(t=>t.toLowerCase().includes(e))||t.file.toLowerCase().includes(e)):t});constructor(){ac(()=>{this.rpc()&&this.refresh()})}checks(e){return[...Object.entries(e.guards??{}).flatMap(([e,t])=>t.map(t=>`${e} ${t}`)),...(e.resolvers??[]).map(e=>`resolve ${e}`)]}async refresh(){let e=this.rpc();if(e){this.loading.set(!0),this.error.set(!1);try{let t=await e.scope(`pangular`).rpc.call(`get-routes`);this.routes.set(t)}catch{this.error.set(!0)}finally{this.loading.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-route-inspector`]],viewQuery:function(e,t){e&1&&Dg(t.live,FB,5),e&2&&Og()},inputs:{rpc:[1,`rpc`]},outputs:{showComponent:`showComponent`},decls:21,vars:9,consts:[[`filterInput`,``],[1,`page-intro`],[3,`showComponent`,`rpc`,`sources`],[`aria-labelledby`,`config-heading`,1,`config`],[1,`section-head`],[`id`,`config-heading`],[1,`muted`,`hint`],[`type`,`button`,`aria-controls`,`config-body`,1,`small`,`toggle`],[`id`,`config-body`,1,`config-body`,3,`hidden`],[1,`toolbar`],[`placeholder`,`Filter by path, component or file`,`saveKey`,`router-source`,3,`valueChange`,`value`],[`type`,`button`,1,`small`,3,`click`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`muted`,`empty`],[`type`,`button`,`aria-controls`,`config-body`,1,`small`,`toggle`,3,`click`],[1,`empty-title`],[1,`muted`],[1,`empty`],[1,`muted`,`count`],[`role`,`region`,`aria-label`,`Source route config table`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[1,`path`],[1,`tag`],[1,`redirect`],[1,`component`],[1,`file`],[3,`file`,`line`],[`aria-hidden`,`true`],[1,`visually-hidden`],[`aria-hidden`,`true`,1,`nil`]],template:function(e,t){if(e&1){let e=B();F(0,`p`,1),K(1,` The live route, every navigation, the route config the router uses, the router setup and a route lint, read from the live page. Below them, the routes your source files declare. `),I(),F(2,`app-live-route`,2),H(`showComponent`,function(e){return t.showComponent.emit(e)}),I(),F(3,`section`,3)(4,`div`,4)(5,`h2`,5),K(6,`Source route config`),I(),F(7,`span`,6),K(8,` Read from your source files. `),A(9,IB,1,0),I(),A(10,LB,2,2,`button`,7),I(),F(11,`div`,8)(12,`div`,9)(13,`app-search-field`,10,0),S_(`valueChange`,function(n){return C(e),x_(t.filter,n)||(t.filter=n),w(n)}),I(),F(15,`button`,11),H(`click`,function(){return t.refresh()}),K(16),I()(),A(17,BB,6,1,`div`,12)(18,VB,2,0,`p`,13)(19,WB,2,1)(20,eV,19,3),I()()}e&2&&(D(2),P(`rpc`,t.rpc())(`sources`,t.routes()),D(7),j(t.liveHasConfig()?9:-1),D(),j(t.liveHasConfig()?10:-1),D(),P(`hidden`,!t.expanded()),D(2),b_(`value`,t.filter),D(2),k(`aria-busy`,t.loading()),D(),J(` `,t.loading()?`Scanning…`:`Refresh`,` `),D(),j(t.error()?17:t.loading()&&t.routes().length===0?18:t.filtered().length===0?19:20))},dependencies:[nP,FB,Cj],styles:[`.muted[_ngcontent-%COMP%] { +}`]})};function VB(e,t){e&1&&K(0,` The Config view above shows what the router uses. `)}function HB(e,t){if(e&1){let e=B();F(0,`button`,14),H(`click`,function(){C(e);let t=W();return w(t.expanded.set(!t.expanded()))}),K(1),I()}if(e&2){let e=W();k(`aria-expanded`,e.expanded()),D(),J(` `,e.expanded()?`Hide table`:`Show table`,` `)}}function UB(e,t){e&1&&(K(0,` Run `),F(1,`code`),K(2,`pangular build`),I(),K(3,` again to rebuild the report. `))}function WB(e,t){e&1&&K(0,` Check that the dev server is running, then refresh. `)}function GB(e,t){if(e&1&&(F(0,`div`,12)(1,`p`,15),K(2,`Could not scan the route files.`),I(),F(3,`p`,16),A(4,UB,4,0)(5,WB,1,0),I()()),e&2){let e=W();D(4),j(e.staticReport()?4:5)}}function KB(e,t){e&1&&(F(0,`p`,13),K(1,`Scanning routes…`),I())}function qB(e,t){if(e&1){let e=B();F(0,`div`,17)(1,`p`,15),K(2,`No routes match the filter.`),I(),F(3,`p`,16),K(4,`Search by path, component, guard, title or file name.`),I(),F(5,`button`,11),H(`click`,function(){C(e);let t=W(2),n=Ag(14);return t.filter.set(``),w(n.focus())}),K(6,` Clear filters `),I()()}}function JB(e,t){e&1&&(F(0,`div`,17)(1,`p`,15),K(2,`No routes found.`),I(),F(3,`p`,16),K(4,` Routes are read from `),F(5,`code`),K(6,`*.routes.ts`),I(),K(7,` and `),F(8,`code`),K(9,`*routing.module.ts`),I(),K(10,` files, the files they lazy load, plus Analog pages. Add one and refresh. `),I()())}function YB(e,t){e&1&&A(0,qB,7,0,`div`,17)(1,JB,11,0,`div`,17),e&2&&j(+!W().routes().length)}function XB(e,t){if(e&1&&(F(0,`span`,22),K(1),I()),e&2){let e=W().$implicit;D(),q(e.kind)}}function ZB(e,t){if(e&1&&(F(0,`span`,23)(1,`span`,27),K(2,`→`),I(),F(3,`span`,28),K(4,`redirects to`),I(),K(5),I()),e&2){let e=W().$implicit;D(5),J(` `,e.redirectTo)}}function QB(e,t){if(e&1&&(F(0,`code`,24),K(1),I()),e&2){let e=W().$implicit;D(),q(e.component)}}function $B(e,t){e&1&&(F(0,`span`,29),K(1,`–`),I(),F(2,`span`,28),K(3,`none`),I())}function eV(e,t){if(e&1&&(F(0,`span`,22),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function tV(e,t){e&1&&(F(0,`span`,29),K(1,`–`),I(),F(2,`span`,28),K(3,`none`),I())}function nV(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,e.title,` `)}}function rV(e,t){e&1&&(F(0,`span`,29),K(1,`–`),I(),F(2,`span`,28),K(3,`none`),I())}function iV(e,t){if(e&1&&(F(0,`tr`)(1,`td`,21),K(2),A(3,XB,2,1,`span`,22),I(),F(4,`td`),A(5,ZB,6,1,`span`,23)(6,QB,2,1,`code`,24)(7,$B,4,0),I(),F(8,`td`),M(9,eV,2,1,`span`,22,Yh,!1,tV,4,0),I(),F(12,`td`),A(13,nV,1,1)(14,rV,4,0),I(),F(15,`td`,25),L(16,`app-source-link`,26),I()()),e&2){let e=t.$implicit,n=W(2);D(2),J(` `,e.fullPath,` `),D(),j(e.kind===`page`?-1:3),D(2),j(e.redirectTo===void 0?e.component?6:7:5),D(4),N(n.checks(e)),D(4),j(e.title?13:14),D(3),P(`file`,e.file)(`line`,e.line)}}function aV(e,t){if(e&1&&(F(0,`p`,18),K(1),I(),F(2,`div`,19)(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,20),K(7,`Path`),I(),F(8,`th`,20),K(9,`Component / Target`),I(),F(10,`th`,20),K(11,`Guards and resolvers`),I(),F(12,`th`,20),K(13,`Title`),I(),F(14,`th`,20),K(15,`Declared in`),I()()(),F(16,`tbody`),M(17,iV,17,7,`tr`,null,Yh),I()()()),e&2){let e=W();D(),y_(` `,e.filtered().length,` of `,e.routes().length,` route entries, `,e.navigable(),` navigable `),D(16),N(e.filtered())}}var oV=class e{rpc=$(null);showComponent=ev();staticReport=X(()=>yT(this.rpc()));routes=E([]);filter=E(``);loading=E(!1);error=E(!1);live=sv(BB);liveHasConfig=X(()=>!!this.live()?.page()?.config);expanded=Q(()=>!this.liveHasConfig());navigable=X(()=>this.filtered().filter(e=>e.kind===`page`).length);filtered=X(()=>{let e=this.filter().toLowerCase().trim(),t=this.routes();return e?t.filter(t=>t.fullPath.toLowerCase().includes(e)||t.component&&t.component.toLowerCase().includes(e)||t.redirectTo&&t.redirectTo.toLowerCase().includes(e)||t.title&&t.title.toLowerCase().includes(e)||this.checks(t).some(t=>t.toLowerCase().includes(e))||t.file.toLowerCase().includes(e)):t});constructor(){ac(()=>{this.rpc()&&this.refresh()})}checks(e){return[...Object.entries(e.guards??{}).flatMap(([e,t])=>t.map(t=>`${e} ${t}`)),...(e.resolvers??[]).map(e=>`resolve ${e}`)]}async refresh(){let e=this.rpc();if(e){this.loading.set(!0),this.error.set(!1);try{let t=await e.scope(`pangular`).rpc.call(`get-routes`);this.routes.set(t)}catch{this.error.set(!0)}finally{this.loading.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-route-inspector`]],viewQuery:function(e,t){e&1&&Og(t.live,BB,5),e&2&&kg()},inputs:{rpc:[1,`rpc`]},outputs:{showComponent:`showComponent`},decls:21,vars:9,consts:[[`filterInput`,``],[1,`page-intro`],[3,`showComponent`,`rpc`,`sources`],[`aria-labelledby`,`config-heading`,1,`config`],[1,`section-head`],[`id`,`config-heading`],[1,`muted`,`hint`],[`type`,`button`,`aria-controls`,`config-body`,1,`small`,`toggle`],[`id`,`config-body`,1,`config-body`,3,`hidden`],[1,`toolbar`],[`placeholder`,`Filter by path, component or file`,`saveKey`,`router-source`,3,`valueChange`,`value`],[`type`,`button`,1,`small`,3,`click`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`muted`,`empty`],[`type`,`button`,`aria-controls`,`config-body`,1,`small`,`toggle`,3,`click`],[1,`empty-title`],[1,`muted`],[1,`empty`],[1,`muted`,`count`],[`role`,`region`,`aria-label`,`Source route config table`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[1,`path`],[1,`tag`],[1,`redirect`],[1,`component`],[1,`file`],[3,`file`,`line`],[`aria-hidden`,`true`],[1,`visually-hidden`],[`aria-hidden`,`true`,1,`nil`]],template:function(e,t){if(e&1){let e=B();F(0,`p`,1),K(1,` The live route, every navigation, the route config the router uses, the router setup and a route lint, read from the live page. Below them, the routes your source files declare. `),I(),F(2,`app-live-route`,2),H(`showComponent`,function(e){return t.showComponent.emit(e)}),I(),F(3,`section`,3)(4,`div`,4)(5,`h2`,5),K(6,`Source route config`),I(),F(7,`span`,6),K(8,` Read from your source files. `),A(9,VB,1,0),I(),A(10,HB,2,2,`button`,7),I(),F(11,`div`,8)(12,`div`,9)(13,`app-search-field`,10,0),w_(`valueChange`,function(n){return C(e),C_(t.filter,n)||(t.filter=n),w(n)}),I(),F(15,`button`,11),H(`click`,function(){return t.refresh()}),K(16),I()(),A(17,GB,6,1,`div`,12)(18,KB,2,0,`p`,13)(19,YB,2,1)(20,aV,19,3),I()()}e&2&&(D(2),P(`rpc`,t.rpc())(`sources`,t.routes()),D(7),j(t.liveHasConfig()?9:-1),D(),j(t.liveHasConfig()?10:-1),D(),P(`hidden`,!t.expanded()),D(2),S_(`value`,t.filter),D(2),k(`aria-busy`,t.loading()),D(),J(` `,t.loading()?`Scanning…`:`Refresh`,` `),D(),j(t.error()?17:t.loading()&&t.routes().length===0?18:t.filtered().length===0?19:20))},dependencies:[nP,BB,Cj],styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); font-size: 13px; line-height: 1.5; @@ -7497,7 +7511,7 @@ h2[_ngcontent-%COMP%] { font-family: var(--%NS%font-mono); font-size: 12px; overflow-wrap: anywhere; -}`]})},nV=[`ArrowDown`,`ArrowUp`,`Home`,`End`],rV=`[aria-pressed="true"], [aria-expanded="true"], [aria-current]:not([aria-current="false"]), .selected`,iV=class e{appRovingList=$(``);rovingWindow=$(null);host=S(kl).nativeElement;current=null;focusInside=!1;constructor(){let e=S(vs);ed(()=>{if(this.sync(),typeof MutationObserver>`u`)return;let t=new MutationObserver(()=>this.sync());t.observe(this.host,{childList:!0,subtree:!0}),e.onDestroy(()=>t.disconnect())})}isItem(e){let t=this.appRovingList();return!!t&&!!e?.matches(t)}items(){let e=this.appRovingList();return e?[...this.host.querySelectorAll(e)]:[]}sync(){let e=this.items(),t=!1;if(!this.current||!this.host.contains(this.current)){let n=document.activeElement;t=this.focusInside&&(!n||n===document.body),this.current=e.find(e=>e.matches(rV))??e[0]??null}for(let t of e){let e=t===this.current?`0`:`-1`;t.getAttribute(`tabindex`)!==e&&t.setAttribute(`tabindex`,e)}t&&this.current?.focus()}onFocusIn(e){this.focusInside=!0;let t=e.target;this.isItem(t)&&t!==this.current&&(this.current?.setAttribute(`tabindex`,`-1`),this.current=t,t.setAttribute(`tabindex`,`0`))}onFocusOut(e){let t=e.relatedTarget;if(t&&this.host.contains(t))return;let n=e.target;setTimeout(()=>{n?.isConnected!==!1&&!this.host.contains(document.activeElement)&&(this.focusInside=!1)})}onKey(e){if(!nV.includes(e.key)||e.altKey||e.ctrlKey||e.metaKey)return;let t=e.target;if(!this.isItem(t))return;let n=this.items(),r=n.indexOf(t);if(r<0)return;let i=this.rovingWindow();if(i?.enabled()&&(e.key===`Home`||e.key===`End`)){e.preventDefault();let t=e.key===`Home`?0:i.count-1,n=()=>{let e=this.host.querySelector(`[data-vindex="${t}"]`);(e?.matches(this.appRovingList())?e:e?.querySelector(this.appRovingList()))?.focus()};i.rendered(t)?n():i.reveal(t,n);return}let a={ArrowDown:Math.min(r+1,n.length-1),ArrowUp:Math.max(r-1,0),Home:0,End:n.length-1}[e.key];e.preventDefault(),n[a].focus()}static ɵfac=function(t){return new(t||e)};static ɵdir=oh({type:e,selectors:[[``,`appRovingList`,``]],hostBindings:function(e,t){e&1&&H(`keydown`,function(e){return t.onKey(e)})(`focusin`,function(e){return t.onFocusIn(e)})(`focusout`,function(e){return t.onFocusOut(e)})},inputs:{appRovingList:[1,`appRovingList`],rovingWindow:[1,`rovingWindow`]}})},aV=56,oV=12,sV=8,cV=4;function lV(e,t){let n=new Set(e),r=new Map(e.map(e=>[e,[]])),i=new Map(e.map(e=>[e,[]]));for(let{producer:e,consumer:a}of t)n.has(e)&&n.has(a)&&e!==a&&(r.get(a).push(e),i.get(e).push(a));return{producers:r,consumers:i}}function uV(e,t){let n=new Map,r=new Set,i=e=>{let a=n.get(e);if(a!==void 0)return a;if(r.has(e))return-1;r.add(e);let o=0;for(let n of t.get(e)??[])o=Math.max(o,i(n)+1);return r.delete(e),n.set(e,o),o};for(let t of e)i(t);return n}function dV(e,t){let{producers:n,consumers:r}=lV(e,t),i=uV(e,n),a=[];for(let t of e)(a[i.get(t)]??=[]).push(t);for(let e=0;e<a.length;e++)a[e]??=[];let o=new Map,s=e=>e.forEach((e,t)=>o.set(e,t));a.forEach(s);let c=(e,t)=>{let n=new Map;for(let[r,i]of e.entries()){let e=(t.get(i)??[]).map(e=>o.get(e));n.set(i,e.length?e.reduce((e,t)=>e+t,0)/e.length:r)}e.sort((e,t)=>n.get(e)-n.get(t)),s(e)};for(let e=0;e<cV;e++){for(let e=1;e<a.length;e++)c(a[e],n);for(let e=a.length-2;e>=0;e--)c(a[e],r)}let l=[],u=new Map;for(let[e,t]of a.entries())for(let[n,r]of t.entries()){let t={id:r,layer:e,row:n,x:sV+e*224,y:sV+n*56};l.push(t),u.set(r,t)}let d=[];for(let[e,t]of n){let n=u.get(e);for(let r of t){let t=u.get(r),i=t.x+168,a=t.y+22,o=n.x,s=n.y+22,c=Math.max(24,(o-i)/2);d.push({producer:r,consumer:e,path:`M${i} ${a} C${i+c} ${a} ${o-c} ${s} ${o} ${s}`})}}let f=Math.max(0,...a.map(e=>e.length));return{nodes:l,edges:d,layers:a,width:16+Math.max(1,a.length)*224-aV,height:16+Math.max(1,f)*56-oV}}function fV(e,t){let n=(n,r)=>{let i=new Set,a=[e];for(;a.length;){let o=a.pop();for(let s of t)s[n]!==o||i.has(s[r])||s[r]===e||(i.add(s[r]),a.push(s[r]))}return i};return{upstream:n(`consumer`,`producer`),downstream:n(`producer`,`consumer`)}}function pV(e,t,n,r=120){if(e.length<=r)return[...e];if(!n||!e.includes(n))return e.slice(0,r);let{upstream:i,downstream:a}=fV(n,t),o=new Set([n]);for(let e of[...i,...a]){if(o.size>=r)break;o.add(e)}return e.filter(e=>o.has(e))}function mV(e,t,n,r){let i=e.nodes.find(e=>e.id===n);if(!i||r===`Home`)return e.nodes[0]?.id??null;if(r===`End`)return e.nodes.at(-1)?.id??null;let a=e.layers[i.layer]??[];if(r===`ArrowUp`)return a[i.row-1]??null;if(r===`ArrowDown`)return a[i.row+1]??null;let o=r===`ArrowLeft`?-1:1,s=new Set(t.flatMap(e=>o<0?e.consumer===n?[e.producer]:[]:e.producer===n?[e.consumer]:[])),c=e=>e.sort((e,t)=>Math.abs(e.y-i.y)-Math.abs(t.y-i.y)||e.x-t.x)[0]?.id??null,l=e.nodes.filter(e=>s.has(e.id));return l.length?c(l):c(e.nodes.filter(e=>e.layer===i.layer+o))}var hV=(e,t)=>t.producer+`>`+t.consumer,gV=(e,t)=>t.id;function _V(e,t){if(e&1&&(R(0,`p`,5),K(1),z()),e&2){let e=t,n=W();D(),__(` Drawing `,e.drawn,` of `,e.total,` signals. `,n.selectedId()?`The selected signal and its chain are drawn first.`:`Select a signal in the list to draw its chain.`,` `)}}function vV(e,t){if(e&1&&(T(),og(0,`path`,11)),e&2){let e=t.$implicit;Zg(W().edgeTone(e)),k(`d`,e.path)}}function yV(e,t){e&1&&(R(0,`span`,15),K(1,`watching`),z())}function bV(e,t){if(e&1){let e=B();R(0,`button`,12),U(`click`,function(){let t=C(e).$implicit;return w(W().pick(t.id))})(`focus`,function(){let t=C(e).$implicit;return w(W().focused.set(t.id))})(`keydown`,function(t){let n=C(e).$implicit;return w(W().onKey(t,n.id))}),R(1,`span`,13),og(2,`span`,14),K(3),A(4,yV,2,0,`span`,15),z(),R(5,`span`,16),K(6),z()()}if(e&2){let e=t.$implicit,n=W();Zg(n.tone(e.id)),Xg(`left`,e.x,`px`)(`top`,e.y,`px`)(`width`,n.nodeWidth,`px`)(`height`,n.nodeHeight,`px`),V(`title`,n.labelOf(e.id)),k(`tabindex`,e.id===n.focusId()?0:-1)(`aria-pressed`,e.id===n.selectedId())(`aria-label`,n.describe(e.id))(`data-node`,e.id),D(2),Xg(`background`,n.colorOf(e.id)),D(),J(` `,n.byId().get(e.id)?.kind,` `),D(),j(n.watched().has(e.id)?4:-1),D(2),q(n.labelOf(e.id))}}var xV=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]),SV=class e{nodes=$.required();links=$.required();selectedId=$(null);watched=$(new Set);kindColor=$(()=>`var(--text-3)`);selected=Q_();host=S(kl).nativeElement;static seq=0;helpId=`signal-graph-help-${++e.seq}`;nodeWidth=168;nodeHeight=44;byId=X(()=>new Map(this.nodes().map(e=>[e.id,e])));drawn=X(()=>pV(this.nodes().map(e=>e.id),this.links(),this.selectedId()));capped=X(()=>{let e=this.nodes().length,t=this.drawn().length;return t<e?{drawn:t,total:e}:null});layout=X(()=>dV(this.drawn(),this.links()));chain=X(()=>{let e=this.selectedId();return e&&this.byId().has(e)?fV(e,this.links()):null});counts=X(()=>{let e=new Map,t=t=>{let n=e.get(t);return n||e.set(t,n={producers:0,consumers:0}),n};for(let e of this.links())t(e.consumer).producers++,t(e.producer).consumers++;return e});focused=E(null);focusId=X(()=>{let e=new Set(this.drawn()),t=this.focused();if(t&&e.has(t))return t;let n=this.selectedId();return n&&e.has(n)?n:this.layout().nodes[0]?.id??null});labelOf(e){let t=this.byId().get(e);return t?.label??`(unnamed ${t?.kind??`node`})`}colorOf(e){return this.kindColor()(this.byId().get(e)?.kind??`unknown`)}tone(e){if(e===this.selectedId())return`selected`;let t=this.chain();return t?t.upstream.has(e)?`up`:t.downstream.has(e)?`down`:`faded`:``}edgeTone(e){let t=this.chain(),n=this.selectedId();return!t||!n?``:(e=>e===n||t.upstream.has(e))(e.consumer)&&t.upstream.has(e.producer)?`up`:(e=>e===n||t.downstream.has(e))(e.producer)&&t.downstream.has(e.consumer)?`down`:`faded`}describe(e){let t=this.byId().get(e),{producers:n=0,consumers:r=0}=this.counts().get(e)??{},i=[`${t?.kind??`node`} ${t?.label??`unnamed`}`,`${n} ${n===1?`producer`:`producers`}`,`${r} ${r===1?`consumer`:`consumers`}`],a=this.tone(e);return a===`up`&&i.push(`upstream of the selected signal`),a===`down`&&i.push(`downstream of the selected signal`),this.watched().has(e)&&i.push(`watched`),i.join(`, `)}pick(e){this.focused.set(e),this.selected.emit(e)}onKey(e,t){if(!xV.has(e.key))return;e.preventDefault();let n=mV(this.layout(),this.links(),t,e.key);if(!n)return;this.focused.set(n);let r=[...this.host.querySelectorAll(`[data-node]`)].find(e=>e.dataset.node===n);r?.scrollIntoView?.({block:`nearest`,inline:`nearest`}),r?.focus({preventScroll:!0})}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-signal-graph-view`]],inputs:{nodes:[1,`nodes`],links:[1,`links`],selectedId:[1,`selectedId`],watched:[1,`watched`],kindColor:[1,`kindColor`]},outputs:{selected:`selected`},decls:17,vars:11,consts:[[1,`sr-only`,3,`id`],[`aria-hidden`,`true`,1,`legend`],[1,`key`,`key-selected`],[1,`key`,`key-up`],[1,`key`,`key-down`],[`role`,`status`,1,`cap-note`],[`role`,`group`,1,`canvas`],[1,`plane`],[`aria-hidden`,`true`,`focusable`,`false`],[1,`edge`,3,`class`],[`type`,`button`,1,`gnode`,3,`class`,`left`,`top`,`width`,`height`,`title`],[1,`edge`],[`type`,`button`,1,`gnode`,3,`click`,`focus`,`keydown`,`title`],[1,`gkind`],[`aria-hidden`,`true`,1,`dot`],[1,`watching`],[1,`glabel`]],template:function(e,t){if(e&1&&(R(0,`p`,0),K(1,` Producers are on the left and consumers on the right. Use the arrow keys to move between signals and Enter to select one. The list below has the same signals. `),z(),R(2,`div`,1)(3,`span`,2),K(4,`Selected`),z(),R(5,`span`,3),K(6,`Upstream (producers)`),z(),R(7,`span`,4),K(8,`Downstream (consumers)`),z()(),A(9,_V,2,3,`p`,5),R(10,`div`,6)(11,`div`,7),T(),R(12,`svg`,8),M(13,vV,1,3,`:svg:path`,9,hV),z(),M(15,bV,7,20,`button`,10,gV),z()()),e&2){let e;V(`id`,t.helpId),D(9),j((e=t.capped())?9:-1,e),D(),k(`aria-label`,`Signal graph, `+t.layout().nodes.length+` signals`)(`aria-describedby`,t.helpId),D(),Xg(`width`,t.layout().width,`px`)(`height`,t.layout().height,`px`),D(),k(`width`,t.layout().width)(`height`,t.layout().height)(`viewBox`,`0 0 `+t.layout().width+` `+t.layout().height),D(),N(t.layout().edges),D(2),N(t.layout().nodes)}},styles:[`[_nghost-%COMP%] { +}`]})},sV=[`ArrowDown`,`ArrowUp`,`Home`,`End`],cV=`[aria-pressed="true"], [aria-expanded="true"], [aria-current]:not([aria-current="false"]), .selected`,lV=class e{appRovingList=$(``);rovingWindow=$(null);host=S(kl).nativeElement;current=null;focusInside=!1;constructor(){let e=S(vs);td(()=>{if(this.sync(),typeof MutationObserver>`u`)return;let t=new MutationObserver(()=>this.sync());t.observe(this.host,{childList:!0,subtree:!0}),e.onDestroy(()=>t.disconnect())})}isItem(e){let t=this.appRovingList();return!!t&&!!e?.matches(t)}items(){let e=this.appRovingList();return e?[...this.host.querySelectorAll(e)]:[]}sync(){let e=this.items(),t=!1;if(!this.current||!this.host.contains(this.current)){let n=document.activeElement;t=this.focusInside&&(!n||n===document.body),this.current=e.find(e=>e.matches(cV))??e[0]??null}for(let t of e){let e=t===this.current?`0`:`-1`;t.getAttribute(`tabindex`)!==e&&t.setAttribute(`tabindex`,e)}t&&this.current?.focus()}onFocusIn(e){this.focusInside=!0;let t=e.target;this.isItem(t)&&t!==this.current&&(this.current?.setAttribute(`tabindex`,`-1`),this.current=t,t.setAttribute(`tabindex`,`0`))}onFocusOut(e){let t=e.relatedTarget;if(t&&this.host.contains(t))return;let n=e.target;setTimeout(()=>{n?.isConnected!==!1&&!this.host.contains(document.activeElement)&&(this.focusInside=!1)})}onKey(e){if(!sV.includes(e.key)||e.altKey||e.ctrlKey||e.metaKey)return;let t=e.target;if(!this.isItem(t))return;let n=this.items(),r=n.indexOf(t);if(r<0)return;let i=this.rovingWindow();if(i?.enabled()&&(e.key===`Home`||e.key===`End`)){e.preventDefault();let t=e.key===`Home`?0:i.count-1,n=()=>{let e=this.host.querySelector(`[data-vindex="${t}"]`);(e?.matches(this.appRovingList())?e:e?.querySelector(this.appRovingList()))?.focus()};i.rendered(t)?n():i.reveal(t,n);return}let a={ArrowDown:Math.min(r+1,n.length-1),ArrowUp:Math.max(r-1,0),Home:0,End:n.length-1}[e.key];e.preventDefault(),n[a].focus()}static ɵfac=function(t){return new(t||e)};static ɵdir=sh({type:e,selectors:[[``,`appRovingList`,``]],hostBindings:function(e,t){e&1&&H(`keydown`,function(e){return t.onKey(e)})(`focusin`,function(e){return t.onFocusIn(e)})(`focusout`,function(e){return t.onFocusOut(e)})},inputs:{appRovingList:[1,`appRovingList`],rovingWindow:[1,`rovingWindow`]}})},uV=56,dV=12,fV=8,pV=4;function mV(e,t){let n=new Set(e),r=new Map(e.map(e=>[e,[]])),i=new Map(e.map(e=>[e,[]]));for(let{producer:e,consumer:a}of t)n.has(e)&&n.has(a)&&e!==a&&(r.get(a).push(e),i.get(e).push(a));return{producers:r,consumers:i}}function hV(e,t){let n=new Map,r=new Set,i=e=>{let a=n.get(e);if(a!==void 0)return a;if(r.has(e))return-1;r.add(e);let o=0;for(let n of t.get(e)??[])o=Math.max(o,i(n)+1);return r.delete(e),n.set(e,o),o};for(let t of e)i(t);return n}function gV(e,t){let{producers:n,consumers:r}=mV(e,t),i=hV(e,n),a=[];for(let t of e)(a[i.get(t)]??=[]).push(t);for(let e=0;e<a.length;e++)a[e]??=[];let o=new Map,s=e=>e.forEach((e,t)=>o.set(e,t));a.forEach(s);let c=(e,t)=>{let n=new Map;for(let[r,i]of e.entries()){let e=(t.get(i)??[]).map(e=>o.get(e));n.set(i,e.length?e.reduce((e,t)=>e+t,0)/e.length:r)}e.sort((e,t)=>n.get(e)-n.get(t)),s(e)};for(let e=0;e<pV;e++){for(let e=1;e<a.length;e++)c(a[e],n);for(let e=a.length-2;e>=0;e--)c(a[e],r)}let l=[],u=new Map;for(let[e,t]of a.entries())for(let[n,r]of t.entries()){let t={id:r,layer:e,row:n,x:fV+e*224,y:fV+n*56};l.push(t),u.set(r,t)}let d=[];for(let[e,t]of n){let n=u.get(e);for(let r of t){let t=u.get(r),i=t.x+168,a=t.y+22,o=n.x,s=n.y+22,c=Math.max(24,(o-i)/2);d.push({producer:r,consumer:e,path:`M${i} ${a} C${i+c} ${a} ${o-c} ${s} ${o} ${s}`})}}let f=Math.max(0,...a.map(e=>e.length));return{nodes:l,edges:d,layers:a,width:16+Math.max(1,a.length)*224-uV,height:16+Math.max(1,f)*56-dV}}function _V(e,t){let n=(n,r)=>{let i=new Set,a=[e];for(;a.length;){let o=a.pop();for(let s of t)s[n]!==o||i.has(s[r])||s[r]===e||(i.add(s[r]),a.push(s[r]))}return i};return{upstream:n(`consumer`,`producer`),downstream:n(`producer`,`consumer`)}}function vV(e,t,n,r=120){if(e.length<=r)return[...e];if(!n||!e.includes(n))return e.slice(0,r);let{upstream:i,downstream:a}=_V(n,t),o=new Set([n]);for(let e of[...i,...a]){if(o.size>=r)break;o.add(e)}return e.filter(e=>o.has(e))}function yV(e,t,n,r){let i=e.nodes.find(e=>e.id===n);if(!i||r===`Home`)return e.nodes[0]?.id??null;if(r===`End`)return e.nodes.at(-1)?.id??null;let a=e.layers[i.layer]??[];if(r===`ArrowUp`)return a[i.row-1]??null;if(r===`ArrowDown`)return a[i.row+1]??null;let o=r===`ArrowLeft`?-1:1,s=new Set(t.flatMap(e=>o<0?e.consumer===n?[e.producer]:[]:e.producer===n?[e.consumer]:[])),c=e=>e.sort((e,t)=>Math.abs(e.y-i.y)-Math.abs(t.y-i.y)||e.x-t.x)[0]?.id??null,l=e.nodes.filter(e=>s.has(e.id));return l.length?c(l):c(e.nodes.filter(e=>e.layer===i.layer+o))}var bV=(e,t)=>t.producer+`>`+t.consumer,xV=(e,t)=>t.id;function SV(e,t){if(e&1&&(R(0,`p`,5),K(1),z()),e&2){let e=t,n=W();D(),y_(` Drawing `,e.drawn,` of `,e.total,` signals. `,n.selectedId()?`The selected signal and its chain are drawn first.`:`Select a signal in the list to draw its chain.`,` `)}}function CV(e,t){if(e&1&&(T(),sg(0,`path`,11)),e&2){let e=t.$implicit;Qg(W().edgeTone(e)),k(`d`,e.path)}}function wV(e,t){e&1&&(R(0,`span`,15),K(1,`watching`),z())}function TV(e,t){if(e&1){let e=B();R(0,`button`,12),U(`click`,function(){let t=C(e).$implicit;return w(W().pick(t.id))})(`focus`,function(){let t=C(e).$implicit;return w(W().focused.set(t.id))})(`keydown`,function(t){let n=C(e).$implicit;return w(W().onKey(t,n.id))}),R(1,`span`,13),sg(2,`span`,14),K(3),A(4,wV,2,0,`span`,15),z(),R(5,`span`,16),K(6),z()()}if(e&2){let e=t.$implicit,n=W();Qg(n.tone(e.id)),Zg(`left`,e.x,`px`)(`top`,e.y,`px`)(`width`,n.nodeWidth,`px`)(`height`,n.nodeHeight,`px`),V(`title`,n.labelOf(e.id)),k(`tabindex`,e.id===n.focusId()?0:-1)(`aria-pressed`,e.id===n.selectedId())(`aria-label`,n.describe(e.id))(`data-node`,e.id),D(2),Zg(`background`,n.colorOf(e.id)),D(),J(` `,n.byId().get(e.id)?.kind,` `),D(),j(n.watched().has(e.id)?4:-1),D(2),q(n.labelOf(e.id))}}var EV=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]),DV=class e{nodes=$.required();links=$.required();selectedId=$(null);watched=$(new Set);kindColor=$(()=>`var(--text-3)`);selected=ev();host=S(kl).nativeElement;static seq=0;helpId=`signal-graph-help-${++e.seq}`;nodeWidth=168;nodeHeight=44;byId=X(()=>new Map(this.nodes().map(e=>[e.id,e])));drawn=X(()=>vV(this.nodes().map(e=>e.id),this.links(),this.selectedId()));capped=X(()=>{let e=this.nodes().length,t=this.drawn().length;return t<e?{drawn:t,total:e}:null});layout=X(()=>gV(this.drawn(),this.links()));chain=X(()=>{let e=this.selectedId();return e&&this.byId().has(e)?_V(e,this.links()):null});counts=X(()=>{let e=new Map,t=t=>{let n=e.get(t);return n||e.set(t,n={producers:0,consumers:0}),n};for(let e of this.links())t(e.consumer).producers++,t(e.producer).consumers++;return e});focused=E(null);focusId=X(()=>{let e=new Set(this.drawn()),t=this.focused();if(t&&e.has(t))return t;let n=this.selectedId();return n&&e.has(n)?n:this.layout().nodes[0]?.id??null});labelOf(e){let t=this.byId().get(e);return t?.label??`(unnamed ${t?.kind??`node`})`}colorOf(e){return this.kindColor()(this.byId().get(e)?.kind??`unknown`)}tone(e){if(e===this.selectedId())return`selected`;let t=this.chain();return t?t.upstream.has(e)?`up`:t.downstream.has(e)?`down`:`faded`:``}edgeTone(e){let t=this.chain(),n=this.selectedId();return!t||!n?``:(e=>e===n||t.upstream.has(e))(e.consumer)&&t.upstream.has(e.producer)?`up`:(e=>e===n||t.downstream.has(e))(e.producer)&&t.downstream.has(e.consumer)?`down`:`faded`}describe(e){let t=this.byId().get(e),{producers:n=0,consumers:r=0}=this.counts().get(e)??{},i=[`${t?.kind??`node`} ${t?.label??`unnamed`}`,`${n} ${n===1?`producer`:`producers`}`,`${r} ${r===1?`consumer`:`consumers`}`],a=this.tone(e);return a===`up`&&i.push(`upstream of the selected signal`),a===`down`&&i.push(`downstream of the selected signal`),this.watched().has(e)&&i.push(`watched`),i.join(`, `)}pick(e){this.focused.set(e),this.selected.emit(e)}onKey(e,t){if(!EV.has(e.key))return;e.preventDefault();let n=yV(this.layout(),this.links(),t,e.key);if(!n)return;this.focused.set(n);let r=[...this.host.querySelectorAll(`[data-node]`)].find(e=>e.dataset.node===n);r?.scrollIntoView?.({block:`nearest`,inline:`nearest`}),r?.focus({preventScroll:!0})}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-signal-graph-view`]],inputs:{nodes:[1,`nodes`],links:[1,`links`],selectedId:[1,`selectedId`],watched:[1,`watched`],kindColor:[1,`kindColor`]},outputs:{selected:`selected`},decls:17,vars:11,consts:[[1,`sr-only`,3,`id`],[`aria-hidden`,`true`,1,`legend`],[1,`key`,`key-selected`],[1,`key`,`key-up`],[1,`key`,`key-down`],[`role`,`status`,1,`cap-note`],[`role`,`group`,1,`canvas`],[1,`plane`],[`aria-hidden`,`true`,`focusable`,`false`],[1,`edge`,3,`class`],[`type`,`button`,1,`gnode`,3,`class`,`left`,`top`,`width`,`height`,`title`],[1,`edge`],[`type`,`button`,1,`gnode`,3,`click`,`focus`,`keydown`,`title`],[1,`gkind`],[`aria-hidden`,`true`,1,`dot`],[1,`watching`],[1,`glabel`]],template:function(e,t){if(e&1&&(R(0,`p`,0),K(1,` Producers are on the left and consumers on the right. Use the arrow keys to move between signals and Enter to select one. The list below has the same signals. `),z(),R(2,`div`,1)(3,`span`,2),K(4,`Selected`),z(),R(5,`span`,3),K(6,`Upstream (producers)`),z(),R(7,`span`,4),K(8,`Downstream (consumers)`),z()(),A(9,SV,2,3,`p`,5),R(10,`div`,6)(11,`div`,7),T(),R(12,`svg`,8),M(13,CV,1,3,`:svg:path`,9,bV),z(),M(15,TV,7,20,`button`,10,xV),z()()),e&2){let e;V(`id`,t.helpId),D(9),j((e=t.capped())?9:-1,e),D(),k(`aria-label`,`Signal graph, `+t.layout().nodes.length+` signals`)(`aria-describedby`,t.helpId),D(),Zg(`width`,t.layout().width,`px`)(`height`,t.layout().height,`px`),D(),k(`width`,t.layout().width)(`height`,t.layout().height)(`viewBox`,`0 0 `+t.layout().width+` `+t.layout().height),D(),N(t.layout().edges),D(2),N(t.layout().nodes)}},styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -7678,7 +7692,7 @@ svg[_ngcontent-%COMP%] { .gnode[_ngcontent-%COMP%] { transition: none; } -}`]})},CV=8,wV=e=>!!e&&typeof e==`object`&&!Array.isArray(e);function TV(e,t){return/^[A-Za-z_$][\w$]*$/.test(t)?e?`${e}.${t}`:t:`${e}[${JSON.stringify(t)}]`}function EV(e,t){if(Object.is(e,t))return!0;if(!e||!t||typeof e!=`object`||typeof t!=`object`)return!1;try{return JSON.stringify(e)===JSON.stringify(t)}catch{return!1}}function DV(e,t){let n=[],r=0,i=e=>{n.length<50?n.push(e):r++},a=(e,t,n,r)=>{if(!EV(e,t)){if(r<CV&&Array.isArray(e)&&Array.isArray(t)){let o=Math.max(e.length,t.length);for(let s=0;s<o;s++){let o=`${n}[${s}]`;s>=e.length?i({path:o,kind:`added`,after:t[s]}):s>=t.length?i({path:o,kind:`removed`,before:e[s]}):a(e[s],t[s],o,r+1)}return}if(r<CV&&wV(e)&&wV(t)){for(let o of Object.keys(e)){let s=TV(n,o);o in t?a(e[o],t[o],s,r+1):i({path:s,kind:`removed`,before:e[o]})}for(let r of Object.keys(t))r in e||i({path:TV(n,r),kind:`added`,after:t[r]});return}i({path:n||`(value)`,kind:`changed`,before:e,after:t})}};return a(e,t,``,0),r&&n.push({path:`…`,kind:`changed`,after:`${r} more changes`}),n}var OV=[`filterInput`],kV=e=>({id:e,label:`Status history`}),AV=e=>({id:e,label:`Value history`}),jV=(e,t)=>t.kind,MV=(e,t)=>t.name+t.file+t.line,NV=(e,t)=>t.epoch,PV=(e,t)=>t.path,FV=(e,t)=>t.id,IV=(e,t)=>t.id+`:`+t.change.epoch,LV=(e,t)=>t.file+t.line;function RV(e,t){if(e&1){let e=B();F(0,`div`,4)(1,`span`,18),K(2,`Page`),I(),F(3,`app-select`,19),H(`valueChange`,function(t){return C(e),w(W().selectPage(t))}),I()()}if(e&2){let e=W();D(3),P(`options`,e.pageOptions())(`value`,e.shownPageId())}}function zV(e,t){if(e&1){let e=B();F(0,`div`,5)(1,`span`,20),K(2,`Graph of`),I(),F(3,`app-select`,21),H(`valueChange`,function(t){return C(e),w(W().pickComponent(t))}),I()()}if(e&2){let e=W();D(3),P(`options`,e.componentOptions())(`value`,e.pickerValue())}}function BV(e,t){if(e&1&&(F(0,`span`,24),K(1),I()),e&2){let e=W(2);D(),q(e.sourceNote(e.graph().source))}}function VV(e,t){if(e&1&&(F(0,`p`,7)(1,`span`,22),K(2),I(),F(3,`span`,23),K(4),I(),A(5,BV,2,1,`span`,24),I()),e&2){let e=t,n=W();D(2),q(e.name),D(2),q(e.path),D(),j(n.graph().source?5:-1)}}function HV(e,t){if(e&1&&(F(0,`p`,7)(1,`span`,22),K(2),I(),F(3,`span`,24),K(4,`environment injector`),I()()),e&2){let e=W();D(2),q(e.injectorLabel(t))}}function UV(e,t){if(e&1&&(F(0,`p`,7)(1,`span`,22),K(2),I(),F(3,`span`,23),K(4),I(),F(5,`span`,24),K(6,`directives, no component`),I()()),e&2){let e=t;D(2),q(e.directives.join(`, `)||`<`+e.tag+`>`),D(2),J(`<`,e.tag,`>`)}}function WV(e,t){e&1&&(F(0,`p`,8),K(1,` The picked component or injector is gone or has no signal graph, so this shows another one. `),I())}function GV(e,t){e&1&&K(0,` The effects registered on this injector and the signals they read. A signal that no effect reads is not part of the graph. Pick a kind to filter. `)}function KV(e,t){e&1&&K(0,` The live signal graph of one component. Only signals that its template or an effect has read appear here; a signal nothing has read yet is not part of the graph. Pick a kind to filter. `)}function qV(e,t){e&1&&K(0,` Loading the live signal graph… `)}function JV(e,t){e&1&&K(0,` Every signal, computed and effect found in your source. Pick a kind to filter. `)}function YV(e,t){if(e&1&&(F(0,`app-angular-unavailable`,10),K(1,` This list comes from a source scan. `),I()),e&2){let e=W();P(`page`,e.angularPage())(`missing`,e.unsupported())}}function XV(e,t){e&1&&(F(0,`p`,8),K(1,` The signal write hook did not load. Value history shows sampled values only, with no exact set entries. `),I())}function ZV(e,t){if(e&1&&(F(0,`p`,8),K(1),I()),e&2){let e=W();D(),Y(` Showing `,e.graph().nodes.length,` of `,t,` signals. The rest and their edges are left out. `)}}function QV(e,t){if(e&1){let e=B();F(0,`button`,25),H(`click`,function(){let t=C(e).$implicit,n=W(2);return w(n.kind.set(n.kind()===t.kind?null:t.kind))}),L(1,`span`,28),F(2,`span`,29),K(3),I(),F(4,`span`,26),K(5),I()()}if(e&2){let e=t.$implicit,n=W(2);G(`active`,n.kind()===e.kind),k(`aria-pressed`,n.kind()===e.kind),D(),Xg(`background`,n.kindColor(e.kind)),D(2),q(e.kind),D(2),q(e.count)}}function $V(e,t){if(e&1){let e=B();F(0,`div`,11)(1,`button`,25),H(`click`,function(){return C(e),w(W().kind.set(null))}),K(2,` All `),F(3,`span`,26),K(4),I()(),M(5,QV,6,7,`button`,27,jV),I()}if(e&2){let e=W();D(),G(`active`,!e.kind()),k(`aria-pressed`,!e.kind()),D(3),q(e.kindTotal()),D(),N(e.kindChips())}}function eH(e,t){e&1&&(F(0,`div`,12),L(1,`span`,30),F(2,`p`,31),K(3,`Scanning source for signals…`),I()())}function tH(e,t){if(e&1){let e=B();F(0,`div`,32)(1,`p`,31),K(2,`Couldn't load signals`),I(),F(3,`p`,33),K(4,` The devtools server did not answer. Check that it is still running, then retry. `),I(),F(5,`button`,34),H(`click`,function(){return C(e),w(W().retry())}),K(6),I()()}if(e&2){let e=W();G(`compact`,e.sourceSignals().length>0),D(5),k(`aria-disabled`,e.retrying()||null),D(),J(` `,e.retrying()?`Retrying…`:`Retry`,` `)}}function nH(e,t){e&1&&(F(0,`div`,14)(1,`p`,31),K(2,`No signals found.`),I(),F(3,`p`,33),K(4,` No `),F(5,`code`),K(6,`signal()`),I(),K(7,`, `),F(8,`code`),K(9,`computed()`),I(),K(10,` or `),F(11,`code`),K(12,`effect()`),I(),K(13,` calls were found in your source. To see the live graph, run Angular 20.1 or later with the overlay connected and select a component. `),I()())}function rH(e,t){if(e&1&&(F(0,`span`,44),K(1,`·`),I(),F(2,`span`),K(3),I()),e&2){let e=W().$implicit;D(3),J(`in <`,e.component,`>`)}}function iH(e,t){if(e&1&&(F(0,`div`,37)(1,`div`,39)(2,`span`,40),K(3),I(),F(4,`span`,41),K(5),I()(),F(6,`div`,42),L(7,`app-source-link`,43),A(8,rH,4,1),I()()),e&2){let e=t.$implicit,n=W(2);D(2),Xg(`background`,n.kindColor(e.kind)),D(),q(e.kind),D(2),q(e.name),D(2),P(`file`,e.file)(`line`,e.line),D(),j(e.component?8:-1)}}function aH(e,t){if(e&1){let e=B();F(0,`div`,38)(1,`p`,31),K(2,`No signals match.`),I(),F(3,`p`,33),K(4,`Try a different name or kind.`),I(),F(5,`button`,34),H(`click`,function(){return C(e),w(W(2).clearFilters())}),K(6,`Clear filters`),I()()}}function oH(e,t){if(e&1&&(F(0,`p`,35),K(1,`Signals from the source scan:`),I(),F(2,`div`,36),M(3,iH,9,7,`div`,37,MV,!1,aH,7,0,`div`,38),I()),e&2){let e=W();D(3),N(e.filteredSourceSignals())}}function sH(e,t){e&1&&(F(0,`p`,33),K(1),I()),e&2&&(D(),J(`Restore is off. `,t))}function cH(e,t){if(e&1&&(A(0,sH,2,1,`p`,33),F(1,`p`,48),K(2),I()),e&2){let e,t=W(2).id,n=W();j((e=n.restoreBlocked())?0:-1,e),D(),G(`has-text`,n.restoreResult()?.id===t)(`restore-error`,n.restoreResult()?.id===t&&n.restoreResult()?.error),D(),J(` `,n.restoreResult()?.id===t?n.restoreResult()?.text:``,` `)}}function lH(e,t){if(e&1&&(F(0,`span`,51),K(1),I()),e&2){let e=W().$implicit;D(),J(``,e.missed,` earlier not captured`)}}function uH(e,t){if(e&1){let e=B();w_(0),V_(1,`date`),F(2,`button`,55),H(`click`,function(){C(e);let t=E_(0),n=W().$implicit;W();let r=E_(4);return w(W(2).restore(r,n,t??``))}),K(3,` Restore `),I()}if(e&2){let e=W().$implicit,t=W(3),n=T_(U_(1,2,e.at,`HH:mm:ss.SSS`));D(2),k(`aria-label`,`Restore value from `+n)(`aria-disabled`,t.restoring()||null)}}function dH(e,t){if(e&1&&(F(0,`code`,61),K(1),V_(2,`json`),I()),e&2){let e=W().$implicit;D(),q(H_(2,1,e.before))}}function fH(e,t){e&1&&(F(0,`span`,59),K(1,`to`),I(),F(2,`span`,63),K(3,`→`),I())}function pH(e,t){if(e&1&&(F(0,`code`,62),K(1),V_(2,`json`),I()),e&2){let e=W().$implicit;D(),q(H_(2,1,e.after))}}function mH(e,t){if(e&1&&(F(0,`li`)(1,`span`,58),K(2),I(),F(3,`span`,59),K(4,`: `),I(),F(5,`code`,60),K(6),I(),F(7,`span`,59),K(8,`, `),I(),A(9,dH,3,3,`code`,61),A(10,fH,4,0),A(11,pH,3,3,`code`,62),I()),e&2){let e=t.$implicit,n=W(5);Zg(`diff-`+e.kind),D(2),q(n.diffLabel(e.kind)),D(4),q(e.path),D(3),j(e.kind===`added`?-1:9),D(),j(e.kind===`changed`?10:-1),D(),j(e.kind===`removed`?-1:11)}}function hH(e,t){if(e&1&&(F(0,`details`,53)(1,`summary`),K(2),I(),F(3,`ul`,56),M(4,mH,12,7,`li`,57,PV),I()()),e&2){let e=t;D(2),J(`Changes from the entry before (`,e.length,`)`),D(2),N(e)}}function gH(e,t){if(e&1&&(F(0,`li`),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function _H(e,t){if(e&1&&(F(0,`ol`,54),M(1,gH,2,1,`li`,null,Jh),I()),e&2){let e=W().$implicit;D(),N(e.stack)}}function vH(e,t){if(e&1&&(F(0,`li`)(1,`span`,49)(2,`time`),K(3),V_(4,`date`),I(),F(5,`span`,50),K(6),I(),F(7,`span`),K(8),I(),A(9,lH,2,1,`span`,51),A(10,uH,4,6,`button`,52),I(),F(11,`pre`),K(12),V_(13,`json`),I(),A(14,hH,6,1,`details`,53),A(15,_H,3,0,`ol`,54),I()),e&2){let e,n=t.$implicit,r=t.$index;W();let i=E_(4),a=W(2);D(3),q(U_(4,10,n.at,`HH:mm:ss.SSS`)),D(2),Zg(`source-`+n.source),D(),q(a.sourceLabel(n.source)),D(2),J(`epoch `,n.epoch),D(),j(n.missed?9:-1),D(),j(i&&!a.restoreBlocked()&&r!==0?10:-1),D(2),q(H_(13,13,n.value)),D(2),j((e=a.diffs().get(n.epoch))?14:-1,e),D(),j(n.stack?.length?15:-1)}}function yH(e,t){if(e&1&&(F(0,`h4`,45),K(1),I(),F(2,`p`,46),K(3),I(),w_(4),A(5,cH,3,6),F(6,`ol`,47),M(7,vH,16,15,`li`,null,NV),I()),e&2){let e=W(),t=e.id,n=e.label,r=W();P(`id`,`history-heading-`+t),D(),q(n),D(2),q(r.historySummary(t)),D();let i=T_(r.restorable(t));D(),j(i?5:-1),D(),k(`aria-labelledby`,`history-heading-`+t),D(),N(r.selectedHistory())}}function bH(e,t){e&1&&A(0,yH,9,6),e&2&&j(W().selectedHistory().length?0:-1)}function xH(e,t){if(e&1){let e=B();F(0,`button`,68),H(`click`,function(){C(e);let t=W(2);return w(t.showFramework.set(!t.showFramework()))}),K(1,` Show framework signals `),F(2,`span`,26),K(3),I()()}if(e&2){let e=W(2);k(`aria-pressed`,e.showFramework()),D(3),Y(``,t,` `,e.showFramework()?`shown`:`hidden`)}}function SH(e,t){e&1&&(F(0,`p`,70),K(1,` Write stacks are on for this page. Each set of a named signal keeps the first 3 app frames of the code that wrote it, shown in its value history. Taking a stack slows every write, so turn it off when you are done. `),I())}function CH(e,t){if(e&1){let e=B();F(0,`app-signal-graph-view`,74),H(`selected`,function(t){return C(e),w(W(3).selectFromGraph(t))}),I()}if(e&2){let e=W(3);P(`nodes`,e.graphNodes())(`links`,e.graphLinks())(`selectedId`,e.selectedId())(`watched`,e.watchedIds())(`kindColor`,e.kindColorOf)}}function wH(e,t){e&1&&(F(0,`p`,70),K(1,` Every signal in this graph was created by Angular. Show framework signals to see them. `),I())}function TH(e,t){if(e&1){let e=B();F(0,`p`,73)(1,`span`),K(2,`Selected`),I(),F(3,`span`,75),K(4),I(),F(5,`span`,44),K(6,`·`),I(),F(7,`span`),K(8),I(),F(9,`span`,44),K(10,`·`),I(),F(11,`span`),K(12),I(),F(13,`button`,76),H(`click`,function(){let t=C(e);return w(W(3).jumpTo(t))}),K(14,` Show details `),I()()}if(e&2){let e=t,n=W(3);D(4),q(e.label??`(unnamed)`),D(4),q(n.plural(n.getDependencies(e).length,`producer`)),D(4),q(n.plural(n.getConsumers(e).length,`consumer`))}}function EH(e,t){if(e&1&&(F(0,`div`,71),A(1,CH,1,5,`app-signal-graph-view`,72)(2,wH,2,0,`p`,70),A(3,TH,15,3,`p`,73),I()),e&2){let e,t=W(2);D(),j(t.graphNodes().length?1:2),D(2),j((e=t.selectedNode())?3:-1,e)}}function DH(e,t){if(e&1){let e=B();F(0,`section`,15)(1,`div`,64)(2,`h2`,65),K(3,`Graph`),I(),F(4,`div`,66),A(5,xH,4,3,`button`,67),F(6,`button`,68),H(`click`,function(){return C(e),w(W().toggleStacks())}),K(7,` Record write stacks `),I(),F(8,`button`,69),H(`click`,function(){C(e);let t=W();return w(t.showGraph.set(!t.showGraph()))}),K(9),I()()(),A(10,SH,2,0,`p`,70),A(11,EH,4,2,`div`,71),I()}if(e&2){let e,t=W();D(5),j((e=t.frameworkCount())?5:-1,e),D(),k(`aria-pressed`,t.stacksOn()),D(2),k(`aria-expanded`,t.showGraph()),D(),J(` `,t.showGraph()?`Hide graph`:`Show graph`,` `),D(),j(t.stacksOn()?10:-1),D(),j(t.showGraph()?11:-1)}}function OH(e,t){if(e&1&&(F(0,`p`,33),K(1),I()),e&2){let e=t;D(),Y(` `,e,` watched `,e===1?`signal is`:`signals are`,` not in this graph. Their changes still log to the page console. `)}}function kH(e,t){if(e&1&&(F(0,`span`,79),K(1),V_(2,`json`),I()),e&2){let e=W().$implicit;D(),q(H_(2,1,e.value))}}function AH(e,t){if(e&1&&(F(0,`span`,80),K(1),I()),e&2){let e=t;D(),Y(``,e,` `,e===1?`change`:`changes`)}}function jH(e,t){if(e&1){let e=B();F(0,`li`)(1,`span`,75),K(2),I(),A(3,kH,3,3,`span`,79),A(4,AH,2,2,`span`,80),F(5,`button`,76),H(`click`,function(){let t=C(e).$implicit;return w(W(2).toggleWatch(t))}),K(6,` Stop watching `),I()()}if(e&2){let e,n=t.$implicit,r=W(2);D(2),q(n.label??`(unnamed)`),D(),j(n.value===void 0?-1:3),D(),j((e=r.changeCount(n.id))?4:-1,e),D(),k(`aria-label`,`Stop watching `+(n.label??`the unnamed signal`))}}function MH(e,t){if(e&1&&(F(0,`li`),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function NH(e,t){if(e&1&&(F(0,`ol`,54),M(1,MH,2,1,`li`,null,Jh),I()),e&2){let e=W().$implicit;D(),N(e.change.stack)}}function PH(e,t){if(e&1&&(F(0,`li`)(1,`span`,49)(2,`time`),K(3),V_(4,`date`),I(),F(5,`span`,75),K(6),I(),F(7,`span`,50),K(8),I()(),F(9,`pre`),K(10),V_(11,`json`),I(),A(12,NH,3,0,`ol`,54),I()),e&2){let e=t.$implicit,n=W(3);D(3),q(U_(4,7,e.change.at,`HH:mm:ss.SSS`)),D(3),q(e.label),D(),Zg(`source-`+e.change.source),D(),q(n.sourceLabel(e.change.source)),D(2),q(H_(11,10,e.change.value)),D(2),j(e.change.stack?.length?12:-1)}}function FH(e,t){if(e&1&&(F(0,`h3`,81),K(1,`Recent changes`),I(),F(2,`div`,82)(3,`ol`,83),M(4,PH,13,12,`li`,null,IV),I()()),e&2){let e=W(2);D(4),N(e.watchLog())}}function IH(e,t){if(e&1&&(F(0,`section`,16)(1,`h2`,77),K(2,`Watched`),I(),A(3,OH,2,2,`p`,33),F(4,`ul`,78),M(5,jH,7,4,`li`,null,FV),I(),A(7,FH,6,0),I()),e&2){let e,t=W();D(3),j((e=t.watchedElsewhere())?3:-1,e),D(2),N(t.watchedNodes()),D(2),j(t.watchLog().length?7:-1)}}function LH(e,t){if(e&1&&(F(0,`span`,91),K(1),I()),e&2){let e=W().$implicit;Zg(`tone-`+W(2).statusTone(e.status)),D(),q(e.status)}}function RH(e,t){if(e&1&&(F(0,`span`,80),K(1),I()),e&2){let e=t;D(),Y(``,e,` `,e===1?`change`:`changes`)}}function zH(e,t){if(e&1&&(F(0,`span`,89),K(1),V_(2,`json`),I()),e&2){let e=W().$implicit;D(),q(H_(2,1,e.error))}}function BH(e,t){if(e&1&&(F(0,`span`,89),K(1),V_(2,`json`),I()),e&2){let e=W().$implicit;D(),q(H_(2,1,e.value))}}function VH(e,t){e&1&&(F(0,`p`,33),K(1,` This resource has no name. Pass `),F(2,`code`),K(3,`debugName`),I(),K(4,` to `),F(5,`code`),K(6,`resource()`),I(),K(7,` or `),F(8,`code`),K(9,`httpResource()`),I(),K(10,` to name it here. `),I())}function HH(e,t){if(e&1&&(F(0,`dt`),K(1,`Loading`),I(),F(2,`dd`),K(3),I()),e&2){let e=W(2).$implicit;D(3),q(e.isLoading?`yes`:`no`)}}function UH(e,t){if(e&1&&(F(0,`dt`),K(1,`HTTP status`),I(),F(2,`dd`),K(3),I()),e&2){let e=W(2).$implicit;D(3),q(e.statusCode)}}function WH(e,t){if(e&1&&(F(0,`dt`),K(1,`Params`),I(),F(2,`dd`)(3,`pre`,95),K(4),V_(5,`json`),I()()),e&2){let e=W(2).$implicit;D(3),k(`aria-label`,`Params of `+e.name),D(),q(H_(5,2,e.params))}}function GH(e,t){if(e&1&&(F(0,`dt`),K(1,`Value`),I(),F(2,`dd`)(3,`pre`,95),K(4),V_(5,`json`),I()()),e&2){let e=W(2).$implicit;D(3),k(`aria-label`,`Value of `+e.name),D(),q(H_(5,2,e.value))}}function KH(e,t){if(e&1&&(F(0,`dt`),K(1,`Error`),I(),F(2,`dd`)(3,`pre`,95),K(4),V_(5,`json`),I()()),e&2){let e=W(2).$implicit;D(3),k(`aria-label`,`Error of `+e.name),D(),q(H_(5,2,e.error))}}function qH(e,t){if(e&1&&(F(0,`li`)(1,`span`,96),K(2),I(),F(3,`span`,75),K(4),I()()),e&2){let e=t.$implicit,n=W(5);D(),Xg(`background`,n.kindColor(e.kind)),D(),q(e.kind),D(2),q(e.label??e.id)}}function JH(e,t){if(e&1&&(F(0,`ul`,45),M(1,qH,5,4,`li`,null,FV),I()),e&2){let e=W(2).$implicit,t=W(2);P(`id`,`resource-internals-`+e.id),D(),N(t.internalsOf(e))}}function YH(e,t){if(e&1){let e=B();F(0,`div`,90)(1,`h3`,92),K(2),I(),A(3,VH,11,0,`p`,33),F(4,`dl`)(5,`dt`),K(6,`Status`),I(),F(7,`dd`),K(8),I(),A(9,HH,4,1),A(10,UH,4,1),A(11,WH,6,4),A(12,GH,6,4),A(13,KH,6,4),I(),ug(14,93),F(15,`button`,94),H(`click`,function(){C(e);let t=W(3);return w(t.showInternals.set(!t.showInternals()))}),K(16),I(),A(17,JH,3,1,`ul`,45),I()}if(e&2){let e=W().$implicit,t=W(2),n=kg(25);P(`id`,`signal-detail-`+e.id),D(2),q(e.name),D(),j(e.named?-1:3),D(5),q(e.status??`unknown`),D(),j(e.isLoading===void 0?-1:9),D(),j(e.statusCode===void 0?-1:10),D(),j(e.params===void 0?-1:11),D(),j(e.value===void 0?-1:12),D(),j(e.error===void 0?-1:13),D(),P(`ngTemplateOutlet`,n)(`ngTemplateOutletContext`,I_(16,kV,e.id)),D(),k(`aria-expanded`,t.showInternals())(`aria-controls`,`resource-internals-`+e.id),D(),Y(` `,t.showInternals()?`Hide`:`Show`,` internal signals (`,e.nodeIds.length,`) `),D(),j(t.showInternals()?17:-1)}}function XH(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,86),H(`click`,function(){let t=C(e).$implicit;return w(W(2).select(t.id))}),F(2,`span`,39)(3,`span`,40),K(4,`resource`),I(),F(5,`span`,41),K(6),I(),A(7,LH,2,3,`span`,87),A(8,RH,2,2,`span`,80),L(9,`span`,88),I(),A(10,zH,3,3,`span`,89)(11,BH,3,3,`span`,89),I(),A(12,YH,18,18,`div`,90),I()}if(e&2){let e,n=t.$implicit,r=W(2);D(),G(`selected`,r.selectedId()===n.id),k(`aria-expanded`,r.selectedId()===n.id)(`aria-controls`,`signal-detail-`+n.id)(`data-card`,n.id),D(2),Xg(`background`,r.kindColor(`resource`)),D(3),q(n.name),D(),j(n.status?7:-1),D(),j((e=n.changes)?8:-1,e),D(2),j(n.error===void 0?n.value===void 0?-1:11:10),D(2),j(r.selectedId()===n.id?12:-1)}}function ZH(e,t){if(e&1&&(F(0,`h2`,84),K(1,`Resources`),I(),F(2,`ul`,85),M(3,XH,13,12,`li`,null,FV),I()),e&2){let e=W();D(3),N(e.filteredResources())}}function QH(e,t){e&1&&(F(0,`span`,99),K(1,`watching`),I())}function $H(e,t){e&1&&(F(0,`span`,100),K(1,`framework`),I())}function eU(e,t){if(e&1&&(F(0,`span`,80),K(1),I()),e&2){let e=t;D(),Y(``,e,` `,e===1?`change`:`changes`)}}function tU(e,t){if(e&1&&(F(0,`span`,89),K(1),V_(2,`json`),I()),e&2){let e=W().$implicit;D(),q(H_(2,1,e.value))}}function nU(e,t){if(e&1&&(F(0,`span`,44),K(1,`·`),I(),F(2,`span`),K(3),I()),e&2){let e=W().$implicit,t=W(2);D(3),J(`Deps: `,t.getDependencies(e).length)}}function rU(e,t){if(e&1&&(F(0,`span`,44),K(1,`·`),I(),F(2,`span`),K(3),I()),e&2){let e=W().$implicit,t=W(2);D(3),J(`Consumers: `,t.getConsumers(e).length)}}function iU(e,t){if(e&1&&(F(0,`dt`),K(1,`Runs`),I(),F(2,`dd`),K(3),I()),e&2){let e=W(4);D(3),__(` `,t,`, `,e.selectedNode().runMs??0,` ms in all, last `,e.selectedNode().lastRunMs??0,` ms `)}}function aU(e,t){if(e&1&&L(0,`app-source-link`,102),e&2){let e=W();P(`file`,e.exact.file)(`line`,e.exact.line)}}function oU(e,t){if(e&1&&(F(0,`span`,103),K(1),I()),e&2){let e=W().$implicit;D(),J(`in `,e.component)}}function sU(e,t){if(e&1&&(F(0,`li`),L(1,`app-source-link`,102),A(2,oU,2,1,`span`,103),I()),e&2){let e=t.$implicit;D(),P(`file`,e.file)(`line`,e.line),D(),j(e.component?2:-1)}}function cU(e,t){if(e&1&&(F(0,`span`,103),K(1),I(),F(2,`ul`,104),M(3,sU,3,3,`li`,null,LV),I()),e&2){let e=W();D(),J(``,e.candidates.length,` declarations match this name:`),D(2),N(e.candidates)}}function lU(e,t){e&1&&(F(0,`dt`),K(1,`Source`),I(),F(2,`dd`,101),A(3,aU,1,2,`app-source-link`,102)(4,cU,5,1),I()),e&2&&(D(3),j(t.exact?3:4))}function uU(e,t){if(e&1&&(F(0,`dt`),K(1,`Value`),I(),F(2,`dd`)(3,`pre`,95),K(4),V_(5,`json`),I()()),e&2){let e=W(4);D(3),k(`aria-label`,`Value of `+(e.selectedNode().label??`signal`)),D(),q(H_(5,2,e.selectedNode().value))}}function dU(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,105),H(`click`,function(){let t=C(e).$implicit;return w(W(5).jumpTo(t))}),F(2,`span`,96),K(3),I(),F(4,`span`,75),K(5),I()()()}if(e&2){let e=t.$implicit,n=W(5);D(),k(`aria-label`,`Go to `+e.kind+` `+(e.label??e.id)),D(),Xg(`background`,n.kindColor(e.kind)),D(),q(e.kind),D(2),q(e.label??e.id)}}function fU(e,t){if(e&1&&(F(0,`h4`),K(1,`Dependencies (producers)`),I(),F(2,`ul`),M(3,dU,6,5,`li`,null,FV),I()),e&2){let e=W(4);D(3),N(e.getDependencies(e.selectedNode()))}}function pU(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,105),H(`click`,function(){let t=C(e).$implicit;return w(W(5).jumpTo(t))}),F(2,`span`,96),K(3),I(),F(4,`span`,75),K(5),I()()()}if(e&2){let e=t.$implicit,n=W(5);D(),k(`aria-label`,`Go to `+e.kind+` `+(e.label??e.id)),D(),Xg(`background`,n.kindColor(e.kind)),D(),q(e.kind),D(2),q(e.label??e.id)}}function mU(e,t){if(e&1&&(F(0,`h4`),K(1,`Consumers`),I(),F(2,`ul`),M(3,pU,6,5,`li`,null,FV),I()),e&2){let e=W(4);D(3),N(e.getConsumers(e.selectedNode()))}}function hU(e,t){if(e&1){let e=B();F(0,`button`,106),H(`click`,function(){C(e);let t=W(4);return w(t.toggleWatch(t.selectedNode()))}),K(1,` Watch `),I(),F(2,`p`,33),K(3,` A watched signal is listed under Watched and logs each change to the page console. `),I()}if(e&2){let e=W(4);k(`aria-pressed`,e.watchedIds().has(e.selectedNode().id))}}function gU(e,t){e&1&&(F(0,`p`,33),K(1),I()),e&2&&(D(),q(t))}function _U(e,t){if(e&1&&(F(0,`div`,90)(1,`h3`,92),K(2),I(),F(3,`dl`)(4,`dt`),K(5,`Kind`),I(),F(6,`dd`),K(7),I(),F(8,`dt`),K(9,`Epoch`),I(),F(10,`dd`),K(11),I(),A(12,iU,4,3),A(13,lU,5,1),A(14,uU,6,4),I(),A(15,fU,5,0),A(16,mU,5,0),A(17,hU,4,1),A(18,gU,2,1,`p`,33),ug(19,93),I()),e&2){let e,t,n,r=W().$implicit,i=W(2),a=kg(25);P(`id`,`signal-detail-`+r.id),D(2),q(i.selectedNode().label??i.selectedNode().id),D(5),q(i.selectedNode().kind),D(4),q(i.selectedNode().epoch),D(),j((e=i.selectedNode().runs)?12:-1,e),D(),j((t=i.sourceMatch())?13:-1,t),D(),j(i.selectedNode().value===void 0?-1:14),D(),j(i.getDependencies(i.selectedNode()).length?15:-1),D(),j(i.getConsumers(i.selectedNode()).length?16:-1),D(),j(i.isWatchable(i.selectedNode())?17:-1),D(),j((n=i.writeHint())?18:-1,n),D(),P(`ngTemplateOutlet`,a)(`ngTemplateOutletContext`,I_(13,AV,r.id))}}function vU(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,86),H(`click`,function(){let t=C(e).$implicit;return w(W(2).select(t.id))}),F(2,`span`,39)(3,`span`,40),K(4),I(),F(5,`span`,41),K(6),I(),A(7,QH,2,0,`span`,99),A(8,$H,2,0,`span`,100),A(9,eU,2,2,`span`,80),L(10,`span`,88),I(),A(11,tU,3,3,`span`,89),F(12,`span`,42)(13,`span`),K(14),I(),A(15,nU,4,1),A(16,rU,4,1),I()(),A(17,_U,20,15,`div`,90),I()}if(e&2){let e,n=t.$implicit,r=W(2);D(),G(`selected`,r.selectedId()===n.id),k(`aria-expanded`,r.selectedId()===n.id)(`aria-controls`,`signal-detail-`+n.id)(`data-card`,n.id),D(2),Xg(`background`,r.kindColor(n.kind)),D(),q(n.kind),D(2),q(n.label??`(unnamed)`),D(),j(r.watchedIds().has(n.id)?7:-1),D(),j(n.framework?8:-1),D(),j((e=r.changeCount(n.id))?9:-1,e),D(2),j(n.value===void 0?-1:11),D(3),J(`Epoch: `,n.epoch),D(),j(r.getDependencies(n).length?15:-1),D(),j(r.getConsumers(n).length?16:-1),D(),j(r.selectedId()===n.id&&r.selectedNode()?17:-1)}}function yU(e,t){if(e&1){let e=B();F(0,`button`,34),H(`click`,function(){return C(e),w(W(3).clearFilters())}),K(1,`Clear filters`),I()}}function bU(e,t){if(e&1&&(F(0,`li`,98)(1,`p`,31),K(2),I(),F(3,`p`,33),K(4),I(),A(5,yU,2,0,`button`,107),I()),e&2){let e=W(2);D(2),J(` `,e.hasAnySignals()?`No signals match.`:`No signals in this graph.`,` `),D(2),J(` `,e.hasAnySignals()?`Try a different name or kind.`:`Select a component that reads signals, or interact with the page to create some.`,` `),D(),j(e.hasAnySignals()||e.filter()||e.kind()?5:-1)}}function xU(e,t){if(e&1&&(F(0,`h2`,84),K(1,`Signals`),I(),F(2,`ul`,97),M(3,vU,18,17,`li`,null,FV,!1,bU,6,3,`li`,98),I()),e&2){let e=W();D(3),N(e.filteredNodes())}}var SU=`follow`;function CU(e){return Object.keys(e.pages).length?e.pages:e.graph?{[e.graph.pageId??``]:e.graph}:{}}var wU=`env:`,TU=50,EU=new Set([`signal`,`computed`,`linkedSignal`]),DU=20,OU={selected:`picked`,routed:`rendered by the router`,root:`first component with signals`},kU={write:`set`,sample:`sampled`,initial:`initial`},AU={resolved:`ok`,local:`ok`,loading:`warn`,reloading:`warn`,error:`danger`},jU={signal:`signal`,computed:`computed`,linkedSignal:`linked`,effect:`effect`,template:`template`,afterRenderEffectPhase:`after-render`,childSignalProp:`child-prop`,"input (signal)":`input`,"input.required (signal)":`input`,"output (signal)":`output`,"model (signal)":`model`,"model.required (signal)":`model`,"viewChild (signal)":`view-query`,"viewChild.required (signal)":`view-query`,"viewChildren (signal)":`view-query`,"contentChild (signal)":`content-query`,"contentChild.required (signal)":`content-query`,"contentChildren (signal)":`content-query`,resource:`resource`},MU=class e{rpc=$(null);focus=$(null);focusedSignal=E(null);destroyRef=S(vs);host=S(kl);filterInput=av(`filterInput`);injector=S(gs);pageId=fT();angularPages=uD(()=>this.rpc());angularPage=X(()=>dD(this.angularPages(),this.shownPageId()??this.pageId));cleanups=[];graphLoad=0;treePages=E({});graphState=E({graph:null,pages:{}});chosenPageId=E(null);announcement=E(``);graphPages=X(()=>CU(this.graphState()));shownPageId=Q({source:()=>({pages:this.graphPages(),newest:this.graphState().graph?.pageId??null,chosen:this.chosenPageId()}),computation:({pages:e,newest:t,chosen:n},r)=>{let i={};for(let n of Object.keys(e))i[n]={pageId:n,reportedAt:+(n===t)};return pT(i,{chosen:n,host:this.pageId,previous:r?.value??null})}});reported=X(()=>{let e=this.shownPageId();return e===null?null:this.graphPages()[e]??null});unsupported=X(()=>!!this.reported()?.unsupported);graphKnown=E(!1);graph=X(()=>{let e=this.reported();return e?.unsupported?null:e});graphOwner=X(()=>{let e=this.graph();return e?`${e.pageId??``}|${e.component?.id??e.injector?.id??e.element?.id??``}`:null});pickedByPage=E({});picked=X(()=>this.pickedByPage()[this.targetPageId()??``]??null);pageOptions=X(()=>{if(this.pageId)return[];let e=this.treePages();return Object.keys(this.graphPages()).map(t=>{let n=e[t];return{value:t,label:n?.title||n?.url||`Page ${t}`,hint:n?.url}})});showInternals=E(!1);sourceSignals=E([]);sourceLoaded=E(!1);sourceFailed=E(!1);graphFailed=E(!1);loadFailed=X(()=>this.sourceFailed()||this.graphFailed());retrying=E(!1);filter=E(``);resources=X(()=>this.graph()?.resources??[]);internalIds=X(()=>new Set(this.resources().flatMap(e=>e.nodeIds)));showFramework=E(!1);frameworkCount=X(()=>{let e=this.internalIds();return(this.graph()?.nodes??[]).filter(t=>t.framework&&!e.has(t.id)).length});visibleNodes=X(()=>{let e=this.internalIds(),t=this.showFramework();return(this.graph()?.nodes??[]).filter(n=>!e.has(n.id)&&(t||!n.framework))});showGraph=E(!0);graphLinks=X(()=>{let e=this.graph();if(!e)return[];let t=new Set(this.visibleNodes().map(e=>e.id)),n=[];for(let r of e.edges){let i=e.nodes[r.producer]?.id,a=e.nodes[r.consumer]?.id;i&&a&&t.has(i)&&t.has(a)&&n.push({producer:i,consumer:a})}return n});graphNodes=X(()=>[...this.visibleNodes()].sort((e,t)=>e.id.localeCompare(t.id,void 0,{numeric:!0})));kindColorOf=e=>this.kindColor(e);watchedIds=X(()=>new Set(this.graph()?.watch?.ids??[]));stacksOn=X(()=>!!this.graph()?.watch?.stacks);watchedNodes=X(()=>{let e=this.watchedIds();return(this.graph()?.nodes??[]).filter(t=>e.has(t.id))});watchedElsewhere=X(()=>this.watchedIds().size-this.watchedNodes().length);watchLog=X(()=>{let e=this.graph()?.history??{};return this.watchedNodes().flatMap(t=>(e[t.id]??[]).filter(e=>e.source!==`initial`).map(e=>({id:t.id,label:t.label??t.id,change:e}))).sort((e,t)=>t.change.at-e.change.at).slice(0,DU)});hasAnySignals=X(()=>this.visibleNodes().length+this.resources().length>0);kindCounts=X(()=>{let e=this.graph()?[...this.visibleNodes().map(e=>e.kind),...this.resources().map(()=>`resource`)]:this.sourceSignals().map(e=>e.kind),t=new Map;for(let n of e)t.set(n,(t.get(n)??0)+1);return[...t].map(([e,t])=>({kind:e,count:t}))});kind=Q({source:this.graphOwner,computation:(e,t)=>{let n=t?.value??null;return n&&Z(this.kindCounts).some(e=>e.kind===n)?n:null}});kindChips=X(()=>{let e=this.kindCounts(),t=this.kind();return t&&!e.some(e=>e.kind===t)?[...e,{kind:t,count:0}]:e});kindTotal=X(()=>this.kindCounts().reduce((e,t)=>e+t.count,0));selectedId=Q({source:this.graphOwner,computation:()=>null});selectedNode=X(()=>this.graph()?.nodes.find(e=>e.id===this.selectedId())??null);jumpedPast=E(null);jumpNote=X(()=>{let e=this.jumpedPast();return!e||this.filter()||this.kind()||this.selectedId()!==e.id?``:`Cleared the filters to show ${e.label}.`});selectedHistory=X(()=>{let e=this.selectedId();return e?[...this.graph()?.history?.[e]??[]].reverse():[]});restoreBlocked=X(()=>{let e=this.rpc();if(yT(e))return`A saved report cannot write to the app.`;let t=this.graph()?.pageId;return _D(t?this.treePages()[t]:null)?`It needs the app open in a browser.`:IT(e,`components`)?``:Uw(`components`)});restoring=E(!1);restoreResult=E(null);restorable(e){let t=this.graph(),n=t?.nodes.find(t=>t.id===e);return n?.locator?n.locator.owner===`service`?t?.injector&&n.locator.id===t.injector.id?n:null:t?.component&&n.locator.id===t.component.id?n:null:null}async restore(e,t,n){let r=this.rpc(),i=this.graph()?.pageId,a=e.locator;if(!r||!i||!a||this.restoring()||this.restoreBlocked())return;this.restoring.set(!0);let o;try{o=await r.scope(`pangular`).rpc.call(`request-signal-restore`,{pageId:i,request:{component:a.id,...a.owner===`service`?{owner:`service`}:{},node:e.id,epoch:t.epoch}})??{}}catch{o={error:`The devtools server did not answer. Try again.`}}this.restoring.set(!1),this.restoreResult.set(o.ok?{id:e.id,text:`Restored ${o.key??a.key} to the value from ${n}.`,error:!1}:{id:e.id,text:o.error??`The page did not restore it.`,error:!0})}diffs=X(()=>{let e=this.selectedId(),t=e?this.graph()?.history?.[e]??[]:[],n=new Map;for(let e=1;e<t.length;e++){let r=t[e-1].value,i=t[e].value;if(!r||!i||typeof r!=`object`||typeof i!=`object`)continue;let a=DV(r,i);a.length&&n.set(t[e].epoch,a)}return n});diffLabel(e){return e===`added`?`added`:e===`removed`?`removed`:`changed`}sourceMatch=X(()=>{let e=this.selectedNode(),t=e?.label;if(!e||!t)return null;let n=t=>t===e.kind||t.startsWith(`${e.kind} `)||t.startsWith(`${e.kind}.`)||e.kind===`signal`&&t.startsWith(`model`)||e.kind===`computed`&&t===`toSignal`,r=this.sourceSignals().filter(e=>e.name===t&&n(e.kind)),i=this.graph(),a=i?.component?.tag??i?.element?.tag,o=a?r.filter(e=>e.component===a):[];return o.length&&(r=o),r.length?r.length===1?{exact:r[0],candidates:[]}:{exact:null,candidates:r.slice(0,5)}:null});writeHint=X(()=>{let e=this.selectedNode(),t=this.graph();if(!e||!t||t.writeHook===!1||e.kind!==`signal`&&e.kind!==`linkedSignal`)return``;if(!e.label)return`This signal has no name, so its history holds sampled values only. From Angular 20.1 the compiler names a signal that initializes a field or variable, so this one was likely made in a factory or helper. Pass a debugName in its options, for example signal(0, { debugName: 'count' }).`;let n=t.history?.[e.id]??[];return n.some(e=>e.source===`write`)||!n.some(e=>e.source===`sample`)?``:`Every change here was sampled. Writes are matched by name, kind, version and value, so another live signal with the same name and value can hide them.`});filteredResources=X(()=>{let e=this.filter().toLowerCase(),t=this.kind();return t&&t!==`resource`?[]:this.resources().filter(t=>!e||t.name.toLowerCase().includes(e)||e.length>=3&&`resource`.startsWith(e))});filteredNodes=X(()=>{let e=this.filter().toLowerCase(),t=this.kind();return this.visibleNodes().filter(n=>(!t||n.kind===t)&&(!e||(n.label??``).toLowerCase().includes(e)||n.kind.toLowerCase().includes(e))).sort((e,t)=>e.id.localeCompare(t.id,void 0,{numeric:!0}))});filteredSourceSignals=X(()=>{let e=this.filter().toLowerCase(),t=this.kind();return this.sourceSignals().filter(n=>(!t||n.kind===t)&&(!e||n.name.toLowerCase().includes(e)||n.kind.toLowerCase().includes(e)||n.file.toLowerCase().includes(e)))});targetPageId=X(()=>this.pageId??(this.shownPageId()||null)??this.graph()?.pageId??this.latestTreePage()?.pageId??null);latestTreePage=X(()=>{let e=null;for(let[t,n]of Object.entries(this.treePages())){let r=n.reportedAt??0;(!e||r>e.reportedAt)&&(e={pageId:t,reportedAt:r})}return e});componentOptions=X(()=>{let e=this.targetPageId(),t=(e?this.treePages()[e]?.roots:void 0)??[],n=[],r=e=>{for(let t of e)n.push(t),r(t.children)};r(t);let i=this.graph()?.environments??[];if(!n.length&&!i.length)return[];let a=new Map;for(let e of n)a.set(e.name,(a.get(e.name)??0)+1);let o=new Map,s=[{value:SU,label:`Follow the routed component`,hint:`automatic`},...i.map(e=>({value:wU+e.id,label:this.injectorLabel(e),hint:`injector`}))];for(let e of n){let t=(o.get(e.name)??0)+1;o.set(e.name,t),s.push({value:e.id,label:(a.get(e.name)??0)>1?`${e.name} #${t}`:e.name,hint:e.kind===`directive`?`<${e.tag}> directive`:`<${e.tag}>`})}return s});pickerValue=X(()=>{let e=this.picked();return e&&this.componentOptions().some(t=>t.value===e)?e:SU});constructor(){ac(()=>{let e=this.rpc();e&&(this.loadSignalGraph(e),this.loadSourceSignals(e))}),ac(()=>{let e=this.focus();e&&Z(()=>this.showComponent(e))}),ac(()=>{let e=this.focusedSignal(),t=this.graph();if(!e||t?.component?.id!==e.componentId)return;let n=t.nodes.find(t=>t.locator?.id===e.componentId&&t.locator.key===e.key);Z(()=>{this.focusedSignal.set(null),n&&this.jumpTo(n)})}),this.destroyRef.onDestroy(()=>{for(let e of this.cleanups.splice(0))e()})}async loadSignalGraph(e){for(let e of this.cleanups.splice(0))e();let t=++this.graphLoad,n=()=>this.destroyRef.destroyed||t!==this.graphLoad,r=e.scope(`pangular`);try{let e=await r.rpc.sharedState(`signal-graph`);if(n())return;this.graphFailed.set(!1);let t=e=>{let t=e,n=t?.pages&&typeof t.pages==`object`?t.pages:{},r={graph:t?.graph??null,pages:n};this.notePageGone(CU(r)),this.graphState.set(r),e!==void 0&&this.graphKnown.set(!0)};t(e.value()),this.cleanups.push(e.on(`updated`,t))}catch{if(n())return;this.graphState.set({graph:null,pages:{}}),this.graphKnown.set(!0),this.graphFailed.set(!0)}try{let e=await r.rpc.sharedState(`component-tree`);if(n())return;let t=e=>{let t=e?.pages;this.treePages.set(t&&typeof t==`object`?t:{})};t(e.value()),this.cleanups.push(e.on(`updated`,t))}catch{n()||this.treePages.set({})}}notePageGone(e){let t=Object.keys(this.graphPages()).filter(t=>!e[t]);t.length&&this.pickedByPage.update(e=>{let n={...e};for(let e of t)delete n[e];return n});let n=this.chosenPageId();if(!n||e[n])return;let r=this.pageOptions().find(e=>e.value===n)?.label??`The chosen page`;this.chosenPageId.set(null),this.announcement.set(`${r} closed, so this shows another page.`)}selectPage(e){if(!e||e===this.shownPageId())return;this.chosenPageId.set(e);let t=this.pageOptions().find(t=>t.value===e)?.label??e;this.announcement.set(`Showing the signal graph of ${t}.`)}showComponent(e){e.pageId&&!this.pageId&&this.graphPages()[e.pageId]&&this.chosenPageId.set(e.pageId),this.focusedSignal.set(e.key?{componentId:e.componentId,key:e.key}:null),this.pickComponent(e.componentId,this.pageId??e.pageId)}pickComponent(e,t){let n=e&&e!==SU?e:null,r=t??this.targetPageId()??void 0;this.pickedByPage.update(e=>{let t={...e};return n?t[r??``]=n:delete t[r??``],t});let i=this.rpc();if(!i)return;let a=n?.startsWith(wU)?{pageId:r,env:n.slice(4)}:{pageId:r,id:n};i.scope(`pangular`).rpc.call(`select-signal-target`,a).catch(()=>{})}injectorLabel(e){return e.name===`Root`?`Root services`:e.name}sourceNote(e){return OU[e]}async loadSourceSignals(e){let t=e.scope(`pangular`);try{let e=await t.rpc.call(`get-signals`);this.sourceSignals.set(e),this.sourceFailed.set(!1)}catch{this.sourceFailed.set(!0)}finally{this.sourceLoaded.set(!0)}}async retry(){let e=this.rpc();if(!e||this.retrying())return;let t=document.activeElement;this.retrying.set(!0);try{await Promise.all([this.loadSignalGraph(e),this.loadSourceSignals(e)])}finally{this.retrying.set(!1)}this.destroyRef.destroyed||ed(()=>{(!t?.isConnected||document.activeElement===document.body)&&this.filterInput()?.focus()},{injector:this.injector})}clearFilters(){this.resetFilters(),this.filterInput()?.focus()}resetFilters(){this.filter.set(``),this.kind.set(null)}select(e){this.selectedId.set(this.selectedId()===e?null:e),this.showInternals.set(!1)}selectFromGraph(e){this.selectedId.set(e),this.showInternals.set(!1)}plural(e,t){return`${e} ${t}${e===1?``:`s`}`}isWatchable(e){return EU.has(e.kind)}toggleWatch(e){let t=!this.watchedIds().has(e.id),n=e.label??`the unnamed signal`;this.sendWatch({id:e.id,watch:t}),this.announcement.set(t?`Watching ${n}. Its changes also log to the page console.`:`Stopped watching ${n}.`)}toggleStacks(){let e=!this.stacksOn();this.sendWatch({stacks:e}),this.announcement.set(e?`Recording write stacks.`:`Stopped recording write stacks.`)}sendWatch(e){let t=this.rpc(),n=this.graph()?.pageId??this.targetPageId()??void 0;t&&t.scope(`pangular`).rpc.call(`set-signal-watch`,{...e,pageId:n}).catch(()=>{})}jumpTo(e){let t=this.resources().find(t=>t.nodeIds.includes(e.id)),n=t?.id??e.id,r=t?!this.filteredResources().some(e=>e.id===n):!this.filteredNodes().some(e=>e.id===n);r&&this.resetFilters(),this.jumpedPast.set(r?{id:n,label:t?.name??e.label??e.id}:null),this.selectedId.set(n),this.showInternals.set(!!t),ed(()=>{let e=[...this.host.nativeElement.querySelectorAll(`.node-card[data-card]`)].find(e=>e.dataset.card===n);e?.scrollIntoView?.({block:`nearest`}),e?.focus({preventScroll:!0})},{injector:this.injector})}changeCount(e){let t=this.graph(),n=t?.nodes.find(t=>t.id===e)?.changes??t?.resources?.find(t=>t.id===e)?.changes;return n===void 0?(t?.history?.[e]??[]).reduce((e,t)=>e+(t.source===`initial`?0:1+(t.missed??0)),0):n}historySummary(e){let t=this.changeCount(e),n=this.graph()?.history?.[e]?.length??0;return t?`${`${t} ${t===1?`change`:`changes`} recorded`}${n>=TU&&t>=n?`, showing the last ${n}`:``}, newest first.`:`No changes recorded yet. The entry below is the value seen first.`}statusTone(e){return AU[e]??`neutral`}internalsOf(e){let t=new Set(e.nodeIds);return(this.graph()?.nodes??[]).filter(e=>t.has(e.id))}sourceLabel(e){return kU[e]}kindColor(e){return`var(--kind-${jU[e]??`unknown`})`}relations=X(()=>{let e=new Map,t=this.graph();if(!t)return e;for(let n of t.nodes)e.set(n.id,{deps:[],consumers:[]});for(let n of t.edges){let r=t.nodes[n.producer],i=t.nodes[n.consumer];r&&i&&(e.get(i.id)?.deps.push(r),e.get(r.id)?.consumers.push(i))}return e});getDependencies(e){return this.relations().get(e.id)?.deps??[]}getConsumers(e){return this.relations().get(e.id)?.consumers??[]}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-signal-inspector`]],viewQuery:function(e,t){e&1&&Dg(t.filterInput,OV,5),e&2&&Og()},inputs:{rpc:[1,`rpc`],focus:[1,`focus`]},decls:32,vars:19,consts:[[`filterInput`,``],[`historyTpl`,``],[1,`toolbar`],[`placeholder`,`Filter by name or kind`,`saveKey`,`signals`,3,`valueChange`,`value`],[1,`picker`,`page-picker`],[1,`picker`],[`role`,`status`,1,`sr-only`],[1,`showing`],[`role`,`status`,1,`fallback`],[1,`intro`],[`capability`,`signalGraph`,`compact`,``,3,`page`,`missing`],[`role`,`group`,`aria-label`,`Filter by kind`,1,`kinds`],[`role`,`status`,1,`empty`],[`role`,`alert`,1,`empty`,3,`compact`],[1,`empty`],[`aria-labelledby`,`signal-graph-heading`,1,`graph-section`],[`aria-labelledby`,`signal-watched-heading`,1,`watched`],[`role`,`status`,1,`jump-note`],[`id`,`signals-page-label`,1,`label-key`],[`labelledBy`,`signals-page-label`,3,`valueChange`,`options`,`value`],[`id`,`signals-component-label`,1,`label-key`],[`labelledBy`,`signals-component-label`,3,`valueChange`,`options`,`value`],[1,`showing-name`],[1,`mono`],[1,`source-note`],[`type`,`button`,1,`kind-chip`,3,`click`],[1,`count`],[`type`,`button`,1,`kind-chip`,3,`active`],[`aria-hidden`,`true`,1,`dot`],[1,`chip-text`],[`aria-hidden`,`true`,1,`spinner`],[1,`empty-title`],[`role`,`alert`,1,`empty`],[1,`hint`],[`type`,`button`,1,`reset`,3,`click`],[1,`source-label`],[1,`nodes`],[1,`node-card`],[`role`,`status`,1,`empty`,`compact`],[1,`node-header`],[1,`kind-badge`],[1,`node-label`],[1,`node-meta`],[1,`file`,3,`file`,`line`],[`aria-hidden`,`true`,1,`sep`],[3,`id`],[1,`history-summary`],[`tabindex`,`0`,1,`history`,`scroll-box`],[`role`,`status`,1,`restore-result`],[1,`history-meta`],[1,`source-tag`],[1,`missed`],[`type`,`button`,1,`restore`],[1,`diff`],[`aria-label`,`Written from`,1,`stack`],[`type`,`button`,1,`restore`,3,`click`],[1,`diff-list`],[3,`class`],[1,`diff-kind`],[1,`sr-only`],[1,`diff-path`],[1,`diff-old`],[1,`diff-new`],[`aria-hidden`,`true`],[1,`section-head`],[`id`,`signal-graph-heading`,1,`list-heading`],[1,`section-actions`],[`type`,`button`,1,`toggle`],[`type`,`button`,1,`toggle`,3,`click`],[`type`,`button`,`aria-controls`,`signal-graph-body`,1,`toggle`,3,`click`],[1,`hint`,`graph-hint`],[`id`,`signal-graph-body`],[3,`nodes`,`links`,`selectedId`,`watched`,`kindColor`],[1,`graph-selection`],[3,`selected`,`nodes`,`links`,`selectedId`,`watched`,`kindColor`],[1,`rel-label`],[`type`,`button`,1,`link-button`,3,`click`],[`id`,`signal-watched-heading`,1,`list-heading`],[1,`watched-list`],[1,`watched-value`],[1,`changed-badge`],[`id`,`signal-watch-log-heading`,1,`sub-heading`],[`role`,`log`,`tabindex`,`0`,`aria-labelledby`,`signal-watch-log-heading`,1,`watch-log`,`scroll-box`],[1,`history`],[1,`list-heading`],[`role`,`list`,1,`nodes`,`resources`],[`type`,`button`,1,`node-card`,3,`click`],[1,`status-tag`,3,`class`],[`aria-hidden`,`true`,1,`chevron`],[1,`node-value`],[1,`detail-panel`,3,`id`],[1,`status-tag`],[1,`detail-title`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`type`,`button`,1,`reset`,`internals-toggle`,3,`click`],[`role`,`region`,`tabindex`,`0`,1,`scroll-box`],[1,`kind-badge`,`sm`],[`role`,`list`,`appRovingList`,`button.node-card`,1,`nodes`],[1,`empty`,`compact`],[1,`watching-badge`],[1,`framework-badge`],[1,`source-matches`],[3,`file`,`line`],[1,`hint-inline`],[1,`source-candidates`],[`type`,`button`,1,`rel-link`,3,`click`],[`type`,`button`,1,`reset`,`watch-toggle`,3,`click`],[`type`,`button`,1,`reset`]],template:function(e,t){if(e&1){let e=B();F(0,`div`,2)(1,`app-search-field`,3,0),S_(`valueChange`,function(n){return C(e),x_(t.filter,n)||(t.filter=n),w(n)}),I(),A(3,RV,4,2,`div`,4),A(4,zV,4,2,`div`,5),I(),F(5,`p`,6),K(6),I(),A(7,VV,6,3,`p`,7)(8,HV,5,1,`p`,7)(9,UV,7,2,`p`,7),A(10,WV,2,0,`p`,8),F(11,`p`,9),A(12,GV,1,0)(13,KV,1,0)(14,qV,1,0)(15,JV,1,0),I(),A(16,YV,2,2,`app-angular-unavailable`,10),A(17,XV,2,0,`p`,8),A(18,ZV,2,2,`p`,8),A(19,$V,7,4,`div`,11),A(20,eH,4,0,`div`,12),A(21,tH,7,4,`div`,13)(22,nH,14,0,`div`,14),A(23,oH,6,1),Eh(24,bH,1,1,`ng-template`,null,1,G_),A(26,DH,12,6,`section`,15),A(27,IH,8,2,`section`,16),F(28,`p`,17),K(29),I(),A(30,ZH,5,0),A(31,xU,6,1)}if(e&2){let e,n;D(),b_(`value`,t.filter),D(2),j(t.pageOptions().length>1?3:-1),D(),j(t.componentOptions().length?4:-1),D(2),q(t.announcement()),D(),j((e=t.graph()?.component)?7:(e=t.graph()?.injector)?8:(e=t.graph()?.element)?9:-1,e),D(3),j(t.graph()&&t.picked()&&t.graph().source!==`selected`?10:-1),D(2),j(t.graph()?.injector?12:t.graph()?13:t.graphKnown()?15:14),D(4),j(t.graph()?-1:16),D(),j(t.graph()?.writeHook===!1?17:-1),D(),j((n=t.graph()?.nodeCount)?18:-1,n),D(),j(t.kindChips().length?19:-1),D(),j(!t.graph()&&!t.sourceLoaded()?20:-1),D(),j(!t.graph()&&t.sourceLoaded()&&t.loadFailed()?21:!t.graph()&&t.sourceLoaded()&&t.sourceSignals().length===0?22:-1),D(2),j(!t.graph()&&t.sourceSignals().length>0?23:-1),D(3),j(t.graph()&&(t.visibleNodes().length||t.frameworkCount())?26:-1),D(),j(t.watchedNodes().length||t.watchedElsewhere()?27:-1),D(2),q(t.jumpNote()),D(),j(t.graph()&&t.filteredResources().length?30:-1),D(),j(t.graph()&&(t.visibleNodes().length||!t.filteredResources().length)?31:-1)}},dependencies:[nP,hD,Vv,iV,OD,SV,Cj,Hv,Uv],styles:[`[_nghost-%COMP%] { +}`]})},OV=8,kV=e=>!!e&&typeof e==`object`&&!Array.isArray(e);function AV(e,t){return/^[A-Za-z_$][\w$]*$/.test(t)?e?`${e}.${t}`:t:`${e}[${JSON.stringify(t)}]`}function jV(e,t){if(Object.is(e,t))return!0;if(!e||!t||typeof e!=`object`||typeof t!=`object`)return!1;try{return JSON.stringify(e)===JSON.stringify(t)}catch{return!1}}function MV(e,t){let n=[],r=0,i=e=>{n.length<50?n.push(e):r++},a=(e,t,n,r)=>{if(!jV(e,t)){if(r<OV&&Array.isArray(e)&&Array.isArray(t)){let o=Math.max(e.length,t.length);for(let s=0;s<o;s++){let o=`${n}[${s}]`;s>=e.length?i({path:o,kind:`added`,after:t[s]}):s>=t.length?i({path:o,kind:`removed`,before:e[s]}):a(e[s],t[s],o,r+1)}return}if(r<OV&&kV(e)&&kV(t)){for(let o of Object.keys(e)){let s=AV(n,o);o in t?a(e[o],t[o],s,r+1):i({path:s,kind:`removed`,before:e[o]})}for(let r of Object.keys(t))r in e||i({path:AV(n,r),kind:`added`,after:t[r]});return}i({path:n||`(value)`,kind:`changed`,before:e,after:t})}};return a(e,t,``,0),r&&n.push({path:`…`,kind:`changed`,after:`${r} more changes`}),n}var NV=[`filterInput`],PV=e=>({id:e,label:`Status history`}),FV=e=>({id:e,label:`Value history`}),IV=(e,t)=>t.kind,LV=(e,t)=>t.name+t.file+t.line,RV=(e,t)=>t.epoch,zV=(e,t)=>t.path,BV=(e,t)=>t.id,VV=(e,t)=>t.id+`:`+t.change.epoch,HV=(e,t)=>t.file+t.line;function UV(e,t){if(e&1){let e=B();F(0,`div`,4)(1,`span`,18),K(2,`Page`),I(),F(3,`app-select`,19),H(`valueChange`,function(t){return C(e),w(W().selectPage(t))}),I()()}if(e&2){let e=W();D(3),P(`options`,e.pageOptions())(`value`,e.shownPageId())}}function WV(e,t){if(e&1){let e=B();F(0,`div`,5)(1,`span`,20),K(2,`Graph of`),I(),F(3,`app-select`,21),H(`valueChange`,function(t){return C(e),w(W().pickComponent(t))}),I()()}if(e&2){let e=W();D(3),P(`options`,e.componentOptions())(`value`,e.pickerValue())}}function GV(e,t){if(e&1&&(F(0,`span`,24),K(1),I()),e&2){let e=W(2);D(),q(e.sourceNote(e.graph().source))}}function KV(e,t){if(e&1&&(F(0,`p`,7)(1,`span`,22),K(2),I(),F(3,`span`,23),K(4),I(),A(5,GV,2,1,`span`,24),I()),e&2){let e=t,n=W();D(2),q(e.name),D(2),q(e.path),D(),j(n.graph().source?5:-1)}}function qV(e,t){if(e&1&&(F(0,`p`,7)(1,`span`,22),K(2),I(),F(3,`span`,24),K(4,`environment injector`),I()()),e&2){let e=W();D(2),q(e.injectorLabel(t))}}function JV(e,t){if(e&1&&(F(0,`p`,7)(1,`span`,22),K(2),I(),F(3,`span`,23),K(4),I(),F(5,`span`,24),K(6,`directives, no component`),I()()),e&2){let e=t;D(2),q(e.directives.join(`, `)||`<`+e.tag+`>`),D(2),J(`<`,e.tag,`>`)}}function YV(e,t){e&1&&(F(0,`p`,8),K(1,` The picked component or injector is gone or has no signal graph, so this shows another one. `),I())}function XV(e,t){e&1&&K(0,` The effects registered on this injector and the signals they read. A signal that no effect reads is not part of the graph. Pick a kind to filter. `)}function ZV(e,t){e&1&&K(0,` The live signal graph of one component. Only signals that its template or an effect has read appear here; a signal nothing has read yet is not part of the graph. Pick a kind to filter. `)}function QV(e,t){e&1&&K(0,` Loading the live signal graph… `)}function $V(e,t){e&1&&K(0,` Every signal, computed and effect found in your source. Pick a kind to filter. `)}function eH(e,t){if(e&1&&(F(0,`app-angular-unavailable`,10),K(1,` This list comes from a source scan. `),I()),e&2){let e=W();P(`page`,e.angularPage())(`missing`,e.unsupported())}}function tH(e,t){e&1&&(F(0,`p`,8),K(1,` The signal write hook did not load. Value history shows sampled values only, with no exact set entries. `),I())}function nH(e,t){if(e&1&&(F(0,`p`,8),K(1),I()),e&2){let e=W();D(),Y(` Showing `,e.graph().nodes.length,` of `,t,` signals. The rest and their edges are left out. `)}}function rH(e,t){if(e&1){let e=B();F(0,`button`,25),H(`click`,function(){let t=C(e).$implicit,n=W(2);return w(n.kind.set(n.kind()===t.kind?null:t.kind))}),L(1,`span`,28),F(2,`span`,29),K(3),I(),F(4,`span`,26),K(5),I()()}if(e&2){let e=t.$implicit,n=W(2);G(`active`,n.kind()===e.kind),k(`aria-pressed`,n.kind()===e.kind),D(),Zg(`background`,n.kindColor(e.kind)),D(2),q(e.kind),D(2),q(e.count)}}function iH(e,t){if(e&1){let e=B();F(0,`div`,11)(1,`button`,25),H(`click`,function(){return C(e),w(W().kind.set(null))}),K(2,` All `),F(3,`span`,26),K(4),I()(),M(5,rH,6,7,`button`,27,IV),I()}if(e&2){let e=W();D(),G(`active`,!e.kind()),k(`aria-pressed`,!e.kind()),D(3),q(e.kindTotal()),D(),N(e.kindChips())}}function aH(e,t){e&1&&(F(0,`div`,12),L(1,`span`,30),F(2,`p`,31),K(3,`Scanning source for signals…`),I()())}function oH(e,t){if(e&1){let e=B();F(0,`div`,32)(1,`p`,31),K(2,`Couldn't load signals`),I(),F(3,`p`,33),K(4,` The devtools server did not answer. Check that it is still running, then retry. `),I(),F(5,`button`,34),H(`click`,function(){return C(e),w(W().retry())}),K(6),I()()}if(e&2){let e=W();G(`compact`,e.sourceSignals().length>0),D(5),k(`aria-disabled`,e.retrying()||null),D(),J(` `,e.retrying()?`Retrying…`:`Retry`,` `)}}function sH(e,t){e&1&&(F(0,`div`,14)(1,`p`,31),K(2,`No signals found.`),I(),F(3,`p`,33),K(4,` No `),F(5,`code`),K(6,`signal()`),I(),K(7,`, `),F(8,`code`),K(9,`computed()`),I(),K(10,` or `),F(11,`code`),K(12,`effect()`),I(),K(13,` calls were found in your source. To see the live graph, run Angular 20.1 or later with the overlay connected and select a component. `),I()())}function cH(e,t){if(e&1&&(F(0,`span`,44),K(1,`·`),I(),F(2,`span`),K(3),I()),e&2){let e=W().$implicit;D(3),J(`in <`,e.component,`>`)}}function lH(e,t){if(e&1&&(F(0,`div`,37)(1,`div`,39)(2,`span`,40),K(3),I(),F(4,`span`,41),K(5),I()(),F(6,`div`,42),L(7,`app-source-link`,43),A(8,cH,4,1),I()()),e&2){let e=t.$implicit,n=W(2);D(2),Zg(`background`,n.kindColor(e.kind)),D(),q(e.kind),D(2),q(e.name),D(2),P(`file`,e.file)(`line`,e.line),D(),j(e.component?8:-1)}}function uH(e,t){if(e&1){let e=B();F(0,`div`,38)(1,`p`,31),K(2,`No signals match.`),I(),F(3,`p`,33),K(4,`Try a different name or kind.`),I(),F(5,`button`,34),H(`click`,function(){return C(e),w(W(2).clearFilters())}),K(6,`Clear filters`),I()()}}function dH(e,t){if(e&1&&(F(0,`p`,35),K(1,`Signals from the source scan:`),I(),F(2,`div`,36),M(3,lH,9,7,`div`,37,LV,!1,uH,7,0,`div`,38),I()),e&2){let e=W();D(3),N(e.filteredSourceSignals())}}function fH(e,t){e&1&&(F(0,`p`,33),K(1),I()),e&2&&(D(),J(`Restore is off. `,t))}function pH(e,t){if(e&1&&(A(0,fH,2,1,`p`,33),F(1,`p`,48),K(2),I()),e&2){let e,t=W(2).id,n=W();j((e=n.restoreBlocked())?0:-1,e),D(),G(`has-text`,n.restoreResult()?.id===t)(`restore-error`,n.restoreResult()?.id===t&&n.restoreResult()?.error),D(),J(` `,n.restoreResult()?.id===t?n.restoreResult()?.text:``,` `)}}function mH(e,t){if(e&1&&(F(0,`span`,51),K(1),I()),e&2){let e=W().$implicit;D(),J(``,e.missed,` earlier not captured`)}}function hH(e,t){if(e&1){let e=B();E_(0),U_(1,`date`),F(2,`button`,55),H(`click`,function(){C(e);let t=O_(0),n=W().$implicit;W();let r=O_(4);return w(W(2).restore(r,n,t??``))}),K(3,` Restore `),I()}if(e&2){let e=W().$implicit,t=W(3),n=D_(G_(1,2,e.at,`HH:mm:ss.SSS`));D(2),k(`aria-label`,`Restore value from `+n)(`aria-disabled`,t.restoring()||null)}}function gH(e,t){if(e&1&&(F(0,`code`,61),K(1),U_(2,`json`),I()),e&2){let e=W().$implicit;D(),q(W_(2,1,e.before))}}function _H(e,t){e&1&&(F(0,`span`,59),K(1,`to`),I(),F(2,`span`,63),K(3,`→`),I())}function vH(e,t){if(e&1&&(F(0,`code`,62),K(1),U_(2,`json`),I()),e&2){let e=W().$implicit;D(),q(W_(2,1,e.after))}}function yH(e,t){if(e&1&&(F(0,`li`)(1,`span`,58),K(2),I(),F(3,`span`,59),K(4,`: `),I(),F(5,`code`,60),K(6),I(),F(7,`span`,59),K(8,`, `),I(),A(9,gH,3,3,`code`,61),A(10,_H,4,0),A(11,vH,3,3,`code`,62),I()),e&2){let e=t.$implicit,n=W(5);Qg(`diff-`+e.kind),D(2),q(n.diffLabel(e.kind)),D(4),q(e.path),D(3),j(e.kind===`added`?-1:9),D(),j(e.kind===`changed`?10:-1),D(),j(e.kind===`removed`?-1:11)}}function bH(e,t){if(e&1&&(F(0,`details`,53)(1,`summary`),K(2),I(),F(3,`ul`,56),M(4,yH,12,7,`li`,57,zV),I()()),e&2){let e=t;D(2),J(`Changes from the entry before (`,e.length,`)`),D(2),N(e)}}function xH(e,t){if(e&1&&(F(0,`li`),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function SH(e,t){if(e&1&&(F(0,`ol`,54),M(1,xH,2,1,`li`,null,Yh),I()),e&2){let e=W().$implicit;D(),N(e.stack)}}function CH(e,t){if(e&1&&(F(0,`li`)(1,`span`,49)(2,`time`),K(3),U_(4,`date`),I(),F(5,`span`,50),K(6),I(),F(7,`span`),K(8),I(),A(9,mH,2,1,`span`,51),A(10,hH,4,6,`button`,52),I(),F(11,`pre`),K(12),U_(13,`json`),I(),A(14,bH,6,1,`details`,53),A(15,SH,3,0,`ol`,54),I()),e&2){let e,n=t.$implicit,r=t.$index;W();let i=O_(4),a=W(2);D(3),q(G_(4,10,n.at,`HH:mm:ss.SSS`)),D(2),Qg(`source-`+n.source),D(),q(a.sourceLabel(n.source)),D(2),J(`epoch `,n.epoch),D(),j(n.missed?9:-1),D(),j(i&&!a.restoreBlocked()&&r!==0?10:-1),D(2),q(W_(13,13,n.value)),D(2),j((e=a.diffs().get(n.epoch))?14:-1,e),D(),j(n.stack?.length?15:-1)}}function wH(e,t){if(e&1&&(F(0,`h4`,45),K(1),I(),F(2,`p`,46),K(3),I(),E_(4),A(5,pH,3,6),F(6,`ol`,47),M(7,CH,16,15,`li`,null,RV),I()),e&2){let e=W(),t=e.id,n=e.label,r=W();P(`id`,`history-heading-`+t),D(),q(n),D(2),q(r.historySummary(t)),D();let i=D_(r.restorable(t));D(),j(i?5:-1),D(),k(`aria-labelledby`,`history-heading-`+t),D(),N(r.selectedHistory())}}function TH(e,t){e&1&&A(0,wH,9,6),e&2&&j(W().selectedHistory().length?0:-1)}function EH(e,t){if(e&1){let e=B();F(0,`button`,68),H(`click`,function(){C(e);let t=W(2);return w(t.showFramework.set(!t.showFramework()))}),K(1,` Show framework signals `),F(2,`span`,26),K(3),I()()}if(e&2){let e=W(2);k(`aria-pressed`,e.showFramework()),D(3),Y(``,t,` `,e.showFramework()?`shown`:`hidden`)}}function DH(e,t){e&1&&(F(0,`p`,70),K(1,` Write stacks are on for this page. Each set of a named signal keeps the first 3 app frames of the code that wrote it, shown in its value history. Taking a stack slows every write, so turn it off when you are done. `),I())}function OH(e,t){if(e&1){let e=B();F(0,`app-signal-graph-view`,74),H(`selected`,function(t){return C(e),w(W(3).selectFromGraph(t))}),I()}if(e&2){let e=W(3);P(`nodes`,e.graphNodes())(`links`,e.graphLinks())(`selectedId`,e.selectedId())(`watched`,e.watchedIds())(`kindColor`,e.kindColorOf)}}function kH(e,t){e&1&&(F(0,`p`,70),K(1,` Every signal in this graph was created by Angular. Show framework signals to see them. `),I())}function AH(e,t){if(e&1){let e=B();F(0,`p`,73)(1,`span`),K(2,`Selected`),I(),F(3,`span`,75),K(4),I(),F(5,`span`,44),K(6,`·`),I(),F(7,`span`),K(8),I(),F(9,`span`,44),K(10,`·`),I(),F(11,`span`),K(12),I(),F(13,`button`,76),H(`click`,function(){let t=C(e);return w(W(3).jumpTo(t))}),K(14,` Show details `),I()()}if(e&2){let e=t,n=W(3);D(4),q(e.label??`(unnamed)`),D(4),q(n.plural(n.getDependencies(e).length,`producer`)),D(4),q(n.plural(n.getConsumers(e).length,`consumer`))}}function jH(e,t){if(e&1&&(F(0,`div`,71),A(1,OH,1,5,`app-signal-graph-view`,72)(2,kH,2,0,`p`,70),A(3,AH,15,3,`p`,73),I()),e&2){let e,t=W(2);D(),j(t.graphNodes().length?1:2),D(2),j((e=t.selectedNode())?3:-1,e)}}function MH(e,t){if(e&1){let e=B();F(0,`section`,15)(1,`div`,64)(2,`h2`,65),K(3,`Graph`),I(),F(4,`div`,66),A(5,EH,4,3,`button`,67),F(6,`button`,68),H(`click`,function(){return C(e),w(W().toggleStacks())}),K(7,` Record write stacks `),I(),F(8,`button`,69),H(`click`,function(){C(e);let t=W();return w(t.showGraph.set(!t.showGraph()))}),K(9),I()()(),A(10,DH,2,0,`p`,70),A(11,jH,4,2,`div`,71),I()}if(e&2){let e,t=W();D(5),j((e=t.frameworkCount())?5:-1,e),D(),k(`aria-pressed`,t.stacksOn()),D(2),k(`aria-expanded`,t.showGraph()),D(),J(` `,t.showGraph()?`Hide graph`:`Show graph`,` `),D(),j(t.stacksOn()?10:-1),D(),j(t.showGraph()?11:-1)}}function NH(e,t){if(e&1&&(F(0,`p`,33),K(1),I()),e&2){let e=t;D(),Y(` `,e,` watched `,e===1?`signal is`:`signals are`,` not in this graph. Their changes still log to the page console. `)}}function PH(e,t){if(e&1&&(F(0,`span`,79),K(1),U_(2,`json`),I()),e&2){let e=W().$implicit;D(),q(W_(2,1,e.value))}}function FH(e,t){if(e&1&&(F(0,`span`,80),K(1),I()),e&2){let e=t;D(),Y(``,e,` `,e===1?`change`:`changes`)}}function IH(e,t){if(e&1){let e=B();F(0,`li`)(1,`span`,75),K(2),I(),A(3,PH,3,3,`span`,79),A(4,FH,2,2,`span`,80),F(5,`button`,76),H(`click`,function(){let t=C(e).$implicit;return w(W(2).toggleWatch(t))}),K(6,` Stop watching `),I()()}if(e&2){let e,n=t.$implicit,r=W(2);D(2),q(n.label??`(unnamed)`),D(),j(n.value===void 0?-1:3),D(),j((e=r.changeCount(n.id))?4:-1,e),D(),k(`aria-label`,`Stop watching `+(n.label??`the unnamed signal`))}}function LH(e,t){if(e&1&&(F(0,`li`),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function RH(e,t){if(e&1&&(F(0,`ol`,54),M(1,LH,2,1,`li`,null,Yh),I()),e&2){let e=W().$implicit;D(),N(e.change.stack)}}function zH(e,t){if(e&1&&(F(0,`li`)(1,`span`,49)(2,`time`),K(3),U_(4,`date`),I(),F(5,`span`,75),K(6),I(),F(7,`span`,50),K(8),I()(),F(9,`pre`),K(10),U_(11,`json`),I(),A(12,RH,3,0,`ol`,54),I()),e&2){let e=t.$implicit,n=W(3);D(3),q(G_(4,7,e.change.at,`HH:mm:ss.SSS`)),D(3),q(e.label),D(),Qg(`source-`+e.change.source),D(),q(n.sourceLabel(e.change.source)),D(2),q(W_(11,10,e.change.value)),D(2),j(e.change.stack?.length?12:-1)}}function BH(e,t){if(e&1&&(F(0,`h3`,81),K(1,`Recent changes`),I(),F(2,`div`,82)(3,`ol`,83),M(4,zH,13,12,`li`,null,VV),I()()),e&2){let e=W(2);D(4),N(e.watchLog())}}function VH(e,t){if(e&1&&(F(0,`section`,16)(1,`h2`,77),K(2,`Watched`),I(),A(3,NH,2,2,`p`,33),F(4,`ul`,78),M(5,IH,7,4,`li`,null,BV),I(),A(7,BH,6,0),I()),e&2){let e,t=W();D(3),j((e=t.watchedElsewhere())?3:-1,e),D(2),N(t.watchedNodes()),D(2),j(t.watchLog().length?7:-1)}}function HH(e,t){if(e&1&&(F(0,`span`,91),K(1),I()),e&2){let e=W().$implicit;Qg(`tone-`+W(2).statusTone(e.status)),D(),q(e.status)}}function UH(e,t){if(e&1&&(F(0,`span`,80),K(1),I()),e&2){let e=t;D(),Y(``,e,` `,e===1?`change`:`changes`)}}function WH(e,t){if(e&1&&(F(0,`span`,89),K(1),U_(2,`json`),I()),e&2){let e=W().$implicit;D(),q(W_(2,1,e.error))}}function GH(e,t){if(e&1&&(F(0,`span`,89),K(1),U_(2,`json`),I()),e&2){let e=W().$implicit;D(),q(W_(2,1,e.value))}}function KH(e,t){e&1&&(F(0,`p`,33),K(1,` This resource has no name. Pass `),F(2,`code`),K(3,`debugName`),I(),K(4,` to `),F(5,`code`),K(6,`resource()`),I(),K(7,` or `),F(8,`code`),K(9,`httpResource()`),I(),K(10,` to name it here. `),I())}function qH(e,t){if(e&1&&(F(0,`dt`),K(1,`Loading`),I(),F(2,`dd`),K(3),I()),e&2){let e=W(2).$implicit;D(3),q(e.isLoading?`yes`:`no`)}}function JH(e,t){if(e&1&&(F(0,`dt`),K(1,`HTTP status`),I(),F(2,`dd`),K(3),I()),e&2){let e=W(2).$implicit;D(3),q(e.statusCode)}}function YH(e,t){if(e&1&&(F(0,`dt`),K(1,`Params`),I(),F(2,`dd`)(3,`pre`,95),K(4),U_(5,`json`),I()()),e&2){let e=W(2).$implicit;D(3),k(`aria-label`,`Params of `+e.name),D(),q(W_(5,2,e.params))}}function XH(e,t){if(e&1&&(F(0,`dt`),K(1,`Value`),I(),F(2,`dd`)(3,`pre`,95),K(4),U_(5,`json`),I()()),e&2){let e=W(2).$implicit;D(3),k(`aria-label`,`Value of `+e.name),D(),q(W_(5,2,e.value))}}function ZH(e,t){if(e&1&&(F(0,`dt`),K(1,`Error`),I(),F(2,`dd`)(3,`pre`,95),K(4),U_(5,`json`),I()()),e&2){let e=W(2).$implicit;D(3),k(`aria-label`,`Error of `+e.name),D(),q(W_(5,2,e.error))}}function QH(e,t){if(e&1&&(F(0,`li`)(1,`span`,96),K(2),I(),F(3,`span`,75),K(4),I()()),e&2){let e=t.$implicit,n=W(5);D(),Zg(`background`,n.kindColor(e.kind)),D(),q(e.kind),D(2),q(e.label??e.id)}}function $H(e,t){if(e&1&&(F(0,`ul`,45),M(1,QH,5,4,`li`,null,BV),I()),e&2){let e=W(2).$implicit,t=W(2);P(`id`,`resource-internals-`+e.id),D(),N(t.internalsOf(e))}}function eU(e,t){if(e&1){let e=B();F(0,`div`,90)(1,`h3`,92),K(2),I(),A(3,KH,11,0,`p`,33),F(4,`dl`)(5,`dt`),K(6,`Status`),I(),F(7,`dd`),K(8),I(),A(9,qH,4,1),A(10,JH,4,1),A(11,YH,6,4),A(12,XH,6,4),A(13,ZH,6,4),I(),dg(14,93),F(15,`button`,94),H(`click`,function(){C(e);let t=W(3);return w(t.showInternals.set(!t.showInternals()))}),K(16),I(),A(17,$H,3,1,`ul`,45),I()}if(e&2){let e=W().$implicit,t=W(2),n=Ag(25);P(`id`,`signal-detail-`+e.id),D(2),q(e.name),D(),j(e.named?-1:3),D(5),q(e.status??`unknown`),D(),j(e.isLoading===void 0?-1:9),D(),j(e.statusCode===void 0?-1:10),D(),j(e.params===void 0?-1:11),D(),j(e.value===void 0?-1:12),D(),j(e.error===void 0?-1:13),D(),P(`ngTemplateOutlet`,n)(`ngTemplateOutletContext`,R_(16,PV,e.id)),D(),k(`aria-expanded`,t.showInternals())(`aria-controls`,`resource-internals-`+e.id),D(),Y(` `,t.showInternals()?`Hide`:`Show`,` internal signals (`,e.nodeIds.length,`) `),D(),j(t.showInternals()?17:-1)}}function tU(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,86),H(`click`,function(){let t=C(e).$implicit;return w(W(2).select(t.id))}),F(2,`span`,39)(3,`span`,40),K(4,`resource`),I(),F(5,`span`,41),K(6),I(),A(7,HH,2,3,`span`,87),A(8,UH,2,2,`span`,80),L(9,`span`,88),I(),A(10,WH,3,3,`span`,89)(11,GH,3,3,`span`,89),I(),A(12,eU,18,18,`div`,90),I()}if(e&2){let e,n=t.$implicit,r=W(2);D(),G(`selected`,r.selectedId()===n.id),k(`aria-expanded`,r.selectedId()===n.id)(`aria-controls`,`signal-detail-`+n.id)(`data-card`,n.id),D(2),Zg(`background`,r.kindColor(`resource`)),D(3),q(n.name),D(),j(n.status?7:-1),D(),j((e=n.changes)?8:-1,e),D(2),j(n.error===void 0?n.value===void 0?-1:11:10),D(2),j(r.selectedId()===n.id?12:-1)}}function nU(e,t){if(e&1&&(F(0,`h2`,84),K(1,`Resources`),I(),F(2,`ul`,85),M(3,tU,13,12,`li`,null,BV),I()),e&2){let e=W();D(3),N(e.filteredResources())}}function rU(e,t){e&1&&(F(0,`span`,99),K(1,`watching`),I())}function iU(e,t){e&1&&(F(0,`span`,100),K(1,`framework`),I())}function aU(e,t){if(e&1&&(F(0,`span`,80),K(1),I()),e&2){let e=t;D(),Y(``,e,` `,e===1?`change`:`changes`)}}function oU(e,t){if(e&1&&(F(0,`span`,89),K(1),U_(2,`json`),I()),e&2){let e=W().$implicit;D(),q(W_(2,1,e.value))}}function sU(e,t){if(e&1&&(F(0,`span`,44),K(1,`·`),I(),F(2,`span`),K(3),I()),e&2){let e=W().$implicit,t=W(2);D(3),J(`Deps: `,t.getDependencies(e).length)}}function cU(e,t){if(e&1&&(F(0,`span`,44),K(1,`·`),I(),F(2,`span`),K(3),I()),e&2){let e=W().$implicit,t=W(2);D(3),J(`Consumers: `,t.getConsumers(e).length)}}function lU(e,t){if(e&1&&(F(0,`dt`),K(1,`Runs`),I(),F(2,`dd`),K(3),I()),e&2){let e=W(4);D(3),y_(` `,t,`, `,e.selectedNode().runMs??0,` ms in all, last `,e.selectedNode().lastRunMs??0,` ms `)}}function uU(e,t){if(e&1&&L(0,`app-source-link`,102),e&2){let e=W();P(`file`,e.exact.file)(`line`,e.exact.line)}}function dU(e,t){if(e&1&&(F(0,`span`,103),K(1),I()),e&2){let e=W().$implicit;D(),J(`in `,e.component)}}function fU(e,t){if(e&1&&(F(0,`li`),L(1,`app-source-link`,102),A(2,dU,2,1,`span`,103),I()),e&2){let e=t.$implicit;D(),P(`file`,e.file)(`line`,e.line),D(),j(e.component?2:-1)}}function pU(e,t){if(e&1&&(F(0,`span`,103),K(1),I(),F(2,`ul`,104),M(3,fU,3,3,`li`,null,HV),I()),e&2){let e=W();D(),J(``,e.candidates.length,` declarations match this name:`),D(2),N(e.candidates)}}function mU(e,t){e&1&&(F(0,`dt`),K(1,`Source`),I(),F(2,`dd`,101),A(3,uU,1,2,`app-source-link`,102)(4,pU,5,1),I()),e&2&&(D(3),j(t.exact?3:4))}function hU(e,t){if(e&1&&(F(0,`dt`),K(1,`Value`),I(),F(2,`dd`)(3,`pre`,95),K(4),U_(5,`json`),I()()),e&2){let e=W(4);D(3),k(`aria-label`,`Value of `+(e.selectedNode().label??`signal`)),D(),q(W_(5,2,e.selectedNode().value))}}function gU(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,105),H(`click`,function(){let t=C(e).$implicit;return w(W(5).jumpTo(t))}),F(2,`span`,96),K(3),I(),F(4,`span`,75),K(5),I()()()}if(e&2){let e=t.$implicit,n=W(5);D(),k(`aria-label`,`Go to `+e.kind+` `+(e.label??e.id)),D(),Zg(`background`,n.kindColor(e.kind)),D(),q(e.kind),D(2),q(e.label??e.id)}}function _U(e,t){if(e&1&&(F(0,`h4`),K(1,`Dependencies (producers)`),I(),F(2,`ul`),M(3,gU,6,5,`li`,null,BV),I()),e&2){let e=W(4);D(3),N(e.getDependencies(e.selectedNode()))}}function vU(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,105),H(`click`,function(){let t=C(e).$implicit;return w(W(5).jumpTo(t))}),F(2,`span`,96),K(3),I(),F(4,`span`,75),K(5),I()()()}if(e&2){let e=t.$implicit,n=W(5);D(),k(`aria-label`,`Go to `+e.kind+` `+(e.label??e.id)),D(),Zg(`background`,n.kindColor(e.kind)),D(),q(e.kind),D(2),q(e.label??e.id)}}function yU(e,t){if(e&1&&(F(0,`h4`),K(1,`Consumers`),I(),F(2,`ul`),M(3,vU,6,5,`li`,null,BV),I()),e&2){let e=W(4);D(3),N(e.getConsumers(e.selectedNode()))}}function bU(e,t){if(e&1){let e=B();F(0,`button`,106),H(`click`,function(){C(e);let t=W(4);return w(t.toggleWatch(t.selectedNode()))}),K(1,` Watch `),I(),F(2,`p`,33),K(3,` A watched signal is listed under Watched and logs each change to the page console. `),I()}if(e&2){let e=W(4);k(`aria-pressed`,e.watchedIds().has(e.selectedNode().id))}}function xU(e,t){e&1&&(F(0,`p`,33),K(1),I()),e&2&&(D(),q(t))}function SU(e,t){if(e&1&&(F(0,`div`,90)(1,`h3`,92),K(2),I(),F(3,`dl`)(4,`dt`),K(5,`Kind`),I(),F(6,`dd`),K(7),I(),F(8,`dt`),K(9,`Epoch`),I(),F(10,`dd`),K(11),I(),A(12,lU,4,3),A(13,mU,5,1),A(14,hU,6,4),I(),A(15,_U,5,0),A(16,yU,5,0),A(17,bU,4,1),A(18,xU,2,1,`p`,33),dg(19,93),I()),e&2){let e,t,n,r=W().$implicit,i=W(2),a=Ag(25);P(`id`,`signal-detail-`+r.id),D(2),q(i.selectedNode().label??i.selectedNode().id),D(5),q(i.selectedNode().kind),D(4),q(i.selectedNode().epoch),D(),j((e=i.selectedNode().runs)?12:-1,e),D(),j((t=i.sourceMatch())?13:-1,t),D(),j(i.selectedNode().value===void 0?-1:14),D(),j(i.getDependencies(i.selectedNode()).length?15:-1),D(),j(i.getConsumers(i.selectedNode()).length?16:-1),D(),j(i.isWatchable(i.selectedNode())?17:-1),D(),j((n=i.writeHint())?18:-1,n),D(),P(`ngTemplateOutlet`,a)(`ngTemplateOutletContext`,R_(13,FV,r.id))}}function CU(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,86),H(`click`,function(){let t=C(e).$implicit;return w(W(2).select(t.id))}),F(2,`span`,39)(3,`span`,40),K(4),I(),F(5,`span`,41),K(6),I(),A(7,rU,2,0,`span`,99),A(8,iU,2,0,`span`,100),A(9,aU,2,2,`span`,80),L(10,`span`,88),I(),A(11,oU,3,3,`span`,89),F(12,`span`,42)(13,`span`),K(14),I(),A(15,sU,4,1),A(16,cU,4,1),I()(),A(17,SU,20,15,`div`,90),I()}if(e&2){let e,n=t.$implicit,r=W(2);D(),G(`selected`,r.selectedId()===n.id),k(`aria-expanded`,r.selectedId()===n.id)(`aria-controls`,`signal-detail-`+n.id)(`data-card`,n.id),D(2),Zg(`background`,r.kindColor(n.kind)),D(),q(n.kind),D(2),q(n.label??`(unnamed)`),D(),j(r.watchedIds().has(n.id)?7:-1),D(),j(n.framework?8:-1),D(),j((e=r.changeCount(n.id))?9:-1,e),D(2),j(n.value===void 0?-1:11),D(3),J(`Epoch: `,n.epoch),D(),j(r.getDependencies(n).length?15:-1),D(),j(r.getConsumers(n).length?16:-1),D(),j(r.selectedId()===n.id&&r.selectedNode()?17:-1)}}function wU(e,t){if(e&1){let e=B();F(0,`button`,34),H(`click`,function(){return C(e),w(W(3).clearFilters())}),K(1,`Clear filters`),I()}}function TU(e,t){if(e&1&&(F(0,`li`,98)(1,`p`,31),K(2),I(),F(3,`p`,33),K(4),I(),A(5,wU,2,0,`button`,107),I()),e&2){let e=W(2);D(2),J(` `,e.hasAnySignals()?`No signals match.`:`No signals in this graph.`,` `),D(2),J(` `,e.hasAnySignals()?`Try a different name or kind.`:`Select a component that reads signals, or interact with the page to create some.`,` `),D(),j(e.hasAnySignals()||e.filter()||e.kind()?5:-1)}}function EU(e,t){if(e&1&&(F(0,`h2`,84),K(1,`Signals`),I(),F(2,`ul`,97),M(3,CU,18,17,`li`,null,BV,!1,TU,6,3,`li`,98),I()),e&2){let e=W();D(3),N(e.filteredNodes())}}var DU=`follow`;function OU(e){return Object.keys(e.pages).length?e.pages:e.graph?{[e.graph.pageId??``]:e.graph}:{}}var kU=`env:`,AU=50,jU=new Set([`signal`,`computed`,`linkedSignal`]),MU=20,NU={selected:`picked`,routed:`rendered by the router`,root:`first component with signals`},PU={write:`set`,sample:`sampled`,initial:`initial`},FU={resolved:`ok`,local:`ok`,loading:`warn`,reloading:`warn`,error:`danger`},IU={signal:`signal`,computed:`computed`,linkedSignal:`linked`,effect:`effect`,template:`template`,afterRenderEffectPhase:`after-render`,childSignalProp:`child-prop`,"input (signal)":`input`,"input.required (signal)":`input`,"output (signal)":`output`,"model (signal)":`model`,"model.required (signal)":`model`,"viewChild (signal)":`view-query`,"viewChild.required (signal)":`view-query`,"viewChildren (signal)":`view-query`,"contentChild (signal)":`content-query`,"contentChild.required (signal)":`content-query`,"contentChildren (signal)":`content-query`,resource:`resource`},LU=class e{rpc=$(null);focus=$(null);focusedSignal=E(null);destroyRef=S(vs);host=S(kl);filterInput=sv(`filterInput`);injector=S(gs);pageId=fT();angularPages=uD(()=>this.rpc());angularPage=X(()=>dD(this.angularPages(),this.shownPageId()??this.pageId));cleanups=[];graphLoad=0;treePages=E({});graphState=E({graph:null,pages:{}});chosenPageId=E(null);announcement=E(``);graphPages=X(()=>OU(this.graphState()));shownPageId=Q({source:()=>({pages:this.graphPages(),newest:this.graphState().graph?.pageId??null,chosen:this.chosenPageId()}),computation:({pages:e,newest:t,chosen:n},r)=>{let i={};for(let n of Object.keys(e))i[n]={pageId:n,reportedAt:+(n===t)};return pT(i,{chosen:n,host:this.pageId,previous:r?.value??null})}});reported=X(()=>{let e=this.shownPageId();return e===null?null:this.graphPages()[e]??null});unsupported=X(()=>!!this.reported()?.unsupported);graphKnown=E(!1);graph=X(()=>{let e=this.reported();return e?.unsupported?null:e});graphOwner=X(()=>{let e=this.graph();return e?`${e.pageId??``}|${e.component?.id??e.injector?.id??e.element?.id??``}`:null});pickedByPage=E({});picked=X(()=>this.pickedByPage()[this.targetPageId()??``]??null);pageOptions=X(()=>{if(this.pageId)return[];let e=this.treePages();return Object.keys(this.graphPages()).map(t=>{let n=e[t];return{value:t,label:n?.title||n?.url||`Page ${t}`,hint:n?.url}})});showInternals=E(!1);sourceSignals=E([]);sourceLoaded=E(!1);sourceFailed=E(!1);graphFailed=E(!1);loadFailed=X(()=>this.sourceFailed()||this.graphFailed());retrying=E(!1);filter=E(``);resources=X(()=>this.graph()?.resources??[]);internalIds=X(()=>new Set(this.resources().flatMap(e=>e.nodeIds)));showFramework=E(!1);frameworkCount=X(()=>{let e=this.internalIds();return(this.graph()?.nodes??[]).filter(t=>t.framework&&!e.has(t.id)).length});visibleNodes=X(()=>{let e=this.internalIds(),t=this.showFramework();return(this.graph()?.nodes??[]).filter(n=>!e.has(n.id)&&(t||!n.framework))});showGraph=E(!0);graphLinks=X(()=>{let e=this.graph();if(!e)return[];let t=new Set(this.visibleNodes().map(e=>e.id)),n=[];for(let r of e.edges){let i=e.nodes[r.producer]?.id,a=e.nodes[r.consumer]?.id;i&&a&&t.has(i)&&t.has(a)&&n.push({producer:i,consumer:a})}return n});graphNodes=X(()=>[...this.visibleNodes()].sort((e,t)=>e.id.localeCompare(t.id,void 0,{numeric:!0})));kindColorOf=e=>this.kindColor(e);watchedIds=X(()=>new Set(this.graph()?.watch?.ids??[]));stacksOn=X(()=>!!this.graph()?.watch?.stacks);watchedNodes=X(()=>{let e=this.watchedIds();return(this.graph()?.nodes??[]).filter(t=>e.has(t.id))});watchedElsewhere=X(()=>this.watchedIds().size-this.watchedNodes().length);watchLog=X(()=>{let e=this.graph()?.history??{};return this.watchedNodes().flatMap(t=>(e[t.id]??[]).filter(e=>e.source!==`initial`).map(e=>({id:t.id,label:t.label??t.id,change:e}))).sort((e,t)=>t.change.at-e.change.at).slice(0,MU)});hasAnySignals=X(()=>this.visibleNodes().length+this.resources().length>0);kindCounts=X(()=>{let e=this.graph()?[...this.visibleNodes().map(e=>e.kind),...this.resources().map(()=>`resource`)]:this.sourceSignals().map(e=>e.kind),t=new Map;for(let n of e)t.set(n,(t.get(n)??0)+1);return[...t].map(([e,t])=>({kind:e,count:t}))});kind=Q({source:this.graphOwner,computation:(e,t)=>{let n=t?.value??null;return n&&Z(this.kindCounts).some(e=>e.kind===n)?n:null}});kindChips=X(()=>{let e=this.kindCounts(),t=this.kind();return t&&!e.some(e=>e.kind===t)?[...e,{kind:t,count:0}]:e});kindTotal=X(()=>this.kindCounts().reduce((e,t)=>e+t.count,0));selectedId=Q({source:this.graphOwner,computation:()=>null});selectedNode=X(()=>this.graph()?.nodes.find(e=>e.id===this.selectedId())??null);jumpedPast=E(null);jumpNote=X(()=>{let e=this.jumpedPast();return!e||this.filter()||this.kind()||this.selectedId()!==e.id?``:`Cleared the filters to show ${e.label}.`});selectedHistory=X(()=>{let e=this.selectedId();return e?[...this.graph()?.history?.[e]??[]].reverse():[]});restoreBlocked=X(()=>{let e=this.rpc();if(yT(e))return`A saved report cannot write to the app.`;let t=this.graph()?.pageId;return _D(t?this.treePages()[t]:null)?`It needs the app open in a browser.`:IT(e,`components`)?``:Uw(`components`)});restoring=E(!1);restoreResult=E(null);restorable(e){let t=this.graph(),n=t?.nodes.find(t=>t.id===e);return n?.locator?n.locator.owner===`service`?t?.injector&&n.locator.id===t.injector.id?n:null:t?.component&&n.locator.id===t.component.id?n:null:null}async restore(e,t,n){let r=this.rpc(),i=this.graph()?.pageId,a=e.locator;if(!r||!i||!a||this.restoring()||this.restoreBlocked())return;this.restoring.set(!0);let o;try{o=await r.scope(`pangular`).rpc.call(`request-signal-restore`,{pageId:i,request:{component:a.id,...a.owner===`service`?{owner:`service`}:{},node:e.id,epoch:t.epoch}})??{}}catch{o={error:`The devtools server did not answer. Try again.`}}this.restoring.set(!1),this.restoreResult.set(o.ok?{id:e.id,text:`Restored ${o.key??a.key} to the value from ${n}.`,error:!1}:{id:e.id,text:o.error??`The page did not restore it.`,error:!0})}diffs=X(()=>{let e=this.selectedId(),t=e?this.graph()?.history?.[e]??[]:[],n=new Map;for(let e=1;e<t.length;e++){let r=t[e-1].value,i=t[e].value;if(!r||!i||typeof r!=`object`||typeof i!=`object`)continue;let a=MV(r,i);a.length&&n.set(t[e].epoch,a)}return n});diffLabel(e){return e===`added`?`added`:e===`removed`?`removed`:`changed`}sourceMatch=X(()=>{let e=this.selectedNode(),t=e?.label;if(!e||!t)return null;let n=t=>t===e.kind||t.startsWith(`${e.kind} `)||t.startsWith(`${e.kind}.`)||e.kind===`signal`&&t.startsWith(`model`)||e.kind===`computed`&&t===`toSignal`,r=this.sourceSignals().filter(e=>e.name===t&&n(e.kind)),i=this.graph(),a=i?.component?.tag??i?.element?.tag,o=a?r.filter(e=>e.component===a):[];return o.length&&(r=o),r.length?r.length===1?{exact:r[0],candidates:[]}:{exact:null,candidates:r.slice(0,5)}:null});writeHint=X(()=>{let e=this.selectedNode(),t=this.graph();if(!e||!t||t.writeHook===!1||e.kind!==`signal`&&e.kind!==`linkedSignal`)return``;if(!e.label)return`This signal has no name, so its history holds sampled values only. From Angular 20.1 the compiler names a signal that initializes a field or variable, so this one was likely made in a factory or helper. Pass a debugName in its options, for example signal(0, { debugName: 'count' }).`;let n=t.history?.[e.id]??[];return n.some(e=>e.source===`write`)||!n.some(e=>e.source===`sample`)?``:`Every change here was sampled. Writes are matched by name, kind, version and value, so another live signal with the same name and value can hide them.`});filteredResources=X(()=>{let e=this.filter().toLowerCase(),t=this.kind();return t&&t!==`resource`?[]:this.resources().filter(t=>!e||t.name.toLowerCase().includes(e)||e.length>=3&&`resource`.startsWith(e))});filteredNodes=X(()=>{let e=this.filter().toLowerCase(),t=this.kind();return this.visibleNodes().filter(n=>(!t||n.kind===t)&&(!e||(n.label??``).toLowerCase().includes(e)||n.kind.toLowerCase().includes(e))).sort((e,t)=>e.id.localeCompare(t.id,void 0,{numeric:!0}))});filteredSourceSignals=X(()=>{let e=this.filter().toLowerCase(),t=this.kind();return this.sourceSignals().filter(n=>(!t||n.kind===t)&&(!e||n.name.toLowerCase().includes(e)||n.kind.toLowerCase().includes(e)||n.file.toLowerCase().includes(e)))});targetPageId=X(()=>this.pageId??(this.shownPageId()||null)??this.graph()?.pageId??this.latestTreePage()?.pageId??null);latestTreePage=X(()=>{let e=null;for(let[t,n]of Object.entries(this.treePages())){let r=n.reportedAt??0;(!e||r>e.reportedAt)&&(e={pageId:t,reportedAt:r})}return e});componentOptions=X(()=>{let e=this.targetPageId(),t=(e?this.treePages()[e]?.roots:void 0)??[],n=[],r=e=>{for(let t of e)n.push(t),r(t.children)};r(t);let i=this.graph()?.environments??[];if(!n.length&&!i.length)return[];let a=new Map;for(let e of n)a.set(e.name,(a.get(e.name)??0)+1);let o=new Map,s=[{value:DU,label:`Follow the routed component`,hint:`automatic`},...i.map(e=>({value:kU+e.id,label:this.injectorLabel(e),hint:`injector`}))];for(let e of n){let t=(o.get(e.name)??0)+1;o.set(e.name,t),s.push({value:e.id,label:(a.get(e.name)??0)>1?`${e.name} #${t}`:e.name,hint:e.kind===`directive`?`<${e.tag}> directive`:`<${e.tag}>`})}return s});pickerValue=X(()=>{let e=this.picked();return e&&this.componentOptions().some(t=>t.value===e)?e:DU});constructor(){ac(()=>{let e=this.rpc();e&&(this.loadSignalGraph(e),this.loadSourceSignals(e))}),ac(()=>{let e=this.focus();e&&Z(()=>this.showComponent(e))}),ac(()=>{let e=this.focusedSignal(),t=this.graph();if(!e||t?.component?.id!==e.componentId)return;let n=t.nodes.find(t=>t.locator?.id===e.componentId&&t.locator.key===e.key);Z(()=>{this.focusedSignal.set(null),n&&this.jumpTo(n)})}),this.destroyRef.onDestroy(()=>{for(let e of this.cleanups.splice(0))e()})}async loadSignalGraph(e){for(let e of this.cleanups.splice(0))e();let t=++this.graphLoad,n=()=>this.destroyRef.destroyed||t!==this.graphLoad,r=e.scope(`pangular`);try{let e=await r.rpc.sharedState(`signal-graph`);if(n())return;this.graphFailed.set(!1);let t=e=>{let t=e,n=t?.pages&&typeof t.pages==`object`?t.pages:{},r={graph:t?.graph??null,pages:n};this.notePageGone(OU(r)),this.graphState.set(r),e!==void 0&&this.graphKnown.set(!0)};t(e.value()),this.cleanups.push(e.on(`updated`,t))}catch{if(n())return;this.graphState.set({graph:null,pages:{}}),this.graphKnown.set(!0),this.graphFailed.set(!0)}try{let e=await r.rpc.sharedState(`component-tree`);if(n())return;let t=e=>{let t=e?.pages;this.treePages.set(t&&typeof t==`object`?t:{})};t(e.value()),this.cleanups.push(e.on(`updated`,t))}catch{n()||this.treePages.set({})}}notePageGone(e){let t=Object.keys(this.graphPages()).filter(t=>!e[t]);t.length&&this.pickedByPage.update(e=>{let n={...e};for(let e of t)delete n[e];return n});let n=this.chosenPageId();if(!n||e[n])return;let r=this.pageOptions().find(e=>e.value===n)?.label??`The chosen page`;this.chosenPageId.set(null),this.announcement.set(`${r} closed, so this shows another page.`)}selectPage(e){if(!e||e===this.shownPageId())return;this.chosenPageId.set(e);let t=this.pageOptions().find(t=>t.value===e)?.label??e;this.announcement.set(`Showing the signal graph of ${t}.`)}showComponent(e){e.pageId&&!this.pageId&&this.graphPages()[e.pageId]&&this.chosenPageId.set(e.pageId),this.focusedSignal.set(e.key?{componentId:e.componentId,key:e.key}:null),this.pickComponent(e.componentId,this.pageId??e.pageId)}pickComponent(e,t){let n=e&&e!==DU?e:null,r=t??this.targetPageId()??void 0;this.pickedByPage.update(e=>{let t={...e};return n?t[r??``]=n:delete t[r??``],t});let i=this.rpc();if(!i)return;let a=n?.startsWith(kU)?{pageId:r,env:n.slice(4)}:{pageId:r,id:n};i.scope(`pangular`).rpc.call(`select-signal-target`,a).catch(()=>{})}injectorLabel(e){return e.name===`Root`?`Root services`:e.name}sourceNote(e){return NU[e]}async loadSourceSignals(e){let t=e.scope(`pangular`);try{let e=await t.rpc.call(`get-signals`);this.sourceSignals.set(e),this.sourceFailed.set(!1)}catch{this.sourceFailed.set(!0)}finally{this.sourceLoaded.set(!0)}}async retry(){let e=this.rpc();if(!e||this.retrying())return;let t=document.activeElement;this.retrying.set(!0);try{await Promise.all([this.loadSignalGraph(e),this.loadSourceSignals(e)])}finally{this.retrying.set(!1)}this.destroyRef.destroyed||td(()=>{(!t?.isConnected||document.activeElement===document.body)&&this.filterInput()?.focus()},{injector:this.injector})}clearFilters(){this.resetFilters(),this.filterInput()?.focus()}resetFilters(){this.filter.set(``),this.kind.set(null)}select(e){this.selectedId.set(this.selectedId()===e?null:e),this.showInternals.set(!1)}selectFromGraph(e){this.selectedId.set(e),this.showInternals.set(!1)}plural(e,t){return`${e} ${t}${e===1?``:`s`}`}isWatchable(e){return jU.has(e.kind)}toggleWatch(e){let t=!this.watchedIds().has(e.id),n=e.label??`the unnamed signal`;this.sendWatch({id:e.id,watch:t}),this.announcement.set(t?`Watching ${n}. Its changes also log to the page console.`:`Stopped watching ${n}.`)}toggleStacks(){let e=!this.stacksOn();this.sendWatch({stacks:e}),this.announcement.set(e?`Recording write stacks.`:`Stopped recording write stacks.`)}sendWatch(e){let t=this.rpc(),n=this.graph()?.pageId??this.targetPageId()??void 0;t&&t.scope(`pangular`).rpc.call(`set-signal-watch`,{...e,pageId:n}).catch(()=>{})}jumpTo(e){let t=this.resources().find(t=>t.nodeIds.includes(e.id)),n=t?.id??e.id,r=t?!this.filteredResources().some(e=>e.id===n):!this.filteredNodes().some(e=>e.id===n);r&&this.resetFilters(),this.jumpedPast.set(r?{id:n,label:t?.name??e.label??e.id}:null),this.selectedId.set(n),this.showInternals.set(!!t),td(()=>{let e=[...this.host.nativeElement.querySelectorAll(`.node-card[data-card]`)].find(e=>e.dataset.card===n);e?.scrollIntoView?.({block:`nearest`}),e?.focus({preventScroll:!0})},{injector:this.injector})}changeCount(e){let t=this.graph(),n=t?.nodes.find(t=>t.id===e)?.changes??t?.resources?.find(t=>t.id===e)?.changes;return n===void 0?(t?.history?.[e]??[]).reduce((e,t)=>e+(t.source===`initial`?0:1+(t.missed??0)),0):n}historySummary(e){let t=this.changeCount(e),n=this.graph()?.history?.[e]?.length??0;return t?`${`${t} ${t===1?`change`:`changes`} recorded`}${n>=AU&&t>=n?`, showing the last ${n}`:``}, newest first.`:`No changes recorded yet. The entry below is the value seen first.`}statusTone(e){return FU[e]??`neutral`}internalsOf(e){let t=new Set(e.nodeIds);return(this.graph()?.nodes??[]).filter(e=>t.has(e.id))}sourceLabel(e){return PU[e]}kindColor(e){return`var(--kind-${IU[e]??`unknown`})`}relations=X(()=>{let e=new Map,t=this.graph();if(!t)return e;for(let n of t.nodes)e.set(n.id,{deps:[],consumers:[]});for(let n of t.edges){let r=t.nodes[n.producer],i=t.nodes[n.consumer];r&&i&&(e.get(i.id)?.deps.push(r),e.get(r.id)?.consumers.push(i))}return e});getDependencies(e){return this.relations().get(e.id)?.deps??[]}getConsumers(e){return this.relations().get(e.id)?.consumers??[]}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-signal-inspector`]],viewQuery:function(e,t){e&1&&Og(t.filterInput,NV,5),e&2&&kg()},inputs:{rpc:[1,`rpc`],focus:[1,`focus`]},decls:32,vars:19,consts:[[`filterInput`,``],[`historyTpl`,``],[1,`toolbar`],[`placeholder`,`Filter by name or kind`,`saveKey`,`signals`,3,`valueChange`,`value`],[1,`picker`,`page-picker`],[1,`picker`],[`role`,`status`,1,`sr-only`],[1,`showing`],[`role`,`status`,1,`fallback`],[1,`intro`],[`capability`,`signalGraph`,`compact`,``,3,`page`,`missing`],[`role`,`group`,`aria-label`,`Filter by kind`,1,`kinds`],[`role`,`status`,1,`empty`],[`role`,`alert`,1,`empty`,3,`compact`],[1,`empty`],[`aria-labelledby`,`signal-graph-heading`,1,`graph-section`],[`aria-labelledby`,`signal-watched-heading`,1,`watched`],[`role`,`status`,1,`jump-note`],[`id`,`signals-page-label`,1,`label-key`],[`labelledBy`,`signals-page-label`,3,`valueChange`,`options`,`value`],[`id`,`signals-component-label`,1,`label-key`],[`labelledBy`,`signals-component-label`,3,`valueChange`,`options`,`value`],[1,`showing-name`],[1,`mono`],[1,`source-note`],[`type`,`button`,1,`kind-chip`,3,`click`],[1,`count`],[`type`,`button`,1,`kind-chip`,3,`active`],[`aria-hidden`,`true`,1,`dot`],[1,`chip-text`],[`aria-hidden`,`true`,1,`spinner`],[1,`empty-title`],[`role`,`alert`,1,`empty`],[1,`hint`],[`type`,`button`,1,`reset`,3,`click`],[1,`source-label`],[1,`nodes`],[1,`node-card`],[`role`,`status`,1,`empty`,`compact`],[1,`node-header`],[1,`kind-badge`],[1,`node-label`],[1,`node-meta`],[1,`file`,3,`file`,`line`],[`aria-hidden`,`true`,1,`sep`],[3,`id`],[1,`history-summary`],[`tabindex`,`0`,1,`history`,`scroll-box`],[`role`,`status`,1,`restore-result`],[1,`history-meta`],[1,`source-tag`],[1,`missed`],[`type`,`button`,1,`restore`],[1,`diff`],[`aria-label`,`Written from`,1,`stack`],[`type`,`button`,1,`restore`,3,`click`],[1,`diff-list`],[3,`class`],[1,`diff-kind`],[1,`sr-only`],[1,`diff-path`],[1,`diff-old`],[1,`diff-new`],[`aria-hidden`,`true`],[1,`section-head`],[`id`,`signal-graph-heading`,1,`list-heading`],[1,`section-actions`],[`type`,`button`,1,`toggle`],[`type`,`button`,1,`toggle`,3,`click`],[`type`,`button`,`aria-controls`,`signal-graph-body`,1,`toggle`,3,`click`],[1,`hint`,`graph-hint`],[`id`,`signal-graph-body`],[3,`nodes`,`links`,`selectedId`,`watched`,`kindColor`],[1,`graph-selection`],[3,`selected`,`nodes`,`links`,`selectedId`,`watched`,`kindColor`],[1,`rel-label`],[`type`,`button`,1,`link-button`,3,`click`],[`id`,`signal-watched-heading`,1,`list-heading`],[1,`watched-list`],[1,`watched-value`],[1,`changed-badge`],[`id`,`signal-watch-log-heading`,1,`sub-heading`],[`role`,`log`,`tabindex`,`0`,`aria-labelledby`,`signal-watch-log-heading`,1,`watch-log`,`scroll-box`],[1,`history`],[1,`list-heading`],[`role`,`list`,1,`nodes`,`resources`],[`type`,`button`,1,`node-card`,3,`click`],[1,`status-tag`,3,`class`],[`aria-hidden`,`true`,1,`chevron`],[1,`node-value`],[1,`detail-panel`,3,`id`],[1,`status-tag`],[1,`detail-title`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`type`,`button`,1,`reset`,`internals-toggle`,3,`click`],[`role`,`region`,`tabindex`,`0`,1,`scroll-box`],[1,`kind-badge`,`sm`],[`role`,`list`,`appRovingList`,`button.node-card`,1,`nodes`],[1,`empty`,`compact`],[1,`watching-badge`],[1,`framework-badge`],[1,`source-matches`],[3,`file`,`line`],[1,`hint-inline`],[1,`source-candidates`],[`type`,`button`,1,`rel-link`,3,`click`],[`type`,`button`,1,`reset`,`watch-toggle`,3,`click`],[`type`,`button`,1,`reset`]],template:function(e,t){if(e&1){let e=B();F(0,`div`,2)(1,`app-search-field`,3,0),w_(`valueChange`,function(n){return C(e),C_(t.filter,n)||(t.filter=n),w(n)}),I(),A(3,UV,4,2,`div`,4),A(4,WV,4,2,`div`,5),I(),F(5,`p`,6),K(6),I(),A(7,KV,6,3,`p`,7)(8,qV,5,1,`p`,7)(9,JV,7,2,`p`,7),A(10,YV,2,0,`p`,8),F(11,`p`,9),A(12,XV,1,0)(13,ZV,1,0)(14,QV,1,0)(15,$V,1,0),I(),A(16,eH,2,2,`app-angular-unavailable`,10),A(17,tH,2,0,`p`,8),A(18,nH,2,2,`p`,8),A(19,iH,7,4,`div`,11),A(20,aH,4,0,`div`,12),A(21,oH,7,4,`div`,13)(22,sH,14,0,`div`,14),A(23,dH,6,1),Dh(24,TH,1,1,`ng-template`,null,1,q_),A(26,MH,12,6,`section`,15),A(27,VH,8,2,`section`,16),F(28,`p`,17),K(29),I(),A(30,nU,5,0),A(31,EU,6,1)}if(e&2){let e,n;D(),S_(`value`,t.filter),D(2),j(t.pageOptions().length>1?3:-1),D(),j(t.componentOptions().length?4:-1),D(2),q(t.announcement()),D(),j((e=t.graph()?.component)?7:(e=t.graph()?.injector)?8:(e=t.graph()?.element)?9:-1,e),D(3),j(t.graph()&&t.picked()&&t.graph().source!==`selected`?10:-1),D(2),j(t.graph()?.injector?12:t.graph()?13:t.graphKnown()?15:14),D(4),j(t.graph()?-1:16),D(),j(t.graph()?.writeHook===!1?17:-1),D(),j((n=t.graph()?.nodeCount)?18:-1,n),D(),j(t.kindChips().length?19:-1),D(),j(!t.graph()&&!t.sourceLoaded()?20:-1),D(),j(!t.graph()&&t.sourceLoaded()&&t.loadFailed()?21:!t.graph()&&t.sourceLoaded()&&t.sourceSignals().length===0?22:-1),D(2),j(!t.graph()&&t.sourceSignals().length>0?23:-1),D(3),j(t.graph()&&(t.visibleNodes().length||t.frameworkCount())?26:-1),D(),j(t.watchedNodes().length||t.watchedElsewhere()?27:-1),D(2),q(t.jumpNote()),D(),j(t.graph()&&t.filteredResources().length?30:-1),D(),j(t.graph()&&(t.visibleNodes().length||!t.filteredResources().length)?31:-1)}},dependencies:[nP,hD,Uv,lV,OD,DV,Cj,Wv,Gv],styles:[`[_nghost-%COMP%] { display: block; min-width: 0; color: var(--%NS%text); @@ -8766,7 +8780,7 @@ button.node-card[_ngcontent-%COMP%] { dd[_ngcontent-%COMP%] + dt[_ngcontent-%COMP%] { margin-top: 8px; } -}`]})},NU=(e,t)=>t.prop;function PU(e,t){if(e&1){let e=B();F(0,`button`,6),H(`click`,function(){return C(e),w(W().load())}),K(1,` Refresh `),I()}e&2&&k(`aria-label`,`Read the value of `+W().name()+` again`)}function FU(e,t){e&1&&(F(0,`p`,7),K(1,`Reading from the page…`),I())}function IU(e,t){if(e&1&&(F(0,`p`,8),K(1),I()),e&2){let e=W(2);D(),q(e.error())}}function LU(e,t){if(e&1&&(F(0,`p`,9),K(1),I()),e&2){let e=W(3);D(),J(``,e.type(),`, read from the page. Getters never run.`)}}function RU(e,t){e&1&&(F(0,`span`,14),K(1),I()),e&2&&(D(),q(t))}function zU(e,t){if(e&1&&(F(0,`span`,12),K(1),A(2,RU,2,1,`span`,14),I()),e&2){let e,t=W().$implicit,n=W(3);D(),J(``,t.name,` `),D(),j((e=n.kinds()[t.prop])?2:-1,e)}}function BU(e,t){if(e&1&&(F(0,`li`,11),A(1,zU,3,2,`span`,12),L(2,`app-value-tree`,13),I()),e&2){let e=t.$implicit,n=W(3);D(),j(e.prop===n.whole?-1:1),D(),P(`prop`,e)(`store`,n.store)(`componentId`,n.key())(`pageId`,n.pageId())(`rpc`,n.rpc())}}function VU(e,t){if(e&1&&(F(0,`p`,9),K(1),I()),e&2){let e=W(3);D(),J(``,e.more(),` more members are not listed.`)}}function HU(e,t){if(e&1&&(A(0,LU,2,1,`p`,9),F(1,`ul`,10),M(2,BU,3,6,`li`,11,NU),I(),A(4,VU,2,1,`p`,9)),e&2){let e=W(2);j(e.type()?0:-1),D(2),N(e.props()),D(2),j(e.more()?4:-1)}}function UU(e,t){e&1&&(F(0,`p`,9),K(1,`No fields to show: the instance has only methods or getters.`),I())}function WU(e,t){if(e&1&&(F(0,`div`,5),A(1,FU,2,0,`p`,7)(2,IU,2,1,`p`,8)(3,HU,5,2)(4,UU,2,0,`p`,9),I()),e&2){let e=W();P(`id`,e.regionId),k(`aria-label`,`Value of `+e.name()),D(),j(e.loading()?1:e.error()?2:e.props().length?3:4)}}var GU=`$value`,KU=0,qU=class e{rpc=$(null);pageId=$(null);injectorId=$.required();token=$.required();tokenId=$(void 0);index=$.required();position=$(``);name=X(()=>this.position()?`${this.token()} ${this.position()}`:this.token());regionId=`provider-value-${++KU}`;whole=GU;key=X(()=>`${this.pageId()}|${this.injectorId()}|${this.index()}|${this.tokenId()??this.token()}`);open=Q({source:this.key,computation:()=>!1});answer=Q({source:this.key,computation:()=>null});loading=E(!1);error=X(()=>{let e=this.answer();return e&&!e.ok?e.error??`The page did not read it.`:``});type=X(()=>this.answer()?.type??``);more=X(()=>this.answer()?.more??0);props=X(()=>(this.answer()?.members??[]).map(e=>({name:e.name===GU?`value`:e.name,prop:e.name,value:e.value})));kinds=X(()=>Object.fromEntries((this.answer()?.members??[]).filter(e=>e.kind).map(e=>[e.name,e.kind])));store=new xM(e=>this.read({path:[...e.path],limit:e.limit,depth:e.depth}));async read(e){let t=this.pageId();if(!t)return{error:`No live page to read from.`};try{return await _T(this.rpc(),`request-provider-value`,{pageId:t,request:{injectorId:this.injectorId(),token:this.token(),...this.tokenId()?{tokenId:this.tokenId()}:{},index:this.index(),...e}})??{error:`The devtools server is not connected.`}}catch{return{error:`The devtools server did not answer. Try again.`}}}toggle(){let e=!this.open();this.open.set(e),e&&!this.answer()&&this.load()}requests=0;async load(){let e=this.key(),t=++this.requests;this.loading.set(!0),this.store.follow({rpc:null,pageId:null,componentId:`${e}#${Date.now()}`},void 0);let n=await this.read({path:[]});t===this.requests&&e===this.key()&&(this.loading.set(!1),this.answer.set(n))}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-provider-value`]],inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`],injectorId:[1,`injectorId`],token:[1,`token`],tokenId:[1,`tokenId`],index:[1,`index`],position:[1,`position`]},decls:7,vars:6,consts:[[1,`bar`],[`type`,`button`,1,`toggle`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[`d`,`m9 6 6 6-6 6`],[`type`,`button`,1,`link`],[`role`,`region`,1,`value`,3,`id`],[`type`,`button`,1,`link`,3,`click`],[`role`,`status`,1,`muted`],[`role`,`alert`,1,`error`],[1,`muted`],[1,`props`],[1,`prop`],[1,`name`,`mono`],[3,`prop`,`store`,`componentId`,`pageId`,`rpc`],[1,`kind`]],template:function(e,t){e&1&&(F(0,`div`,0)(1,`button`,1),H(`click`,function(){return t.toggle()}),T(),F(2,`svg`,2),L(3,`path`,3),I(),K(4),I(),A(5,PU,2,1,`button`,4),I(),A(6,WU,5,3,`div`,5)),e&2&&(D(),k(`aria-expanded`,t.open())(`aria-controls`,t.open()?t.regionId:null)(`aria-label`,(t.open()?`Hide the value of `:`Show the value of `)+t.name()),D(3),J(` `,t.open()?`Hide value`:`Show value`,` `),D(),j(t.open()&&!t.loading()?5:-1),D(),j(t.open()?6:-1))},dependencies:[yM],styles:[`[_nghost-%COMP%] { +}`]})},RU=(e,t)=>t.prop;function zU(e,t){if(e&1){let e=B();F(0,`button`,6),H(`click`,function(){return C(e),w(W().load())}),K(1,` Refresh `),I()}e&2&&k(`aria-label`,`Read the value of `+W().name()+` again`)}function BU(e,t){e&1&&(F(0,`p`,7),K(1,`Reading from the page…`),I())}function VU(e,t){if(e&1&&(F(0,`p`,8),K(1),I()),e&2){let e=W(2);D(),q(e.error())}}function HU(e,t){if(e&1&&(F(0,`p`,9),K(1),I()),e&2){let e=W(3);D(),J(``,e.type(),`, read from the page. Getters never run.`)}}function UU(e,t){e&1&&(F(0,`span`,14),K(1),I()),e&2&&(D(),q(t))}function WU(e,t){if(e&1&&(F(0,`span`,12),K(1),A(2,UU,2,1,`span`,14),I()),e&2){let e,t=W().$implicit,n=W(3);D(),J(``,t.name,` `),D(),j((e=n.kinds()[t.prop])?2:-1,e)}}function GU(e,t){if(e&1&&(F(0,`li`,11),A(1,WU,3,2,`span`,12),L(2,`app-value-tree`,13),I()),e&2){let e=t.$implicit,n=W(3);D(),j(e.prop===n.whole?-1:1),D(),P(`prop`,e)(`store`,n.store)(`componentId`,n.key())(`pageId`,n.pageId())(`rpc`,n.rpc())}}function KU(e,t){if(e&1&&(F(0,`p`,9),K(1),I()),e&2){let e=W(3);D(),J(``,e.more(),` more members are not listed.`)}}function qU(e,t){if(e&1&&(A(0,HU,2,1,`p`,9),F(1,`ul`,10),M(2,GU,3,6,`li`,11,RU),I(),A(4,KU,2,1,`p`,9)),e&2){let e=W(2);j(e.type()?0:-1),D(2),N(e.props()),D(2),j(e.more()?4:-1)}}function JU(e,t){e&1&&(F(0,`p`,9),K(1,`No fields to show: the instance has only methods or getters.`),I())}function YU(e,t){if(e&1&&(F(0,`div`,5),A(1,BU,2,0,`p`,7)(2,VU,2,1,`p`,8)(3,qU,5,2)(4,JU,2,0,`p`,9),I()),e&2){let e=W();P(`id`,e.regionId),k(`aria-label`,`Value of `+e.name()),D(),j(e.loading()?1:e.error()?2:e.props().length?3:4)}}var XU=`$value`,ZU=0,QU=class e{rpc=$(null);pageId=$(null);injectorId=$.required();token=$.required();tokenId=$(void 0);index=$.required();position=$(``);name=X(()=>this.position()?`${this.token()} ${this.position()}`:this.token());regionId=`provider-value-${++ZU}`;whole=XU;key=X(()=>`${this.pageId()}|${this.injectorId()}|${this.index()}|${this.tokenId()??this.token()}`);open=Q({source:this.key,computation:()=>!1});answer=Q({source:this.key,computation:()=>null});loading=E(!1);error=X(()=>{let e=this.answer();return e&&!e.ok?e.error??`The page did not read it.`:``});type=X(()=>this.answer()?.type??``);more=X(()=>this.answer()?.more??0);props=X(()=>(this.answer()?.members??[]).map(e=>({name:e.name===XU?`value`:e.name,prop:e.name,value:e.value})));kinds=X(()=>Object.fromEntries((this.answer()?.members??[]).filter(e=>e.kind).map(e=>[e.name,e.kind])));store=new xM(e=>this.read({path:[...e.path],limit:e.limit,depth:e.depth}));async read(e){let t=this.pageId();if(!t)return{error:`No live page to read from.`};try{return await _T(this.rpc(),`request-provider-value`,{pageId:t,request:{injectorId:this.injectorId(),token:this.token(),...this.tokenId()?{tokenId:this.tokenId()}:{},index:this.index(),...e}})??{error:`The devtools server is not connected.`}}catch{return{error:`The devtools server did not answer. Try again.`}}}toggle(){let e=!this.open();this.open.set(e),e&&!this.answer()&&this.load()}requests=0;async load(){let e=this.key(),t=++this.requests;this.loading.set(!0),this.store.follow({rpc:null,pageId:null,componentId:`${e}#${Date.now()}`},void 0);let n=await this.read({path:[]});t===this.requests&&e===this.key()&&(this.loading.set(!1),this.answer.set(n))}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-provider-value`]],inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`],injectorId:[1,`injectorId`],token:[1,`token`],tokenId:[1,`tokenId`],index:[1,`index`],position:[1,`position`]},decls:7,vars:6,consts:[[1,`bar`],[`type`,`button`,1,`toggle`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[`d`,`m9 6 6 6-6 6`],[`type`,`button`,1,`link`],[`role`,`region`,1,`value`,3,`id`],[`type`,`button`,1,`link`,3,`click`],[`role`,`status`,1,`muted`],[`role`,`alert`,1,`error`],[1,`muted`],[1,`props`],[1,`prop`],[1,`name`,`mono`],[3,`prop`,`store`,`componentId`,`pageId`,`rpc`],[1,`kind`]],template:function(e,t){e&1&&(F(0,`div`,0)(1,`button`,1),H(`click`,function(){return t.toggle()}),T(),F(2,`svg`,2),L(3,`path`,3),I(),K(4),I(),A(5,zU,2,1,`button`,4),I(),A(6,YU,5,3,`div`,5)),e&2&&(D(),k(`aria-expanded`,t.open())(`aria-controls`,t.open()?t.regionId:null)(`aria-label`,(t.open()?`Hide the value of `:`Show the value of `)+t.name()),D(3),J(` `,t.open()?`Hide value`:`Show value`,` `),D(),j(t.open()&&!t.loading()?5:-1),D(),j(t.open()?6:-1))},dependencies:[yM],styles:[`[_nghost-%COMP%] { display: block; min-width: 0; margin-top: 6px; @@ -8885,7 +8899,7 @@ button.node-card[_ngcontent-%COMP%] { .link[_ngcontent-%COMP%] { transition: none; } -}`]})},JU=`pangular-pref`;function YU(e){try{let t=localStorage.getItem(`${JU}:${e}`);return t===`true`||t!==`false`&&null}catch{return null}}function XU(e,t){try{localStorage.setItem(`${JU}:${e}`,String(t))}catch{}}var ZU=(e,t)=>t.label,QU=(e,t)=>t.name;function $U(e,t){if(e&1&&(R(0,`tr`)(1,`td`),K(2),z(),R(3,`td`,7),K(4),z(),R(5,`td`,6),K(6),z()()),e&2){let e=t.$implicit,n=W(2);D(2),q(e.label),D(2),q(n.format(e.at)),D(2),q(e.source)}}function eW(e,t){e&1&&(R(0,`p`,6),K(1,` Load `),R(2,`code`),K(3,`@pangular-inspector/devtools/startup-hook`),z(),K(4,` from the polyfills of the development build to time each provider's construction. `),z())}function tW(e,t){if(e&1&&(R(0,`p`,6),K(1),z()),e&2){let e=W();D(),J(` `,e.providers.note||`Provider timing is unavailable on this page.`,` `)}}function nW(e,t){e&1&&K(0,` Recording until one second after the app is first stable. `)}function rW(e,t){if(e&1&&(R(0,`tr`)(1,`td`,9),K(2),z(),R(3,`td`,7),K(4),z(),R(5,`td`,7),K(6),z(),R(7,`td`,7),K(8),z()()),e&2){let e=t.$implicit,n=W(4);D(2),q(e.name),D(2),q(n.format(e.selfMs)),D(2),q(n.format(e.ms)),D(2),q(e.count)}}function iW(e,t){if(e&1&&(R(0,`div`,8)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,4),K(5,`Provider`),z(),R(6,`th`,4),K(7,`Own time`),z(),R(8,`th`,4),K(9,`Total`),z(),R(10,`th`,4),K(11,`Instances`),z()()(),R(12,`tbody`),M(13,rW,9,4,`tr`,null,QU),z()()()),e&2){let e=W(3);D(13),N(e.slowest())}}function aW(e,t){if(e&1&&(R(0,`p`,6),A(1,nW,1,0),K(2),z(),A(3,iW,15,0,`div`,8)),e&2){let e=W(),t=W();D(),j(e.providers.status===`recording`?1:-1),D(),Y(` `,e.providers.count,` provider instances, `,t.format(e.providers.totalSelfMs),` of construction, from Angular's own profiling. Own time leaves out what each one created. Components and directives show up too, since Angular creates them through injectors. `),D(),j(t.slowest().length?3:-1)}}function oW(e,t){if(e&1&&(R(0,`section`,0)(1,`h2`,1),K(2,`Startup`),z(),R(3,`p`,2),K(4),z(),R(5,`div`,3)(6,`table`)(7,`thead`)(8,`tr`)(9,`th`,4),K(10,`Milestone`),z(),R(11,`th`,4),K(12,`At`),z(),R(13,`th`,4),K(14,`Source`),z()()(),R(15,`tbody`),M(16,$U,7,3,`tr`,null,ZU),z()()(),R(18,`h3`,5),K(19,`Slowest providers`),z(),A(20,eW,5,0,`p`,6)(21,tW,2,1,`p`,6)(22,aW,4,4),z()),e&2){let e,n=W();D(4),q(n.intro()),D(12),N(n.steps()),D(4),j((e=t.providers.status)===`needs-hook`?20:e===`unavailable`?21:22)}}function sW(e){return e>=1e3?`${(e/1e3).toFixed(2)} s`:`${Math.round(e*10)/10} ms`}function cW(e){let t=[],n=(e,n,r)=>{typeof n==`number`&&t.push({label:e,at:n,source:r})};return n(`DOM content loaded`,e.navigation.domContentLoaded,`Navigation timing`),n(`First contentful paint`,e.navigation.firstContentfulPaint,`Paint timing`),n(`Angular started`,e.angularStart?.at,e.angularStart?.source===`hook`?`Startup hook`:`First Angular feature mark`),n(`Root component created`,e.bootstrapComponent?.end,`Angular profiler`),n(e.firstStable?.exact===!1?`First stable, at the latest`:`First stable`,e.firstStable?.at,`ApplicationRef.isStable`),n(`Load event`,e.navigation.load,`Navigation timing`),n(`Overlay started`,e.overlayStart,`Overlay`),t.sort((e,t)=>e.at-t.at)}function lW(e){let t=e?.pages;return!t||typeof t!=`object`?[]:Object.values(t).filter(e=>e&&typeof e.pageId==`string`&&e.providers).sort((e,t)=>t.reportedAt-e.reportedAt)}var uW=10,dW=class e{rpc=$(null);pageId=$(null);destroyRef=S(vs);unsubscribe;format=sW;pages=E([]);page=X(()=>{let e=this.pages(),t=this.pageId();return(t?e.find(e=>e.pageId===t):void 0)??e[0]??null});steps=X(()=>{let e=this.page();return e?cW(e):[]});slowest=X(()=>this.page()?.providers.slowest.slice(0,uW)??[]);intro=X(()=>{let e=this.page(),t=e?.angularVersion?` (Angular ${e.angularVersion})`:``,n=this.total();return`From navigation start to the app's first stable state on the live page${t}${n?`: ${n.exact?``:`at most `}${sW(n.ms)} from Angular's start to stable`:``}.`});total=X(()=>{let e=this.page();return!e?.angularStart||!e.firstStable?null:{ms:Math.max(0,e.firstStable.at-e.angularStart.at),exact:e.firstStable.exact}});constructor(){ac(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}loadId=0;async load(e){let t=++this.loadId,n=()=>!this.destroyRef.destroyed&&t===this.loadId&&this.rpc()===e;try{let t=await e.scope(`pangular`).rpc.sharedState(`startup`);if(!n())return;let r=e=>this.pages.set(lW(e));r(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,r)}catch{if(!n())return;this.pages.set([])}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-startup-section`]],inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`]},decls:1,vars:1,consts:[[`aria-labelledby`,`startup-title`,1,`startup`],[`id`,`startup-title`],[1,`intro`],[`tabindex`,`0`,`role`,`region`,`aria-label`,`Startup milestones`,1,`table-wrap`],[`scope`,`col`],[1,`label`],[1,`muted`],[1,`num`],[`tabindex`,`0`,`role`,`region`,`aria-label`,`Slowest providers`,1,`table-wrap`],[1,`mono`]],template:function(e,t){if(e&1&&A(0,oW,23,2,`section`,0),e&2){let e;j((e=t.page())?0:-1,e)}},styles:[`[_nghost-%COMP%] { +}`]})},$U=`pangular-pref`;function eW(e){try{let t=localStorage.getItem(`${$U}:${e}`);return t===`true`||t!==`false`&&null}catch{return null}}function tW(e,t){try{localStorage.setItem(`${$U}:${e}`,String(t))}catch{}}var nW=(e,t)=>t.label,rW=(e,t)=>t.name;function iW(e,t){if(e&1&&(R(0,`tr`)(1,`td`),K(2),z(),R(3,`td`,7),K(4),z(),R(5,`td`,6),K(6),z()()),e&2){let e=t.$implicit,n=W(2);D(2),q(e.label),D(2),q(n.format(e.at)),D(2),q(e.source)}}function aW(e,t){e&1&&(R(0,`p`,6),K(1,` Load `),R(2,`code`),K(3,`@pangular-inspector/devtools/startup-hook`),z(),K(4,` from the polyfills of the development build to time each provider's construction. `),z())}function oW(e,t){if(e&1&&(R(0,`p`,6),K(1),z()),e&2){let e=W();D(),J(` `,e.providers.note||`Provider timing is unavailable on this page.`,` `)}}function sW(e,t){e&1&&K(0,` Recording until one second after the app is first stable. `)}function cW(e,t){if(e&1&&(R(0,`tr`)(1,`td`,9),K(2),z(),R(3,`td`,7),K(4),z(),R(5,`td`,7),K(6),z(),R(7,`td`,7),K(8),z()()),e&2){let e=t.$implicit,n=W(4);D(2),q(e.name),D(2),q(n.format(e.selfMs)),D(2),q(n.format(e.ms)),D(2),q(e.count)}}function lW(e,t){if(e&1&&(R(0,`div`,8)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,4),K(5,`Provider`),z(),R(6,`th`,4),K(7,`Own time`),z(),R(8,`th`,4),K(9,`Total`),z(),R(10,`th`,4),K(11,`Instances`),z()()(),R(12,`tbody`),M(13,cW,9,4,`tr`,null,rW),z()()()),e&2){let e=W(3);D(13),N(e.slowest())}}function uW(e,t){if(e&1&&(R(0,`p`,6),A(1,sW,1,0),K(2),z(),A(3,lW,15,0,`div`,8)),e&2){let e=W(),t=W();D(),j(e.providers.status===`recording`?1:-1),D(),Y(` `,e.providers.count,` provider instances, `,t.format(e.providers.totalSelfMs),` of construction, from Angular's own profiling. Own time leaves out what each one created. Components and directives show up too, since Angular creates them through injectors. `),D(),j(t.slowest().length?3:-1)}}function dW(e,t){if(e&1&&(R(0,`section`,0)(1,`h2`,1),K(2,`Startup`),z(),R(3,`p`,2),K(4),z(),R(5,`div`,3)(6,`table`)(7,`thead`)(8,`tr`)(9,`th`,4),K(10,`Milestone`),z(),R(11,`th`,4),K(12,`At`),z(),R(13,`th`,4),K(14,`Source`),z()()(),R(15,`tbody`),M(16,iW,7,3,`tr`,null,nW),z()()(),R(18,`h3`,5),K(19,`Slowest providers`),z(),A(20,aW,5,0,`p`,6)(21,oW,2,1,`p`,6)(22,uW,4,4),z()),e&2){let e,n=W();D(4),q(n.intro()),D(12),N(n.steps()),D(4),j((e=t.providers.status)===`needs-hook`?20:e===`unavailable`?21:22)}}function fW(e){return e>=1e3?`${(e/1e3).toFixed(2)} s`:`${Math.round(e*10)/10} ms`}function pW(e){let t=[],n=(e,n,r)=>{typeof n==`number`&&t.push({label:e,at:n,source:r})};return n(`DOM content loaded`,e.navigation.domContentLoaded,`Navigation timing`),n(`First contentful paint`,e.navigation.firstContentfulPaint,`Paint timing`),n(`Angular started`,e.angularStart?.at,e.angularStart?.source===`hook`?`Startup hook`:`First Angular feature mark`),n(`Root component created`,e.bootstrapComponent?.end,`Angular profiler`),n(e.firstStable?.exact===!1?`First stable, at the latest`:`First stable`,e.firstStable?.at,`ApplicationRef.isStable`),n(`Load event`,e.navigation.load,`Navigation timing`),n(`Overlay started`,e.overlayStart,`Overlay`),t.sort((e,t)=>e.at-t.at)}function mW(e){let t=e?.pages;return!t||typeof t!=`object`?[]:Object.values(t).filter(e=>e&&typeof e.pageId==`string`&&e.providers).sort((e,t)=>t.reportedAt-e.reportedAt)}var hW=10,gW=class e{rpc=$(null);pageId=$(null);destroyRef=S(vs);unsubscribe;format=fW;pages=E([]);page=X(()=>{let e=this.pages(),t=this.pageId();return(t?e.find(e=>e.pageId===t):void 0)??e[0]??null});steps=X(()=>{let e=this.page();return e?pW(e):[]});slowest=X(()=>this.page()?.providers.slowest.slice(0,hW)??[]);intro=X(()=>{let e=this.page(),t=e?.angularVersion?` (Angular ${e.angularVersion})`:``,n=this.total();return`From navigation start to the app's first stable state on the live page${t}${n?`: ${n.exact?``:`at most `}${fW(n.ms)} from Angular's start to stable`:``}.`});total=X(()=>{let e=this.page();return!e?.angularStart||!e.firstStable?null:{ms:Math.max(0,e.firstStable.at-e.angularStart.at),exact:e.firstStable.exact}});constructor(){ac(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}loadId=0;async load(e){let t=++this.loadId,n=()=>!this.destroyRef.destroyed&&t===this.loadId&&this.rpc()===e;try{let t=await e.scope(`pangular`).rpc.sharedState(`startup`);if(!n())return;let r=e=>this.pages.set(mW(e));r(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,r)}catch{if(!n())return;this.pages.set([])}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-startup-section`]],inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`]},decls:1,vars:1,consts:[[`aria-labelledby`,`startup-title`,1,`startup`],[`id`,`startup-title`],[1,`intro`],[`tabindex`,`0`,`role`,`region`,`aria-label`,`Startup milestones`,1,`table-wrap`],[`scope`,`col`],[1,`label`],[1,`muted`],[1,`num`],[`tabindex`,`0`,`role`,`region`,`aria-label`,`Slowest providers`,1,`table-wrap`],[1,`mono`]],template:function(e,t){if(e&1&&A(0,dW,23,2,`section`,0),e&2){let e;j((e=t.page())?0:-1,e)}},styles:[`[_nghost-%COMP%] { display: block; } @@ -8971,7 +8985,7 @@ td.muted[_ngcontent-%COMP%] { .num[_ngcontent-%COMP%] { font-variant-numeric: tabular-nums; white-space: nowrap; -}`]})},fW=`pangular-pref:pane`;function pW(e,t){try{let n=Number(localStorage.getItem(`${fW}:${e}`));return Number.isFinite(n)&&n>0?Math.round(n):t}catch{return t}}function mW(e,t){try{t===null?localStorage.removeItem(`${fW}:${e}`):localStorage.setItem(`${fW}:${e}`,String(Math.round(t)))}catch{}}var hW=class e{view=$.required();pane=$(`after`);size=rv(380);min=$(240);max=$(720);defaultSize=$(380);label=$(`Resize the detail panel`);controls=$(null);valueText=X(()=>`${this.size()} pixels wide`);dragging=E(!1);start=null;clamp(e){return Math.round(Math.min(this.max(),Math.max(this.min(),e)))}set(e,t=!0){let n=this.clamp(e);n!==this.size()&&this.size.set(n),t&&mW(this.view(),n)}onKey(e){let t=e.shiftKey?64:16,n=this.pane()===`before`?1:-1,r={ArrowLeft:-t*n,ArrowRight:t*n};e.key in r?(e.preventDefault(),this.set(this.size()+r[e.key])):(e.key===`Home`||e.key===`End`)&&(e.preventDefault(),this.set(e.key===`Home`?this.min():this.max()))}onPointerDown(e){e.button===0&&(e.preventDefault(),this.start={x:e.clientX,size:this.size()},this.dragging.set(!0),e.currentTarget?.setPointerCapture?.(e.pointerId))}onPointerMove(e){if(!this.start)return;let t=e.clientX-this.start.x;this.set(this.start.size+(this.pane()===`before`?t:-t),!1)}onPointerEnd(e){this.start&&(this.start=null,this.dragging.set(!1),e.currentTarget?.releasePointerCapture?.(e.pointerId),mW(this.view(),this.size()))}reset(){this.size.set(this.clamp(this.defaultSize())),mW(this.view(),null)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-splitter`]],hostAttrs:[`role`,`separator`,`tabindex`,`0`,`aria-orientation`,`vertical`,`title`,`Drag or use the arrow keys to resize. Double click to reset the width.`],hostVars:8,hostBindings:function(e,t){e&1&&H(`keydown`,function(e){return t.onKey(e)})(`pointerdown`,function(e){return t.onPointerDown(e)})(`pointermove`,function(e){return t.onPointerMove(e)})(`pointerup`,function(e){return t.onPointerEnd(e)})(`pointercancel`,function(e){return t.onPointerEnd(e)})(`dblclick`,function(){return t.reset()}),e&2&&(k(`aria-label`,t.label())(`aria-controls`,t.controls())(`aria-valuenow`,t.size())(`aria-valuemin`,t.min())(`aria-valuemax`,t.max())(`aria-valuetext`,t.valueText()),G(`dragging`,t.dragging()))},inputs:{view:[1,`view`],pane:[1,`pane`],size:[1,`size`],min:[1,`min`],max:[1,`max`],defaultSize:[1,`defaultSize`],label:[1,`label`],controls:[1,`controls`]},outputs:{size:`sizeChange`},decls:1,vars:0,consts:[[`aria-hidden`,`true`,1,`grip`]],template:function(e,t){e&1&&og(0,`span`,0)},styles:[`[_nghost-%COMP%] { +}`]})},_W=`pangular-pref:pane`;function vW(e,t){try{let n=Number(localStorage.getItem(`${_W}:${e}`));return Number.isFinite(n)&&n>0?Math.round(n):t}catch{return t}}function yW(e,t){try{t===null?localStorage.removeItem(`${_W}:${e}`):localStorage.setItem(`${_W}:${e}`,String(Math.round(t)))}catch{}}var bW=class e{view=$.required();pane=$(`after`);size=av(380);min=$(240);max=$(720);defaultSize=$(380);label=$(`Resize the detail panel`);controls=$(null);valueText=X(()=>`${this.size()} pixels wide`);dragging=E(!1);start=null;clamp(e){return Math.round(Math.min(this.max(),Math.max(this.min(),e)))}set(e,t=!0){let n=this.clamp(e);n!==this.size()&&this.size.set(n),t&&yW(this.view(),n)}onKey(e){let t=e.shiftKey?64:16,n=this.pane()===`before`?1:-1,r={ArrowLeft:-t*n,ArrowRight:t*n};e.key in r?(e.preventDefault(),this.set(this.size()+r[e.key])):(e.key===`Home`||e.key===`End`)&&(e.preventDefault(),this.set(e.key===`Home`?this.min():this.max()))}onPointerDown(e){e.button===0&&(e.preventDefault(),this.start={x:e.clientX,size:this.size()},this.dragging.set(!0),e.currentTarget?.setPointerCapture?.(e.pointerId))}onPointerMove(e){if(!this.start)return;let t=e.clientX-this.start.x;this.set(this.start.size+(this.pane()===`before`?t:-t),!1)}onPointerEnd(e){this.start&&(this.start=null,this.dragging.set(!1),e.currentTarget?.releasePointerCapture?.(e.pointerId),yW(this.view(),this.size()))}reset(){this.size.set(this.clamp(this.defaultSize())),yW(this.view(),null)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-splitter`]],hostAttrs:[`role`,`separator`,`tabindex`,`0`,`aria-orientation`,`vertical`,`title`,`Drag or use the arrow keys to resize. Double click to reset the width.`],hostVars:8,hostBindings:function(e,t){e&1&&H(`keydown`,function(e){return t.onKey(e)})(`pointerdown`,function(e){return t.onPointerDown(e)})(`pointermove`,function(e){return t.onPointerMove(e)})(`pointerup`,function(e){return t.onPointerEnd(e)})(`pointercancel`,function(e){return t.onPointerEnd(e)})(`dblclick`,function(){return t.reset()}),e&2&&(k(`aria-label`,t.label())(`aria-controls`,t.controls())(`aria-valuenow`,t.size())(`aria-valuemin`,t.min())(`aria-valuemax`,t.max())(`aria-valuetext`,t.valueText()),G(`dragging`,t.dragging()))},inputs:{view:[1,`view`],pane:[1,`pane`],size:[1,`size`],min:[1,`min`],max:[1,`max`],defaultSize:[1,`defaultSize`],label:[1,`label`],controls:[1,`controls`]},outputs:{size:`sizeChange`},decls:1,vars:0,consts:[[`aria-hidden`,`true`,1,`grip`]],template:function(e,t){e&1&&sg(0,`span`,0)},styles:[`[_nghost-%COMP%] { position: relative; display: block; align-self: stretch; @@ -9011,7 +9025,7 @@ td.muted[_ngcontent-%COMP%] { .grip[_ngcontent-%COMP%] { transition: none; } -}`]})},gW=[`queryInput`],_W=(e,t,n,r)=>({kind:`provider`,injectorId:e,token:t,tokenId:n,index:r}),vW=()=>({compact:!1}),yW=()=>({compact:!0}),bW=(e,t)=>t.node.injector.id,xW=(e,t)=>t.id,SW=(e,t)=>t.token+t.file+t.line,CW=(e,t)=>t.from+(t.tokenId??t.token)+e,wW=(e,t)=>t.id+e,TW=(e,t)=>(t.tokenId??t.token)+e,EW=(e,t)=>t.file+t.line,DW=(e,t)=>t.type;function OW(e,t){if(e&1){let e=B();F(0,`div`,6)(1,`p`,7),K(2),I(),F(3,`p`,8),K(4,` The devtools server did not answer. Check that it is still running, then retry. `),I(),F(5,`button`,9),H(`click`,function(){return C(e),w(W().retry())}),K(6),I()()}if(e&2){let e=t.compact,n=W();G(`compact`,e),D(2),J(` `,e?`Couldn't load the live injector tree`:`Couldn't load DI data`,` `),D(3),k(`aria-disabled`,n.retrying()||null),D(),J(` `,n.retrying()?`Retrying…`:`Retry`,` `)}}function kW(e,t){if(e&1){let e=B();F(0,`div`,10)(1,`span`,11),K(2,`Page`),I(),F(3,`app-select`,12),H(`valueChange`,function(t){return C(e),w(W(2).selectPage(t))}),I()()}if(e&2){let e=W(2);D(3),P(`options`,e.pageOptions())(`value`,e.shownPageId())}}function AW(e,t){e&1&&A(0,kW,4,2,`div`,10),e&2&&j(W().pageOptions().length>1?0:-1)}function jW(e,t){if(e&1){let e=B();F(0,`label`,20)(1,`input`,21),H(`change`,function(){C(e);let t=W(2);return w(t.componentsOnly.set(!t.componentsOnly()))}),I(),K(2,` Components only `),I()}if(e&2){let e=W(2);D(),P(`checked`,e.componentsOnly())}}function MW(e,t){if(e&1&&(F(0,`span`,22),K(1),I()),e&2){let e=W(2);D(),q(e.frameworkHiddenText())}}function NW(e,t){e&1&&(F(0,`span`,23),K(1),I()),e&2&&(D(),J(`Change detection: `,t))}function PW(e,t){if(e&1&&(F(0,`p`,27),T(),F(1,`svg`,25),L(2,`circle`,39)(3,`path`,40),I(),cs(),F(4,`span`)(5,`strong`),K(6,`The page reported only part of its injector tree.`),I(),K(7),I()()),e&2){let e=W(2);D(7),__(` It keeps at most `,e.limits().elements,` element injectors and `,e.limits().injectors,` in all, and leaves out injectors nested more than `,e.limits().depth,` levels deep, so a lookup path or a provider can point to one that is not listed. `)}}function FW(e,t){if(e&1){let e=B();F(0,`button`,44),H(`click`,function(){let t=C(e).$implicit;return w(W(3).reveal(t.id))}),L(1,`span`,45),F(2,`span`,46),K(3),I(),F(4,`span`,47),K(5),I()()}if(e&2){let e=t.$implicit,n=W(3);D(),Xg(`background`,n.tone(e.kind)),D(2),q(e.label),D(2),q(e.tokens)}}function IW(e,t){e&1&&(F(0,`span`,43),K(1),I()),e&2&&(D(),J(`+`,t,` more`))}function LW(e,t){if(e&1&&(F(0,`div`,28)(1,`span`,41),K(2,`Provided by`),I(),M(3,FW,6,4,`button`,42,xW),A(5,IW,2,1,`span`,43),I()),e&2){let e,t=W(2);D(3),N(t.providedBy()),D(2),j((e=t.providedByMore())?5:-1,e)}}function RW(e,t){if(e&1){let e=B();F(0,`div`,29),K(1),F(2,`button`,48),H(`click`,function(){return C(e),w(W(2).clearQuery())}),K(3,`Clear filters`),I()()}if(e&2){let e=W(2);D(),J(` Nothing here matches “`,e.query().trim(),`”. `)}}function zW(e,t){if(e&1&&(F(0,`span`,57),K(1),I()),e&2){let e=W().$implicit;D(),J(`providedIn: `,e.providedIn)}}function BW(e,t){if(e&1&&(F(0,`li`)(1,`span`,56),K(2),I(),A(3,zW,2,1,`span`,57),L(4,`app-source-link`,58),I()),e&2){let e=t.$implicit;D(2),q(e.token),D(),j(e.providedIn?3:-1),D(),P(`file`,e.file)(`line`,e.line)}}function VW(e,t){if(e&1){let e=B();F(0,`div`,30)(1,`button`,49),H(`click`,function(){C(e);let t=W(2);return w(t.orphansOpen.set(!t.orphansOpen()))}),T(),F(2,`svg`,50),L(3,`path`,51),I(),cs(),F(4,`span`,52),K(5,`Hint`),I(),K(6),I(),F(7,`div`,53)(8,`p`,54),K(9,` Provided in your source, but nothing on this page has injected them so far. This is not an error: a guard, an interceptor or code that has not run yet may still use them. `),I(),F(10,`ul`,55),M(11,BW,5,4,`li`,null,SW),I()()()}if(e&2){let e=W(2);D(),k(`aria-expanded`,e.orphansOpen()),D(),G(`open`,e.orphansOpen()),D(4),J(` `,e.orphanedText(),` `),D(),P(`hidden`,!e.orphansOpen()),D(4),N(e.orphaned())}}function HW(e,t){e&1&&K(0,` Turn off “Hide framework” to see Angular's own injectors. `)}function UW(e,t){e&1&&K(0,` None of them provide anything themselves. `)}function WW(e,t){e&1&&K(0,` Turn off “Components only” to see directives. `)}function GW(e,t){e&1&&K(0,` Try a different search. `)}function KW(e,t){if(e&1&&(F(0,`div`,32)(1,`p`,7),K(2,`No injectors to show`),I(),F(3,`p`,8),A(4,HW,1,0)(5,UW,1,0)(6,WW,1,0)(7,GW,1,0),I()()),e&2){let e=W(2);D(4),j(e.hideFramework()&&e.frameworkHiddenCount().injectors>0?4:e.onlyProviding()?5:e.componentsOnly()&&e.view()===`element`?6:7)}}function qW(e,t){if(e&1){let e=B();F(0,`span`,70),H(`click`,function(t){C(e);let n=W().$implicit;return w(W(2).toggle(n.node.injector.id,t))}),T(),F(1,`svg`,71),L(2,`path`,51),I()()}if(e&2){let e=W().$implicit;G(`open`,e.expanded)}}function JW(e,t){e&1&&L(0,`span`,61)}function YW(e,t){e&1&&(F(0,`span`,65),K(1,`inactive`),I())}function XW(e,t){if(e&1&&(F(0,`span`,66),K(1),I()),e&2){let e=W().$implicit;D(),q(e.node.injector.component)}}function ZW(e,t){if(e&1&&(F(0,`span`,66),K(1),I()),e&2){let e=W().$implicit;D(),q(e.node.injector.directives.join(`, `))}}function QW(e,t){if(e&1&&(F(0,`span`,68),T(),F(1,`svg`,25),L(2,`path`,72),I(),cs(),F(3,`span`,63),K(4,`injects`),I(),K(5),I()),e&2){let e=W().$implicit;k(`title`,e.node.dependencies.length+` injected`),D(5),J(` `,e.node.dependencies.length,` `)}}function $W(e,t){if(e&1&&(F(0,`span`,69),T(),F(1,`svg`,25),L(2,`path`,73),I(),cs(),F(3,`span`,63),K(4,`provides`),I(),K(5),I()),e&2){let e=t;k(`title`,e+` provided`),D(5),J(` `,e,` `)}}function eG(e,t){if(e&1){let e=B();F(0,`div`,59),H(`click`,function(){let t=C(e).$implicit;return w(W(2).select(t.node.injector.id))})(`focus`,function(){let t=C(e).$implicit,n=W(2);return n.focusId.set(t.node.injector.id),w(n.highlight(t.node))})(`blur`,function(){return C(e),w(W(2).highlight(null))})(`mouseenter`,function(){let t=C(e).$implicit;return w(W(2).highlight(t.node))})(`mouseleave`,function(){return C(e),w(W(2).highlight(null))}),A(1,qW,3,2,`span`,60)(2,JW,1,0,`span`,61),F(3,`span`,62),K(4),I(),F(5,`span`,63),K(6),I(),F(7,`span`,64),K(8),I(),A(9,YW,2,0,`span`,65),A(10,XW,2,1,`span`,66)(11,ZW,2,1,`span`,66),F(12,`span`,67),A(13,QW,6,2,`span`,68),A(14,$W,6,2,`span`,69),I()()}if(e&2){let e,n=t.$implicit,r=W(2);Xg(`--%NS%depth`,n.depth),G(`selected`,r.selected()?.injector?.id===n.node.injector.id),k(`aria-level`,n.depth+1)(`aria-expanded`,n.hasChildren?n.expanded:null)(`aria-selected`,r.selected()?.injector?.id===n.node.injector.id)(`tabindex`,r.rovingId()===n.node.injector.id?0:-1)(`data-id`,n.node.injector.id),D(),j(n.hasChildren?1:2),D(2),Xg(`--%NS%tone`,r.tone(r.kind(n.node))),k(`title`,r.kind(n.node)),D(),q(r.kind(n.node)[0].toUpperCase()),D(2),q(r.kind(n.node)),D(2),q(r.label(n.node)),D(),j(n.node.injector.inactive?9:-1),D(),j(n.node.injector.component?10:n.node.injector.directives?.length?11:-1),D(3),j((n.node.dependencies?.length??0)>0?13:-1),D(),j((e=r.providerCount(n.node))?14:-1,e)}}function tG(e,t){if(e&1){let e=B();F(0,`button`,9),H(`click`,function(){let t=C(e);return w(W(3).reveal(t.node.injector.id))}),K(1),I()}if(e&2){let e=W(3);D(),J(` Show `,e.label(t.node),` `)}}function nG(e,t){if(e&1&&(F(0,`section`,36)(1,`header`,74)(2,`h2`,75),K(3),I()(),F(4,`div`,76)(5,`p`,8),K(6,` This injector is no longer on the page. Its component or directive was destroyed. `),I(),A(7,tG,2,1,`button`,77),I()()),e&2){let e,n=W(2);D(3),q(t),D(4),j((e=n.rows()[0])?7:-1,e)}}function rG(e,t){if(e&1&&(F(0,`li`),K(1),I()),e&2){let e=t.$implicit;G(`is-component`,e===W(2).injector.component),D(),q(e)}}function iG(e,t){if(e&1&&(F(0,`ul`,79),M(1,rG,2,3,`li`,88,Yh),I()),e&2){let e=W();D(),N(e.injector.directives)}}function aG(e,t){if(e&1){let e=B();F(0,`button`,89),H(`click`,function(){let t=C(e);return w(W(3).openComponent(t))}),K(1,` Show in Components `),F(2,`span`,63),K(3),I()()}if(e&2){let e=W();D(3),J(`: `,e.injector.component)}}function oG(e,t){e&1&&(F(0,`p`,81),K(1,` Inactive: the router loaded this route's injector, but no element on the page uses it now. It keeps the services it created until the app is reloaded. `),I())}function sG(e,t){if(e&1&&(F(0,`span`,90),L(1,`span`,45),K(2,` Null injector `),F(3,`span`,92),K(4,`throws NullInjectorError`),I()()),e&2){let e=W(4);D(),Xg(`background`,e.tone(`null`))}}function cG(e,t){if(e&1&&(F(0,`span`,94),K(1),F(2,`span`,63),K(3),I()()),e&2){let e=W(2).$implicit;D(),J(` `,e.providers,` `),D(2),q(e.providers===1?`provider`:`providers`)}}function lG(e,t){if(e&1){let e=B();F(0,`button`,93),H(`click`,function(){C(e);let t=W().$implicit;return w(W(3).reveal(t.id))}),L(1,`span`,45),F(2,`span`,46),K(3),I(),A(4,cG,4,2,`span`,94),I()}if(e&2){let e=W().$implicit,t=W(3);D(),Xg(`background`,t.tone(e.kind)),D(2),q(e.label),D(),j(e.providers?4:-1)}}function uG(e,t){if(e&1&&(F(0,`li`),A(1,sG,5,2,`span`,90)(2,lG,5,4,`button`,91),I()),e&2){let e=t.$implicit,n=t.$index,r=W(3);G(`current`,n===0),D(),j(e.id===r.nullId?1:2)}}function dG(e,t){e&1&&(F(0,`p`,54),K(1,`Only services this injector has already created are listed.`),I())}function fG(e,t){if(e&1&&(F(0,`span`,57),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function pG(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W().$implicit;D(),J(`for `,e.from)}}function mG(e,t){if(e&1){let e=B();F(0,`button`,106),H(`click`,function(){let t=C(e);return w(W(6).reveal(t))}),L(1,`span`,45),K(2,` from `),F(3,`span`,46),K(4),I()()}if(e&2){let e=t,n=W(6);D(),Xg(`background`,n.tone(n.kindById(e))),D(3),q(n.labelById(e))}}function hG(e,t){e&1&&(F(0,`span`,101),K(1,`optional, not provided`),I())}function gG(e,t){e&1&&(F(0,`span`,102),K(1,`not provided anywhere`),I())}function _G(e,t){e&1&&(F(0,`span`,46),K(1,`Null injector`),I())}function vG(e,t){if(e&1){let e=B();F(0,`button`,93),H(`click`,function(){C(e);let t=W().$implicit;return w(W(7).reveal(t.id))}),F(1,`span`,46),K(2),I()()}if(e&2){let e=W().$implicit;D(2),q(e.label)}}function yG(e,t){if(e&1&&(F(0,`li`),L(1,`span`,108),A(2,_G,2,0,`span`,46)(3,vG,3,1,`button`,91),F(4,`span`,109),K(5),I()()),e&2){let e=t.$implicit,n=W(7);Zg(`resolve-`+e.state),D(2),j(e.id===n.nullId?2:3),D(3),q(e.text)}}function bG(e,t){if(e&1&&(F(0,`ol`,105),M(1,yG,6,4,`li`,107,wW),I()),e&2){let e=W().$implicit,t=W(5);k(`aria-label`,`How Angular resolves `+e.token),D(),N(t.resolution(e))}}function xG(e,t){if(e&1){let e=B();F(0,`li`,97)(1,`div`,98)(2,`span`,56),K(3),I(),M(4,fG,2,1,`span`,57,Yh),I(),F(6,`div`,99),A(7,pG,2,1,`span`),A(8,mG,5,3,`button`,100)(9,hG,2,0,`span`,101)(10,gG,2,0,`span`,102),F(11,`button`,103),H(`click`,function(){let t=C(e),n=t.$implicit,r=t.$index,i=W(5);return w(i.toggleResolve(i.depKey(n,r)))}),K(12,` Resolution `),F(13,`span`,63),K(14),I()()(),F(15,`div`,104),A(16,bG,3,1,`ol`,105),I()()}if(e&2){let e,n=t.$implicit,r=t.$index,i=W(3),a=W(2);G(`hit`,a.matches(n.token)),D(3),q(n.token),D(),N(n.flags),D(3),j(i.injector.type!==`element`||i.injector.directives&&i.injector.directives.length>1?7:-1),D(),j((e=n.providedBy)?8:n.flags.includes(`optional`)?9:10,e),D(3),k(`aria-expanded`,a.resolvingKey()===a.depKey(n,r))(`aria-controls`,`di-resolve-`+r),D(3),J(`of `,n.token),D(),P(`id`,`di-resolve-`+r)(`hidden`,a.resolvingKey()!==a.depKey(n,r)),D(),j(a.resolvingKey()===a.depKey(n,r)?16:-1)}}function SG(e,t){if(e&1&&(F(0,`ul`,95),M(1,xG,17,11,`li`,96,CW),I()),e&2){let e=W(2);D(),N(e.dependencies)}}function CG(e,t){e&1&&(F(0,`p`,87),K(1,`Nothing is injected through the constructor or inject().`),I())}function wG(e,t){e&1&&(F(0,`p`,87),K(1,`No service created here has injected anything yet.`),I())}function TG(e,t){if(e&1&&(F(0,`div`,82)(1,`h3`),K(2),F(3,`span`,17),K(4),I()(),A(5,dG,2,0,`p`,54),A(6,SG,3,0,`ul`,95)(7,CG,2,0,`p`,87)(8,wG,2,0,`p`,87),I()),e&2){let e=W();D(2),J(` `,e.injector.type===`element`?`Injected here`:`Injected by its services`,` `),D(2),q(e.dependencies?.length??0),D(),j(e.injector.type===`element`?-1:5),D(),j(e.dependencies?.length?6:e.injector.type===`element`?7:8)}}function EG(e,t){if(e&1){let e=B();F(0,`p`,85),K(1),F(2,`button`,48),H(`click`,function(){return C(e),w(W(3).setHideFramework(!1))}),K(3,` Show them `),I()()}if(e&2){let e=t;D(),Y(` `,e,` framework `,e===1?`provider`:`providers`,` hidden. `)}}function DG(e,t){e&1&&(F(0,`span`,57),K(1,`viewProviders`),I())}function OG(e,t){e&1&&(F(0,`span`,57),K(1,`multi`),I())}function kG(e,t){e&1&&(F(0,`span`,57),K(1,`Angular`),I())}function AG(e,t){if(e&1&&(F(0,`div`,99),K(1),I()),e&2){let e=W(2).$implicit;D(),J(`via `,e.importPath.join(` › `))}}function jG(e,t){if(e&1&&L(0,`app-source-link`,116),e&2){let e=t.$implicit;P(`file`,e.file)(`line`,e.line)}}function MG(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W();D(),J(`+`,e.more,` more`)}}function NG(e,t){if(e&1&&(F(0,`div`,113)(1,`span`),K(2,`Declared in`),I(),M(3,jG,1,2,`app-source-link`,116,EW),A(5,MG,2,1,`span`),I()),e&2){let e=t;D(3),N(e.shown),D(2),j(e.more?5:-1)}}function PG(e,t){if(e&1&&(F(0,`li`,111)(1,`div`,98)(2,`span`,56),K(3),I(),F(4,`span`,112),K(5),I(),A(6,DG,2,0,`span`,57),A(7,OG,2,0,`span`,57),A(8,kG,2,0,`span`,57),I(),A(9,AG,2,1,`div`,99),A(10,NG,6,1,`div`,113),L(11,`app-store-global`,114)(12,`app-provider-value`,115),I()),e&2){let e,t=W(),n=t.$implicit,r=t.$index,i=W(2),a=W(2);G(`hit`,a.matches(n.token)),D(3),q(n.token),D(2),q(n.type===`unknown`?`provider`:`use`+a.capital(n.type)),D(),j(n.isViewProvider?6:-1),D(),j(n.multi?7:-1),D(),j(n.framework?8:-1),D(),j(n.importPath?.length?9:-1),D(),j((e=a.sourceOf(n.token))?10:-1,e),D(),P(`rpc`,a.rpc())(`pageId`,a.shownPageId())(`target`,pne(21,_W,i.injector.id,n.token,n.tokenId,r))(`label`,n.token+a.positionSuffix(i.providers,r))(`canLog`,!0),D(),P(`rpc`,a.rpc())(`pageId`,a.shownPageId())(`injectorId`,i.injector.id)(`token`,n.token)(`tokenId`,n.tokenId)(`index`,r)(`position`,a.tokenPosition(i.providers,r))}}function FG(e,t){if(e&1&&A(0,PG,13,26,`li`,110),e&2){let e=t.$implicit;j(W(4).isHidden(e)?-1:0)}}function IG(e,t){if(e&1&&(F(0,`ul`,86),M(1,FG,1,1,null,null,TW),I()),e&2){let e=W();D(),N(e.providers)}}function LG(e,t){e&1&&K(0,` No providers or viewProviders on this element. `)}function RG(e,t){e&1&&K(0,` This injector has no providers of its own. `)}function zG(e,t){if(e&1&&(F(0,`p`,87),A(1,LG,1,0)(2,RG,1,0),I()),e&2){let e=W();D(),j(e.injector.type===`element`?1:2)}}function BG(e,t){if(e&1&&(F(0,`section`,37)(1,`header`,74)(2,`span`,78),K(3),I(),F(4,`h2`,75),K(5),I(),A(6,iG,3,0,`ul`,79),A(7,aG,4,1,`button`,80),I(),A(8,oG,2,0,`p`,81),F(9,`div`,82)(10,`h3`),K(11,`Lookup path`),I(),F(12,`p`,54),K(13,`Angular asks these injectors in order until one has the token.`),I(),F(14,`ol`,83),M(15,uG,3,3,`li`,84,xW),I()(),A(17,TG,9,4,`div`,82),F(18,`div`,82)(19,`h3`),K(20,` Provides `),F(21,`span`,17),K(22),I()(),A(23,EG,4,2,`p`,85),A(24,IG,3,0,`ul`,86)(25,zG,3,1,`p`,87),I()()),e&2){let e,n,r=t,i=W(2);D(2),Xg(`--%NS%tone`,i.tone(i.kind(r))),D(),q(i.kind(r)),D(2),q(i.label(r)),D(),j(r.injector.directives?.length?6:-1),D(),j((e=i.canShowComponent()&&r.injector.componentId)?7:-1,e),D(),j(r.injector.inactive?8:-1),D(7),N(i.path()),D(2),j(r.injector.type===`element`||r.dependencies?17:-1),D(5),q(i.providerCount(r)),D(),j((n=i.hiddenProviders(r))?23:-1,n),D(),j(i.providerCount(r)?24:i.hiddenProviders(r)?-1:25)}}function VG(e,t){if(e&1){let e=B();F(0,`p`,13),K(1,` Every component and directive gets an injector. When it asks for a token, Angular walks up this tree, then through the environment injectors, until something provides it. `),I(),F(2,`app-angular-unavailable`,14),K(3,` This tree shows the element injectors the page reports, with providers and environment injectors only where its Angular exposes them. `),I(),F(4,`div`,15)(5,`div`,16)(6,`button`,9),H(`click`,function(){return C(e),w(W().setView(`element`))}),K(7,` Elements `),F(8,`span`,17),K(9),I()(),F(10,`button`,9),H(`click`,function(){return C(e),w(W().setView(`environment`))}),K(11,` Environment `),F(12,`span`,17),K(13),I()()(),F(14,`app-search-field`,18,2),S_(`valueChange`,function(t){C(e);let n=W();return x_(n.query,t)||(n.query=t),w(t)}),I(),ug(16,19),A(17,jW,3,1,`label`,20),F(18,`label`,20)(19,`input`,21),H(`change`,function(){C(e);let t=W();return w(t.onlyProviding.set(!t.onlyProviding()))}),I(),K(20,` With providers `),I(),F(21,`label`,20)(22,`input`,21),H(`change`,function(){C(e);let t=W();return w(t.setHideFramework(!t.hideFramework()))}),I(),K(23,` Hide framework `),I(),A(24,MW,2,1,`span`,22),A(25,NW,2,1,`span`,23),F(26,`button`,24),H(`click`,function(){return C(e),w(W().refresh())}),T(),F(27,`svg`,25),L(28,`path`,26),I(),K(29,` Refresh `),I()(),A(30,PW,8,3,`p`,27),A(31,LW,6,1,`div`,28)(32,RW,4,1,`div`,29),A(33,VW,13,5,`div`,30),cs(),F(34,`div`,31),A(35,KW,8,1,`div`,32),F(36,`div`,33),H(`keydown`,function(t){return C(e),w(W().onTreeKey(t))}),M(37,eG,15,20,`div`,34,bW),I(),F(39,`app-splitter`,35),S_(`sizeChange`,function(t){C(e);let n=W();return x_(n.detailSize,t)||(n.detailSize=t),w(t)}),I(),A(40,nG,8,2,`section`,36)(41,BG,26,11,`section`,37),I(),L(42,`app-startup-section`,38)}if(e&2){let e,t,n=W(),r=kg(5);D(2),P(`page`,n.angularPage()),D(4),G(`active`,n.view()===`element`),k(`aria-pressed`,n.view()===`element`),D(3),q(n.elementCount()),D(),G(`active`,n.view()===`environment`),k(`aria-pressed`,n.view()===`environment`),D(3),q(n.environmentCount()),D(),b_(`value`,n.query),D(2),P(`ngTemplateOutlet`,r),D(),j(n.view()===`element`?17:-1),D(2),P(`checked`,n.onlyProviding()),D(3),P(`checked`,n.hideFramework()),D(2),j(n.hideFramework()?24:-1),D(),j((e=n.zone())?25:-1,e),D(),k(`aria-disabled`,!n.shownPageId()||null),D(4),j(n.truncated()?30:-1),D(),j(n.providedBy().length?31:n.query().trim()&&!n.rows().length?32:-1),D(2),j(n.orphaned().length?33:-1),D(),Xg(`--%NS%detail-size`,n.detailSize(),`px`),D(),j(n.rows().length?-1:35),D(),P(`hidden`,!n.rows().length),k(`aria-label`,n.view()===`element`?`Element injectors`:`Environment injectors`),D(),N(n.rows()),D(2),P(`min`,300)(`max`,900)(`defaultSize`,420),b_(`size`,n.detailSize),D(),j((t=n.gone())?40:(t=n.selected())?41:-1,t),D(2),P(`rpc`,n.rpc())(`pageId`,n.shownPageId())}}function HG(e,t){e&1&&(F(0,`div`,4),L(1,`span`,117),F(2,`p`,7),K(3,`Loading dependency injection data…`),I()())}function UG(e,t){e&1&&ug(0,5),e&2&&(W(),P(`ngTemplateOutlet`,kg(3))(`ngTemplateOutletContext`,F_(2,vW)))}function WG(e,t){if(e&1&&(F(0,`div`,15),ug(1,19),I()),e&2){W(2);let e=kg(5);D(),P(`ngTemplateOutlet`,e)}}function GG(e,t){e&1&&(A(0,WG,2,1,`div`,15),F(1,`div`,32)(2,`p`,7),K(3,`No DI data found`),I(),F(4,`p`,8),K(5,` Open the app in a browser with the devtools connected to see its live injectors. No providers, injectables or inject() calls were found in the source either. `),I()()),e&2&&j(W().pageOptions().length>1?0:-1)}function KG(e,t){e&1&&ug(0,5),e&2&&(W(2),P(`ngTemplateOutlet`,kg(3))(`ngTemplateOutletContext`,F_(2,yW)))}function qG(e,t){if(e&1){let e=B();F(0,`div`,32)(1,`p`,7),K(2),I(),F(3,`p`,8),K(4,`Try part of a token name or a file path.`),I(),F(5,`button`,9),H(`click`,function(){return C(e),w(W(2).clearQuery())}),K(6,`Clear filters`),I()()}if(e&2){let e=W(2);D(2),J(`No providers match “`,e.query(),`”`)}}function JG(e,t){if(e&1){let e=B();F(0,`h2`)(1,`button`,125),H(`click`,function(){C(e);let t=W(4);return w(t.helpersOpen.set(!t.helpersOpen()))}),T(),F(2,`svg`,50),L(3,`path`,51),I(),K(4),cs(),F(5,`span`,126),K(6),I()()(),F(7,`p`,127),K(8,` provide*() calls the scan can't resolve to the tokens they register, such as your own provider functions. `),I()}if(e&2){let e=W().$implicit,t=W(3);D(),k(`aria-expanded`,t.helpersShown()),D(),G(`open`,t.helpersShown()),D(2),J(` `,e.label,` `),D(2),q(e.items.length),D(),P(`hidden`,!t.helpersShown())}}function YG(e,t){if(e&1&&(F(0,`h2`),K(1),F(2,`span`,126),K(3),I()()),e&2){let e=W().$implicit;D(),J(` `,e.label,` `),D(2),q(e.items.length)}}function XG(e,t){if(e&1&&(F(0,`span`,130),K(1),I()),e&2){let e=W().$implicit;D(),J(`providedIn: `,e.providedIn)}}function ZG(e,t){e&1&&(F(0,`span`,57),K(1,`helper (unresolved)`),I())}function QG(e,t){if(e&1&&(F(0,`span`,133),K(1),I()),e&2){let e=W().$implicit;D(),J(`as `,e.source)}}function $G(e,t){if(e&1&&(F(0,`li`,124)(1,`div`,128)(2,`span`,129),K(3),I(),A(4,XG,2,1,`span`,130),A(5,ZG,2,0,`span`,57),I(),F(6,`div`,131),L(7,`app-source-link`,132),A(8,QG,2,1,`span`,133),I()()),e&2){let e=t.$implicit,n=W(4);D(3),q(e.token),D(),j(e.providedIn?4:-1),D(),j(e.type===n.helperType?5:-1),D(2),P(`file`,e.file)(`line`,e.line),D(),j(e.source!==`class`&&e.source!==`providers array`&&e.type!==n.helperType?8:-1)}}function eK(e,t){if(e&1&&(F(0,`section`,122),A(1,JG,9,6)(2,YG,4,2,`h2`),F(3,`ul`,123),M(4,$G,9,6,`li`,124,SW),I()()),e&2){let e=t.$implicit,n=W(3);D(),j(e.type===n.helperType?1:2),D(2),P(`hidden`,e.type===n.helperType&&!n.helpersShown()),k(`id`,e.type===n.helperType?`di-helpers`:null),D(),N(e.items)}}function tK(e,t){if(e&1&&(F(0,`div`,121),M(1,eK,6,3,`section`,122,DW),I()),e&2){let e=W(2);D(),N(e.groupedProviders())}}function nK(e,t){if(e&1){let e=B();F(0,`div`,15)(1,`app-search-field`,118,2),S_(`valueChange`,function(t){C(e);let n=W();return x_(n.query,t)||(n.query=t),w(t)}),I(),ug(3,19),F(4,`span`,119),K(5),I()(),A(6,KG,1,3,`ng-container`,5),F(7,`p`,27),T(),F(8,`svg`,25),L(9,`circle`,39)(10,`path`,40),I(),cs(),F(11,`span`)(12,`strong`),K(13,`DI from the source scan.`),I(),K(14,` Connect the overlay to a development build to see the live injector tree. `),I()(),L(15,`app-angular-unavailable`,120),A(16,qG,7,1,`div`,32)(17,tK,3,0,`div`,121)}if(e&2){let e=W(),t=kg(5);D(),b_(`value`,e.query),D(2),P(`ngTemplateOutlet`,t),D(2),Y(` `,e.sourceMatchCount(),` of `,e.sourceProviders().length,` `),D(),j(e.loadFailed()?6:-1),D(9),P(`page`,e.angularPage()),D(),j(e.groupedProviders().length===0?16:17)}}var rK=`inj-null`,iK=`injectors.hideFramework`,aK=12,oK=`helper`,sK=new Set([`provider`,`injectable`]),cK=600,lK={component:`var(--accent-text)`,directive:`var(--directive)`,environment:`var(--ok-text)`,null:`var(--text-3)`};function uK(e){return e.injector.type===`element`?e.injector.component?`component`:`directive`:`environment`}function dK(e){return e.injector.type===`element`?`<${e.injector.name}>`:e.injector.name}function fK(e){return Array.isArray(e)}var pK=class e{rpc=$(null);focus=$(null);canShowComponent=$(!1);focusHandled=Q_();showComponent=Q_();injector=S(gs);nullId=rK;hostPage=fT();angularPages=uD(()=>this.rpc());angularPage=X(()=>dD(this.angularPages(),this.shownPageId()||this.hostPage));treeState=E(null);pageTitles=E({});chosenPageId=E(null);treePages=X(()=>{let e=this.treeState();if(!e)return{};let t=e.pages&&typeof e.pages==`object`?e.pages:{};return Object.keys(t).length||this.hostPage?t:{"":e}});shownPageId=Q({source:()=>({pages:this.treePages(),chosen:this.chosenPageId()}),computation:({pages:e,chosen:t},n)=>{let r={};for(let[t,n]of Object.entries(e))r[t]={pageId:t,reportedAt:typeof n?.reportedAt==`number`?n.reportedAt:0};return pT(r,{chosen:t,host:this.hostPage,previous:n?.value??null})}});shownPage=X(()=>{let e=this.shownPageId();return e===null?null:this.treePages()[e]??null});roots=X(()=>{let e=this.shownPage()?.roots;return fK(e)?e:[]});environment=X(()=>{let e=this.shownPage()?.environment;return fK(e)?e:[]});truncated=X(()=>this.shownPage()?.truncated===!0);limits=X(()=>{let e=this.shownPage()?.limits,t=(e,t)=>typeof e==`number`&&Number.isInteger(e)&&e>0?e:t;return{elements:t(e?.elements,2e3),injectors:t(e?.injectors,2500),depth:t(e?.depth,1e3)}});zone=X(()=>{let e=this.shownPage()?.zone;return typeof e==`string`?DE(e):null});multiPage=X(()=>!this.hostPage&&Object.keys(this.treePages()).length>1);pageOptions=X(()=>{if(!this.multiPage())return[];let e=this.pageTitles();return Object.keys(this.treePages()).map(t=>{let n=e[t];return{value:t,label:n?.title||n?.url||`Page ${t}`,hint:n?.url}})});pageKey=X(()=>this.shownPageId()??``);perPage(e){let t=new Map;return Q({source:this.pageKey,computation:(n,r)=>(r&&t.set(r.source,r.value),t.has(n)?t.get(n):e())})}sourceProviders=E([]);loaded=E(!1);treeFailed=E(!1);sourceFailed=E(!1);loadFailed=X(()=>this.treeFailed()||this.sourceFailed());retrying=E(!1);host=S(kl);view=E(`element`);query=E(``);detailSize=E(pW(`injectors`,420));queryInput=av(`queryInput`);onlyProviding=E(!1);componentsOnly=E(!0);hideFramework=E(YU(iK)??!1);collapsed=this.perPage(()=>new Set);selectedId=this.perPage(()=>null);focusId=this.perPage(()=>null);announcement=E(``);selectedLabel=this.perPage(()=>null);wasGone=!1;index=X(()=>{let e=new Map,t=new Map,n=(r,i)=>{for(let a of r)e.set(a.injector.id,a),i&&t.set(a.injector.id,i),n(a.children,a.injector.id)};n(this.roots(),null),n(this.environment(),null);let r=new Map;for(let t of e.values()){let e=t.injector.componentId;e&&t.injector.type===`element`&&r.set(e,t.injector.id)}return{map:e,parents:t,byComponent:r}});shownRoots=X(()=>this.withoutFramework(this.roots()));shownEnvironment=X(()=>this.withoutFramework(this.environment()));elementCount=X(()=>this.count(this.shownRoots()));environmentCount=X(()=>this.count(this.shownEnvironment()));frameworkHiddenCount=X(()=>{let e=this.view()===`element`?this.roots():this.environment(),t=0,n=0,r=e=>{for(let i of e)i.injector.framework?t++:n+=i.providers.filter(e=>e.framework).length,r(i.children)};return r(e),{injectors:t,providers:n}});frameworkHiddenText=X(()=>{let{injectors:e,providers:t}=this.frameworkHiddenCount(),n=(e,t)=>`${e} ${t}${e===1?``:`s`}`;return!e&&!t?`Nothing hidden`:t?e?`${n(e,`injector`)} and ${n(t,`provider`)} hidden`:`${n(t,`provider`)} hidden`:`${n(e,`injector`)} hidden`});visible=X(()=>{let e=this.view()===`element`?this.shownRoots():this.shownEnvironment();this.view()===`element`&&this.componentsOnly()&&(e=this.prune(e,e=>!!e.injector.component)),this.onlyProviding()&&(e=this.prune(e,e=>this.providerCount(e)>0));let t=this.normalizedQuery();return t&&(e=this.prune(e,e=>this.nodeMatches(e,t))),e});rows=X(()=>{let e=[],t=this.collapsed(),n=!!this.normalizedQuery(),r=(i,a)=>{for(let o of i){let i=n||!t.has(o.injector.id);e.push({node:o,depth:a,hasChildren:o.children.length>0,expanded:i}),i&&r(o.children,a+1)}};return r(this.visible(),0),e});selected=X(()=>{let e=this.selectedId();return e?this.index().map.get(e)??null:this.rows()[0]?.node??null});gone=X(()=>{let e=this.selectedId();return e&&!this.index().map.has(e)?this.selectedLabel()??`The injector`:null});rovingId=X(()=>{let e=this.rows(),t=this.focusId()??this.selected()?.injector.id;return t&&e.some(e=>e.node.injector.id===t)?t:e[0]?.node.injector.id??null});path=X(()=>{let e=this.selected();if(!e)return[];let{map:t,parents:n}=this.index(),r=e.injector.path??[];if(!r.length){r=[e.injector.id];let t=n.get(e.injector.id);for(;t;)r.push(t),t=n.get(t);r.push(rK)}return r.map(e=>{let n=t.get(e);return{id:e,label:n?dK(n):e===rK?`Null injector`:`Not listed`,kind:n?uK(n):`null`,providers:n?this.providerCount(n):0}})});providerHits=X(()=>{let e=this.normalizedQuery();if(!e)return[];let t=[];for(let n of this.index().map.values()){if(this.isHiddenInjector(n))continue;let r=n.providers.filter(t=>!this.isHidden(t)&&t.token.toLowerCase().includes(e));r.length&&t.push({id:n.injector.id,label:dK(n),kind:uK(n),tokens:r.map(e=>e.token).join(`, `)})}return t});providedBy=X(()=>this.providerHits().slice(0,aK));providedByMore=X(()=>Math.max(0,this.providerHits().length-aK));groupedProviders=X(()=>{let e=this.normalizedQuery(),t=e?this.sourceProviders().filter(t=>t.token.toLowerCase().includes(e)||t.file.toLowerCase().includes(e)):this.sourceProviders(),n=[{type:`root-provider`,label:`Root Providers (provide*)`,items:[]},{type:`injectable`,label:`Injectable Services`,items:[]},{type:`injection`,label:`inject() Calls`,items:[]},{type:`provider`,label:`Component Providers`,items:[]},{type:oK,label:`Helpers (unresolved)`,items:[]}];for(let e of t)n.find(t=>t.type===e.type)?.items.push(e);return n.filter(e=>e.items.length>0)});sourceMatchCount=X(()=>this.groupedProviders().reduce((e,t)=>e+t.items.length,0));helperType=oK;helpersOpen=E(!1);helpersShown=X(()=>this.helpersOpen()||!!this.normalizedQuery());orphaned=X(()=>{if(!this.roots().length)return[];let e=new Set,t=new Set;for(let n of this.index().map.values()){for(let t of n.dependencies??[])e.add(t.token);if(n.injector.type!==`element`)for(let e of n.providers)t.add(e.token)}let n=[],r=new Set;for(let i of this.sourceProviders()){if(!sK.has(i.type))continue;let a=i.token.slice(i.token.lastIndexOf(`.`)+1);if(e.has(a)||i.providedIn&&t.has(a))continue;let o=`${i.token}|${i.file}|${i.line}`;r.has(o)||(r.add(o),n.push(i))}return n});orphansOpen=E(!1);sourceByToken=X(()=>{let e=new Map;for(let t of this.sourceProviders()){if(!sK.has(t.type)&&t.type!==`root-provider`)continue;let n=t.token.slice(t.token.lastIndexOf(`.`)+1),r=e.get(n);r||e.set(n,r=[]),r.some(e=>e.file===t.file&&e.line===t.line)||r.push(t)}return e});sourceOf(e){let t=this.sourceByToken().get(e);return t?.length?{shown:t.slice(0,3),more:Math.max(0,t.length-3)}:null}resolvingKey=E(null);depKey(e,t){return`${t}|${e.from}|${e.tokenId??e.token}`}toggleResolve(e){this.resolvingKey.update(t=>t===e?null:e)}resolution(e){let t=this.path(),n=e.providedBy?t.findIndex(t=>t.id===e.providedBy):-1,r=e.flags.includes(`self`),i=e.flags.includes(`skipSelf`),a=e.flags.includes(`optional`);return t.map((e,t)=>{let o;o=t===0&&i?`skipped`:n>=0?t<n?`asked`:t===n?`provides`:`not-asked`:r&&t>+!!i?`not-asked`:e.id===rK?a?`null`:`throws`:`asked`;let s={asked:`asked, not here`,provides:`provides it`,skipped:`skipped (skipSelf)`,"not-asked":`not asked`,throws:`throws NullInjectorError`,null:`gives null (optional)`}[o];return{...e,state:o,text:s}})}orphanedText=X(()=>{let e=new Set(this.orphaned().map(e=>e.token)).size;return e===1?`1 provider in source is never injected on this page`:`${e} providers in source are never injected on this page`});searchSummary=X(()=>{let e=this.query().trim();if(!e)return``;let t=this.providerHits().length;return t===1?`1 injector provides “${e}”.`:t>1?`${t} injectors provide “${e}”.`:this.rows().length?`No injector provides “${e}”.`:`Nothing here matches “${e}”.`});normalizedQuery=X(()=>this.query().trim().toLowerCase());destroyRef=S(vs);stopTree=null;treeLoad=0;lastSearchMessage=``;refreshedKey=null;constructor(){ac(e=>{let t=this.searchSummary();if(!t){this.lastSearchMessage=``;return}if(t===this.lastSearchMessage)return;let n=setTimeout(()=>{this.lastSearchMessage=t,this.announcement.set(t)},cK);e(()=>clearTimeout(n))}),ac(()=>{let e=this.rpc();e&&(this.loadInjectorTree(e),this.loadSourceProviders(e))}),ac(()=>{let e=this.selected(),t=this.shownPageId(),n=e?.injector.type===`element`?e.injector.id:null,r=n&&t?`${t}|${n}`:null;r&&r!==this.refreshedKey&&(this.refreshedKey=r,Z(()=>this.requestRefresh(t,n)))}),ac(e=>{let t=this.rpc();if(!t||!this.multiPage())return;let n=!0,r=null;e(()=>{n=!1,r?.()}),t.scope(`pangular`).rpc.sharedState(`component-tree`).then(e=>{if(!n)return;let t=e=>{let t=e?.pages;this.pageTitles.set(t&&typeof t==`object`?t:{})};t(e.value()),r=e.on(`updated`,t)}).catch(()=>{})}),ac(()=>{let e=this.focus();if(!e)return;let t=this.treePages(),n=this.shownPageId();if(e.pageId&&n!==e.pageId&&t[e.pageId]){Z(()=>this.selectPage(e.pageId));return}(this.treeState()||this.treeFailed())&&Z(()=>{let t=!e.pageId||n===e.pageId?this.index().byComponent.get(e.componentId):void 0,r=t?this.index().map.get(t):void 0;t&&r?(this.reveal(t),this.announcement.set(`Showing the injector of ${dK(r)}.`)):this.announcement.set(`That component's injector is not on this page.`),this.focusHandled.emit()})}),this.destroyRef.onDestroy(()=>{this.stopTree?.(),this.highlight(null)})}setHideFramework(e){this.hideFramework.set(e),XU(iK,e)}openComponent(e){let t=this.shownPageId();this.showComponent.emit(t?{id:e,pageId:t}:{id:e})}tokenPosition(e,t){let n=e[t]?.token,r=0,i=0;return e.forEach((e,a)=>{e.token!==n||this.isHidden(e)||(i++,a<=t&&r++)}),i>1?`(${r} of ${i})`:``}positionSuffix(e,t){let n=this.tokenPosition(e,t);return n?` ${n}`:``}isHidden(e){return this.hideFramework()&&e.framework===!0}isHiddenInjector(e){return this.hideFramework()&&e.injector.framework===!0}providerCount(e){if(!this.hideFramework())return e.injector.providerCount;let t=e.providers.filter(e=>e.framework).length;return Math.max(0,e.injector.providerCount-t)}hiddenProviders(e){return this.hideFramework()?e.providers.filter(e=>e.framework).length:0}async retry(){let e=this.rpc();if(!e||this.retrying())return;let t=document.activeElement;this.retrying.set(!0);try{await Promise.all([this.loadInjectorTree(e),this.loadSourceProviders(e)])}finally{this.retrying.set(!1)}this.destroyRef.destroyed||ed(()=>{t?.isConnected&&document.activeElement!==document.body||this.host.nativeElement.querySelector(`.toolbar input, .toolbar button`)?.focus()},{injector:this.injector})}refresh(){let e=this.shownPageId();e&&(this.requestRefresh(e),this.announcement.set(`Reading the injectors again.`))}requestRefresh(e,t){let n=this.rpc();n&&n.scope(`pangular`).rpc.call(`request-injector-refresh`,t?{pageId:e,injectorId:t}:{pageId:e}).catch(()=>{})}clearQuery(){this.query.set(``),this.queryInput()?.focus()}label(e){return dK(e)}kind(e){return uK(e)}tone(e){return lK[e]??lK.null}kindById(e){let t=this.index().map.get(e);return t?uK(t):`null`}labelById(e){let t=this.index().map.get(e);return t?dK(t):e===rK?`Null injector`:`not listed`}capital(e){return e.charAt(0).toUpperCase()+e.slice(1)}matches(e){let t=this.normalizedQuery();return!!t&&e.toLowerCase().includes(t)}setView(e){this.view()!==e&&(this.view.set(e),this.choose(null),this.focusId.set(null))}select(e){this.choose(e),this.focusId.set(e)}choose(e){let t=e?this.index().map.get(e):void 0;this.selectedId.set(e),this.selectedLabel.set(t?dK(t):null),this.wasGone=!1}syncGone(){let e=this.gone()!==null;if(e&&!this.wasGone){let e=`The selected injector is no longer on the page.`;this.announcement.update(t=>t===e?`${e}\u00a0`:e)}this.wasGone=e}selectPage(e){if(!e||e===this.shownPageId())return;this.chosenPageId.set(e),this.wasGone=this.gone()!==null;let t=this.pageOptions().find(t=>t.value===e)?.label??e;this.announcement.set(`Showing the injectors of ${t}.`)}notePageGone(e){let t=this.chosenPageId();if(!t||e?.[t])return;let n=this.pageOptions().find(e=>e.value===t)?.label??`The chosen page`;this.chosenPageId.set(null),this.announcement.set(`${n} closed, so this shows another page.`),this.wasGone=!0}toggle(e,t){t?.stopPropagation(),!this.normalizedQuery()&&this.collapsed.update(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}reveal(e){let t=this.index().map.get(e);if(!t)return;this.setView(t.injector.type===`element`?`element`:`environment`);let{parents:n}=this.index();this.collapsed.update(t=>{let r=new Set(t),i=n.get(e);for(;i;)r.delete(i),i=n.get(i);return r}),this.onlyProviding()&&this.providerCount(t)===0&&this.onlyProviding.set(!1),t.injector.type===`element`&&!t.injector.component&&this.componentsOnly.set(!1),this.isHiddenInjector(t)&&this.hideFramework.set(!1);let r=this.normalizedQuery();r&&!this.nodeMatches(t,r)&&this.query.set(``),this.select(e),ed(()=>this.focusRow(e,!1),{injector:this.injector})}highlight(e){let t=this.rpc();if(!t)return;let n=e?.injector.type===`element`?e.injector.selector??null:null,r=n?{pageId:this.shownPageId()||null,selector:n}:null;t.scope(`pangular`).rpc.call(`request-page-highlight`,r).catch(()=>{})}onTreeKey(e){let t=this.rows();if(!t.length)return;let n=this.rovingId(),r=t.findIndex(e=>e.node.injector.id===n),i=Math.max(r,0),a=t[i],o=-1;switch(e.key){case`ArrowDown`:o=Math.min(i+1,t.length-1);break;case`ArrowUp`:o=Math.max(i-1,0);break;case`Home`:o=0;break;case`End`:o=t.length-1;break;case`ArrowRight`:a.hasChildren&&!a.expanded?this.toggle(a.node.injector.id):a.hasChildren&&(o=i+1);break;case`ArrowLeft`:if(a.hasChildren&&a.expanded&&!this.normalizedQuery())this.toggle(a.node.injector.id);else{let{parents:e}=this.index(),n=e.get(a.node.injector.id);for(o=-1;n&&o<0;){let r=n;o=t.findIndex(e=>e.node.injector.id===r),n=e.get(n)}}break;case`Enter`:case` `:this.select(a.node.injector.id);break;default:return}if(e.preventDefault(),o>=0){let e=t[o].node.injector.id;this.focusId.set(e),this.choose(e),queueMicrotask(()=>this.focusRow(e,!0))}}focusRow(e,t){let n=document.querySelector(`.row[data-id="${CSS.escape(e)}"]`);n&&(t&&n.focus(),n.scrollIntoView({block:`nearest`}))}clearTree(){this.stopTree?.(),this.stopTree=null}async loadInjectorTree(e){let t=++this.treeLoad;this.clearTree();let n=e.scope(`pangular`),r;try{r=await n.rpc.sharedState(`injector-tree`)}catch{t===this.treeLoad&&this.treeFailed.set(!0);return}if(this.destroyRef.destroyed||this.rpc()!==e||t!==this.treeLoad)return;this.treeFailed.set(!1);let i=e=>{let t=e&&typeof e==`object`?e:null;this.notePageGone(t?.pages),this.treeState.set(t),this.syncGone()};i(r.value()),this.clearTree(),this.stopTree=r.on(`updated`,i)}async loadSourceProviders(e){let t=e.scope(`pangular`);try{this.sourceProviders.set(await t.rpc.call(`get-providers`)),this.sourceFailed.set(!1)}catch{this.sourceProviders.set([]),this.sourceFailed.set(!0)}finally{this.loaded.set(!0)}}count(e){return e.reduce((e,t)=>e+1+this.count(t.children),0)}nodeMatches(e,t){let n=e.injector;return n.name.toLowerCase().includes(t)||!!n.component?.toLowerCase().includes(t)||!!n.directives?.some(e=>e.toLowerCase().includes(t))||e.providers.some(e=>e.token.toLowerCase().includes(t))||!!e.dependencies?.some(e=>e.token.toLowerCase().includes(t))}withoutFramework(e){if(!this.hideFramework())return e;let t=e=>e.flatMap(e=>e.injector.framework?t(e.children):[{...e,children:t(e.children)}]);return t(e)}prune(e,t){let n=[];for(let r of e){let e=this.prune(r.children,t);(t(r)||e.length)&&n.push({...r,children:e})}return n}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-di-inspector`]],viewQuery:function(e,t){e&1&&Dg(t.queryInput,gW,5),e&2&&Og()},inputs:{rpc:[1,`rpc`],focus:[1,`focus`],canShowComponent:[1,`canShowComponent`]},outputs:{focusHandled:`focusHandled`,showComponent:`showComponent`},decls:11,vars:2,consts:[[`loadError`,``],[`pagePicker`,``],[`queryInput`,``],[`role`,`status`,1,`sr-only`],[`role`,`status`,1,`state`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`role`,`alert`,1,`state`,`load-error`],[1,`state-title`],[1,`state-hint`],[`type`,`button`,3,`click`],[1,`page-picker`],[`id`,`di-page-label`,1,`label-key`],[`labelledBy`,`di-page-label`,3,`valueChange`,`options`,`value`],[1,`intro`],[`capability`,`injectorMetadata`,`compact`,``,3,`page`],[1,`toolbar`],[`role`,`group`,`aria-label`,`Injector tree`,1,`segmented`],[1,`pill`],[`placeholder`,`Filter by token, component or injector`,`saveKey`,`injectors`,1,`search`,3,`valueChange`,`value`],[3,`ngTemplateOutlet`],[1,`checkbox`],[`type`,`checkbox`,3,`change`,`checked`],[1,`total`,`framework-hidden`],[1,`total`],[`type`,`button`,1,`refresh`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M20 11a8 8 0 1 0-2.3 5.7M20 4v7h-7`],[1,`notice`],[1,`where`],[1,`where`,`muted`],[1,`orphans`],[1,`layout`],[1,`state`],[`role`,`tree`,1,`tree`,3,`keydown`,`hidden`],[`role`,`treeitem`,1,`row`,3,`selected`,`--%NS%depth`],[`view`,`injectors`,`label`,`Resize the injector detail`,3,`sizeChange`,`min`,`max`,`defaultSize`,`size`],[`aria-labelledby`,`di-detail-title`,1,`detail`,`gone`],[`aria-labelledby`,`di-detail-title`,1,`detail`],[3,`rpc`,`pageId`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M12 11v5M12 8h.01`],[1,`where-label`],[`type`,`button`,1,`chip`],[1,`more`],[`type`,`button`,1,`chip`,3,`click`],[`aria-hidden`,`true`,1,`dot`],[1,`mono`],[1,`chip-tokens`],[`type`,`button`,1,`link`,3,`click`],[`type`,`button`,`aria-controls`,`di-orphans`,1,`orphans-toggle`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[`d`,`m9 6 6 6-6 6`],[1,`hint-tag`],[`id`,`di-orphans`,1,`orphans-body`,3,`hidden`],[1,`hint`],[1,`orphan-list`],[1,`token`,`mono`],[1,`flag`],[1,`orphan-file`,3,`file`,`line`],[`role`,`treeitem`,1,`row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[`aria-hidden`,`true`,1,`twisty`,3,`open`],[`aria-hidden`,`true`,1,`twisty-space`],[`aria-hidden`,`true`,1,`kind`],[1,`sr-only`],[1,`name`,`mono`],[1,`flag`,`inactive-flag`],[1,`sub`],[1,`meta`],[1,`count`],[1,`count`,`provides`],[`aria-hidden`,`true`,1,`twisty`,3,`click`],[`viewBox`,`0 0 24 24`],[`d`,`M12 5v14M5 12l7 7 7-7`],[`d`,`M21 8 12 3 3 8v8l9 5 9-5z`],[1,`detail-head`],[`id`,`di-detail-title`,1,`mono`],[1,`state`,`compact`],[`type`,`button`],[1,`badge`],[`aria-label`,`Classes on this element`,1,`classes`],[`type`,`button`,1,`show-component`],[1,`hint`,`inactive-note`],[1,`block`],[1,`path`],[3,`current`],[1,`hint`,`framework-note`],[1,`providers`],[1,`empty-line`],[3,`is-component`],[`type`,`button`,1,`show-component`,3,`click`],[1,`step`,`null`],[`type`,`button`,1,`step`],[1,`hint-inline`],[`type`,`button`,1,`step`,3,`click`],[1,`step-count`],[1,`deps`],[1,`dep`,3,`hit`],[1,`dep`],[1,`dep-main`],[1,`dep-meta`],[`type`,`button`,1,`from`],[1,`from`,`absent`],[1,`from`,`missing`],[`type`,`button`,1,`link`,`resolve-toggle`,3,`click`],[1,`resolution`,3,`id`,`hidden`],[1,`resolve-graph`],[`type`,`button`,1,`from`,3,`click`],[3,`class`],[`aria-hidden`,`true`,1,`resolve-dot`],[1,`resolve-state`],[1,`provider`,3,`hit`],[1,`provider`],[1,`flag`,`kind-flag`],[1,`dep-meta`,`declared`],[1,`provider-global`,3,`rpc`,`pageId`,`target`,`label`,`canLog`],[3,`rpc`,`pageId`,`injectorId`,`token`,`tokenId`,`index`,`position`],[1,`decl-file`,3,`file`,`line`],[`aria-hidden`,`true`,1,`spinner`],[`placeholder`,`Filter by token or file`,`saveKey`,`injectors-source`,1,`search`,3,`valueChange`,`value`],[`aria-live`,`polite`,1,`total`],[`capability`,`debugApi`,`compact`,``,3,`page`],[1,`source-providers`],[1,`provider-group`],[`role`,`list`,1,`provider-list`,3,`hidden`],[1,`provider-card`],[`type`,`button`,`aria-controls`,`di-helpers`,1,`group-toggle`,3,`click`],[1,`section-count`],[1,`hint`,`helper-hint`,3,`hidden`],[1,`provider-header`],[1,`token`],[1,`provided-in`],[1,`provider-meta`],[1,`path`,3,`file`,`line`],[1,`as`]],template:function(e,t){e&1&&(F(0,`p`,3),K(1),I(),Eh(2,OW,7,5,`ng-template`,null,0,G_)(4,AW,1,1,`ng-template`,null,1,G_),A(6,VG,43,32)(7,HG,4,0,`div`,4)(8,UG,1,3,`ng-container`,5)(9,GG,6,1)(10,nK,18,7)),e&2&&(D(),q(t.announcement()),D(5),j(t.roots().length>0?6:t.loaded()?t.loadFailed()&&t.sourceProviders().length===0?8:t.sourceProviders().length===0?9:10:7))},dependencies:[nP,hW,hD,Vv,qU,OD,Cj,dW,EM],styles:[`[_nghost-%COMP%] { +}`]})},xW=[`queryInput`],SW=(e,t,n,r)=>({kind:`provider`,injectorId:e,token:t,tokenId:n,index:r}),CW=()=>({compact:!1}),wW=()=>({compact:!0}),TW=(e,t)=>t.node.injector.id,EW=(e,t)=>t.id,DW=(e,t)=>t.token+t.file+t.line,OW=(e,t)=>t.from+(t.tokenId??t.token)+e,kW=(e,t)=>t.id+e,AW=(e,t)=>(t.tokenId??t.token)+e,jW=(e,t)=>t.file+t.line,MW=(e,t)=>t.type;function NW(e,t){if(e&1){let e=B();F(0,`div`,6)(1,`p`,7),K(2),I(),F(3,`p`,8),K(4,` The devtools server did not answer. Check that it is still running, then retry. `),I(),F(5,`button`,9),H(`click`,function(){return C(e),w(W().retry())}),K(6),I()()}if(e&2){let e=t.compact,n=W();G(`compact`,e),D(2),J(` `,e?`Couldn't load the live injector tree`:`Couldn't load DI data`,` `),D(3),k(`aria-disabled`,n.retrying()||null),D(),J(` `,n.retrying()?`Retrying…`:`Retry`,` `)}}function PW(e,t){if(e&1){let e=B();F(0,`div`,10)(1,`span`,11),K(2,`Page`),I(),F(3,`app-select`,12),H(`valueChange`,function(t){return C(e),w(W(2).selectPage(t))}),I()()}if(e&2){let e=W(2);D(3),P(`options`,e.pageOptions())(`value`,e.shownPageId())}}function FW(e,t){e&1&&A(0,PW,4,2,`div`,10),e&2&&j(W().pageOptions().length>1?0:-1)}function IW(e,t){if(e&1){let e=B();F(0,`label`,20)(1,`input`,21),H(`change`,function(){C(e);let t=W(2);return w(t.componentsOnly.set(!t.componentsOnly()))}),I(),K(2,` Components only `),I()}if(e&2){let e=W(2);D(),P(`checked`,e.componentsOnly())}}function LW(e,t){if(e&1&&(F(0,`span`,22),K(1),I()),e&2){let e=W(2);D(),q(e.frameworkHiddenText())}}function RW(e,t){e&1&&(F(0,`span`,23),K(1),I()),e&2&&(D(),J(`Change detection: `,t))}function zW(e,t){if(e&1&&(F(0,`p`,27),T(),F(1,`svg`,25),L(2,`circle`,39)(3,`path`,40),I(),cs(),F(4,`span`)(5,`strong`),K(6,`The page reported only part of its injector tree.`),I(),K(7),I()()),e&2){let e=W(2);D(7),y_(` It keeps at most `,e.limits().elements,` element injectors and `,e.limits().injectors,` in all, and leaves out injectors nested more than `,e.limits().depth,` levels deep, so a lookup path or a provider can point to one that is not listed. `)}}function BW(e,t){if(e&1){let e=B();F(0,`button`,44),H(`click`,function(){let t=C(e).$implicit;return w(W(3).reveal(t.id))}),L(1,`span`,45),F(2,`span`,46),K(3),I(),F(4,`span`,47),K(5),I()()}if(e&2){let e=t.$implicit,n=W(3);D(),Zg(`background`,n.tone(e.kind)),D(2),q(e.label),D(2),q(e.tokens)}}function VW(e,t){e&1&&(F(0,`span`,43),K(1),I()),e&2&&(D(),J(`+`,t,` more`))}function HW(e,t){if(e&1&&(F(0,`div`,28)(1,`span`,41),K(2,`Provided by`),I(),M(3,BW,6,4,`button`,42,EW),A(5,VW,2,1,`span`,43),I()),e&2){let e,t=W(2);D(3),N(t.providedBy()),D(2),j((e=t.providedByMore())?5:-1,e)}}function UW(e,t){if(e&1){let e=B();F(0,`div`,29),K(1),F(2,`button`,48),H(`click`,function(){return C(e),w(W(2).clearQuery())}),K(3,`Clear filters`),I()()}if(e&2){let e=W(2);D(),J(` Nothing here matches “`,e.query().trim(),`”. `)}}function WW(e,t){if(e&1&&(F(0,`span`,57),K(1),I()),e&2){let e=W().$implicit;D(),J(`providedIn: `,e.providedIn)}}function GW(e,t){if(e&1&&(F(0,`li`)(1,`span`,56),K(2),I(),A(3,WW,2,1,`span`,57),L(4,`app-source-link`,58),I()),e&2){let e=t.$implicit;D(2),q(e.token),D(),j(e.providedIn?3:-1),D(),P(`file`,e.file)(`line`,e.line)}}function KW(e,t){if(e&1){let e=B();F(0,`div`,30)(1,`button`,49),H(`click`,function(){C(e);let t=W(2);return w(t.orphansOpen.set(!t.orphansOpen()))}),T(),F(2,`svg`,50),L(3,`path`,51),I(),cs(),F(4,`span`,52),K(5,`Hint`),I(),K(6),I(),F(7,`div`,53)(8,`p`,54),K(9,` Provided in your source, but nothing on this page has injected them so far. This is not an error: a guard, an interceptor or code that has not run yet may still use them. `),I(),F(10,`ul`,55),M(11,GW,5,4,`li`,null,DW),I()()()}if(e&2){let e=W(2);D(),k(`aria-expanded`,e.orphansOpen()),D(),G(`open`,e.orphansOpen()),D(4),J(` `,e.orphanedText(),` `),D(),P(`hidden`,!e.orphansOpen()),D(4),N(e.orphaned())}}function qW(e,t){e&1&&K(0,` Turn off “Hide framework” to see Angular's own injectors. `)}function JW(e,t){e&1&&K(0,` None of them provide anything themselves. `)}function YW(e,t){e&1&&K(0,` Turn off “Components only” to see directives. `)}function XW(e,t){e&1&&K(0,` Try a different search. `)}function ZW(e,t){if(e&1&&(F(0,`div`,32)(1,`p`,7),K(2,`No injectors to show`),I(),F(3,`p`,8),A(4,qW,1,0)(5,JW,1,0)(6,YW,1,0)(7,XW,1,0),I()()),e&2){let e=W(2);D(4),j(e.hideFramework()&&e.frameworkHiddenCount().injectors>0?4:e.onlyProviding()?5:e.componentsOnly()&&e.view()===`element`?6:7)}}function QW(e,t){if(e&1){let e=B();F(0,`span`,70),H(`click`,function(t){C(e);let n=W().$implicit;return w(W(2).toggle(n.node.injector.id,t))}),T(),F(1,`svg`,71),L(2,`path`,51),I()()}if(e&2){let e=W().$implicit;G(`open`,e.expanded)}}function $W(e,t){e&1&&L(0,`span`,61)}function eG(e,t){e&1&&(F(0,`span`,65),K(1,`inactive`),I())}function tG(e,t){if(e&1&&(F(0,`span`,66),K(1),I()),e&2){let e=W().$implicit;D(),q(e.node.injector.component)}}function nG(e,t){if(e&1&&(F(0,`span`,66),K(1),I()),e&2){let e=W().$implicit;D(),q(e.node.injector.directives.join(`, `))}}function rG(e,t){if(e&1&&(F(0,`span`,68),T(),F(1,`svg`,25),L(2,`path`,72),I(),cs(),F(3,`span`,63),K(4,`injects`),I(),K(5),I()),e&2){let e=W().$implicit;k(`title`,e.node.dependencies.length+` injected`),D(5),J(` `,e.node.dependencies.length,` `)}}function iG(e,t){if(e&1&&(F(0,`span`,69),T(),F(1,`svg`,25),L(2,`path`,73),I(),cs(),F(3,`span`,63),K(4,`provides`),I(),K(5),I()),e&2){let e=t;k(`title`,e+` provided`),D(5),J(` `,e,` `)}}function aG(e,t){if(e&1){let e=B();F(0,`div`,59),H(`click`,function(){let t=C(e).$implicit;return w(W(2).select(t.node.injector.id))})(`focus`,function(){let t=C(e).$implicit,n=W(2);return n.focusId.set(t.node.injector.id),w(n.highlight(t.node))})(`blur`,function(){return C(e),w(W(2).highlight(null))})(`mouseenter`,function(){let t=C(e).$implicit;return w(W(2).highlight(t.node))})(`mouseleave`,function(){return C(e),w(W(2).highlight(null))}),A(1,QW,3,2,`span`,60)(2,$W,1,0,`span`,61),F(3,`span`,62),K(4),I(),F(5,`span`,63),K(6),I(),F(7,`span`,64),K(8),I(),A(9,eG,2,0,`span`,65),A(10,tG,2,1,`span`,66)(11,nG,2,1,`span`,66),F(12,`span`,67),A(13,rG,6,2,`span`,68),A(14,iG,6,2,`span`,69),I()()}if(e&2){let e,n=t.$implicit,r=W(2);Zg(`--%NS%depth`,n.depth),G(`selected`,r.selected()?.injector?.id===n.node.injector.id),k(`aria-level`,n.depth+1)(`aria-expanded`,n.hasChildren?n.expanded:null)(`aria-selected`,r.selected()?.injector?.id===n.node.injector.id)(`tabindex`,r.rovingId()===n.node.injector.id?0:-1)(`data-id`,n.node.injector.id),D(),j(n.hasChildren?1:2),D(2),Zg(`--%NS%tone`,r.tone(r.kind(n.node))),k(`title`,r.kind(n.node)),D(),q(r.kind(n.node)[0].toUpperCase()),D(2),q(r.kind(n.node)),D(2),q(r.label(n.node)),D(),j(n.node.injector.inactive?9:-1),D(),j(n.node.injector.component?10:n.node.injector.directives?.length?11:-1),D(3),j((n.node.dependencies?.length??0)>0?13:-1),D(),j((e=r.providerCount(n.node))?14:-1,e)}}function oG(e,t){if(e&1){let e=B();F(0,`button`,9),H(`click`,function(){let t=C(e);return w(W(3).reveal(t.node.injector.id))}),K(1),I()}if(e&2){let e=W(3);D(),J(` Show `,e.label(t.node),` `)}}function sG(e,t){if(e&1&&(F(0,`section`,36)(1,`header`,74)(2,`h2`,75),K(3),I()(),F(4,`div`,76)(5,`p`,8),K(6,` This injector is no longer on the page. Its component or directive was destroyed. `),I(),A(7,oG,2,1,`button`,77),I()()),e&2){let e,n=W(2);D(3),q(t),D(4),j((e=n.rows()[0])?7:-1,e)}}function cG(e,t){if(e&1&&(F(0,`li`),K(1),I()),e&2){let e=t.$implicit;G(`is-component`,e===W(2).injector.component),D(),q(e)}}function lG(e,t){if(e&1&&(F(0,`ul`,79),M(1,cG,2,3,`li`,88,Xh),I()),e&2){let e=W();D(),N(e.injector.directives)}}function uG(e,t){if(e&1){let e=B();F(0,`button`,89),H(`click`,function(){let t=C(e);return w(W(3).openComponent(t))}),K(1,` Show in Components `),F(2,`span`,63),K(3),I()()}if(e&2){let e=W();D(3),J(`: `,e.injector.component)}}function dG(e,t){e&1&&(F(0,`p`,81),K(1,` Inactive: the router loaded this route's injector, but no element on the page uses it now. It keeps the services it created until the app is reloaded. `),I())}function fG(e,t){if(e&1&&(F(0,`span`,90),L(1,`span`,45),K(2,` Null injector `),F(3,`span`,92),K(4,`throws NullInjectorError`),I()()),e&2){let e=W(4);D(),Zg(`background`,e.tone(`null`))}}function pG(e,t){if(e&1&&(F(0,`span`,94),K(1),F(2,`span`,63),K(3),I()()),e&2){let e=W(2).$implicit;D(),J(` `,e.providers,` `),D(2),q(e.providers===1?`provider`:`providers`)}}function mG(e,t){if(e&1){let e=B();F(0,`button`,93),H(`click`,function(){C(e);let t=W().$implicit;return w(W(3).reveal(t.id))}),L(1,`span`,45),F(2,`span`,46),K(3),I(),A(4,pG,4,2,`span`,94),I()}if(e&2){let e=W().$implicit,t=W(3);D(),Zg(`background`,t.tone(e.kind)),D(2),q(e.label),D(),j(e.providers?4:-1)}}function hG(e,t){if(e&1&&(F(0,`li`),A(1,fG,5,2,`span`,90)(2,mG,5,4,`button`,91),I()),e&2){let e=t.$implicit,n=t.$index,r=W(3);G(`current`,n===0),D(),j(e.id===r.nullId?1:2)}}function gG(e,t){e&1&&(F(0,`p`,54),K(1,`Only services this injector has already created are listed.`),I())}function _G(e,t){if(e&1&&(F(0,`span`,57),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function vG(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W().$implicit;D(),J(`for `,e.from)}}function yG(e,t){if(e&1){let e=B();F(0,`button`,106),H(`click`,function(){let t=C(e);return w(W(6).reveal(t))}),L(1,`span`,45),K(2,` from `),F(3,`span`,46),K(4),I()()}if(e&2){let e=t,n=W(6);D(),Zg(`background`,n.tone(n.kindById(e))),D(3),q(n.labelById(e))}}function bG(e,t){e&1&&(F(0,`span`,101),K(1,`optional, not provided`),I())}function xG(e,t){e&1&&(F(0,`span`,102),K(1,`not provided anywhere`),I())}function SG(e,t){e&1&&(F(0,`span`,46),K(1,`Null injector`),I())}function CG(e,t){if(e&1){let e=B();F(0,`button`,93),H(`click`,function(){C(e);let t=W().$implicit;return w(W(7).reveal(t.id))}),F(1,`span`,46),K(2),I()()}if(e&2){let e=W().$implicit;D(2),q(e.label)}}function wG(e,t){if(e&1&&(F(0,`li`),L(1,`span`,108),A(2,SG,2,0,`span`,46)(3,CG,3,1,`button`,91),F(4,`span`,109),K(5),I()()),e&2){let e=t.$implicit,n=W(7);Qg(`resolve-`+e.state),D(2),j(e.id===n.nullId?2:3),D(3),q(e.text)}}function TG(e,t){if(e&1&&(F(0,`ol`,105),M(1,wG,6,4,`li`,107,kW),I()),e&2){let e=W().$implicit,t=W(5);k(`aria-label`,`How Angular resolves `+e.token),D(),N(t.resolution(e))}}function EG(e,t){if(e&1){let e=B();F(0,`li`,97)(1,`div`,98)(2,`span`,56),K(3),I(),M(4,_G,2,1,`span`,57,Xh),I(),F(6,`div`,99),A(7,vG,2,1,`span`),A(8,yG,5,3,`button`,100)(9,bG,2,0,`span`,101)(10,xG,2,0,`span`,102),F(11,`button`,103),H(`click`,function(){let t=C(e),n=t.$implicit,r=t.$index,i=W(5);return w(i.toggleResolve(i.depKey(n,r)))}),K(12,` Resolution `),F(13,`span`,63),K(14),I()()(),F(15,`div`,104),A(16,TG,3,1,`ol`,105),I()()}if(e&2){let e,n=t.$implicit,r=t.$index,i=W(3),a=W(2);G(`hit`,a.matches(n.token)),D(3),q(n.token),D(),N(n.flags),D(3),j(i.injector.type!==`element`||i.injector.directives&&i.injector.directives.length>1?7:-1),D(),j((e=n.providedBy)?8:n.flags.includes(`optional`)?9:10,e),D(3),k(`aria-expanded`,a.resolvingKey()===a.depKey(n,r))(`aria-controls`,`di-resolve-`+r),D(3),J(`of `,n.token),D(),P(`id`,`di-resolve-`+r)(`hidden`,a.resolvingKey()!==a.depKey(n,r)),D(),j(a.resolvingKey()===a.depKey(n,r)?16:-1)}}function DG(e,t){if(e&1&&(F(0,`ul`,95),M(1,EG,17,11,`li`,96,OW),I()),e&2){let e=W(2);D(),N(e.dependencies)}}function OG(e,t){e&1&&(F(0,`p`,87),K(1,`Nothing is injected through the constructor or inject().`),I())}function kG(e,t){e&1&&(F(0,`p`,87),K(1,`No service created here has injected anything yet.`),I())}function AG(e,t){if(e&1&&(F(0,`div`,82)(1,`h3`),K(2),F(3,`span`,17),K(4),I()(),A(5,gG,2,0,`p`,54),A(6,DG,3,0,`ul`,95)(7,OG,2,0,`p`,87)(8,kG,2,0,`p`,87),I()),e&2){let e=W();D(2),J(` `,e.injector.type===`element`?`Injected here`:`Injected by its services`,` `),D(2),q(e.dependencies?.length??0),D(),j(e.injector.type===`element`?-1:5),D(),j(e.dependencies?.length?6:e.injector.type===`element`?7:8)}}function jG(e,t){if(e&1){let e=B();F(0,`p`,85),K(1),F(2,`button`,48),H(`click`,function(){return C(e),w(W(3).setHideFramework(!1))}),K(3,` Show them `),I()()}if(e&2){let e=t;D(),Y(` `,e,` framework `,e===1?`provider`:`providers`,` hidden. `)}}function MG(e,t){e&1&&(F(0,`span`,57),K(1,`viewProviders`),I())}function NG(e,t){e&1&&(F(0,`span`,57),K(1,`multi`),I())}function PG(e,t){e&1&&(F(0,`span`,57),K(1,`Angular`),I())}function FG(e,t){if(e&1&&(F(0,`div`,99),K(1),I()),e&2){let e=W(2).$implicit;D(),J(`via `,e.importPath.join(` › `))}}function IG(e,t){if(e&1&&L(0,`app-source-link`,116),e&2){let e=t.$implicit;P(`file`,e.file)(`line`,e.line)}}function LG(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W();D(),J(`+`,e.more,` more`)}}function RG(e,t){if(e&1&&(F(0,`div`,113)(1,`span`),K(2,`Declared in`),I(),M(3,IG,1,2,`app-source-link`,116,jW),A(5,LG,2,1,`span`),I()),e&2){let e=t;D(3),N(e.shown),D(2),j(e.more?5:-1)}}function zG(e,t){if(e&1&&(F(0,`li`,111)(1,`div`,98)(2,`span`,56),K(3),I(),F(4,`span`,112),K(5),I(),A(6,MG,2,0,`span`,57),A(7,NG,2,0,`span`,57),A(8,PG,2,0,`span`,57),I(),A(9,FG,2,1,`div`,99),A(10,RG,6,1,`div`,113),L(11,`app-store-global`,114)(12,`app-provider-value`,115),I()),e&2){let e,t=W(),n=t.$implicit,r=t.$index,i=W(2),a=W(2);G(`hit`,a.matches(n.token)),D(3),q(n.token),D(2),q(n.type===`unknown`?`provider`:`use`+a.capital(n.type)),D(),j(n.isViewProvider?6:-1),D(),j(n.multi?7:-1),D(),j(n.framework?8:-1),D(),j(n.importPath?.length?9:-1),D(),j((e=a.sourceOf(n.token))?10:-1,e),D(),P(`rpc`,a.rpc())(`pageId`,a.shownPageId())(`target`,dne(21,SW,i.injector.id,n.token,n.tokenId,r))(`label`,n.token+a.positionSuffix(i.providers,r))(`canLog`,!0),D(),P(`rpc`,a.rpc())(`pageId`,a.shownPageId())(`injectorId`,i.injector.id)(`token`,n.token)(`tokenId`,n.tokenId)(`index`,r)(`position`,a.tokenPosition(i.providers,r))}}function BG(e,t){if(e&1&&A(0,zG,13,26,`li`,110),e&2){let e=t.$implicit;j(W(4).isHidden(e)?-1:0)}}function VG(e,t){if(e&1&&(F(0,`ul`,86),M(1,BG,1,1,null,null,AW),I()),e&2){let e=W();D(),N(e.providers)}}function HG(e,t){e&1&&K(0,` No providers or viewProviders on this element. `)}function UG(e,t){e&1&&K(0,` This injector has no providers of its own. `)}function WG(e,t){if(e&1&&(F(0,`p`,87),A(1,HG,1,0)(2,UG,1,0),I()),e&2){let e=W();D(),j(e.injector.type===`element`?1:2)}}function GG(e,t){if(e&1&&(F(0,`section`,37)(1,`header`,74)(2,`span`,78),K(3),I(),F(4,`h2`,75),K(5),I(),A(6,lG,3,0,`ul`,79),A(7,uG,4,1,`button`,80),I(),A(8,dG,2,0,`p`,81),F(9,`div`,82)(10,`h3`),K(11,`Lookup path`),I(),F(12,`p`,54),K(13,`Angular asks these injectors in order until one has the token.`),I(),F(14,`ol`,83),M(15,hG,3,3,`li`,84,EW),I()(),A(17,AG,9,4,`div`,82),F(18,`div`,82)(19,`h3`),K(20,` Provides `),F(21,`span`,17),K(22),I()(),A(23,jG,4,2,`p`,85),A(24,VG,3,0,`ul`,86)(25,WG,3,1,`p`,87),I()()),e&2){let e,n,r=t,i=W(2);D(2),Zg(`--%NS%tone`,i.tone(i.kind(r))),D(),q(i.kind(r)),D(2),q(i.label(r)),D(),j(r.injector.directives?.length?6:-1),D(),j((e=i.canShowComponent()&&r.injector.componentId)?7:-1,e),D(),j(r.injector.inactive?8:-1),D(7),N(i.path()),D(2),j(r.injector.type===`element`||r.dependencies?17:-1),D(5),q(i.providerCount(r)),D(),j((n=i.hiddenProviders(r))?23:-1,n),D(),j(i.providerCount(r)?24:i.hiddenProviders(r)?-1:25)}}function KG(e,t){if(e&1){let e=B();F(0,`p`,13),K(1,` Every component and directive gets an injector. When it asks for a token, Angular walks up this tree, then through the environment injectors, until something provides it. `),I(),F(2,`app-angular-unavailable`,14),K(3,` This tree shows the element injectors the page reports, with providers and environment injectors only where its Angular exposes them. `),I(),F(4,`div`,15)(5,`div`,16)(6,`button`,9),H(`click`,function(){return C(e),w(W().setView(`element`))}),K(7,` Elements `),F(8,`span`,17),K(9),I()(),F(10,`button`,9),H(`click`,function(){return C(e),w(W().setView(`environment`))}),K(11,` Environment `),F(12,`span`,17),K(13),I()()(),F(14,`app-search-field`,18,2),w_(`valueChange`,function(t){C(e);let n=W();return C_(n.query,t)||(n.query=t),w(t)}),I(),dg(16,19),A(17,IW,3,1,`label`,20),F(18,`label`,20)(19,`input`,21),H(`change`,function(){C(e);let t=W();return w(t.onlyProviding.set(!t.onlyProviding()))}),I(),K(20,` With providers `),I(),F(21,`label`,20)(22,`input`,21),H(`change`,function(){C(e);let t=W();return w(t.setHideFramework(!t.hideFramework()))}),I(),K(23,` Hide framework `),I(),A(24,LW,2,1,`span`,22),A(25,RW,2,1,`span`,23),F(26,`button`,24),H(`click`,function(){return C(e),w(W().refresh())}),T(),F(27,`svg`,25),L(28,`path`,26),I(),K(29,` Refresh `),I()(),A(30,zW,8,3,`p`,27),A(31,HW,6,1,`div`,28)(32,UW,4,1,`div`,29),A(33,KW,13,5,`div`,30),cs(),F(34,`div`,31),A(35,ZW,8,1,`div`,32),F(36,`div`,33),H(`keydown`,function(t){return C(e),w(W().onTreeKey(t))}),M(37,aG,15,20,`div`,34,TW),I(),F(39,`app-splitter`,35),w_(`sizeChange`,function(t){C(e);let n=W();return C_(n.detailSize,t)||(n.detailSize=t),w(t)}),I(),A(40,sG,8,2,`section`,36)(41,GG,26,11,`section`,37),I(),L(42,`app-startup-section`,38)}if(e&2){let e,t,n=W(),r=Ag(5);D(2),P(`page`,n.angularPage()),D(4),G(`active`,n.view()===`element`),k(`aria-pressed`,n.view()===`element`),D(3),q(n.elementCount()),D(),G(`active`,n.view()===`environment`),k(`aria-pressed`,n.view()===`environment`),D(3),q(n.environmentCount()),D(),S_(`value`,n.query),D(2),P(`ngTemplateOutlet`,r),D(),j(n.view()===`element`?17:-1),D(2),P(`checked`,n.onlyProviding()),D(3),P(`checked`,n.hideFramework()),D(2),j(n.hideFramework()?24:-1),D(),j((e=n.zone())?25:-1,e),D(),k(`aria-disabled`,!n.shownPageId()||null),D(4),j(n.truncated()?30:-1),D(),j(n.providedBy().length?31:n.query().trim()&&!n.rows().length?32:-1),D(2),j(n.orphaned().length?33:-1),D(),Zg(`--%NS%detail-size`,n.detailSize(),`px`),D(),j(n.rows().length?-1:35),D(),P(`hidden`,!n.rows().length),k(`aria-label`,n.view()===`element`?`Element injectors`:`Environment injectors`),D(),N(n.rows()),D(2),P(`min`,300)(`max`,900)(`defaultSize`,420),S_(`size`,n.detailSize),D(),j((t=n.gone())?40:(t=n.selected())?41:-1,t),D(2),P(`rpc`,n.rpc())(`pageId`,n.shownPageId())}}function qG(e,t){e&1&&(F(0,`div`,4),L(1,`span`,117),F(2,`p`,7),K(3,`Loading dependency injection data…`),I()())}function JG(e,t){e&1&&dg(0,5),e&2&&(W(),P(`ngTemplateOutlet`,Ag(3))(`ngTemplateOutletContext`,L_(2,CW)))}function YG(e,t){if(e&1&&(F(0,`div`,15),dg(1,19),I()),e&2){W(2);let e=Ag(5);D(),P(`ngTemplateOutlet`,e)}}function XG(e,t){e&1&&(A(0,YG,2,1,`div`,15),F(1,`div`,32)(2,`p`,7),K(3,`No DI data found`),I(),F(4,`p`,8),K(5,` Open the app in a browser with the devtools connected to see its live injectors. No providers, injectables or inject() calls were found in the source either. `),I()()),e&2&&j(W().pageOptions().length>1?0:-1)}function ZG(e,t){e&1&&dg(0,5),e&2&&(W(2),P(`ngTemplateOutlet`,Ag(3))(`ngTemplateOutletContext`,L_(2,wW)))}function QG(e,t){if(e&1){let e=B();F(0,`div`,32)(1,`p`,7),K(2),I(),F(3,`p`,8),K(4,`Try part of a token name or a file path.`),I(),F(5,`button`,9),H(`click`,function(){return C(e),w(W(2).clearQuery())}),K(6,`Clear filters`),I()()}if(e&2){let e=W(2);D(2),J(`No providers match “`,e.query(),`”`)}}function $G(e,t){if(e&1){let e=B();F(0,`h2`)(1,`button`,125),H(`click`,function(){C(e);let t=W(4);return w(t.helpersOpen.set(!t.helpersOpen()))}),T(),F(2,`svg`,50),L(3,`path`,51),I(),K(4),cs(),F(5,`span`,126),K(6),I()()(),F(7,`p`,127),K(8,` provide*() calls the scan can't resolve to the tokens they register, such as your own provider functions. `),I()}if(e&2){let e=W().$implicit,t=W(3);D(),k(`aria-expanded`,t.helpersShown()),D(),G(`open`,t.helpersShown()),D(2),J(` `,e.label,` `),D(2),q(e.items.length),D(),P(`hidden`,!t.helpersShown())}}function eK(e,t){if(e&1&&(F(0,`h2`),K(1),F(2,`span`,126),K(3),I()()),e&2){let e=W().$implicit;D(),J(` `,e.label,` `),D(2),q(e.items.length)}}function tK(e,t){if(e&1&&(F(0,`span`,130),K(1),I()),e&2){let e=W().$implicit;D(),J(`providedIn: `,e.providedIn)}}function nK(e,t){e&1&&(F(0,`span`,57),K(1,`helper (unresolved)`),I())}function rK(e,t){if(e&1&&(F(0,`span`,133),K(1),I()),e&2){let e=W().$implicit;D(),J(`as `,e.source)}}function iK(e,t){if(e&1&&(F(0,`li`,124)(1,`div`,128)(2,`span`,129),K(3),I(),A(4,tK,2,1,`span`,130),A(5,nK,2,0,`span`,57),I(),F(6,`div`,131),L(7,`app-source-link`,132),A(8,rK,2,1,`span`,133),I()()),e&2){let e=t.$implicit,n=W(4);D(3),q(e.token),D(),j(e.providedIn?4:-1),D(),j(e.type===n.helperType?5:-1),D(2),P(`file`,e.file)(`line`,e.line),D(),j(e.source!==`class`&&e.source!==`providers array`&&e.type!==n.helperType?8:-1)}}function aK(e,t){if(e&1&&(F(0,`section`,122),A(1,$G,9,6)(2,eK,4,2,`h2`),F(3,`ul`,123),M(4,iK,9,6,`li`,124,DW),I()()),e&2){let e=t.$implicit,n=W(3);D(),j(e.type===n.helperType?1:2),D(2),P(`hidden`,e.type===n.helperType&&!n.helpersShown()),k(`id`,e.type===n.helperType?`di-helpers`:null),D(),N(e.items)}}function oK(e,t){if(e&1&&(F(0,`div`,121),M(1,aK,6,3,`section`,122,MW),I()),e&2){let e=W(2);D(),N(e.groupedProviders())}}function sK(e,t){if(e&1){let e=B();F(0,`div`,15)(1,`app-search-field`,118,2),w_(`valueChange`,function(t){C(e);let n=W();return C_(n.query,t)||(n.query=t),w(t)}),I(),dg(3,19),F(4,`span`,119),K(5),I()(),A(6,ZG,1,3,`ng-container`,5),F(7,`p`,27),T(),F(8,`svg`,25),L(9,`circle`,39)(10,`path`,40),I(),cs(),F(11,`span`)(12,`strong`),K(13,`DI from the source scan.`),I(),K(14,` Connect the overlay to a development build to see the live injector tree. `),I()(),L(15,`app-angular-unavailable`,120),A(16,QG,7,1,`div`,32)(17,oK,3,0,`div`,121)}if(e&2){let e=W(),t=Ag(5);D(),S_(`value`,e.query),D(2),P(`ngTemplateOutlet`,t),D(2),Y(` `,e.sourceMatchCount(),` of `,e.sourceProviders().length,` `),D(),j(e.loadFailed()?6:-1),D(9),P(`page`,e.angularPage()),D(),j(e.groupedProviders().length===0?16:17)}}var cK=`inj-null`,lK=`injectors.hideFramework`,uK=12,dK=`helper`,fK=new Set([`provider`,`injectable`]),pK=600,mK={component:`var(--accent-text)`,directive:`var(--directive)`,environment:`var(--ok-text)`,null:`var(--text-3)`};function hK(e){return e.injector.type===`element`?e.injector.component?`component`:`directive`:`environment`}function gK(e){return e.injector.type===`element`?`<${e.injector.name}>`:e.injector.name}function _K(e){return Array.isArray(e)}var vK=class e{rpc=$(null);focus=$(null);canShowComponent=$(!1);focusHandled=ev();showComponent=ev();injector=S(gs);nullId=cK;hostPage=fT();angularPages=uD(()=>this.rpc());angularPage=X(()=>dD(this.angularPages(),this.shownPageId()||this.hostPage));treeState=E(null);pageTitles=E({});chosenPageId=E(null);treePages=X(()=>{let e=this.treeState();if(!e)return{};let t=e.pages&&typeof e.pages==`object`?e.pages:{};return Object.keys(t).length||this.hostPage?t:{"":e}});shownPageId=Q({source:()=>({pages:this.treePages(),chosen:this.chosenPageId()}),computation:({pages:e,chosen:t},n)=>{let r={};for(let[t,n]of Object.entries(e))r[t]={pageId:t,reportedAt:typeof n?.reportedAt==`number`?n.reportedAt:0};return pT(r,{chosen:t,host:this.hostPage,previous:n?.value??null})}});shownPage=X(()=>{let e=this.shownPageId();return e===null?null:this.treePages()[e]??null});roots=X(()=>{let e=this.shownPage()?.roots;return _K(e)?e:[]});environment=X(()=>{let e=this.shownPage()?.environment;return _K(e)?e:[]});truncated=X(()=>this.shownPage()?.truncated===!0);limits=X(()=>{let e=this.shownPage()?.limits,t=(e,t)=>typeof e==`number`&&Number.isInteger(e)&&e>0?e:t;return{elements:t(e?.elements,2e3),injectors:t(e?.injectors,2500),depth:t(e?.depth,1e3)}});zone=X(()=>{let e=this.shownPage()?.zone;return typeof e==`string`?DE(e):null});multiPage=X(()=>!this.hostPage&&Object.keys(this.treePages()).length>1);pageOptions=X(()=>{if(!this.multiPage())return[];let e=this.pageTitles();return Object.keys(this.treePages()).map(t=>{let n=e[t];return{value:t,label:n?.title||n?.url||`Page ${t}`,hint:n?.url}})});pageKey=X(()=>this.shownPageId()??``);perPage(e){let t=new Map;return Q({source:this.pageKey,computation:(n,r)=>(r&&t.set(r.source,r.value),t.has(n)?t.get(n):e())})}sourceProviders=E([]);loaded=E(!1);treeFailed=E(!1);sourceFailed=E(!1);loadFailed=X(()=>this.treeFailed()||this.sourceFailed());retrying=E(!1);host=S(kl);view=E(`element`);query=E(``);detailSize=E(vW(`injectors`,420));queryInput=sv(`queryInput`);onlyProviding=E(!1);componentsOnly=E(!0);hideFramework=E(eW(lK)??!1);collapsed=this.perPage(()=>new Set);selectedId=this.perPage(()=>null);focusId=this.perPage(()=>null);announcement=E(``);selectedLabel=this.perPage(()=>null);wasGone=!1;index=X(()=>{let e=new Map,t=new Map,n=(r,i)=>{for(let a of r)e.set(a.injector.id,a),i&&t.set(a.injector.id,i),n(a.children,a.injector.id)};n(this.roots(),null),n(this.environment(),null);let r=new Map;for(let t of e.values()){let e=t.injector.componentId;e&&t.injector.type===`element`&&r.set(e,t.injector.id)}return{map:e,parents:t,byComponent:r}});shownRoots=X(()=>this.withoutFramework(this.roots()));shownEnvironment=X(()=>this.withoutFramework(this.environment()));elementCount=X(()=>this.count(this.shownRoots()));environmentCount=X(()=>this.count(this.shownEnvironment()));frameworkHiddenCount=X(()=>{let e=this.view()===`element`?this.roots():this.environment(),t=0,n=0,r=e=>{for(let i of e)i.injector.framework?t++:n+=i.providers.filter(e=>e.framework).length,r(i.children)};return r(e),{injectors:t,providers:n}});frameworkHiddenText=X(()=>{let{injectors:e,providers:t}=this.frameworkHiddenCount(),n=(e,t)=>`${e} ${t}${e===1?``:`s`}`;return!e&&!t?`Nothing hidden`:t?e?`${n(e,`injector`)} and ${n(t,`provider`)} hidden`:`${n(t,`provider`)} hidden`:`${n(e,`injector`)} hidden`});visible=X(()=>{let e=this.view()===`element`?this.shownRoots():this.shownEnvironment();this.view()===`element`&&this.componentsOnly()&&(e=this.prune(e,e=>!!e.injector.component)),this.onlyProviding()&&(e=this.prune(e,e=>this.providerCount(e)>0));let t=this.normalizedQuery();return t&&(e=this.prune(e,e=>this.nodeMatches(e,t))),e});rows=X(()=>{let e=[],t=this.collapsed(),n=!!this.normalizedQuery(),r=(i,a)=>{for(let o of i){let i=n||!t.has(o.injector.id);e.push({node:o,depth:a,hasChildren:o.children.length>0,expanded:i}),i&&r(o.children,a+1)}};return r(this.visible(),0),e});selected=X(()=>{let e=this.selectedId();return e?this.index().map.get(e)??null:this.rows()[0]?.node??null});gone=X(()=>{let e=this.selectedId();return e&&!this.index().map.has(e)?this.selectedLabel()??`The injector`:null});rovingId=X(()=>{let e=this.rows(),t=this.focusId()??this.selected()?.injector.id;return t&&e.some(e=>e.node.injector.id===t)?t:e[0]?.node.injector.id??null});path=X(()=>{let e=this.selected();if(!e)return[];let{map:t,parents:n}=this.index(),r=e.injector.path??[];if(!r.length){r=[e.injector.id];let t=n.get(e.injector.id);for(;t;)r.push(t),t=n.get(t);r.push(cK)}return r.map(e=>{let n=t.get(e);return{id:e,label:n?gK(n):e===cK?`Null injector`:`Not listed`,kind:n?hK(n):`null`,providers:n?this.providerCount(n):0}})});providerHits=X(()=>{let e=this.normalizedQuery();if(!e)return[];let t=[];for(let n of this.index().map.values()){if(this.isHiddenInjector(n))continue;let r=n.providers.filter(t=>!this.isHidden(t)&&t.token.toLowerCase().includes(e));r.length&&t.push({id:n.injector.id,label:gK(n),kind:hK(n),tokens:r.map(e=>e.token).join(`, `)})}return t});providedBy=X(()=>this.providerHits().slice(0,uK));providedByMore=X(()=>Math.max(0,this.providerHits().length-uK));groupedProviders=X(()=>{let e=this.normalizedQuery(),t=e?this.sourceProviders().filter(t=>t.token.toLowerCase().includes(e)||t.file.toLowerCase().includes(e)):this.sourceProviders(),n=[{type:`root-provider`,label:`Root Providers (provide*)`,items:[]},{type:`injectable`,label:`Injectable Services`,items:[]},{type:`injection`,label:`inject() Calls`,items:[]},{type:`provider`,label:`Component Providers`,items:[]},{type:dK,label:`Helpers (unresolved)`,items:[]}];for(let e of t)n.find(t=>t.type===e.type)?.items.push(e);return n.filter(e=>e.items.length>0)});sourceMatchCount=X(()=>this.groupedProviders().reduce((e,t)=>e+t.items.length,0));helperType=dK;helpersOpen=E(!1);helpersShown=X(()=>this.helpersOpen()||!!this.normalizedQuery());orphaned=X(()=>{if(!this.roots().length)return[];let e=new Set,t=new Set;for(let n of this.index().map.values()){for(let t of n.dependencies??[])e.add(t.token);if(n.injector.type!==`element`)for(let e of n.providers)t.add(e.token)}let n=[],r=new Set;for(let i of this.sourceProviders()){if(!fK.has(i.type))continue;let a=i.token.slice(i.token.lastIndexOf(`.`)+1);if(e.has(a)||i.providedIn&&t.has(a))continue;let o=`${i.token}|${i.file}|${i.line}`;r.has(o)||(r.add(o),n.push(i))}return n});orphansOpen=E(!1);sourceByToken=X(()=>{let e=new Map;for(let t of this.sourceProviders()){if(!fK.has(t.type)&&t.type!==`root-provider`)continue;let n=t.token.slice(t.token.lastIndexOf(`.`)+1),r=e.get(n);r||e.set(n,r=[]),r.some(e=>e.file===t.file&&e.line===t.line)||r.push(t)}return e});sourceOf(e){let t=this.sourceByToken().get(e);return t?.length?{shown:t.slice(0,3),more:Math.max(0,t.length-3)}:null}resolvingKey=E(null);depKey(e,t){return`${t}|${e.from}|${e.tokenId??e.token}`}toggleResolve(e){this.resolvingKey.update(t=>t===e?null:e)}resolution(e){let t=this.path(),n=e.providedBy?t.findIndex(t=>t.id===e.providedBy):-1,r=e.flags.includes(`self`),i=e.flags.includes(`skipSelf`),a=e.flags.includes(`optional`);return t.map((e,t)=>{let o;o=t===0&&i?`skipped`:n>=0?t<n?`asked`:t===n?`provides`:`not-asked`:r&&t>+!!i?`not-asked`:e.id===cK?a?`null`:`throws`:`asked`;let s={asked:`asked, not here`,provides:`provides it`,skipped:`skipped (skipSelf)`,"not-asked":`not asked`,throws:`throws NullInjectorError`,null:`gives null (optional)`}[o];return{...e,state:o,text:s}})}orphanedText=X(()=>{let e=new Set(this.orphaned().map(e=>e.token)).size;return e===1?`1 provider in source is never injected on this page`:`${e} providers in source are never injected on this page`});searchSummary=X(()=>{let e=this.query().trim();if(!e)return``;let t=this.providerHits().length;return t===1?`1 injector provides “${e}”.`:t>1?`${t} injectors provide “${e}”.`:this.rows().length?`No injector provides “${e}”.`:`Nothing here matches “${e}”.`});normalizedQuery=X(()=>this.query().trim().toLowerCase());destroyRef=S(vs);stopTree=null;treeLoad=0;lastSearchMessage=``;refreshedKey=null;constructor(){ac(e=>{let t=this.searchSummary();if(!t){this.lastSearchMessage=``;return}if(t===this.lastSearchMessage)return;let n=setTimeout(()=>{this.lastSearchMessage=t,this.announcement.set(t)},pK);e(()=>clearTimeout(n))}),ac(()=>{let e=this.rpc();e&&(this.loadInjectorTree(e),this.loadSourceProviders(e))}),ac(()=>{let e=this.selected(),t=this.shownPageId(),n=e?.injector.type===`element`?e.injector.id:null,r=n&&t?`${t}|${n}`:null;r&&r!==this.refreshedKey&&(this.refreshedKey=r,Z(()=>this.requestRefresh(t,n)))}),ac(e=>{let t=this.rpc();if(!t||!this.multiPage())return;let n=!0,r=null;e(()=>{n=!1,r?.()}),t.scope(`pangular`).rpc.sharedState(`component-tree`).then(e=>{if(!n)return;let t=e=>{let t=e?.pages;this.pageTitles.set(t&&typeof t==`object`?t:{})};t(e.value()),r=e.on(`updated`,t)}).catch(()=>{})}),ac(()=>{let e=this.focus();if(!e)return;let t=this.treePages(),n=this.shownPageId();if(e.pageId&&n!==e.pageId&&t[e.pageId]){Z(()=>this.selectPage(e.pageId));return}(this.treeState()||this.treeFailed())&&Z(()=>{let t=!e.pageId||n===e.pageId?this.index().byComponent.get(e.componentId):void 0,r=t?this.index().map.get(t):void 0;t&&r?(this.reveal(t),this.announcement.set(`Showing the injector of ${gK(r)}.`)):this.announcement.set(`That component's injector is not on this page.`),this.focusHandled.emit()})}),this.destroyRef.onDestroy(()=>{this.stopTree?.(),this.highlight(null)})}setHideFramework(e){this.hideFramework.set(e),tW(lK,e)}openComponent(e){let t=this.shownPageId();this.showComponent.emit(t?{id:e,pageId:t}:{id:e})}tokenPosition(e,t){let n=e[t]?.token,r=0,i=0;return e.forEach((e,a)=>{e.token!==n||this.isHidden(e)||(i++,a<=t&&r++)}),i>1?`(${r} of ${i})`:``}positionSuffix(e,t){let n=this.tokenPosition(e,t);return n?` ${n}`:``}isHidden(e){return this.hideFramework()&&e.framework===!0}isHiddenInjector(e){return this.hideFramework()&&e.injector.framework===!0}providerCount(e){if(!this.hideFramework())return e.injector.providerCount;let t=e.providers.filter(e=>e.framework).length;return Math.max(0,e.injector.providerCount-t)}hiddenProviders(e){return this.hideFramework()?e.providers.filter(e=>e.framework).length:0}async retry(){let e=this.rpc();if(!e||this.retrying())return;let t=document.activeElement;this.retrying.set(!0);try{await Promise.all([this.loadInjectorTree(e),this.loadSourceProviders(e)])}finally{this.retrying.set(!1)}this.destroyRef.destroyed||td(()=>{t?.isConnected&&document.activeElement!==document.body||this.host.nativeElement.querySelector(`.toolbar input, .toolbar button`)?.focus()},{injector:this.injector})}refresh(){let e=this.shownPageId();e&&(this.requestRefresh(e),this.announcement.set(`Reading the injectors again.`))}requestRefresh(e,t){let n=this.rpc();n&&n.scope(`pangular`).rpc.call(`request-injector-refresh`,t?{pageId:e,injectorId:t}:{pageId:e}).catch(()=>{})}clearQuery(){this.query.set(``),this.queryInput()?.focus()}label(e){return gK(e)}kind(e){return hK(e)}tone(e){return mK[e]??mK.null}kindById(e){let t=this.index().map.get(e);return t?hK(t):`null`}labelById(e){let t=this.index().map.get(e);return t?gK(t):e===cK?`Null injector`:`not listed`}capital(e){return e.charAt(0).toUpperCase()+e.slice(1)}matches(e){let t=this.normalizedQuery();return!!t&&e.toLowerCase().includes(t)}setView(e){this.view()!==e&&(this.view.set(e),this.choose(null),this.focusId.set(null))}select(e){this.choose(e),this.focusId.set(e)}choose(e){let t=e?this.index().map.get(e):void 0;this.selectedId.set(e),this.selectedLabel.set(t?gK(t):null),this.wasGone=!1}syncGone(){let e=this.gone()!==null;if(e&&!this.wasGone){let e=`The selected injector is no longer on the page.`;this.announcement.update(t=>t===e?`${e}\u00a0`:e)}this.wasGone=e}selectPage(e){if(!e||e===this.shownPageId())return;this.chosenPageId.set(e),this.wasGone=this.gone()!==null;let t=this.pageOptions().find(t=>t.value===e)?.label??e;this.announcement.set(`Showing the injectors of ${t}.`)}notePageGone(e){let t=this.chosenPageId();if(!t||e?.[t])return;let n=this.pageOptions().find(e=>e.value===t)?.label??`The chosen page`;this.chosenPageId.set(null),this.announcement.set(`${n} closed, so this shows another page.`),this.wasGone=!0}toggle(e,t){t?.stopPropagation(),!this.normalizedQuery()&&this.collapsed.update(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}reveal(e){let t=this.index().map.get(e);if(!t)return;this.setView(t.injector.type===`element`?`element`:`environment`);let{parents:n}=this.index();this.collapsed.update(t=>{let r=new Set(t),i=n.get(e);for(;i;)r.delete(i),i=n.get(i);return r}),this.onlyProviding()&&this.providerCount(t)===0&&this.onlyProviding.set(!1),t.injector.type===`element`&&!t.injector.component&&this.componentsOnly.set(!1),this.isHiddenInjector(t)&&this.hideFramework.set(!1);let r=this.normalizedQuery();r&&!this.nodeMatches(t,r)&&this.query.set(``),this.select(e),td(()=>this.focusRow(e,!1),{injector:this.injector})}highlight(e){let t=this.rpc();if(!t)return;let n=e?.injector.type===`element`?e.injector.selector??null:null,r=n?{pageId:this.shownPageId()||null,selector:n}:null;t.scope(`pangular`).rpc.call(`request-page-highlight`,r).catch(()=>{})}onTreeKey(e){let t=this.rows();if(!t.length)return;let n=this.rovingId(),r=t.findIndex(e=>e.node.injector.id===n),i=Math.max(r,0),a=t[i],o=-1;switch(e.key){case`ArrowDown`:o=Math.min(i+1,t.length-1);break;case`ArrowUp`:o=Math.max(i-1,0);break;case`Home`:o=0;break;case`End`:o=t.length-1;break;case`ArrowRight`:a.hasChildren&&!a.expanded?this.toggle(a.node.injector.id):a.hasChildren&&(o=i+1);break;case`ArrowLeft`:if(a.hasChildren&&a.expanded&&!this.normalizedQuery())this.toggle(a.node.injector.id);else{let{parents:e}=this.index(),n=e.get(a.node.injector.id);for(o=-1;n&&o<0;){let r=n;o=t.findIndex(e=>e.node.injector.id===r),n=e.get(n)}}break;case`Enter`:case` `:this.select(a.node.injector.id);break;default:return}if(e.preventDefault(),o>=0){let e=t[o].node.injector.id;this.focusId.set(e),this.choose(e),queueMicrotask(()=>this.focusRow(e,!0))}}focusRow(e,t){let n=document.querySelector(`.row[data-id="${CSS.escape(e)}"]`);n&&(t&&n.focus(),n.scrollIntoView({block:`nearest`}))}clearTree(){this.stopTree?.(),this.stopTree=null}async loadInjectorTree(e){let t=++this.treeLoad;this.clearTree();let n=e.scope(`pangular`),r;try{r=await n.rpc.sharedState(`injector-tree`)}catch{t===this.treeLoad&&this.treeFailed.set(!0);return}if(this.destroyRef.destroyed||this.rpc()!==e||t!==this.treeLoad)return;this.treeFailed.set(!1);let i=e=>{let t=e&&typeof e==`object`?e:null;this.notePageGone(t?.pages),this.treeState.set(t),this.syncGone()};i(r.value()),this.clearTree(),this.stopTree=r.on(`updated`,i)}async loadSourceProviders(e){let t=e.scope(`pangular`);try{this.sourceProviders.set(await t.rpc.call(`get-providers`)),this.sourceFailed.set(!1)}catch{this.sourceProviders.set([]),this.sourceFailed.set(!0)}finally{this.loaded.set(!0)}}count(e){return e.reduce((e,t)=>e+1+this.count(t.children),0)}nodeMatches(e,t){let n=e.injector;return n.name.toLowerCase().includes(t)||!!n.component?.toLowerCase().includes(t)||!!n.directives?.some(e=>e.toLowerCase().includes(t))||e.providers.some(e=>e.token.toLowerCase().includes(t))||!!e.dependencies?.some(e=>e.token.toLowerCase().includes(t))}withoutFramework(e){if(!this.hideFramework())return e;let t=e=>e.flatMap(e=>e.injector.framework?t(e.children):[{...e,children:t(e.children)}]);return t(e)}prune(e,t){let n=[];for(let r of e){let e=this.prune(r.children,t);(t(r)||e.length)&&n.push({...r,children:e})}return n}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-di-inspector`]],viewQuery:function(e,t){e&1&&Og(t.queryInput,xW,5),e&2&&kg()},inputs:{rpc:[1,`rpc`],focus:[1,`focus`],canShowComponent:[1,`canShowComponent`]},outputs:{focusHandled:`focusHandled`,showComponent:`showComponent`},decls:11,vars:2,consts:[[`loadError`,``],[`pagePicker`,``],[`queryInput`,``],[`role`,`status`,1,`sr-only`],[`role`,`status`,1,`state`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`role`,`alert`,1,`state`,`load-error`],[1,`state-title`],[1,`state-hint`],[`type`,`button`,3,`click`],[1,`page-picker`],[`id`,`di-page-label`,1,`label-key`],[`labelledBy`,`di-page-label`,3,`valueChange`,`options`,`value`],[1,`intro`],[`capability`,`injectorMetadata`,`compact`,``,3,`page`],[1,`toolbar`],[`role`,`group`,`aria-label`,`Injector tree`,1,`segmented`],[1,`pill`],[`placeholder`,`Filter by token, component or injector`,`saveKey`,`injectors`,1,`search`,3,`valueChange`,`value`],[3,`ngTemplateOutlet`],[1,`checkbox`],[`type`,`checkbox`,3,`change`,`checked`],[1,`total`,`framework-hidden`],[1,`total`],[`type`,`button`,1,`refresh`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M20 11a8 8 0 1 0-2.3 5.7M20 4v7h-7`],[1,`notice`],[1,`where`],[1,`where`,`muted`],[1,`orphans`],[1,`layout`],[1,`state`],[`role`,`tree`,1,`tree`,3,`keydown`,`hidden`],[`role`,`treeitem`,1,`row`,3,`selected`,`--%NS%depth`],[`view`,`injectors`,`label`,`Resize the injector detail`,3,`sizeChange`,`min`,`max`,`defaultSize`,`size`],[`aria-labelledby`,`di-detail-title`,1,`detail`,`gone`],[`aria-labelledby`,`di-detail-title`,1,`detail`],[3,`rpc`,`pageId`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M12 11v5M12 8h.01`],[1,`where-label`],[`type`,`button`,1,`chip`],[1,`more`],[`type`,`button`,1,`chip`,3,`click`],[`aria-hidden`,`true`,1,`dot`],[1,`mono`],[1,`chip-tokens`],[`type`,`button`,1,`link`,3,`click`],[`type`,`button`,`aria-controls`,`di-orphans`,1,`orphans-toggle`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[`d`,`m9 6 6 6-6 6`],[1,`hint-tag`],[`id`,`di-orphans`,1,`orphans-body`,3,`hidden`],[1,`hint`],[1,`orphan-list`],[1,`token`,`mono`],[1,`flag`],[1,`orphan-file`,3,`file`,`line`],[`role`,`treeitem`,1,`row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[`aria-hidden`,`true`,1,`twisty`,3,`open`],[`aria-hidden`,`true`,1,`twisty-space`],[`aria-hidden`,`true`,1,`kind`],[1,`sr-only`],[1,`name`,`mono`],[1,`flag`,`inactive-flag`],[1,`sub`],[1,`meta`],[1,`count`],[1,`count`,`provides`],[`aria-hidden`,`true`,1,`twisty`,3,`click`],[`viewBox`,`0 0 24 24`],[`d`,`M12 5v14M5 12l7 7 7-7`],[`d`,`M21 8 12 3 3 8v8l9 5 9-5z`],[1,`detail-head`],[`id`,`di-detail-title`,1,`mono`],[1,`state`,`compact`],[`type`,`button`],[1,`badge`],[`aria-label`,`Classes on this element`,1,`classes`],[`type`,`button`,1,`show-component`],[1,`hint`,`inactive-note`],[1,`block`],[1,`path`],[3,`current`],[1,`hint`,`framework-note`],[1,`providers`],[1,`empty-line`],[3,`is-component`],[`type`,`button`,1,`show-component`,3,`click`],[1,`step`,`null`],[`type`,`button`,1,`step`],[1,`hint-inline`],[`type`,`button`,1,`step`,3,`click`],[1,`step-count`],[1,`deps`],[1,`dep`,3,`hit`],[1,`dep`],[1,`dep-main`],[1,`dep-meta`],[`type`,`button`,1,`from`],[1,`from`,`absent`],[1,`from`,`missing`],[`type`,`button`,1,`link`,`resolve-toggle`,3,`click`],[1,`resolution`,3,`id`,`hidden`],[1,`resolve-graph`],[`type`,`button`,1,`from`,3,`click`],[3,`class`],[`aria-hidden`,`true`,1,`resolve-dot`],[1,`resolve-state`],[1,`provider`,3,`hit`],[1,`provider`],[1,`flag`,`kind-flag`],[1,`dep-meta`,`declared`],[1,`provider-global`,3,`rpc`,`pageId`,`target`,`label`,`canLog`],[3,`rpc`,`pageId`,`injectorId`,`token`,`tokenId`,`index`,`position`],[1,`decl-file`,3,`file`,`line`],[`aria-hidden`,`true`,1,`spinner`],[`placeholder`,`Filter by token or file`,`saveKey`,`injectors-source`,1,`search`,3,`valueChange`,`value`],[`aria-live`,`polite`,1,`total`],[`capability`,`debugApi`,`compact`,``,3,`page`],[1,`source-providers`],[1,`provider-group`],[`role`,`list`,1,`provider-list`,3,`hidden`],[1,`provider-card`],[`type`,`button`,`aria-controls`,`di-helpers`,1,`group-toggle`,3,`click`],[1,`section-count`],[1,`hint`,`helper-hint`,3,`hidden`],[1,`provider-header`],[1,`token`],[1,`provided-in`],[1,`provider-meta`],[1,`path`,3,`file`,`line`],[1,`as`]],template:function(e,t){e&1&&(F(0,`p`,3),K(1),I(),Dh(2,NW,7,5,`ng-template`,null,0,q_)(4,FW,1,1,`ng-template`,null,1,q_),A(6,KG,43,32)(7,qG,4,0,`div`,4)(8,JG,1,3,`ng-container`,5)(9,XG,6,1)(10,sK,18,7)),e&2&&(D(),q(t.announcement()),D(5),j(t.roots().length>0?6:t.loaded()?t.loadFailed()&&t.sourceProviders().length===0?8:t.sourceProviders().length===0?9:10:7))},dependencies:[nP,bW,hD,Uv,QU,OD,Cj,gW,EM],styles:[`[_nghost-%COMP%] { --%NS%directive: #7cb4ff; display: block; color: var(--%NS%text); @@ -10236,11 +10250,11 @@ button[_ngcontent-%COMP%] { .provider-meta[_ngcontent-%COMP%] .as[_ngcontent-%COMP%] { color: var(--%NS%text-2); -}`]})};function mK(e){let t=/^(.*?)\s*\((.+?):(\d+)(?::\d+)?\)$/.exec(e)??/^()(.+?):(\d+)(?::\d+)?$/.exec(e);return t?{name:t[1],file:t[2],line:Number(t[3])}:{name:e}}var hK=1e3;function gK(e){return`${e>=1e3?`${hK}+`:String(e)} more ${e===1?`change`:`changes`} not shown`}function _K(e){let t=e.diffTruncated??0,n=e.diff.length+t;return n===0?`no change`:`${t>=1e3?`${n}+`:String(n)} ${n===1?`change`:`changes`}`}function vK(e,t){if(e.pageId!==t.pageId)return!1;let n=e.log.at(-1);if(!n)return!0;let r=t.log.at(-1);if(!r||r.seq<n.seq)return!1;let i=t.log.find(e=>e.seq===n.seq);return!i||i.timestamp===n.timestamp}var yK=`@type`,bK=new Set([`undefined`,`number`,`bigint`,`symbol`,`function`,`Date`,`RegExp`,`Error`,`Element`,`Map`,`Set`]);function xK(e){return!!e&&typeof e==`object`&&!Array.isArray(e)&&yK in e&&bK.has(e[yK])}function SK(e){return/^[A-Za-z_$][\w$]*$/.test(e)?e:JSON.stringify(e)}function CK(e,t=``){if(e===null)return`null`;if(typeof e==`string`)return JSON.stringify(e);if(typeof e!=`object`)return String(e);let n=t+` `;if(Array.isArray(e))return e.length?`[\n${e.map(e=>n+CK(e,n)).join(`, -`)}\n${t}]`:`[]`;if(xK(e)){let r=e;switch(r[yK]){case`undefined`:return`undefined`;case`Date`:return`Date(${r.value})`;case`bigint`:return`${r.value}n`;case`symbol`:return`Symbol(${r.value})`;case`function`:return`ƒ ${r.name}()`;case`Error`:return`${r.name??`Error`}: ${r.message}`;case`Element`:return`<${r.value}>`;case`Map`:{let e=r.entries??[];if(!e.length)return`Map(${r.size}) {}`;let i=e.map(([e,t])=>`${n}${CK(e,n)} => ${CK(t,n)}`);return`Map(${r.size}) {\n${i.join(`, -`)}\n${t}}`}case`Set`:{let e=r.values??[];return e.length?`Set(${r.size}) {\n${e.map(e=>n+CK(e,n)).join(`, -`)}\n${t}}`:`Set(${r.size}) {}`}default:return String(r.value??r[yK])}}let r=Object.entries(e);return r.length?`{\n${r.map(([e,t])=>`${n}${SK(e)}: ${CK(t,n)}`).join(`, -`)}\n${t}}`:`{}`}function wK(e,t=120){let n=CK(e).replace(/\s*\n\s*/g,` `);return n.length>t?`${n.slice(0,t-1)}…`:n}var TK=[[[``,`tab-action`,``]],[[``,`tab-diff`,``]]],EK=[`[tab-action]`,`[tab-diff]`],DK=(e,t)=>t.id,OK=(e,t)=>t.path+e;function kK(e,t){if(e&1){let e=B();R(0,`button`,5),U(`click`,function(){let t=C(e).$implicit;return w(W().select(t.id))}),K(1),z()}if(e&2){let e=t.$implicit,n=W();V(`id`,n.idPrefix()+`-tab-`+e.id),k(`aria-selected`,n.active()===e.id)(`aria-controls`,n.idPrefix()+`-panel-`+e.id)(`tabindex`,n.active()===e.id?0:-1),D(),J(` `,e.label,` `)}}function AK(e,t){e&1&&(R(0,`p`,9),K(1,`The state did not change.`),z())}function jK(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W().$implicit,t=W(3);D(),q(t.shortText(e.before))}}function MK(e,t){e&1&&(R(0,`span`,13),K(1,`→`),z(),R(2,`span`,14),K(3,`became`),z())}function NK(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W().$implicit,t=W(3);D(),q(t.shortText(e.after))}}function PK(e,t){if(e&1&&(R(0,`li`)(1,`code`,11),K(2),z(),R(3,`span`,12),K(4),z(),A(5,jK,2,1,`code`),A(6,MK,4,0),A(7,NK,2,1,`code`),z()),e&2){let e=t.$implicit;D(2),q(e.path),D(2),q(e.op),D(),j(e.op===`add`?-1:5),D(),j(e.op===`change`?6:-1),D(),j(e.op===`remove`?-1:7)}}function FK(e,t){if(e&1&&(R(0,`p`,9),K(1),z()),e&2){let e=W(),t=W(2);D(),q(t.moreChanges(e.diffTruncated))}}function IK(e,t){if(e&1&&(R(0,`p`,8),K(1),z(),A(2,AK,2,0,`p`,9),R(3,`ul`,10),M(4,PK,8,5,`li`,null,OK),z(),A(6,FK,2,1,`p`,9)),e&2){let e=t;D(),J(`All changes (`,e.diff.length+(e.diffTruncated??0),`)`),D(),j(e.diff.length?-1:2),D(2),N(e.diff),D(2),j(e.diffTruncated?6:-1)}}function LK(e,t){if(e&1&&(R(0,`p`,6),K(1),z()),e&2){let e=W(2);D(),q(e.error())}}function RK(e,t){if(e&1){let e=B();R(0,`button`,15),U(`click`,function(){return C(e),w(W(2).load())}),K(1,` Show all changes `),z()}e&2&&V(`disabled`,W(2).loading())}function zK(e,t){if(e&1&&A(0,IK,7,3)(1,LK,2,1,`p`,6)(2,RK,2,1,`button`,7),e&2){let e,t=W();j((e=t.detail())?0:t.error()?1:2,e)}}function BK(e,t){e&1&&(R(0,`p`,3),K(1,`Reading the state…`),z())}function VK(e,t){if(e&1){let e=B();R(0,`div`,4)(1,`p`),K(2),z(),R(3,`button`,16),U(`click`,function(){return C(e),w(W().load())}),K(4,`Retry`),z()()}if(e&2){let e=W();D(2),q(e.error())}}function HK(e,t){if(e&1&&(R(0,`p`,3),K(1),z()),e&2){let e=W(2);D(),q(e.copied())}}function UK(e,t){if(e&1){let e=B();R(0,`div`,17)(1,`div`,18)(2,`button`,19),U(`click`,function(){return C(e),w(W().showBefore.set(!1))}),K(3),z(),R(4,`button`,19),U(`click`,function(){return C(e),w(W().showBefore.set(!0))}),K(5),z()(),R(6,`button`,16),U(`click`,function(){return C(e),w(W().copy())}),K(7,` Copy `),z()(),R(8,`pre`,20),K(9),z(),R(10,`p`,21),K(11,`Secret-looking fields are redacted, and very large values are cut.`),z(),A(12,HK,2,1,`p`,3)}if(e&2){let e=t,n=W();D(2),k(`aria-pressed`,!n.showBefore()),D(),J(` After #`,e.seq,` `),D(),k(`aria-pressed`,n.showBefore()),D(),J(` Before #`,e.seq,` `),D(),k(`aria-label`,`Copy the state `+(n.showBefore()?`before`:`after`)+` #`+e.seq),D(2),k(`aria-label`,n.stateLabel()),D(),q(n.stateText()),D(3),j(n.copied()?12:-1)}}var WK=[{id:`action`,label:`Action`},{id:`diff`,label:`Diff`},{id:`state`,label:`State`}],GK=class e{seq=$.required();diffTruncated=$(void 0);idPrefix=$.required();loader=$.required();loadDiff=$(!1);tabs=WK;host=S(kl);active=Q({source:this.seq,computation:()=>`diff`});detail=Q({source:this.seq,computation:()=>null});error=Q({source:this.seq,computation:()=>``});loading=Q({source:this.seq,computation:()=>!1});showBefore=E(!1);copied=E(``);truncated=X(()=>(this.diffTruncated()??0)>0);constructor(){ac(()=>{this.loadDiff()&&(this.seq(),Z(()=>void this.load()))})}stateText=X(()=>{let e=this.detail();return e?CK(this.showBefore()?e.before:e.after):``});stateLabel=X(()=>`State ${this.showBefore()?`before`:`after`} entry #${this.seq()}`);select(e){this.active.set(e),e===`state`&&!this.detail()&&!this.loading()&&this.load()}request=0;async load(){let e=this.seq(),t=++this.request;this.loading.set(!0),this.error.set(``);let n;try{n=await this.loader()(e)}catch{n={error:`The devtools server did not answer. Try again.`}}t===this.request&&e===this.seq()&&(this.loading.set(!1),n.ok&&n.detail?this.detail.set(n.detail):this.error.set(n.error??`The page sent no state for this entry.`))}onKey(e){let t=WK.findIndex(e=>e.id===this.active()),n=e.key===`ArrowRight`?(t+1)%WK.length:e.key===`ArrowLeft`?(t+WK.length-1)%WK.length:e.key===`Home`?0:e.key===`End`?WK.length-1:-1;n<0||(e.preventDefault(),this.select(WK[n].id),this.host.nativeElement.querySelector(`#${this.idPrefix()}-tab-${WK[n].id}`)?.focus())}async copy(){try{await navigator.clipboard.writeText(this.stateText()),this.copied.set(`Copied the state.`)}catch{this.copied.set(`The clipboard is not available here.`)}}shortText(e){return wK(e,80)}moreChanges(e){return gK(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-entry-tabs`]],inputs:{seq:[1,`seq`],diffTruncated:[1,`diffTruncated`],idPrefix:[1,`idPrefix`],loader:[1,`loader`],loadDiff:[1,`loadDiff`]},ngContentSelectors:EK,decls:12,vars:12,consts:[[`role`,`tablist`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,1,`tab`,3,`id`],[`role`,`tabpanel`,`tabindex`,`0`,1,`panel`,3,`id`,`hidden`],[`role`,`status`,1,`muted`],[`role`,`alert`,1,`error-box`],[`type`,`button`,`role`,`tab`,1,`tab`,3,`click`,`id`],[`role`,`alert`,1,`error-text`],[`type`,`button`,1,`btn`,3,`disabled`],[1,`sub`],[1,`muted`],[1,`all-diff`],[1,`path`],[1,`op`],[`aria-hidden`,`true`],[1,`visually-hidden`],[`type`,`button`,1,`btn`,3,`click`,`disabled`],[`type`,`button`,1,`btn`,3,`click`],[1,`state-head`],[`role`,`group`,`aria-label`,`Which state to show`,1,`segmented`],[`type`,`button`,3,`click`],[`tabindex`,`0`,1,`state`],[1,`hint`]],template:function(e,t){if(e&1&&(wg(TK),R(0,`div`,0),U(`keydown`,function(e){return t.onKey(e)}),M(1,kK,2,5,`button`,1,DK),z(),R(3,`div`,2),Tg(4),z(),R(5,`div`,2),Tg(6,1),A(7,zK,3,1),z(),R(8,`div`,2),A(9,BK,2,0,`p`,3)(10,VK,5,1,`div`,4)(11,UK,13,8),z()),e&2){let e;k(`aria-label`,`Entry #`+t.seq()+` details`),D(),N(t.tabs),D(2),V(`id`,t.idPrefix()+`-panel-action`)(`hidden`,t.active()!==`action`),k(`aria-labelledby`,t.idPrefix()+`-tab-action`),D(2),V(`id`,t.idPrefix()+`-panel-diff`)(`hidden`,t.active()!==`diff`),k(`aria-labelledby`,t.idPrefix()+`-tab-diff`),D(2),j(t.truncated()||t.loadDiff()?7:-1),D(),V(`id`,t.idPrefix()+`-panel-state`)(`hidden`,t.active()!==`state`),k(`aria-labelledby`,t.idPrefix()+`-tab-state`),D(),j(t.loading()?9:t.error()?10:(e=t.detail())?11:-1,e)}},styles:[`[_nghost-%COMP%] { +}`]})};function yK(e){let t=/^(.*?)\s*\((.+?):(\d+)(?::\d+)?\)$/.exec(e)??/^()(.+?):(\d+)(?::\d+)?$/.exec(e);return t?{name:t[1],file:t[2],line:Number(t[3])}:{name:e}}var bK=1e3;function xK(e){return`${e>=1e3?`${bK}+`:String(e)} more ${e===1?`change`:`changes`} not shown`}function SK(e){let t=e.diffTruncated??0,n=e.diff.length+t;return n===0?`no change`:`${t>=1e3?`${n}+`:String(n)} ${n===1?`change`:`changes`}`}function CK(e,t){if(e.pageId!==t.pageId)return!1;let n=e.log.at(-1);if(!n)return!0;let r=t.log.at(-1);if(!r||r.seq<n.seq)return!1;let i=t.log.find(e=>e.seq===n.seq);return!i||i.timestamp===n.timestamp}var wK=`@type`,TK=new Set([`undefined`,`number`,`bigint`,`symbol`,`function`,`Date`,`RegExp`,`Error`,`Element`,`Map`,`Set`]);function EK(e){return!!e&&typeof e==`object`&&!Array.isArray(e)&&wK in e&&TK.has(e[wK])}function DK(e){return/^[A-Za-z_$][\w$]*$/.test(e)?e:JSON.stringify(e)}function OK(e,t=``){if(e===null)return`null`;if(typeof e==`string`)return JSON.stringify(e);if(typeof e!=`object`)return String(e);let n=t+` `;if(Array.isArray(e))return e.length?`[\n${e.map(e=>n+OK(e,n)).join(`, +`)}\n${t}]`:`[]`;if(EK(e)){let r=e;switch(r[wK]){case`undefined`:return`undefined`;case`Date`:return`Date(${r.value})`;case`bigint`:return`${r.value}n`;case`symbol`:return`Symbol(${r.value})`;case`function`:return`ƒ ${r.name}()`;case`Error`:return`${r.name??`Error`}: ${r.message}`;case`Element`:return`<${r.value}>`;case`Map`:{let e=r.entries??[];if(!e.length)return`Map(${r.size}) {}`;let i=e.map(([e,t])=>`${n}${OK(e,n)} => ${OK(t,n)}`);return`Map(${r.size}) {\n${i.join(`, +`)}\n${t}}`}case`Set`:{let e=r.values??[];return e.length?`Set(${r.size}) {\n${e.map(e=>n+OK(e,n)).join(`, +`)}\n${t}}`:`Set(${r.size}) {}`}default:return String(r.value??r[wK])}}let r=Object.entries(e);return r.length?`{\n${r.map(([e,t])=>`${n}${DK(e)}: ${OK(t,n)}`).join(`, +`)}\n${t}}`:`{}`}function kK(e,t=120){let n=OK(e).replace(/\s*\n\s*/g,` `);return n.length>t?`${n.slice(0,t-1)}…`:n}var AK=[[[``,`tab-action`,``]],[[``,`tab-diff`,``]]],jK=[`[tab-action]`,`[tab-diff]`],MK=(e,t)=>t.id,NK=(e,t)=>t.path+e;function PK(e,t){if(e&1){let e=B();R(0,`button`,5),U(`click`,function(){let t=C(e).$implicit;return w(W().select(t.id))}),K(1),z()}if(e&2){let e=t.$implicit,n=W();V(`id`,n.idPrefix()+`-tab-`+e.id),k(`aria-selected`,n.active()===e.id)(`aria-controls`,n.idPrefix()+`-panel-`+e.id)(`tabindex`,n.active()===e.id?0:-1),D(),J(` `,e.label,` `)}}function FK(e,t){e&1&&(R(0,`p`,9),K(1,`The state did not change.`),z())}function IK(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W().$implicit,t=W(3);D(),q(t.shortText(e.before))}}function LK(e,t){e&1&&(R(0,`span`,13),K(1,`→`),z(),R(2,`span`,14),K(3,`became`),z())}function RK(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W().$implicit,t=W(3);D(),q(t.shortText(e.after))}}function zK(e,t){if(e&1&&(R(0,`li`)(1,`code`,11),K(2),z(),R(3,`span`,12),K(4),z(),A(5,IK,2,1,`code`),A(6,LK,4,0),A(7,RK,2,1,`code`),z()),e&2){let e=t.$implicit;D(2),q(e.path),D(2),q(e.op),D(),j(e.op===`add`?-1:5),D(),j(e.op===`change`?6:-1),D(),j(e.op===`remove`?-1:7)}}function BK(e,t){if(e&1&&(R(0,`p`,9),K(1),z()),e&2){let e=W(),t=W(2);D(),q(t.moreChanges(e.diffTruncated))}}function VK(e,t){if(e&1&&(R(0,`p`,8),K(1),z(),A(2,FK,2,0,`p`,9),R(3,`ul`,10),M(4,zK,8,5,`li`,null,NK),z(),A(6,BK,2,1,`p`,9)),e&2){let e=t;D(),J(`All changes (`,e.diff.length+(e.diffTruncated??0),`)`),D(),j(e.diff.length?-1:2),D(2),N(e.diff),D(2),j(e.diffTruncated?6:-1)}}function HK(e,t){if(e&1&&(R(0,`p`,6),K(1),z()),e&2){let e=W(2);D(),q(e.error())}}function UK(e,t){if(e&1){let e=B();R(0,`button`,15),U(`click`,function(){return C(e),w(W(2).load())}),K(1,` Show all changes `),z()}e&2&&V(`disabled`,W(2).loading())}function WK(e,t){if(e&1&&A(0,VK,7,3)(1,HK,2,1,`p`,6)(2,UK,2,1,`button`,7),e&2){let e,t=W();j((e=t.detail())?0:t.error()?1:2,e)}}function GK(e,t){e&1&&(R(0,`p`,3),K(1,`Reading the state…`),z())}function KK(e,t){if(e&1){let e=B();R(0,`div`,4)(1,`p`),K(2),z(),R(3,`button`,16),U(`click`,function(){return C(e),w(W().load())}),K(4,`Retry`),z()()}if(e&2){let e=W();D(2),q(e.error())}}function qK(e,t){if(e&1&&(R(0,`p`,3),K(1),z()),e&2){let e=W(2);D(),q(e.copied())}}function JK(e,t){if(e&1){let e=B();R(0,`div`,17)(1,`div`,18)(2,`button`,19),U(`click`,function(){return C(e),w(W().showBefore.set(!1))}),K(3),z(),R(4,`button`,19),U(`click`,function(){return C(e),w(W().showBefore.set(!0))}),K(5),z()(),R(6,`button`,16),U(`click`,function(){return C(e),w(W().copy())}),K(7,` Copy `),z()(),R(8,`pre`,20),K(9),z(),R(10,`p`,21),K(11,`Secret-looking fields are redacted, and very large values are cut.`),z(),A(12,qK,2,1,`p`,3)}if(e&2){let e=t,n=W();D(2),k(`aria-pressed`,!n.showBefore()),D(),J(` After #`,e.seq,` `),D(),k(`aria-pressed`,n.showBefore()),D(),J(` Before #`,e.seq,` `),D(),k(`aria-label`,`Copy the state `+(n.showBefore()?`before`:`after`)+` #`+e.seq),D(2),k(`aria-label`,n.stateLabel()),D(),q(n.stateText()),D(3),j(n.copied()?12:-1)}}var YK=[{id:`action`,label:`Action`},{id:`diff`,label:`Diff`},{id:`state`,label:`State`}],XK=class e{seq=$.required();diffTruncated=$(void 0);idPrefix=$.required();loader=$.required();loadDiff=$(!1);tabs=YK;host=S(kl);active=Q({source:this.seq,computation:()=>`diff`});detail=Q({source:this.seq,computation:()=>null});error=Q({source:this.seq,computation:()=>``});loading=Q({source:this.seq,computation:()=>!1});showBefore=E(!1);copied=E(``);truncated=X(()=>(this.diffTruncated()??0)>0);constructor(){ac(()=>{this.loadDiff()&&(this.seq(),Z(()=>void this.load()))})}stateText=X(()=>{let e=this.detail();return e?OK(this.showBefore()?e.before:e.after):``});stateLabel=X(()=>`State ${this.showBefore()?`before`:`after`} entry #${this.seq()}`);select(e){this.active.set(e),e===`state`&&!this.detail()&&!this.loading()&&this.load()}request=0;async load(){let e=this.seq(),t=++this.request;this.loading.set(!0),this.error.set(``);let n;try{n=await this.loader()(e)}catch{n={error:`The devtools server did not answer. Try again.`}}t===this.request&&e===this.seq()&&(this.loading.set(!1),n.ok&&n.detail?this.detail.set(n.detail):this.error.set(n.error??`The page sent no state for this entry.`))}onKey(e){let t=YK.findIndex(e=>e.id===this.active()),n=e.key===`ArrowRight`?(t+1)%YK.length:e.key===`ArrowLeft`?(t+YK.length-1)%YK.length:e.key===`Home`?0:e.key===`End`?YK.length-1:-1;n<0||(e.preventDefault(),this.select(YK[n].id),this.host.nativeElement.querySelector(`#${this.idPrefix()}-tab-${YK[n].id}`)?.focus())}async copy(){try{await navigator.clipboard.writeText(this.stateText()),this.copied.set(`Copied the state.`)}catch{this.copied.set(`The clipboard is not available here.`)}}shortText(e){return kK(e,80)}moreChanges(e){return xK(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-entry-tabs`]],inputs:{seq:[1,`seq`],diffTruncated:[1,`diffTruncated`],idPrefix:[1,`idPrefix`],loader:[1,`loader`],loadDiff:[1,`loadDiff`]},ngContentSelectors:jK,decls:12,vars:12,consts:[[`role`,`tablist`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,1,`tab`,3,`id`],[`role`,`tabpanel`,`tabindex`,`0`,1,`panel`,3,`id`,`hidden`],[`role`,`status`,1,`muted`],[`role`,`alert`,1,`error-box`],[`type`,`button`,`role`,`tab`,1,`tab`,3,`click`,`id`],[`role`,`alert`,1,`error-text`],[`type`,`button`,1,`btn`,3,`disabled`],[1,`sub`],[1,`muted`],[1,`all-diff`],[1,`path`],[1,`op`],[`aria-hidden`,`true`],[1,`visually-hidden`],[`type`,`button`,1,`btn`,3,`click`,`disabled`],[`type`,`button`,1,`btn`,3,`click`],[1,`state-head`],[`role`,`group`,`aria-label`,`Which state to show`,1,`segmented`],[`type`,`button`,3,`click`],[`tabindex`,`0`,1,`state`],[1,`hint`]],template:function(e,t){if(e&1&&(Tg(AK),R(0,`div`,0),U(`keydown`,function(e){return t.onKey(e)}),M(1,PK,2,5,`button`,1,MK),z(),R(3,`div`,2),Eg(4),z(),R(5,`div`,2),Eg(6,1),A(7,WK,3,1),z(),R(8,`div`,2),A(9,GK,2,0,`p`,3)(10,KK,5,1,`div`,4)(11,JK,13,8),z()),e&2){let e;k(`aria-label`,`Entry #`+t.seq()+` details`),D(),N(t.tabs),D(2),V(`id`,t.idPrefix()+`-panel-action`)(`hidden`,t.active()!==`action`),k(`aria-labelledby`,t.idPrefix()+`-tab-action`),D(2),V(`id`,t.idPrefix()+`-panel-diff`)(`hidden`,t.active()!==`diff`),k(`aria-labelledby`,t.idPrefix()+`-tab-diff`),D(2),j(t.truncated()||t.loadDiff()?7:-1),D(),V(`id`,t.idPrefix()+`-panel-state`)(`hidden`,t.active()!==`state`),k(`aria-labelledby`,t.idPrefix()+`-tab-state`),D(),j(t.loading()?9:t.error()?10:(e=t.detail())?11:-1,e)}},styles:[`[_nghost-%COMP%] { display: block; min-width: 0; margin-top: 10px; @@ -10432,7 +10446,7 @@ button[_ngcontent-%COMP%] { .tab[_ngcontent-%COMP%] { transition: none; } -}`]})},KK=[`generateLive`],qK=[`generateImported`],JK=[`importButton`],YK=[`testHeading`],XK=(e,t)=>t.seq;function ZK(e,t){if(e&1){let e=B();F(0,`div`,8)(1,`div`,18)(2,`span`,19),K(3,`From`),I(),F(4,`app-select`,20),S_(`valueChange`,function(t){C(e);let n=W();return x_(n.from,t)||(n.from=t),w(t)}),I()(),F(5,`div`,18)(6,`span`,21),K(7,`To`),I(),F(8,`app-select`,22),S_(`valueChange`,function(t){C(e);let n=W();return x_(n.to,t)||(n.to=t),w(t)}),I()()()}if(e&2){let e=W();D(4),P(`options`,e.options()),b_(`value`,e.from),D(4),P(`options`,e.options()),b_(`value`,e.to)}}function QK(e,t){e&1&&(F(0,`p`,9),K(1,`No recorded changes on this store yet, so there is nothing to export.`),I())}function $K(e,t){if(e&1&&(F(0,`p`,15),K(1),I()),e&2){let e=W();D(),q(e.error())}}function eq(e,t){if(e&1&&(F(0,`li`),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function tq(e,t){if(e&1&&(F(0,`ul`,25),M(1,eq,2,1,`li`,null,Yh),I()),e&2){let e=W();D(),N(e.notes)}}function nq(e,t){if(e&1){let e=B();F(0,`div`,16)(1,`div`,23)(2,`h5`,24,3),K(4),I(),F(5,`div`,10)(6,`button`,12),H(`click`,function(){return C(e),w(W().copyTest())}),K(7,`Copy`),I(),F(8,`button`,12),H(`click`,function(){return C(e),w(W().downloadTest())}),K(9,`Download`),I(),F(10,`button`,12),H(`click`,function(){return C(e),w(W().closeTest())}),K(11,`Close`),I()()(),A(12,tq,3,0,`ul`,25),F(13,`pre`,26),K(14),I()()}if(e&2){let e=t;D(4),J(` Generated test (`,e.framework,`) `),D(8),j(e.notes.length?12:-1),D(),k(`aria-label`,`Test code, `+e.file),D(),q(e.code)}}function rq(e,t){e&1&&(F(0,`p`,9),K(1),I()),e&2&&(D(),J(`Recorded on `,t))}function iq(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,31),H(`click`,function(){let t=C(e).$implicit;return w(W(2).importedSeq.set(t.seq))}),F(2,`span`,32),K(3),I(),F(4,`span`,33),K(5),I()()()}if(e&2){let e=t.$implicit,n=W(2);D(),k(`aria-pressed`,e.seq===n.importedSeq()),D(2),J(`#`,e.seq),D(2),q(e.type)}}function aq(e,t){if(e&1&&(F(0,`p`,35),K(1,`Action`),I(),F(2,`pre`,36),K(3),I()),e&2){let e=W(),t=W(2);D(3),q(t.prettyText(e.action))}}function oq(e,t){if(e&1&&(F(0,`p`,35),K(1,`Arguments`),I(),F(2,`pre`,36),K(3),I()),e&2){let e=W(),t=W(2);D(3),q(t.prettyText(e.args))}}function sq(e,t){e&1&&(F(0,`p`,9),K(1,`No action or arguments were recorded for this entry.`),I())}function cq(e,t){if(e&1&&(F(0,`app-entry-tabs`,30)(1,`div`,34),A(2,aq,4,1),A(3,oq,4,1),A(4,sq,2,0,`p`,9),I()()),e&2){let e=t,n=W(2);P(`seq`,e.seq)(`loadDiff`,!0)(`loader`,n.importedLoader),D(2),j(e.action===void 0?-1:2),D(),j(e.args?.length?3:-1),D(),j(e.action===void 0&&!e.args?.length?4:-1)}}function lq(e,t){if(e&1){let e=B();F(0,`div`,17)(1,`div`,23)(2,`h5`,27),K(3),F(4,`span`,28),K(5),I()(),F(6,`div`,10)(7,`button`,12,4),H(`click`,function(){let t=C(e);return w(W().generate(t.id))}),K(9,` Generate test `),I(),F(10,`button`,12),H(`click`,function(){return C(e),w(W().closeImported())}),K(11,`Close`),I()()(),A(12,rq,2,1,`p`,9),F(13,`ul`,29),M(14,iq,6,3,`li`,null,XK),I(),A(16,cq,5,6,`app-entry-tabs`,30),I()}if(e&2){let e,n,r=t,i=W();D(3),J(` Imported: `,r.store.name??r.store.id,` `),D(2),q(r.entries.length),D(2),k(`aria-disabled`,i.busy()?`true`:null),D(5),j((e=r.page?.url)?12:-1,e),D(2),N(r.entries),D(2),j((n=i.importedEntry())?16:-1,n)}}function uq(e,t,n){let r=new Blob([e],{type:n}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=t,document.body.append(a),a.click(),a.remove(),setTimeout(()=>URL.revokeObjectURL(i),0)}var dq=class e{rpc=$(null);pageId=$(null);storeId=$(null);entries=$([]);framework=`Vitest`;options=X(()=>this.entries().map(e=>({value:String(e.seq),label:`#${e.seq} ${e.type}`})));from=Q({source:this.entries,computation:(e,t)=>t?.value&&e.some(e=>String(e.seq)===t.value)?t.value:e[0]?String(e[0].seq):null});to=Q({source:this.entries,computation:(e,t)=>{let n=e.at(-1),r=t?.value&&e.some(e=>String(e.seq)===t.value),i=t&&t.value===String(t.source.at(-1)?.seq);return r&&!i?t.value:n?String(n.seq):null}});injector=S(gs);generateLive=av(`generateLive`);generateImported=av(`generateImported`);importButton=av(`importButton`);testHeading=av(`testHeading`);testFrom=`live`;busy=E(!1);message=E(``);error=E(``);test=E(null);imported=E(null);importedSeq=E(null);canExport=X(()=>!!this.rpc()&&!!this.pageId()&&!!this.storeId()&&this.entries().length>0);importedEntry=X(()=>{let e=this.imported(),t=this.importedSeq();return e?.entries.find(e=>e.seq===t)??null});range(){let e=Number(this.from()),t=Number(this.to()),[n,r]=e<=t?[e,t]:[t,e];return{storeId:this.storeId()??void 0,...Number.isFinite(n)?{from:n}:{},...Number.isFinite(r)?{to:r}:{}}}async ask(e){try{return await _T(this.rpc(),`request-ngrx-history`,e)??{error:`The devtools server is not connected.`}}catch{return{error:`The devtools server did not answer. Try again.`}}}importedLoader=e=>{let t=this.imported()?.id;return t?this.ask({session:t,request:{type:`entry`,seq:e}}):Promise.resolve({error:`No session is imported.`})};focusAfterRender(e){ed(()=>e()?.nativeElement.focus(),{injector:this.injector})}async exportLive(){if(this.busy()||!this.canExport())return;this.busy.set(!0),this.error.set(``),this.message.set(``);let e=await this.ask({pageId:this.pageId(),request:{type:`export`,...this.range()}});if(this.busy.set(!1),!e.ok||!e.session){this.error.set(e.error??`Nothing was exported.`);return}uq(JSON.stringify(e.session,null,2),`ngrx-session-${this.storeId()}.json`,`application/json`),this.message.set(e.message??`Exported the session.`)}async generate(e){if(this.busy()||!e&&!this.canExport())return;this.busy.set(!0),this.error.set(``),this.message.set(``);let t=await this.ask(e?{session:e,request:{type:`test`}}:{pageId:this.pageId(),request:{type:`test`,...this.range()}});if(this.busy.set(!1),!t.ok||!t.test){this.error.set(t.error??`No test was generated.`);return}this.test.set(t.test),this.testFrom=e?`imported`:`live`,this.message.set(`Generated ${t.test.file}.`),this.focusAfterRender(()=>this.testHeading())}pickFile(e){this.busy()||e.click()}async read(e){let t=e.files?.[0];if(e.value=``,!t)return;if(this.error.set(``),this.message.set(``),t.size>4e6){this.error.set(`The file is larger than 4 MB, so it was not imported.`);return}this.busy.set(!0);let n;try{n=await _T(this.rpc(),`import-ngrx-session`,{session:await t.text()})}catch{n={error:`The devtools server did not answer. Try again.`}}if(this.busy.set(!1),!n||!(`id`in n)||!n.ok){this.error.set(`Not imported: ${n?.error??`the devtools server is not connected.`}`);return}this.imported.set(n),this.importedSeq.set(n.entries[0]?.seq??null),this.message.set(`Imported ${n.entries.length} entries from ${t.name}.`)}closeImported(){this.imported.set(null),this.importedSeq.set(null),this.testFrom===`imported`&&(this.testFrom=`live`),this.focusAfterRender(()=>this.importButton())}closeTest(){this.test.set(null);let e=this.testFrom;this.focusAfterRender(()=>{let t=this.generateLive(),n=this.generateImported();return e===`imported`&&n?n:t&&!t.nativeElement.disabled?t:this.importButton()})}async copyTest(){let e=this.test();if(e)try{await navigator.clipboard.writeText(e.code),this.message.set(`Copied the test.`)}catch{this.message.set(`The clipboard is not available here.`)}}downloadTest(){let e=this.test();e&&uq(e.code,e.file,`text/plain`)}prettyText(e){return CK(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-store-session`]],viewQuery:function(e,t){e&1&&Dg(t.generateLive,KK,5)(t.generateImported,qK,5)(t.importButton,JK,5)(t.testHeading,YK,5),e&2&&Og(4)},inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`],storeId:[1,`storeId`],entries:[1,`entries`]},decls:23,vars:11,consts:[[`generateLive`,``],[`importButton`,``],[`file`,``],[`testHeading`,``],[`generateImported`,``],[`aria-labelledby`,`ngrx-session-heading`,1,`session`],[`id`,`ngrx-session-heading`],[1,`intro`],[1,`range`],[1,`muted`],[1,`actions`],[`type`,`button`,1,`btn`,3,`click`,`disabled`],[`type`,`button`,1,`btn`,3,`click`],[`type`,`file`,`accept`,`.json,application/json`,`hidden`,``,`aria-label`,`Session file`,3,`change`],[`role`,`status`,1,`session-message`],[`role`,`alert`,1,`error`],[`role`,`region`,`aria-labelledby`,`ngrx-test-heading`,1,`test`],[`role`,`region`,`aria-labelledby`,`ngrx-imported-heading`,1,`imported`],[1,`field`],[`id`,`ngrx-range-from`,1,`label`],[`labelledBy`,`ngrx-range-from`,3,`valueChange`,`options`,`value`],[`id`,`ngrx-range-to`,1,`label`],[`labelledBy`,`ngrx-range-to`,3,`valueChange`,`options`,`value`],[1,`head`],[`id`,`ngrx-test-heading`,`tabindex`,`-1`],[1,`notes`],[`tabindex`,`0`,1,`code`],[`id`,`ngrx-imported-heading`],[1,`pill`],[`aria-label`,`Imported entries`,1,`entries`],[`idPrefix`,`ngrx-imported`,3,`seq`,`loadDiff`,`loader`],[`type`,`button`,1,`entry`,3,`click`],[1,`seq`],[1,`type`],[`tab-action`,``],[1,`label`],[1,`code`]],template:function(e,t){if(e&1){let e=B();F(0,`section`,5)(1,`h4`,6),K(2,`Session`),I(),F(3,`p`,7),K(4),I(),A(5,ZK,9,4,`div`,8)(6,QK,2,0,`p`,9),F(7,`div`,10)(8,`button`,11),H(`click`,function(){return t.exportLive()}),K(9,` Export session `),I(),F(10,`button`,11,0),H(`click`,function(){return t.generate(null)}),K(12,` Generate test `),I(),F(13,`button`,12,1),H(`click`,function(){C(e);let n=kg(17);return w(t.pickFile(n))}),K(15,` Import session `),I(),F(16,`input`,13,2),H(`change`,function(){C(e);let n=kg(17);return w(t.read(n))}),I()(),F(18,`p`,14),K(19),I(),A(20,$K,2,1,`p`,15),A(21,nq,15,4,`div`,16),A(22,lq,17,5,`div`,17),I()}if(e&2){let e,n;D(4),J(` Export a range of this store's log with the state it produced, import a session file to read it here, or turn the range into a `,t.framework,` spec. Values are redacted like the rest of the page. `),D(),j(t.options().length?5:6),D(3),P(`disabled`,!t.canExport()),k(`aria-disabled`,t.busy()?`true`:null),D(2),P(`disabled`,!t.canExport()),k(`aria-disabled`,t.busy()?`true`:null),D(3),k(`aria-disabled`,t.busy()?`true`:null),D(6),q(t.message()),D(),j(t.error()?20:-1),D(),j((e=t.test())?21:-1,e),D(),j((n=t.imported())?22:-1,n)}},dependencies:[OD,GK],styles:[`[_nghost-%COMP%] { +}`]})},ZK=[`generateLive`],QK=[`generateImported`],$K=[`importButton`],eq=[`testHeading`],tq=(e,t)=>t.seq;function nq(e,t){if(e&1){let e=B();F(0,`div`,8)(1,`div`,18)(2,`span`,19),K(3,`From`),I(),F(4,`app-select`,20),w_(`valueChange`,function(t){C(e);let n=W();return C_(n.from,t)||(n.from=t),w(t)}),I()(),F(5,`div`,18)(6,`span`,21),K(7,`To`),I(),F(8,`app-select`,22),w_(`valueChange`,function(t){C(e);let n=W();return C_(n.to,t)||(n.to=t),w(t)}),I()()()}if(e&2){let e=W();D(4),P(`options`,e.options()),S_(`value`,e.from),D(4),P(`options`,e.options()),S_(`value`,e.to)}}function rq(e,t){e&1&&(F(0,`p`,9),K(1,`No recorded changes on this store yet, so there is nothing to export.`),I())}function iq(e,t){if(e&1&&(F(0,`p`,15),K(1),I()),e&2){let e=W();D(),q(e.error())}}function aq(e,t){if(e&1&&(F(0,`li`),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function oq(e,t){if(e&1&&(F(0,`ul`,25),M(1,aq,2,1,`li`,null,Xh),I()),e&2){let e=W();D(),N(e.notes)}}function sq(e,t){if(e&1){let e=B();F(0,`div`,16)(1,`div`,23)(2,`h5`,24,3),K(4),I(),F(5,`div`,10)(6,`button`,12),H(`click`,function(){return C(e),w(W().copyTest())}),K(7,`Copy`),I(),F(8,`button`,12),H(`click`,function(){return C(e),w(W().downloadTest())}),K(9,`Download`),I(),F(10,`button`,12),H(`click`,function(){return C(e),w(W().closeTest())}),K(11,`Close`),I()()(),A(12,oq,3,0,`ul`,25),F(13,`pre`,26),K(14),I()()}if(e&2){let e=t;D(4),J(` Generated test (`,e.framework,`) `),D(8),j(e.notes.length?12:-1),D(),k(`aria-label`,`Test code, `+e.file),D(),q(e.code)}}function cq(e,t){e&1&&(F(0,`p`,9),K(1),I()),e&2&&(D(),J(`Recorded on `,t))}function lq(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,31),H(`click`,function(){let t=C(e).$implicit;return w(W(2).importedSeq.set(t.seq))}),F(2,`span`,32),K(3),I(),F(4,`span`,33),K(5),I()()()}if(e&2){let e=t.$implicit,n=W(2);D(),k(`aria-pressed`,e.seq===n.importedSeq()),D(2),J(`#`,e.seq),D(2),q(e.type)}}function uq(e,t){if(e&1&&(F(0,`p`,35),K(1,`Action`),I(),F(2,`pre`,36),K(3),I()),e&2){let e=W(),t=W(2);D(3),q(t.prettyText(e.action))}}function dq(e,t){if(e&1&&(F(0,`p`,35),K(1,`Arguments`),I(),F(2,`pre`,36),K(3),I()),e&2){let e=W(),t=W(2);D(3),q(t.prettyText(e.args))}}function fq(e,t){e&1&&(F(0,`p`,9),K(1,`No action or arguments were recorded for this entry.`),I())}function pq(e,t){if(e&1&&(F(0,`app-entry-tabs`,30)(1,`div`,34),A(2,uq,4,1),A(3,dq,4,1),A(4,fq,2,0,`p`,9),I()()),e&2){let e=t,n=W(2);P(`seq`,e.seq)(`loadDiff`,!0)(`loader`,n.importedLoader),D(2),j(e.action===void 0?-1:2),D(),j(e.args?.length?3:-1),D(),j(e.action===void 0&&!e.args?.length?4:-1)}}function mq(e,t){if(e&1){let e=B();F(0,`div`,17)(1,`div`,23)(2,`h5`,27),K(3),F(4,`span`,28),K(5),I()(),F(6,`div`,10)(7,`button`,12,4),H(`click`,function(){let t=C(e);return w(W().generate(t.id))}),K(9,` Generate test `),I(),F(10,`button`,12),H(`click`,function(){return C(e),w(W().closeImported())}),K(11,`Close`),I()()(),A(12,cq,2,1,`p`,9),F(13,`ul`,29),M(14,lq,6,3,`li`,null,tq),I(),A(16,pq,5,6,`app-entry-tabs`,30),I()}if(e&2){let e,n,r=t,i=W();D(3),J(` Imported: `,r.store.name??r.store.id,` `),D(2),q(r.entries.length),D(2),k(`aria-disabled`,i.busy()?`true`:null),D(5),j((e=r.page?.url)?12:-1,e),D(2),N(r.entries),D(2),j((n=i.importedEntry())?16:-1,n)}}function hq(e,t,n){let r=new Blob([e],{type:n}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=t,document.body.append(a),a.click(),a.remove(),setTimeout(()=>URL.revokeObjectURL(i),0)}var gq=class e{rpc=$(null);pageId=$(null);storeId=$(null);entries=$([]);framework=`Vitest`;options=X(()=>this.entries().map(e=>({value:String(e.seq),label:`#${e.seq} ${e.type}`})));from=Q({source:this.entries,computation:(e,t)=>t?.value&&e.some(e=>String(e.seq)===t.value)?t.value:e[0]?String(e[0].seq):null});to=Q({source:this.entries,computation:(e,t)=>{let n=e.at(-1),r=t?.value&&e.some(e=>String(e.seq)===t.value),i=t&&t.value===String(t.source.at(-1)?.seq);return r&&!i?t.value:n?String(n.seq):null}});injector=S(gs);generateLive=sv(`generateLive`);generateImported=sv(`generateImported`);importButton=sv(`importButton`);testHeading=sv(`testHeading`);testFrom=`live`;busy=E(!1);message=E(``);error=E(``);test=E(null);imported=E(null);importedSeq=E(null);canExport=X(()=>!!this.rpc()&&!!this.pageId()&&!!this.storeId()&&this.entries().length>0);importedEntry=X(()=>{let e=this.imported(),t=this.importedSeq();return e?.entries.find(e=>e.seq===t)??null});range(){let e=Number(this.from()),t=Number(this.to()),[n,r]=e<=t?[e,t]:[t,e];return{storeId:this.storeId()??void 0,...Number.isFinite(n)?{from:n}:{},...Number.isFinite(r)?{to:r}:{}}}async ask(e){try{return await _T(this.rpc(),`request-ngrx-history`,e)??{error:`The devtools server is not connected.`}}catch{return{error:`The devtools server did not answer. Try again.`}}}importedLoader=e=>{let t=this.imported()?.id;return t?this.ask({session:t,request:{type:`entry`,seq:e}}):Promise.resolve({error:`No session is imported.`})};focusAfterRender(e){td(()=>e()?.nativeElement.focus(),{injector:this.injector})}async exportLive(){if(this.busy()||!this.canExport())return;this.busy.set(!0),this.error.set(``),this.message.set(``);let e=await this.ask({pageId:this.pageId(),request:{type:`export`,...this.range()}});if(this.busy.set(!1),!e.ok||!e.session){this.error.set(e.error??`Nothing was exported.`);return}hq(JSON.stringify(e.session,null,2),`ngrx-session-${this.storeId()}.json`,`application/json`),this.message.set(e.message??`Exported the session.`)}async generate(e){if(this.busy()||!e&&!this.canExport())return;this.busy.set(!0),this.error.set(``),this.message.set(``);let t=await this.ask(e?{session:e,request:{type:`test`}}:{pageId:this.pageId(),request:{type:`test`,...this.range()}});if(this.busy.set(!1),!t.ok||!t.test){this.error.set(t.error??`No test was generated.`);return}this.test.set(t.test),this.testFrom=e?`imported`:`live`,this.message.set(`Generated ${t.test.file}.`),this.focusAfterRender(()=>this.testHeading())}pickFile(e){this.busy()||e.click()}async read(e){let t=e.files?.[0];if(e.value=``,!t)return;if(this.error.set(``),this.message.set(``),t.size>4e6){this.error.set(`The file is larger than 4 MB, so it was not imported.`);return}this.busy.set(!0);let n;try{n=await _T(this.rpc(),`import-ngrx-session`,{session:await t.text()})}catch{n={error:`The devtools server did not answer. Try again.`}}if(this.busy.set(!1),!n||!(`id`in n)||!n.ok){this.error.set(`Not imported: ${n?.error??`the devtools server is not connected.`}`);return}this.imported.set(n),this.importedSeq.set(n.entries[0]?.seq??null),this.message.set(`Imported ${n.entries.length} entries from ${t.name}.`)}closeImported(){this.imported.set(null),this.importedSeq.set(null),this.testFrom===`imported`&&(this.testFrom=`live`),this.focusAfterRender(()=>this.importButton())}closeTest(){this.test.set(null);let e=this.testFrom;this.focusAfterRender(()=>{let t=this.generateLive(),n=this.generateImported();return e===`imported`&&n?n:t&&!t.nativeElement.disabled?t:this.importButton()})}async copyTest(){let e=this.test();if(e)try{await navigator.clipboard.writeText(e.code),this.message.set(`Copied the test.`)}catch{this.message.set(`The clipboard is not available here.`)}}downloadTest(){let e=this.test();e&&hq(e.code,e.file,`text/plain`)}prettyText(e){return OK(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-store-session`]],viewQuery:function(e,t){e&1&&Og(t.generateLive,ZK,5)(t.generateImported,QK,5)(t.importButton,$K,5)(t.testHeading,eq,5),e&2&&kg(4)},inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`],storeId:[1,`storeId`],entries:[1,`entries`]},decls:23,vars:11,consts:[[`generateLive`,``],[`importButton`,``],[`file`,``],[`testHeading`,``],[`generateImported`,``],[`aria-labelledby`,`ngrx-session-heading`,1,`session`],[`id`,`ngrx-session-heading`],[1,`intro`],[1,`range`],[1,`muted`],[1,`actions`],[`type`,`button`,1,`btn`,3,`click`,`disabled`],[`type`,`button`,1,`btn`,3,`click`],[`type`,`file`,`accept`,`.json,application/json`,`hidden`,``,`aria-label`,`Session file`,3,`change`],[`role`,`status`,1,`session-message`],[`role`,`alert`,1,`error`],[`role`,`region`,`aria-labelledby`,`ngrx-test-heading`,1,`test`],[`role`,`region`,`aria-labelledby`,`ngrx-imported-heading`,1,`imported`],[1,`field`],[`id`,`ngrx-range-from`,1,`label`],[`labelledBy`,`ngrx-range-from`,3,`valueChange`,`options`,`value`],[`id`,`ngrx-range-to`,1,`label`],[`labelledBy`,`ngrx-range-to`,3,`valueChange`,`options`,`value`],[1,`head`],[`id`,`ngrx-test-heading`,`tabindex`,`-1`],[1,`notes`],[`tabindex`,`0`,1,`code`],[`id`,`ngrx-imported-heading`],[1,`pill`],[`aria-label`,`Imported entries`,1,`entries`],[`idPrefix`,`ngrx-imported`,3,`seq`,`loadDiff`,`loader`],[`type`,`button`,1,`entry`,3,`click`],[1,`seq`],[1,`type`],[`tab-action`,``],[1,`label`],[1,`code`]],template:function(e,t){if(e&1){let e=B();F(0,`section`,5)(1,`h4`,6),K(2,`Session`),I(),F(3,`p`,7),K(4),I(),A(5,nq,9,4,`div`,8)(6,rq,2,0,`p`,9),F(7,`div`,10)(8,`button`,11),H(`click`,function(){return t.exportLive()}),K(9,` Export session `),I(),F(10,`button`,11,0),H(`click`,function(){return t.generate(null)}),K(12,` Generate test `),I(),F(13,`button`,12,1),H(`click`,function(){C(e);let n=Ag(17);return w(t.pickFile(n))}),K(15,` Import session `),I(),F(16,`input`,13,2),H(`change`,function(){C(e);let n=Ag(17);return w(t.read(n))}),I()(),F(18,`p`,14),K(19),I(),A(20,iq,2,1,`p`,15),A(21,sq,15,4,`div`,16),A(22,mq,17,5,`div`,17),I()}if(e&2){let e,n;D(4),J(` Export a range of this store's log with the state it produced, import a session file to read it here, or turn the range into a `,t.framework,` spec. Values are redacted like the rest of the page. `),D(),j(t.options().length?5:6),D(3),P(`disabled`,!t.canExport()),k(`aria-disabled`,t.busy()?`true`:null),D(2),P(`disabled`,!t.canExport()),k(`aria-disabled`,t.busy()?`true`:null),D(3),k(`aria-disabled`,t.busy()?`true`:null),D(6),q(t.message()),D(),j(t.error()?20:-1),D(),j((e=t.test())?21:-1,e),D(),j((n=t.imported())?22:-1,n)}},dependencies:[OD,XK],styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -10649,7 +10663,7 @@ h5[tabindex="-1"][_ngcontent-%COMP%]:focus-visible { .btn[_ngcontent-%COMP%] { transition: none; } -}`]})},fq=[`box`],pq=(e,t)=>t.path;function mq(e,t){if(e&1&&(F(0,`span`,3),K(1),I()),e&2){let e=W();D(),Y(``,e.matches(),` `,e.matches()===1?`match`:`matches`)}}function hq(e,t){if(e&1&&(F(0,`p`,5),K(1),I()),e&2){let e=W();D(),q(e.query()?`No key or value matches.`:`The state is empty.`)}}function gq(e,t){if(e&1){let e=B();F(0,`button`,14),H(`click`,function(){C(e);let t=W().$implicit;return w(W().toggle(t))}),F(1,`span`,15),K(2),I(),F(3,`span`,16),K(4),I(),F(5,`span`,17),K(6),I()()}if(e&2){let e=W().$implicit;k(`aria-expanded`,e.open)(`aria-label`,e.key+` `+e.text),D(2),q(e.open?`▾`:`▸`),D(2),q(e.key),D(2),q(e.text)}}function _q(e,t){if(e&1&&(F(0,`span`,10)(1,`span`,16),K(2),F(3,`span`,18),K(4,`:`),I()(),F(5,`code`,19),K(6),I()()),e&2){let e=W().$implicit;D(2),q(e.key),D(4),q(e.text)}}function vq(e,t){e&1&&(F(0,`span`,11),K(1,`changed`),I())}function yq(e,t){e&1&&(F(0,`span`,12),K(1,`holds a change`),I())}function bq(e,t){if(e&1){let e=B();F(0,`li`,8),A(1,gq,7,5,`button`,9)(2,_q,7,2,`span`,10),A(3,vq,2,0,`span`,11)(4,yq,2,0,`span`,12),F(5,`button`,13),H(`click`,function(){let t=C(e).$implicit;return w(W().copied.emit(t.path))}),K(6,` Copy path `),I()()}if(e&2){let e=t.$implicit;Xg(`padding-left`,e.depth*14,`px`),G(`changed`,e.changed),D(),j(e.node?1:2),D(2),j(e.changed?3:e.holdsChange&&!e.open?4:-1),D(2),P(`title`,`Copy path `+e.path),k(`aria-label`,`Copy path `+e.path)}}function xq(e,t){if(e&1&&(F(0,`p`,5),K(1),I()),e&2){let e=W();D(),J(` `,e.view().rows.length-e.shown().length,` more rows not shown. Search to narrow the tree. `)}}var Sq=`@type`;function Cq(e){return Array.isArray(e)?!0:!!e&&typeof e==`object`&&!Object.hasOwn(e,Sq)}function wq(e,t){if(typeof t==`number`)return`${e}[${t}]`;let n=/^[A-Za-z_$][\w$]*$/.test(t)?t:JSON.stringify(t);return e?n.startsWith(`"`)?`${e}[${n}]`:`${e}.${n}`:n}function Tq(e,t){return t.startsWith(`${e}.`)||t.startsWith(`${e}[`)}function Eq(e){return Array.isArray(e)?e.map((e,t)=>[t,e]):Object.entries(e)}function Dq(e){return Array.isArray(e)?`[${e.length}]`:`{${Object.keys(e).length}}`}function Oq(e,t={}){let n=t.query?.trim().toLowerCase()??``,r=t.changed??[],i=[],a=0,o=(e,i,s,c)=>{let l=Cq(e),u=r.some(e=>e===i||Tq(e,i)),d=r.some(e=>Tq(i,e)),f=l?Dq(e):wK(e,160),p=!!n&&(s.toLowerCase().includes(n)||!l&&f.toLowerCase().includes(n));p&&a++;let m=[];if(l)for(let[t,n]of Eq(e))m.push(...o(n,wq(i,t),String(t),c+1));if(n&&!p&&!m.length)return[];let h=l?n?!0:!t.closed?.has(i)&&(c<1||d||!!t.opened?.has(i)):!1;return[{path:i,key:s,depth:c,node:l,open:h,text:f,changed:u,holdsChange:d},...h?m:[]]};if(Cq(e))for(let[t,n]of Eq(e))i.push(...o(n,wq(``,t),String(t),0));else e!==void 0&&i.push(...o(e,`(root)`,`(root)`,0));return{rows:i,matches:a}}var kq=class e{value=$(void 0);changed=$([]);label=$(`State`);copied=Q_();query=E(``);opened=Q({source:()=>this.label(),computation:()=>new Set});closed=Q({source:()=>this.label(),computation:()=>new Set});box=av(`box`);view=X(()=>Oq(this.value(),{query:this.query(),changed:this.changed(),opened:this.opened(),closed:this.closed()}));shown=X(()=>this.view().rows.slice(0,400));matches=X(()=>this.view().matches);toggle(e){let t=new Set(this.opened()),n=new Set(this.closed());e.open?(t.delete(e.path),n.add(e.path)):(n.delete(e.path),t.add(e.path)),this.opened.set(t),this.closed.set(n)}focus(){this.box()?.nativeElement.focus()}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-state-tree`]],viewQuery:function(e,t){e&1&&Dg(t.box,fq,5),e&2&&Og()},inputs:{value:[1,`value`],changed:[1,`changed`],label:[1,`label`]},outputs:{copied:`copied`},decls:10,vars:6,consts:[[`box`,``],[1,`tree-tools`],[`placeholder`,`Filter by key or value`,1,`tree-search`,3,`valueChange`,`label`,`value`],[1,`count`],[`tabindex`,`-1`,`role`,`group`,1,`tree`],[1,`muted`],[1,`rows`],[1,`row`,3,`changed`,`padding-left`],[1,`row`],[`type`,`button`,1,`toggle`],[1,`leaf`],[1,`mark`],[1,`mark`,`soft`],[`type`,`button`,1,`copy-path`,3,`click`,`title`],[`type`,`button`,1,`toggle`,3,`click`],[`aria-hidden`,`true`,1,`caret`],[1,`key`],[`aria-hidden`,`true`,1,`summary`],[1,`colon`],[1,`value`]],template:function(e,t){if(e&1){let e=B();F(0,`div`,1)(1,`app-search-field`,2),S_(`valueChange`,function(n){return C(e),x_(t.query,n)||(t.query=n),w(n)}),I(),A(2,mq,2,2,`span`,3),I(),F(3,`div`,4,0),A(5,hq,2,1,`p`,5),F(6,`ul`,6),M(7,bq,7,8,`li`,7,pq),I(),A(9,xq,2,1,`p`,5),I()}e&2&&(D(),P(`label`,`Filter `+t.label()),b_(`value`,t.query),D(),j(t.query()?2:-1),D(),k(`aria-label`,t.label()),D(2),j(t.view().rows.length?-1:5),D(2),N(t.shown()),D(2),j(t.view().rows.length>t.shown().length?9:-1))},dependencies:[nP],styles:[`[_nghost-%COMP%] { +}`]})},_q=[`box`],vq=(e,t)=>t.path;function yq(e,t){if(e&1&&(F(0,`span`,4),K(1),I()),e&2){let e=W();D(),Y(``,e.matches(),` `,e.matches()===1?`match`:`matches`)}}function bq(e,t){if(e&1&&(F(0,`p`,6),K(1),I()),e&2){let e=W();D(),q(e.query()?`No key or value matches.`:`The state is empty.`)}}function xq(e,t){if(e&1){let e=B();F(0,`button`,15),H(`click`,function(){C(e);let t=W().$implicit;return w(W().toggle(t))}),F(1,`span`,16),K(2),I(),F(3,`span`,17),K(4),I(),F(5,`span`,18),K(6),I()()}if(e&2){let e=W().$implicit;k(`aria-expanded`,e.open)(`aria-label`,e.key+` `+e.text),D(2),q(e.open?`▾`:`▸`),D(2),q(e.key),D(2),q(e.text)}}function Sq(e,t){if(e&1&&(F(0,`span`,11)(1,`span`,17),K(2),F(3,`span`,19),K(4,`:`),I()(),F(5,`code`,20),K(6),I()()),e&2){let e=W().$implicit;D(2),q(e.key),D(4),q(e.text)}}function Cq(e,t){e&1&&(F(0,`span`,12),K(1,`changed`),I())}function wq(e,t){e&1&&(F(0,`span`,13),K(1,`holds a change`),I())}function Tq(e,t){if(e&1){let e=B();F(0,`li`,9),A(1,xq,7,5,`button`,10)(2,Sq,7,2,`span`,11),A(3,Cq,2,0,`span`,12)(4,wq,2,0,`span`,13),F(5,`button`,14),H(`click`,function(){let t=C(e).$implicit;return w(W().copied.emit(t.path))}),K(6,` Copy path `),I()()}if(e&2){let e=t.$implicit;Zg(`padding-left`,e.depth*14,`px`),G(`changed`,e.changed),D(),j(e.node?1:2),D(2),j(e.changed?3:e.holdsChange&&!e.open?4:-1),D(2),P(`title`,`Copy path `+e.path),k(`aria-label`,`Copy path `+e.path)}}function Eq(e,t){if(e&1&&(F(0,`p`,6),K(1),I()),e&2){let e=W();D(),J(` `,e.view().rows.length-e.shown().length,` more rows not shown. Search to narrow the tree. `)}}var Dq=`@type`;function Oq(e){return Array.isArray(e)?!0:!!e&&typeof e==`object`&&!Object.hasOwn(e,Dq)}function kq(e,t){if(typeof t==`number`)return`${e}[${t}]`;let n=/^[A-Za-z_$][\w$]*$/.test(t)?t:JSON.stringify(t);return e?n.startsWith(`"`)?`${e}[${n}]`:`${e}.${n}`:n}function Aq(e,t){return t.startsWith(`${e}.`)||t.startsWith(`${e}[`)}function jq(e){return Array.isArray(e)?e.map((e,t)=>[t,e]):Object.entries(e)}function Mq(e){return Array.isArray(e)?`[${e.length}]`:`{${Object.keys(e).length}}`}function Nq(e,t={}){let n=t.query?.trim().toLowerCase()??``,r=t.changed??[],i=[],a=0,o=(e,i,s,c)=>{let l=Oq(e),u=r.some(e=>e===i||Aq(e,i)),d=r.some(e=>Aq(i,e)),f=l?Mq(e):kK(e,160),p=!!n&&(s.toLowerCase().includes(n)||!l&&f.toLowerCase().includes(n));p&&a++;let m=[];if(l)for(let[t,n]of jq(e))m.push(...o(n,kq(i,t),String(t),c+1));if(n&&!p&&!m.length)return[];let h=l?n?!0:!t.closed?.has(i)&&(c<1||d||!!t.opened?.has(i)):!1;return[{path:i,key:s,depth:c,node:l,open:h,text:f,changed:u,holdsChange:d},...h?m:[]]};if(Oq(e))for(let[t,n]of jq(e))i.push(...o(n,kq(``,t),String(t),0));else e!==void 0&&i.push(...o(e,`(root)`,`(root)`,0));return{rows:i,matches:a}}var Pq=class e{value=$(void 0);changed=$([]);label=$(`State`);copied=ev();query=E(``);opened=Q({source:()=>this.label(),computation:()=>new Set});closed=Q({source:()=>this.label(),computation:()=>new Set});box=sv(`box`);view=X(()=>Nq(this.value(),{query:this.query(),changed:this.changed(),opened:this.opened(),closed:this.closed()}));shown=X(()=>this.view().rows.slice(0,400));matches=X(()=>this.view().matches);toggle(e){let t=new Set(this.opened()),n=new Set(this.closed());e.open?(t.delete(e.path),n.add(e.path)):(n.delete(e.path),t.add(e.path)),this.opened.set(t),this.closed.set(n)}focus(){this.box()?.nativeElement.focus()}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-state-tree`]],viewQuery:function(e,t){e&1&&Og(t.box,_q,5),e&2&&kg()},inputs:{value:[1,`value`],changed:[1,`changed`],label:[1,`label`]},outputs:{copied:`copied`},decls:11,vars:7,consts:[[`box`,``],[3,`value`],[1,`tree-tools`],[`placeholder`,`Filter by key or value`,1,`tree-search`,3,`valueChange`,`label`,`value`],[1,`count`],[`tabindex`,`-1`,`role`,`group`,1,`tree`],[1,`muted`],[1,`rows`],[1,`row`,3,`changed`,`padding-left`],[1,`row`],[`type`,`button`,1,`toggle`],[1,`leaf`],[1,`mark`],[1,`mark`,`soft`],[`type`,`button`,1,`copy-path`,3,`click`,`title`],[`type`,`button`,1,`toggle`,3,`click`],[`aria-hidden`,`true`,1,`caret`],[1,`key`],[`aria-hidden`,`true`,1,`summary`],[1,`colon`],[1,`value`]],template:function(e,t){if(e&1){let e=B();L(0,`app-redaction-count`,1),F(1,`div`,2)(2,`app-search-field`,3),w_(`valueChange`,function(n){return C(e),C_(t.query,n)||(t.query=n),w(n)}),I(),A(3,yq,2,2,`span`,4),I(),F(4,`div`,5,0),A(6,bq,2,1,`p`,6),F(7,`ul`,7),M(8,Tq,7,8,`li`,8,vq),I(),A(10,Eq,2,1,`p`,6),I()}e&2&&(P(`value`,t.value()),D(2),P(`label`,`Filter `+t.label()),S_(`value`,t.query),D(),j(t.query()?3:-1),D(),k(`aria-label`,t.label()),D(2),j(t.view().rows.length?-1:6),D(2),N(t.shown()),D(2),j(t.view().rows.length>t.shown().length?10:-1))},dependencies:[nP,cP],styles:[`[_nghost-%COMP%] { display: grid; gap: 8px; min-width: 0; @@ -10802,7 +10816,7 @@ h5[tabindex="-1"][_ngcontent-%COMP%]:focus-visible { margin: 4px 2px; color: var(--%NS%text-2); font-family: var(--%NS%font-sans, inherit); -}`]})},Aq=`redux:`;function jq(e){let t=e;return!!t&&typeof t.id==`string`&&typeof t.name==`string`&&typeof t.library==`string`}function Mq(e){let t=e?.pages;return!t||typeof t!=`object`||Array.isArray(t)?[]:Object.values(t).filter(e=>{let t=e;return!!t&&typeof t.pageId==`string`&&Array.isArray(t.stores)&&t.stores.every(jq)&&Array.isArray(t.log)}).sort((e,t)=>t.reportedAt-e.reportedAt)}function Nq(e){return(e?.stores??[]).map(e=>({id:Aq+e.id,label:e.name,kind:`redux`,scope:e.library,redux:e}))}function Pq(e,t){if(!e||!t?.startsWith(`redux:`))return[];let n=t.slice(6);return e.log.filter(e=>e.storeId===n).map(e=>({seq:e.seq,source:`redux`,storeId:t,type:e.type,...e.action===void 0?{}:{action:e.action},timestamp:e.timestamp,diff:e.diff,restorable:!1,...e.diffTruncated?{diffTruncated:e.diffTruncated}:{}}))}var Fq=[`eventDetailHeading`],Iq=[`cancelButton`],Lq=[`restoreButton`],Rq=[`resetButton`],zq=[`resetCancel`],Bq=[`filterInput`],Vq=[`latestButton`],Hq=[`logList`],Uq=[`eventsList`],Wq=e=>({kind:`ngrx`,storeId:e}),Gq=e=>({selected:e,headingLevel:5,idPrefix:`ngrx-change`}),Kq=e=>({selected:e,headingLevel:3,idPrefix:`ngrx-event`}),qq=e=>({selected:e}),Jq=(e,t)=>t.id,Yq=(e,t)=>t.entry.seq,Xq=(e,t)=>t.key,Zq=(e,t)=>t.name,Qq=(e,t)=>t.idsKey,$q=(e,t)=>t.type,eJ=(e,t)=>t.path,tJ=(e,t)=>t.kind,nJ=(e,t)=>t.name+t.file+t.line;function rJ(e,t){if(e&1){let e=B();F(0,`span`,31),K(1,`Page`),I(),F(2,`app-select`,32),H(`valueChange`,function(t){return C(e),w(W().selectPage(t))}),I()}if(e&2){let e=W();D(2),P(`options`,e.pageOptions())(`value`,e.page()?.pageId??null)}}function iJ(e,t){if(e&1&&(F(0,`span`,20),K(1),I()),e&2){let e=W();D(),q(e.liveStores().length)}}function aJ(e,t){if(e&1){let e=B();F(0,`div`,21)(1,`p`,33),K(2,`Could not load the live store state.`),I(),F(3,`p`,34),K(4,`Check that the dev server with Pangular Inspector is still running.`),I(),F(5,`button`,35),H(`click`,function(){return C(e),w(W().retry())}),K(6,`Retry`),I()()}}function oJ(e,t){e&1&&(F(0,`div`,22)(1,`p`,33),K(2,`Loading…`),I()())}function sJ(e,t){e&1&&(F(0,`div`,23)(1,`p`,33),K(2,`No page is reporting store state yet.`),I(),F(3,`p`,34),K(4,` Open the app in a browser. Stores show up here as soon as the page creates them. `),I()())}function cJ(e,t){e&1&&(F(0,`p`,33),K(1,`No signal store instance on this page yet.`),I(),F(2,`p`,34),K(3,` A `),F(4,`code`),K(5,`signalStore`),I(),K(6,` is created the first time something injects it. Navigate to a page that uses the store and it appears here. `),I())}function lJ(e,t){e&1&&(F(0,`p`,33),K(1,`The @ngrx/store Store was not found on this page.`),I(),F(2,`p`,34),K(3,` Check that `),F(4,`code`),K(5,`provideStore()`),I(),K(6,` or `),F(7,`code`),K(8,`StoreModule.forRoot()`),I(),K(9,` is part of the providers of the running app. `),I())}function uJ(e,t){e&1&&(F(0,`p`,33),K(1,`This page has no store.`),I(),F(2,`p`,34),K(3,` Stores from `),F(4,`code`),K(5,`@ngrx/signals`),I(),K(6,` (`),F(7,`code`),K(8,`signalStore`),I(),K(9,`, `),F(10,`code`),K(11,`signalState`),I(),K(12,`) and `),F(13,`code`),K(14,`@ngrx/store`),I(),K(15,` are listed here once the app creates them. NGXS, Elf and MiniRx stores show up through their Redux DevTools integration when the app loads `),F(16,`code`),K(17,`@pangular-inspector/devtools/store-hook`),I(),K(18,` first. `),I())}function dJ(e,t){if(e&1&&(F(0,`app-angular-unavailable`,36),K(1,` The overlay finds stores through the injectors, so stores it can't reach from a component are not listed. `),I(),F(2,`div`,23),A(3,cJ,7,0)(4,lJ,10,0)(5,uJ,19,0),I()),e&2){let e=W();P(`page`,e.angularPage()),D(3),j(e.usesSignals()?3:e.usesClassic()?4:5)}}function fJ(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,40),H(`click`,function(){let t=C(e).$implicit;return w(W(2).selectStore(t.id))}),F(2,`span`,41),L(3,`span`,42),F(4,`span`,43),K(5),I()(),F(6,`span`,44),K(7),I()()()}if(e&2){let e=t.$implicit,n=W(2);D(),G(`selected`,e.id===n.store()?.id),k(`aria-pressed`,e.id===n.store()?.id),D(2),Xg(`background`,n.kindColor(e.kind)),D(2),q(e.label),D(2),__(` `,n.kindLabel(e.kind),` · `,e.scope,` · `,n.countText(e),` `)}}function pJ(e,t){e&1&&(F(0,`li`,38),K(1,`No stores match this filter.`),I())}function mJ(e,t){e&1&&(F(0,`span`,47),K(1),I()),e&2&&(D(),q(t.library))}function hJ(e,t){if(e&1&&(F(0,`span`,47),K(1),I()),e&2){let e=W();D(),J(`scope: `,e.scope)}}function gJ(e,t){e&1&&L(0,`app-source-link`,48),e&2&&P(`file`,t)}function _J(e,t){if(e&1&&(F(0,`span`,47),K(1),I()),e&2){let e=W();D(),q(e.classic.devtools?`Store DevTools on`:`Store DevTools off`)}}function vJ(e,t){e&1&&(F(0,`span`,47),K(1,`withDevtools: watched only`),I())}function yJ(e,t){e&1&&(F(0,`p`,49),K(1,` This store uses `),F(2,`code`),K(3,`withDevtools()`),I(),K(4,`, so the inspector does not wrap its methods or signals. Changes are logged as `),F(5,`code`),K(6,`patchState`),I(),K(7,` entries, and method calls are not counted. `),I())}function bJ(e,t){if(e&1&&(F(0,`code`),K(1),I(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;D(),q(e),D(),J(``,n===r-1?``:`, `,` `)}}function xJ(e,t){if(e&1&&(F(0,`p`,50),K(1,` Referenced by `),M(2,bJ,3,2,null,null,Yh),I()),e&2){let e=W();D(2),N(e.signal.references)}}function SJ(e,t){if(e&1&&(F(0,`p`,72),K(1),I()),e&2){let e=W(4);D(),q(e.restoreOff)}}function CJ(e,t){if(e&1){let e=B();F(0,`div`,51)(1,`p`)(2,`strong`),K(3,`Viewing a past state.`),I(),K(4,` New actions are logged but do not change the state until you go back to the latest state. `),I(),F(5,`button`,71,3),H(`click`,function(){return C(e),w(W(3).backToLatest())}),K(7,` Back to latest `),I(),A(8,SJ,2,1,`p`,72),I()}if(e&2){let e=W(3);D(5),P(`disabled`,e.busy()||!e.canRestore()),k(`aria-describedby`,e.canRestore()?null:`store-latest-off`),D(3),j(e.canRestore()?-1:8)}}function wJ(e,t){if(e&1&&L(0,`app-store-global`,57),e&2){let e=W(),t=W(2);P(`rpc`,t.rpc())(`pageId`,t.page()?.pageId)(`target`,I_(4,Wq,e.id))(`label`,e.label+` state`)}}function TJ(e,t){if(e&1&&(F(0,`dt`),K(1),I(),F(2,`dd`)(3,`code`,80),K(4),I()()),e&2){let e=t.$implicit;D(),q(e.key),D(2),P(`title`,e.full),D(),q(e.value)}}function EJ(e,t){if(e&1&&(F(0,`dl`,75),M(1,TJ,5,3,null,null,Xq),I()),e&2){let e=W(4);D(),N(e.computedEntries())}}function DJ(e,t){e&1&&(F(0,`p`,76),K(1,`No computed signals.`),I())}function OJ(e,t){e&1&&(F(0,`span`,82),K(1,`signalMethod`),I())}function kJ(e,t){e&1&&(F(0,`span`,82),K(1,`rxMethod`),I())}function AJ(e,t){if(e&1&&(F(0,`li`,81),K(1),A(2,OJ,2,0,`span`,82)(3,kJ,2,0,`span`,82),F(4,`span`,83),K(5),I()()),e&2){let e=t.$implicit,n=W(5);D(),J(` `,e.name,` `),D(),j(e.signalMethod?2:e.rx?3:-1),D(3),__(``,e.calls,` `,e.calls===1?`call`:`calls`,``,n.methodDuration(e))}}function jJ(e,t){if(e&1&&(F(0,`ul`,78),M(1,AJ,6,5,`li`,81,Zq),I()),e&2){let e=W();D(),N(e.methods)}}function MJ(e,t){e&1&&(F(0,`p`,76),K(1,`No methods.`),I())}function NJ(e,t){if(e&1&&(F(0,`li`,81),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function PJ(e,t){if(e&1&&(F(0,`li`,90),K(1),I()),e&2){let e=W().$implicit;P(`title`,W(5).entityOverflowTitle(e.ids,e.count)),D(),J(` +`,e.count-30,` more `)}}function FJ(e,t){if(e&1&&(F(0,`code`,80),K(1),I()),e&2){let e=W(2).$implicit,t=W(5);P(`title`,t.prettyText(e.selected)),D(),q(t.shortText(e.selected))}}function IJ(e,t){e&1&&(F(0,`span`,76),K(1,`None selected`),I())}function LJ(e,t){if(e&1&&(F(0,`dl`,75)(1,`dt`),K(2,`Selected`),I(),F(3,`dd`),A(4,FJ,2,2,`code`,80)(5,IJ,2,0,`span`,76),I()()),e&2){let e=W().$implicit;D(4),j(e.selected===void 0?5:4)}}function RJ(e,t){if(e&1&&(F(0,`div`,86)(1,`div`,87)(2,`span`,81),K(3),I(),F(4,`span`,88),K(5),I()(),F(6,`ul`,89),M(7,NJ,2,1,`li`,81,Yh),A(9,PJ,2,2,`li`,90),I(),A(10,LJ,6,1,`dl`,75),I()),e&2){let e=t.$implicit,n=W(5);D(3),q(e.collection??`entities`),D(2),Y(``,e.count,` `,e.count===1?`entity`:`entities`),D(),k(`aria-label`,(e.collection??`entities`)+` ids`),D(),N(n.entityIds(e.ids)),D(2),j(e.count>30?9:-1),D(),j(e.selectedId===void 0?-1:10)}}function zJ(e,t){if(e&1&&(F(0,`section`,79)(1,`h4`,84),K(2,`Entities`),I(),F(3,`div`,85),M(4,RJ,11,6,`div`,86,Qq),I()()),e&2){let e=W();D(4),N(e.entities)}}function BJ(e,t){if(e&1&&(F(0,`section`,73)(1,`h4`,74),K(2,`Computed`),I(),A(3,EJ,3,0,`dl`,75)(4,DJ,2,0,`p`,76),F(5,`h4`,77),K(6,`Methods`),I(),A(7,jJ,3,0,`ul`,78)(8,MJ,2,0,`p`,76),I(),A(9,zJ,6,0,`section`,79)),e&2){let e=t,n=W(3);D(3),j(n.computedEntries().length?3:4),D(4),j(e.methods.length?7:8),D(2),j(e.entities?.length?9:-1)}}function VJ(e,t){if(e&1&&K(0),e&2){let e=t;Y(` `,e,` skipped `,e===1?`action is`:`actions are`,` left out of the state. `)}}function HJ(e,t){if(e&1){let e=B();F(0,`div`,95),H(`keydown.escape`,function(t){return C(e),w(W(4).cancelReset(t))}),F(1,`p`,96),K(2,` Reset puts the store back on its initial state and empties the Store DevTools history. Entries logged so far can no longer be restored. `),I(),F(3,`div`,93)(4,`button`,71),H(`click`,function(){return C(e),w(W(4).devtoolsOp({op:`reset`}))}),K(5,` Reset history `),I(),F(6,`button`,35,4),H(`click`,function(){return C(e),w(W(4).cancelReset())}),K(8,` Cancel `),I()()()}if(e&2){let e=W(4);D(4),P(`disabled`,e.busy())}}function UJ(e,t){if(e&1){let e=B();F(0,`div`,93)(1,`button`,97),H(`click`,function(){C(e);let t=W(2);return w(W(2).devtoolsOp({op:`pause`,paused:!t.classic.recordingPaused}))}),K(2),I(),F(3,`button`,97),H(`click`,function(){return C(e),w(W(4).devtoolsOp({op:`jump`,index:0}))}),K(4,` Jump to committed state `),I(),F(5,`button`,97),H(`click`,function(){return C(e),w(W(4).devtoolsOp({op:`commit`}))}),K(6,` Commit `),I(),F(7,`button`,97,5),H(`click`,function(){return C(e),w(W(4).askReset())}),K(9,` Reset… `),I()()}if(e&2){let e=W(2),t=W(2);D(),P(`disabled`,t.busy()||!t.canRestore()),k(`aria-describedby`,t.canRestore()?null:`store-history-off`),D(),J(` `,e.classic.recordingPaused?`Resume recording`:`Pause recording`,` `),D(),P(`disabled`,t.busy()||!t.canRestore()),k(`aria-describedby`,t.canRestore()?null:`store-history-off`),D(2),P(`disabled`,t.busy()||!t.canRestore()),k(`aria-describedby`,t.canRestore()?null:`store-history-off`),D(2),P(`disabled`,t.busy()||!t.canRestore()),k(`aria-describedby`,t.canRestore()?null:`store-history-off`)}}function WJ(e,t){if(e&1&&(F(0,`p`,94),K(1),I()),e&2){let e=W(4);D(),q(e.restoreOff)}}function GJ(e,t){if(e&1&&(F(0,`section`,60)(1,`h4`,91),K(2,`Store DevTools history`),I(),F(3,`p`,49),K(4),A(5,VJ,1,2),I(),A(6,HJ,9,1,`div`,92)(7,UJ,10,9,`div`,93),A(8,WJ,2,1,`p`,94),I()),e&2){let e,t=W(),n=W(2);D(4),J(` `,t.classic.recordingPaused?`Recording is paused: new actions change the state but are not recorded.`:`Recording new actions.`,` `),D(),j((e=t.classic.skipped?.length)?5:-1,e),D(),j(n.confirmReset()?6:7),D(2),j(n.canRestore()?-1:8)}}function KJ(e,t){if(e&1&&(F(0,`span`,102),K(1),I()),e&2){let e=t;P(`title`,`Caused by `+W(4).kindLabel(`event`)+`: `+e.type),D(),q(e.type)}}function qJ(e,t){e&1&&(F(0,`span`,82),K(1,`skipped`),I())}function JJ(e,t){if(e&1&&(F(0,`span`,82),K(1),I()),e&2){W();let e=E_(0);D(),q(e.origin)}}function YJ(e,t){if(e&1&&K(0),e&2){W();let e=E_(0);J(` · `,W(3).formatDuration(e.durationMs),` `)}}function XJ(e,t){if(e&1){let e=B();w_(0),F(1,`li`)(2,`button`,98),H(`click`,function(){C(e);let t=E_(0);return w(W(3).selectChange(t.seq))}),F(3,`span`,99),K(4),I(),F(5,`span`,100)(6,`span`,101),K(7),I(),A(8,KJ,2,2,`span`,102),I(),F(9,`span`,103),A(10,qJ,2,0,`span`,82),A(11,JJ,2,1,`span`,82),K(12),A(13,YJ,1,1),I()()()}if(e&2){let e,n=t.$implicit,r=W(3),i=T_(n.entry);D(),k(`data-vindex`,n.index)(`aria-setsize`,r.logWindow.enabled()?r.storeLog().length:null)(`aria-posinset`,r.logWindow.enabled()?n.index+1:null),D(),G(`selected`,i.seq===r.selectedChangeSeq()),k(`aria-pressed`,i.seq===r.selectedChangeSeq())(`aria-controls`,i.seq===r.selectedChangeSeq()?`ngrx-change-detail`:null),D(2),J(`#`,i.seq),D(2),P(`title`,i.type),D(),q(i.type),D(),j((e=i.causedByEvent)?8:-1,e),D(2),j(r.isSkipped(i.seq)?10:-1),D(),j(i.origin?11:-1),D(),Y(` `,r.changesLabel(i),` · `,r.formatTime(i.timestamp),` `),D(),j(i.durationMs===void 0?-1:13)}}function ZJ(e,t){e&1&&K(0,` No entries match this filter. `)}function QJ(e,t){e&1&&K(0,` No actions dispatched since the page connected. `)}function $J(e,t){e&1&&K(0,` No state changes yet. Method calls and patchState writes that change the state are recorded here. `)}function eY(e,t){if(e&1&&(F(0,`li`,38),A(1,ZJ,1,0)(2,QJ,1,0)(3,$J,1,0),I()),e&2){let e=W(),t=W(2);D(),j(t.filter()?1:e.classic||e.redux?2:3)}}function tY(e,t){if(e&1&&(F(0,`div`,67),ug(1,104),I()),e&2){W(3);let e=kg(23);D(),P(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,I_(2,Gq,t))}}function nY(e,t){e&1&&(F(0,`span`,110),K(1,`Possible effect loop`),I())}function rY(e,t){if(e&1&&(F(0,`tr`)(1,`th`,109),K(2),A(3,nY,2,0,`span`,110),I(),F(4,`td`,111),K(5),I(),F(6,`td`,111),K(7),I(),F(8,`td`,111),K(9),I(),F(10,`td`,111),K(11),I()()),e&2){let e=t.$implicit,n=W(4);D(2),J(` `,e.type,` `),D(),j(e.loop?3:-1),D(2),q(e.count),D(2),J(` `,e.avgMs===void 0?`n/a`:n.formatDuration(e.avgMs),` `),D(2),J(` `,e.maxMs===void 0?`n/a`:n.formatDuration(e.maxMs),` `),D(2),q(e.burst)}}function iY(e,t){if(e&1&&(F(0,`p`,49),K(1),I()),e&2){let e=W(4);D(),J(` A possible effect loop is an action an NgRx effect dispatched `,e.loopBurst,` or more times within one second. Check the effect that dispatches it for a missing filter or a dispatch of its own trigger. `)}}function aY(e,t){if(e&1&&(F(0,`div`,68)(1,`h4`,105),K(2,`Action frequency`),I(),F(3,`p`,49),K(4),I(),F(5,`div`,106)(6,`table`)(7,`thead`)(8,`tr`)(9,`th`,107),K(10),I(),F(11,`th`,108),K(12,`Count`),I(),F(13,`th`,108),K(14,`Avg`),I(),F(15,`th`,108),K(16,`Longest`),I(),F(17,`th`,108),K(18,`Peak per second`),I()()(),F(19,`tbody`),M(20,rY,12,6,`tr`,null,$q),I()()(),A(22,iY,2,1,`p`,49),I()),e&2){let e=W(),t=W(2);D(4),J(` How often each `,e.classic?`action`:`change`,` ran since the page loaded, including entries the log no longer keeps. `),D(6),q(e.classic?`Action`:`Method or write`),D(10),N(t.storeStats()),D(2),j(t.hasLoop()?22:-1)}}function oY(e,t){if(e&1&&L(0,`app-store-session`,69),e&2){let e=W(),t=W(2);P(`rpc`,t.rpc())(`pageId`,t.page()?.pageId??null)(`storeId`,e.id)(`entries`,t.sessionEntries())}}function sY(e,t){if(e&1&&L(0,`option`,116),e&2){let e=t.$implicit;P(`value`,e)}}function cY(e,t){if(e&1&&(F(0,`p`,121),K(1),I()),e&2){let e=W(4);D(),q(e.restoreOff)}}function lY(e,t){if(e&1){let e=B();F(0,`section`,70)(1,`h4`,112),K(2,`Dispatch an action`),I(),F(3,`form`,113),H(`submit`,function(t){return C(e),w(W(3).dispatchAction(t))}),F(4,`label`)(5,`span`),K(6,`Type`),I(),F(7,`input`,114),H(`input`,function(t){return C(e),w(W(3).dispatchType.set(t.target.value))}),I()(),F(8,`datalist`,115),M(9,sY,1,1,`option`,116,Yh),I(),F(11,`label`)(12,`span`),K(13,`Payload `),F(14,`span`,117),K(15,`(JSON object, optional)`),I()(),F(16,`textarea`,118),H(`input`,function(t){return C(e),w(W(3).dispatchPayload.set(t.target.value))}),I()(),F(17,`p`,119),K(18),I(),F(19,`div`,93)(20,`button`,120),K(21,` Dispatch `),I()(),A(22,cY,2,1,`p`,121),I()()}if(e&2){let e=W(3);D(7),P(`value`,e.dispatchType()),D(2),N(e.actionTypes()),D(7),P(`value`,e.dispatchPayload()),k(`aria-invalid`,e.payloadError()?`true`:null),D(2),q(e.payloadError()),D(2),P(`disabled`,e.busy()||!e.canRestore()||!e.dispatchRequest()),k(`aria-describedby`,e.canRestore()?null:`store-dispatch-off`),D(2),j(e.canRestore()?-1:22)}}function uY(e,t){if(e&1){let e=B();F(0,`div`,39)(1,`div`,45)(2,`h3`),K(3),I(),F(4,`div`,46)(5,`span`,47),K(6),I(),A(7,mJ,2,1,`span`,47)(8,hJ,2,1,`span`,47),A(9,gJ,1,1,`app-source-link`,48),A(10,_J,2,1,`span`,47),A(11,vJ,2,0,`span`,47),I(),A(12,yJ,8,0,`p`,49),A(13,xJ,4,0,`p`,50),I(),A(14,CJ,9,3,`div`,51),F(15,`div`,52)(16,`section`,53)(17,`div`,54)(18,`h4`,55),K(19,`State`),I(),F(20,`div`,56),A(21,wJ,1,6,`app-store-global`,57),F(22,`button`,58),H(`click`,function(){return C(e),w(W(2).copyState())}),K(23,` Copy `),I()()(),F(24,`app-state-tree`,59),H(`copied`,function(t){return C(e),w(W(2).copyPath(t))}),I()(),A(25,BJ,10,3),I(),A(26,GJ,9,4,`section`,60),F(27,`section`,61)(28,`h4`,62),K(29),F(30,`span`,20),K(31),I()(),L(32,`app-limit-note`,63),F(33,`div`,64)(34,`ul`,65,2),M(36,XJ,14,17,`li`,null,Yq,!1,eY,4,1,`li`,38),I(),F(39,`app-splitter`,66),S_(`sizeChange`,function(t){C(e);let n=W(2);return x_(n.logListSize,t)||(n.logListSize=t),w(t)}),I(),A(40,tY,2,4,`div`,67),I()(),A(41,aY,23,3,`div`,68),A(42,oY,1,4,`app-store-session`,69),A(43,lY,23,7,`section`,70),I()}if(e&2){let e,n,r,i,a=t,o=W(2);D(3),q(a.label),D(3),q(o.kindLabel(a.kind)),D(),j((e=a.redux)?7:8,e),D(2),j((n=a.signal?.declaredIn)?9:-1,n),D(),j(a.classic?10:-1),D(),j(a.signal?.watchOnly?11:-1),D(),j(a.signal?.watchOnly?12:-1),D(),j(a.signal?.references?.length?13:-1),D(),j(a.classic?.paused?14:-1),D(7),j(a.redux?-1:21),D(3),P(`value`,o.stateValue())(`changed`,o.changedPaths())(`label`,a.label+` state`),D(),j((r=a.signal)?25:-1,r),D(),j(a.classic?.devtools?26:-1),D(3),J(` `,a.classic||a.redux?`Action log`:`Change log`,` `),D(2),q(o.storeLog().length),D(),P(`dropped`,(a.redux?o.reduxPage()?.dropped:o.page()?.dropped)??0)(`max`,o.maxLog()),D(),Xg(`--%NS%log-list-size`,o.logListSize(),`px`),D(),Xg(`padding-top`,o.logWindow.enabled()?2+o.logWindow.padTop():null,`px`)(`padding-bottom`,o.logWindow.enabled()?2+o.logWindow.padBottom():null,`px`),P(`rovingWindow`,o.logWindow),k(`aria-label`,a.classic||a.redux?`Actions`:`Changes`),D(2),N(o.shownLog()),D(3),P(`min`,200)(`max`,640)(`defaultSize`,300),b_(`size`,o.logListSize),D(),j((i=o.changeEntry())?40:-1,i),D(),j(o.storeStats().length?41:-1),D(),j(a.redux?-1:42),D(),j(a.classic?43:-1)}}function dY(e,t){if(e&1&&(F(0,`div`,24)(1,`ul`,37),M(2,fJ,8,9,`li`,null,Jq,!1,pJ,2,0,`li`,38),I(),A(5,uY,44,36,`div`,39),I()),e&2){let e,t=W();D(2),N(t.filteredStores()),D(3),j((e=t.store())?5:-1,e)}}function fY(e,t){if(e&1&&(F(0,`code`,128),K(1),I()),e&2){W();let e=E_(0),t=W(2);P(`title`,t.prettyText(e.payload)),D(),q(t.shortText(e.payload))}}function pY(e,t){if(e&1){let e=B();w_(0),F(1,`li`)(2,`button`,126),H(`click`,function(){C(e);let t=E_(0);return w(W(2).selectEvent(t.seq))}),L(3,`span`,42),F(4,`span`,127),K(5),I(),A(6,fY,2,2,`code`,128),F(7,`span`,129),K(8),I()()()}if(e&2){let e=t.$implicit,n=W(2),r=T_(e.entry);D(),k(`data-vindex`,e.index)(`aria-setsize`,n.eventWindow.enabled()?n.pageEvents().length:null)(`aria-posinset`,n.eventWindow.enabled()?e.index+1:null),D(),G(`selected`,r.seq===n.selectedEventSeq()),k(`aria-pressed`,r.seq===n.selectedEventSeq())(`aria-controls`,r.seq===n.selectedEventSeq()?`ngrx-event-detail`:null),D(),Xg(`background`,n.kindColor(`event`)),D(),P(`title`,r.eventType??r.type),D(),q(r.eventType??r.type),D(),j(r.payload===void 0?-1:6),D(2),q(n.formatTime(r.timestamp))}}function mY(e,t){e&1&&(F(0,`li`,38),K(1,`No events match this filter.`),I())}function hY(e,t){if(e&1&&(F(0,`div`,125,7),ug(2,104),I()),e&2){W(2);let e=kg(23);D(2),P(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,I_(2,Kq,t))}}function gY(e,t){if(e&1&&(F(0,`section`,26)(1,`div`,18)(2,`h2`,122),K(3,`Events`),I(),F(4,`span`,20),K(5),I()(),F(6,`p`,123),K(7,` Events dispatched through @ngrx/signals/events, across every store on this page. `),I(),F(8,`ul`,124,6),M(10,pY,9,14,`li`,null,Yq,!1,mY,2,0,`li`,38),I(),A(13,hY,3,4,`div`,125),I()),e&2){let e,t=W();D(5),q(t.pageEvents().length),D(3),Xg(`padding-top`,t.eventWindow.enabled()?6+t.eventWindow.padTop():null,`px`)(`padding-bottom`,t.eventWindow.enabled()?6+t.eventWindow.padBottom():null,`px`),P(`rovingWindow`,t.eventWindow),D(2),N(t.shownEvents()),D(3),j((e=t.eventEntry())?13:-1,e)}}function _Y(e,t){if(e&1&&(F(0,`dt`),K(1,`Origin`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().selected,t=W();D(3),q(t.originText(e.origin))}}function vY(e,t){if(e&1&&(F(0,`dt`),K(1,`Duration`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().selected,t=W();D(3),q(t.formatDuration(e.durationMs))}}function yY(e,t){if(e&1&&(F(0,`app-source-link`,135),K(1),I()),e&2){let e=W().$implicit;P(`file`,e.file)(`line`,e.line),D(),__(``,e.name?e.name+` `:``,`(`,e.file,`:`,e.line,`)`)}}function bY(e,t){if(e&1&&(F(0,`code`),K(1),I()),e&2){let e=W().$implicit;D(),q(e.name)}}function xY(e,t){if(e&1&&(F(0,`li`),A(1,yY,2,5,`app-source-link`,135)(2,bY,2,1,`code`),I()),e&2){let e=t.$implicit;D(),j(e.file?1:2)}}function SY(e,t){if(e&1&&(F(0,`dt`),K(1,`Called from`),I(),F(2,`dd`)(3,`ol`,134),M(4,xY,3,1,`li`,null,Jh),I()()),e&2){let e=W().selected,t=W();D(4),N(t.traceFrames(e.trace))}}function CY(e,t){if(e&1&&ug(0,104),e&2){let e=W().selected;P(`ngTemplateOutlet`,kg(13))(`ngTemplateOutletContext`,I_(2,qq,e))}}function wY(e,t){if(e&1&&(F(0,`dt`),K(1,`Action`),I(),F(2,`dd`)(3,`pre`,136),K(4),I()()),e&2){let e=W().selected,t=W(2);D(4),q(t.prettyText(e.action))}}function TY(e,t){if(e&1&&(F(0,`dt`),K(1,`Arguments`),I(),F(2,`dd`)(3,`pre`,136),K(4),I()()),e&2){let e=W().selected,t=W(2);D(4),q(t.prettyText(e.args))}}function EY(e,t){if(e&1&&(F(0,`dt`),K(1,`Payload`),I(),F(2,`dd`)(3,`pre`,136),K(4),I()()),e&2){let e=W().selected,t=W(2);D(4),q(t.prettyText(e.payload))}}function DY(e,t){if(e&1&&(F(0,`pre`,136),K(1),I()),e&2){let e=W(),t=W(3);D(),q(t.prettyText(e.payload))}}function OY(e,t){if(e&1&&(F(0,`dt`),K(1,`Caused by event`),I(),F(2,`dd`)(3,`code`,137),K(4),I(),A(5,DY,2,1,`pre`,136),I()),e&2){let e=t;D(4),q(e.type),D(),j(e.payload===void 0?-1:5)}}function kY(e,t){if(e&1&&(A(0,wY,5,1),A(1,TY,5,1),A(2,EY,5,1),A(3,OY,6,2)),e&2){let e,n=t.selected;j(n.action===void 0?-1:0),D(),j(n.args?.length?1:-1),D(),j(n.source===`event`&&n.payload!==void 0?2:-1),D(),j((e=n.causedByEvent)?3:-1,e)}}function AY(e,t){if(e&1){let e=B();F(0,`button`,141),H(`click`,function(){C(e);let t=W().selected;return w(W(2).copyDiff(t))}),K(1,` Copy `),I()}if(e&2){let e=W().selected;k(`aria-label`,`Copy the state diff of #`+e.seq)}}function jY(e,t){if(e&1&&(F(0,`code`,147),K(1),I()),e&2){let e=W().$implicit,t=W(4);D(),q(t.shortText(e.before))}}function MY(e,t){e&1&&(F(0,`span`,149),K(1,`→`),I(),F(2,`span`,150),K(3,`became`),I())}function NY(e,t){if(e&1&&(F(0,`code`,148),K(1),I()),e&2){let e=W().$implicit,t=W(4);D(),q(t.shortText(e.after))}}function PY(e,t){if(e&1&&(F(0,`li`)(1,`span`,144),K(2),I(),F(3,`code`,145),K(4),I(),F(5,`span`,146),A(6,jY,2,1,`code`,147),A(7,MY,4,0),A(8,NY,2,1,`code`,148),I()()),e&2){let e=t.$implicit,n=W(4);Zg(`diff-row `+e.op),D(2),q(n.opLabel(e.op)),D(2),q(e.path),D(2),j(e.op===`add`?-1:6),D(),j(e.op===`change`?7:-1),D(),j(e.op===`remove`?-1:8)}}function FY(e,t){if(e&1&&(F(0,`p`,76),K(1),I()),e&2){let e=W(2).selected,t=W(2);D(),q(t.moreChanges(e.diffTruncated))}}function IY(e,t){if(e&1&&(F(0,`ul`,142),M(1,PY,9,7,`li`,143,eJ),I(),A(3,FY,2,1,`p`,76)),e&2){let e=W().selected;D(),N(e.diff),D(2),j(e.diffTruncated?3:-1)}}function LY(e,t){e&1&&(F(0,`p`,76),K(1,`The state did not change.`),I())}function RY(e,t){if(e&1&&(F(0,`div`,138)(1,`div`,139),K(2,`State diff`),I(),A(3,AY,2,1,`button`,140),I(),A(4,IY,4,1)(5,LY,2,0,`p`,76)),e&2){let e=t.selected,n=W().headingLevel;D(),k(`aria-level`,n+1),D(2),j(e.diff.length?3:-1),D(),j(e.diff.length?4:5)}}function zY(e,t){if(e&1&&(F(0,`dl`,151),ug(1,104),I()),e&2){let e=W(2).selected,t=kg(13);D(),P(`ngTemplateOutlet`,t)(`ngTemplateOutletContext`,I_(2,qq,e))}}function BY(e,t){if(e&1&&(A(0,zY,2,4,`dl`,151),ug(1,104)),e&2){let e=W().selected,t=kg(15);j(e.action===void 0?-1:0),D(),P(`ngTemplateOutlet`,t)(`ngTemplateOutletContext`,I_(3,qq,e))}}function VY(e,t){if(e&1&&(F(0,`dl`,75),ug(1,104),I()),e&2){let e=W(2).selected,t=kg(13);D(),P(`ngTemplateOutlet`,t)(`ngTemplateOutletContext`,I_(2,qq,e))}}function HY(e,t){e&1&&(F(0,`p`,76),K(1,` No action or arguments: a restore, or a patchState write outside a method. `),I())}function UY(e,t){if(e&1&&(F(0,`app-entry-tabs`,132)(1,`div`,152),A(2,VY,2,4,`dl`,75)(3,HY,2,0,`p`,76),I(),F(4,`div`,153),ug(5,104),I()()),e&2){let e=W(),t=e.selected,n=e.idPrefix,r=kg(15),i=W();P(`idPrefix`,n+`-`+t.seq)(`seq`,t.seq)(`diffTruncated`,t.diffTruncated)(`loader`,i.loadEntry),D(2),j(t.action!==void 0||t.args?.length||t.causedByEvent?2:3),D(3),P(`ngTemplateOutlet`,r)(`ngTemplateOutletContext`,I_(7,qq,t))}}function WY(e,t){if(e&1&&K(0),e&2){let e=W(2).selected;J(` Store DevTools jumps the app state to the state right after action #`,e.seq,`. Until you go back to the latest state, new actions are logged but do not change the state. `)}}function GY(e,t){if(e&1&&K(0),e&2){let e=W(3).selected;Y(` This sets every state key of `,t.label,` back to its value right after change #`,e.seq,`. Components that read the store update at once, and a new "Restore" entry is added to the log. `)}}function KY(e,t){if(e&1&&K(0),e&2){let e=W(3).selected;J(` This sets every state key of the store back to its value right after change #`,e.seq,`. Components that read the store update at once, and a new "Restore" entry is added to the log. `)}}function qY(e,t){if(e&1&&A(0,GY,1,2)(1,KY,1,1),e&2){let e;j((e=W(3).store())?0:1,e)}}function JY(e,t){if(e&1){let e=B();F(0,`div`,154),H(`keydown.escape`,function(t){return C(e),w(W(2).cancelRestore(t))}),F(1,`p`,155),A(2,WY,1,1)(3,qY,2,1),I(),F(4,`div`,93)(5,`button`,71),H(`click`,function(){C(e);let t=W().selected;return w(W().restore(t.seq,t.source===`store`))}),K(6,` Restore `),I(),F(7,`button`,35,10),H(`click`,function(){return C(e),w(W(2).cancelRestore())}),K(9,` Cancel `),I()()()}if(e&2){let e=W(),t=e.selected,n=e.idPrefix,r=W();k(`aria-labelledby`,n+`-confirm-text`),D(),P(`id`,n+`-confirm-text`),D(),j(t.source===`store`?2:3),D(3),P(`disabled`,r.busy())}}function YY(e,t){if(e&1){let e=B();F(0,`button`,97),H(`click`,function(){C(e);let t=W(2).selected;return w(W().devtoolsOp({op:`toggle`,seq:t.seq}))}),K(1),I()}if(e&2){let e=W(2),t=e.selected,n=e.idPrefix,r=W();P(`disabled`,r.busy()||!r.canRestore()),k(`aria-describedby`,r.canRestore()?null:n+`-writes-off`),D(),J(` `,r.isSkipped(t.seq)?`Include this action`:`Skip this action`,` `)}}function XY(e,t){if(e&1){let e=B();F(0,`button`,160,11),H(`click`,function(){C(e);let t=W(2).selected;return w(W().askRestore(t.seq))}),K(2,` Restore this state `),I()}if(e&2){let e=W(2).idPrefix,t=W();P(`disabled`,!t.canRestore()),k(`aria-describedby`,t.canRestore()?null:e+`-writes-off`)}}function ZY(e,t){if(e&1){let e=B();F(0,`button`,97),H(`click`,function(){C(e);let t=W(2).selected;return w(W().dispatchAgain(t.seq))}),K(1,` Dispatch again `),I()}if(e&2){let e=W(2).idPrefix,t=W();P(`disabled`,t.busy()||!t.canRestore()),k(`aria-describedby`,t.canRestore()?null:e+`-writes-off`)}}function QY(e,t){if(e&1&&(F(0,`p`,159),K(1),I()),e&2){let e=W(2).idPrefix,t=W();P(`id`,e+`-writes-off`),D(),q(t.restoreOff)}}function $Y(e,t){if(e&1&&(F(0,`div`,156),A(1,YY,2,3,`button`,157),A(2,XY,3,2,`button`,158),A(3,ZY,2,2,`button`,157),I(),A(4,QY,2,2,`p`,159)),e&2){let e=W().selected,t=W();D(),j(t.canToggle(e)?1:-1),D(),j(e.restorable?2:-1),D(),j(t.canAgain(e)?3:-1),D(),j(t.canRestore()?-1:4)}}function eX(e,t){e&1&&(F(0,`p`,49),K(1,` This store reports through its Redux DevTools integration, which the panel reads but does not write to, so its state cannot be restored from here. `),I())}function tX(e,t){e&1&&(K(0,` Store DevTools no longer holds this action, so this state cannot be restored. It was dropped past `),F(1,`code`),K(2,`maxAge`),I(),K(3,`, or the Store DevTools history was committed, reset or imported. `))}function nX(e,t){e&1&&(K(0,` Store DevTools never recorded this action, so this state cannot be restored. An `),F(1,`code`),K(2,`actionsBlocklist`),I(),K(3,`, `),F(4,`code`),K(5,`actionsSafelist`),I(),K(6,` or `),F(7,`code`),K(8,`predicate`),I(),K(9,` option filtered it out, or recording was paused. `))}function rX(e,t){e&1&&(K(0,` Time travel for @ngrx/store needs `),F(1,`code`),K(2,`provideStoreDevtools()`),I(),K(3,`. Without it, entries cannot be restored. `))}function iX(e,t){if(e&1&&(F(0,`p`,49),A(1,tX,4,0)(2,nX,10,0)(3,rX,4,0),I()),e&2){let e=W().selected;D(),j(e.unrestorable===`dropped`?1:e.unrestorable===`not-recorded`?2:3)}}function aX(e,t){if(e&1&&(F(0,`section`,130)(1,`div`,131),K(2),I(),F(3,`dl`,75)(4,`dt`),K(5,`Time`),I(),F(6,`dd`),K(7),I(),A(8,_Y,4,1),A(9,vY,4,1),A(10,SY,6,0),A(11,CY,1,4,`ng-container`,104),I(),Eh(12,kY,4,4,`ng-template`,null,8,G_)(14,RY,6,3,`ng-template`,null,9,G_),A(16,BY,2,5)(17,UY,6,9,`app-entry-tabs`,132),A(18,JY,10,4,`div`,133),A(19,$Y,5,4),A(20,eX,2,0,`p`,49),A(21,iX,4,1,`p`,49),I()),e&2){let e=t.selected,n=t.headingLevel,r=t.idPrefix,i=W();k(`aria-labelledby`,r+`-entry-heading`),D(),P(`id`,r+`-entry-heading`),k(`aria-level`,n),D(),Y(` #`,e.seq,` `,e.type,` `),D(5),q(i.formatTime(e.timestamp)),D(),j(e.origin?8:-1),D(),j(e.durationMs===void 0?-1:9),D(),j(e.trace?.length?10:-1),D(),j(e.source===`event`?11:-1),D(5),j(e.source===`redux`?16:e.source===`event`?-1:17),D(2),j(e.restorable&&i.confirmSeq()===e.seq?18:-1),D(),j(i.confirmSeq()!==e.seq&&(e.restorable||i.canAgain(e)||i.canToggle(e))?19:-1),D(),j(e.source===`redux`?20:-1),D(),j(!e.restorable&&e.source===`store`?21:-1)}}function oX(e,t){if(e&1&&(F(0,`span`,20),K(1),I()),e&2){let e=W();D(),q(e.sourceEntries().length)}}function sX(e,t){e&1&&(F(0,`div`,29),L(1,`span`,161),F(2,`p`,33),K(3,`Scanning source for NgRx declarations…`),I()())}function cX(e,t){e&1&&(F(0,`div`,30)(1,`p`,33),K(2,`No NgRx declarations found in source.`),I(),F(3,`p`,34),K(4,` The scan looks for `),F(5,`code`),K(6,`signalStore`),I(),K(7,`, `),F(8,`code`),K(9,`signalState`),I(),K(10,`, `),F(11,`code`),K(12,`signalMethod`),I(),K(13,`, `),F(14,`code`),K(15,`createAction`),I(),K(16,`, `),F(17,`code`),K(18,`createReducer`),I(),K(19,`, `),F(20,`code`),K(21,`createEffect`),I(),K(22,`, `),F(23,`code`),K(24,`createSelector`),I(),K(25,` and `),F(26,`code`),K(27,`createFeature`),I(),K(28,`. `),I()())}function lX(e,t){if(e&1){let e=B();F(0,`button`,163),H(`click`,function(){let t=C(e).$implicit,n=W(2);return w(n.kind.set(n.kind()===t.kind?null:t.kind))}),L(1,`span`,42),F(2,`span`,168),K(3),I(),F(4,`span`,164),K(5),I()()}if(e&2){let e=t.$implicit,n=W(2);G(`active`,n.kind()===e.kind),k(`aria-pressed`,n.kind()===e.kind),D(),Xg(`background`,n.kindColor(e.kind)),D(2),q(n.kindLabel(e.kind)),D(2),q(e.count)}}function uX(e,t){if(e&1&&(F(0,`p`,173),K(1),I()),e&2){let e=W().$implicit;D(),q(e.detail)}}function dX(e,t){if(e&1&&(F(0,`li`,167)(1,`div`,169),L(2,`span`,42),F(3,`span`,170),K(4),I(),F(5,`span`,47),K(6),I()(),F(7,`div`,171),L(8,`app-source-link`,172),I(),A(9,uX,2,1,`p`,173),I()),e&2){let e=t.$implicit,n=W(2);D(2),Xg(`background`,n.kindColor(e.kind)),D(2),q(e.name),D(2),q(n.kindLabel(e.kind)),D(2),P(`file`,e.file)(`line`,e.line),D(),j(e.detail?9:-1)}}function fX(e,t){if(e&1){let e=B();F(0,`li`)(1,`div`,29)(2,`p`,33),K(3,`No declarations match.`),I(),F(4,`button`,35),H(`click`,function(){return C(e),w(W(2).clearFilters())}),K(5,`Clear filters`),I()()()}}function pX(e,t){if(e&1){let e=B();F(0,`div`,162)(1,`button`,163),H(`click`,function(){return C(e),w(W().kind.set(null))}),K(2,` All `),F(3,`span`,164),K(4),I()(),M(5,lX,6,7,`button`,165,tJ),I(),F(7,`ul`,166),M(8,dX,10,7,`li`,167,nJ,!1,fX,6,0,`li`),I()}if(e&2){let e=W();D(),G(`active`,!e.kind()),k(`aria-pressed`,!e.kind()),D(3),q(e.sourceEntries().length),D(),N(e.groupedEntries()),D(3),N(e.filteredEntries())}}var mX={action:`#f59e0b`,reducer:`#a78bfa`,effect:`#fb923c`,selector:`#60a5fa`,feature:`#34d399`,"store-setup":`#94a3b8`,"signal-store":`#e879f9`,"signal-state":`#22d3ee`,"signal-method":`#fb7185`,store:`#a78bfa`,event:`var(--warn)`,redux:`#38bdf8`},hX={"signal-store":`signalStore`,"signal-state":`signalState`,"signal-method":`signalMethod`,"store-setup":`store setup`,store:`@ngrx/store`,event:`event`,redux:`Redux DevTools`},gX={dispatch:`store.dispatch(action)`,effect:`NgRx effect (Store.next)`,reactive:`store.dispatch(() => action)`};function _X(e){if(!e.trim())return{};let t;try{t=JSON.parse(e)}catch{return{error:`The payload is not valid JSON.`}}return!t||typeof t!=`object`||Array.isArray(t)?{error:`The payload must be a JSON object, like {"id": 7}.`}:Object.prototype.hasOwnProperty.call(t,`type`)?{error:`The payload cannot have a "type" key. Put the action type in the Type field.`}:{payload:t}}var vX=new Set([`action`,`reducer`,`effect`,`selector`,`feature`,`store-setup`]),yX=class e{rpc=$(null);canRestore=X(()=>IT(this.rpc(),`ngrx`));restoreOff=Uw(`ngrx`);filter=E(``);logListSize=E(pW(`store-log`,300));kind=E(null);sourceEntries=E([]);sourceLoaded=E(!1);pages=E([]);reduxPages=E([]);allPages=X(()=>{let e=this.pages(),t=new Set(e.map(e=>e.pageId)),n=this.reduxPages().filter(e=>!t.has(e.pageId)).map(e=>({pageId:e.pageId,url:e.url,title:e.title,stores:[],classic:null,log:[],reportedAt:e.reportedAt}));return[...e,...n]});failed=E(!1);stateLoaded=E(!1);selectedPageId=E(null);hostPageId=fT();angularPages=uD(()=>this.rpc());angularPage=X(()=>dD(this.angularPages(),this.page()?.pageId??this.hostPageId));maxLog=X(()=>NT(this.rpc()).limits.changeLog);selectedStoreId=E(null);focusEventSeq=E(null);eventDetailHeading=av(`eventDetailHeading`);busy=E(!1);focusLatest=E(!1);focusConfirm=E(null);cancelButton=av(`cancelButton`);restoreButton=av(`restoreButton`);stateTree=av(kq);resetButton=av(`resetButton`);resetCancel=av(`resetCancel`);confirmReset=Q({source:()=>this.store()?.id,computation:()=>!1});focusReset=E(null);loopBurst=20;filterInput=av(`filterInput`);latestButton=av(`latestButton`);message=E(``);destroyRef=S(vs);unsubscribe=null;unsubscribeOthers=null;page=X(()=>{let e=this.allPages();return e.find(e=>e.pageId===this.selectedPageId())??e.find(e=>e.pageId===this.hostPageId)??e[0]??null});pageConnected=X(()=>!!this.page()||!!this.angularPage());reduxPage=X(()=>this.reduxPages().find(e=>e.pageId===this.page()?.pageId)??null);logKey=X(()=>{let e=this.page(),t=this.store();return t?.redux?{pageId:`${e?.pageId}/${t.id}`,log:Pq(this.reduxPage(),t.id)}:{pageId:e?.pageId??null,log:e?.log??[]}});logSession=Q({source:this.logKey,computation:(e,t)=>t?vK(t.source,e)?t.value:t.value+1:0});selectedChangeSeq=Q({source:this.logSession,computation:()=>null});selectedEventSeq=Q({source:this.logSession,computation:()=>null});confirmSeq=Q({source:this.logSession,computation:()=>null});pageOptions=X(()=>this.allPages().map(e=>({value:e.pageId,label:e.title||e.url,hint:e.url})));liveStores=X(()=>{let e=this.page();if(!e)return[];let t=e.stores.map(e=>({id:e.id,label:e.name??e.references[0]??e.className,kind:e.kind,scope:e.scope,signal:e}));return e.classic&&t.push({id:`store`,label:`Store`,kind:`store`,scope:e.classic.scope,classic:e.classic}),t.push(...Nq(this.reduxPage())),t});filteredStores=X(()=>{let e=this.filter().trim().toLowerCase();return e?this.liveStores().filter(t=>t.label.toLowerCase().includes(e)||t.kind.includes(e)||(t.signal?.stateKeys??[]).some(t=>t.toLowerCase().includes(e))||this.logOf(t).some(t=>t.type.toLowerCase().includes(e))):this.liveStores()});store=X(()=>{let e=this.liveStores();return e.find(e=>e.id===this.selectedStoreId())??e[0]??null});stateText=X(()=>{let e=this.store();return e?CK(e.signal?e.signal.state:e.redux?e.redux.state:e.classic?.state):``});stateValue=X(()=>{let e=this.store();if(e)return e.signal?e.signal.state:e.redux?e.redux.state:e.classic?.state});changedPaths=X(()=>{let e=this.store(),t=e?this.logOf(e):[],n;for(let e=t.length-1;e>=0&&!n;e--)t[e].diff.length&&(n=t[e]);return(n?.diff??[]).map(e=>e.path)});storeStats=X(()=>{let e=this.store();if(!e||e.redux)return[];let t=this.page()?.stats;return Array.isArray(t)?t.filter(t=>t.storeId===e.id):[]});hasLoop=X(()=>this.storeStats().some(e=>e.loop));skippedSeqs=X(()=>new Set(Array.isArray(this.page()?.classic?.skipped)?this.page().classic.skipped:[]));computedEntries=X(()=>Object.entries(this.store()?.signal?.computed??{}).map(([e,t])=>({key:e,value:wK(t,160),full:CK(t)})));storeLog=X(()=>{let e=this.store(),t=this.filter().trim().toLowerCase();return(e?this.logOf(e):[]).filter(e=>!t||e.type.toLowerCase().includes(t)||this.storeMatches(t)).reverse()});sessionEntries=X(()=>{let e=this.store();return!e||e.redux?[]:(this.page()?.log??[]).filter(t=>t.storeId===e.id&&t.source!==`event`)});loadEntry=async e=>{let t=this.page()?.pageId;return t?await _T(this.rpc(),`request-ngrx-history`,{pageId:t,request:{type:`entry`,seq:e}})??{error:`The devtools server is not connected.`}:{error:`No live page to read from.`}};logOf(e){return e.redux?Pq(this.reduxPage(),e.id):(this.page()?.log??[]).filter(t=>t.storeId===e.id)}hasEvents=X(()=>(this.page()?.log??[]).some(e=>e.source===`event`));pageEvents=X(()=>{let e=this.filter().trim().toLowerCase();return(this.page()?.log??[]).filter(t=>t.source===`event`&&(!e||t.type.toLowerCase().includes(e))).slice().reverse()});logWindow=new HN({count:X(()=>this.storeLog().length),estimate:56});shownLog=X(()=>bX(this.storeLog(),this.logWindow));eventWindow=new HN({count:X(()=>this.pageEvents().length),estimate:36});shownEvents=X(()=>bX(this.pageEvents(),this.eventWindow));logList=av(`logList`);eventsList=av(`eventsList`);changeEntry=X(()=>{let e=this.selectedChangeSeq();return e===null?null:this.storeLog().find(t=>t.seq===e)??null});eventEntry=X(()=>{let e=this.selectedEventSeq();return e===null?null:this.pageEvents().find(t=>t.seq===e)??null});dispatchType=E(``);dispatchPayload=E(``);actionTypes=X(()=>{let e=new Set;for(let t of this.sourceEntries())for(let n of t.types??[])e.add(n);for(let t of this.page()?.log??[])t.source===`store`&&t.action!==void 0&&e.add(t.type);return[...e].sort().slice(0,200)});payloadError=X(()=>_X(this.dispatchPayload()).error??``);dispatchRequest=X(()=>{let e=this.dispatchType().trim(),{payload:t,error:n}=_X(this.dispatchPayload());return!e||n?null:{type:`dispatch`,action:e,...t?{payload:t}:{}}});usesSignals=X(()=>this.sourceEntries().some(e=>e.kind===`signal-store`||e.kind===`signal-state`));usesClassic=X(()=>this.sourceEntries().some(e=>vX.has(e.kind)));filteredEntries=X(()=>{let e=this.filter().trim().toLowerCase(),t=this.kind();return this.sourceEntries().filter(n=>(!t||n.kind===t)&&(!e||n.name.toLowerCase().includes(e)||n.kind.includes(e)||(n.detail??``).toLowerCase().includes(e)))});groupedEntries=X(()=>{let e=new Map;for(let t of this.sourceEntries())e.set(t.kind,(e.get(t.kind)??0)+1);return[...e.entries()].map(([e,t])=>({kind:e,count:t}))});constructor(){ac(()=>{let e=this.logList()?.nativeElement;e&&this.logWindow.attach(e)}),ac(()=>{let e=this.eventsList()?.nativeElement;e&&this.eventWindow.attach(e)}),ac(()=>{let e=this.rpc();e&&this.load(e)}),fv(()=>{let e=this.latestButton();e&&this.focusLatest()&&!this.busy()&&(this.focusLatest.set(!1),e.nativeElement.focus())}),ac(()=>{let e=this.focusConfirm(),t=e===`cancel`?this.cancelButton():this.restoreButton();e&&t&&(this.focusConfirm.set(null),t.nativeElement.focus())}),fv(()=>{let e=this.focusReset(),t=e===`cancel`?this.resetCancel():this.resetButton();e&&t&&(this.focusReset.set(null),t.nativeElement.focus())}),fv(()=>{let e=this.focusEventSeq(),t=this.eventDetailHeading();e!==null&&t&&(this.focusEventSeq.set(null),t.nativeElement.focus())}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),this.unsubscribeOthers?.()})}storeMatches(e){let t=this.store();return!!t&&t.label.toLowerCase().includes(e)}async load(e){this.failed.set(!1),_T(e,`get-ngrx-store`).then(e=>this.sourceEntries.set(Array.isArray(e)?e:[])).catch(()=>this.sourceEntries.set([])).finally(()=>this.sourceLoaded.set(!0));try{let t=await e.scope(`pangular`).rpc.sharedState(`ngrx-store`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e;this.pages.set(Array.isArray(t?.pages)?t.pages:[]),e!==void 0&&this.stateLoaded.set(!0)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}try{let t=await e.scope(`pangular`).rpc.sharedState(`redux-stores`);if(this.destroyRef.destroyed)return;let n=e=>this.reduxPages.set(Mq(e));n(t.value()),this.unsubscribeOthers?.(),this.unsubscribeOthers=t.on(`updated`,n)}catch{this.reduxPages.set([])}}retry(){let e=this.rpc();e&&this.load(e)}selectPage(e){this.selectedPageId.set(e),this.selectedStoreId.set(null),this.selectedChangeSeq.set(null),this.selectedEventSeq.set(null),this.confirmSeq.set(null),this.message.set(``)}selectStore(e){this.selectedStoreId.set(e),this.selectedChangeSeq.set(null),this.confirmSeq.set(null),this.message.set(``)}selectChange(e){this.selectedChangeSeq.set(this.selectedChangeSeq()===e?null:e),this.confirmSeq.set(null),this.message.set(``)}copyState(){return this.copyText(this.stateText())}copyPath(e){return this.copyText(e,`Copied the path ${e}.`)}copyDiff(e){return this.copyText(CK(e.diff))}async copyText(e,t=`Copied.`){try{await navigator.clipboard.writeText(e),this.message.set(t)}catch{this.message.set(`The clipboard is not available here.`)}}askRestore(e){this.confirmSeq.set(e),this.focusConfirm.set(`cancel`)}cancelRestore(e){e?.preventDefault(),this.confirmSeq.set(null),this.focusConfirm.set(`restore`)}async restore(e,t){let n=this.page();if(!n)return;this.busy.set(!0),this.focusLatest.set(!1);let r=!1;try{let i=await _T(this.rpc(),`request-ngrx-action`,{pageId:n.pageId,request:{type:`restore`,seq:e}});this.message.set(i?.error??i?.message??`Restored.`),r=t&&!i?.error&&!!i?.paused}catch{this.message.set(`Could not reach the page to restore the state.`)}finally{this.busy.set(!1),this.confirmSeq.set(null),this.focusLatest.set(r),r||this.stateTree()?.focus()}}selectEvent(e){let t=this.selectedEventSeq()===e?null:e;this.selectedEventSeq.set(t),t!==null&&this.focusEventSeq.set(t)}async backToLatest(){let e=this.page();if(e){this.busy.set(!0);try{let t=await _T(this.rpc(),`request-ngrx-action`,{pageId:e.pageId,request:{type:`latest`}});this.focusLatest.set(!1),this.stateTree()?.focus(),this.message.set(t?.error??t?.message??`Back on the latest state.`)}catch{this.message.set(`Could not reach the page to go back to the latest state.`)}finally{this.busy.set(!1)}}}isSkipped(e){return this.skippedSeqs().has(e)}canToggle(e){return e.source===`store`&&e.action!==void 0&&!!this.page()?.classic?.devtools&&(e.restorable||this.isSkipped(e.seq))}traceFrames(e){return e.map(mK)}askReset(){this.confirmReset.set(!0),this.focusReset.set(`cancel`)}cancelReset(e){e?.preventDefault(),this.confirmReset.set(!1),this.focusReset.set(`reset`)}async devtoolsOp(e){let t=this.page();if(!t||this.busy())return;let n=e.op===`reset`;this.busy.set(!0);try{let n=await _T(this.rpc(),`request-ngrx-action`,{pageId:t.pageId,request:{type:`devtools`,...e}});this.message.set(n?.error??n?.message??`Done.`)}catch{this.message.set(`Could not reach the page to change the Store DevTools history.`)}finally{this.busy.set(!1),n&&(this.confirmReset.set(!1),this.focusReset.set(`reset`))}}canAgain(e){return e.source===`store`&&e.action!==void 0}async dispatchAction(e){e.preventDefault();let t=this.dispatchRequest();t&&await this.send(t,`Could not reach the page to dispatch the action.`)}dispatchAgain(e){return this.send({type:`dispatch-again`,seq:e},`Could not reach the page to dispatch the action again.`)}async send(e,t){let n=this.page();if(!n||this.busy())return;let r=this.logSession();this.busy.set(!0);try{let t=await _T(this.rpc(),`request-ngrx-action`,{pageId:n.pageId,request:e});this.message.set(t?.error??t?.message??`Dispatched.`),t?.entry&&this.logSession()===r&&(this.selectedStoreId.set(`store`),this.selectedChangeSeq.set(t.entry.seq))}catch{this.message.set(t)}finally{this.busy.set(!1)}}clearFilters(){this.filter.set(``),this.kind.set(null),this.filterInput()?.focus()}countText(e){let t=this.changeCount(e.id);return`${t} ${e.redux?t===1?`action`:`actions`:t===1?`change`:`changes`}`}changeCount(e){let t=this.liveStores().find(t=>t.id===e);return t?this.logOf(t).length:0}entityIds(e){return e.slice(0,30)}entityOverflowTitle(e,t){let n=e.slice(30).join(`, `);return t>e.length?`${n} (first ${e.length} of ${t} shown)`:n}kindColor(e){return mX[e]??`var(--text-3)`}kindLabel(e){return hX[e]??e}originText(e){return gX[e]??e}changesLabel=_K;moreChanges=gK;opLabel(e){return e===`add`?`added`:e===`remove`?`removed`:`changed`}prettyText(e){return CK(e)}shortText(e){return wK(e)}formatTime=GE;formatDuration(e){return e<=0?`<1ms`:`${Math.round(e)}ms`}methodDuration(e){let t=[];return e.avgDurationMs!==void 0&&t.push(`avg ${this.formatDuration(e.avgDurationMs)}`),e.lastDurationMs!==void 0&&t.push(`last ${this.formatDuration(e.lastDurationMs)}`),t.length?` · ${t.join(` · `)}`:``}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-store-inspector`]],viewQuery:function(e,t){e&1&&Dg(t.eventDetailHeading,Fq,5)(t.cancelButton,Iq,5)(t.restoreButton,Lq,5)(t.stateTree,kq,5)(t.resetButton,Rq,5)(t.resetCancel,zq,5)(t.filterInput,Bq,5)(t.latestButton,Vq,5)(t.logList,Hq,5)(t.eventsList,Uq,5),e&2&&Og(10)},inputs:{rpc:[1,`rpc`]},decls:32,vars:11,consts:[[`filterInput`,``],[`entryDetailTpl`,``],[`logList`,``],[`latestButton`,``],[`resetCancel`,``],[`resetButton`,``],[`eventsList`,``],[`eventDetailHeading`,``],[`actionRowsTpl`,``],[`diffTpl`,``],[`cancelButton`,``],[`restoreButton`,``],[1,`page-intro`],[1,`toolbar`],[`placeholder`,`Filter stores, changes and declarations`,`saveKey`,`store`,1,`search`,3,`valueChange`,`value`],[1,`status`],[`aria-hidden`,`true`,1,`live-dot`],[`aria-labelledby`,`ngrx-live-heading`,1,`block`],[1,`section-head`],[`id`,`ngrx-live-heading`],[1,`pill`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`empty`],[1,`empty`],[1,`live-layout`],[`role`,`status`,1,`message`],[`aria-labelledby`,`ngrx-events-heading`,1,`block`],[`aria-labelledby`,`ngrx-source-heading`,1,`block`],[`id`,`ngrx-source-heading`],[`role`,`status`,1,`empty`,`compact`],[1,`empty`,`compact`],[`id`,`ngrx-page-label`,1,`visually-hidden`],[`labelledBy`,`ngrx-page-label`,1,`page-select`,3,`valueChange`,`options`,`value`],[1,`empty-title`],[1,`hint`],[`type`,`button`,1,`btn`,3,`click`],[`capability`,`injectorProviders`,`compact`,``,3,`page`],[`aria-label`,`Stores on this page`,1,`store-list`],[1,`muted`,`pad`],[1,`store-detail`],[`type`,`button`,1,`store-item`,3,`click`],[1,`store-top`],[`aria-hidden`,`true`,1,`dot`],[1,`store-name`],[1,`store-meta`],[1,`detail-head`],[1,`chips`],[1,`chip`],[1,`chip`,`mono`,3,`file`],[1,`hint`,`small`],[1,`refs`],[1,`paused`],[1,`facts`],[`aria-labelledby`,`ngrx-state-heading`,1,`fact`],[1,`fact-head`],[`id`,`ngrx-state-heading`],[1,`state-actions`],[3,`rpc`,`pageId`,`target`,`label`],[`type`,`button`,`aria-label`,`Copy state`,1,`btn`,`copy`,3,`click`],[3,`copied`,`value`,`changed`,`label`],[`aria-labelledby`,`ngrx-devtools-heading`,1,`history`],[`aria-labelledby`,`ngrx-log-heading`,1,`log`],[`id`,`ngrx-log-heading`],[`what`,`changes on this page`,`limit`,`changeLog`,3,`dropped`,`max`],[1,`log-layout`],[`appRovingList`,`button.log-item`,1,`log-list`,3,`rovingWindow`],[`view`,`store-log`,`pane`,`before`,`label`,`Resize the change list`,3,`sizeChange`,`min`,`max`,`defaultSize`,`size`],[`id`,`ngrx-change-detail`],[1,`stats`],[3,`rpc`,`pageId`,`storeId`,`entries`],[`aria-labelledby`,`ngrx-dispatch-heading`,1,`dispatch`],[`type`,`button`,1,`btn`,`primary`,3,`click`,`disabled`],[`id`,`store-latest-off`,1,`hint`,`small`],[`aria-labelledby`,`ngrx-computed-heading`,1,`fact`],[`id`,`ngrx-computed-heading`],[1,`kv`],[1,`muted`],[`id`,`ngrx-methods-heading`,1,`spaced`],[`aria-labelledby`,`ngrx-methods-heading`,1,`methods`],[`aria-labelledby`,`ngrx-entities-heading`,1,`fact`],[3,`title`],[1,`chip`,`mono`],[1,`tag`],[1,`calls`],[`id`,`ngrx-entities-heading`],[1,`entities`],[1,`entity-group`],[1,`entity-head`],[1,`entity-count`],[1,`chips`,`entity-ids`],[1,`chip`,`more`,3,`title`],[`id`,`ngrx-devtools-heading`],[`role`,`group`,`aria-labelledby`,`ngrx-reset-text`,1,`confirm`],[1,`actions`],[`id`,`store-history-off`,1,`hint`,`small`],[`role`,`group`,`aria-labelledby`,`ngrx-reset-text`,1,`confirm`,3,`keydown.escape`],[`id`,`ngrx-reset-text`],[`type`,`button`,1,`btn`,3,`click`,`disabled`],[`type`,`button`,1,`log-item`,3,`click`],[1,`seq`],[1,`log-type-row`],[1,`log-type`,3,`title`],[1,`tag`,3,`title`],[1,`log-meta`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`id`,`ngrx-stats-heading`],[`tabindex`,`0`,`role`,`region`,`aria-labelledby`,`ngrx-stats-heading`,1,`table-wrap`],[`scope`,`col`],[`scope`,`col`,1,`num`],[`scope`,`row`,1,`mono`],[1,`loop`],[1,`num`],[`id`,`ngrx-dispatch-heading`],[1,`dispatch-form`,3,`submit`],[`required`,``,`spellcheck`,`false`,`autocomplete`,`off`,`list`,`ngrx-action-types`,`placeholder`,`e.g. [Cart] Add Item`,3,`input`,`value`],[`id`,`ngrx-action-types`],[3,`value`],[1,`optional`],[`rows`,`3`,`spellcheck`,`false`,`placeholder`,`e.g. {"id": 7}`,`aria-describedby`,`ngrx-payload-error`,3,`input`,`value`],[`id`,`ngrx-payload-error`,1,`field-error`],[`type`,`submit`,1,`btn`,`primary`,3,`disabled`],[`id`,`store-dispatch-off`,1,`hint`,`small`],[`id`,`ngrx-events-heading`],[1,`intro`],[`appRovingList`,`button.event-item`,`aria-label`,`Dispatched events`,1,`events-list`,3,`rovingWindow`],[`id`,`ngrx-event-detail`,`tabindex`,`-1`,1,`event-detail-focus`],[`type`,`button`,1,`event-item`,3,`click`],[1,`event-type`,`mono`,3,`title`],[1,`event-payload`,3,`title`],[1,`event-time`],[1,`entry`],[`role`,`heading`,1,`entry-heading`,3,`id`],[3,`idPrefix`,`seq`,`diffTruncated`,`loader`],[`role`,`group`,1,`confirm`],[1,`trace`],[3,`file`,`line`],[1,`code`],[1,`mono`],[1,`sub-head`],[`role`,`heading`,1,`sub`],[`type`,`button`,1,`btn`,`copy`],[`type`,`button`,1,`btn`,`copy`,3,`click`],[1,`diff`],[3,`class`],[1,`op`],[1,`path`],[1,`values`],[1,`before`],[1,`after`],[`aria-hidden`,`true`,1,`arrow`],[1,`visually-hidden`],[1,`kv`,`redux-action`],[`tab-action`,``],[`tab-diff`,``],[`role`,`group`,1,`confirm`,3,`keydown.escape`],[3,`id`],[1,`entry-actions`],[`type`,`button`,1,`btn`,3,`disabled`],[`type`,`button`,1,`btn`,`restore`,3,`disabled`],[1,`hint`,`small`,3,`id`],[`type`,`button`,1,`btn`,`restore`,3,`click`,`disabled`],[`aria-hidden`,`true`,1,`spinner`],[`role`,`group`,`aria-label`,`Filter declarations by kind`,1,`kinds`],[`type`,`button`,1,`kind-chip`,3,`click`],[1,`count`],[`type`,`button`,1,`kind-chip`,3,`active`],[1,`nodes`],[1,`node-card`],[1,`chip-text`],[1,`node-header`],[1,`node-label`],[1,`node-meta`],[1,`file`,3,`file`,`line`],[1,`detail`]],template:function(e,t){if(e&1){let e=B();F(0,`p`,12),K(1,` NgRx signal stores and @ngrx/store state from the live page, with every change, plus NGXS, Elf and MiniRx stores. Source declarations lists the stores your files declare. `),I(),F(2,`div`,13)(3,`app-search-field`,14,0),S_(`valueChange`,function(n){return C(e),x_(t.filter,n)||(t.filter=n),w(n)}),I(),A(5,rJ,3,2),F(6,`span`,15),L(7,`span`,16),K(8),I()(),F(9,`section`,17)(10,`div`,18)(11,`h2`,19),K(12,`Live stores`),I(),A(13,iJ,2,1,`span`,20),I(),A(14,aJ,7,0,`div`,21)(15,oJ,3,0,`div`,22)(16,sJ,5,0,`div`,23)(17,dJ,6,2)(18,dY,6,2,`div`,24),F(19,`p`,25),K(20),I()(),A(21,gY,14,8,`section`,26),Eh(22,aX,22,15,`ng-template`,null,1,G_),F(24,`section`,27)(25,`div`,18)(26,`h2`,28),K(27,`Source declarations`),I(),A(28,oX,2,1,`span`,20),I(),A(29,sX,4,0,`div`,29)(30,cX,29,0,`div`,30)(31,pX,11,5),I()}e&2&&(D(3),b_(`value`,t.filter),D(2),j(t.allPages().length>1?5:-1),D(),G(`on`,t.pageConnected()),D(2),J(` `,t.stateLoaded()?t.pageConnected()?`Live`:`No page connected`:`Loading…`,` `),D(5),j(t.liveStores().length?13:-1),D(),j(t.failed()?14:t.stateLoaded()?t.page()?t.liveStores().length?18:17:16:15),D(6),q(t.message()),D(),j(t.hasEvents()?21:-1),D(7),j(t.sourceEntries().length?28:-1),D(),j(t.sourceLoaded()?t.sourceEntries().length===0?30:31:29))},dependencies:[nP,hW,hD,eO,iV,OD,Vv,Cj,EM,GK,dq,kq],styles:[`.page-intro[_ngcontent-%COMP%] { +}`]})},Fq=`redux:`;function Iq(e){let t=e;return!!t&&typeof t.id==`string`&&typeof t.name==`string`&&typeof t.library==`string`}function Lq(e){let t=e?.pages;return!t||typeof t!=`object`||Array.isArray(t)?[]:Object.values(t).filter(e=>{let t=e;return!!t&&typeof t.pageId==`string`&&Array.isArray(t.stores)&&t.stores.every(Iq)&&Array.isArray(t.log)}).sort((e,t)=>t.reportedAt-e.reportedAt)}function Rq(e){return(e?.stores??[]).map(e=>({id:Fq+e.id,label:e.name,kind:`redux`,scope:e.library,redux:e}))}function zq(e,t){if(!e||!t?.startsWith(`redux:`))return[];let n=t.slice(6);return e.log.filter(e=>e.storeId===n).map(e=>({seq:e.seq,source:`redux`,storeId:t,type:e.type,...e.action===void 0?{}:{action:e.action},timestamp:e.timestamp,diff:e.diff,restorable:!1,...e.diffTruncated?{diffTruncated:e.diffTruncated}:{}}))}var Bq=[`eventDetailHeading`],Vq=[`cancelButton`],Hq=[`restoreButton`],Uq=[`resetButton`],Wq=[`resetCancel`],Gq=[`filterInput`],Kq=[`latestButton`],qq=[`logList`],Jq=[`eventsList`],Yq=e=>({kind:`ngrx`,storeId:e}),Xq=e=>({selected:e,headingLevel:5,idPrefix:`ngrx-change`}),Zq=e=>({selected:e,headingLevel:3,idPrefix:`ngrx-event`}),Qq=e=>({selected:e}),$q=(e,t)=>t.id,eJ=(e,t)=>t.entry.seq,tJ=(e,t)=>t.key,nJ=(e,t)=>t.name,rJ=(e,t)=>t.idsKey,iJ=(e,t)=>t.type,aJ=(e,t)=>t.path,oJ=(e,t)=>t.kind,sJ=(e,t)=>t.name+t.file+t.line;function cJ(e,t){if(e&1){let e=B();F(0,`span`,31),K(1,`Page`),I(),F(2,`app-select`,32),H(`valueChange`,function(t){return C(e),w(W().selectPage(t))}),I()}if(e&2){let e=W();D(2),P(`options`,e.pageOptions())(`value`,e.page()?.pageId??null)}}function lJ(e,t){if(e&1&&(F(0,`span`,20),K(1),I()),e&2){let e=W();D(),q(e.liveStores().length)}}function uJ(e,t){if(e&1){let e=B();F(0,`div`,21)(1,`p`,33),K(2,`Could not load the live store state.`),I(),F(3,`p`,34),K(4,`Check that the dev server with Pangular Inspector is still running.`),I(),F(5,`button`,35),H(`click`,function(){return C(e),w(W().retry())}),K(6,`Retry`),I()()}}function dJ(e,t){e&1&&(F(0,`div`,22)(1,`p`,33),K(2,`Loading…`),I()())}function fJ(e,t){e&1&&(F(0,`div`,23)(1,`p`,33),K(2,`No page is reporting store state yet.`),I(),F(3,`p`,34),K(4,` Open the app in a browser. Stores show up here as soon as the page creates them. `),I()())}function pJ(e,t){e&1&&(F(0,`p`,33),K(1,`No signal store instance on this page yet.`),I(),F(2,`p`,34),K(3,` A `),F(4,`code`),K(5,`signalStore`),I(),K(6,` is created the first time something injects it. Navigate to a page that uses the store and it appears here. `),I())}function mJ(e,t){e&1&&(F(0,`p`,33),K(1,`The @ngrx/store Store was not found on this page.`),I(),F(2,`p`,34),K(3,` Check that `),F(4,`code`),K(5,`provideStore()`),I(),K(6,` or `),F(7,`code`),K(8,`StoreModule.forRoot()`),I(),K(9,` is part of the providers of the running app. `),I())}function hJ(e,t){e&1&&(F(0,`p`,33),K(1,`This page has no store.`),I(),F(2,`p`,34),K(3,` Stores from `),F(4,`code`),K(5,`@ngrx/signals`),I(),K(6,` (`),F(7,`code`),K(8,`signalStore`),I(),K(9,`, `),F(10,`code`),K(11,`signalState`),I(),K(12,`) and `),F(13,`code`),K(14,`@ngrx/store`),I(),K(15,` are listed here once the app creates them. NGXS, Elf and MiniRx stores show up through their Redux DevTools integration when the app loads `),F(16,`code`),K(17,`@pangular-inspector/devtools/store-hook`),I(),K(18,` first. `),I())}function gJ(e,t){if(e&1&&(F(0,`app-angular-unavailable`,36),K(1,` The overlay finds stores through the injectors, so stores it can't reach from a component are not listed. `),I(),F(2,`div`,23),A(3,pJ,7,0)(4,mJ,10,0)(5,hJ,19,0),I()),e&2){let e=W();P(`page`,e.angularPage()),D(3),j(e.usesSignals()?3:e.usesClassic()?4:5)}}function _J(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,40),H(`click`,function(){let t=C(e).$implicit;return w(W(2).selectStore(t.id))}),F(2,`span`,41),L(3,`span`,42),F(4,`span`,43),K(5),I()(),F(6,`span`,44),K(7),I()()()}if(e&2){let e=t.$implicit,n=W(2);D(),G(`selected`,e.id===n.store()?.id),k(`aria-pressed`,e.id===n.store()?.id),D(2),Zg(`background`,n.kindColor(e.kind)),D(2),q(e.label),D(2),y_(` `,n.kindLabel(e.kind),` · `,e.scope,` · `,n.countText(e),` `)}}function vJ(e,t){e&1&&(F(0,`li`,38),K(1,`No stores match this filter.`),I())}function yJ(e,t){e&1&&(F(0,`span`,47),K(1),I()),e&2&&(D(),q(t.library))}function bJ(e,t){if(e&1&&(F(0,`span`,47),K(1),I()),e&2){let e=W();D(),J(`scope: `,e.scope)}}function xJ(e,t){e&1&&L(0,`app-source-link`,48),e&2&&P(`file`,t)}function SJ(e,t){if(e&1&&(F(0,`span`,47),K(1),I()),e&2){let e=W();D(),q(e.classic.devtools?`Store DevTools on`:`Store DevTools off`)}}function CJ(e,t){e&1&&(F(0,`span`,47),K(1,`withDevtools: watched only`),I())}function wJ(e,t){e&1&&(F(0,`p`,49),K(1,` This store uses `),F(2,`code`),K(3,`withDevtools()`),I(),K(4,`, so the inspector does not wrap its methods or signals. Changes are logged as `),F(5,`code`),K(6,`patchState`),I(),K(7,` entries, and method calls are not counted. `),I())}function TJ(e,t){if(e&1&&(F(0,`code`),K(1),I(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;D(),q(e),D(),J(``,n===r-1?``:`, `,` `)}}function EJ(e,t){if(e&1&&(F(0,`p`,50),K(1,` Referenced by `),M(2,TJ,3,2,null,null,Xh),I()),e&2){let e=W();D(2),N(e.signal.references)}}function DJ(e,t){if(e&1&&(F(0,`p`,72),K(1),I()),e&2){let e=W(4);D(),q(e.restoreOff)}}function OJ(e,t){if(e&1){let e=B();F(0,`div`,51)(1,`p`)(2,`strong`),K(3,`Viewing a past state.`),I(),K(4,` New actions are logged but do not change the state until you go back to the latest state. `),I(),F(5,`button`,71,3),H(`click`,function(){return C(e),w(W(3).backToLatest())}),K(7,` Back to latest `),I(),A(8,DJ,2,1,`p`,72),I()}if(e&2){let e=W(3);D(5),P(`disabled`,e.busy()||!e.canRestore()),k(`aria-describedby`,e.canRestore()?null:`store-latest-off`),D(3),j(e.canRestore()?-1:8)}}function kJ(e,t){if(e&1&&L(0,`app-store-global`,57),e&2){let e=W(),t=W(2);P(`rpc`,t.rpc())(`pageId`,t.page()?.pageId)(`target`,R_(4,Yq,e.id))(`label`,e.label+` state`)}}function AJ(e,t){if(e&1&&(F(0,`dt`),K(1),I(),F(2,`dd`)(3,`code`,80),K(4),I()()),e&2){let e=t.$implicit;D(),q(e.key),D(2),P(`title`,e.full),D(),q(e.value)}}function jJ(e,t){if(e&1&&(F(0,`dl`,75),M(1,AJ,5,3,null,null,tJ),I()),e&2){let e=W(4);D(),N(e.computedEntries())}}function MJ(e,t){e&1&&(F(0,`p`,76),K(1,`No computed signals.`),I())}function NJ(e,t){e&1&&(F(0,`span`,82),K(1,`signalMethod`),I())}function PJ(e,t){e&1&&(F(0,`span`,82),K(1,`rxMethod`),I())}function FJ(e,t){if(e&1&&(F(0,`li`,81),K(1),A(2,NJ,2,0,`span`,82)(3,PJ,2,0,`span`,82),F(4,`span`,83),K(5),I()()),e&2){let e=t.$implicit,n=W(5);D(),J(` `,e.name,` `),D(),j(e.signalMethod?2:e.rx?3:-1),D(3),y_(``,e.calls,` `,e.calls===1?`call`:`calls`,``,n.methodDuration(e))}}function IJ(e,t){if(e&1&&(F(0,`ul`,78),M(1,FJ,6,5,`li`,81,nJ),I()),e&2){let e=W();D(),N(e.methods)}}function LJ(e,t){e&1&&(F(0,`p`,76),K(1,`No methods.`),I())}function RJ(e,t){if(e&1&&(F(0,`li`,81),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function zJ(e,t){if(e&1&&(F(0,`li`,90),K(1),I()),e&2){let e=W().$implicit;P(`title`,W(5).entityOverflowTitle(e.ids,e.count)),D(),J(` +`,e.count-30,` more `)}}function BJ(e,t){if(e&1&&(F(0,`code`,80),K(1),I()),e&2){let e=W(2).$implicit,t=W(5);P(`title`,t.prettyText(e.selected)),D(),q(t.shortText(e.selected))}}function VJ(e,t){e&1&&(F(0,`span`,76),K(1,`None selected`),I())}function HJ(e,t){if(e&1&&(F(0,`dl`,75)(1,`dt`),K(2,`Selected`),I(),F(3,`dd`),A(4,BJ,2,2,`code`,80)(5,VJ,2,0,`span`,76),I()()),e&2){let e=W().$implicit;D(4),j(e.selected===void 0?5:4)}}function UJ(e,t){if(e&1&&(F(0,`div`,86)(1,`div`,87)(2,`span`,81),K(3),I(),F(4,`span`,88),K(5),I()(),F(6,`ul`,89),M(7,RJ,2,1,`li`,81,Xh),A(9,zJ,2,2,`li`,90),I(),A(10,HJ,6,1,`dl`,75),I()),e&2){let e=t.$implicit,n=W(5);D(3),q(e.collection??`entities`),D(2),Y(``,e.count,` `,e.count===1?`entity`:`entities`),D(),k(`aria-label`,(e.collection??`entities`)+` ids`),D(),N(n.entityIds(e.ids)),D(2),j(e.count>30?9:-1),D(),j(e.selectedId===void 0?-1:10)}}function WJ(e,t){if(e&1&&(F(0,`section`,79)(1,`h4`,84),K(2,`Entities`),I(),F(3,`div`,85),M(4,UJ,11,6,`div`,86,rJ),I()()),e&2){let e=W();D(4),N(e.entities)}}function GJ(e,t){if(e&1&&(F(0,`section`,73)(1,`h4`,74),K(2,`Computed`),I(),A(3,jJ,3,0,`dl`,75)(4,MJ,2,0,`p`,76),F(5,`h4`,77),K(6,`Methods`),I(),A(7,IJ,3,0,`ul`,78)(8,LJ,2,0,`p`,76),I(),A(9,WJ,6,0,`section`,79)),e&2){let e=t,n=W(3);D(3),j(n.computedEntries().length?3:4),D(4),j(e.methods.length?7:8),D(2),j(e.entities?.length?9:-1)}}function KJ(e,t){if(e&1&&K(0),e&2){let e=t;Y(` `,e,` skipped `,e===1?`action is`:`actions are`,` left out of the state. `)}}function qJ(e,t){if(e&1){let e=B();F(0,`div`,95),H(`keydown.escape`,function(t){return C(e),w(W(4).cancelReset(t))}),F(1,`p`,96),K(2,` Reset puts the store back on its initial state and empties the Store DevTools history. Entries logged so far can no longer be restored. `),I(),F(3,`div`,93)(4,`button`,71),H(`click`,function(){return C(e),w(W(4).devtoolsOp({op:`reset`}))}),K(5,` Reset history `),I(),F(6,`button`,35,4),H(`click`,function(){return C(e),w(W(4).cancelReset())}),K(8,` Cancel `),I()()()}if(e&2){let e=W(4);D(4),P(`disabled`,e.busy())}}function JJ(e,t){if(e&1){let e=B();F(0,`div`,93)(1,`button`,97),H(`click`,function(){C(e);let t=W(2);return w(W(2).devtoolsOp({op:`pause`,paused:!t.classic.recordingPaused}))}),K(2),I(),F(3,`button`,97),H(`click`,function(){return C(e),w(W(4).devtoolsOp({op:`jump`,index:0}))}),K(4,` Jump to committed state `),I(),F(5,`button`,97),H(`click`,function(){return C(e),w(W(4).devtoolsOp({op:`commit`}))}),K(6,` Commit `),I(),F(7,`button`,97,5),H(`click`,function(){return C(e),w(W(4).askReset())}),K(9,` Reset… `),I()()}if(e&2){let e=W(2),t=W(2);D(),P(`disabled`,t.busy()||!t.canRestore()),k(`aria-describedby`,t.canRestore()?null:`store-history-off`),D(),J(` `,e.classic.recordingPaused?`Resume recording`:`Pause recording`,` `),D(),P(`disabled`,t.busy()||!t.canRestore()),k(`aria-describedby`,t.canRestore()?null:`store-history-off`),D(2),P(`disabled`,t.busy()||!t.canRestore()),k(`aria-describedby`,t.canRestore()?null:`store-history-off`),D(2),P(`disabled`,t.busy()||!t.canRestore()),k(`aria-describedby`,t.canRestore()?null:`store-history-off`)}}function YJ(e,t){if(e&1&&(F(0,`p`,94),K(1),I()),e&2){let e=W(4);D(),q(e.restoreOff)}}function XJ(e,t){if(e&1&&(F(0,`section`,60)(1,`h4`,91),K(2,`Store DevTools history`),I(),F(3,`p`,49),K(4),A(5,KJ,1,2),I(),A(6,qJ,9,1,`div`,92)(7,JJ,10,9,`div`,93),A(8,YJ,2,1,`p`,94),I()),e&2){let e,t=W(),n=W(2);D(4),J(` `,t.classic.recordingPaused?`Recording is paused: new actions change the state but are not recorded.`:`Recording new actions.`,` `),D(),j((e=t.classic.skipped?.length)?5:-1,e),D(),j(n.confirmReset()?6:7),D(2),j(n.canRestore()?-1:8)}}function ZJ(e,t){if(e&1&&(F(0,`span`,102),K(1),I()),e&2){let e=t;P(`title`,`Caused by `+W(4).kindLabel(`event`)+`: `+e.type),D(),q(e.type)}}function QJ(e,t){e&1&&(F(0,`span`,82),K(1,`skipped`),I())}function $J(e,t){if(e&1&&(F(0,`span`,82),K(1),I()),e&2){W();let e=O_(0);D(),q(e.origin)}}function eY(e,t){if(e&1&&K(0),e&2){W();let e=O_(0);J(` · `,W(3).formatDuration(e.durationMs),` `)}}function tY(e,t){if(e&1){let e=B();E_(0),F(1,`li`)(2,`button`,98),H(`click`,function(){C(e);let t=O_(0);return w(W(3).selectChange(t.seq))}),F(3,`span`,99),K(4),I(),F(5,`span`,100)(6,`span`,101),K(7),I(),A(8,ZJ,2,2,`span`,102),I(),F(9,`span`,103),A(10,QJ,2,0,`span`,82),A(11,$J,2,1,`span`,82),K(12),A(13,eY,1,1),I()()()}if(e&2){let e,n=t.$implicit,r=W(3),i=D_(n.entry);D(),k(`data-vindex`,n.index)(`aria-setsize`,r.logWindow.enabled()?r.storeLog().length:null)(`aria-posinset`,r.logWindow.enabled()?n.index+1:null),D(),G(`selected`,i.seq===r.selectedChangeSeq()),k(`aria-pressed`,i.seq===r.selectedChangeSeq())(`aria-controls`,i.seq===r.selectedChangeSeq()?`ngrx-change-detail`:null),D(2),J(`#`,i.seq),D(2),P(`title`,i.type),D(),q(i.type),D(),j((e=i.causedByEvent)?8:-1,e),D(2),j(r.isSkipped(i.seq)?10:-1),D(),j(i.origin?11:-1),D(),Y(` `,r.changesLabel(i),` · `,r.formatTime(i.timestamp),` `),D(),j(i.durationMs===void 0?-1:13)}}function nY(e,t){e&1&&K(0,` No entries match this filter. `)}function rY(e,t){e&1&&K(0,` No actions dispatched since the page connected. `)}function iY(e,t){e&1&&K(0,` No state changes yet. Method calls and patchState writes that change the state are recorded here. `)}function aY(e,t){if(e&1&&(F(0,`li`,38),A(1,nY,1,0)(2,rY,1,0)(3,iY,1,0),I()),e&2){let e=W(),t=W(2);D(),j(t.filter()?1:e.classic||e.redux?2:3)}}function oY(e,t){if(e&1&&(F(0,`div`,67),dg(1,104),I()),e&2){W(3);let e=Ag(23);D(),P(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,R_(2,Xq,t))}}function sY(e,t){e&1&&(F(0,`span`,110),K(1,`Possible effect loop`),I())}function cY(e,t){if(e&1&&(F(0,`tr`)(1,`th`,109),K(2),A(3,sY,2,0,`span`,110),I(),F(4,`td`,111),K(5),I(),F(6,`td`,111),K(7),I(),F(8,`td`,111),K(9),I(),F(10,`td`,111),K(11),I()()),e&2){let e=t.$implicit,n=W(4);D(2),J(` `,e.type,` `),D(),j(e.loop?3:-1),D(2),q(e.count),D(2),J(` `,e.avgMs===void 0?`n/a`:n.formatDuration(e.avgMs),` `),D(2),J(` `,e.maxMs===void 0?`n/a`:n.formatDuration(e.maxMs),` `),D(2),q(e.burst)}}function lY(e,t){if(e&1&&(F(0,`p`,49),K(1),I()),e&2){let e=W(4);D(),J(` A possible effect loop is an action an NgRx effect dispatched `,e.loopBurst,` or more times within one second. Check the effect that dispatches it for a missing filter or a dispatch of its own trigger. `)}}function uY(e,t){if(e&1&&(F(0,`div`,68)(1,`h4`,105),K(2,`Action frequency`),I(),F(3,`p`,49),K(4),I(),F(5,`div`,106)(6,`table`)(7,`thead`)(8,`tr`)(9,`th`,107),K(10),I(),F(11,`th`,108),K(12,`Count`),I(),F(13,`th`,108),K(14,`Avg`),I(),F(15,`th`,108),K(16,`Longest`),I(),F(17,`th`,108),K(18,`Peak per second`),I()()(),F(19,`tbody`),M(20,cY,12,6,`tr`,null,iJ),I()()(),A(22,lY,2,1,`p`,49),I()),e&2){let e=W(),t=W(2);D(4),J(` How often each `,e.classic?`action`:`change`,` ran since the page loaded, including entries the log no longer keeps. `),D(6),q(e.classic?`Action`:`Method or write`),D(10),N(t.storeStats()),D(2),j(t.hasLoop()?22:-1)}}function dY(e,t){if(e&1&&L(0,`app-store-session`,69),e&2){let e=W(),t=W(2);P(`rpc`,t.rpc())(`pageId`,t.page()?.pageId??null)(`storeId`,e.id)(`entries`,t.sessionEntries())}}function fY(e,t){if(e&1&&L(0,`option`,116),e&2){let e=t.$implicit;P(`value`,e)}}function pY(e,t){if(e&1&&(F(0,`p`,121),K(1),I()),e&2){let e=W(4);D(),q(e.restoreOff)}}function mY(e,t){if(e&1){let e=B();F(0,`section`,70)(1,`h4`,112),K(2,`Dispatch an action`),I(),F(3,`form`,113),H(`submit`,function(t){return C(e),w(W(3).dispatchAction(t))}),F(4,`label`)(5,`span`),K(6,`Type`),I(),F(7,`input`,114),H(`input`,function(t){return C(e),w(W(3).dispatchType.set(t.target.value))}),I()(),F(8,`datalist`,115),M(9,fY,1,1,`option`,116,Xh),I(),F(11,`label`)(12,`span`),K(13,`Payload `),F(14,`span`,117),K(15,`(JSON object, optional)`),I()(),F(16,`textarea`,118),H(`input`,function(t){return C(e),w(W(3).dispatchPayload.set(t.target.value))}),I()(),F(17,`p`,119),K(18),I(),F(19,`div`,93)(20,`button`,120),K(21,` Dispatch `),I()(),A(22,pY,2,1,`p`,121),I()()}if(e&2){let e=W(3);D(7),P(`value`,e.dispatchType()),D(2),N(e.actionTypes()),D(7),P(`value`,e.dispatchPayload()),k(`aria-invalid`,e.payloadError()?`true`:null),D(2),q(e.payloadError()),D(2),P(`disabled`,e.busy()||!e.canRestore()||!e.dispatchRequest()),k(`aria-describedby`,e.canRestore()?null:`store-dispatch-off`),D(2),j(e.canRestore()?-1:22)}}function hY(e,t){if(e&1){let e=B();F(0,`div`,39)(1,`div`,45)(2,`h3`),K(3),I(),F(4,`div`,46)(5,`span`,47),K(6),I(),A(7,yJ,2,1,`span`,47)(8,bJ,2,1,`span`,47),A(9,xJ,1,1,`app-source-link`,48),A(10,SJ,2,1,`span`,47),A(11,CJ,2,0,`span`,47),I(),A(12,wJ,8,0,`p`,49),A(13,EJ,4,0,`p`,50),I(),A(14,OJ,9,3,`div`,51),F(15,`div`,52)(16,`section`,53)(17,`div`,54)(18,`h4`,55),K(19,`State`),I(),F(20,`div`,56),A(21,kJ,1,6,`app-store-global`,57),F(22,`button`,58),H(`click`,function(){return C(e),w(W(2).copyState())}),K(23,` Copy `),I()()(),F(24,`app-state-tree`,59),H(`copied`,function(t){return C(e),w(W(2).copyPath(t))}),I()(),A(25,GJ,10,3),I(),A(26,XJ,9,4,`section`,60),F(27,`section`,61)(28,`h4`,62),K(29),F(30,`span`,20),K(31),I()(),L(32,`app-limit-note`,63),F(33,`div`,64)(34,`ul`,65,2),M(36,tY,14,17,`li`,null,eJ,!1,aY,4,1,`li`,38),I(),F(39,`app-splitter`,66),w_(`sizeChange`,function(t){C(e);let n=W(2);return C_(n.logListSize,t)||(n.logListSize=t),w(t)}),I(),A(40,oY,2,4,`div`,67),I()(),A(41,uY,23,3,`div`,68),A(42,dY,1,4,`app-store-session`,69),A(43,mY,23,7,`section`,70),I()}if(e&2){let e,n,r,i,a=t,o=W(2);D(3),q(a.label),D(3),q(o.kindLabel(a.kind)),D(),j((e=a.redux)?7:8,e),D(2),j((n=a.signal?.declaredIn)?9:-1,n),D(),j(a.classic?10:-1),D(),j(a.signal?.watchOnly?11:-1),D(),j(a.signal?.watchOnly?12:-1),D(),j(a.signal?.references?.length?13:-1),D(),j(a.classic?.paused?14:-1),D(7),j(a.redux?-1:21),D(3),P(`value`,o.stateValue())(`changed`,o.changedPaths())(`label`,a.label+` state`),D(),j((r=a.signal)?25:-1,r),D(),j(a.classic?.devtools?26:-1),D(3),J(` `,a.classic||a.redux?`Action log`:`Change log`,` `),D(2),q(o.storeLog().length),D(),P(`dropped`,(a.redux?o.reduxPage()?.dropped:o.page()?.dropped)??0)(`max`,o.maxLog()),D(),Zg(`--%NS%log-list-size`,o.logListSize(),`px`),D(),Zg(`padding-top`,o.logWindow.enabled()?2+o.logWindow.padTop():null,`px`)(`padding-bottom`,o.logWindow.enabled()?2+o.logWindow.padBottom():null,`px`),P(`rovingWindow`,o.logWindow),k(`aria-label`,a.classic||a.redux?`Actions`:`Changes`),D(2),N(o.shownLog()),D(3),P(`min`,200)(`max`,640)(`defaultSize`,300),S_(`size`,o.logListSize),D(),j((i=o.changeEntry())?40:-1,i),D(),j(o.storeStats().length?41:-1),D(),j(a.redux?-1:42),D(),j(a.classic?43:-1)}}function gY(e,t){if(e&1&&(F(0,`div`,24)(1,`ul`,37),M(2,_J,8,9,`li`,null,$q,!1,vJ,2,0,`li`,38),I(),A(5,hY,44,36,`div`,39),I()),e&2){let e,t=W();D(2),N(t.filteredStores()),D(3),j((e=t.store())?5:-1,e)}}function _Y(e,t){if(e&1&&(F(0,`code`,128),K(1),I()),e&2){W();let e=O_(0),t=W(2);P(`title`,t.prettyText(e.payload)),D(),q(t.shortText(e.payload))}}function vY(e,t){if(e&1){let e=B();E_(0),F(1,`li`)(2,`button`,126),H(`click`,function(){C(e);let t=O_(0);return w(W(2).selectEvent(t.seq))}),L(3,`span`,42),F(4,`span`,127),K(5),I(),A(6,_Y,2,2,`code`,128),F(7,`span`,129),K(8),I()()()}if(e&2){let e=t.$implicit,n=W(2),r=D_(e.entry);D(),k(`data-vindex`,e.index)(`aria-setsize`,n.eventWindow.enabled()?n.pageEvents().length:null)(`aria-posinset`,n.eventWindow.enabled()?e.index+1:null),D(),G(`selected`,r.seq===n.selectedEventSeq()),k(`aria-pressed`,r.seq===n.selectedEventSeq())(`aria-controls`,r.seq===n.selectedEventSeq()?`ngrx-event-detail`:null),D(),Zg(`background`,n.kindColor(`event`)),D(),P(`title`,r.eventType??r.type),D(),q(r.eventType??r.type),D(),j(r.payload===void 0?-1:6),D(2),q(n.formatTime(r.timestamp))}}function yY(e,t){e&1&&(F(0,`li`,38),K(1,`No events match this filter.`),I())}function bY(e,t){if(e&1&&(F(0,`div`,125,7),dg(2,104),I()),e&2){W(2);let e=Ag(23);D(2),P(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,R_(2,Zq,t))}}function xY(e,t){if(e&1&&(F(0,`section`,26)(1,`div`,18)(2,`h2`,122),K(3,`Events`),I(),F(4,`span`,20),K(5),I()(),F(6,`p`,123),K(7,` Events dispatched through @ngrx/signals/events, across every store on this page. `),I(),F(8,`ul`,124,6),M(10,vY,9,14,`li`,null,eJ,!1,yY,2,0,`li`,38),I(),A(13,bY,3,4,`div`,125),I()),e&2){let e,t=W();D(5),q(t.pageEvents().length),D(3),Zg(`padding-top`,t.eventWindow.enabled()?6+t.eventWindow.padTop():null,`px`)(`padding-bottom`,t.eventWindow.enabled()?6+t.eventWindow.padBottom():null,`px`),P(`rovingWindow`,t.eventWindow),D(2),N(t.shownEvents()),D(3),j((e=t.eventEntry())?13:-1,e)}}function SY(e,t){if(e&1&&(F(0,`dt`),K(1,`Origin`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().selected,t=W();D(3),q(t.originText(e.origin))}}function CY(e,t){if(e&1&&(F(0,`dt`),K(1,`Duration`),I(),F(2,`dd`),K(3),I()),e&2){let e=W().selected,t=W();D(3),q(t.formatDuration(e.durationMs))}}function wY(e,t){if(e&1&&(F(0,`app-source-link`,135),K(1),I()),e&2){let e=W().$implicit;P(`file`,e.file)(`line`,e.line),D(),y_(``,e.name?e.name+` `:``,`(`,e.file,`:`,e.line,`)`)}}function TY(e,t){if(e&1&&(F(0,`code`),K(1),I()),e&2){let e=W().$implicit;D(),q(e.name)}}function EY(e,t){if(e&1&&(F(0,`li`),A(1,wY,2,5,`app-source-link`,135)(2,TY,2,1,`code`),I()),e&2){let e=t.$implicit;D(),j(e.file?1:2)}}function DY(e,t){if(e&1&&(F(0,`dt`),K(1,`Called from`),I(),F(2,`dd`)(3,`ol`,134),M(4,EY,3,1,`li`,null,Yh),I()()),e&2){let e=W().selected,t=W();D(4),N(t.traceFrames(e.trace))}}function OY(e,t){if(e&1&&dg(0,104),e&2){let e=W().selected;P(`ngTemplateOutlet`,Ag(13))(`ngTemplateOutletContext`,R_(2,Qq,e))}}function kY(e,t){if(e&1&&(F(0,`dt`),K(1,`Action`),I(),F(2,`dd`)(3,`pre`,136),K(4),I()()),e&2){let e=W().selected,t=W(2);D(4),q(t.prettyText(e.action))}}function AY(e,t){if(e&1&&(F(0,`dt`),K(1,`Arguments`),I(),F(2,`dd`)(3,`pre`,136),K(4),I()()),e&2){let e=W().selected,t=W(2);D(4),q(t.prettyText(e.args))}}function jY(e,t){if(e&1&&(F(0,`dt`),K(1,`Payload`),I(),F(2,`dd`)(3,`pre`,136),K(4),I()()),e&2){let e=W().selected,t=W(2);D(4),q(t.prettyText(e.payload))}}function MY(e,t){if(e&1&&(F(0,`pre`,136),K(1),I()),e&2){let e=W(),t=W(3);D(),q(t.prettyText(e.payload))}}function NY(e,t){if(e&1&&(F(0,`dt`),K(1,`Caused by event`),I(),F(2,`dd`)(3,`code`,137),K(4),I(),A(5,MY,2,1,`pre`,136),I()),e&2){let e=t;D(4),q(e.type),D(),j(e.payload===void 0?-1:5)}}function PY(e,t){if(e&1&&(A(0,kY,5,1),A(1,AY,5,1),A(2,jY,5,1),A(3,NY,6,2)),e&2){let e,n=t.selected;j(n.action===void 0?-1:0),D(),j(n.args?.length?1:-1),D(),j(n.source===`event`&&n.payload!==void 0?2:-1),D(),j((e=n.causedByEvent)?3:-1,e)}}function FY(e,t){if(e&1){let e=B();F(0,`button`,141),H(`click`,function(){C(e);let t=W().selected;return w(W(2).copyDiff(t))}),K(1,` Copy `),I()}if(e&2){let e=W().selected;k(`aria-label`,`Copy the state diff of #`+e.seq)}}function IY(e,t){if(e&1&&(F(0,`code`,147),K(1),I()),e&2){let e=W().$implicit,t=W(4);D(),q(t.shortText(e.before))}}function LY(e,t){e&1&&(F(0,`span`,149),K(1,`→`),I(),F(2,`span`,150),K(3,`became`),I())}function RY(e,t){if(e&1&&(F(0,`code`,148),K(1),I()),e&2){let e=W().$implicit,t=W(4);D(),q(t.shortText(e.after))}}function zY(e,t){if(e&1&&(F(0,`li`)(1,`span`,144),K(2),I(),F(3,`code`,145),K(4),I(),F(5,`span`,146),A(6,IY,2,1,`code`,147),A(7,LY,4,0),A(8,RY,2,1,`code`,148),I()()),e&2){let e=t.$implicit,n=W(4);Qg(`diff-row `+e.op),D(2),q(n.opLabel(e.op)),D(2),q(e.path),D(2),j(e.op===`add`?-1:6),D(),j(e.op===`change`?7:-1),D(),j(e.op===`remove`?-1:8)}}function BY(e,t){if(e&1&&(F(0,`p`,76),K(1),I()),e&2){let e=W(2).selected,t=W(2);D(),q(t.moreChanges(e.diffTruncated))}}function VY(e,t){if(e&1&&(F(0,`ul`,142),M(1,zY,9,7,`li`,143,aJ),I(),A(3,BY,2,1,`p`,76)),e&2){let e=W().selected;D(),N(e.diff),D(2),j(e.diffTruncated?3:-1)}}function HY(e,t){e&1&&(F(0,`p`,76),K(1,`The state did not change.`),I())}function UY(e,t){if(e&1&&(F(0,`div`,138)(1,`div`,139),K(2,`State diff`),I(),A(3,FY,2,1,`button`,140),I(),A(4,VY,4,1)(5,HY,2,0,`p`,76)),e&2){let e=t.selected,n=W().headingLevel;D(),k(`aria-level`,n+1),D(2),j(e.diff.length?3:-1),D(),j(e.diff.length?4:5)}}function WY(e,t){if(e&1&&(F(0,`dl`,151),dg(1,104),I()),e&2){let e=W(2).selected,t=Ag(13);D(),P(`ngTemplateOutlet`,t)(`ngTemplateOutletContext`,R_(2,Qq,e))}}function GY(e,t){if(e&1&&(A(0,WY,2,4,`dl`,151),dg(1,104)),e&2){let e=W().selected,t=Ag(15);j(e.action===void 0?-1:0),D(),P(`ngTemplateOutlet`,t)(`ngTemplateOutletContext`,R_(3,Qq,e))}}function KY(e,t){if(e&1&&(F(0,`dl`,75),dg(1,104),I()),e&2){let e=W(2).selected,t=Ag(13);D(),P(`ngTemplateOutlet`,t)(`ngTemplateOutletContext`,R_(2,Qq,e))}}function qY(e,t){e&1&&(F(0,`p`,76),K(1,` No action or arguments: a restore, or a patchState write outside a method. `),I())}function JY(e,t){if(e&1&&(F(0,`app-entry-tabs`,132)(1,`div`,152),A(2,KY,2,4,`dl`,75)(3,qY,2,0,`p`,76),I(),F(4,`div`,153),dg(5,104),I()()),e&2){let e=W(),t=e.selected,n=e.idPrefix,r=Ag(15),i=W();P(`idPrefix`,n+`-`+t.seq)(`seq`,t.seq)(`diffTruncated`,t.diffTruncated)(`loader`,i.loadEntry),D(2),j(t.action!==void 0||t.args?.length||t.causedByEvent?2:3),D(3),P(`ngTemplateOutlet`,r)(`ngTemplateOutletContext`,R_(7,Qq,t))}}function YY(e,t){if(e&1&&K(0),e&2){let e=W(2).selected;J(` Store DevTools jumps the app state to the state right after action #`,e.seq,`. Until you go back to the latest state, new actions are logged but do not change the state. `)}}function XY(e,t){if(e&1&&K(0),e&2){let e=W(3).selected;Y(` This sets every state key of `,t.label,` back to its value right after change #`,e.seq,`. Components that read the store update at once, and a new "Restore" entry is added to the log. `)}}function ZY(e,t){if(e&1&&K(0),e&2){let e=W(3).selected;J(` This sets every state key of the store back to its value right after change #`,e.seq,`. Components that read the store update at once, and a new "Restore" entry is added to the log. `)}}function QY(e,t){if(e&1&&A(0,XY,1,2)(1,ZY,1,1),e&2){let e;j((e=W(3).store())?0:1,e)}}function $Y(e,t){if(e&1){let e=B();F(0,`div`,154),H(`keydown.escape`,function(t){return C(e),w(W(2).cancelRestore(t))}),F(1,`p`,155),A(2,YY,1,1)(3,QY,2,1),I(),F(4,`div`,93)(5,`button`,71),H(`click`,function(){C(e);let t=W().selected;return w(W().restore(t.seq,t.source===`store`))}),K(6,` Restore `),I(),F(7,`button`,35,10),H(`click`,function(){return C(e),w(W(2).cancelRestore())}),K(9,` Cancel `),I()()()}if(e&2){let e=W(),t=e.selected,n=e.idPrefix,r=W();k(`aria-labelledby`,n+`-confirm-text`),D(),P(`id`,n+`-confirm-text`),D(),j(t.source===`store`?2:3),D(3),P(`disabled`,r.busy())}}function eX(e,t){if(e&1){let e=B();F(0,`button`,97),H(`click`,function(){C(e);let t=W(2).selected;return w(W().devtoolsOp({op:`toggle`,seq:t.seq}))}),K(1),I()}if(e&2){let e=W(2),t=e.selected,n=e.idPrefix,r=W();P(`disabled`,r.busy()||!r.canRestore()),k(`aria-describedby`,r.canRestore()?null:n+`-writes-off`),D(),J(` `,r.isSkipped(t.seq)?`Include this action`:`Skip this action`,` `)}}function tX(e,t){if(e&1){let e=B();F(0,`button`,160,11),H(`click`,function(){C(e);let t=W(2).selected;return w(W().askRestore(t.seq))}),K(2,` Restore this state `),I()}if(e&2){let e=W(2).idPrefix,t=W();P(`disabled`,!t.canRestore()),k(`aria-describedby`,t.canRestore()?null:e+`-writes-off`)}}function nX(e,t){if(e&1){let e=B();F(0,`button`,97),H(`click`,function(){C(e);let t=W(2).selected;return w(W().dispatchAgain(t.seq))}),K(1,` Dispatch again `),I()}if(e&2){let e=W(2).idPrefix,t=W();P(`disabled`,t.busy()||!t.canRestore()),k(`aria-describedby`,t.canRestore()?null:e+`-writes-off`)}}function rX(e,t){if(e&1&&(F(0,`p`,159),K(1),I()),e&2){let e=W(2).idPrefix,t=W();P(`id`,e+`-writes-off`),D(),q(t.restoreOff)}}function iX(e,t){if(e&1&&(F(0,`div`,156),A(1,eX,2,3,`button`,157),A(2,tX,3,2,`button`,158),A(3,nX,2,2,`button`,157),I(),A(4,rX,2,2,`p`,159)),e&2){let e=W().selected,t=W();D(),j(t.canToggle(e)?1:-1),D(),j(e.restorable?2:-1),D(),j(t.canAgain(e)?3:-1),D(),j(t.canRestore()?-1:4)}}function aX(e,t){e&1&&(F(0,`p`,49),K(1,` This store reports through its Redux DevTools integration, which the panel reads but does not write to, so its state cannot be restored from here. `),I())}function oX(e,t){e&1&&(K(0,` Store DevTools no longer holds this action, so this state cannot be restored. It was dropped past `),F(1,`code`),K(2,`maxAge`),I(),K(3,`, or the Store DevTools history was committed, reset or imported. `))}function sX(e,t){e&1&&(K(0,` Store DevTools never recorded this action, so this state cannot be restored. An `),F(1,`code`),K(2,`actionsBlocklist`),I(),K(3,`, `),F(4,`code`),K(5,`actionsSafelist`),I(),K(6,` or `),F(7,`code`),K(8,`predicate`),I(),K(9,` option filtered it out, or recording was paused. `))}function cX(e,t){e&1&&(K(0,` Time travel for @ngrx/store needs `),F(1,`code`),K(2,`provideStoreDevtools()`),I(),K(3,`. Without it, entries cannot be restored. `))}function lX(e,t){if(e&1&&(F(0,`p`,49),A(1,oX,4,0)(2,sX,10,0)(3,cX,4,0),I()),e&2){let e=W().selected;D(),j(e.unrestorable===`dropped`?1:e.unrestorable===`not-recorded`?2:3)}}function uX(e,t){if(e&1&&(F(0,`section`,130)(1,`div`,131),K(2),I(),F(3,`dl`,75)(4,`dt`),K(5,`Time`),I(),F(6,`dd`),K(7),I(),A(8,SY,4,1),A(9,CY,4,1),A(10,DY,6,0),A(11,OY,1,4,`ng-container`,104),I(),Dh(12,PY,4,4,`ng-template`,null,8,q_)(14,UY,6,3,`ng-template`,null,9,q_),A(16,GY,2,5)(17,JY,6,9,`app-entry-tabs`,132),A(18,$Y,10,4,`div`,133),A(19,iX,5,4),A(20,aX,2,0,`p`,49),A(21,lX,4,1,`p`,49),I()),e&2){let e=t.selected,n=t.headingLevel,r=t.idPrefix,i=W();k(`aria-labelledby`,r+`-entry-heading`),D(),P(`id`,r+`-entry-heading`),k(`aria-level`,n),D(),Y(` #`,e.seq,` `,e.type,` `),D(5),q(i.formatTime(e.timestamp)),D(),j(e.origin?8:-1),D(),j(e.durationMs===void 0?-1:9),D(),j(e.trace?.length?10:-1),D(),j(e.source===`event`?11:-1),D(5),j(e.source===`redux`?16:e.source===`event`?-1:17),D(2),j(e.restorable&&i.confirmSeq()===e.seq?18:-1),D(),j(i.confirmSeq()!==e.seq&&(e.restorable||i.canAgain(e)||i.canToggle(e))?19:-1),D(),j(e.source===`redux`?20:-1),D(),j(!e.restorable&&e.source===`store`?21:-1)}}function dX(e,t){if(e&1&&(F(0,`span`,20),K(1),I()),e&2){let e=W();D(),q(e.sourceEntries().length)}}function fX(e,t){e&1&&(F(0,`div`,29),L(1,`span`,161),F(2,`p`,33),K(3,`Scanning source for NgRx declarations…`),I()())}function pX(e,t){e&1&&(F(0,`div`,30)(1,`p`,33),K(2,`No NgRx declarations found in source.`),I(),F(3,`p`,34),K(4,` The scan looks for `),F(5,`code`),K(6,`signalStore`),I(),K(7,`, `),F(8,`code`),K(9,`signalState`),I(),K(10,`, `),F(11,`code`),K(12,`signalMethod`),I(),K(13,`, `),F(14,`code`),K(15,`createAction`),I(),K(16,`, `),F(17,`code`),K(18,`createReducer`),I(),K(19,`, `),F(20,`code`),K(21,`createEffect`),I(),K(22,`, `),F(23,`code`),K(24,`createSelector`),I(),K(25,` and `),F(26,`code`),K(27,`createFeature`),I(),K(28,`. `),I()())}function mX(e,t){if(e&1){let e=B();F(0,`button`,163),H(`click`,function(){let t=C(e).$implicit,n=W(2);return w(n.kind.set(n.kind()===t.kind?null:t.kind))}),L(1,`span`,42),F(2,`span`,168),K(3),I(),F(4,`span`,164),K(5),I()()}if(e&2){let e=t.$implicit,n=W(2);G(`active`,n.kind()===e.kind),k(`aria-pressed`,n.kind()===e.kind),D(),Zg(`background`,n.kindColor(e.kind)),D(2),q(n.kindLabel(e.kind)),D(2),q(e.count)}}function hX(e,t){if(e&1&&(F(0,`p`,173),K(1),I()),e&2){let e=W().$implicit;D(),q(e.detail)}}function gX(e,t){if(e&1&&(F(0,`li`,167)(1,`div`,169),L(2,`span`,42),F(3,`span`,170),K(4),I(),F(5,`span`,47),K(6),I()(),F(7,`div`,171),L(8,`app-source-link`,172),I(),A(9,hX,2,1,`p`,173),I()),e&2){let e=t.$implicit,n=W(2);D(2),Zg(`background`,n.kindColor(e.kind)),D(2),q(e.name),D(2),q(n.kindLabel(e.kind)),D(2),P(`file`,e.file)(`line`,e.line),D(),j(e.detail?9:-1)}}function _X(e,t){if(e&1){let e=B();F(0,`li`)(1,`div`,29)(2,`p`,33),K(3,`No declarations match.`),I(),F(4,`button`,35),H(`click`,function(){return C(e),w(W(2).clearFilters())}),K(5,`Clear filters`),I()()()}}function vX(e,t){if(e&1){let e=B();F(0,`div`,162)(1,`button`,163),H(`click`,function(){return C(e),w(W().kind.set(null))}),K(2,` All `),F(3,`span`,164),K(4),I()(),M(5,mX,6,7,`button`,165,oJ),I(),F(7,`ul`,166),M(8,gX,10,7,`li`,167,sJ,!1,_X,6,0,`li`),I()}if(e&2){let e=W();D(),G(`active`,!e.kind()),k(`aria-pressed`,!e.kind()),D(3),q(e.sourceEntries().length),D(),N(e.groupedEntries()),D(3),N(e.filteredEntries())}}var yX={action:`#f59e0b`,reducer:`#a78bfa`,effect:`#fb923c`,selector:`#60a5fa`,feature:`#34d399`,"store-setup":`#94a3b8`,"signal-store":`#e879f9`,"signal-state":`#22d3ee`,"signal-method":`#fb7185`,store:`#a78bfa`,event:`var(--warn)`,redux:`#38bdf8`},bX={"signal-store":`signalStore`,"signal-state":`signalState`,"signal-method":`signalMethod`,"store-setup":`store setup`,store:`@ngrx/store`,event:`event`,redux:`Redux DevTools`},xX={dispatch:`store.dispatch(action)`,effect:`NgRx effect (Store.next)`,reactive:`store.dispatch(() => action)`};function SX(e){if(!e.trim())return{};let t;try{t=JSON.parse(e)}catch{return{error:`The payload is not valid JSON.`}}return!t||typeof t!=`object`||Array.isArray(t)?{error:`The payload must be a JSON object, like {"id": 7}.`}:Object.prototype.hasOwnProperty.call(t,`type`)?{error:`The payload cannot have a "type" key. Put the action type in the Type field.`}:{payload:t}}var CX=new Set([`action`,`reducer`,`effect`,`selector`,`feature`,`store-setup`]),wX=class e{rpc=$(null);canRestore=X(()=>IT(this.rpc(),`ngrx`));restoreOff=Uw(`ngrx`);filter=E(``);logListSize=E(vW(`store-log`,300));kind=E(null);sourceEntries=E([]);sourceLoaded=E(!1);pages=E([]);reduxPages=E([]);allPages=X(()=>{let e=this.pages(),t=new Set(e.map(e=>e.pageId)),n=this.reduxPages().filter(e=>!t.has(e.pageId)).map(e=>({pageId:e.pageId,url:e.url,title:e.title,stores:[],classic:null,log:[],reportedAt:e.reportedAt}));return[...e,...n]});failed=E(!1);stateLoaded=E(!1);selectedPageId=E(null);hostPageId=fT();angularPages=uD(()=>this.rpc());angularPage=X(()=>dD(this.angularPages(),this.page()?.pageId??this.hostPageId));maxLog=X(()=>NT(this.rpc()).limits.changeLog);selectedStoreId=E(null);focusEventSeq=E(null);eventDetailHeading=sv(`eventDetailHeading`);busy=E(!1);focusLatest=E(!1);focusConfirm=E(null);cancelButton=sv(`cancelButton`);restoreButton=sv(`restoreButton`);stateTree=sv(Pq);resetButton=sv(`resetButton`);resetCancel=sv(`resetCancel`);confirmReset=Q({source:()=>this.store()?.id,computation:()=>!1});focusReset=E(null);loopBurst=20;filterInput=sv(`filterInput`);latestButton=sv(`latestButton`);message=E(``);destroyRef=S(vs);unsubscribe=null;unsubscribeOthers=null;page=X(()=>{let e=this.allPages();return e.find(e=>e.pageId===this.selectedPageId())??e.find(e=>e.pageId===this.hostPageId)??e[0]??null});pageConnected=X(()=>!!this.page()||!!this.angularPage());reduxPage=X(()=>this.reduxPages().find(e=>e.pageId===this.page()?.pageId)??null);logKey=X(()=>{let e=this.page(),t=this.store();return t?.redux?{pageId:`${e?.pageId}/${t.id}`,log:zq(this.reduxPage(),t.id)}:{pageId:e?.pageId??null,log:e?.log??[]}});logSession=Q({source:this.logKey,computation:(e,t)=>t?CK(t.source,e)?t.value:t.value+1:0});selectedChangeSeq=Q({source:this.logSession,computation:()=>null});selectedEventSeq=Q({source:this.logSession,computation:()=>null});confirmSeq=Q({source:this.logSession,computation:()=>null});pageOptions=X(()=>this.allPages().map(e=>({value:e.pageId,label:e.title||e.url,hint:e.url})));liveStores=X(()=>{let e=this.page();if(!e)return[];let t=e.stores.map(e=>({id:e.id,label:e.name??e.references[0]??e.className,kind:e.kind,scope:e.scope,signal:e}));return e.classic&&t.push({id:`store`,label:`Store`,kind:`store`,scope:e.classic.scope,classic:e.classic}),t.push(...Rq(this.reduxPage())),t});filteredStores=X(()=>{let e=this.filter().trim().toLowerCase();return e?this.liveStores().filter(t=>t.label.toLowerCase().includes(e)||t.kind.includes(e)||(t.signal?.stateKeys??[]).some(t=>t.toLowerCase().includes(e))||this.logOf(t).some(t=>t.type.toLowerCase().includes(e))):this.liveStores()});store=X(()=>{let e=this.liveStores();return e.find(e=>e.id===this.selectedStoreId())??e[0]??null});stateText=X(()=>{let e=this.store();return e?OK(e.signal?e.signal.state:e.redux?e.redux.state:e.classic?.state):``});stateValue=X(()=>{let e=this.store();if(e)return e.signal?e.signal.state:e.redux?e.redux.state:e.classic?.state});changedPaths=X(()=>{let e=this.store(),t=e?this.logOf(e):[],n;for(let e=t.length-1;e>=0&&!n;e--)t[e].diff.length&&(n=t[e]);return(n?.diff??[]).map(e=>e.path)});storeStats=X(()=>{let e=this.store();if(!e||e.redux)return[];let t=this.page()?.stats;return Array.isArray(t)?t.filter(t=>t.storeId===e.id):[]});hasLoop=X(()=>this.storeStats().some(e=>e.loop));skippedSeqs=X(()=>new Set(Array.isArray(this.page()?.classic?.skipped)?this.page().classic.skipped:[]));computedEntries=X(()=>Object.entries(this.store()?.signal?.computed??{}).map(([e,t])=>({key:e,value:kK(t,160),full:OK(t)})));storeLog=X(()=>{let e=this.store(),t=this.filter().trim().toLowerCase();return(e?this.logOf(e):[]).filter(e=>!t||e.type.toLowerCase().includes(t)||this.storeMatches(t)).reverse()});sessionEntries=X(()=>{let e=this.store();return!e||e.redux?[]:(this.page()?.log??[]).filter(t=>t.storeId===e.id&&t.source!==`event`)});loadEntry=async e=>{let t=this.page()?.pageId;return t?await _T(this.rpc(),`request-ngrx-history`,{pageId:t,request:{type:`entry`,seq:e}})??{error:`The devtools server is not connected.`}:{error:`No live page to read from.`}};logOf(e){return e.redux?zq(this.reduxPage(),e.id):(this.page()?.log??[]).filter(t=>t.storeId===e.id)}hasEvents=X(()=>(this.page()?.log??[]).some(e=>e.source===`event`));pageEvents=X(()=>{let e=this.filter().trim().toLowerCase();return(this.page()?.log??[]).filter(t=>t.source===`event`&&(!e||t.type.toLowerCase().includes(e))).slice().reverse()});logWindow=new HN({count:X(()=>this.storeLog().length),estimate:56});shownLog=X(()=>TX(this.storeLog(),this.logWindow));eventWindow=new HN({count:X(()=>this.pageEvents().length),estimate:36});shownEvents=X(()=>TX(this.pageEvents(),this.eventWindow));logList=sv(`logList`);eventsList=sv(`eventsList`);changeEntry=X(()=>{let e=this.selectedChangeSeq();return e===null?null:this.storeLog().find(t=>t.seq===e)??null});eventEntry=X(()=>{let e=this.selectedEventSeq();return e===null?null:this.pageEvents().find(t=>t.seq===e)??null});dispatchType=E(``);dispatchPayload=E(``);actionTypes=X(()=>{let e=new Set;for(let t of this.sourceEntries())for(let n of t.types??[])e.add(n);for(let t of this.page()?.log??[])t.source===`store`&&t.action!==void 0&&e.add(t.type);return[...e].sort().slice(0,200)});payloadError=X(()=>SX(this.dispatchPayload()).error??``);dispatchRequest=X(()=>{let e=this.dispatchType().trim(),{payload:t,error:n}=SX(this.dispatchPayload());return!e||n?null:{type:`dispatch`,action:e,...t?{payload:t}:{}}});usesSignals=X(()=>this.sourceEntries().some(e=>e.kind===`signal-store`||e.kind===`signal-state`));usesClassic=X(()=>this.sourceEntries().some(e=>CX.has(e.kind)));filteredEntries=X(()=>{let e=this.filter().trim().toLowerCase(),t=this.kind();return this.sourceEntries().filter(n=>(!t||n.kind===t)&&(!e||n.name.toLowerCase().includes(e)||n.kind.includes(e)||(n.detail??``).toLowerCase().includes(e)))});groupedEntries=X(()=>{let e=new Map;for(let t of this.sourceEntries())e.set(t.kind,(e.get(t.kind)??0)+1);return[...e.entries()].map(([e,t])=>({kind:e,count:t}))});constructor(){ac(()=>{let e=this.logList()?.nativeElement;e&&this.logWindow.attach(e)}),ac(()=>{let e=this.eventsList()?.nativeElement;e&&this.eventWindow.attach(e)}),ac(()=>{let e=this.rpc();e&&this.load(e)}),mv(()=>{let e=this.latestButton();e&&this.focusLatest()&&!this.busy()&&(this.focusLatest.set(!1),e.nativeElement.focus())}),ac(()=>{let e=this.focusConfirm(),t=e===`cancel`?this.cancelButton():this.restoreButton();e&&t&&(this.focusConfirm.set(null),t.nativeElement.focus())}),mv(()=>{let e=this.focusReset(),t=e===`cancel`?this.resetCancel():this.resetButton();e&&t&&(this.focusReset.set(null),t.nativeElement.focus())}),mv(()=>{let e=this.focusEventSeq(),t=this.eventDetailHeading();e!==null&&t&&(this.focusEventSeq.set(null),t.nativeElement.focus())}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),this.unsubscribeOthers?.()})}storeMatches(e){let t=this.store();return!!t&&t.label.toLowerCase().includes(e)}async load(e){this.failed.set(!1),_T(e,`get-ngrx-store`).then(e=>this.sourceEntries.set(Array.isArray(e)?e:[])).catch(()=>this.sourceEntries.set([])).finally(()=>this.sourceLoaded.set(!0));try{let t=await e.scope(`pangular`).rpc.sharedState(`ngrx-store`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e;this.pages.set(Array.isArray(t?.pages)?t.pages:[]),e!==void 0&&this.stateLoaded.set(!0)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}try{let t=await e.scope(`pangular`).rpc.sharedState(`redux-stores`);if(this.destroyRef.destroyed)return;let n=e=>this.reduxPages.set(Lq(e));n(t.value()),this.unsubscribeOthers?.(),this.unsubscribeOthers=t.on(`updated`,n)}catch{this.reduxPages.set([])}}retry(){let e=this.rpc();e&&this.load(e)}selectPage(e){this.selectedPageId.set(e),this.selectedStoreId.set(null),this.selectedChangeSeq.set(null),this.selectedEventSeq.set(null),this.confirmSeq.set(null),this.message.set(``)}selectStore(e){this.selectedStoreId.set(e),this.selectedChangeSeq.set(null),this.confirmSeq.set(null),this.message.set(``)}selectChange(e){this.selectedChangeSeq.set(this.selectedChangeSeq()===e?null:e),this.confirmSeq.set(null),this.message.set(``)}copyState(){return this.copyText(this.stateText())}copyPath(e){return this.copyText(e,`Copied the path ${e}.`)}copyDiff(e){return this.copyText(OK(e.diff))}async copyText(e,t=`Copied.`){try{await navigator.clipboard.writeText(e),this.message.set(t)}catch{this.message.set(`The clipboard is not available here.`)}}askRestore(e){this.confirmSeq.set(e),this.focusConfirm.set(`cancel`)}cancelRestore(e){e?.preventDefault(),this.confirmSeq.set(null),this.focusConfirm.set(`restore`)}async restore(e,t){let n=this.page();if(!n)return;this.busy.set(!0),this.focusLatest.set(!1);let r=!1;try{let i=await _T(this.rpc(),`request-ngrx-action`,{pageId:n.pageId,request:{type:`restore`,seq:e}});this.message.set(i?.error??i?.message??`Restored.`),r=t&&!i?.error&&!!i?.paused}catch{this.message.set(`Could not reach the page to restore the state.`)}finally{this.busy.set(!1),this.confirmSeq.set(null),this.focusLatest.set(r),r||this.stateTree()?.focus()}}selectEvent(e){let t=this.selectedEventSeq()===e?null:e;this.selectedEventSeq.set(t),t!==null&&this.focusEventSeq.set(t)}async backToLatest(){let e=this.page();if(e){this.busy.set(!0);try{let t=await _T(this.rpc(),`request-ngrx-action`,{pageId:e.pageId,request:{type:`latest`}});this.focusLatest.set(!1),this.stateTree()?.focus(),this.message.set(t?.error??t?.message??`Back on the latest state.`)}catch{this.message.set(`Could not reach the page to go back to the latest state.`)}finally{this.busy.set(!1)}}}isSkipped(e){return this.skippedSeqs().has(e)}canToggle(e){return e.source===`store`&&e.action!==void 0&&!!this.page()?.classic?.devtools&&(e.restorable||this.isSkipped(e.seq))}traceFrames(e){return e.map(yK)}askReset(){this.confirmReset.set(!0),this.focusReset.set(`cancel`)}cancelReset(e){e?.preventDefault(),this.confirmReset.set(!1),this.focusReset.set(`reset`)}async devtoolsOp(e){let t=this.page();if(!t||this.busy())return;let n=e.op===`reset`;this.busy.set(!0);try{let n=await _T(this.rpc(),`request-ngrx-action`,{pageId:t.pageId,request:{type:`devtools`,...e}});this.message.set(n?.error??n?.message??`Done.`)}catch{this.message.set(`Could not reach the page to change the Store DevTools history.`)}finally{this.busy.set(!1),n&&(this.confirmReset.set(!1),this.focusReset.set(`reset`))}}canAgain(e){return e.source===`store`&&e.action!==void 0}async dispatchAction(e){e.preventDefault();let t=this.dispatchRequest();t&&await this.send(t,`Could not reach the page to dispatch the action.`)}dispatchAgain(e){return this.send({type:`dispatch-again`,seq:e},`Could not reach the page to dispatch the action again.`)}async send(e,t){let n=this.page();if(!n||this.busy())return;let r=this.logSession();this.busy.set(!0);try{let t=await _T(this.rpc(),`request-ngrx-action`,{pageId:n.pageId,request:e});this.message.set(t?.error??t?.message??`Dispatched.`),t?.entry&&this.logSession()===r&&(this.selectedStoreId.set(`store`),this.selectedChangeSeq.set(t.entry.seq))}catch{this.message.set(t)}finally{this.busy.set(!1)}}clearFilters(){this.filter.set(``),this.kind.set(null),this.filterInput()?.focus()}countText(e){let t=this.changeCount(e.id);return`${t} ${e.redux?t===1?`action`:`actions`:t===1?`change`:`changes`}`}changeCount(e){let t=this.liveStores().find(t=>t.id===e);return t?this.logOf(t).length:0}entityIds(e){return e.slice(0,30)}entityOverflowTitle(e,t){let n=e.slice(30).join(`, `);return t>e.length?`${n} (first ${e.length} of ${t} shown)`:n}kindColor(e){return yX[e]??`var(--text-3)`}kindLabel(e){return bX[e]??e}originText(e){return xX[e]??e}changesLabel=SK;moreChanges=xK;opLabel(e){return e===`add`?`added`:e===`remove`?`removed`:`changed`}prettyText(e){return OK(e)}shortText(e){return kK(e)}formatTime=GE;formatDuration(e){return e<=0?`<1ms`:`${Math.round(e)}ms`}methodDuration(e){let t=[];return e.avgDurationMs!==void 0&&t.push(`avg ${this.formatDuration(e.avgDurationMs)}`),e.lastDurationMs!==void 0&&t.push(`last ${this.formatDuration(e.lastDurationMs)}`),t.length?` · ${t.join(` · `)}`:``}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-store-inspector`]],viewQuery:function(e,t){e&1&&Og(t.eventDetailHeading,Bq,5)(t.cancelButton,Vq,5)(t.restoreButton,Hq,5)(t.stateTree,Pq,5)(t.resetButton,Uq,5)(t.resetCancel,Wq,5)(t.filterInput,Gq,5)(t.latestButton,Kq,5)(t.logList,qq,5)(t.eventsList,Jq,5),e&2&&kg(10)},inputs:{rpc:[1,`rpc`]},decls:32,vars:11,consts:[[`filterInput`,``],[`entryDetailTpl`,``],[`logList`,``],[`latestButton`,``],[`resetCancel`,``],[`resetButton`,``],[`eventsList`,``],[`eventDetailHeading`,``],[`actionRowsTpl`,``],[`diffTpl`,``],[`cancelButton`,``],[`restoreButton`,``],[1,`page-intro`],[1,`toolbar`],[`placeholder`,`Filter stores, changes and declarations`,`saveKey`,`store`,1,`search`,3,`valueChange`,`value`],[1,`status`],[`aria-hidden`,`true`,1,`live-dot`],[`aria-labelledby`,`ngrx-live-heading`,1,`block`],[1,`section-head`],[`id`,`ngrx-live-heading`],[1,`pill`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`empty`],[1,`empty`],[1,`live-layout`],[`role`,`status`,1,`message`],[`aria-labelledby`,`ngrx-events-heading`,1,`block`],[`aria-labelledby`,`ngrx-source-heading`,1,`block`],[`id`,`ngrx-source-heading`],[`role`,`status`,1,`empty`,`compact`],[1,`empty`,`compact`],[`id`,`ngrx-page-label`,1,`visually-hidden`],[`labelledBy`,`ngrx-page-label`,1,`page-select`,3,`valueChange`,`options`,`value`],[1,`empty-title`],[1,`hint`],[`type`,`button`,1,`btn`,3,`click`],[`capability`,`injectorProviders`,`compact`,``,3,`page`],[`aria-label`,`Stores on this page`,1,`store-list`],[1,`muted`,`pad`],[1,`store-detail`],[`type`,`button`,1,`store-item`,3,`click`],[1,`store-top`],[`aria-hidden`,`true`,1,`dot`],[1,`store-name`],[1,`store-meta`],[1,`detail-head`],[1,`chips`],[1,`chip`],[1,`chip`,`mono`,3,`file`],[1,`hint`,`small`],[1,`refs`],[1,`paused`],[1,`facts`],[`aria-labelledby`,`ngrx-state-heading`,1,`fact`],[1,`fact-head`],[`id`,`ngrx-state-heading`],[1,`state-actions`],[3,`rpc`,`pageId`,`target`,`label`],[`type`,`button`,`aria-label`,`Copy state`,1,`btn`,`copy`,3,`click`],[3,`copied`,`value`,`changed`,`label`],[`aria-labelledby`,`ngrx-devtools-heading`,1,`history`],[`aria-labelledby`,`ngrx-log-heading`,1,`log`],[`id`,`ngrx-log-heading`],[`what`,`changes on this page`,`limit`,`changeLog`,3,`dropped`,`max`],[1,`log-layout`],[`appRovingList`,`button.log-item`,1,`log-list`,3,`rovingWindow`],[`view`,`store-log`,`pane`,`before`,`label`,`Resize the change list`,3,`sizeChange`,`min`,`max`,`defaultSize`,`size`],[`id`,`ngrx-change-detail`],[1,`stats`],[3,`rpc`,`pageId`,`storeId`,`entries`],[`aria-labelledby`,`ngrx-dispatch-heading`,1,`dispatch`],[`type`,`button`,1,`btn`,`primary`,3,`click`,`disabled`],[`id`,`store-latest-off`,1,`hint`,`small`],[`aria-labelledby`,`ngrx-computed-heading`,1,`fact`],[`id`,`ngrx-computed-heading`],[1,`kv`],[1,`muted`],[`id`,`ngrx-methods-heading`,1,`spaced`],[`aria-labelledby`,`ngrx-methods-heading`,1,`methods`],[`aria-labelledby`,`ngrx-entities-heading`,1,`fact`],[3,`title`],[1,`chip`,`mono`],[1,`tag`],[1,`calls`],[`id`,`ngrx-entities-heading`],[1,`entities`],[1,`entity-group`],[1,`entity-head`],[1,`entity-count`],[1,`chips`,`entity-ids`],[1,`chip`,`more`,3,`title`],[`id`,`ngrx-devtools-heading`],[`role`,`group`,`aria-labelledby`,`ngrx-reset-text`,1,`confirm`],[1,`actions`],[`id`,`store-history-off`,1,`hint`,`small`],[`role`,`group`,`aria-labelledby`,`ngrx-reset-text`,1,`confirm`,3,`keydown.escape`],[`id`,`ngrx-reset-text`],[`type`,`button`,1,`btn`,3,`click`,`disabled`],[`type`,`button`,1,`log-item`,3,`click`],[1,`seq`],[1,`log-type-row`],[1,`log-type`,3,`title`],[1,`tag`,3,`title`],[1,`log-meta`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`id`,`ngrx-stats-heading`],[`tabindex`,`0`,`role`,`region`,`aria-labelledby`,`ngrx-stats-heading`,1,`table-wrap`],[`scope`,`col`],[`scope`,`col`,1,`num`],[`scope`,`row`,1,`mono`],[1,`loop`],[1,`num`],[`id`,`ngrx-dispatch-heading`],[1,`dispatch-form`,3,`submit`],[`required`,``,`spellcheck`,`false`,`autocomplete`,`off`,`list`,`ngrx-action-types`,`placeholder`,`e.g. [Cart] Add Item`,3,`input`,`value`],[`id`,`ngrx-action-types`],[3,`value`],[1,`optional`],[`rows`,`3`,`spellcheck`,`false`,`placeholder`,`e.g. {"id": 7}`,`aria-describedby`,`ngrx-payload-error`,3,`input`,`value`],[`id`,`ngrx-payload-error`,1,`field-error`],[`type`,`submit`,1,`btn`,`primary`,3,`disabled`],[`id`,`store-dispatch-off`,1,`hint`,`small`],[`id`,`ngrx-events-heading`],[1,`intro`],[`appRovingList`,`button.event-item`,`aria-label`,`Dispatched events`,1,`events-list`,3,`rovingWindow`],[`id`,`ngrx-event-detail`,`tabindex`,`-1`,1,`event-detail-focus`],[`type`,`button`,1,`event-item`,3,`click`],[1,`event-type`,`mono`,3,`title`],[1,`event-payload`,3,`title`],[1,`event-time`],[1,`entry`],[`role`,`heading`,1,`entry-heading`,3,`id`],[3,`idPrefix`,`seq`,`diffTruncated`,`loader`],[`role`,`group`,1,`confirm`],[1,`trace`],[3,`file`,`line`],[1,`code`],[1,`mono`],[1,`sub-head`],[`role`,`heading`,1,`sub`],[`type`,`button`,1,`btn`,`copy`],[`type`,`button`,1,`btn`,`copy`,3,`click`],[1,`diff`],[3,`class`],[1,`op`],[1,`path`],[1,`values`],[1,`before`],[1,`after`],[`aria-hidden`,`true`,1,`arrow`],[1,`visually-hidden`],[1,`kv`,`redux-action`],[`tab-action`,``],[`tab-diff`,``],[`role`,`group`,1,`confirm`,3,`keydown.escape`],[3,`id`],[1,`entry-actions`],[`type`,`button`,1,`btn`,3,`disabled`],[`type`,`button`,1,`btn`,`restore`,3,`disabled`],[1,`hint`,`small`,3,`id`],[`type`,`button`,1,`btn`,`restore`,3,`click`,`disabled`],[`aria-hidden`,`true`,1,`spinner`],[`role`,`group`,`aria-label`,`Filter declarations by kind`,1,`kinds`],[`type`,`button`,1,`kind-chip`,3,`click`],[1,`count`],[`type`,`button`,1,`kind-chip`,3,`active`],[1,`nodes`],[1,`node-card`],[1,`chip-text`],[1,`node-header`],[1,`node-label`],[1,`node-meta`],[1,`file`,3,`file`,`line`],[1,`detail`]],template:function(e,t){if(e&1){let e=B();F(0,`p`,12),K(1,` NgRx signal stores and @ngrx/store state from the live page, with every change, plus NGXS, Elf and MiniRx stores. Source declarations lists the stores your files declare. `),I(),F(2,`div`,13)(3,`app-search-field`,14,0),w_(`valueChange`,function(n){return C(e),C_(t.filter,n)||(t.filter=n),w(n)}),I(),A(5,cJ,3,2),F(6,`span`,15),L(7,`span`,16),K(8),I()(),F(9,`section`,17)(10,`div`,18)(11,`h2`,19),K(12,`Live stores`),I(),A(13,lJ,2,1,`span`,20),I(),A(14,uJ,7,0,`div`,21)(15,dJ,3,0,`div`,22)(16,fJ,5,0,`div`,23)(17,gJ,6,2)(18,gY,6,2,`div`,24),F(19,`p`,25),K(20),I()(),A(21,xY,14,8,`section`,26),Dh(22,uX,22,15,`ng-template`,null,1,q_),F(24,`section`,27)(25,`div`,18)(26,`h2`,28),K(27,`Source declarations`),I(),A(28,dX,2,1,`span`,20),I(),A(29,fX,4,0,`div`,29)(30,pX,29,0,`div`,30)(31,vX,11,5),I()}e&2&&(D(3),S_(`value`,t.filter),D(2),j(t.allPages().length>1?5:-1),D(),G(`on`,t.pageConnected()),D(2),J(` `,t.stateLoaded()?t.pageConnected()?`Live`:`No page connected`:`Loading…`,` `),D(5),j(t.liveStores().length?13:-1),D(),j(t.failed()?14:t.stateLoaded()?t.page()?t.liveStores().length?18:17:16:15),D(6),q(t.message()),D(),j(t.hasEvents()?21:-1),D(7),j(t.sourceEntries().length?28:-1),D(),j(t.sourceLoaded()?t.sourceEntries().length===0?30:31:29))},dependencies:[nP,bW,hD,eO,lV,OD,Uv,Cj,EM,XK,gq,Pq],styles:[`.page-intro[_ngcontent-%COMP%] { margin: 0 0 12px; color: var(--%NS%text-2); line-height: 1.5; @@ -11949,7 +11963,7 @@ textarea[aria-invalid=true][_ngcontent-%COMP%] { .kv[_ngcontent-%COMP%] { grid-template-columns: minmax(0, 1fr); } -}`]})};function bX(e,t){let{start:n,end:r}=t.range();return e.slice(n,r).map((e,t)=>({entry:e,index:n+t}))}function xX(e){let t=e?.pages;return!t||typeof t!=`object`||Array.isArray(t)?[]:Object.values(t).filter(e=>{let t=e;return!!t&&typeof t.pageId==`string`&&Array.isArray(t.clients)&&Array.isArray(t.queries)&&Array.isArray(t.mutations)}).sort((e,t)=>t.reportedAt-e.reportedAt)}function SX(e){return e.invalidated?`invalidated`:e.stale?`stale`:`fresh`}function CX(e,t){if(!t)return`never`;let n=Math.max(0,Math.round(e/1e3));return n<60?`${n} s ago`:n<3600?`${Math.round(n/60)} min ago`:`${Math.round(n/3600)} h ago`}function wX(e){return e===void 0?`not set`:e===null?`Infinity`:e===`static`?`static`:e<1e3?`${e} ms`:e<6e4?`${Math.round(e/100)/10} s`:`${Math.round(e/6e3)/10} min`}function TX(e,t){return t===`fetching`?`accent`:t===`paused`?`warn`:e===`error`?`danger`:e===`success`?`ok`:e===`pending`?`warn`:`plain`}function EX(e,t){switch(t){case`all`:return!0;case`fetching`:return e.fetchStatus===`fetching`;case`stale`:return e.stale||e.invalidated;case`inactive`:return e.observers===0;default:return e.status===t}}var DX=[`detailPanel`],OX=(e,t)=>({preview:e,id:t}),kX=(e,t)=>t.id;function AX(e,t){e&1&&(F(0,`p`,3),K(1,`Loading queries…`),I())}function jX(e,t){if(e&1){let e=B();F(0,`div`,4)(1,`p`),K(2,`Can't read TanStack Query from the devtools server.`),I(),F(3,`button`,6),H(`click`,function(){return C(e),w(W().retry())}),K(4,`Retry`),I()()}}function MX(e,t){e&1&&(F(0,`p`,7),K(1,`The connected page has no QueryClient yet.`),I(),F(2,`p`),K(3,` Add `),F(4,`code`),K(5,`provideTanStackQuery(new QueryClient())`),I(),K(6,` to the app's providers. The tab reads it once something in the app injects it, such as `),F(7,`code`),K(8,`injectQuery()`),I(),K(9,`. `),I())}function NX(e,t){e&1&&(F(0,`p`,7),K(1,`No page reports a QueryClient yet.`),I(),F(2,`p`),K(3,` Open the app with the overlay loaded. The tab reads the `),F(4,`code`),K(5,`QueryClient`),I(),K(6,` that `),F(7,`code`),K(8,`provideTanStackQuery()`),I(),K(9,` registers, once something in the app injects it. `),I())}function PX(e,t){if(e&1&&(F(0,`div`,5),A(1,MX,10,0)(2,NX,10,0),I()),e&2){let e=W();D(),j(e.connected()?1:2)}}function FX(e,t){if(e&1){let e=B();F(0,`app-select`,18),H(`valueChange`,function(t){return C(e),w(W(2).status.set(t??`all`))}),I()}if(e&2){let e=W(2);P(`options`,e.filters)(`value`,e.status())}}function IX(e,t){if(e&1){let e=B();F(0,`app-select`,19),H(`valueChange`,function(t){return C(e),w(W(2).selectPage(t))}),I()}if(e&2){let e=W(2);P(`options`,e.pageOptions())(`value`,e.page()?.pageId??null)}}function LX(e,t){if(e&1&&(F(0,`p`,20),K(1),I()),e&2){let e=W(),t=W(2);D(),Y(` The page reports the `,t.view()===`queries`?`300 queries`:`100 mutations`,` it updated last and leaves out `,t.view()===`queries`?e.queries:e.mutations,` more. `)}}function RX(e,t){if(e&1&&A(0,LX,2,2,`p`,20),e&2){let e=t;j(e.queries||e.mutations?0:-1)}}function zX(e,t){e&1&&(F(0,`p`,7),K(1,`No query in the cache yet.`),I(),F(2,`p`),K(3,`Queries show up here when the app creates them with `),F(4,`code`),K(5,`injectQuery()`),I(),K(6,`.`),I())}function BX(e,t){e&1&&(F(0,`p`,7),K(1,`No mutation yet.`),I(),F(2,`p`),K(3,`Mutations show up here once the app calls `),F(4,`code`),K(5,`mutate()`),I(),K(6,`.`),I())}function VX(e,t){if(e&1&&(F(0,`div`,5),A(1,zX,7,0)(2,BX,7,0),I()),e&2){let e=W(2);D(),j(e.view()===`queries`?1:2)}}function HX(e,t){if(e&1){let e=B();F(0,`div`,5)(1,`p`,7),K(2,`Nothing matches the filters.`),I(),F(3,`button`,6),H(`click`,function(){C(e),W();let t=kg(13);return W().clearFilters(),w(t.focus())}),K(4,` Clear filters `),I()()}}function UX(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,24),H(`click`,function(){let t=C(e).$implicit;return w(W(3).select(t.id))}),F(2,`span`,25)(3,`code`,26),K(4),I(),F(5,`span`,27),K(6),I()(),F(7,`span`,28),K(8),I()()()}if(e&2){let e=t.$implicit,n=W(3);D(),G(`selected`,e.id===n.selected()?.id),k(`aria-pressed`,e.id===n.selected()?.id),D(2),P(`title`,e.label),D(),q(e.label),D(),k(`data-tone`,e.tone),D(),q(e.status),D(2),q(e.meta)}}function WX(e,t){if(e&1&&(F(0,`span`,31),K(1),I()),e&2){let e=W();D(),Y(`(`,e.dataUpdateCount,` `,e.dataUpdateCount===1?`update`:`updates`,`)`)}}function GX(e,t){e&1&&(F(0,`span`,31),K(1,`(disabled)`),I())}function KX(e,t){if(e&1&&(F(0,`dt`),K(1,`Failures`),I(),F(2,`dd`),K(3),I()),e&2){let e=W();D(3),q(e.failureCount)}}function qX(e,t){if(e&1&&(F(0,`dt`),K(1,`Error`),I(),F(2,`dd`)(3,`code`,37),K(4),I()()),e&2){let e=W();D(4),q(e.error)}}function JX(e,t){if(e&1&&(F(0,`p`,34),K(1),I()),e&2){let e=W(4);D(),q(e.writesOff)}}function YX(e,t){e&1&&(F(0,`p`,31),K(1,`No data yet.`),I())}function XX(e,t){if(e&1&&ug(0,36),e&2){let e=W();W(3),P(`ngTemplateOutlet`,kg(5))(`ngTemplateOutletContext`,L_(2,OX,e.preview,e.id))}}function ZX(e,t){if(e&1){let e=B();F(0,`h2`,29)(1,`code`),K(2),I()(),F(3,`dl`,30)(4,`dt`),K(5,`Status`),I(),F(6,`dd`)(7,`span`,27),K(8),I()(),F(9,`dt`),K(10,`Fetch status`),I(),F(11,`dd`),K(12),I(),F(13,`dt`),K(14,`Freshness`),I(),F(15,`dd`),K(16),I(),F(17,`dt`),K(18,`Data updated`),I(),F(19,`dd`),K(20),A(21,WX,2,2,`span`,31),I(),F(22,`dt`),K(23,`Observers`),I(),F(24,`dd`),K(25),A(26,GX,2,0,`span`,31),I(),F(27,`dt`),K(28,`staleTime`),I(),F(29,`dd`),K(30),I(),F(31,`dt`),K(32,`gcTime`),I(),F(33,`dd`),K(34),I(),A(35,KX,4,1),A(36,qX,5,1),I(),F(37,`div`,32)(38,`button`,33),H(`click`,function(){let t=C(e);return w(W(3).act(`invalidate`,t.id))}),K(39,` Invalidate `),I(),F(40,`button`,33),H(`click`,function(){let t=C(e);return w(W(3).act(`refetch`,t.id))}),K(41,` Refetch `),I()(),A(42,JX,2,1,`p`,34),F(43,`h3`,35),K(44,`Data`),I(),A(45,YX,2,0,`p`,31)(46,XX,1,5,`ng-container`,36)}if(e&2){let e=t,n=W(3);D(2),q(e.keyText),D(5),k(`data-tone`,n.tone(e.status)),D(),q(e.status),D(4),q(e.fetchStatus),D(4),q(n.freshnessOf(e)),D(4),J(` `,n.age(e.dataUpdatedAt),` `),D(),j(e.dataUpdateCount?21:-1),D(4),J(` `,e.observers,` `),D(),j(e.disabled?26:-1),D(4),q(n.duration(e.staleTime)),D(4),q(n.duration(e.gcTime)),D(),j(e.failureCount?35:-1),D(),j(e.error?36:-1),D(2),P(`disabled`,n.busy()||!n.canWrite()),k(`aria-describedby`,n.canWrite()?null:`query-writes-off`),D(2),P(`disabled`,n.busy()||!n.canWrite()),k(`aria-describedby`,n.canWrite()?null:`query-writes-off`),D(2),j(n.canWrite()?-1:42),D(3),j(e.hasData?46:45)}}function QX(e,t){e&1&&(F(0,`span`,31),K(1,`(paused)`),I())}function $X(e,t){if(e&1&&(F(0,`dt`),K(1,`Failures`),I(),F(2,`dd`),K(3),I()),e&2){let e=W();D(3),q(e.failureCount)}}function eZ(e,t){if(e&1&&(F(0,`dt`),K(1,`Error`),I(),F(2,`dd`)(3,`code`,37),K(4),I()()),e&2){let e=W();D(4),q(e.error)}}function tZ(e,t){if(e&1&&(F(0,`h2`,29)(1,`code`),K(2),I()(),F(3,`dl`,30)(4,`dt`),K(5,`Status`),I(),F(6,`dd`)(7,`span`,27),K(8),I(),A(9,QX,2,0,`span`,31),I(),F(10,`dt`),K(11,`Submitted`),I(),F(12,`dd`),K(13),I(),A(14,$X,4,1),A(15,eZ,5,1),I(),F(16,`h3`,35),K(17,`Variables and data`),I(),ug(18,36)),e&2){let e=t,n=W(3),r=kg(5);D(2),q(n.mutationLabel(e)),D(5),k(`data-tone`,n.tone(e.status)),D(),q(e.status),D(),j(e.isPaused?9:-1),D(4),q(n.age(e.submittedAt)),D(),j(e.failureCount?14:-1),D(),j(e.error?15:-1),D(3),P(`ngTemplateOutlet`,r)(`ngTemplateOutletContext`,L_(9,OX,e.variables,e.id))}}function nZ(e,t){if(e&1&&(F(0,`h2`,38),K(1,`Details`),I(),F(2,`p`,31),K(3),I()),e&2){let e=W(3);D(3),J(` Select a `,e.view()===`queries`?`query`:`mutation`,` to see its details. `)}}function rZ(e,t){if(e&1&&(F(0,`div`,17)(1,`ul`,21),M(2,UX,9,8,`li`,null,kX),I(),F(4,`section`,22,2),A(6,ZX,47,19)(7,tZ,19,12)(8,nZ,4,1),F(9,`p`,23),K(10),I()()()),e&2){let e,t=W(2);D(),k(`aria-label`,t.view()===`queries`?`Queries`:`Mutations`),D(),N(t.rows()),D(4),j((e=t.selectedQuery())?6:(e=t.selectedMutation())?7:8,e),D(4),q(t.message())}}function iZ(e,t){if(e&1){let e=B();F(0,`p`,8),K(1,` The queries and mutations of the TanStack Query client the app provides, read from the live page. Keys, errors and data are masked like other live data. `),I(),F(2,`div`,9)(3,`div`,10)(4,`button`,11),H(`click`,function(){return C(e),w(W().setView(`queries`))}),K(5,` Queries `),F(6,`span`,12),K(7),I()(),F(8,`button`,11),H(`click`,function(){return C(e),w(W().setView(`mutations`))}),K(9,` Mutations `),F(10,`span`,12),K(11),I()()(),F(12,`app-search-field`,13,1),S_(`valueChange`,function(t){C(e);let n=W();return x_(n.filter,t)||(n.filter=t),w(t)}),I(),A(14,FX,1,2,`app-select`,14),A(15,IX,1,2,`app-select`,15),F(16,`span`,16),K(17),I()(),A(18,RX,1,1),A(19,VX,3,1,`div`,5)(20,HX,5,0,`div`,5)(21,rZ,11,3,`div`,17)}if(e&2){let e,t=W();D(4),k(`aria-pressed`,t.view()===`queries`),D(3),q(t.page()?.queries.length??0),D(),k(`aria-pressed`,t.view()===`mutations`),D(3),q(t.page()?.mutations.length??0),D(),b_(`value`,t.filter),D(2),j(t.view()===`queries`?14:-1),D(),j(t.pages().length>1?15:-1),D(2),q(t.countText()),D(),j((e=t.page()?.more)?18:-1,e),D(),j(t.allRows().length?t.rows().length?21:20:19)}}function aZ(e,t){if(e&1&&(F(0,`p`,39),K(1,`Variables`),I(),F(2,`pre`,41),K(3),I()),e&2){let e=W(),t=W(3);D(3),q(t.prettyText(e.variables))}}function oZ(e,t){if(e&1&&(A(0,aZ,4,1),F(1,`p`,39),K(2,`Data`),I(),F(3,`pre`,40),K(4),I()),e&2){let e=t,n=W(3);j(e.variables===void 0?-1:0),D(4),q(e.data===void 0?`No data.`:n.prettyText(e.data))}}function sZ(e,t){if(e&1&&(F(0,`p`,31),K(1),I()),e&2){let e=W(3);D(),q(e.full().result.error??`The page did not send the data.`)}}function cZ(e,t){if(e&1&&A(0,oZ,5,2)(1,sZ,2,1,`p`,31),e&2){let e;j((e=W(2).full().result.detail)?0:1,e)}}function lZ(e,t){if(e&1&&(F(0,`pre`,42),K(1),I()),e&2){let e=W(2).preview,t=W();D(),q(t.prettyText(e))}}function uZ(e,t){if(e&1){let e=B();A(0,lZ,2,1,`pre`,42),F(1,`button`,33),H(`click`,function(){C(e);let t=W().id;return w(W().loadData(t))}),K(2),I()}if(e&2){let e=W().preview,t=W();j(e===void 0?-1:0),D(),P(`disabled`,t.loadingData()),D(),J(` `,t.loadingData()?`Loading…`:`Show all data`,` `)}}function dZ(e,t){if(e&1&&A(0,cZ,2,1)(1,uZ,3,3),e&2){let e=t.id;j(W().full()?.id===e?0:1)}}var fZ=[{value:`all`,label:`All statuses`},{value:`fetching`,label:`Fetching`},{value:`success`,label:`Success`},{value:`error`,label:`Error`},{value:`pending`,label:`Pending`},{value:`stale`,label:`Stale or invalidated`},{value:`inactive`,label:`No observers`}],pZ=class e{rpc=$(null);angularPages=uD(()=>this.rpc());connected=X(()=>Object.keys(this.angularPages()).length>0);destroyRef=S(vs);hostPageId=fT();unsubscribe;detailPanel=av(`detailPanel`);filters=fZ;writesOff=Uw(`tanstackQuery`);canWrite=X(()=>IT(this.rpc(),`tanstackQuery`));pages=E([]);loaded=E(!1);failed=E(!1);view=E(`queries`);filter=E(``);status=E(`all`);selectedPageId=E(null);selectedId=E(null);busy=E(!1);message=E(``);loadingData=E(!1);full=Q({source:()=>this.selectedId(),computation:()=>null});now=E(Date.now());page=X(()=>{let e=this.pages();return e.find(e=>e.pageId===this.selectedPageId())??e.find(e=>e.pageId===this.hostPageId)??e[0]??null});pageOptions=X(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.url})));queries=X(()=>{let e=this.filter().trim().toLowerCase(),t=this.status();return(this.page()?.queries??[]).filter(n=>EX(n,t)&&(!e||n.keyText.toLowerCase().includes(e)))});mutations=X(()=>{let e=this.filter().trim().toLowerCase();return(this.page()?.mutations??[]).filter(t=>!e||this.mutationLabel(t).toLowerCase().includes(e))});allRows=X(()=>this.view()===`queries`?this.page()?.queries??[]:this.page()?.mutations??[]);rows=X(()=>(this.now(),this.view()===`queries`?this.queries().map(e=>({id:e.id,label:e.keyText,status:e.fetchStatus===`idle`?e.status:e.fetchStatus,tone:TX(e.status,e.fetchStatus),meta:`${SX(e)} · ${e.observers} ${e.observers===1?`observer`:`observers`} · ${this.age(e.dataUpdatedAt)}`})):this.mutations().map(e=>({id:e.id,label:this.mutationLabel(e),status:e.isPaused?`paused`:e.status,tone:e.isPaused?`warn`:TX(e.status),meta:`submitted ${this.age(e.submittedAt)}`}))));countText=X(()=>{let e=this.allRows().length;return`${this.rows().length} of ${e} ${this.view()===`queries`?`queries`:`mutations`}`});selectedQuery=X(()=>this.view()===`queries`?this.page()?.queries.find(e=>e.id===this.selectedId())??null:null);selectedMutation=X(()=>this.view()===`mutations`?this.page()?.mutations.find(e=>e.id===this.selectedId())??null:null);selected=X(()=>this.selectedQuery()??this.selectedMutation());constructor(){ac(()=>{let e=this.rpc();e&&this.load(e)});let e=setInterval(()=>this.now.set(Date.now()),1e3);this.destroyRef.onDestroy(()=>{clearInterval(e),this.unsubscribe?.()})}age(e){let t=this.page();if(!t)return CX(0,e);let n=t.at-t.reportedAt;return CX(this.now()+n-e,e)}freshnessOf(e){return SX(e)}duration(e){return wX(e)}tone(e){return TX(e)}prettyText(e){return CK(e)}mutationLabel(e){return e.keyText??`Mutation ${e.id}`}setView(e){this.view.set(e),this.selectedId.set(null),this.message.set(``)}selectPage(e){this.selectedPageId.set(e),this.selectedId.set(null),this.message.set(``)}select(e){this.selectedId.set(e),this.message.set(``),typeof matchMedia==`function`&&matchMedia(`(max-width: 880px)`).matches&&this.detailPanel()?.nativeElement.scrollIntoView?.({block:`nearest`})}clearFilters(){this.filter.set(``),this.status.set(`all`)}retry(){let e=this.rpc();e&&this.load(e)}async loadData(e){let t=this.page();if(t&&!this.loadingData()){this.loadingData.set(!0);try{let n=await _T(this.rpc(),`request-tanstack-query`,{pageId:t.pageId,request:{type:`detail`,id:e}});this.selectedId()===e&&this.full.set({id:e,result:n??{}})}catch{this.selectedId()===e&&this.full.set({id:e,result:{error:`Could not reach the page to read the data.`}})}finally{this.loadingData.set(!1)}}}async act(e,t){let n=this.page();if(n&&!this.busy()){this.busy.set(!0);try{let r=await _T(this.rpc(),`request-tanstack-query`,{pageId:n.pageId,request:{type:e,id:t}});this.message.set(r?.error??r?.message??`Done.`),this.full.set(null)}catch{this.message.set(`Could not reach the page.`)}finally{this.busy.set(!1)}}}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`tanstack-query`);if(this.destroyRef.destroyed)return;let n=e=>this.pages.set(xX(e));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-query-inspector`]],viewQuery:function(e,t){e&1&&Dg(t.detailPanel,DX,5),e&2&&Og()},inputs:{rpc:[1,`rpc`]},decls:6,vars:1,consts:[[`dataTpl`,``],[`search`,``],[`detailPanel`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`role`,`status`,1,`state`,`empty-card`],[`type`,`button`,1,`btn`,3,`click`],[1,`state-title`],[1,`intro`],[1,`toolbar`],[`role`,`group`,`aria-label`,`Show`,1,`views`],[`type`,`button`,1,`view`,3,`click`],[1,`badge`],[`placeholder`,`Filter by key`,`saveKey`,`query`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Status`,1,`filter-select`,3,`options`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`options`,`value`],[`role`,`status`,1,`count`],[1,`layout`],[`ariaLabel`,`Status`,1,`filter-select`,3,`valueChange`,`options`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`valueChange`,`options`,`value`],[1,`notice`],[`appRovingList`,`button.row`,1,`rows`],[`aria-labelledby`,`query-detail-heading`,1,`detail`],[`role`,`status`,1,`message`],[`type`,`button`,1,`row`,3,`click`],[1,`row-top`],[1,`key`,3,`title`],[1,`pill`],[1,`row-meta`],[`id`,`query-detail-heading`,1,`detail-title`],[1,`kv`],[1,`muted`],[1,`actions`],[`type`,`button`,1,`btn`,3,`click`,`disabled`],[`id`,`query-writes-off`,1,`hint`],[1,`sub`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[1,`error`],[`id`,`query-detail-heading`,1,`sr-only`],[1,`label`],[`tabindex`,`0`,`aria-label`,`Data`],[`tabindex`,`0`,`aria-label`,`Variables`],[`tabindex`,`0`,`aria-label`,`Preview`]],template:function(e,t){e&1&&(A(0,AX,2,0,`p`,3)(1,jX,5,0,`div`,4)(2,PX,3,1,`div`,5)(3,iZ,22,10),Eh(4,dZ,2,1,`ng-template`,null,0,G_)),e&2&&j(t.loaded()?t.failed()?1:t.pages().length?3:2:0)},dependencies:[nP,Vv,iV,OD],styles:[`[_nghost-%COMP%] { +}`]})};function TX(e,t){let{start:n,end:r}=t.range();return e.slice(n,r).map((e,t)=>({entry:e,index:n+t}))}function EX(e){let t=e?.pages;return!t||typeof t!=`object`||Array.isArray(t)?[]:Object.values(t).filter(e=>{let t=e;return!!t&&typeof t.pageId==`string`&&Array.isArray(t.clients)&&Array.isArray(t.queries)&&Array.isArray(t.mutations)}).sort((e,t)=>t.reportedAt-e.reportedAt)}function DX(e){return e.invalidated?`invalidated`:e.stale?`stale`:`fresh`}function OX(e,t){if(!t)return`never`;let n=Math.max(0,Math.round(e/1e3));return n<60?`${n} s ago`:n<3600?`${Math.round(n/60)} min ago`:`${Math.round(n/3600)} h ago`}function kX(e){return e===void 0?`not set`:e===null?`Infinity`:e===`static`?`static`:e<1e3?`${e} ms`:e<6e4?`${Math.round(e/100)/10} s`:`${Math.round(e/6e3)/10} min`}function AX(e,t){return t===`fetching`?`accent`:t===`paused`?`warn`:e===`error`?`danger`:e===`success`?`ok`:e===`pending`?`warn`:`plain`}function jX(e,t){switch(t){case`all`:return!0;case`fetching`:return e.fetchStatus===`fetching`;case`stale`:return e.stale||e.invalidated;case`inactive`:return e.observers===0;default:return e.status===t}}var MX=[`detailPanel`],NX=(e,t)=>({preview:e,id:t}),PX=(e,t)=>t.id;function FX(e,t){e&1&&(F(0,`p`,3),K(1,`Loading queries…`),I())}function IX(e,t){if(e&1){let e=B();F(0,`div`,4)(1,`p`),K(2,`Can't read TanStack Query from the devtools server.`),I(),F(3,`button`,6),H(`click`,function(){return C(e),w(W().retry())}),K(4,`Retry`),I()()}}function LX(e,t){e&1&&(F(0,`p`,7),K(1,`The connected page has no QueryClient yet.`),I(),F(2,`p`),K(3,` Add `),F(4,`code`),K(5,`provideTanStackQuery(new QueryClient())`),I(),K(6,` to the app's providers. The tab reads it once something in the app injects it, such as `),F(7,`code`),K(8,`injectQuery()`),I(),K(9,`. `),I())}function RX(e,t){e&1&&(F(0,`p`,7),K(1,`No page reports a QueryClient yet.`),I(),F(2,`p`),K(3,` Open the app with the overlay loaded. The tab reads the `),F(4,`code`),K(5,`QueryClient`),I(),K(6,` that `),F(7,`code`),K(8,`provideTanStackQuery()`),I(),K(9,` registers, once something in the app injects it. `),I())}function zX(e,t){if(e&1&&(F(0,`div`,5),A(1,LX,10,0)(2,RX,10,0),I()),e&2){let e=W();D(),j(e.connected()?1:2)}}function BX(e,t){if(e&1){let e=B();F(0,`app-select`,18),H(`valueChange`,function(t){return C(e),w(W(2).status.set(t??`all`))}),I()}if(e&2){let e=W(2);P(`options`,e.filters)(`value`,e.status())}}function VX(e,t){if(e&1){let e=B();F(0,`app-select`,19),H(`valueChange`,function(t){return C(e),w(W(2).selectPage(t))}),I()}if(e&2){let e=W(2);P(`options`,e.pageOptions())(`value`,e.page()?.pageId??null)}}function HX(e,t){if(e&1&&(F(0,`p`,20),K(1),I()),e&2){let e=W(),t=W(2);D(),Y(` The page reports the `,t.view()===`queries`?`300 queries`:`100 mutations`,` it updated last and leaves out `,t.view()===`queries`?e.queries:e.mutations,` more. `)}}function UX(e,t){if(e&1&&A(0,HX,2,2,`p`,20),e&2){let e=t;j(e.queries||e.mutations?0:-1)}}function WX(e,t){e&1&&(F(0,`p`,7),K(1,`No query in the cache yet.`),I(),F(2,`p`),K(3,`Queries show up here when the app creates them with `),F(4,`code`),K(5,`injectQuery()`),I(),K(6,`.`),I())}function GX(e,t){e&1&&(F(0,`p`,7),K(1,`No mutation yet.`),I(),F(2,`p`),K(3,`Mutations show up here once the app calls `),F(4,`code`),K(5,`mutate()`),I(),K(6,`.`),I())}function KX(e,t){if(e&1&&(F(0,`div`,5),A(1,WX,7,0)(2,GX,7,0),I()),e&2){let e=W(2);D(),j(e.view()===`queries`?1:2)}}function qX(e,t){if(e&1){let e=B();F(0,`div`,5)(1,`p`,7),K(2,`Nothing matches the filters.`),I(),F(3,`button`,6),H(`click`,function(){C(e),W();let t=Ag(13);return W().clearFilters(),w(t.focus())}),K(4,` Clear filters `),I()()}}function JX(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,24),H(`click`,function(){let t=C(e).$implicit;return w(W(3).select(t.id))}),F(2,`span`,25)(3,`code`,26),K(4),I(),F(5,`span`,27),K(6),I()(),F(7,`span`,28),K(8),I()()()}if(e&2){let e=t.$implicit,n=W(3);D(),G(`selected`,e.id===n.selected()?.id),k(`aria-pressed`,e.id===n.selected()?.id),D(2),P(`title`,e.label),D(),q(e.label),D(),k(`data-tone`,e.tone),D(),q(e.status),D(2),q(e.meta)}}function YX(e,t){if(e&1&&(F(0,`span`,31),K(1),I()),e&2){let e=W();D(),Y(`(`,e.dataUpdateCount,` `,e.dataUpdateCount===1?`update`:`updates`,`)`)}}function XX(e,t){e&1&&(F(0,`span`,31),K(1,`(disabled)`),I())}function ZX(e,t){if(e&1&&(F(0,`dt`),K(1,`Failures`),I(),F(2,`dd`),K(3),I()),e&2){let e=W();D(3),q(e.failureCount)}}function QX(e,t){if(e&1&&(F(0,`dt`),K(1,`Error`),I(),F(2,`dd`)(3,`code`,37),K(4),I()()),e&2){let e=W();D(4),q(e.error)}}function $X(e,t){if(e&1&&(F(0,`p`,34),K(1),I()),e&2){let e=W(4);D(),q(e.writesOff)}}function eZ(e,t){e&1&&(F(0,`p`,31),K(1,`No data yet.`),I())}function tZ(e,t){if(e&1&&dg(0,36),e&2){let e=W();W(3),P(`ngTemplateOutlet`,Ag(5))(`ngTemplateOutletContext`,z_(2,NX,e.preview,e.id))}}function nZ(e,t){if(e&1){let e=B();F(0,`h2`,29)(1,`code`),K(2),I()(),F(3,`dl`,30)(4,`dt`),K(5,`Status`),I(),F(6,`dd`)(7,`span`,27),K(8),I()(),F(9,`dt`),K(10,`Fetch status`),I(),F(11,`dd`),K(12),I(),F(13,`dt`),K(14,`Freshness`),I(),F(15,`dd`),K(16),I(),F(17,`dt`),K(18,`Data updated`),I(),F(19,`dd`),K(20),A(21,YX,2,2,`span`,31),I(),F(22,`dt`),K(23,`Observers`),I(),F(24,`dd`),K(25),A(26,XX,2,0,`span`,31),I(),F(27,`dt`),K(28,`staleTime`),I(),F(29,`dd`),K(30),I(),F(31,`dt`),K(32,`gcTime`),I(),F(33,`dd`),K(34),I(),A(35,ZX,4,1),A(36,QX,5,1),I(),F(37,`div`,32)(38,`button`,33),H(`click`,function(){let t=C(e);return w(W(3).act(`invalidate`,t.id))}),K(39,` Invalidate `),I(),F(40,`button`,33),H(`click`,function(){let t=C(e);return w(W(3).act(`refetch`,t.id))}),K(41,` Refetch `),I()(),A(42,$X,2,1,`p`,34),F(43,`h3`,35),K(44,`Data`),I(),A(45,eZ,2,0,`p`,31)(46,tZ,1,5,`ng-container`,36)}if(e&2){let e=t,n=W(3);D(2),q(e.keyText),D(5),k(`data-tone`,n.tone(e.status)),D(),q(e.status),D(4),q(e.fetchStatus),D(4),q(n.freshnessOf(e)),D(4),J(` `,n.age(e.dataUpdatedAt),` `),D(),j(e.dataUpdateCount?21:-1),D(4),J(` `,e.observers,` `),D(),j(e.disabled?26:-1),D(4),q(n.duration(e.staleTime)),D(4),q(n.duration(e.gcTime)),D(),j(e.failureCount?35:-1),D(),j(e.error?36:-1),D(2),P(`disabled`,n.busy()||!n.canWrite()),k(`aria-describedby`,n.canWrite()?null:`query-writes-off`),D(2),P(`disabled`,n.busy()||!n.canWrite()),k(`aria-describedby`,n.canWrite()?null:`query-writes-off`),D(2),j(n.canWrite()?-1:42),D(3),j(e.hasData?46:45)}}function rZ(e,t){e&1&&(F(0,`span`,31),K(1,`(paused)`),I())}function iZ(e,t){if(e&1&&(F(0,`dt`),K(1,`Failures`),I(),F(2,`dd`),K(3),I()),e&2){let e=W();D(3),q(e.failureCount)}}function aZ(e,t){if(e&1&&(F(0,`dt`),K(1,`Error`),I(),F(2,`dd`)(3,`code`,37),K(4),I()()),e&2){let e=W();D(4),q(e.error)}}function oZ(e,t){if(e&1&&(F(0,`h2`,29)(1,`code`),K(2),I()(),F(3,`dl`,30)(4,`dt`),K(5,`Status`),I(),F(6,`dd`)(7,`span`,27),K(8),I(),A(9,rZ,2,0,`span`,31),I(),F(10,`dt`),K(11,`Submitted`),I(),F(12,`dd`),K(13),I(),A(14,iZ,4,1),A(15,aZ,5,1),I(),F(16,`h3`,35),K(17,`Variables and data`),I(),dg(18,36)),e&2){let e=t,n=W(3),r=Ag(5);D(2),q(n.mutationLabel(e)),D(5),k(`data-tone`,n.tone(e.status)),D(),q(e.status),D(),j(e.isPaused?9:-1),D(4),q(n.age(e.submittedAt)),D(),j(e.failureCount?14:-1),D(),j(e.error?15:-1),D(3),P(`ngTemplateOutlet`,r)(`ngTemplateOutletContext`,z_(9,NX,e.variables,e.id))}}function sZ(e,t){if(e&1&&(F(0,`h2`,38),K(1,`Details`),I(),F(2,`p`,31),K(3),I()),e&2){let e=W(3);D(3),J(` Select a `,e.view()===`queries`?`query`:`mutation`,` to see its details. `)}}function cZ(e,t){if(e&1&&(F(0,`div`,17)(1,`ul`,21),M(2,JX,9,8,`li`,null,PX),I(),F(4,`section`,22,2),A(6,nZ,47,19)(7,oZ,19,12)(8,sZ,4,1),F(9,`p`,23),K(10),I()()()),e&2){let e,t=W(2);D(),k(`aria-label`,t.view()===`queries`?`Queries`:`Mutations`),D(),N(t.rows()),D(4),j((e=t.selectedQuery())?6:(e=t.selectedMutation())?7:8,e),D(4),q(t.message())}}function lZ(e,t){if(e&1){let e=B();F(0,`p`,8),K(1,` The queries and mutations of the TanStack Query client the app provides, read from the live page. Keys, errors and data are masked like other live data. `),I(),F(2,`div`,9)(3,`div`,10)(4,`button`,11),H(`click`,function(){return C(e),w(W().setView(`queries`))}),K(5,` Queries `),F(6,`span`,12),K(7),I()(),F(8,`button`,11),H(`click`,function(){return C(e),w(W().setView(`mutations`))}),K(9,` Mutations `),F(10,`span`,12),K(11),I()()(),F(12,`app-search-field`,13,1),w_(`valueChange`,function(t){C(e);let n=W();return C_(n.filter,t)||(n.filter=t),w(t)}),I(),A(14,BX,1,2,`app-select`,14),A(15,VX,1,2,`app-select`,15),F(16,`span`,16),K(17),I()(),A(18,UX,1,1),A(19,KX,3,1,`div`,5)(20,qX,5,0,`div`,5)(21,cZ,11,3,`div`,17)}if(e&2){let e,t=W();D(4),k(`aria-pressed`,t.view()===`queries`),D(3),q(t.page()?.queries.length??0),D(),k(`aria-pressed`,t.view()===`mutations`),D(3),q(t.page()?.mutations.length??0),D(),S_(`value`,t.filter),D(2),j(t.view()===`queries`?14:-1),D(),j(t.pages().length>1?15:-1),D(2),q(t.countText()),D(),j((e=t.page()?.more)?18:-1,e),D(),j(t.allRows().length?t.rows().length?21:20:19)}}function uZ(e,t){if(e&1&&(F(0,`p`,39),K(1,`Variables`),I(),F(2,`pre`,41),K(3),I()),e&2){let e=W(),t=W(3);D(3),q(t.prettyText(e.variables))}}function dZ(e,t){if(e&1&&(A(0,uZ,4,1),F(1,`p`,39),K(2,`Data`),I(),F(3,`pre`,40),K(4),I()),e&2){let e=t,n=W(3);j(e.variables===void 0?-1:0),D(4),q(e.data===void 0?`No data.`:n.prettyText(e.data))}}function fZ(e,t){if(e&1&&(F(0,`p`,31),K(1),I()),e&2){let e=W(3);D(),q(e.full().result.error??`The page did not send the data.`)}}function pZ(e,t){if(e&1&&A(0,dZ,5,2)(1,fZ,2,1,`p`,31),e&2){let e;j((e=W(2).full().result.detail)?0:1,e)}}function mZ(e,t){if(e&1&&(F(0,`pre`,42),K(1),I()),e&2){let e=W(2).preview,t=W();D(),q(t.prettyText(e))}}function hZ(e,t){if(e&1){let e=B();A(0,mZ,2,1,`pre`,42),F(1,`button`,33),H(`click`,function(){C(e);let t=W().id;return w(W().loadData(t))}),K(2),I()}if(e&2){let e=W().preview,t=W();j(e===void 0?-1:0),D(),P(`disabled`,t.loadingData()),D(),J(` `,t.loadingData()?`Loading…`:`Show all data`,` `)}}function gZ(e,t){if(e&1&&A(0,pZ,2,1)(1,hZ,3,3),e&2){let e=t.id;j(W().full()?.id===e?0:1)}}var _Z=[{value:`all`,label:`All statuses`},{value:`fetching`,label:`Fetching`},{value:`success`,label:`Success`},{value:`error`,label:`Error`},{value:`pending`,label:`Pending`},{value:`stale`,label:`Stale or invalidated`},{value:`inactive`,label:`No observers`}],vZ=class e{rpc=$(null);angularPages=uD(()=>this.rpc());connected=X(()=>Object.keys(this.angularPages()).length>0);destroyRef=S(vs);hostPageId=fT();unsubscribe;detailPanel=sv(`detailPanel`);filters=_Z;writesOff=Uw(`tanstackQuery`);canWrite=X(()=>IT(this.rpc(),`tanstackQuery`));pages=E([]);loaded=E(!1);failed=E(!1);view=E(`queries`);filter=E(``);status=E(`all`);selectedPageId=E(null);selectedId=E(null);busy=E(!1);message=E(``);loadingData=E(!1);full=Q({source:()=>this.selectedId(),computation:()=>null});now=E(Date.now());page=X(()=>{let e=this.pages();return e.find(e=>e.pageId===this.selectedPageId())??e.find(e=>e.pageId===this.hostPageId)??e[0]??null});pageOptions=X(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.url})));queries=X(()=>{let e=this.filter().trim().toLowerCase(),t=this.status();return(this.page()?.queries??[]).filter(n=>jX(n,t)&&(!e||n.keyText.toLowerCase().includes(e)))});mutations=X(()=>{let e=this.filter().trim().toLowerCase();return(this.page()?.mutations??[]).filter(t=>!e||this.mutationLabel(t).toLowerCase().includes(e))});allRows=X(()=>this.view()===`queries`?this.page()?.queries??[]:this.page()?.mutations??[]);rows=X(()=>(this.now(),this.view()===`queries`?this.queries().map(e=>({id:e.id,label:e.keyText,status:e.fetchStatus===`idle`?e.status:e.fetchStatus,tone:AX(e.status,e.fetchStatus),meta:`${DX(e)} · ${e.observers} ${e.observers===1?`observer`:`observers`} · ${this.age(e.dataUpdatedAt)}`})):this.mutations().map(e=>({id:e.id,label:this.mutationLabel(e),status:e.isPaused?`paused`:e.status,tone:e.isPaused?`warn`:AX(e.status),meta:`submitted ${this.age(e.submittedAt)}`}))));countText=X(()=>{let e=this.allRows().length;return`${this.rows().length} of ${e} ${this.view()===`queries`?`queries`:`mutations`}`});selectedQuery=X(()=>this.view()===`queries`?this.page()?.queries.find(e=>e.id===this.selectedId())??null:null);selectedMutation=X(()=>this.view()===`mutations`?this.page()?.mutations.find(e=>e.id===this.selectedId())??null:null);selected=X(()=>this.selectedQuery()??this.selectedMutation());constructor(){ac(()=>{let e=this.rpc();e&&this.load(e)});let e=setInterval(()=>this.now.set(Date.now()),1e3);this.destroyRef.onDestroy(()=>{clearInterval(e),this.unsubscribe?.()})}age(e){let t=this.page();if(!t)return OX(0,e);let n=t.at-t.reportedAt;return OX(this.now()+n-e,e)}freshnessOf(e){return DX(e)}duration(e){return kX(e)}tone(e){return AX(e)}prettyText(e){return OK(e)}mutationLabel(e){return e.keyText??`Mutation ${e.id}`}setView(e){this.view.set(e),this.selectedId.set(null),this.message.set(``)}selectPage(e){this.selectedPageId.set(e),this.selectedId.set(null),this.message.set(``)}select(e){this.selectedId.set(e),this.message.set(``),typeof matchMedia==`function`&&matchMedia(`(max-width: 880px)`).matches&&this.detailPanel()?.nativeElement.scrollIntoView?.({block:`nearest`})}clearFilters(){this.filter.set(``),this.status.set(`all`)}retry(){let e=this.rpc();e&&this.load(e)}async loadData(e){let t=this.page();if(t&&!this.loadingData()){this.loadingData.set(!0);try{let n=await _T(this.rpc(),`request-tanstack-query`,{pageId:t.pageId,request:{type:`detail`,id:e}});this.selectedId()===e&&this.full.set({id:e,result:n??{}})}catch{this.selectedId()===e&&this.full.set({id:e,result:{error:`Could not reach the page to read the data.`}})}finally{this.loadingData.set(!1)}}}async act(e,t){let n=this.page();if(n&&!this.busy()){this.busy.set(!0);try{let r=await _T(this.rpc(),`request-tanstack-query`,{pageId:n.pageId,request:{type:e,id:t}});this.message.set(r?.error??r?.message??`Done.`),this.full.set(null)}catch{this.message.set(`Could not reach the page.`)}finally{this.busy.set(!1)}}}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`tanstack-query`);if(this.destroyRef.destroyed)return;let n=e=>this.pages.set(EX(e));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-query-inspector`]],viewQuery:function(e,t){e&1&&Og(t.detailPanel,MX,5),e&2&&kg()},inputs:{rpc:[1,`rpc`]},decls:6,vars:1,consts:[[`dataTpl`,``],[`search`,``],[`detailPanel`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`role`,`status`,1,`state`,`empty-card`],[`type`,`button`,1,`btn`,3,`click`],[1,`state-title`],[1,`intro`],[1,`toolbar`],[`role`,`group`,`aria-label`,`Show`,1,`views`],[`type`,`button`,1,`view`,3,`click`],[1,`badge`],[`placeholder`,`Filter by key`,`saveKey`,`query`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Status`,1,`filter-select`,3,`options`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`options`,`value`],[`role`,`status`,1,`count`],[1,`layout`],[`ariaLabel`,`Status`,1,`filter-select`,3,`valueChange`,`options`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`valueChange`,`options`,`value`],[1,`notice`],[`appRovingList`,`button.row`,1,`rows`],[`aria-labelledby`,`query-detail-heading`,1,`detail`],[`role`,`status`,1,`message`],[`type`,`button`,1,`row`,3,`click`],[1,`row-top`],[1,`key`,3,`title`],[1,`pill`],[1,`row-meta`],[`id`,`query-detail-heading`,1,`detail-title`],[1,`kv`],[1,`muted`],[1,`actions`],[`type`,`button`,1,`btn`,3,`click`,`disabled`],[`id`,`query-writes-off`,1,`hint`],[1,`sub`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[1,`error`],[`id`,`query-detail-heading`,1,`sr-only`],[1,`label`],[`tabindex`,`0`,`aria-label`,`Data`],[`tabindex`,`0`,`aria-label`,`Variables`],[`tabindex`,`0`,`aria-label`,`Preview`]],template:function(e,t){e&1&&(A(0,FX,2,0,`p`,3)(1,IX,5,0,`div`,4)(2,zX,3,1,`div`,5)(3,lZ,22,10),Dh(4,gZ,2,1,`ng-template`,null,0,q_)),e&2&&j(t.loaded()?t.failed()?1:t.pages().length?3:2:0)},dependencies:[nP,Uv,lV,OD],styles:[`[_nghost-%COMP%] { display: block; min-width: 0; font-size: 13px; @@ -12387,7 +12401,7 @@ pre[_ngcontent-%COMP%]:focus-visible { .kv[_ngcontent-%COMP%] { grid-template-columns: minmax(0, 1fr); } -}`]})};function mZ(e,t){if(e&1){let e=B();R(0,`button`,2),U(`click`,function(){return C(e),w(W().confirmAct.emit(`restore`))}),K(1),z()}if(e&2){let e=W();G(`armed`,e.armed()===`restore`),V(`disabled`,!e.canWrite()),k(`aria-describedby`,e.canWrite()?null:`forms-writes-off`)(`title`,`Restore `+e.snapshot()),D(),J(` `,e.armed()===`restore`?`Confirm restore`:`Restore `+e.snapshot(),` `)}}function hZ(e,t){if(e&1&&(R(0,`p`,9),K(1),z()),e&2){let e=W();D(),q(e.writesOff)}}var gZ=class e{canWrite=$(!1);writesOff=$(``);picking=$(null);snapshot=$(null);armed=$(null);message=$(``);act=Q_();confirmAct=Q_();pick=Q_();cancelPick=Q_();static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-action-bar`]],inputs:{canWrite:[1,`canWrite`],writesOff:[1,`writesOff`],picking:[1,`picking`],snapshot:[1,`snapshot`],armed:[1,`armed`],message:[1,`message`]},outputs:{act:`act`,confirmAct:`confirmAct`,pick:`pick`,cancelPick:`cancelPick`},decls:22,vars:21,consts:[[1,`action-bar`],[`role`,`group`,`aria-label`,`Form actions`,1,`actions`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`type`,`button`,1,`small`,3,`click`],[`aria-hidden`,`true`,1,`divider`],[`type`,`button`,1,`small`,3,`armed`,`disabled`],[`aria-hidden`,`true`,1,`spacer`],[`type`,`button`,1,`small`,`danger`,3,`click`,`disabled`],[`type`,`button`,1,`small`,`primary`,3,`click`,`disabled`],[`id`,`forms-writes-off`,1,`muted`],[`role`,`status`,1,`status`]],template:function(e,t){e&1&&(R(0,`div`,0)(1,`div`,1)(2,`button`,2),U(`click`,function(){return t.act.emit(`touch-all`)}),K(3,` Touch all `),z(),R(4,`button`,2),U(`click`,function(){return t.act.emit(`revalidate`)}),K(5,` Revalidate `),z(),R(6,`button`,3),U(`click`,function(){return t.act.emit(`focus-first-invalid`)}),K(7,` Focus first invalid `),z(),R(8,`button`,3),U(`click`,function(){return t.picking()?t.cancelPick.emit():t.pick.emit()}),K(9),z(),og(10,`span`,4),R(11,`button`,3),U(`click`,function(){return t.act.emit(`snapshot`)}),K(12,`Snapshot`),z(),A(13,mZ,2,6,`button`,5),og(14,`span`,6),R(15,`button`,7),U(`click`,function(){return t.confirmAct.emit(`reset`)}),K(16),z(),R(17,`button`,8),U(`click`,function(){return t.confirmAct.emit(`submit`)}),K(18),z()(),A(19,hZ,2,1,`p`,9),R(20,`p`,10),K(21),z()()),e&2&&(D(2),V(`disabled`,!t.canWrite()),k(`aria-describedby`,t.canWrite()?null:`forms-writes-off`),D(2),V(`disabled`,!t.canWrite()),k(`aria-describedby`,t.canWrite()?null:`forms-writes-off`),D(4),G(`on`,t.picking()),k(`aria-pressed`,!!t.picking()),D(),J(` `,t.picking()?`Cancel picking`:`Pick field on page`,` `),D(4),j(t.snapshot()?13:-1),D(2),G(`armed`,t.armed()===`reset`),V(`disabled`,!t.canWrite()),k(`aria-describedby`,t.canWrite()?null:`forms-writes-off`),D(),J(` `,t.armed()===`reset`?`Confirm reset`:`Reset`,` `),D(),G(`armed`,t.armed()===`submit`),V(`disabled`,!t.canWrite()),k(`aria-describedby`,t.canWrite()?null:`forms-writes-off`),D(),J(` `,t.armed()===`submit`?`Confirm submit`:`Submit`,` `),D(),j(t.canWrite()?-1:19),D(2),q(t.message()))},styles:[`.muted[_ngcontent-%COMP%] { +}`]})};function yZ(e,t){if(e&1){let e=B();R(0,`button`,2),U(`click`,function(){return C(e),w(W().confirmAct.emit(`restore`))}),K(1),z()}if(e&2){let e=W();G(`armed`,e.armed()===`restore`),V(`disabled`,!e.canWrite()),k(`aria-describedby`,e.canWrite()?null:`forms-writes-off`)(`title`,`Restore `+e.snapshot()),D(),J(` `,e.armed()===`restore`?`Confirm restore`:`Restore `+e.snapshot(),` `)}}function bZ(e,t){if(e&1&&(R(0,`p`,9),K(1),z()),e&2){let e=W();D(),q(e.writesOff)}}var xZ=class e{canWrite=$(!1);writesOff=$(``);picking=$(null);snapshot=$(null);armed=$(null);message=$(``);act=ev();confirmAct=ev();pick=ev();cancelPick=ev();static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-action-bar`]],inputs:{canWrite:[1,`canWrite`],writesOff:[1,`writesOff`],picking:[1,`picking`],snapshot:[1,`snapshot`],armed:[1,`armed`],message:[1,`message`]},outputs:{act:`act`,confirmAct:`confirmAct`,pick:`pick`,cancelPick:`cancelPick`},decls:22,vars:21,consts:[[1,`action-bar`],[`role`,`group`,`aria-label`,`Form actions`,1,`actions`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`type`,`button`,1,`small`,3,`click`],[`aria-hidden`,`true`,1,`divider`],[`type`,`button`,1,`small`,3,`armed`,`disabled`],[`aria-hidden`,`true`,1,`spacer`],[`type`,`button`,1,`small`,`danger`,3,`click`,`disabled`],[`type`,`button`,1,`small`,`primary`,3,`click`,`disabled`],[`id`,`forms-writes-off`,1,`muted`],[`role`,`status`,1,`status`]],template:function(e,t){e&1&&(R(0,`div`,0)(1,`div`,1)(2,`button`,2),U(`click`,function(){return t.act.emit(`touch-all`)}),K(3,` Touch all `),z(),R(4,`button`,2),U(`click`,function(){return t.act.emit(`revalidate`)}),K(5,` Revalidate `),z(),R(6,`button`,3),U(`click`,function(){return t.act.emit(`focus-first-invalid`)}),K(7,` Focus first invalid `),z(),R(8,`button`,3),U(`click`,function(){return t.picking()?t.cancelPick.emit():t.pick.emit()}),K(9),z(),sg(10,`span`,4),R(11,`button`,3),U(`click`,function(){return t.act.emit(`snapshot`)}),K(12,`Snapshot`),z(),A(13,yZ,2,6,`button`,5),sg(14,`span`,6),R(15,`button`,7),U(`click`,function(){return t.confirmAct.emit(`reset`)}),K(16),z(),R(17,`button`,8),U(`click`,function(){return t.confirmAct.emit(`submit`)}),K(18),z()(),A(19,bZ,2,1,`p`,9),R(20,`p`,10),K(21),z()()),e&2&&(D(2),V(`disabled`,!t.canWrite()),k(`aria-describedby`,t.canWrite()?null:`forms-writes-off`),D(2),V(`disabled`,!t.canWrite()),k(`aria-describedby`,t.canWrite()?null:`forms-writes-off`),D(4),G(`on`,t.picking()),k(`aria-pressed`,!!t.picking()),D(),J(` `,t.picking()?`Cancel picking`:`Pick field on page`,` `),D(4),j(t.snapshot()?13:-1),D(2),G(`armed`,t.armed()===`reset`),V(`disabled`,!t.canWrite()),k(`aria-describedby`,t.canWrite()?null:`forms-writes-off`),D(),J(` `,t.armed()===`reset`?`Confirm reset`:`Reset`,` `),D(),G(`armed`,t.armed()===`submit`),V(`disabled`,!t.canWrite()),k(`aria-describedby`,t.canWrite()?null:`forms-writes-off`),D(),J(` `,t.armed()===`submit`?`Confirm submit`:`Submit`,` `),D(),j(t.canWrite()?-1:19),D(2),q(t.message()))},styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); } @@ -12686,7 +12700,7 @@ code[_ngcontent-%COMP%] { .divider[_ngcontent-%COMP%] { display: none; } -}`]})};function _Z(e){return(e??``).match(/```ts\n([\s\S]*)```\s*$/)?.[1]??null}function vZ(e){return`${e.split(`@`)[0].replace(/[^a-zA-Z0-9]+/g,`-`).replace(/([a-z0-9])([A-Z])/g,`$1-$2`).replace(/^-+|-+$/g,``).toLowerCase()||`form`}.spec.ts`}var yZ=class e{formId=$.required();rpc=$(null);message=Q({source:this.formId,computation:()=>``});async run(e){let t=this.formId(),n=await TT(this.rpc(),`forms-explain`,{kind:`playwright`,form:t});if(this.formId()!==t)return;if(n===null){this.message.set(`The devtools server did not answer. Try again.`);return}let r=_Z(n);if(!r){this.message.set(MT(n));return}if(e===`download`){let e=URL.createObjectURL(new Blob([r],{type:`text/typescript`})),n=document.createElement(`a`);n.href=e,n.download=vZ(t),n.click(),setTimeout(()=>URL.revokeObjectURL(e),0),this.message.set(`Downloaded ${n.download}.`);return}try{await navigator.clipboard.writeText(r),this.message.set(`Copied.`)}catch{this.message.set(`Clipboard is not available here.`)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-export-test`]],inputs:{formId:[1,`formId`],rpc:[1,`rpc`]},decls:9,vars:1,consts:[[`role`,`group`,`aria-label`,`Export the history as a test`,1,`export`],[1,`label`],[`type`,`button`,1,`small`,3,`click`],[`role`,`status`,1,`status`]],template:function(e,t){e&1&&(R(0,`div`,0)(1,`span`,1),K(2,`Playwright test`),z(),R(3,`button`,2),U(`click`,function(){return t.run(`copy`)}),K(4,`Copy Playwright test`),z(),R(5,`button`,2),U(`click`,function(){return t.run(`download`)}),K(6,`Download test`),z(),R(7,`span`,3),K(8),z()()),e&2&&(D(8),q(t.message()))},styles:[`.muted[_ngcontent-%COMP%] { +}`]})};function SZ(e){return(e??``).match(/```ts\n([\s\S]*)```\s*$/)?.[1]??null}function CZ(e){return`${e.split(`@`)[0].replace(/[^a-zA-Z0-9]+/g,`-`).replace(/([a-z0-9])([A-Z])/g,`$1-$2`).replace(/^-+|-+$/g,``).toLowerCase()||`form`}.spec.ts`}var wZ=class e{formId=$.required();rpc=$(null);message=Q({source:this.formId,computation:()=>``});async run(e){let t=this.formId(),n=await TT(this.rpc(),`forms-explain`,{kind:`playwright`,form:t});if(this.formId()!==t)return;if(n===null){this.message.set(`The devtools server did not answer. Try again.`);return}let r=SZ(n);if(!r){this.message.set(MT(n));return}if(e===`download`){let e=URL.createObjectURL(new Blob([r],{type:`text/typescript`})),n=document.createElement(`a`);n.href=e,n.download=CZ(t),n.click(),setTimeout(()=>URL.revokeObjectURL(e),0),this.message.set(`Downloaded ${n.download}.`);return}try{await navigator.clipboard.writeText(r),this.message.set(`Copied.`)}catch{this.message.set(`Clipboard is not available here.`)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-export-test`]],inputs:{formId:[1,`formId`],rpc:[1,`rpc`]},decls:9,vars:1,consts:[[`role`,`group`,`aria-label`,`Export the history as a test`,1,`export`],[1,`label`],[`type`,`button`,1,`small`,3,`click`],[`role`,`status`,1,`status`]],template:function(e,t){e&1&&(R(0,`div`,0)(1,`span`,1),K(2,`Playwright test`),z(),R(3,`button`,2),U(`click`,function(){return t.run(`copy`)}),K(4,`Copy Playwright test`),z(),R(5,`button`,2),U(`click`,function(){return t.run(`download`)}),K(6,`Download test`),z(),R(7,`span`,3),K(8),z()()),e&2&&(D(8),q(t.message()))},styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); } @@ -12958,7 +12972,7 @@ code[_ngcontent-%COMP%] { .status[_ngcontent-%COMP%] { color: var(--%NS%text-2); font-size: 13px; -}`]})},bZ=[`heading`];function xZ(e,t){if(e&1){let e=B();R(0,`div`,6)(1,`p`,9),K(2,`Could not explain this field. The devtools server did not answer.`),z(),R(3,`button`,11),U(`click`,function(){return C(e),w(W().retry())}),K(4,`Try again`),z()()}}function SZ(e,t){if(e&1&&(R(0,`pre`,7),K(1),z()),e&2){let e=W();k(`aria-busy`,e.text()===null?`true`:null),D(),q(e.text()??`Loading…`)}}function CZ(e,t){if(e&1){let e=B();R(0,`div`,8)(1,`label`,15),K(2),z(),R(3,`input`,16),U(`input`,function(t){return C(e),w(W().draft.set(t.target.value))})(`keydown.enter`,function(){return C(e),w(W().setValue())}),z(),R(4,`button`,17),U(`click`,function(){return C(e),w(W().setValue())}),K(5,` Set `),z()()}if(e&2){let e=W();D(2),J(`New value for `,e.node().path),D(),V(`value`,e.draft()),D(),V(`disabled`,!e.canWrite()),k(`aria-describedby`,e.canWrite()?null:`field-writes-off`)}}function wZ(e,t){if(e&1&&(R(0,`p`,9),K(1),R(2,`a`,18),K(3,`How to unmask it`),z()()),e&2){let e=W();D(),J(` No Set editor: this field is redacted (`,e.redactLabel(e.node().redacted),`). `),D(),V(`href`,e.unmaskDocsUrl,yu)}}function TZ(e,t){if(e&1&&(R(0,`p`,13),K(1),z()),e&2){let e=W();D(),q(e.writesOff)}}var EZ=class e{form=$.required();node=$.required();version=$(0);rpc=$(null);closed=Q_();canWrite=X(()=>IT(this.rpc(),`forms`));writesOff=Uw(`forms`);redactLabel=DT;unmaskDocsUrl=OT;target=X(()=>`${this.form().id}|${this.node().path}`);text=Q({source:this.target,computation:()=>null});failed=Q({source:this.target,computation:()=>!1});attempt=E(0);heading=av.required(`heading`);host=S(kl);draft=Q({source:this.target,computation:()=>``});message=Q({source:this.target,computation:()=>``});constructor(){ac(()=>{let e=this.form().id,t=this.node().path;this.version(),this.attempt();let n=this.rpc();Z(()=>this.load(n,e,t))}),fv(()=>{this.target();let e=Z(this.heading).nativeElement;this.host.nativeElement.scrollIntoView?.({block:`nearest`}),e.focus({preventScroll:!0})})}async load(e,t,n){if(!e)return;let r=await TT(e,`forms-explain`,{kind:`field`,form:t,path:n});if(this.form().id===t&&this.node().path===n){if(r===null){this.failed.set(!0);return}this.failed.set(!1),this.text.set(MT(r))}}retry(){this.failed.set(!1),this.attempt.update(e=>e+1)}async act(e){let t=this.form().id,n=this.node().path,r=await kT(this.rpc(),{action:e,formId:t,path:n});this.form().id===t&&this.node().path===n&&this.message.set(r.expression?`${AT(r)} ${r.expression}`:AT(r))}async setValue(){let e=this.form().id,t=this.node().path,n=await kT(this.rpc(),{action:`set-value`,formId:e,path:t,value:this.draft(),coerce:!0,mode:`user`});this.form().id===e&&this.node().path===t&&this.message.set(AT(n))}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-field-detail`]],viewQuery:function(e,t){e&1&&Dg(t.heading,bZ,5),e&2&&Og()},hostAttrs:[`role`,`region`,`aria-labelledby`,`forms-field-heading`],inputs:{form:[1,`form`],node:[1,`node`],version:[1,`version`],rpc:[1,`rpc`]},outputs:{closed:`closed`},decls:26,vars:11,consts:[[`heading`,``],[1,`head`],[1,`section-label`],[`id`,`forms-field-heading`,`tabindex`,`-1`],[1,`tag`],[`type`,`button`,1,`small`,`close`,3,`click`],[`role`,`alert`,1,`failed`],[1,`explain`],[1,`editor`],[1,`muted`],[`role`,`group`,`aria-label`,`Field actions`,1,`row`],[`type`,`button`,1,`small`,3,`click`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`id`,`field-writes-off`,1,`muted`],[`role`,`status`,1,`status`],[`for`,`field-value`,1,`sr-only`],[`id`,`field-value`,`type`,`text`,`placeholder`,`New value, read as the current value's type`,`autocomplete`,`off`,`spellcheck`,`false`,1,`field-input`,3,`input`,`keydown.enter`,`value`],[`type`,`button`,1,`small`,`primary`,3,`click`,`disabled`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`]],template:function(e,t){e&1&&(R(0,`div`,1)(1,`span`,2),K(2,`Field`),z(),R(3,`h3`,3,0),K(5),z(),R(6,`span`,4),K(7),z(),R(8,`button`,5),U(`click`,function(){return t.closed.emit()}),K(9,` Close `),z()(),A(10,xZ,5,0,`div`,6)(11,SZ,2,2,`pre`,7),A(12,CZ,6,4,`div`,8)(13,wZ,4,2,`p`,9),R(14,`div`,10)(15,`button`,11),U(`click`,function(){return t.act(`focus`)}),K(16,`Focus`),z(),R(17,`button`,12),U(`click`,function(){return t.act(`mark-touched`)}),K(18,` Touch `),z(),R(19,`button`,12),U(`click`,function(){return t.act(`revalidate`)}),K(20,` Revalidate `),z(),R(21,`button`,11),U(`click`,function(){return t.act(`store-as-global`)}),K(22,`Store as global`),z()(),A(23,TZ,2,1,`p`,13),R(24,`p`,14),K(25),z()),e&2&&(D(5),q(t.node().path||`(form)`),D(2),q(t.node().type),D(),k(`aria-label`,`Close details for `+(t.node().path||`the form`)),D(2),j(t.failed()?10:11),D(2),j(t.node().type===`control`&&!t.node().redacted?12:t.node().type===`control`?13:-1),D(5),V(`disabled`,!t.canWrite()),k(`aria-describedby`,t.canWrite()?null:`field-writes-off`),D(2),V(`disabled`,!t.canWrite()),k(`aria-describedby`,t.canWrite()?null:`field-writes-off`),D(4),j(t.canWrite()?-1:23),D(2),q(t.message()))},styles:[`.muted[_ngcontent-%COMP%] { +}`]})},TZ=[`heading`];function EZ(e,t){if(e&1){let e=B();R(0,`div`,6)(1,`p`,9),K(2,`Could not explain this field. The devtools server did not answer.`),z(),R(3,`button`,11),U(`click`,function(){return C(e),w(W().retry())}),K(4,`Try again`),z()()}}function DZ(e,t){if(e&1&&(R(0,`pre`,7),K(1),z()),e&2){let e=W();k(`aria-busy`,e.text()===null?`true`:null),D(),q(e.text()??`Loading…`)}}function OZ(e,t){if(e&1){let e=B();R(0,`div`,8)(1,`label`,15),K(2),z(),R(3,`input`,16),U(`input`,function(t){return C(e),w(W().draft.set(t.target.value))})(`keydown.enter`,function(){return C(e),w(W().setValue())}),z(),R(4,`button`,17),U(`click`,function(){return C(e),w(W().setValue())}),K(5,` Set `),z()()}if(e&2){let e=W();D(2),J(`New value for `,e.node().path),D(),V(`value`,e.draft()),D(),V(`disabled`,!e.canWrite()),k(`aria-describedby`,e.canWrite()?null:`field-writes-off`)}}function kZ(e,t){if(e&1&&(R(0,`p`,9),K(1),R(2,`a`,18),K(3,`How to unmask it`),z()()),e&2){let e=W();D(),J(` No Set editor: this field is redacted (`,e.redactLabel(e.node().redacted),`). `),D(),V(`href`,e.unmaskDocsUrl,bu)}}function AZ(e,t){if(e&1&&(R(0,`p`,13),K(1),z()),e&2){let e=W();D(),q(e.writesOff)}}var jZ=class e{form=$.required();node=$.required();version=$(0);rpc=$(null);closed=ev();canWrite=X(()=>IT(this.rpc(),`forms`));writesOff=Uw(`forms`);redactLabel=DT;unmaskDocsUrl=OT;target=X(()=>`${this.form().id}|${this.node().path}`);text=Q({source:this.target,computation:()=>null});failed=Q({source:this.target,computation:()=>!1});attempt=E(0);heading=sv.required(`heading`);host=S(kl);draft=Q({source:this.target,computation:()=>``});message=Q({source:this.target,computation:()=>``});constructor(){ac(()=>{let e=this.form().id,t=this.node().path;this.version(),this.attempt();let n=this.rpc();Z(()=>this.load(n,e,t))}),mv(()=>{this.target();let e=Z(this.heading).nativeElement;this.host.nativeElement.scrollIntoView?.({block:`nearest`}),e.focus({preventScroll:!0})})}async load(e,t,n){if(!e)return;let r=await TT(e,`forms-explain`,{kind:`field`,form:t,path:n});if(this.form().id===t&&this.node().path===n){if(r===null){this.failed.set(!0);return}this.failed.set(!1),this.text.set(MT(r))}}retry(){this.failed.set(!1),this.attempt.update(e=>e+1)}async act(e){let t=this.form().id,n=this.node().path,r=await kT(this.rpc(),{action:e,formId:t,path:n});this.form().id===t&&this.node().path===n&&this.message.set(r.expression?`${AT(r)} ${r.expression}`:AT(r))}async setValue(){let e=this.form().id,t=this.node().path,n=await kT(this.rpc(),{action:`set-value`,formId:e,path:t,value:this.draft(),coerce:!0,mode:`user`});this.form().id===e&&this.node().path===t&&this.message.set(AT(n))}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-field-detail`]],viewQuery:function(e,t){e&1&&Og(t.heading,TZ,5),e&2&&kg()},hostAttrs:[`role`,`region`,`aria-labelledby`,`forms-field-heading`],inputs:{form:[1,`form`],node:[1,`node`],version:[1,`version`],rpc:[1,`rpc`]},outputs:{closed:`closed`},decls:26,vars:11,consts:[[`heading`,``],[1,`head`],[1,`section-label`],[`id`,`forms-field-heading`,`tabindex`,`-1`],[1,`tag`],[`type`,`button`,1,`small`,`close`,3,`click`],[`role`,`alert`,1,`failed`],[1,`explain`],[1,`editor`],[1,`muted`],[`role`,`group`,`aria-label`,`Field actions`,1,`row`],[`type`,`button`,1,`small`,3,`click`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`id`,`field-writes-off`,1,`muted`],[`role`,`status`,1,`status`],[`for`,`field-value`,1,`sr-only`],[`id`,`field-value`,`type`,`text`,`placeholder`,`New value, read as the current value's type`,`autocomplete`,`off`,`spellcheck`,`false`,1,`field-input`,3,`input`,`keydown.enter`,`value`],[`type`,`button`,1,`small`,`primary`,3,`click`,`disabled`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`]],template:function(e,t){e&1&&(R(0,`div`,1)(1,`span`,2),K(2,`Field`),z(),R(3,`h3`,3,0),K(5),z(),R(6,`span`,4),K(7),z(),R(8,`button`,5),U(`click`,function(){return t.closed.emit()}),K(9,` Close `),z()(),A(10,EZ,5,0,`div`,6)(11,DZ,2,2,`pre`,7),A(12,OZ,6,4,`div`,8)(13,kZ,4,2,`p`,9),R(14,`div`,10)(15,`button`,11),U(`click`,function(){return t.act(`focus`)}),K(16,`Focus`),z(),R(17,`button`,12),U(`click`,function(){return t.act(`mark-touched`)}),K(18,` Touch `),z(),R(19,`button`,12),U(`click`,function(){return t.act(`revalidate`)}),K(20,` Revalidate `),z(),R(21,`button`,11),U(`click`,function(){return t.act(`store-as-global`)}),K(22,`Store as global`),z()(),A(23,AZ,2,1,`p`,13),R(24,`p`,14),K(25),z()),e&2&&(D(5),q(t.node().path||`(form)`),D(2),q(t.node().type),D(),k(`aria-label`,`Close details for `+(t.node().path||`the form`)),D(2),j(t.failed()?10:11),D(2),j(t.node().type===`control`&&!t.node().redacted?12:t.node().type===`control`?13:-1),D(5),V(`disabled`,!t.canWrite()),k(`aria-describedby`,t.canWrite()?null:`field-writes-off`),D(2),V(`disabled`,!t.canWrite()),k(`aria-describedby`,t.canWrite()?null:`field-writes-off`),D(4),j(t.canWrite()?-1:23),D(2),q(t.message()))},styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); } @@ -13299,7 +13313,7 @@ h3[_ngcontent-%COMP%]:focus-visible { .status[_ngcontent-%COMP%]:empty { height: 0; margin: -12px 0 0; -}`]})},DZ=()=>[],OZ=(e,t)=>t.id,kZ=(e,t)=>t.node.path;function AZ(e,t){if(e&1){let e=B();F(0,`label`)(1,`input`,10),H(`change`,function(){let t=C(e).$implicit;return w(W().toggleChip(t.id))}),I(),K(2),I()}if(e&2){let e=t.$implicit,n=W();D(),P(`checked`,n.active().has(e.id)),D(),J(` `,e.label,` `)}}function jZ(e,t){if(e&1){let e=B();F(0,`button`,25),H(`click`,function(){C(e);let t=W(2).$implicit;return w(W().toggleEdit(t.node))}),K(1,` Edit `),I()}if(e&2){let e=W(2).$implicit,t=W();P(`disabled`,!t.canWrite()),k(`aria-label`,`Edit `+(e.node.path||`the form`))(`aria-expanded`,t.editing()===e.node.path)(`aria-controls`,t.editing()===e.node.path?`forms-inline-editor`:null)(`aria-describedby`,t.canWrite()?null:`forms-writes-off`)}}function MZ(e,t){if(e&1&&(F(0,`div`,17),K(1,` typed `),F(2,`code`),K(3),V_(4,`json`),I(),K(5,`, not in the model yet `),I()),e&2){let e=W(2).$implicit;D(3),q(H_(4,1,e.node.uncommitted))}}function NZ(e,t){if(e&1&&(F(0,`div`,17),K(1,` resets to `),F(2,`code`),K(3),V_(4,`json`),I()()),e&2){let e=W(2).$implicit;D(3),q(H_(4,1,e.node.defaultValue))}}function PZ(e,t){if(e&1&&(F(0,`code`),K(1),V_(2,`json`),I(),A(3,jZ,2,5,`button`,24),A(4,MZ,6,3,`div`,17),A(5,NZ,5,3,`div`,17)),e&2){let e=W().$implicit;D(),q(H_(2,4,e.node.value)),D(2),j(e.node.materialized===!1?-1:3),D(),j(e.node.uncommitted===void 0?-1:4),D(),j(e.node.defaultValue===void 0?-1:5)}}function FZ(e,t){e&1&&(F(0,`span`,17),K(1,`not created yet`),I())}function IZ(e,t){if(e&1&&(F(0,`span`,18),K(1),I()),e&2){let e=W().$implicit;k(`data-status`,e.node.status),D(),q(e.node.status)}}function LZ(e,t){e&1&&(F(0,`span`),K(1,`touched`),I())}function RZ(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W().$implicit;D(),q(e.node.changed===!1?`dirty, unchanged`:`dirty`)}}function zZ(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W().$implicit;D(),J(`not validated (`,e.node.skipped,`)`)}}function BZ(e,t){if(e&1&&(F(0,`span`,20),K(1),I()),e&2){let e=W().$implicit;D(),J(`stale: `,e.node.stale.join(`, `))}}function VZ(e,t){e&1&&(F(0,`span`,20),K(1,`view out of sync`),I())}function HZ(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W().$implicit,t=W();D(),J(`redacted: `,t.redactLabel(e.node.redacted))}}function UZ(e,t){e&1&&(F(0,`span`),K(1,`required`),I())}function WZ(e,t){e&1&&(F(0,`span`),K(1,`readonly`),I())}function GZ(e,t){e&1&&(F(0,`span`),K(1,`hidden`),I())}function KZ(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W().$implicit;D(),J(`updates on `,e.node.updateOn)}}function qZ(e,t){e&1&&(F(0,`span`),K(1,`debouncing`),I())}function JZ(e,t){e&1&&(F(0,`span`),K(1,`validators`),I())}function YZ(e,t){e&1&&(F(0,`span`),K(1,`async validator`),I())}function XZ(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function ZZ(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W().$implicit;D(),q(e.node.accessor)}}function QZ(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W().$implicit;D(),J(`name `,e.node.name)}}function $Z(e,t){if(e&1&&(F(0,`span`),K(1),V_(2,`json`),I()),e&2){let e=t.$implicit;D(),J(`metadata `,H_(2,1,e))}}function eQ(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=t.$implicit;D(),J(`disabled: `,e)}}function tQ(e,t){if(e&1&&(F(0,`span`,27),K(1),I()),e&2){let e=W().$implicit;D(),J(`at `,e.params.path)}}function nQ(e,t){if(e&1&&(F(0,`span`,27),K(1),I()),e&2){let e=W().$implicit,t=W(2);D(),q(t.sourceText(e))}}function rQ(e,t){if(e&1&&(F(0,`div`),K(1),F(2,`code`,26),K(3),I(),A(4,tQ,2,1,`span`,27),A(5,nQ,2,1,`span`,27),I()),e&2){let e=t.$implicit,n=W().$implicit,r=W();D(),J(` `,r.errorText(n.node,e),` `),D(2),q(e.kind),D(),j(e.kind===`standardSchema`&&e.params?.path?4:-1),D(),j(e.source?5:-1)}}function iQ(e,t){e&1&&(F(0,`div`,22),K(1,`not shown to the user`),I())}function aQ(e,t){if(e&1){let e=B();F(0,`label`,34),K(1),I(),F(2,`input`,35),H(`input`,function(t){return C(e),w(W(3).draft.set(t.target.value))})(`keydown.enter`,function(){C(e);let t=W(2).$implicit;return w(W().saveValue(t.node))})(`keydown.escape`,function(t){return C(e),w(W(3).stopEdit(t))}),I(),F(3,`button`,36),H(`click`,function(){C(e);let t=W(2).$implicit;return w(W().saveValue(t.node))}),K(4,` Set value `),I()}if(e&2){let e=W(2).$implicit,t=W();D(),J(`New value for `,e.node.path),D(),P(`value`,t.draft())}}function oQ(e,t){if(e&1&&(F(0,`span`,17),K(1),I()),e&2){let e=W(2).$implicit,t=W();D(),J(`The value is redacted (`,t.redactLabel(e.node.redacted),`), so it cannot be edited here.`)}}function sQ(e,t){if(e&1){let e=B();F(0,`tr`,23)(1,`td`,28)(2,`div`,29),A(3,aQ,5,2)(4,oQ,2,1,`span`,17),F(5,`label`,30)(6,`input`,31),H(`change`,function(t){C(e);let n=W().$implicit;return w(W().mark(n.node,`touched`,t))})(`keydown.escape`,function(t){return C(e),w(W(2).stopEdit(t))}),I(),K(7,` Touched `),I(),F(8,`label`,30)(9,`input`,31),H(`change`,function(t){C(e);let n=W().$implicit;return w(W().mark(n.node,`dirty`,t))})(`keydown.escape`,function(t){return C(e),w(W(2).stopEdit(t))}),I(),K(10,` Dirty `),I(),F(11,`button`,32),H(`click`,function(){return C(e),w(W(2).stopEdit())}),K(12,`Done`),I()(),F(13,`p`,33),K(14),I()()()}if(e&2){let e=W().$implicit,t=W();D(),Xg(`padding-left`,28+e.depth*16,`px`),D(),k(`aria-label`,`Edit `+(e.node.path||`the form`)),D(),j(e.node.redacted?4:3),D(3),P(`checked`,e.node.touched),D(3),P(`checked`,e.node.dirty),D(5),q(t.editMessage())}}function cQ(e,t){if(e&1&&(F(0,`tr`)(1,`td`,37),K(2),I()()),e&2){let e=W().$implicit;D(),Xg(`padding-left`,28+e.depth*16,`px`),D(),Y(` `,e.node.truncated,` more fields under `,e.node.path||`the form`,` not shown `)}}function lQ(e,t){if(e&1){let e=B();F(0,`tr`,11),H(`mouseenter`,function(){let t=C(e).$implicit,n=W();return w(n.highlight.emit({formId:n.form().id,path:t.node.path}))})(`mouseleave`,function(){return C(e),w(W().highlight.emit(null))}),F(1,`th`,12)(2,`button`,13),H(`focus`,function(){let t=C(e).$implicit,n=W();return w(n.highlight.emit({formId:n.form().id,path:t.node.path}))})(`blur`,function(){return C(e),w(W().highlight.emit(null))})(`click`,function(){let t=C(e).$implicit;return w(W().toggleField.emit(t.node.path))}),K(3),I(),F(4,`span`,14),K(5),I()(),F(6,`td`,15),A(7,PZ,6,6),I(),F(8,`td`,16),A(9,FZ,2,0,`span`,17)(10,IZ,2,2,`span`,18),I(),F(11,`td`,19),A(12,LZ,2,0,`span`),A(13,RZ,2,1,`span`),A(14,zZ,2,1,`span`),A(15,BZ,2,1,`span`,20),A(16,VZ,2,0,`span`,20),A(17,HZ,2,1,`span`),A(18,UZ,2,0,`span`),A(19,WZ,2,0,`span`),A(20,GZ,2,0,`span`),A(21,KZ,2,1,`span`),A(22,qZ,2,0,`span`),A(23,JZ,2,0,`span`),A(24,YZ,2,0,`span`),M(25,XZ,2,1,`span`,null,Yh),A(27,ZZ,2,1,`span`),A(28,QZ,2,1,`span`),M(29,$Z,3,3,`span`,null,Jh),M(31,eQ,2,1,`span`,null,Jh),I(),F(33,`td`,21),M(34,rQ,6,4,`div`,null,Jh),A(36,iQ,2,0,`div`,22),I()(),A(37,sQ,15,7,`tr`,23),A(38,cQ,3,4,`tr`)}if(e&2){let e=t.$implicit,n=W();G(`invalid`,e.node.errors.length),D(),Xg(`padding-left`,12+e.depth*16,`px`),D(),k(`aria-label`,`Show details for `+(e.node.path||`the form`))(`aria-pressed`,e.node.path===n.fieldPath())(`title`,e.node.path||`(form)`),D(),J(` `,e.node.key||`(form)`,` `),D(2),q(e.node.type),D(2),j(e.node.type===`control`?7:-1),D(2),j(e.node.materialized===!1?9:10),D(3),j(e.node.touched?12:-1),D(),j(e.node.dirty?13:-1),D(),j(e.node.skipped?14:-1),D(),j(e.node.stale?.length?15:-1),D(),j(e.node.dom?.drift===void 0?-1:16),D(),j(e.node.redacted?17:-1),D(),j(e.node.required?18:-1),D(),j(e.node.readonly?19:-1),D(),j(e.node.hidden?20:-1),D(),j(e.node.updateOn?21:-1),D(),j(e.node.debouncing?22:-1),D(),j(e.node.validators?.sync?23:-1),D(),j(e.node.validators?.async?24:-1),D(),N(n.constraintList(e.node)),D(2),j(e.node.accessor?27:-1),D(),j(e.node.name?28:-1),D(),N(e.node.metadata??F_(29,DZ)),D(2),N(e.node.disabledReasons??F_(30,DZ)),D(3),N(e.node.errors),D(2),j(e.node.errors.length&&e.node.dom?.errorShown===!1?36:-1),D(),j(n.editing()===e.node.path?37:-1),D(),j(e.node.truncated?38:-1)}}function uQ(e,t){e&1&&K(0),e&2&&J(` No field path matches "`,W(2).filter(),`". `)}function dQ(e,t){e&1&&K(0,` No field matches the selected filters. `)}function fQ(e,t){if(e&1){let e=B();F(0,`button`,32),H(`click`,function(){C(e);let t=W(2),n=kg(2);return w(t.clearFilters.emit(n))}),K(1,` Clear filters `),I()}}function pQ(e,t){if(e&1&&(F(0,`tr`)(1,`td`,38)(2,`p`),A(3,uQ,1,1)(4,dQ,1,0),I(),A(5,fQ,2,0,`button`,39),I()()),e&2){let e=W();D(3),j(e.filter()?3:4),D(2),j(e.filtering()?5:-1)}}function mQ(e,t){if(e&1){let e=B();F(0,`app-forms-field-detail`,40),H(`closed`,function(){return C(e),w(W().closeField.emit())}),I()}if(e&2){let e=W();P(`form`,e.form())(`node`,t)(`version`,e.version())(`rpc`,e.rpc())}}var hQ=[{id:`invalid`,label:`Invalid`},{id:`dirty`,label:`Dirty`},{id:`touched`,label:`Touched`},{id:`disabled`,label:`Disabled`},{id:`hidden-error`,label:`Error not shown`}];function gQ(e,t){switch(t){case`invalid`:return e.errors.length>0;case`dirty`:return e.dirty&&e.type===`control`;case`touched`:return e.touched&&e.type===`control`;case`disabled`:return e.status===`DISABLED`;case`hidden-error`:return e.dom?.errorShown===!1}}function _Q(e){if(typeof e==`string`)return e;if(e===void 0)return``;try{return JSON.stringify(e)??``}catch{return``}}var vQ=class e{form=$.required();rows=$.required();fieldPath=$(null);selectedNode=$(null);version=$(0);rpc=$(null);filtering=$(!1);filterStatus=$(``);filter=rv(``);active=rv(new Set);toggleField=Q_();closeField=Q_();clearFilters=Q_();highlight=Q_();chips=hQ;redactLabel=DT;canWrite=X(()=>IT(this.rpc(),`forms`));formId=X(()=>this.form().id);editing=Q({source:this.formId,computation:()=>null});draft=E(``);editMessage=Q({source:this.editing,computation:()=>``});host=S(kl);injector=S(gs);toggleEdit(e){if(this.editing()===e.path){this.stopEdit();return}this.draft.set(_Q(e.value)),this.editing.set(e.path),ed(()=>this.host.nativeElement.querySelector(`#forms-inline-editor input`)?.focus(),{injector:this.injector})}stopEdit(e){if(e?.stopPropagation(),this.editing()===null)return;let t=this.host.nativeElement.querySelector(`#forms-inline-editor`)?.closest(`tr`)?.previousElementSibling?.querySelector(`button.edit`);this.editing.set(null),t?.focus()}async saveValue(e){let t=this.form().id,n=await kT(this.rpc(),{action:`set-value`,formId:t,path:e.path,value:this.draft(),coerce:!0,mode:`user`});this.form().id===t&&this.editing()===e.path&&this.editMessage.set(AT(n))}async mark(e,t,n){let r=n.target,i=r.checked,a=t===`touched`?i?`mark-touched`:`mark-untouched`:i?`mark-dirty`:`mark-pristine`,o=this.form().id,s=await kT(this.rpc(),{action:a,formId:o,path:e.path});s.ok||(r.checked=!i),this.form().id===o&&this.editing()===e.path&&this.editMessage.set(AT(s))}toggleChip(e){this.active.update(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}sourceText(e){let t=wT[e.source??``]??e.source??``;return e.from===void 0?t:`${t} on ${e.from||`the form`}`}constraintList(e){return Object.entries(e.constraints??{}).map(([e,t])=>`${e} ${t}`)}errorText(e,t){return/^[a-z]/.test(t.message)?`${e.key||`The form`} ${t.message}`:t.message}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-fields`]],inputs:{form:[1,`form`],rows:[1,`rows`],fieldPath:[1,`fieldPath`],selectedNode:[1,`selectedNode`],version:[1,`version`],rpc:[1,`rpc`],filtering:[1,`filtering`],filterStatus:[1,`filterStatus`],filter:[1,`filter`],active:[1,`active`]},outputs:{filter:`filterChange`,active:`activeChange`,toggleField:`toggleField`,closeField:`closeField`,clearFilters:`clearFilters`,highlight:`highlight`},decls:29,vars:4,consts:[[`fieldFilter`,``],[1,`filters`],[`placeholder`,`Filter fields by path`,`saveKey`,`forms`,1,`search`,3,`valueChange`,`value`],[1,`chips`],[1,`sr-only`],[`role`,`status`,1,`sr-only`],[`role`,`region`,`aria-label`,`Fields`,`tabindex`,`0`,1,`table-scroll`],[1,`fields`],[`scope`,`col`],[3,`form`,`node`,`version`,`rpc`],[`type`,`checkbox`,3,`change`,`checked`],[3,`mouseenter`,`mouseleave`],[`scope`,`row`,1,`name`],[`type`,`button`,1,`field`,3,`focus`,`blur`,`click`],[1,`type`],[1,`value`],[1,`status-cell`],[1,`muted`],[1,`badge`],[1,`flags`],[1,`warn`],[1,`errors`],[1,`unseen`],[1,`edit-row`],[`type`,`button`,1,`edit`,3,`disabled`],[`type`,`button`,1,`edit`,3,`click`,`disabled`],[1,`kind-tag`],[1,`source`],[`colspan`,`5`],[`id`,`forms-inline-editor`,`role`,`group`,1,`inline-editor`],[1,`check`],[`type`,`checkbox`,3,`change`,`keydown.escape`,`checked`],[`type`,`button`,1,`small`,3,`click`],[`role`,`status`,1,`status`],[`for`,`forms-inline-value`,1,`sr-only`],[`id`,`forms-inline-value`,`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,1,`filter`,`inline-input`,3,`input`,`keydown.enter`,`keydown.escape`,`value`],[`type`,`button`,1,`small`,`primary`,3,`click`],[`colspan`,`5`,1,`muted`,`truncated`],[`colspan`,`5`,1,`no-match`],[`type`,`button`,1,`small`],[3,`closed`,`form`,`node`,`version`,`rpc`]],template:function(e,t){if(e&1){let e=B();F(0,`div`,1)(1,`app-search-field`,2,0),S_(`valueChange`,function(n){return C(e),x_(t.filter,n)||(t.filter=n),w(n)}),I(),F(3,`fieldset`,3)(4,`legend`,4),K(5,`Show only fields that are`),I(),M(6,AZ,3,2,`label`,null,OZ),I()(),F(8,`p`,5),K(9),I(),F(10,`div`,6)(11,`table`,7)(12,`thead`)(13,`tr`)(14,`th`,8),K(15,`Field`),I(),F(16,`th`,8),K(17,`Value`),I(),F(18,`th`,8),K(19,`Status`),I(),F(20,`th`,8),K(21,`State`),I(),F(22,`th`,8),K(23,`Errors`),I()()(),F(24,`tbody`),M(25,lQ,39,31,null,null,kZ,!1,pQ,6,2,`tr`),I()()(),A(28,mQ,1,4,`app-forms-field-detail`,9)}if(e&2){let e;D(),b_(`value`,t.filter),D(5),N(t.chips),D(3),q(t.filterStatus()),D(16),N(t.rows()),D(3),j((e=t.selectedNode())?28:-1,e)}},dependencies:[nP,EZ,Uv],styles:[`.muted[_ngcontent-%COMP%] { +}`]})},MZ=()=>[],NZ=(e,t)=>t.id,PZ=(e,t)=>t.node.path;function FZ(e,t){if(e&1){let e=B();F(0,`label`)(1,`input`,10),H(`change`,function(){let t=C(e).$implicit;return w(W().toggleChip(t.id))}),I(),K(2),I()}if(e&2){let e=t.$implicit,n=W();D(),P(`checked`,n.active().has(e.id)),D(),J(` `,e.label,` `)}}function IZ(e,t){if(e&1){let e=B();F(0,`button`,25),H(`click`,function(){C(e);let t=W(2).$implicit;return w(W().toggleEdit(t.node))}),K(1,` Edit `),I()}if(e&2){let e=W(2).$implicit,t=W();P(`disabled`,!t.canWrite()),k(`aria-label`,`Edit `+(e.node.path||`the form`))(`aria-expanded`,t.editing()===e.node.path)(`aria-controls`,t.editing()===e.node.path?`forms-inline-editor`:null)(`aria-describedby`,t.canWrite()?null:`forms-writes-off`)}}function LZ(e,t){if(e&1&&(F(0,`div`,17),K(1,` typed `),F(2,`code`),K(3),U_(4,`json`),I(),K(5,`, not in the model yet `),I()),e&2){let e=W(2).$implicit;D(3),q(W_(4,1,e.node.uncommitted))}}function RZ(e,t){if(e&1&&(F(0,`div`,17),K(1,` resets to `),F(2,`code`),K(3),U_(4,`json`),I()()),e&2){let e=W(2).$implicit;D(3),q(W_(4,1,e.node.defaultValue))}}function zZ(e,t){if(e&1&&(F(0,`code`),K(1),U_(2,`json`),I(),A(3,IZ,2,5,`button`,24),A(4,LZ,6,3,`div`,17),A(5,RZ,5,3,`div`,17)),e&2){let e=W().$implicit;D(),q(W_(2,4,e.node.value)),D(2),j(e.node.materialized===!1?-1:3),D(),j(e.node.uncommitted===void 0?-1:4),D(),j(e.node.defaultValue===void 0?-1:5)}}function BZ(e,t){e&1&&(F(0,`span`,17),K(1,`not created yet`),I())}function VZ(e,t){if(e&1&&(F(0,`span`,18),K(1),I()),e&2){let e=W().$implicit;k(`data-status`,e.node.status),D(),q(e.node.status)}}function HZ(e,t){e&1&&(F(0,`span`),K(1,`touched`),I())}function UZ(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W().$implicit;D(),q(e.node.changed===!1?`dirty, unchanged`:`dirty`)}}function WZ(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W().$implicit;D(),J(`not validated (`,e.node.skipped,`)`)}}function GZ(e,t){if(e&1&&(F(0,`span`,20),K(1),I()),e&2){let e=W().$implicit;D(),J(`stale: `,e.node.stale.join(`, `))}}function KZ(e,t){e&1&&(F(0,`span`,20),K(1,`view out of sync`),I())}function qZ(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W().$implicit,t=W();D(),J(`redacted: `,t.redactLabel(e.node.redacted))}}function JZ(e,t){e&1&&(F(0,`span`),K(1,`required`),I())}function YZ(e,t){e&1&&(F(0,`span`),K(1,`readonly`),I())}function XZ(e,t){e&1&&(F(0,`span`),K(1,`hidden`),I())}function ZZ(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W().$implicit;D(),J(`updates on `,e.node.updateOn)}}function QZ(e,t){e&1&&(F(0,`span`),K(1,`debouncing`),I())}function $Z(e,t){e&1&&(F(0,`span`),K(1,`validators`),I())}function eQ(e,t){e&1&&(F(0,`span`),K(1,`async validator`),I())}function tQ(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function nQ(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W().$implicit;D(),q(e.node.accessor)}}function rQ(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W().$implicit;D(),J(`name `,e.node.name)}}function iQ(e,t){if(e&1&&(F(0,`span`),K(1),U_(2,`json`),I()),e&2){let e=t.$implicit;D(),J(`metadata `,W_(2,1,e))}}function aQ(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=t.$implicit;D(),J(`disabled: `,e)}}function oQ(e,t){if(e&1&&(F(0,`span`,27),K(1),I()),e&2){let e=W().$implicit;D(),J(`at `,e.params.path)}}function sQ(e,t){if(e&1&&(F(0,`span`,27),K(1),I()),e&2){let e=W().$implicit,t=W(2);D(),q(t.sourceText(e))}}function cQ(e,t){if(e&1&&(F(0,`div`),K(1),F(2,`code`,26),K(3),I(),A(4,oQ,2,1,`span`,27),A(5,sQ,2,1,`span`,27),I()),e&2){let e=t.$implicit,n=W().$implicit,r=W();D(),J(` `,r.errorText(n.node,e),` `),D(2),q(e.kind),D(),j(e.kind===`standardSchema`&&e.params?.path?4:-1),D(),j(e.source?5:-1)}}function lQ(e,t){e&1&&(F(0,`div`,22),K(1,`not shown to the user`),I())}function uQ(e,t){if(e&1){let e=B();F(0,`label`,34),K(1),I(),F(2,`input`,35),H(`input`,function(t){return C(e),w(W(3).draft.set(t.target.value))})(`keydown.enter`,function(){C(e);let t=W(2).$implicit;return w(W().saveValue(t.node))})(`keydown.escape`,function(t){return C(e),w(W(3).stopEdit(t))}),I(),F(3,`button`,36),H(`click`,function(){C(e);let t=W(2).$implicit;return w(W().saveValue(t.node))}),K(4,` Set value `),I()}if(e&2){let e=W(2).$implicit,t=W();D(),J(`New value for `,e.node.path),D(),P(`value`,t.draft())}}function dQ(e,t){if(e&1&&(F(0,`span`,17),K(1),I()),e&2){let e=W(2).$implicit,t=W();D(),J(`The value is redacted (`,t.redactLabel(e.node.redacted),`), so it cannot be edited here.`)}}function fQ(e,t){if(e&1){let e=B();F(0,`tr`,23)(1,`td`,28)(2,`div`,29),A(3,uQ,5,2)(4,dQ,2,1,`span`,17),F(5,`label`,30)(6,`input`,31),H(`change`,function(t){C(e);let n=W().$implicit;return w(W().mark(n.node,`touched`,t))})(`keydown.escape`,function(t){return C(e),w(W(2).stopEdit(t))}),I(),K(7,` Touched `),I(),F(8,`label`,30)(9,`input`,31),H(`change`,function(t){C(e);let n=W().$implicit;return w(W().mark(n.node,`dirty`,t))})(`keydown.escape`,function(t){return C(e),w(W(2).stopEdit(t))}),I(),K(10,` Dirty `),I(),F(11,`button`,32),H(`click`,function(){return C(e),w(W(2).stopEdit())}),K(12,`Done`),I()(),F(13,`p`,33),K(14),I()()()}if(e&2){let e=W().$implicit,t=W();D(),Zg(`padding-left`,28+e.depth*16,`px`),D(),k(`aria-label`,`Edit `+(e.node.path||`the form`)),D(),j(e.node.redacted?4:3),D(3),P(`checked`,e.node.touched),D(3),P(`checked`,e.node.dirty),D(5),q(t.editMessage())}}function pQ(e,t){if(e&1&&(F(0,`tr`)(1,`td`,37),K(2),I()()),e&2){let e=W().$implicit;D(),Zg(`padding-left`,28+e.depth*16,`px`),D(),Y(` `,e.node.truncated,` more fields under `,e.node.path||`the form`,` not shown `)}}function mQ(e,t){if(e&1){let e=B();F(0,`tr`,11),H(`mouseenter`,function(){let t=C(e).$implicit,n=W();return w(n.highlight.emit({formId:n.form().id,path:t.node.path}))})(`mouseleave`,function(){return C(e),w(W().highlight.emit(null))}),F(1,`th`,12)(2,`button`,13),H(`focus`,function(){let t=C(e).$implicit,n=W();return w(n.highlight.emit({formId:n.form().id,path:t.node.path}))})(`blur`,function(){return C(e),w(W().highlight.emit(null))})(`click`,function(){let t=C(e).$implicit;return w(W().toggleField.emit(t.node.path))}),K(3),I(),F(4,`span`,14),K(5),I()(),F(6,`td`,15),A(7,zZ,6,6),I(),F(8,`td`,16),A(9,BZ,2,0,`span`,17)(10,VZ,2,2,`span`,18),I(),F(11,`td`,19),A(12,HZ,2,0,`span`),A(13,UZ,2,1,`span`),A(14,WZ,2,1,`span`),A(15,GZ,2,1,`span`,20),A(16,KZ,2,0,`span`,20),A(17,qZ,2,1,`span`),A(18,JZ,2,0,`span`),A(19,YZ,2,0,`span`),A(20,XZ,2,0,`span`),A(21,ZZ,2,1,`span`),A(22,QZ,2,0,`span`),A(23,$Z,2,0,`span`),A(24,eQ,2,0,`span`),M(25,tQ,2,1,`span`,null,Xh),A(27,nQ,2,1,`span`),A(28,rQ,2,1,`span`),M(29,iQ,3,3,`span`,null,Yh),M(31,aQ,2,1,`span`,null,Yh),I(),F(33,`td`,21),M(34,cQ,6,4,`div`,null,Yh),A(36,lQ,2,0,`div`,22),I()(),A(37,fQ,15,7,`tr`,23),A(38,pQ,3,4,`tr`)}if(e&2){let e=t.$implicit,n=W();G(`invalid`,e.node.errors.length),D(),Zg(`padding-left`,12+e.depth*16,`px`),D(),k(`aria-label`,`Show details for `+(e.node.path||`the form`))(`aria-pressed`,e.node.path===n.fieldPath())(`title`,e.node.path||`(form)`),D(),J(` `,e.node.key||`(form)`,` `),D(2),q(e.node.type),D(2),j(e.node.type===`control`?7:-1),D(2),j(e.node.materialized===!1?9:10),D(3),j(e.node.touched?12:-1),D(),j(e.node.dirty?13:-1),D(),j(e.node.skipped?14:-1),D(),j(e.node.stale?.length?15:-1),D(),j(e.node.dom?.drift===void 0?-1:16),D(),j(e.node.redacted?17:-1),D(),j(e.node.required?18:-1),D(),j(e.node.readonly?19:-1),D(),j(e.node.hidden?20:-1),D(),j(e.node.updateOn?21:-1),D(),j(e.node.debouncing?22:-1),D(),j(e.node.validators?.sync?23:-1),D(),j(e.node.validators?.async?24:-1),D(),N(n.constraintList(e.node)),D(2),j(e.node.accessor?27:-1),D(),j(e.node.name?28:-1),D(),N(e.node.metadata??L_(29,MZ)),D(2),N(e.node.disabledReasons??L_(30,MZ)),D(3),N(e.node.errors),D(2),j(e.node.errors.length&&e.node.dom?.errorShown===!1?36:-1),D(),j(n.editing()===e.node.path?37:-1),D(),j(e.node.truncated?38:-1)}}function hQ(e,t){e&1&&K(0),e&2&&J(` No field path matches "`,W(2).filter(),`". `)}function gQ(e,t){e&1&&K(0,` No field matches the selected filters. `)}function _Q(e,t){if(e&1){let e=B();F(0,`button`,32),H(`click`,function(){C(e);let t=W(2),n=Ag(2);return w(t.clearFilters.emit(n))}),K(1,` Clear filters `),I()}}function vQ(e,t){if(e&1&&(F(0,`tr`)(1,`td`,38)(2,`p`),A(3,hQ,1,1)(4,gQ,1,0),I(),A(5,_Q,2,0,`button`,39),I()()),e&2){let e=W();D(3),j(e.filter()?3:4),D(2),j(e.filtering()?5:-1)}}function yQ(e,t){if(e&1){let e=B();F(0,`app-forms-field-detail`,40),H(`closed`,function(){return C(e),w(W().closeField.emit())}),I()}if(e&2){let e=W();P(`form`,e.form())(`node`,t)(`version`,e.version())(`rpc`,e.rpc())}}var bQ=[{id:`invalid`,label:`Invalid`},{id:`dirty`,label:`Dirty`},{id:`touched`,label:`Touched`},{id:`disabled`,label:`Disabled`},{id:`hidden-error`,label:`Error not shown`}];function xQ(e,t){switch(t){case`invalid`:return e.errors.length>0;case`dirty`:return e.dirty&&e.type===`control`;case`touched`:return e.touched&&e.type===`control`;case`disabled`:return e.status===`DISABLED`;case`hidden-error`:return e.dom?.errorShown===!1}}function SQ(e){if(typeof e==`string`)return e;if(e===void 0)return``;try{return JSON.stringify(e)??``}catch{return``}}var CQ=class e{form=$.required();rows=$.required();fieldPath=$(null);selectedNode=$(null);version=$(0);rpc=$(null);filtering=$(!1);filterStatus=$(``);filter=av(``);active=av(new Set);toggleField=ev();closeField=ev();clearFilters=ev();highlight=ev();chips=bQ;redactLabel=DT;canWrite=X(()=>IT(this.rpc(),`forms`));formId=X(()=>this.form().id);editing=Q({source:this.formId,computation:()=>null});draft=E(``);editMessage=Q({source:this.editing,computation:()=>``});host=S(kl);injector=S(gs);toggleEdit(e){if(this.editing()===e.path){this.stopEdit();return}this.draft.set(SQ(e.value)),this.editing.set(e.path),td(()=>this.host.nativeElement.querySelector(`#forms-inline-editor input`)?.focus(),{injector:this.injector})}stopEdit(e){if(e?.stopPropagation(),this.editing()===null)return;let t=this.host.nativeElement.querySelector(`#forms-inline-editor`)?.closest(`tr`)?.previousElementSibling?.querySelector(`button.edit`);this.editing.set(null),t?.focus()}async saveValue(e){let t=this.form().id,n=await kT(this.rpc(),{action:`set-value`,formId:t,path:e.path,value:this.draft(),coerce:!0,mode:`user`});this.form().id===t&&this.editing()===e.path&&this.editMessage.set(AT(n))}async mark(e,t,n){let r=n.target,i=r.checked,a=t===`touched`?i?`mark-touched`:`mark-untouched`:i?`mark-dirty`:`mark-pristine`,o=this.form().id,s=await kT(this.rpc(),{action:a,formId:o,path:e.path});s.ok||(r.checked=!i),this.form().id===o&&this.editing()===e.path&&this.editMessage.set(AT(s))}toggleChip(e){this.active.update(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}sourceText(e){let t=wT[e.source??``]??e.source??``;return e.from===void 0?t:`${t} on ${e.from||`the form`}`}constraintList(e){return Object.entries(e.constraints??{}).map(([e,t])=>`${e} ${t}`)}errorText(e,t){return/^[a-z]/.test(t.message)?`${e.key||`The form`} ${t.message}`:t.message}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-fields`]],inputs:{form:[1,`form`],rows:[1,`rows`],fieldPath:[1,`fieldPath`],selectedNode:[1,`selectedNode`],version:[1,`version`],rpc:[1,`rpc`],filtering:[1,`filtering`],filterStatus:[1,`filterStatus`],filter:[1,`filter`],active:[1,`active`]},outputs:{filter:`filterChange`,active:`activeChange`,toggleField:`toggleField`,closeField:`closeField`,clearFilters:`clearFilters`,highlight:`highlight`},decls:29,vars:4,consts:[[`fieldFilter`,``],[1,`filters`],[`placeholder`,`Filter fields by path`,`saveKey`,`forms`,1,`search`,3,`valueChange`,`value`],[1,`chips`],[1,`sr-only`],[`role`,`status`,1,`sr-only`],[`role`,`region`,`aria-label`,`Fields`,`tabindex`,`0`,1,`table-scroll`],[1,`fields`],[`scope`,`col`],[3,`form`,`node`,`version`,`rpc`],[`type`,`checkbox`,3,`change`,`checked`],[3,`mouseenter`,`mouseleave`],[`scope`,`row`,1,`name`],[`type`,`button`,1,`field`,3,`focus`,`blur`,`click`],[1,`type`],[1,`value`],[1,`status-cell`],[1,`muted`],[1,`badge`],[1,`flags`],[1,`warn`],[1,`errors`],[1,`unseen`],[1,`edit-row`],[`type`,`button`,1,`edit`,3,`disabled`],[`type`,`button`,1,`edit`,3,`click`,`disabled`],[1,`kind-tag`],[1,`source`],[`colspan`,`5`],[`id`,`forms-inline-editor`,`role`,`group`,1,`inline-editor`],[1,`check`],[`type`,`checkbox`,3,`change`,`keydown.escape`,`checked`],[`type`,`button`,1,`small`,3,`click`],[`role`,`status`,1,`status`],[`for`,`forms-inline-value`,1,`sr-only`],[`id`,`forms-inline-value`,`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,1,`filter`,`inline-input`,3,`input`,`keydown.enter`,`keydown.escape`,`value`],[`type`,`button`,1,`small`,`primary`,3,`click`],[`colspan`,`5`,1,`muted`,`truncated`],[`colspan`,`5`,1,`no-match`],[`type`,`button`,1,`small`],[3,`closed`,`form`,`node`,`version`,`rpc`]],template:function(e,t){if(e&1){let e=B();F(0,`div`,1)(1,`app-search-field`,2,0),w_(`valueChange`,function(n){return C(e),C_(t.filter,n)||(t.filter=n),w(n)}),I(),F(3,`fieldset`,3)(4,`legend`,4),K(5,`Show only fields that are`),I(),M(6,FZ,3,2,`label`,null,NZ),I()(),F(8,`p`,5),K(9),I(),F(10,`div`,6)(11,`table`,7)(12,`thead`)(13,`tr`)(14,`th`,8),K(15,`Field`),I(),F(16,`th`,8),K(17,`Value`),I(),F(18,`th`,8),K(19,`Status`),I(),F(20,`th`,8),K(21,`State`),I(),F(22,`th`,8),K(23,`Errors`),I()()(),F(24,`tbody`),M(25,mQ,39,31,null,null,PZ,!1,vQ,6,2,`tr`),I()()(),A(28,yQ,1,4,`app-forms-field-detail`,9)}if(e&2){let e;D(),S_(`value`,t.filter),D(5),N(t.chips),D(3),q(t.filterStatus()),D(16),N(t.rows()),D(3),j((e=t.selectedNode())?28:-1,e)}},dependencies:[nP,jZ,Gv],styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); } @@ -14012,7 +14026,7 @@ code[_ngcontent-%COMP%] { .fields[_ngcontent-%COMP%] .no-match[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:last-child { margin-bottom: 0; -}`]})},yQ=(e,t)=>t.id;function bQ(e,t){if(e&1){let e=B();R(0,`label`,3)(1,`input`,5),U(`change`,function(t){return C(e),w(W().allPages.set(t.target.checked))}),z(),K(2,` All pages `),z()}if(e&2){let e=W();D(),V(`checked`,e.allPages())}}function xQ(e,t){if(e&1&&(R(0,`span`,12),K(1),R(2,`span`,11),K(3),z()()),e&2){let e=t;D(),q(e),D(2),J(` `,e===1?`error`:`errors`)}}function SQ(e,t){if(e&1){let e=B();R(0,`li`)(1,`button`,6),U(`click`,function(){let t=C(e).$implicit;return w(W().selectForm.emit(t.id))}),og(2,`span`,7),R(3,`span`,8),K(4),z(),R(5,`span`,9),K(6),R(7,`span`,10),K(8),z(),R(9,`span`,11),K(10),z()(),A(11,xQ,4,2,`span`,12),z()()}if(e&2){let e,n=t.$implicit,r=W();D(),G(`active`,n.id===r.selectedId()),k(`aria-current`,n.id===r.selectedId()?`true`:null),D(),k(`data-status`,n.root.status),D(),k(`title`,n.label),D(),q(n.label),D(2),J(``,r.kindLabel(n.kind),` · `),D(2),q(n.id),D(2),J(`, `,n.root.status),D(),j((e=r.counts().get(n.id)?.errors)?11:-1,e)}}var CQ=class e{forms=$.required();selectedId=$(null);counts=$.required();showToggle=$(!1);allPages=rv(!1);selectForm=Q_();kindLabel(e){return CT[e]}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-list`]],inputs:{forms:[1,`forms`],selectedId:[1,`selectedId`],counts:[1,`counts`],showToggle:[1,`showToggle`],allPages:[1,`allPages`]},outputs:{allPages:`allPagesChange`,selectForm:`selectForm`},decls:9,vars:2,consts:[[1,`sidebar`],[`id`,`forms-list-heading`,1,`list-heading`],[1,`list-count`],[1,`page-toggle`],[`aria-labelledby`,`forms-list-heading`,1,`form-list`],[`type`,`checkbox`,3,`change`,`checked`],[`type`,`button`,1,`form-item`,3,`click`],[`aria-hidden`,`true`,1,`dot`],[1,`label`],[1,`kind`],[1,`id`],[1,`sr-only`],[1,`count`]],template:function(e,t){e&1&&(R(0,`div`,0)(1,`h2`,1),K(2,` Forms `),R(3,`span`,2),K(4),z()(),A(5,bQ,3,1,`label`,3),R(6,`ul`,4),M(7,SQ,12,10,`li`,null,yQ),z()()),e&2&&(D(4),q(t.forms().length),D(),j(t.showToggle()?5:-1),D(2),N(t.forms()))},styles:[`[_nghost-%COMP%] { +}`]})},wQ=(e,t)=>t.id;function TQ(e,t){if(e&1){let e=B();R(0,`label`,3)(1,`input`,5),U(`change`,function(t){return C(e),w(W().allPages.set(t.target.checked))}),z(),K(2,` All pages `),z()}if(e&2){let e=W();D(),V(`checked`,e.allPages())}}function EQ(e,t){if(e&1&&(R(0,`span`,12),K(1),R(2,`span`,11),K(3),z()()),e&2){let e=t;D(),q(e),D(2),J(` `,e===1?`error`:`errors`)}}function DQ(e,t){if(e&1){let e=B();R(0,`li`)(1,`button`,6),U(`click`,function(){let t=C(e).$implicit;return w(W().selectForm.emit(t.id))}),sg(2,`span`,7),R(3,`span`,8),K(4),z(),R(5,`span`,9),K(6),R(7,`span`,10),K(8),z(),R(9,`span`,11),K(10),z()(),A(11,EQ,4,2,`span`,12),z()()}if(e&2){let e,n=t.$implicit,r=W();D(),G(`active`,n.id===r.selectedId()),k(`aria-current`,n.id===r.selectedId()?`true`:null),D(),k(`data-status`,n.root.status),D(),k(`title`,n.label),D(),q(n.label),D(2),J(``,r.kindLabel(n.kind),` · `),D(2),q(n.id),D(2),J(`, `,n.root.status),D(),j((e=r.counts().get(n.id)?.errors)?11:-1,e)}}var OQ=class e{forms=$.required();selectedId=$(null);counts=$.required();showToggle=$(!1);allPages=av(!1);selectForm=ev();kindLabel(e){return CT[e]}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-list`]],inputs:{forms:[1,`forms`],selectedId:[1,`selectedId`],counts:[1,`counts`],showToggle:[1,`showToggle`],allPages:[1,`allPages`]},outputs:{allPages:`allPagesChange`,selectForm:`selectForm`},decls:9,vars:2,consts:[[1,`sidebar`],[`id`,`forms-list-heading`,1,`list-heading`],[1,`list-count`],[1,`page-toggle`],[`aria-labelledby`,`forms-list-heading`,1,`form-list`],[`type`,`checkbox`,3,`change`,`checked`],[`type`,`button`,1,`form-item`,3,`click`],[`aria-hidden`,`true`,1,`dot`],[1,`label`],[1,`kind`],[1,`id`],[1,`sr-only`],[1,`count`]],template:function(e,t){e&1&&(R(0,`div`,0)(1,`h2`,1),K(2,` Forms `),R(3,`span`,2),K(4),z()(),A(5,TQ,3,1,`label`,3),R(6,`ul`,4),M(7,DQ,12,10,`li`,null,wQ),z()()),e&2&&(D(4),q(t.forms().length),D(),j(t.showToggle()?5:-1),D(2),N(t.forms()))},styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -14201,7 +14215,7 @@ code[_ngcontent-%COMP%] { max-height: 240px; overflow-y: auto; } -}`]})},wQ=()=>[],TQ=(e,t)=>t.node.path;function EQ(e,t){if(e&1&&(R(0,`span`,7),K(1),z()),e&2){let e=t.$implicit;D(),q(e)}}function DQ(e,t){if(e&1&&(R(0,`span`,7),K(1),z()),e&2){let e=t.$implicit;D(),q(e)}}function OQ(e,t){if(e&1&&(R(0,`span`,7),K(1),V_(2,`json`),z()),e&2){let e=t.$implicit;D(),J(`metadata `,H_(2,1,e))}}function kQ(e,t){if(e&1&&(R(0,`span`,7),K(1),z()),e&2){let e=t.$implicit;D(),q(e)}}function AQ(e,t){if(e&1&&(R(0,`tr`)(1,`th`,5)(2,`code`),K(3),z(),R(4,`span`,6),K(5),z()(),R(6,`td`),M(7,EQ,2,1,`span`,7,Yh),z(),R(9,`td`),M(10,DQ,2,1,`span`,7,Yh),M(12,OQ,3,3,`span`,7,Jh),z(),R(14,`td`),M(15,kQ,2,1,`span`,7,Yh),z()()),e&2){let e=t.$implicit;D(),Xg(`padding-left`,12+e.depth*16,`px`),D(2),q(e.node.key||`(form)`),D(2),q(e.node.type),D(2),N(e.rules),D(3),N(e.constraints),D(2),N(e.node.metadata??F_(4,wQ)),D(3),N(e.states)}}function jQ(e,t){if(e&1&&(R(0,`div`,1)(1,`table`,3)(2,`thead`)(3,`tr`)(4,`th`,4),K(5,`Field`),z(),R(6,`th`,4),K(7,`Rules`),z(),R(8,`th`,4),K(9,`Constraints`),z(),R(10,`th`,4),K(11,`State now`),z()()(),R(12,`tbody`),M(13,AQ,17,5,`tr`,null,TQ),z()()()),e&2){let e=W();D(13),N(e.rows())}}function MQ(e,t){e&1&&(R(0,`p`,2),K(1,` No field of this form has a schema rule. Pass a schema function as the second argument of `),R(2,`code`),K(3,`form()`),z(),K(4,` to add validators and rules. `),z())}var NQ=[[`sync`,`validator`,`validators`],[`tree`,`cross-field rule`,`cross-field rules`],[`async`,`async validator`,`async validators`],[`hidden`,`hidden rule`,`hidden rules`],[`disabled`,`disabled rule`,`disabled rules`],[`readonly`,`readonly rule`,`readonly rules`],[`metadata`,`metadata entry`,`metadata entries`]];function PQ(e){let t=e.required?[`required`]:[];for(let[n,r,i]of NQ){let a=e.rules?.[n];a&&t.push(`${a} ${a===1?r:i}`)}return t}function FQ(e){let t=[];e.hidden&&t.push(e.hiddenBy===`parent`?`hidden by a parent`:`hidden`),e.readonly&&t.push(e.readonlyBy===`parent`?`readonly by a parent`:`readonly`);for(let n of e.disabledReasons??[])t.push(`disabled: ${n}`);return e.debouncing&&t.push(`debouncing`),t}var IQ=class e{form=$.required();rows=X(()=>{let e=[],t=(n,r)=>{let i=e.length,a={node:n,depth:r,rules:PQ(n),constraints:Object.entries(n.constraints??{}).map(([e,t])=>`${e} ${t}`),states:FQ(n)},o=a.rules.length>0||a.constraints.length>0||a.states.length>0||!!n.metadata?.length;for(let e of n.children??[])o=t(e,r+1)||o;return o&&e.splice(i,0,a),o};return t(this.form().root,0),e});static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-schema`]],inputs:{form:[1,`form`]},decls:7,vars:1,consts:[[1,`intro`],[`role`,`region`,`aria-label`,`Schema rules`,`tabindex`,`0`,1,`table-scroll`],[1,`empty`],[1,`schema`],[`scope`,`col`],[`scope`,`row`],[1,`type`],[1,`chip`]],template:function(e,t){e&1&&(R(0,`p`,0),K(1,` The rules the schema function of `),R(2,`code`),K(3,`form()`),z(),K(4,` sets on each field, read from Angular's logic tree, with the constraints and states they produce right now. Fields without rules are left out. `),z(),A(5,jQ,15,0,`div`,1)(6,MQ,5,0,`p`,2)),e&2&&(D(5),j(t.rows().length?5:6))},dependencies:[Uv],styles:[`.muted[_ngcontent-%COMP%] { +}`]})},kQ=()=>[],AQ=(e,t)=>t.node.path;function jQ(e,t){if(e&1&&(R(0,`span`,7),K(1),z()),e&2){let e=t.$implicit;D(),q(e)}}function MQ(e,t){if(e&1&&(R(0,`span`,7),K(1),z()),e&2){let e=t.$implicit;D(),q(e)}}function NQ(e,t){if(e&1&&(R(0,`span`,7),K(1),U_(2,`json`),z()),e&2){let e=t.$implicit;D(),J(`metadata `,W_(2,1,e))}}function PQ(e,t){if(e&1&&(R(0,`span`,7),K(1),z()),e&2){let e=t.$implicit;D(),q(e)}}function FQ(e,t){if(e&1&&(R(0,`tr`)(1,`th`,5)(2,`code`),K(3),z(),R(4,`span`,6),K(5),z()(),R(6,`td`),M(7,jQ,2,1,`span`,7,Xh),z(),R(9,`td`),M(10,MQ,2,1,`span`,7,Xh),M(12,NQ,3,3,`span`,7,Yh),z(),R(14,`td`),M(15,PQ,2,1,`span`,7,Xh),z()()),e&2){let e=t.$implicit;D(),Zg(`padding-left`,12+e.depth*16,`px`),D(2),q(e.node.key||`(form)`),D(2),q(e.node.type),D(2),N(e.rules),D(3),N(e.constraints),D(2),N(e.node.metadata??L_(4,kQ)),D(3),N(e.states)}}function IQ(e,t){if(e&1&&(R(0,`div`,1)(1,`table`,3)(2,`thead`)(3,`tr`)(4,`th`,4),K(5,`Field`),z(),R(6,`th`,4),K(7,`Rules`),z(),R(8,`th`,4),K(9,`Constraints`),z(),R(10,`th`,4),K(11,`State now`),z()()(),R(12,`tbody`),M(13,FQ,17,5,`tr`,null,AQ),z()()()),e&2){let e=W();D(13),N(e.rows())}}function LQ(e,t){e&1&&(R(0,`p`,2),K(1,` No field of this form has a schema rule. Pass a schema function as the second argument of `),R(2,`code`),K(3,`form()`),z(),K(4,` to add validators and rules. `),z())}var RQ=[[`sync`,`validator`,`validators`],[`tree`,`cross-field rule`,`cross-field rules`],[`async`,`async validator`,`async validators`],[`hidden`,`hidden rule`,`hidden rules`],[`disabled`,`disabled rule`,`disabled rules`],[`readonly`,`readonly rule`,`readonly rules`],[`metadata`,`metadata entry`,`metadata entries`]];function zQ(e){let t=e.required?[`required`]:[];for(let[n,r,i]of RQ){let a=e.rules?.[n];a&&t.push(`${a} ${a===1?r:i}`)}return t}function BQ(e){let t=[];e.hidden&&t.push(e.hiddenBy===`parent`?`hidden by a parent`:`hidden`),e.readonly&&t.push(e.readonlyBy===`parent`?`readonly by a parent`:`readonly`);for(let n of e.disabledReasons??[])t.push(`disabled: ${n}`);return e.debouncing&&t.push(`debouncing`),t}var VQ=class e{form=$.required();rows=X(()=>{let e=[],t=(n,r)=>{let i=e.length,a={node:n,depth:r,rules:zQ(n),constraints:Object.entries(n.constraints??{}).map(([e,t])=>`${e} ${t}`),states:BQ(n)},o=a.rules.length>0||a.constraints.length>0||a.states.length>0||!!n.metadata?.length;for(let e of n.children??[])o=t(e,r+1)||o;return o&&e.splice(i,0,a),o};return t(this.form().root,0),e});static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-schema`]],inputs:{form:[1,`form`]},decls:7,vars:1,consts:[[1,`intro`],[`role`,`region`,`aria-label`,`Schema rules`,`tabindex`,`0`,1,`table-scroll`],[1,`empty`],[1,`schema`],[`scope`,`col`],[`scope`,`row`],[1,`type`],[1,`chip`]],template:function(e,t){e&1&&(R(0,`p`,0),K(1,` The rules the schema function of `),R(2,`code`),K(3,`form()`),z(),K(4,` sets on each field, read from Angular's logic tree, with the constraints and states they produce right now. Fields without rules are left out. `),z(),A(5,IQ,15,0,`div`,1)(6,LQ,5,0,`p`,2)),e&2&&(D(5),j(t.rows().length?5:6))},dependencies:[Gv],styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); } @@ -14523,7 +14537,7 @@ code[_ngcontent-%COMP%] { font-size: 12px; line-height: 20px; overflow-wrap: anywhere; -}`]})};function LQ(e,t){if(e&1){let e=B();R(0,`div`,0)(1,`p`,4),K(2,`Could not explain this form`),z(),R(3,`p`),K(4,`The devtools server did not answer. Check that the app is running, then try again.`),z(),R(5,`button`,2),U(`click`,function(){return C(e),w(W().retry())}),K(6,`Try again`),z()()}}function RQ(e,t){if(e&1&&(R(0,`section`,5)(1,`h3`,6),K(2,`Submit`),z(),R(3,`pre`,7),K(4),z()(),R(5,`section`,8)(6,`h3`,9),K(7,`Payload`),z(),R(8,`pre`,7),K(9),z()()),e&2){let e=W();D(3),k(`aria-busy`,e.submit()===null?`true`:null),D(),q(e.submit()??`Loading…`),D(4),k(`aria-busy`,e.payload()===null?`true`:null),D(),q(e.payload()??`Loading…`)}}function zQ(e,t){if(e&1){let e=B();R(0,`div`,0)(1,`p`,3),K(2,`Could not check this form`),z(),R(3,`p`),K(4,`The devtools server did not answer. Check that the app is running, then try again.`),z(),R(5,`button`,4),U(`click`,function(){return C(e),w(W().retry())}),K(6,`Try again`),z()()}}function BQ(e,t){e&1&&(R(0,`div`,1),og(1,`span`,5),R(2,`p`),K(3,`Checking the form for problems…`),z()())}function VQ(e,t){e&1&&(R(0,`div`,2)(1,`span`,6),T(),R(2,`svg`,7),og(3,`path`,8),z()(),cs(),R(4,`p`,3),K(5,`No problems found`),z(),R(6,`p`),K(7,`For generic accessibility checks, run axe on the page.`),z()())}function HQ(e,t){if(e&1){let e=B();R(0,`span`,15),K(1,`at `),R(2,`button`,19),U(`click`,function(){let t=C(e);return w(W(3).showField.emit(t))}),R(3,`span`,20),K(4,`Show field `),z(),R(5,`code`),K(6),z()()()}e&2&&(D(6),q(t))}function UQ(e,t){if(e&1&&(R(0,`li`)(1,`div`,12)(2,`span`,13),K(3),z(),R(4,`code`,14),K(5),z(),A(6,HQ,7,1,`span`,15),z(),R(7,`p`,16),K(8),z(),R(9,`p`,17)(10,`span`,18),K(11,`Fix`),z(),K(12),z()()),e&2){let e,n=t.$implicit;k(`data-severity`,n.severity),D(2),k(`data-tone`,n.severity===`info`?``:n.severity===`error`?`bad`:`warn`),D(),q(n.severity),D(2),q(n.rule),D(),j((e=n.path)?6:-1,e),D(2),q(n.message),D(4),J(` `,n.fix)}}function WQ(e,t){if(e&1&&(R(0,`p`,9)(1,`span`,10),K(2),z(),K(3),z(),R(4,`ul`,11),M(5,UQ,13,7,`li`,null,Jh),z()),e&2){let e=W();D(2),q(e.findings().length),D(),J(` `,e.findings().length===1?`finding`:`findings`,` `),D(2),N(e.findings())}}var GQ=class e{formId=$.required();version=$(0);rpc=$(null);submit=Q({source:this.formId,computation:()=>null});payload=Q({source:this.formId,computation:()=>null});failed=Q({source:this.formId,computation:()=>!1});message=E(``);attempt=E(0);constructor(){ac(()=>{let e=this.formId();this.version(),this.attempt();let t=this.rpc();t&&Z(async()=>{let[n,r]=await Promise.all([TT(t,`forms-explain`,{kind:`submit`,form:e}),TT(t,`forms-explain`,{kind:`payload`,form:e})]);if(this.formId()===e){if(n===null||r===null){this.failed.set(!0);return}this.failed.set(!1),this.submit.set(MT(n)),this.payload.set(MT(r))}})})}retry(){this.failed.set(!1),this.attempt.update(e=>e+1)}async copyFixture(){let e=(await TT(this.rpc(),`forms-explain`,{kind:`fixture`,form:this.formId()})??``).match(/```ts\n([\s\S]*)```\s*$/)?.[1];if(!e){this.message.set(`No test fixture is available for this form.`);return}try{await navigator.clipboard.writeText(e),this.message.set(`Copied.`)}catch{this.message.set(`Clipboard is not available here.`)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-submit`]],inputs:{formId:[1,`formId`],version:[1,`version`],rpc:[1,`rpc`]},decls:7,vars:2,consts:[[`role`,`alert`,1,`empty-state`],[1,`fixture`],[`type`,`button`,1,`small`,3,`click`],[`role`,`status`,1,`status`],[1,`empty-title`],[`aria-labelledby`,`forms-submit-title`,1,`block`],[`id`,`forms-submit-title`,1,`section-label`],[1,`explain`],[`aria-labelledby`,`forms-payload-title`,1,`block`],[`id`,`forms-payload-title`,1,`section-label`]],template:function(e,t){e&1&&(A(0,LQ,7,0,`div`,0)(1,RQ,10,4),R(2,`div`,1)(3,`button`,2),U(`click`,function(){return t.copyFixture()}),K(4,`Copy test fixture`),z(),R(5,`span`,3),K(6),z()()),e&2&&(j(+!t.failed()),D(6),q(t.message()))},styles:[`.muted[_ngcontent-%COMP%] { +}`]})};function HQ(e,t){if(e&1){let e=B();R(0,`div`,0)(1,`p`,4),K(2,`Could not explain this form`),z(),R(3,`p`),K(4,`The devtools server did not answer. Check that the app is running, then try again.`),z(),R(5,`button`,2),U(`click`,function(){return C(e),w(W().retry())}),K(6,`Try again`),z()()}}function UQ(e,t){if(e&1&&(R(0,`section`,5)(1,`h3`,6),K(2,`Submit`),z(),R(3,`pre`,7),K(4),z()(),R(5,`section`,8)(6,`h3`,9),K(7,`Payload`),z(),R(8,`pre`,7),K(9),z()()),e&2){let e=W();D(3),k(`aria-busy`,e.submit()===null?`true`:null),D(),q(e.submit()??`Loading…`),D(4),k(`aria-busy`,e.payload()===null?`true`:null),D(),q(e.payload()??`Loading…`)}}function WQ(e,t){if(e&1){let e=B();R(0,`div`,0)(1,`p`,3),K(2,`Could not check this form`),z(),R(3,`p`),K(4,`The devtools server did not answer. Check that the app is running, then try again.`),z(),R(5,`button`,4),U(`click`,function(){return C(e),w(W().retry())}),K(6,`Try again`),z()()}}function GQ(e,t){e&1&&(R(0,`div`,1),sg(1,`span`,5),R(2,`p`),K(3,`Checking the form for problems…`),z()())}function KQ(e,t){e&1&&(R(0,`div`,2)(1,`span`,6),T(),R(2,`svg`,7),sg(3,`path`,8),z()(),cs(),R(4,`p`,3),K(5,`No problems found`),z(),R(6,`p`),K(7,`For generic accessibility checks, run axe on the page.`),z()())}function qQ(e,t){if(e&1){let e=B();R(0,`span`,15),K(1,`at `),R(2,`button`,19),U(`click`,function(){let t=C(e);return w(W(3).showField.emit(t))}),R(3,`span`,20),K(4,`Show field `),z(),R(5,`code`),K(6),z()()()}e&2&&(D(6),q(t))}function JQ(e,t){if(e&1&&(R(0,`li`)(1,`div`,12)(2,`span`,13),K(3),z(),R(4,`code`,14),K(5),z(),A(6,qQ,7,1,`span`,15),z(),R(7,`p`,16),K(8),z(),R(9,`p`,17)(10,`span`,18),K(11,`Fix`),z(),K(12),z()()),e&2){let e,n=t.$implicit;k(`data-severity`,n.severity),D(2),k(`data-tone`,n.severity===`info`?``:n.severity===`error`?`bad`:`warn`),D(),q(n.severity),D(2),q(n.rule),D(),j((e=n.path)?6:-1,e),D(2),q(n.message),D(4),J(` `,n.fix)}}function YQ(e,t){if(e&1&&(R(0,`p`,9)(1,`span`,10),K(2),z(),K(3),z(),R(4,`ul`,11),M(5,JQ,13,7,`li`,null,Yh),z()),e&2){let e=W();D(2),q(e.findings().length),D(),J(` `,e.findings().length===1?`finding`:`findings`,` `),D(2),N(e.findings())}}var XQ=class e{formId=$.required();version=$(0);rpc=$(null);submit=Q({source:this.formId,computation:()=>null});payload=Q({source:this.formId,computation:()=>null});failed=Q({source:this.formId,computation:()=>!1});message=E(``);attempt=E(0);constructor(){ac(()=>{let e=this.formId();this.version(),this.attempt();let t=this.rpc();t&&Z(async()=>{let[n,r]=await Promise.all([TT(t,`forms-explain`,{kind:`submit`,form:e}),TT(t,`forms-explain`,{kind:`payload`,form:e})]);if(this.formId()===e){if(n===null||r===null){this.failed.set(!0);return}this.failed.set(!1),this.submit.set(MT(n)),this.payload.set(MT(r))}})})}retry(){this.failed.set(!1),this.attempt.update(e=>e+1)}async copyFixture(){let e=(await TT(this.rpc(),`forms-explain`,{kind:`fixture`,form:this.formId()})??``).match(/```ts\n([\s\S]*)```\s*$/)?.[1];if(!e){this.message.set(`No test fixture is available for this form.`);return}try{await navigator.clipboard.writeText(e),this.message.set(`Copied.`)}catch{this.message.set(`Clipboard is not available here.`)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-submit`]],inputs:{formId:[1,`formId`],version:[1,`version`],rpc:[1,`rpc`]},decls:7,vars:2,consts:[[`role`,`alert`,1,`empty-state`],[1,`fixture`],[`type`,`button`,1,`small`,3,`click`],[`role`,`status`,1,`status`],[1,`empty-title`],[`aria-labelledby`,`forms-submit-title`,1,`block`],[`id`,`forms-submit-title`,1,`section-label`],[1,`explain`],[`aria-labelledby`,`forms-payload-title`,1,`block`],[`id`,`forms-payload-title`,1,`section-label`]],template:function(e,t){e&1&&(A(0,HQ,7,0,`div`,0)(1,UQ,10,4),R(2,`div`,1)(3,`button`,2),U(`click`,function(){return t.copyFixture()}),K(4,`Copy test fixture`),z(),R(5,`span`,3),K(6),z()()),e&2&&(j(+!t.failed()),D(6),q(t.message()))},styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); } @@ -14795,7 +14809,7 @@ code[_ngcontent-%COMP%] { flex-wrap: wrap; gap: 8px 12px; align-items: center; -}`]})},KQ=class e{formId=$.required();version=$(0);rpc=$(null);showField=Q_();findings=Q({source:this.formId,computation:()=>null});failed=Q({source:this.formId,computation:()=>!1});attempt=E(0);constructor(){ac(()=>{let e=this.formId();this.version(),this.attempt();let t=this.rpc();t&&Z(async()=>{let n=await TT(t,`forms-lint`,{form:e});this.formId()===e&&(this.failed.set(n===null),n&&this.findings.set(n))})})}retry(){this.failed.set(!1),this.attempt.update(e=>e+1)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-lint`]],inputs:{formId:[1,`formId`],version:[1,`version`],rpc:[1,`rpc`]},outputs:{showField:`showField`},decls:4,vars:1,consts:[[`role`,`alert`,1,`empty-state`],[`role`,`status`,1,`empty-state`],[1,`empty-state`],[1,`empty-title`],[`type`,`button`,1,`small`,3,`click`],[`aria-hidden`,`true`,1,`spinner`],[`aria-hidden`,`true`,1,`ok-icon`],[`width`,`16`,`height`,`16`,`viewBox`,`0 0 24 24`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`2.5`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`],[`d`,`M20 6 9 17l-5-5`],[1,`summary`],[1,`tabular`],[1,`findings`],[1,`meta`],[1,`tag`,`severity`],[1,`rule`],[1,`muted`,`path`],[1,`message`],[1,`fix`],[1,`fix-label`],[`type`,`button`,1,`summary-link`,3,`click`],[1,`sr-only`]],template:function(e,t){e&1&&A(0,zQ,7,0,`div`,0)(1,BQ,4,0,`div`,1)(2,VQ,8,0,`div`,2)(3,WQ,7,2),e&2&&j(t.failed()?0:t.findings()===null?1:t.findings().length?3:2)},styles:[`.muted[_ngcontent-%COMP%] { +}`]})},ZQ=class e{formId=$.required();version=$(0);rpc=$(null);showField=ev();findings=Q({source:this.formId,computation:()=>null});failed=Q({source:this.formId,computation:()=>!1});attempt=E(0);constructor(){ac(()=>{let e=this.formId();this.version(),this.attempt();let t=this.rpc();t&&Z(async()=>{let n=await TT(t,`forms-lint`,{form:e});this.formId()===e&&(this.failed.set(n===null),n&&this.findings.set(n))})})}retry(){this.failed.set(!1),this.attempt.update(e=>e+1)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-lint`]],inputs:{formId:[1,`formId`],version:[1,`version`],rpc:[1,`rpc`]},outputs:{showField:`showField`},decls:4,vars:1,consts:[[`role`,`alert`,1,`empty-state`],[`role`,`status`,1,`empty-state`],[1,`empty-state`],[1,`empty-title`],[`type`,`button`,1,`small`,3,`click`],[`aria-hidden`,`true`,1,`spinner`],[`aria-hidden`,`true`,1,`ok-icon`],[`width`,`16`,`height`,`16`,`viewBox`,`0 0 24 24`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`2.5`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`],[`d`,`M20 6 9 17l-5-5`],[1,`summary`],[1,`tabular`],[1,`findings`],[1,`meta`],[1,`tag`,`severity`],[1,`rule`],[1,`muted`,`path`],[1,`message`],[1,`fix`],[1,`fix-label`],[`type`,`button`,1,`summary-link`,3,`click`],[1,`sr-only`]],template:function(e,t){e&1&&A(0,WQ,7,0,`div`,0)(1,GQ,4,0,`div`,1)(2,KQ,8,0,`div`,2)(3,YQ,7,2),e&2&&j(t.failed()?0:t.findings()===null?1:t.findings().length?3:2)},styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); } @@ -15151,7 +15165,7 @@ code[_ngcontent-%COMP%] { font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; -}`]})};function qQ(e,t){if(e&1&&(R(0,`span`,3),K(1),z()),e&2){let e=W().$implicit;D(),J(`on page `,e.pageId)}}function JQ(e,t){if(e&1&&(R(0,`li`)(1,`code`),K(2),z(),A(3,qQ,2,1,`span`,3),z()),e&2){let e=t.$implicit,n=W();D(2),q(e.message),D(),j(n.showPages()?3:-1)}}var YQ=class e{errors=$.required();showPages=$(!1);static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-setup-errors`]],inputs:{errors:[1,`errors`],showPages:[1,`showPages`]},decls:8,vars:2,consts:[[`role`,`status`,1,`setup-errors`],[1,`setup-title`],[1,`setup-hint`],[1,`setup-page`]],template:function(e,t){e&1&&(R(0,`div`,0)(1,`p`,1),K(2),z(),R(3,`p`,2),K(4,` A form with a setup error can be missing from the list or behave unlike its template. Check the directives and value accessors it names. `),z(),R(5,`ul`),M(6,JQ,4,2,`li`,null,Jh),z()()),e&2&&(D(2),Y(` Angular reported `,t.errors().length,` forms setup `,t.errors().length===1?`error`:`errors`,` `),D(4),N(t.errors()))},styles:[`[_nghost-%COMP%] { +}`]})};function QQ(e,t){if(e&1&&(R(0,`span`,3),K(1),z()),e&2){let e=W().$implicit;D(),J(`on page `,e.pageId)}}function $Q(e,t){if(e&1&&(R(0,`li`)(1,`code`),K(2),z(),A(3,QQ,2,1,`span`,3),z()),e&2){let e=t.$implicit,n=W();D(2),q(e.message),D(),j(n.showPages()?3:-1)}}var e$=class e{errors=$.required();showPages=$(!1);static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-setup-errors`]],inputs:{errors:[1,`errors`],showPages:[1,`showPages`]},decls:8,vars:2,consts:[[`role`,`status`,1,`setup-errors`],[1,`setup-title`],[1,`setup-hint`],[1,`setup-page`]],template:function(e,t){e&1&&(R(0,`div`,0)(1,`p`,1),K(2),z(),R(3,`p`,2),K(4,` A form with a setup error can be missing from the list or behave unlike its template. Check the directives and value accessors it names. `),z(),R(5,`ul`),M(6,$Q,4,2,`li`,null,Yh),z()()),e&2&&(D(2),Y(` Angular reported `,t.errors().length,` forms setup `,t.errors().length===1?`error`:`errors`,` `),D(4),N(t.errors()))},styles:[`[_nghost-%COMP%] { display: block; } @@ -15193,7 +15207,7 @@ code[_ngcontent-%COMP%] { .setup-page[_ngcontent-%COMP%] { margin-left: 6px; -}`]})},XQ=[`pathInput`],ZQ=()=>[],QQ=(e,t)=>t.formId+`#`+t.seq;function jre(e,t){e&1&&L(0,`span`,6)}function $Q(e,t){if(e&1){let e=B();F(0,`label`)(1,`input`,17),H(`change`,function(){let t=C(e).$implicit;return w(W().filter.set(t))}),I(),K(2),I()}if(e&2){let e=t.$implicit,n=W();D(),P(`value`,e)(`checked`,e===n.filter()),D(),J(` `,e,` `)}}function e$(e,t){if(e&1&&(F(0,`span`,22),K(1),I()),e&2){let e=W().$implicit;k(`data-tone`,e.outcome===`ran`?``:`bad`),D(),q(e.outcome)}}function t$(e,t){if(e&1&&(F(0,`span`,22),K(1),I()),e&2){let e=W().$implicit;D(),J(`×`,e.count)}}function n$(e,t){if(e&1&&(F(0,`span`,22),K(1),I()),e&2){let e=W().$implicit;D(),q(e.origin)}}function r$(e,t){if(e&1&&(F(0,`span`,22),K(1),I()),e&2){let e=W().$implicit;k(`data-tone`,e.ms>1e3?`warn`:``),D(),J(`pending `,e.ms,`ms`)}}function i$(e,t){if(e&1&&(F(0,`span`,22),K(1),I()),e&2){let e=W().$implicit;k(`data-tone`,e.renders>20?`warn`:``),D(),Y(``,e.renders,` renders: `,(e.rendered??F_(3,ZQ)).join(`, `))}}function a$(e,t){if(e&1&&(F(0,`span`,25),K(1),I(),F(2,`span`,26),K(3,`→`),I(),F(4,`span`,9),K(5,`changed to`),I()),e&2){let e=W(2).$implicit;D(),q(e.prev)}}function o$(e,t){if(e&1&&(F(0,`div`,23),A(1,a$,6,1),K(2),I()),e&2){let e=W().$implicit;D(),j(e.prev===void 0?-1:1),D(),J(` `,e.detail,` `)}}function s$(e,t){if(e&1&&(F(0,`span`,24),K(1),I()),e&2){let e=W().$implicit;D(),J(`from `,e.caller)}}function c$(e,t){if(e&1&&(F(0,`li`)(1,`time`),K(2),I(),F(3,`div`,18)(4,`div`,19)(5,`code`,20),K(6),I(),F(7,`span`,21),K(8),I(),A(9,e$,2,2,`span`,22),A(10,t$,2,1,`span`,22),A(11,n$,2,1,`span`,22),A(12,r$,2,2,`span`,22),A(13,i$,2,4,`span`,22),I(),A(14,o$,3,2,`div`,23),A(15,s$,2,1,`span`,24),I()()),e&2){let e=t.$implicit,n=W(2);k(`data-type`,e.type),D(),k(`datetime`,n.iso(e.timestamp)),D(),q(n.time(e.timestamp)),D(4),q(e.path||`(form)`),D(2),q(e.type),D(),j(e.outcome?9:-1),D(),j(e.count&&e.count>1?10:-1),D(),j(e.origin?11:-1),D(),j(e.ms===void 0?-1:12),D(),j(e.renders?13:-1),D(),j(e.prev!==void 0||e.detail?14:-1),D(),j(e.caller?15:-1)}}function l$(e,t){if(e&1&&(F(0,`ol`,15),M(1,c$,16,12,`li`,null,QQ),I()),e&2){let e=W();D(),N(e.shown())}}function u$(e,t){if(e&1){let e=B();F(0,`div`,16)(1,`p`,27),K(2,`No events match these filters`),I(),F(3,`p`),K(4,`Change the path, type or origin, or interact with the form to record more.`),I(),F(5,`button`,28),H(`click`,function(){return C(e),w(W().clearFilters())}),K(6,`Clear filters`),I()()}}function d$(e,t){e&1&&(F(0,`div`,16)(1,`p`,27),K(2,`No changes yet`),I(),F(3,`p`),K(4,`Type into the form to see them here.`),I()())}var f$=[`all`,`user`,`code`,`agent`,`devtools`],p$=[`value`,`status`,`touched`,`dirty`,`submit`,`reset`,`added`,`removed`,`moved`,`validators`],m$=class e{events=$.required();recording=$(!1);record=Q_();toggle(e){let t=e.target;t.checked=this.recording(),this.record.emit(!this.recording())}origins=f$;filter=E(`all`);pathFilter=E(``);typeFilter=E(`all`);pathInput=av(`pathInput`);typeOptions=X(()=>{let e=new Set(this.events().map(e=>e.type)),t=this.typeFilter();t&&t!==`all`&&e.add(t);let n=p$.filter(t=>e.has(t)),r=[...e].filter(e=>!p$.includes(e)).sort();return[{value:`all`,label:`All types`},...[...n,...r].map(e=>({value:e,label:e}))]});matching=X(()=>{let e=this.filter(),t=this.typeFilter()??`all`,n=this.pathFilter().trim().toLowerCase();return this.events().filter(r=>(e===`all`||r.origin===e)&&(t===`all`||r.type===t)&&(!n||r.path.toLowerCase().includes(n)))});shown=X(()=>this.matching().slice(-100).reverse());filtered=X(()=>this.filter()!==`all`||(this.typeFilter()??`all`)!==`all`||!!this.pathFilter().trim());summary=X(()=>{let e=this.events().length,t=this.matching().length,n=e=>e===1?`event`:`events`,r=this.filtered()?` matching ${n(t)}`:` ${n(t)}`;return t>100?`Showing the latest 100 of ${t}${r}`:this.filtered()?`${t} of ${e} ${n(e)}`:`${e} ${n(e)}`});filterStatus=X(()=>(this.filter(),this.typeFilter(),this.pathFilter(),Z(()=>this.summary())));clearFilters(){this.pathFilter.set(``),this.typeFilter.set(`all`),this.filter.set(`all`),this.pathInput()?.focus()}iso(e){return new Date(e).toISOString()}time=GE;static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-timeline`]],viewQuery:function(e,t){e&1&&Dg(t.pathInput,XQ,5),e&2&&Og()},inputs:{events:[1,`events`],recording:[1,`recording`]},outputs:{record:`record`},decls:25,vars:10,consts:[[`pathInput`,``],[1,`toolbar`],[1,`record`],[`type`,`checkbox`,3,`change`,`checked`],[1,`record-text`],[1,`record-title`],[`aria-hidden`,`true`,1,`rec-dot`],[1,`record-hint`],[1,`chips`],[1,`sr-only`],[1,`filters`],[`placeholder`,`Filter by field path`,`saveKey`,`forms-timeline`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Event type`,3,`valueChange`,`options`,`value`],[1,`total`],[`role`,`status`,1,`sr-only`],[1,`events`],[1,`empty-state`],[`type`,`radio`,`name`,`timeline-origin`,3,`change`,`value`,`checked`],[1,`body`],[1,`line`],[1,`path`],[1,`event-type`],[1,`tag`],[1,`detail`],[1,`caller`],[1,`prev`],[`aria-hidden`,`true`,1,`arrow`],[1,`empty-title`],[`type`,`button`,1,`small`,3,`click`]],template:function(e,t){if(e&1){let e=B();F(0,`div`,1)(1,`label`,2)(2,`input`,3),H(`change`,function(e){return t.toggle(e)}),I(),F(3,`span`,4)(4,`span`,5),A(5,jre,1,0,`span`,6),K(6,` Record details `),I(),F(7,`span`,7),K(8,`Record calling code, validator changes and renders per keystroke`),I()()(),F(9,`fieldset`,8)(10,`legend`,9),K(11,`Show changes from`),I(),M(12,$Q,3,3,`label`,null,Yh),I()(),F(14,`div`,10)(15,`app-search-field`,11,0),S_(`valueChange`,function(n){return C(e),x_(t.pathFilter,n)||(t.pathFilter=n),w(n)}),I(),F(17,`app-select`,12),S_(`valueChange`,function(n){return C(e),x_(t.typeFilter,n)||(t.typeFilter=n),w(n)}),I(),F(18,`span`,13),K(19),I(),F(20,`span`,14),K(21),I()(),A(22,l$,3,0,`ol`,15)(23,u$,7,0,`div`,16)(24,d$,5,0,`div`,16)}e&2&&(D(),G(`on`,t.recording()),D(),P(`checked`,t.recording()),D(3),j(t.recording()?5:-1),D(7),N(t.origins),D(3),b_(`value`,t.pathFilter),D(2),P(`options`,t.typeOptions()),b_(`value`,t.typeFilter),D(2),q(t.summary()),D(2),q(t.filterStatus()),D(),j(t.shown().length?22:t.events().length?23:24))},dependencies:[nP,OD],styles:[`.muted[_ngcontent-%COMP%] { +}`]})},t$=[`pathInput`],n$=()=>[],r$=(e,t)=>t.formId+`#`+t.seq;function i$(e,t){e&1&&L(0,`span`,6)}function jre(e,t){if(e&1){let e=B();F(0,`label`)(1,`input`,17),H(`change`,function(){let t=C(e).$implicit;return w(W().filter.set(t))}),I(),K(2),I()}if(e&2){let e=t.$implicit,n=W();D(),P(`value`,e)(`checked`,e===n.filter()),D(),J(` `,e,` `)}}function a$(e,t){if(e&1&&(F(0,`span`,22),K(1),I()),e&2){let e=W().$implicit;k(`data-tone`,e.outcome===`ran`?``:`bad`),D(),q(e.outcome)}}function o$(e,t){if(e&1&&(F(0,`span`,22),K(1),I()),e&2){let e=W().$implicit;D(),J(`×`,e.count)}}function s$(e,t){if(e&1&&(F(0,`span`,22),K(1),I()),e&2){let e=W().$implicit;D(),q(e.origin)}}function c$(e,t){if(e&1&&(F(0,`span`,22),K(1),I()),e&2){let e=W().$implicit;k(`data-tone`,e.ms>1e3?`warn`:``),D(),J(`pending `,e.ms,`ms`)}}function l$(e,t){if(e&1&&(F(0,`span`,22),K(1),I()),e&2){let e=W().$implicit;k(`data-tone`,e.renders>20?`warn`:``),D(),Y(``,e.renders,` renders: `,(e.rendered??L_(3,n$)).join(`, `))}}function u$(e,t){if(e&1&&(F(0,`span`,25),K(1),I(),F(2,`span`,26),K(3,`→`),I(),F(4,`span`,9),K(5,`changed to`),I()),e&2){let e=W(2).$implicit;D(),q(e.prev)}}function d$(e,t){if(e&1&&(F(0,`div`,23),A(1,u$,6,1),K(2),I()),e&2){let e=W().$implicit;D(),j(e.prev===void 0?-1:1),D(),J(` `,e.detail,` `)}}function f$(e,t){if(e&1&&(F(0,`span`,24),K(1),I()),e&2){let e=W().$implicit;D(),J(`from `,e.caller)}}function p$(e,t){if(e&1&&(F(0,`li`)(1,`time`),K(2),I(),F(3,`div`,18)(4,`div`,19)(5,`code`,20),K(6),I(),F(7,`span`,21),K(8),I(),A(9,a$,2,2,`span`,22),A(10,o$,2,1,`span`,22),A(11,s$,2,1,`span`,22),A(12,c$,2,2,`span`,22),A(13,l$,2,4,`span`,22),I(),A(14,d$,3,2,`div`,23),A(15,f$,2,1,`span`,24),I()()),e&2){let e=t.$implicit,n=W(2);k(`data-type`,e.type),D(),k(`datetime`,n.iso(e.timestamp)),D(),q(n.time(e.timestamp)),D(4),q(e.path||`(form)`),D(2),q(e.type),D(),j(e.outcome?9:-1),D(),j(e.count&&e.count>1?10:-1),D(),j(e.origin?11:-1),D(),j(e.ms===void 0?-1:12),D(),j(e.renders?13:-1),D(),j(e.prev!==void 0||e.detail?14:-1),D(),j(e.caller?15:-1)}}function m$(e,t){if(e&1&&(F(0,`ol`,15),M(1,p$,16,12,`li`,null,r$),I()),e&2){let e=W();D(),N(e.shown())}}function h$(e,t){if(e&1){let e=B();F(0,`div`,16)(1,`p`,27),K(2,`No events match these filters`),I(),F(3,`p`),K(4,`Change the path, type or origin, or interact with the form to record more.`),I(),F(5,`button`,28),H(`click`,function(){return C(e),w(W().clearFilters())}),K(6,`Clear filters`),I()()}}function g$(e,t){e&1&&(F(0,`div`,16)(1,`p`,27),K(2,`No changes yet`),I(),F(3,`p`),K(4,`Type into the form to see them here.`),I()())}var _$=[`all`,`user`,`code`,`agent`,`devtools`],v$=[`value`,`status`,`touched`,`dirty`,`submit`,`reset`,`added`,`removed`,`moved`,`validators`],y$=class e{events=$.required();recording=$(!1);record=ev();toggle(e){let t=e.target;t.checked=this.recording(),this.record.emit(!this.recording())}origins=_$;filter=E(`all`);pathFilter=E(``);typeFilter=E(`all`);pathInput=sv(`pathInput`);typeOptions=X(()=>{let e=new Set(this.events().map(e=>e.type)),t=this.typeFilter();t&&t!==`all`&&e.add(t);let n=v$.filter(t=>e.has(t)),r=[...e].filter(e=>!v$.includes(e)).sort();return[{value:`all`,label:`All types`},...[...n,...r].map(e=>({value:e,label:e}))]});matching=X(()=>{let e=this.filter(),t=this.typeFilter()??`all`,n=this.pathFilter().trim().toLowerCase();return this.events().filter(r=>(e===`all`||r.origin===e)&&(t===`all`||r.type===t)&&(!n||r.path.toLowerCase().includes(n)))});shown=X(()=>this.matching().slice(-100).reverse());filtered=X(()=>this.filter()!==`all`||(this.typeFilter()??`all`)!==`all`||!!this.pathFilter().trim());summary=X(()=>{let e=this.events().length,t=this.matching().length,n=e=>e===1?`event`:`events`,r=this.filtered()?` matching ${n(t)}`:` ${n(t)}`;return t>100?`Showing the latest 100 of ${t}${r}`:this.filtered()?`${t} of ${e} ${n(e)}`:`${e} ${n(e)}`});filterStatus=X(()=>(this.filter(),this.typeFilter(),this.pathFilter(),Z(()=>this.summary())));clearFilters(){this.pathFilter.set(``),this.typeFilter.set(`all`),this.filter.set(`all`),this.pathInput()?.focus()}iso(e){return new Date(e).toISOString()}time=GE;static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-timeline`]],viewQuery:function(e,t){e&1&&Og(t.pathInput,t$,5),e&2&&kg()},inputs:{events:[1,`events`],recording:[1,`recording`]},outputs:{record:`record`},decls:25,vars:10,consts:[[`pathInput`,``],[1,`toolbar`],[1,`record`],[`type`,`checkbox`,3,`change`,`checked`],[1,`record-text`],[1,`record-title`],[`aria-hidden`,`true`,1,`rec-dot`],[1,`record-hint`],[1,`chips`],[1,`sr-only`],[1,`filters`],[`placeholder`,`Filter by field path`,`saveKey`,`forms-timeline`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Event type`,3,`valueChange`,`options`,`value`],[1,`total`],[`role`,`status`,1,`sr-only`],[1,`events`],[1,`empty-state`],[`type`,`radio`,`name`,`timeline-origin`,3,`change`,`value`,`checked`],[1,`body`],[1,`line`],[1,`path`],[1,`event-type`],[1,`tag`],[1,`detail`],[1,`caller`],[1,`prev`],[`aria-hidden`,`true`,1,`arrow`],[1,`empty-title`],[`type`,`button`,1,`small`,3,`click`]],template:function(e,t){if(e&1){let e=B();F(0,`div`,1)(1,`label`,2)(2,`input`,3),H(`change`,function(e){return t.toggle(e)}),I(),F(3,`span`,4)(4,`span`,5),A(5,i$,1,0,`span`,6),K(6,` Record details `),I(),F(7,`span`,7),K(8,`Record calling code, validator changes and renders per keystroke`),I()()(),F(9,`fieldset`,8)(10,`legend`,9),K(11,`Show changes from`),I(),M(12,jre,3,3,`label`,null,Xh),I()(),F(14,`div`,10)(15,`app-search-field`,11,0),w_(`valueChange`,function(n){return C(e),C_(t.pathFilter,n)||(t.pathFilter=n),w(n)}),I(),F(17,`app-select`,12),w_(`valueChange`,function(n){return C(e),C_(t.typeFilter,n)||(t.typeFilter=n),w(n)}),I(),F(18,`span`,13),K(19),I(),F(20,`span`,14),K(21),I()(),A(22,m$,3,0,`ol`,15)(23,h$,7,0,`div`,16)(24,g$,5,0,`div`,16)}e&2&&(D(),G(`on`,t.recording()),D(),P(`checked`,t.recording()),D(3),j(t.recording()?5:-1),D(7),N(t.origins),D(3),S_(`value`,t.pathFilter),D(2),P(`options`,t.typeOptions()),S_(`value`,t.typeFilter),D(2),q(t.summary()),D(2),q(t.filterStatus()),D(),j(t.shown().length?22:t.events().length?23:24))},dependencies:[nP,OD],styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); } @@ -15789,7 +15803,7 @@ time[_ngcontent-%COMP%] { justify-content: center; padding: 0 8px; } -}`]})},h$=(e,t)=>t.path;function g$(e,t){e&1&&(R(0,`span`,6),K(1,`duplicate name`),z())}function _$(e,t){if(e&1&&(R(0,`p`,7),K(1),z()),e&2){let e=W();D(),q(e.description)}}function v$(e,t){if(e&1&&(R(0,`p`,8),K(1),z()),e&2){let e=W();D(),q(e.error)}}function y$(e,t){if(e&1&&(R(0,`li`)(1,`code`),K(2),z(),K(3),z()),e&2){let e=t.$implicit;D(2),q(e.path),D(),J(` is `,e.reason,` `)}}function b$(e,t){if(e&1&&(R(0,`div`,9)(1,`p`,10),K(2,`Angular could not infer an input schema. These fields block it:`),z(),R(3,`ul`),M(4,y$,4,2,`li`,null,h$),z()()),e&2){let e=W();D(4),N(e.blocking)}}function x$(e,t){e&1&&(R(0,`span`,14),K(1,`required`),z())}function S$(e,t){if(e&1&&(R(0,`li`)(1,`code`),K(2),z(),A(3,x$,2,0,`span`,14),z()),e&2){let e=t.$implicit,n=W(3);D(2),q(e),D(),j(n.isRequired(e)?3:-1)}}function C$(e,t){if(e&1&&(R(0,`div`,9)(1,`p`,10),K(2,`Inputs`),z(),R(3,`ul`,13),M(4,S$,4,2,`li`,null,Yh),z()()),e&2){let e=W();D(4),N(e.inputs)}}function w$(e,t){if(e&1&&(R(0,`li`)(1,`code`),K(2),z(),K(3),z()),e&2){let e=t.$implicit;D(2),q(e.path),D(),J(` is now `,e.now?`required`:`optional`,` `)}}function T$(e,t){if(e&1&&(R(0,`div`,9)(1,`p`,10),K(2,` Required changed since registration. Angular reads it once, so agents still see the old schema: `),z(),R(3,`ul`),M(4,w$,4,2,`li`,null,h$),z()()),e&2){let e=W();D(4),N(e.requiredChanged)}}function E$(e,t){e&1&&(R(0,`span`,14),K(1,`tried from the panel`),z())}function D$(e,t){if(e&1&&(R(0,`span`,10),K(1),z()),e&2){let e=W().$implicit;D(),J(``,e.ms,` ms`)}}function O$(e,t){if(e&1&&(R(0,`span`,10),K(1),z()),e&2){let e=W().$implicit;D(),J(`fields `,e.fields.join(`, `))}}function k$(e,t){if(e&1&&(R(0,`pre`,15),K(1),z()),e&2){let e=W().$implicit;D(),q(e.detail)}}function A$(e,t){if(e&1&&(R(0,`li`)(1,`time`),K(2),V_(3,`date`),z(),R(4,`span`,5),K(5),z(),A(6,E$,2,0,`span`,14),A(7,D$,2,1,`span`,10),A(8,O$,2,1,`span`,10),A(9,k$,2,1,`pre`,15),z()),e&2){let e=t.$implicit,n=W(3);D(),k(`datetime`,n.iso(e.at)),D(),q(U_(3,8,e.at,`HH:mm:ss`)),D(2),k(`data-state`,e.outcome),D(),q(n.outcome(e.outcome)),D(),j(e.tried?6:-1),D(),j(e.ms===void 0?-1:7),D(),j(e.fields?.length?8:-1),D(),j(e.detail?9:-1)}}function j$(e,t){if(e&1&&(R(0,`ul`),M(1,A$,10,11,`li`,null,Jh),z()),e&2){let e=W();D(),N(e.calls)}}function M$(e,t){e&1&&(R(0,`p`,10),K(1,` Calls are not recorded for a tool registered before the inspector attached. `),z())}function N$(e,t){e&1&&(R(0,`p`,10),K(1,`No agent has called this tool since the inspector attached.`),z())}function P$(e,t){if(e&1&&(R(0,`details`,11)(1,`summary`),K(2,`Input schema`),z(),R(3,`pre`,15),K(4),V_(5,`json`),z()()),e&2){let e=W();D(4),q(H_(5,1,e.schema))}}function F$(e,t){if(e&1&&(R(0,`p`,18),K(1),z()),e&2){let e=W(3);V(`id`,e.uid+`-try-off`),D(),q(e.writesOff)}}function I$(e,t){if(e&1){let e=B();R(0,`div`,12)(1,`label`,16),K(2,`Tool input (JSON)`),z(),R(3,`textarea`,17),U(`input`,function(t){return C(e),w(W(2).draft.set(t.target.value))}),z(),R(4,`p`,18),K(5,` Runs the tool in the app the way an agent call does: it fills the form and submits it. `),z(),R(6,`div`,19)(7,`button`,20),U(`click`,function(){return C(e),w(W(2).tryTool())}),K(8),z()(),A(9,F$,2,2,`p`,18),R(10,`p`,21),K(11),z()()}if(e&2){let e=W(2);k(`aria-labelledby`,e.uid+`-try-label`),D(),V(`id`,e.uid+`-try-label`)(`htmlFor`,e.uid+`-try-input`),D(2),V(`id`,e.uid+`-try-input`)(`value`,e.draft()),k(`aria-describedby`,e.uid+`-try-hint`),D(),V(`id`,e.uid+`-try-hint`),D(3),G(`armed`,e.armed()),V(`disabled`,!e.canWrite()||e.running()),k(`aria-describedby`,e.canWrite()?null:e.uid+`-try-off`),D(),J(` `,e.armed()?`Confirm try`:`Try this tool`,` `),D(),j(e.canWrite()?-1:9),D(2),q(e.message())}}function L$(e,t){if(e&1&&(R(0,`section`,0)(1,`div`,2)(2,`h3`,3),K(3,`WebMCP tool`),z(),R(4,`code`,4),K(5),z(),R(6,`span`,5),K(7),z(),A(8,g$,2,0,`span`,6),z(),A(9,_$,2,1,`p`,7),A(10,v$,2,1,`p`,8),A(11,b$,6,0,`div`,9),A(12,C$,6,0,`div`,9),A(13,T$,6,0,`div`,9),R(14,`div`,9)(15,`p`,10),K(16,`Recent calls`),z(),A(17,j$,3,0,`ul`)(18,M$,2,0,`p`,10)(19,N$,2,0,`p`,10),z(),A(20,P$,6,3,`details`,11),A(21,I$,12,14,`div`,12),z()),e&2){let e=t,n=W();k(`aria-labelledby`,n.uid+`-title `+n.uid+`-name`),D(2),V(`id`,n.uid+`-title`),D(2),V(`id`,n.uid+`-name`),D(),q(e.name),D(),k(`data-state`,e.status),D(),q(n.statusText()),D(),j(e.duplicate?8:-1),D(),j(e.description?9:-1),D(),j(e.status===`failed`&&e.error&&e.error!==`schema`?10:-1),D(),j(e.blocking?.length?11:-1),D(),j(e.inputs?.length?12:-1),D(),j(e.requiredChanged?.length?13:-1),D(4),j(e.calls?.length?17:e.seen===`list`?18:19),D(3),j(e.schema?20:-1),D(),j(n.formId()&&e.status===`registered`?21:-1)}}function R$(e,t){e&1&&(R(0,`p`,1),K(1,` This app uses `),R(2,`code`),K(3,`provideExperimentalWebMcpForms()`),z(),K(4,`, but the browser has no `),R(5,`code`),K(6,`modelContext`),z(),K(7,`, so Angular registers no WebMCP tool for this form. `),z())}function z$(e,t){if(e&1&&(F(0,`p`,5),K(1,` Page `),F(2,`code`),K(3),I()()),e&2){let e=W().$implicit;D(3),q(e.pageId)}}function B$(e,t){if(e&1&&(F(0,`li`),A(1,z$,4,1,`p`,5),L(2,`app-forms-webmcp`,6),I()),e&2){let e=t.$implicit,n=W(2);D(),j(n.manyPages()?1:-1),D(),P(`tool`,e.tool)}}function V$(e,t){if(e&1&&(F(0,`section`,0)(1,`h2`,1),K(2,` Other WebMCP tools `),F(3,`span`,2),K(4),I()(),F(5,`p`,3),K(6,` Tools registered on the page that are not linked to a form in the list, such as tools the app registers itself. `),I(),F(7,`ul`,4),M(8,B$,3,2,`li`,null,Jh),I()()),e&2){let e=W();D(4),q(e.tools().length),D(4),N(e.tools())}}var H$=0,U$={running:`running`,submitted:`submitted`,failed:`submit failed`,done:`done`,threw:`threw`};function W$(e,t=0){if(!e||typeof e!=`object`||t>10)return null;let n=e;switch(n.type){case`object`:{let e={},r=n.properties??{};for(let[n,i]of Object.entries(r))e[n]=W$(i,t+1);return e}case`array`:return[W$(n.items,t+1)];case`string`:return``;case`number`:case`integer`:return 0;case`boolean`:return!1;default:return null}}var G$=class e{uid=`forms-webmcp-${++H$}`;tool=$();page=$();signalForm=$(!1);formId=$();rpc=$(null);canWrite=X(()=>IT(this.rpc(),`forms`));writesOff=Uw(`forms`);target=X(()=>`${this.formId()??``}|${this.tool()?.name??``}`);schemaText=X(()=>JSON.stringify(W$(this.tool()?.schema)??{},null,2));draft=Q({source:()=>({target:this.target(),sample:this.schemaText()}),computation:(e,t)=>t&&t.source.target===e.target?t.value:e.sample});armed=Q({source:this.target,computation:()=>!1});running=Q({source:this.target,computation:()=>!1});message=Q({source:this.target,computation:()=>``});async tryTool(){let e=this.formId();if(!e||this.running())return;let t;try{t=JSON.parse(this.draft())}catch{this.message.set(`The tool input is not valid JSON.`);return}if(!t||typeof t!=`object`||Array.isArray(t)){this.message.set(`The tool input must be a JSON object.`);return}if(!this.armed()){this.armed.set(!0),this.message.set(`Press "Confirm try" to run the tool in the app. It submits the form.`);return}this.armed.set(!1);let n=this.target();this.running.set(!0);try{let r=await kT(this.rpc(),{action:`try-webmcp`,formId:e,value:t,confirm:!0});if(this.target()!==n)return;this.message.set(AT(r))}finally{this.target()===n&&this.running.set(!1)}}statusText=X(()=>{let e=this.tool();return e?e.status===`failed`?`not registered`:e.status===`registering`?`registering`:e.seen===`list`?`registered before the inspector attached`:`registered`:``});noModelContext=X(()=>{let e=this.page();return this.signalForm()&&!!e&&!e.modelContext&&!!e.provided});isRequired(e){let t=e.slice(0,e.lastIndexOf(`:`));return this.tool()?.required?.includes(t)??!1}outcome(e){return U$[e]??e}iso(e){return new Date(e).toISOString()}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-webmcp`]],inputs:{tool:[1,`tool`],page:[1,`page`],signalForm:[1,`signalForm`],formId:[1,`formId`],rpc:[1,`rpc`]},decls:2,vars:1,consts:[[1,`webmcp`],[1,`note`],[1,`head`],[1,`section-label`,3,`id`],[1,`name`,3,`id`],[1,`state`],[`data-state`,`failed`,1,`state`],[1,`description`],[1,`problem`],[1,`group`],[1,`muted`],[1,`schema`],[`role`,`group`,1,`try`],[1,`inputs`],[1,`tag`],[1,`detail`],[1,`muted`,3,`id`,`for`],[`rows`,`4`,`spellcheck`,`false`,`autocomplete`,`off`,1,`try-input`,3,`input`,`id`,`value`],[1,`muted`,3,`id`],[1,`try-row`],[`type`,`button`,1,`small`,`primary`,3,`click`,`disabled`],[`role`,`status`,1,`status`]],template:function(e,t){if(e&1&&A(0,L$,22,15,`section`,0)(1,R$,8,0,`p`,1),e&2){let e;j((e=t.tool())?0:t.noModelContext()?1:-1,e)}},dependencies:[Hv,Uv],styles:[`.muted[_ngcontent-%COMP%] { +}`]})},b$=(e,t)=>t.path;function x$(e,t){e&1&&(R(0,`span`,6),K(1,`duplicate name`),z())}function S$(e,t){if(e&1&&(R(0,`p`,7),K(1),z()),e&2){let e=W();D(),q(e.description)}}function C$(e,t){if(e&1&&(R(0,`p`,8),K(1),z()),e&2){let e=W();D(),q(e.error)}}function w$(e,t){if(e&1&&(R(0,`li`)(1,`code`),K(2),z(),K(3),z()),e&2){let e=t.$implicit;D(2),q(e.path),D(),J(` is `,e.reason,` `)}}function T$(e,t){if(e&1&&(R(0,`div`,9)(1,`p`,10),K(2,`Angular could not infer an input schema. These fields block it:`),z(),R(3,`ul`),M(4,w$,4,2,`li`,null,b$),z()()),e&2){let e=W();D(4),N(e.blocking)}}function E$(e,t){e&1&&(R(0,`span`,14),K(1,`required`),z())}function D$(e,t){if(e&1&&(R(0,`li`)(1,`code`),K(2),z(),A(3,E$,2,0,`span`,14),z()),e&2){let e=t.$implicit,n=W(3);D(2),q(e),D(),j(n.isRequired(e)?3:-1)}}function O$(e,t){if(e&1&&(R(0,`div`,9)(1,`p`,10),K(2,`Inputs`),z(),R(3,`ul`,13),M(4,D$,4,2,`li`,null,Xh),z()()),e&2){let e=W();D(4),N(e.inputs)}}function k$(e,t){if(e&1&&(R(0,`li`)(1,`code`),K(2),z(),K(3),z()),e&2){let e=t.$implicit;D(2),q(e.path),D(),J(` is now `,e.now?`required`:`optional`,` `)}}function A$(e,t){if(e&1&&(R(0,`div`,9)(1,`p`,10),K(2,` Required changed since registration. Angular reads it once, so agents still see the old schema: `),z(),R(3,`ul`),M(4,k$,4,2,`li`,null,b$),z()()),e&2){let e=W();D(4),N(e.requiredChanged)}}function j$(e,t){e&1&&(R(0,`span`,14),K(1,`tried from the panel`),z())}function M$(e,t){if(e&1&&(R(0,`span`,10),K(1),z()),e&2){let e=W().$implicit;D(),J(``,e.ms,` ms`)}}function N$(e,t){if(e&1&&(R(0,`span`,10),K(1),z()),e&2){let e=W().$implicit;D(),J(`fields `,e.fields.join(`, `))}}function P$(e,t){if(e&1&&(R(0,`pre`,15),K(1),z()),e&2){let e=W().$implicit;D(),q(e.detail)}}function F$(e,t){if(e&1&&(R(0,`li`)(1,`time`),K(2),U_(3,`date`),z(),R(4,`span`,5),K(5),z(),A(6,j$,2,0,`span`,14),A(7,M$,2,1,`span`,10),A(8,N$,2,1,`span`,10),A(9,P$,2,1,`pre`,15),z()),e&2){let e=t.$implicit,n=W(3);D(),k(`datetime`,n.iso(e.at)),D(),q(G_(3,8,e.at,`HH:mm:ss`)),D(2),k(`data-state`,e.outcome),D(),q(n.outcome(e.outcome)),D(),j(e.tried?6:-1),D(),j(e.ms===void 0?-1:7),D(),j(e.fields?.length?8:-1),D(),j(e.detail?9:-1)}}function I$(e,t){if(e&1&&(R(0,`ul`),M(1,F$,10,11,`li`,null,Yh),z()),e&2){let e=W();D(),N(e.calls)}}function L$(e,t){e&1&&(R(0,`p`,10),K(1,` Calls are not recorded for a tool registered before the inspector attached. `),z())}function R$(e,t){e&1&&(R(0,`p`,10),K(1,`No agent has called this tool since the inspector attached.`),z())}function z$(e,t){if(e&1&&(R(0,`details`,11)(1,`summary`),K(2,`Input schema`),z(),R(3,`pre`,15),K(4),U_(5,`json`),z()()),e&2){let e=W();D(4),q(W_(5,1,e.schema))}}function B$(e,t){if(e&1&&(R(0,`p`,18),K(1),z()),e&2){let e=W(3);V(`id`,e.uid+`-try-off`),D(),q(e.writesOff)}}function V$(e,t){if(e&1){let e=B();R(0,`div`,12)(1,`label`,16),K(2,`Tool input (JSON)`),z(),R(3,`textarea`,17),U(`input`,function(t){return C(e),w(W(2).draft.set(t.target.value))}),z(),R(4,`p`,18),K(5,` Runs the tool in the app the way an agent call does: it fills the form and submits it. `),z(),R(6,`div`,19)(7,`button`,20),U(`click`,function(){return C(e),w(W(2).tryTool())}),K(8),z()(),A(9,B$,2,2,`p`,18),R(10,`p`,21),K(11),z()()}if(e&2){let e=W(2);k(`aria-labelledby`,e.uid+`-try-label`),D(),V(`id`,e.uid+`-try-label`)(`htmlFor`,e.uid+`-try-input`),D(2),V(`id`,e.uid+`-try-input`)(`value`,e.draft()),k(`aria-describedby`,e.uid+`-try-hint`),D(),V(`id`,e.uid+`-try-hint`),D(3),G(`armed`,e.armed()),V(`disabled`,!e.canWrite()||e.running()),k(`aria-describedby`,e.canWrite()?null:e.uid+`-try-off`),D(),J(` `,e.armed()?`Confirm try`:`Try this tool`,` `),D(),j(e.canWrite()?-1:9),D(2),q(e.message())}}function H$(e,t){if(e&1&&(R(0,`section`,0)(1,`div`,2)(2,`h3`,3),K(3,`WebMCP tool`),z(),R(4,`code`,4),K(5),z(),R(6,`span`,5),K(7),z(),A(8,x$,2,0,`span`,6),z(),A(9,S$,2,1,`p`,7),A(10,C$,2,1,`p`,8),A(11,T$,6,0,`div`,9),A(12,O$,6,0,`div`,9),A(13,A$,6,0,`div`,9),R(14,`div`,9)(15,`p`,10),K(16,`Recent calls`),z(),A(17,I$,3,0,`ul`)(18,L$,2,0,`p`,10)(19,R$,2,0,`p`,10),z(),A(20,z$,6,3,`details`,11),A(21,V$,12,14,`div`,12),z()),e&2){let e=t,n=W();k(`aria-labelledby`,n.uid+`-title `+n.uid+`-name`),D(2),V(`id`,n.uid+`-title`),D(2),V(`id`,n.uid+`-name`),D(),q(e.name),D(),k(`data-state`,e.status),D(),q(n.statusText()),D(),j(e.duplicate?8:-1),D(),j(e.description?9:-1),D(),j(e.status===`failed`&&e.error&&e.error!==`schema`?10:-1),D(),j(e.blocking?.length?11:-1),D(),j(e.inputs?.length?12:-1),D(),j(e.requiredChanged?.length?13:-1),D(4),j(e.calls?.length?17:e.seen===`list`?18:19),D(3),j(e.schema?20:-1),D(),j(n.formId()&&e.status===`registered`?21:-1)}}function U$(e,t){e&1&&(R(0,`p`,1),K(1,` This app uses `),R(2,`code`),K(3,`provideExperimentalWebMcpForms()`),z(),K(4,`, but the browser has no `),R(5,`code`),K(6,`modelContext`),z(),K(7,`, so Angular registers no WebMCP tool for this form. `),z())}function W$(e,t){if(e&1&&(F(0,`p`,5),K(1,` Page `),F(2,`code`),K(3),I()()),e&2){let e=W().$implicit;D(3),q(e.pageId)}}function G$(e,t){if(e&1&&(F(0,`li`),A(1,W$,4,1,`p`,5),L(2,`app-forms-webmcp`,6),I()),e&2){let e=t.$implicit,n=W(2);D(),j(n.manyPages()?1:-1),D(),P(`tool`,e.tool)}}function K$(e,t){if(e&1&&(F(0,`section`,0)(1,`h2`,1),K(2,` Other WebMCP tools `),F(3,`span`,2),K(4),I()(),F(5,`p`,3),K(6,` Tools registered on the page that are not linked to a form in the list, such as tools the app registers itself. `),I(),F(7,`ul`,4),M(8,G$,3,2,`li`,null,Yh),I()()),e&2){let e=W();D(4),q(e.tools().length),D(4),N(e.tools())}}var q$=0,J$={running:`running`,submitted:`submitted`,failed:`submit failed`,done:`done`,threw:`threw`};function Y$(e,t=0){if(!e||typeof e!=`object`||t>10)return null;let n=e;switch(n.type){case`object`:{let e={},r=n.properties??{};for(let[n,i]of Object.entries(r))e[n]=Y$(i,t+1);return e}case`array`:return[Y$(n.items,t+1)];case`string`:return``;case`number`:case`integer`:return 0;case`boolean`:return!1;default:return null}}var X$=class e{uid=`forms-webmcp-${++q$}`;tool=$();page=$();signalForm=$(!1);formId=$();rpc=$(null);canWrite=X(()=>IT(this.rpc(),`forms`));writesOff=Uw(`forms`);target=X(()=>`${this.formId()??``}|${this.tool()?.name??``}`);schemaText=X(()=>JSON.stringify(Y$(this.tool()?.schema)??{},null,2));draft=Q({source:()=>({target:this.target(),sample:this.schemaText()}),computation:(e,t)=>t&&t.source.target===e.target?t.value:e.sample});armed=Q({source:this.target,computation:()=>!1});running=Q({source:this.target,computation:()=>!1});message=Q({source:this.target,computation:()=>``});async tryTool(){let e=this.formId();if(!e||this.running())return;let t;try{t=JSON.parse(this.draft())}catch{this.message.set(`The tool input is not valid JSON.`);return}if(!t||typeof t!=`object`||Array.isArray(t)){this.message.set(`The tool input must be a JSON object.`);return}if(!this.armed()){this.armed.set(!0),this.message.set(`Press "Confirm try" to run the tool in the app. It submits the form.`);return}this.armed.set(!1);let n=this.target();this.running.set(!0);try{let r=await kT(this.rpc(),{action:`try-webmcp`,formId:e,value:t,confirm:!0});if(this.target()!==n)return;this.message.set(AT(r))}finally{this.target()===n&&this.running.set(!1)}}statusText=X(()=>{let e=this.tool();return e?e.status===`failed`?`not registered`:e.status===`registering`?`registering`:e.seen===`list`?`registered before the inspector attached`:`registered`:``});noModelContext=X(()=>{let e=this.page();return this.signalForm()&&!!e&&!e.modelContext&&!!e.provided});isRequired(e){let t=e.slice(0,e.lastIndexOf(`:`));return this.tool()?.required?.includes(t)??!1}outcome(e){return J$[e]??e}iso(e){return new Date(e).toISOString()}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-webmcp`]],inputs:{tool:[1,`tool`],page:[1,`page`],signalForm:[1,`signalForm`],formId:[1,`formId`],rpc:[1,`rpc`]},decls:2,vars:1,consts:[[1,`webmcp`],[1,`note`],[1,`head`],[1,`section-label`,3,`id`],[1,`name`,3,`id`],[1,`state`],[`data-state`,`failed`,1,`state`],[1,`description`],[1,`problem`],[1,`group`],[1,`muted`],[1,`schema`],[`role`,`group`,1,`try`],[1,`inputs`],[1,`tag`],[1,`detail`],[1,`muted`,3,`id`,`for`],[`rows`,`4`,`spellcheck`,`false`,`autocomplete`,`off`,1,`try-input`,3,`input`,`id`,`value`],[1,`muted`,3,`id`],[1,`try-row`],[`type`,`button`,1,`small`,`primary`,3,`click`,`disabled`],[`role`,`status`,1,`status`]],template:function(e,t){if(e&1&&A(0,H$,22,15,`section`,0)(1,U$,8,0,`p`,1),e&2){let e;j((e=t.tool())?0:t.noModelContext()?1:-1,e)}},dependencies:[Wv,Gv],styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); } @@ -16205,7 +16219,7 @@ li[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] + *[_ngcontent-%COMP%] { .status[_ngcontent-%COMP%]:empty { display: none; -}`]})},K$=class e{pages=$([]);tools=X(()=>this.pages().flatMap(e=>e.tools.map(t=>({tool:t,pageId:e.pageId}))));manyPages=X(()=>new Set(this.tools().map(e=>e.pageId)).size>1);static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-webmcp-others`]],inputs:{pages:[1,`pages`]},decls:1,vars:1,consts:[[`aria-labelledby`,`forms-webmcp-others-title`,1,`others`],[`id`,`forms-webmcp-others-title`],[1,`count`],[1,`muted`],[1,`tools`],[1,`page`],[3,`tool`]],template:function(e,t){e&1&&A(0,V$,10,1,`section`,0),e&2&&j(t.tools().length?0:-1)},dependencies:[G$],styles:[`[_nghost-%COMP%] { +}`]})},Z$=class e{pages=$([]);tools=X(()=>this.pages().flatMap(e=>e.tools.map(t=>({tool:t,pageId:e.pageId}))));manyPages=X(()=>new Set(this.tools().map(e=>e.pageId)).size>1);static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-webmcp-others`]],inputs:{pages:[1,`pages`]},decls:1,vars:1,consts:[[`aria-labelledby`,`forms-webmcp-others-title`,1,`others`],[`id`,`forms-webmcp-others-title`],[1,`count`],[1,`muted`],[1,`tools`],[1,`page`],[3,`tool`]],template:function(e,t){e&1&&A(0,K$,10,1,`section`,0),e&2&&j(t.tools().length?0:-1)},dependencies:[X$],styles:[`[_nghost-%COMP%] { display: block; } @@ -16269,7 +16283,7 @@ code[_ngcontent-%COMP%] { display: grid; gap: 4px; min-width: 0; -}`]})},q$=(e,t)=>t.id;function J$(e,t){if(e&1&&L(0,`app-forms-setup-errors`,1),e&2){let e=W();P(`errors`,e.pageSetupErrors())(`showPages`,e.setupErrorPages())}}function Y$(e,t){e&1&&(F(0,`div`,2),L(1,`span`,7),F(2,`p`),K(3,`Connecting to the devtools server…`),I()())}function X$(e,t){if(e&1){let e=B();F(0,`div`,3)(1,`p`,8),K(2,`Could not load forms`),I(),F(3,`p`,9),K(4,` The devtools server did not answer. Check that the app is running, then try again. `),I(),F(5,`button`,10),H(`click`,function(){return C(e),w(W().retry())}),K(6,`Try again`),I()()}}function Z$(e,t){e&1&&(F(0,`div`,2),L(1,`span`,7),F(2,`p`),K(3,`Loading forms…`),I()())}function Q$(e,t){e&1&&(F(0,`div`,4)(1,`p`,8),K(2,`No forms on the page yet`),I(),F(3,`p`,9),K(4,` Open a page that renders a form. Signal Forms, reactive and template-driven forms all show up here, in development builds. `),I()())}function $$(e,t){if(e&1){let e=B();F(0,`div`,4)(1,`p`,8),K(2,`No forms on this page`),I(),F(3,`p`,9),K(4),I(),F(5,`button`,10),H(`click`,function(){return C(e),w(W().allPages.set(!0))}),K(6,` Show forms from all pages `),I()()}if(e&2){let e=W();D(4),Y(` Other connected tabs report `,e.forms().length,` `,e.forms().length===1?`form`:`forms`,`. `)}}function e1(e,t){if(e&1){let e=B();F(0,`section`,12)(1,`h2`,14),K(2),I(),F(3,`p`,15),K(4,` This form is no longer on the page. It comes back here if the page renders it again. `),I(),F(5,`button`,10),H(`click`,function(){C(e);let t=W(2);return w(t.selectForm(t.visible()[0].id))}),K(6),I()()}if(e&2){let e=W(2);D(2),q(t),D(4),J(` Show `,e.visible()[0].label,` `)}}function t1(e,t){if(e&1){let e=B();F(0,`section`,12)(1,`h2`,14),K(2),I(),F(3,`p`,9),K(4,`This form is on another page. Tick "All pages" to see it again.`),I(),F(5,`button`,10),H(`click`,function(){return C(e),w(W(2).allPages.set(!0))}),K(6,` Show forms from all pages `),I()()}e&2&&(D(2),q(t))}function n1(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W();D(),q(e.submitted?`submitted`:`not submitted`)}}function r1(e,t){e&1&&(F(0,`span`),K(1,`submitting`),I())}function i1(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,30),H(`click`,function(){let t=C(e).$implicit;return w(W(4).showField(t.path))}),F(2,`span`,31),K(3,`Show field `),I(),F(4,`code`),K(5),I(),F(6,`span`,31),K(7,`:`),I(),K(8),F(9,`code`,32),K(10),I()()()}if(e&2){let e=t.$implicit;D(5),q(e.path||`(form)`),D(3),J(` `,e.message,` `),D(2),q(e.kind)}}function a1(e,t){if(e&1&&(F(0,`details`,21)(1,`summary`),K(2),I(),F(3,`ul`),M(4,i1,11,3,`li`,null,Jh),I()()),e&2){let e=W();D(2),J(`Error summary (`,e.errorSummary.length,`)`),D(2),N(e.errorSummary)}}function o1(e,t){if(e&1){let e=B();F(0,`button`,33),H(`click`,function(){let t=C(e).$implicit;return w(W(3).tab_.set(t.id))}),K(1),I()}if(e&2){let e=t.$implicit,n=W(3);P(`id`,`forms-tab-`+e.id),k(`aria-selected`,e.id===n.tab_())(`aria-controls`,`forms-panel-`+e.id)(`tabindex`,e.id===n.tab_()?0:-1),D(),J(` `,e.label,` `)}}function s1(e,t){if(e&1){let e=B();F(0,`app-forms-fields`,34),S_(`filterChange`,function(t){C(e);let n=W(3);return x_(n.filter,t)||(n.filter=t),w(t)})(`activeChange`,function(t){C(e);let n=W(3);return x_(n.active,t)||(n.active=t),w(t)}),H(`toggleField`,function(t){return C(e),w(W(3).toggleField(t))})(`closeField`,function(){return C(e),w(W(3).closeField())})(`clearFilters`,function(t){return C(e),w(W(3).clearFilters(t))})(`highlight`,function(t){return C(e),w(W(3).highlight(t?.formId??null,t?.path??``))}),I()}if(e&2){let e=W(),t=W(2);P(`form`,e)(`rows`,t.rows())(`fieldPath`,t.fieldPath())(`selectedNode`,t.selectedNode())(`version`,t.version())(`rpc`,t.rpc())(`filtering`,t.filtering())(`filterStatus`,t.filterStatus()),b_(`filter`,t.filter)(`active`,t.active)}}function c1(e,t){e&1&&L(0,`app-forms-schema`,28),e&2&&P(`form`,W())}function l1(e,t){if(e&1){let e=B();L(0,`app-forms-export-test`,35)(1,`app-limit-note`,36),F(2,`app-forms-timeline`,37),H(`record`,function(t){return C(e),w(W(3).setRecording(t))}),I()}if(e&2){let e=W(),t=W(2);P(`formId`,e.id)(`rpc`,t.rpc()),D(),P(`dropped`,t.droppedEvents())(`max`,t.maxEvents()),D(),P(`events`,t.selectedEvents())(`recording`,t.recording())}}function u1(e,t){if(e&1&&L(0,`app-forms-submit`,29),e&2){let e=W(),t=W(2);P(`formId`,e.id)(`version`,t.version())(`rpc`,t.rpc())}}function d1(e,t){if(e&1){let e=B();F(0,`app-forms-lint`,38),H(`showField`,function(t){return C(e),w(W(3).showField(t))}),I()}if(e&2){let e=W(),t=W(2);P(`formId`,e.id)(`version`,t.version())(`rpc`,t.rpc())}}function f1(e,t){if(e&1){let e=B();F(0,`section`,13)(1,`div`,16)(2,`h2`,14),K(3),I(),F(4,`p`,17),K(5),F(6,`code`),K(7),I()()(),F(8,`div`,18)(9,`span`,19),K(10),I(),F(11,`span`),K(12),I(),F(13,`span`),K(14),I(),A(15,n1,2,1,`span`),A(16,r1,2,0,`span`),F(17,`span`,20)(18,`b`),K(19),I(),K(20,` fields · `),F(21,`b`),K(22),I(),K(23,` errors`),I()(),A(24,a1,6,1,`details`,21),L(25,`app-forms-webmcp`,22),F(26,`app-forms-action-bar`,23),H(`act`,function(t){return C(e),w(W(2).act(t))})(`confirmAct`,function(t){return C(e),w(W(2).confirmAct(t))})(`pick`,function(){return C(e),w(W(2).pick())})(`cancelPick`,function(){return C(e),w(W(2).cancelPick())}),I(),F(27,`div`,24),H(`keydown`,function(t){return C(e),w(W(2).onKey(t))}),M(28,o1,2,5,`button`,25,q$),I(),F(30,`div`,26),A(31,s1,1,10,`app-forms-fields`,27)(32,c1,1,1,`app-forms-schema`,28)(33,l1,3,6)(34,u1,1,3,`app-forms-submit`,29)(35,d1,1,3,`app-forms-lint`,29),I()()}if(e&2){let e,n=t,r=W(2);D(3),q(n.label),D(2),J(` `,r.kindLabel(n.kind),` · `),D(2),q(n.id),D(2),k(`data-status`,n.root.status),D(),q(n.root.status),D(2),q(n.root.dirty?`dirty`:`pristine`),D(2),q(n.root.touched?`touched`:`untouched`),D(),j(n.submitted===void 0?-1:15),D(),j(n.root.submitting?16:-1),D(3),q(r.counts().get(n.id)?.fields),D(2),G(`has-errors`,r.counts().get(n.id)?.errors),D(),q(r.counts().get(n.id)?.errors),D(2),j(n.errorSummary?.length?24:-1),D(),P(`tool`,n.webMcp)(`page`,r.webMcpPage(n.id))(`signalForm`,n.kind===`signal`)(`formId`,n.id)(`rpc`,r.rpc()),D(),P(`canWrite`,r.canWrite())(`writesOff`,r.writesOff)(`picking`,r.picking())(`snapshot`,r.snapshot())(`armed`,r.armed())(`message`,r.message()),D(2),N(r.tabs()),D(2),P(`id`,`forms-panel-`+r.tab_()),k(`aria-labelledby`,`forms-tab-`+r.tab_()),D(),j((e=r.tab_())===`fields`?31:e===`schema`?32:e===`timeline`?33:e===`submit`?34:e===`lint`?35:-1)}}function p1(e,t){if(e&1){let e=B();F(0,`div`,5)(1,`app-forms-list`,11),S_(`allPagesChange`,function(t){C(e);let n=W();return x_(n.allPages,t)||(n.allPages=t),w(t)}),H(`selectForm`,function(t){return C(e),w(W().selectForm(t))}),I(),A(2,e1,7,2,`section`,12)(3,t1,7,1,`section`,12)(4,f1,36,28,`section`,13),I()}if(e&2){let e,t=W();D(),P(`forms`,t.visible())(`selectedId`,t.selected()?.id)(`counts`,t.counts())(`showToggle`,!!t.hostPageId&&(t.allPages()||t.otherPages())),b_(`allPages`,t.allPages),D(),j((e=t.missing())?2:(e=t.hidden())?3:(e=t.selected())?4:-1,e)}}function m1(e,t){e&1&&L(0,`app-forms-webmcp-others`,6),e&2&&P(`pages`,W().pageWebMcp())}var h1=[{id:`fields`,label:`Fields`},{id:`schema`,label:`Schema`},{id:`timeline`,label:`Timeline`},{id:`submit`,label:`Submit`},{id:`lint`,label:`Lint`}];function g1(e){return e.errors.length+(e.children??[]).reduce((e,t)=>e+g1(t),0)}function _1(e){return e.children?e.children.reduce((e,t)=>e+_1(t),0):+(e.type===`control`&&e.materialized!==!1)}var v1=class e{rpc=$(null);focus=$(null);canWrite=X(()=>IT(this.rpc(),`forms`));writesOff=Uw(`forms`);focusHandled=Q_();forms=E([]);webMcp=E([]);events=E([]);loading=E(!0);failed=E(!1);selectedId=E(null);selectedLabel=E(null);hostPageId=fT();allPages=E(!1);visible=X(()=>{let e=this.forms(),t=this.hostPageId;return t&&!this.allPages()?e.filter(e=>ST(e.id)===t):e});otherPages=X(()=>this.forms().some(e=>ST(e.id)!==this.hostPageId));instrumented=E([]);recording=X(()=>{let e=this.selected()?.id??``;return this.instrumented().some(t=>e.endsWith(`@${t}`))});filter=E(``);tabs=X(()=>this.selected()?.kind===`signal`?h1:h1.filter(e=>e.id!==`schema`));tab_=Q({source:this.tabs,computation:(e,t)=>t&&e.some(e=>e.id===t.value)?t.value:`fields`});active=E(new Set);filtering=X(()=>!!this.filter()||this.active().size>0);filterStatus=E(``);version=E(0);message=E(``);setupErrors=E([]);pageSetupErrors=X(()=>this.onShownPages(this.setupErrors()));setupErrorPages=X(()=>new Set(this.pageSetupErrors().map(e=>e.pageId)).size>1);pageWebMcp=X(()=>this.onShownPages(this.webMcp()).filter(e=>e.tools.length));onShownPages(e){let t=this.hostPageId;return t&&!this.allPages()?e.filter(e=>e.pageId===t):e}webMcpPage(e){let t=ST(e);return this.webMcp().find(e=>e.pageId===t)}picking=E(null);pickSeq=0;unsubscribe=null;destroyRef=S(vs);host=S(kl);injector=S(gs);counts=X(()=>new Map(this.visible().map(e=>[e.id,{fields:_1(e.root),errors:g1(e.root)}])));chosen=X(()=>{let e=this.selectedId();if(e===null)return null;let t=this.forms(),n=this.selectedLabel(),r=ST(e);return t.find(t=>t.id===e)??t.find(e=>e.label===n&&ST(e.id)===r)??null});selected=X(()=>{let e=this.visible();if(this.selectedId()===null)return e[0]??null;let t=this.chosen();return t&&e.includes(t)?t:null});missing=X(()=>this.selectedId()!==null&&!this.chosen()&&this.visible().length?this.selectedLabel()??this.selectedId():null);hidden=X(()=>{let e=this.chosen();return e&&!this.selected()&&this.visible().length?e.label:null});selectedFormId=X(()=>this.selected()?.id??null);fieldPath=Q({source:this.selectedFormId,computation:()=>null});armed=Q({source:this.selectedFormId,computation:()=>null});snapshot=Q({source:this.selectedFormId,computation:()=>null});rows=X(()=>{let e=this.selected();if(!e)return[];let t=this.filter().toLowerCase(),n=Array.from(this.active()),r=[],i=(e,a)=>{let o=r.length,s=(!t||e.path.toLowerCase().includes(t))&&n.every(t=>gQ(e,t));for(let t of e.children??[])s=i(t,a+1)||s;return s&&r.splice(o,0,{node:e,depth:a}),s};return i(e.root,0),r});selectedNode=X(()=>{let e=this.fieldPath(),t=this.selected();if(e===null||!t)return null;let n=t=>t.path===e?t:(t.children??[]).map(n).find(Boolean)??null;return n(t.root)});dropped=E({});droppedEvents=X(()=>{let e=this.selected()?.id;return e?this.dropped()[ST(e)]??0:0});maxEvents=X(()=>NT(this.rpc()).limits.formTimeline);selectedEvents=X(()=>{let e=this.selected()?.id;return this.events().filter(t=>t.formId===e)});constructor(){ac(()=>{let e=this.rpc();e&&this.load(e)}),ac(()=>{let e=this.focus();e&&Z(()=>{this.selectForm(e.id),this.focusHandled.emit()})}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),this.highlight(null,``)})}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`forms`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e;this.forms.set(t?.forms??[]),this.events.set(t?.events??[]),this.instrumented.set(t?.instrumented??[]),this.dropped.set(t?.dropped??{}),this.webMcp.set(t?.webMcp??[]),this.setupErrors.set(t?.setupErrors??[]),this.version.update(e=>e+1)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}retry(){let e=this.rpc();e&&this.load(e)}async pick(){let e=this.selected();if(!e)return;let t=++this.pickSeq;this.picking.set(e.id),this.message.set(`Click a field in the app. Press Escape or Cancel picking to stop.`);let n=await kT(this.rpc(),{action:`pick`,formId:e.id});if(t!==this.pickSeq)return;this.picking.set(null);let r=n;if(!n.ok||!r.formId){this.message.set(AT(n));return}this.selectForm(r.formId),this.tab_.set(`fields`),this.fieldPath.set(r.path??``),this.message.set(`Picked ${r.path||`(form)`}.`)}cancelPick(){let e=this.picking();e&&kT(this.rpc(),{action:`cancel-pick`,formId:e})}async setRecording(e){let t=this.selected();if(!t)return;let n=await kT(this.rpc(),{action:`instrument`,formId:t.id,value:e});this.message.set(AT(n))}selectForm(e){this.hostPageId&&ST(e)&&ST(e)!==this.hostPageId&&this.allPages.set(!0),this.selectedId.set(e),this.selectedLabel.set(this.forms().find(t=>t.id===e)?.label??null),this.filter.set(``),this.fieldPath.set(null),this.snapshot.set(null),this.armed.set(null)}toggleField(e){this.fieldPath.update(t=>t===e?null:e)}closeField(){let e=this.host.nativeElement,t=e.querySelector(`button.field[aria-pressed="true"]`)??e.querySelector(`.table-scroll`);this.fieldPath.set(null),t?.focus()}showField(e){this.tab_.set(`fields`);let t=()=>this.rows().some(t=>t.node.path===e);t()||this.filter.set(``),t()||this.active.set(new Set),this.fieldPath.set(e),ed(()=>{let e=this.host.nativeElement;e.querySelector(`button.field[aria-pressed="true"]`)?.scrollIntoView?.({block:`nearest`}),(e.querySelector(`#forms-field-heading`)??e.querySelector(`.table-scroll`))?.focus()},{injector:this.injector})}async act(e,t={}){let n=this.selected();if(!n)return;this.armed.set(null);let r=await kT(this.rpc(),{action:e,formId:n.id,...t});r.snapshot&&this.selected()?.id===n.id&&this.snapshot.set(r.snapshot),this.message.set(AT(r))}confirmAct(e){if(this.armed()!==e){this.armed.set(e),this.message.set(`Press "Confirm ${e}" to ${e} the form in the app.`);return}this.act(e,{confirm:!0,snapshot:this.snapshot()??void 0})}onKey(e){let t=this.tabs().map(e=>e.id),n=t.indexOf(this.tab_()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.tab_.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#forms-tab-${t[r]}`)?.focus())}clearFilters(e){this.filter.set(``),this.active.set(new Set);let t=this.rows().length,n=`Filters cleared. Showing ${t} ${t===1?`field`:`fields`}.`;this.filterStatus.update(e=>e===n?`${n}\u00a0`:n),e.focus()}highlight(e,t){let n=this.rpc();n&&n.scope(`pangular`).rpc.callEvent(`request-form-highlight`,e?{formId:e,path:t}:null)}kindLabel(e){return CT[e]}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-inspector`]],hostBindings:function(e,t){e&1&&H(`keydown.escape`,function(){return t.cancelPick()})},inputs:{rpc:[1,`rpc`],focus:[1,`focus`]},outputs:{focusHandled:`focusHandled`},decls:10,vars:3,consts:[[1,`page-intro`],[3,`errors`,`showPages`],[`role`,`status`,1,`empty`],[`role`,`alert`,1,`empty`],[1,`empty`],[1,`layout`],[3,`pages`],[`aria-hidden`,`true`,1,`spinner`],[1,`empty-title`],[1,`muted`],[`type`,`button`,1,`small`,3,`click`],[3,`allPagesChange`,`selectForm`,`forms`,`selectedId`,`counts`,`showToggle`,`allPages`],[`aria-labelledby`,`forms-detail-title`,1,`detail`,`gone`],[`aria-labelledby`,`forms-detail-title`,1,`detail`],[`id`,`forms-detail-title`],[`role`,`status`,1,`muted`],[1,`detail-head`],[1,`detail-meta`],[1,`summary`],[1,`badge`],[1,`totals`],[1,`error-summary`],[3,`tool`,`page`,`signalForm`,`formId`,`rpc`],[3,`act`,`confirmAct`,`pick`,`cancelPick`,`canWrite`,`writesOff`,`picking`,`snapshot`,`armed`,`message`],[`role`,`tablist`,`aria-label`,`Form views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[3,`form`,`rows`,`fieldPath`,`selectedNode`,`version`,`rpc`,`filtering`,`filterStatus`,`filter`,`active`],[3,`form`],[3,`formId`,`version`,`rpc`],[`type`,`button`,1,`summary-link`,3,`click`],[1,`sr-only`],[1,`kind-tag`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[3,`filterChange`,`activeChange`,`toggleField`,`closeField`,`clearFilters`,`highlight`,`form`,`rows`,`fieldPath`,`selectedNode`,`version`,`rpc`,`filtering`,`filterStatus`,`filter`,`active`],[3,`formId`,`rpc`],[`what`,`form events on this page`,`limit`,`formTimeline`,3,`dropped`,`max`],[3,`record`,`events`,`recording`],[3,`showField`,`formId`,`version`,`rpc`]],template:function(e,t){e&1&&(F(0,`p`,0),K(1,` Signal Forms, reactive and template-driven forms on the live page, with each field's state and errors, a change timeline, submit explanations and a lint. Development builds only. `),I(),A(2,J$,1,2,`app-forms-setup-errors`,1),A(3,Y$,4,0,`div`,2)(4,X$,7,0,`div`,3)(5,Z$,4,0,`div`,2)(6,Q$,5,0,`div`,4)(7,$$,7,2,`div`,4)(8,p1,5,6,`div`,5),A(9,m1,1,1,`app-forms-webmcp-others`,6)),e&2&&(D(2),j(t.pageSetupErrors().length?2:-1),D(),j(t.rpc()?t.failed()?4:t.loading()?5:t.forms().length?t.visible().length?8:7:6:3),D(6),j(t.rpc()&&!t.failed()&&!t.loading()?9:-1))},dependencies:[gZ,yZ,vQ,CQ,IQ,YQ,m$,GQ,KQ,G$,K$,eO],styles:[`.muted[_ngcontent-%COMP%] { +}`]})},Q$=(e,t)=>t.id;function $$(e,t){if(e&1&&L(0,`app-forms-setup-errors`,1),e&2){let e=W();P(`errors`,e.pageSetupErrors())(`showPages`,e.setupErrorPages())}}function e1(e,t){e&1&&(F(0,`div`,2),L(1,`span`,7),F(2,`p`),K(3,`Connecting to the devtools server…`),I()())}function t1(e,t){if(e&1){let e=B();F(0,`div`,3)(1,`p`,8),K(2,`Could not load forms`),I(),F(3,`p`,9),K(4,` The devtools server did not answer. Check that the app is running, then try again. `),I(),F(5,`button`,10),H(`click`,function(){return C(e),w(W().retry())}),K(6,`Try again`),I()()}}function n1(e,t){e&1&&(F(0,`div`,2),L(1,`span`,7),F(2,`p`),K(3,`Loading forms…`),I()())}function r1(e,t){e&1&&(F(0,`div`,4)(1,`p`,8),K(2,`No forms on the page yet`),I(),F(3,`p`,9),K(4,` Open a page that renders a form. Signal Forms, reactive and template-driven forms all show up here, in development builds. `),I()())}function i1(e,t){if(e&1){let e=B();F(0,`div`,4)(1,`p`,8),K(2,`No forms on this page`),I(),F(3,`p`,9),K(4),I(),F(5,`button`,10),H(`click`,function(){return C(e),w(W().allPages.set(!0))}),K(6,` Show forms from all pages `),I()()}if(e&2){let e=W();D(4),Y(` Other connected tabs report `,e.forms().length,` `,e.forms().length===1?`form`:`forms`,`. `)}}function a1(e,t){if(e&1){let e=B();F(0,`section`,12)(1,`h2`,14),K(2),I(),F(3,`p`,15),K(4,` This form is no longer on the page. It comes back here if the page renders it again. `),I(),F(5,`button`,10),H(`click`,function(){C(e);let t=W(2);return w(t.selectForm(t.visible()[0].id))}),K(6),I()()}if(e&2){let e=W(2);D(2),q(t),D(4),J(` Show `,e.visible()[0].label,` `)}}function o1(e,t){if(e&1){let e=B();F(0,`section`,12)(1,`h2`,14),K(2),I(),F(3,`p`,9),K(4,`This form is on another page. Tick "All pages" to see it again.`),I(),F(5,`button`,10),H(`click`,function(){return C(e),w(W(2).allPages.set(!0))}),K(6,` Show forms from all pages `),I()()}e&2&&(D(2),q(t))}function s1(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W();D(),q(e.submitted?`submitted`:`not submitted`)}}function c1(e,t){e&1&&(F(0,`span`),K(1,`submitting`),I())}function l1(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,29),H(`click`,function(){let t=C(e).$implicit;return w(W(4).showField(t.path))}),F(2,`span`,30),K(3,`Show field `),I(),F(4,`code`),K(5),I(),F(6,`span`,30),K(7,`:`),I(),K(8),F(9,`code`,31),K(10),I()()()}if(e&2){let e=t.$implicit;D(5),q(e.path||`(form)`),D(3),J(` `,e.message,` `),D(2),q(e.kind)}}function u1(e,t){if(e&1&&(F(0,`details`,21)(1,`summary`),K(2),I(),F(3,`ul`),M(4,l1,11,3,`li`,null,Yh),I()()),e&2){let e=W();D(2),J(`Error summary (`,e.errorSummary.length,`)`),D(2),N(e.errorSummary)}}function d1(e,t){if(e&1){let e=B();F(0,`button`,32),H(`click`,function(){let t=C(e).$implicit;return w(W(3).tab_.set(t.id))}),K(1),I()}if(e&2){let e=t.$implicit,n=W(3);P(`id`,`forms-tab-`+e.id),k(`aria-selected`,e.id===n.tab_())(`aria-controls`,`forms-panel-`+e.id)(`tabindex`,e.id===n.tab_()?0:-1),D(),J(` `,e.label,` `)}}function f1(e,t){if(e&1){let e=B();L(0,`app-redaction-count`,33),F(1,`app-forms-fields`,34),w_(`filterChange`,function(t){C(e);let n=W(3);return C_(n.filter,t)||(n.filter=t),w(t)})(`activeChange`,function(t){C(e);let n=W(3);return C_(n.active,t)||(n.active=t),w(t)}),H(`toggleField`,function(t){return C(e),w(W(3).toggleField(t))})(`closeField`,function(){return C(e),w(W(3).closeField())})(`clearFilters`,function(t){return C(e),w(W(3).clearFilters(t))})(`highlight`,function(t){return C(e),w(W(3).highlight(t?.formId??null,t?.path??``))}),I()}if(e&2){let e=W(),t=W(2);P(`value`,e),D(),P(`form`,e)(`rows`,t.rows())(`fieldPath`,t.fieldPath())(`selectedNode`,t.selectedNode())(`version`,t.version())(`rpc`,t.rpc())(`filtering`,t.filtering())(`filterStatus`,t.filterStatus()),S_(`filter`,t.filter)(`active`,t.active)}}function p1(e,t){e&1&&L(0,`app-forms-schema`,27),e&2&&P(`form`,W())}function m1(e,t){if(e&1){let e=B();L(0,`app-forms-export-test`,35)(1,`app-limit-note`,36),F(2,`app-forms-timeline`,37),H(`record`,function(t){return C(e),w(W(3).setRecording(t))}),I()}if(e&2){let e=W(),t=W(2);P(`formId`,e.id)(`rpc`,t.rpc()),D(),P(`dropped`,t.droppedEvents())(`max`,t.maxEvents()),D(),P(`events`,t.selectedEvents())(`recording`,t.recording())}}function h1(e,t){if(e&1&&L(0,`app-forms-submit`,28),e&2){let e=W(),t=W(2);P(`formId`,e.id)(`version`,t.version())(`rpc`,t.rpc())}}function g1(e,t){if(e&1){let e=B();F(0,`app-forms-lint`,38),H(`showField`,function(t){return C(e),w(W(3).showField(t))}),I()}if(e&2){let e=W(),t=W(2);P(`formId`,e.id)(`version`,t.version())(`rpc`,t.rpc())}}function _1(e,t){if(e&1){let e=B();F(0,`section`,13)(1,`div`,16)(2,`h2`,14),K(3),I(),F(4,`p`,17),K(5),F(6,`code`),K(7),I()()(),F(8,`div`,18)(9,`span`,19),K(10),I(),F(11,`span`),K(12),I(),F(13,`span`),K(14),I(),A(15,s1,2,1,`span`),A(16,c1,2,0,`span`),F(17,`span`,20)(18,`b`),K(19),I(),K(20,` fields · `),F(21,`b`),K(22),I(),K(23,` errors`),I()(),A(24,u1,6,1,`details`,21),L(25,`app-forms-webmcp`,22),F(26,`app-forms-action-bar`,23),H(`act`,function(t){return C(e),w(W(2).act(t))})(`confirmAct`,function(t){return C(e),w(W(2).confirmAct(t))})(`pick`,function(){return C(e),w(W(2).pick())})(`cancelPick`,function(){return C(e),w(W(2).cancelPick())}),I(),F(27,`div`,24),H(`keydown`,function(t){return C(e),w(W(2).onKey(t))}),M(28,d1,2,5,`button`,25,Q$),I(),F(30,`div`,26),A(31,f1,2,11)(32,p1,1,1,`app-forms-schema`,27)(33,m1,3,6)(34,h1,1,3,`app-forms-submit`,28)(35,g1,1,3,`app-forms-lint`,28),I()()}if(e&2){let e,n=t,r=W(2);D(3),q(n.label),D(2),J(` `,r.kindLabel(n.kind),` · `),D(2),q(n.id),D(2),k(`data-status`,n.root.status),D(),q(n.root.status),D(2),q(n.root.dirty?`dirty`:`pristine`),D(2),q(n.root.touched?`touched`:`untouched`),D(),j(n.submitted===void 0?-1:15),D(),j(n.root.submitting?16:-1),D(3),q(r.counts().get(n.id)?.fields),D(2),G(`has-errors`,r.counts().get(n.id)?.errors),D(),q(r.counts().get(n.id)?.errors),D(2),j(n.errorSummary?.length?24:-1),D(),P(`tool`,n.webMcp)(`page`,r.webMcpPage(n.id))(`signalForm`,n.kind===`signal`)(`formId`,n.id)(`rpc`,r.rpc()),D(),P(`canWrite`,r.canWrite())(`writesOff`,r.writesOff)(`picking`,r.picking())(`snapshot`,r.snapshot())(`armed`,r.armed())(`message`,r.message()),D(2),N(r.tabs()),D(2),P(`id`,`forms-panel-`+r.tab_()),k(`aria-labelledby`,`forms-tab-`+r.tab_()),D(),j((e=r.tab_())===`fields`?31:e===`schema`?32:e===`timeline`?33:e===`submit`?34:e===`lint`?35:-1)}}function v1(e,t){if(e&1){let e=B();F(0,`div`,5)(1,`app-forms-list`,11),w_(`allPagesChange`,function(t){C(e);let n=W();return C_(n.allPages,t)||(n.allPages=t),w(t)}),H(`selectForm`,function(t){return C(e),w(W().selectForm(t))}),I(),A(2,a1,7,2,`section`,12)(3,o1,7,1,`section`,12)(4,_1,36,28,`section`,13),I()}if(e&2){let e,t=W();D(),P(`forms`,t.visible())(`selectedId`,t.selected()?.id)(`counts`,t.counts())(`showToggle`,!!t.hostPageId&&(t.allPages()||t.otherPages())),S_(`allPages`,t.allPages),D(),j((e=t.missing())?2:(e=t.hidden())?3:(e=t.selected())?4:-1,e)}}function y1(e,t){e&1&&L(0,`app-forms-webmcp-others`,6),e&2&&P(`pages`,W().pageWebMcp())}var b1=[{id:`fields`,label:`Fields`},{id:`schema`,label:`Schema`},{id:`timeline`,label:`Timeline`},{id:`submit`,label:`Submit`},{id:`lint`,label:`Lint`}];function x1(e){return e.errors.length+(e.children??[]).reduce((e,t)=>e+x1(t),0)}function S1(e){return e.children?e.children.reduce((e,t)=>e+S1(t),0):+(e.type===`control`&&e.materialized!==!1)}var C1=class e{rpc=$(null);focus=$(null);canWrite=X(()=>IT(this.rpc(),`forms`));writesOff=Uw(`forms`);focusHandled=ev();forms=E([]);webMcp=E([]);events=E([]);loading=E(!0);failed=E(!1);selectedId=E(null);selectedLabel=E(null);hostPageId=fT();allPages=E(!1);visible=X(()=>{let e=this.forms(),t=this.hostPageId;return t&&!this.allPages()?e.filter(e=>ST(e.id)===t):e});otherPages=X(()=>this.forms().some(e=>ST(e.id)!==this.hostPageId));instrumented=E([]);recording=X(()=>{let e=this.selected()?.id??``;return this.instrumented().some(t=>e.endsWith(`@${t}`))});filter=E(``);tabs=X(()=>this.selected()?.kind===`signal`?b1:b1.filter(e=>e.id!==`schema`));tab_=Q({source:this.tabs,computation:(e,t)=>t&&e.some(e=>e.id===t.value)?t.value:`fields`});active=E(new Set);filtering=X(()=>!!this.filter()||this.active().size>0);filterStatus=E(``);version=E(0);message=E(``);setupErrors=E([]);pageSetupErrors=X(()=>this.onShownPages(this.setupErrors()));setupErrorPages=X(()=>new Set(this.pageSetupErrors().map(e=>e.pageId)).size>1);pageWebMcp=X(()=>this.onShownPages(this.webMcp()).filter(e=>e.tools.length));onShownPages(e){let t=this.hostPageId;return t&&!this.allPages()?e.filter(e=>e.pageId===t):e}webMcpPage(e){let t=ST(e);return this.webMcp().find(e=>e.pageId===t)}picking=E(null);pickSeq=0;unsubscribe=null;destroyRef=S(vs);host=S(kl);injector=S(gs);counts=X(()=>new Map(this.visible().map(e=>[e.id,{fields:S1(e.root),errors:x1(e.root)}])));chosen=X(()=>{let e=this.selectedId();if(e===null)return null;let t=this.forms(),n=this.selectedLabel(),r=ST(e);return t.find(t=>t.id===e)??t.find(e=>e.label===n&&ST(e.id)===r)??null});selected=X(()=>{let e=this.visible();if(this.selectedId()===null)return e[0]??null;let t=this.chosen();return t&&e.includes(t)?t:null});missing=X(()=>this.selectedId()!==null&&!this.chosen()&&this.visible().length?this.selectedLabel()??this.selectedId():null);hidden=X(()=>{let e=this.chosen();return e&&!this.selected()&&this.visible().length?e.label:null});selectedFormId=X(()=>this.selected()?.id??null);fieldPath=Q({source:this.selectedFormId,computation:()=>null});armed=Q({source:this.selectedFormId,computation:()=>null});snapshot=Q({source:this.selectedFormId,computation:()=>null});rows=X(()=>{let e=this.selected();if(!e)return[];let t=this.filter().toLowerCase(),n=Array.from(this.active()),r=[],i=(e,a)=>{let o=r.length,s=(!t||e.path.toLowerCase().includes(t))&&n.every(t=>xQ(e,t));for(let t of e.children??[])s=i(t,a+1)||s;return s&&r.splice(o,0,{node:e,depth:a}),s};return i(e.root,0),r});selectedNode=X(()=>{let e=this.fieldPath(),t=this.selected();if(e===null||!t)return null;let n=t=>t.path===e?t:(t.children??[]).map(n).find(Boolean)??null;return n(t.root)});dropped=E({});droppedEvents=X(()=>{let e=this.selected()?.id;return e?this.dropped()[ST(e)]??0:0});maxEvents=X(()=>NT(this.rpc()).limits.formTimeline);selectedEvents=X(()=>{let e=this.selected()?.id;return this.events().filter(t=>t.formId===e)});constructor(){ac(()=>{let e=this.rpc();e&&this.load(e)}),ac(()=>{let e=this.focus();e&&Z(()=>{this.selectForm(e.id),this.focusHandled.emit()})}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),this.highlight(null,``)})}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`forms`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e;this.forms.set(t?.forms??[]),this.events.set(t?.events??[]),this.instrumented.set(t?.instrumented??[]),this.dropped.set(t?.dropped??{}),this.webMcp.set(t?.webMcp??[]),this.setupErrors.set(t?.setupErrors??[]),this.version.update(e=>e+1)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}retry(){let e=this.rpc();e&&this.load(e)}async pick(){let e=this.selected();if(!e)return;let t=++this.pickSeq;this.picking.set(e.id),this.message.set(`Click a field in the app. Press Escape or Cancel picking to stop.`);let n=await kT(this.rpc(),{action:`pick`,formId:e.id});if(t!==this.pickSeq)return;this.picking.set(null);let r=n;if(!n.ok||!r.formId){this.message.set(AT(n));return}this.selectForm(r.formId),this.tab_.set(`fields`),this.fieldPath.set(r.path??``),this.message.set(`Picked ${r.path||`(form)`}.`)}cancelPick(){let e=this.picking();e&&kT(this.rpc(),{action:`cancel-pick`,formId:e})}async setRecording(e){let t=this.selected();if(!t)return;let n=await kT(this.rpc(),{action:`instrument`,formId:t.id,value:e});this.message.set(AT(n))}selectForm(e){this.hostPageId&&ST(e)&&ST(e)!==this.hostPageId&&this.allPages.set(!0),this.selectedId.set(e),this.selectedLabel.set(this.forms().find(t=>t.id===e)?.label??null),this.filter.set(``),this.fieldPath.set(null),this.snapshot.set(null),this.armed.set(null)}toggleField(e){this.fieldPath.update(t=>t===e?null:e)}closeField(){let e=this.host.nativeElement,t=e.querySelector(`button.field[aria-pressed="true"]`)??e.querySelector(`.table-scroll`);this.fieldPath.set(null),t?.focus()}showField(e){this.tab_.set(`fields`);let t=()=>this.rows().some(t=>t.node.path===e);t()||this.filter.set(``),t()||this.active.set(new Set),this.fieldPath.set(e),td(()=>{let e=this.host.nativeElement;e.querySelector(`button.field[aria-pressed="true"]`)?.scrollIntoView?.({block:`nearest`}),(e.querySelector(`#forms-field-heading`)??e.querySelector(`.table-scroll`))?.focus()},{injector:this.injector})}async act(e,t={}){let n=this.selected();if(!n)return;this.armed.set(null);let r=await kT(this.rpc(),{action:e,formId:n.id,...t});r.snapshot&&this.selected()?.id===n.id&&this.snapshot.set(r.snapshot),this.message.set(AT(r))}confirmAct(e){if(this.armed()!==e){this.armed.set(e),this.message.set(`Press "Confirm ${e}" to ${e} the form in the app.`);return}this.act(e,{confirm:!0,snapshot:this.snapshot()??void 0})}onKey(e){let t=this.tabs().map(e=>e.id),n=t.indexOf(this.tab_()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.tab_.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#forms-tab-${t[r]}`)?.focus())}clearFilters(e){this.filter.set(``),this.active.set(new Set);let t=this.rows().length,n=`Filters cleared. Showing ${t} ${t===1?`field`:`fields`}.`;this.filterStatus.update(e=>e===n?`${n}\u00a0`:n),e.focus()}highlight(e,t){let n=this.rpc();n&&n.scope(`pangular`).rpc.callEvent(`request-form-highlight`,e?{formId:e,path:t}:null)}kindLabel(e){return CT[e]}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-forms-inspector`]],hostBindings:function(e,t){e&1&&H(`keydown.escape`,function(){return t.cancelPick()})},inputs:{rpc:[1,`rpc`],focus:[1,`focus`]},outputs:{focusHandled:`focusHandled`},decls:10,vars:3,consts:[[1,`page-intro`],[3,`errors`,`showPages`],[`role`,`status`,1,`empty`],[`role`,`alert`,1,`empty`],[1,`empty`],[1,`layout`],[3,`pages`],[`aria-hidden`,`true`,1,`spinner`],[1,`empty-title`],[1,`muted`],[`type`,`button`,1,`small`,3,`click`],[3,`allPagesChange`,`selectForm`,`forms`,`selectedId`,`counts`,`showToggle`,`allPages`],[`aria-labelledby`,`forms-detail-title`,1,`detail`,`gone`],[`aria-labelledby`,`forms-detail-title`,1,`detail`],[`id`,`forms-detail-title`],[`role`,`status`,1,`muted`],[1,`detail-head`],[1,`detail-meta`],[1,`summary`],[1,`badge`],[1,`totals`],[1,`error-summary`],[3,`tool`,`page`,`signalForm`,`formId`,`rpc`],[3,`act`,`confirmAct`,`pick`,`cancelPick`,`canWrite`,`writesOff`,`picking`,`snapshot`,`armed`,`message`],[`role`,`tablist`,`aria-label`,`Form views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[3,`form`],[3,`formId`,`version`,`rpc`],[`type`,`button`,1,`summary-link`,3,`click`],[1,`sr-only`],[1,`kind-tag`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[3,`value`],[3,`filterChange`,`activeChange`,`toggleField`,`closeField`,`clearFilters`,`highlight`,`form`,`rows`,`fieldPath`,`selectedNode`,`version`,`rpc`,`filtering`,`filterStatus`,`filter`,`active`],[3,`formId`,`rpc`],[`what`,`form events on this page`,`limit`,`formTimeline`,3,`dropped`,`max`],[3,`record`,`events`,`recording`],[3,`showField`,`formId`,`version`,`rpc`]],template:function(e,t){e&1&&(F(0,`p`,0),K(1,` Signal Forms, reactive and template-driven forms on the live page, with each field's state and errors, a change timeline, submit explanations and a lint. Development builds only. `),I(),A(2,$$,1,2,`app-forms-setup-errors`,1),A(3,e1,4,0,`div`,2)(4,t1,7,0,`div`,3)(5,n1,4,0,`div`,2)(6,r1,5,0,`div`,4)(7,i1,7,2,`div`,4)(8,v1,5,6,`div`,5),A(9,y1,1,1,`app-forms-webmcp-others`,6)),e&2&&(D(2),j(t.pageSetupErrors().length?2:-1),D(),j(t.rpc()?t.failed()?4:t.loading()?5:t.forms().length?t.visible().length?8:7:6:3),D(6),j(t.rpc()&&!t.failed()&&!t.loading()?9:-1))},dependencies:[cP,xZ,wZ,CQ,OQ,VQ,e$,y$,XQ,ZQ,X$,Z$,eO],styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); } @@ -16790,7 +16804,7 @@ code[_ngcontent-%COMP%] { flex-basis: 100%; margin-left: 0; } -}`]})},y1=[`filterInput`],b1=(e,t)=>t.file+t.name,x1=(e,t)=>t.file+`:`+t.line,S1=(e,t)=>t.name;function C1(e,t){e&1&&(F(0,`p`,11),T(),F(1,`svg`,23),L(2,`circle`,24)(3,`path`,25),I(),cs(),F(4,`span`),K(5),I()()),e&2&&(D(5),q(t))}function w1(e,t){if(e&1&&(F(0,`p`,11),T(),F(1,`svg`,23),L(2,`circle`,24)(3,`path`,25),I(),cs(),F(4,`span`)(5,`strong`),K(6),I(),K(7,` Pipe prototypes are patched in the inspected page to count calls and keep the last input and output. Stop recording when you are done. `),I()()),e&2){let e=W();D(6),J(`Recording on `,e.plural(e.instrumentedPages().length,`page`),`.`)}}function T1(e,t){e&1&&(F(0,`div`,12),L(1,`span`,26),F(2,`p`,27),K(3,`Scanning pipes…`),I()())}function E1(e,t){if(e&1){let e=B();F(0,`div`,13)(1,`p`,27),K(2,`Couldn't load pipes`),I(),F(3,`p`,28),K(4,`The devtools server did not answer. Check that it is running.`),I(),F(5,`button`,29),H(`click`,function(){return C(e),w(W().refresh())}),K(6,`Try again`),I()()}}function D1(e,t){e&1&&(F(0,`div`,14)(1,`p`,27),K(2,`No pipes found`),I(),F(3,`p`,28),K(4,` No @Pipe classes were found in the source, and no template uses a built-in pipe yet. `),I()())}function O1(e,t){e&1&&K(0,` Couldn't scan the source again. The list keeps the last scan. `)}function k1(e,t){e&1&&K(0,` Couldn't scan the source. Only pipes seen on the page are listed. `)}function A1(e,t){if(e&1){let e=B();F(0,`div`,30),T(),F(1,`svg`,23),L(2,`circle`,24)(3,`path`,36),I(),cs(),F(4,`span`),A(5,O1,1,0)(6,k1,1,0),I(),F(7,`button`,8),H(`click`,function(){return C(e),w(W(2).refresh())}),K(8,`Try again`),I()()}if(e&2){let e=W(2);D(5),j(e.pipes().length?5:6),D(2),P(`disabled`,e.loading())}}function j1(e,t){e&1&&(F(0,`span`,43),K(1,`churning`),I())}function M1(e,t){e&1&&(F(0,`span`,43),K(1,`stale?`),I())}function N1(e,t){if(e&1&&(F(0,`span`,49),K(1),I()),e&2){let e=W(),t=W(4);D(),q(t.ms(e.totalMs))}}function P1(e,t){if(e&1&&(F(0,`span`,49),K(1),I(),A(2,N1,2,1,`span`,49)),e&2){let e=t,n=W(4);D(),q(n.plural(e.callCount,`call`)),D(),j(e.totalMs===void 0?-1:2)}}function F1(e,t){if(e&1&&(F(0,`span`,44),K(1),I()),e&2){W();let e=E_(0);D(),J(``,e.instanceCount,` live`)}}function I1(e,t){e&1&&(F(0,`span`,45),K(1,`built-in`),I())}function L1(e,t){e&1&&(F(0,`span`,45),K(1,`runtime only`),I())}function R1(e,t){e&1&&(F(0,`span`,45),K(1,`NgModule`),I())}function z1(e,t){e&1&&(F(0,`span`,47),K(1,`No source location`),I())}function B1(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;Y(` `,e.file,`:`,e.line,` `)}}function V1(e,t){if(e&1&&(F(0,`span`,48),K(1),I()),e&2){let e=W().$implicit;D(),J(`+`,(e.usageCount??1)-1,` more`)}}function H1(e,t){if(e&1&&(F(0,`span`,48),K(1),I()),e&2){let e=W().$implicit;D(),Y(``,e.usageCount,` `,e.usageCount===1?`use`:`uses`)}}function U1(e,t){if(e&1){let e=B();w_(0),F(1,`li`)(2,`button`,38),H(`click`,function(){let t=C(e).$implicit;return w(W(3).select(t))})(`mouseenter`,function(){C(e);let t=E_(0);return w(W(3).highlightPipe(t))})(`mouseleave`,function(){return C(e),w(W(3).highlight(null))})(`focus`,function(){C(e);let t=E_(0);return w(W(3).highlightPipe(t))})(`blur`,function(){return C(e),w(W(3).highlight(null))}),F(3,`span`,39)(4,`span`,40),K(5),I(),F(6,`span`,41),K(7),I()(),F(8,`span`,42),A(9,j1,2,0,`span`,43),A(10,M1,2,0,`span`,43),A(11,P1,3,2),A(12,F1,2,1,`span`,44),A(13,I1,2,0,`span`,45),A(14,L1,2,0,`span`,45),A(15,R1,2,0,`span`,45),F(16,`span`,45),K(17),I()(),F(18,`span`,46),A(19,z1,2,0,`span`,47)(20,B1,1,2),A(21,V1,2,1,`span`,48)(22,H1,2,2,`span`,48),I()()()}if(e&2){let e,n=t.$implicit,r=W(3),i=T_(r.liveFor(n.name));D(2),G(`selected`,r.isSelected(n)),k(`aria-current`,r.isSelected(n)||null),D(3),q(n.name),D(2),q(n.className),D(2),j(i?.churn?9:-1),D(),j(i?.stale?10:-1),D(),j((e=i?.call)?11:-1,e),D(),j(i?12:-1),D(),j(n.builtin?13:-1),D(),j(n.runtime?14:-1),D(),j(n.isStandalone?-1:15),D(),G(`impure`,!n.isPure),D(),q(n.isPure?`pure`:`impure`),D(2),j(n.runtime?19:20),D(2),j(n.builtin&&(n.usageCount??0)>1?21:!n.builtin&&n.usageCount?22:-1)}}function W1(e,t){if(e&1){let e=B();F(0,`ul`,37),H(`keydown`,function(t){return C(e),w(W(2).onListKey(t))}),M(1,U1,23,18,`li`,null,b1),I()}if(e&2){let e=W(2);D(),N(e.filtered())}}function G1(e,t){e&1&&K(0),e&2&&J(` Nothing matches “`,W(3).filter().trim(),`” in this view. `)}function K1(e,t){e&1&&K(0,` None of the pipes fit this filter. `)}function q1(e,t){if(e&1){let e=B();F(0,`div`,34)(1,`p`,27),K(2,`No pipes match`),I(),F(3,`p`,28),A(4,G1,1,1)(5,K1,1,0),I(),F(6,`button`,29),H(`click`,function(){return C(e),w(W(2).clearFilters())}),K(7,`Clear filters`),I()()}if(e&2){let e=W(2);D(4),j(e.filter().trim()?4:5)}}function J1(e,t){e&1&&(F(0,`span`,45),K(1,`built-in`),I())}function Y1(e,t){e&1&&(F(0,`span`,45),K(1,`runtime only`),I())}function X1(e,t){if(e&1&&(F(0,`dt`),K(1,`File`),I(),F(2,`dd`,53),L(3,`app-source-link`,55),I()),e&2){let e=W();D(3),P(`file`,e.file)(`line`,e.line)}}function Z1(e,t){if(e&1&&(F(0,`dt`),K(1,`Standalone`),I(),F(2,`dd`),K(3),I()),e&2){let e=W();D(3),q(e.isStandalone?`Yes`:`No, declared in an NgModule`)}}function Q1(e,t){if(e&1&&(F(0,`li`,53),L(1,`app-source-link`,55),I()),e&2){let e=t.$implicit;D(),P(`file`,e.file)(`line`,e.line)}}function $1(e,t){if(e&1&&(F(0,`div`,52)(1,`h3`),K(2,` Used in templates `),F(3,`span`,18),K(4),I()(),F(5,`ul`,56),M(6,Q1,2,2,`li`,53,x1),I()()),e&2){let e=W();D(4),q(e.usageCount),D(2),N(e.usages)}}function e0(e,t){e&1&&K(0),e&2&&J(` An instance ran `,W().streak,` times in a row and returned an equal result each time: its input changes reference while its contents stay the same. Keep the input stable, for example in a computed(). `)}function t0(e,t){e&1&&K(0),e&2&&J(` An instance returned an equal object or array as a new reference `,W().streak,` times in a row, so the bindings that read it update for nothing. Return the previous result when it is equal, or use a computed(). `)}function n0(e,t){if(e&1&&(F(0,`p`,57)(1,`span`,43),K(2,`churning`),I(),A(3,e0,1,1)(4,t0,1,1),I()),e&2){let e=W();D(3),j(e.isPure?3:4)}}function r0(e,t){e&1&&(F(0,`p`,57)(1,`span`,43),K(2,`experimental`),I(),K(3,` This pure pipe got an argument whose contents changed while its reference stayed the same, so it may be showing a stale value. `),I())}function i0(e,t){if(e&1){let e=B();F(0,`button`,62),H(`click`,function(){let t=C(e);return w(W(5).highlight(t,!0))})(`mouseenter`,function(){let t=C(e);return w(W(5).highlight(t))})(`mouseleave`,function(){return C(e),w(W(5).highlight(null))})(`focus`,function(){let t=C(e);return w(W(5).highlight(t))})(`blur`,function(){return C(e),w(W(5).highlight(null))}),F(1,`span`,53),K(2),I(),F(3,`span`,63),K(4),I()()}if(e&2){let e=W().$implicit;k(`aria-label`,`Highlight `+e.name+` on the page`),D(2),q(e.name),D(2),q(e.count)}}function a0(e,t){if(e&1&&(F(0,`span`,61)(1,`span`,53),K(2),I(),F(3,`span`,63),K(4),I()()),e&2){let e=W().$implicit;D(2),q(e.name),D(2),q(e.count)}}function o0(e,t){if(e&1&&(F(0,`li`),A(1,i0,5,3,`button`,60)(2,a0,5,2,`span`,61),I()),e&2){let e,n=t.$implicit;D(),j((e=n.targets?.[0])?1:2,e)}}function s0(e,t){if(e&1&&(F(0,`dt`),K(1,`Time`),I(),F(2,`dd`),K(3),I()),e&2){let e=W(),t=W(4);D(3),__(` `,t.ms(e.totalMs),` total, `,t.ms(e.totalMs/e.callCount),` average, `,t.ms(e.maxMs??0),` slowest `)}}function c0(e,t){if(e&1&&(F(0,`span`,64),K(1),I()),e&2){let e=W(2);D(),q(e.lastError)}}function l0(e,t){if(e&1&&(F(0,`dt`),K(1,`Errors`),I(),F(2,`dd`),K(3),A(4,c0,2,1,`span`,64),I()),e&2){let e=W();D(3),J(` `,e.errorCount,` `),D(),j(e.lastError?4:-1)}}function u0(e,t){if(e&1){let e=B();F(0,`button`,62),H(`click`,function(){let t=C(e);return w(W(7).highlight(t,!0))})(`mouseenter`,function(){let t=C(e);return w(W(7).highlight(t))})(`mouseleave`,function(){return C(e),w(W(7).highlight(null))})(`focus`,function(){let t=C(e);return w(W(7).highlight(t))})(`blur`,function(){return C(e),w(W(7).highlight(null))}),F(1,`span`,53),K(2),I()()}if(e&2){let e=W().$implicit;k(`aria-label`,`Highlight `+e.component+` on the page`),D(2),q(e.component)}}function d0(e,t){if(e&1&&(F(0,`span`,61)(1,`span`,53),K(2),I()()),e&2){let e=W().$implicit;D(2),q(e.component)}}function f0(e,t){if(e&1&&(F(0,`span`,66),K(1),I()),e&2){let e=W().$implicit,t=W(6);D(),q(t.ms(e.totalMs))}}function p0(e,t){if(e&1&&(F(0,`span`,67),K(1),I()),e&2){let e=W().$implicit;D(),q(e.lastCaller)}}function m0(e,t){if(e&1&&(F(0,`li`,65),A(1,u0,3,2,`button`,60)(2,d0,3,1,`span`,61),F(3,`span`,64),K(4),F(5,`span`,66),K(6),I(),A(7,f0,2,1,`span`,66),I(),A(8,p0,2,1,`span`,67),I()),e&2){let e,n=t.$implicit,r=W(6);D(),j((e=n.target)?1:2,e),D(3),Y(` `,r.describe(n.lastArgs),` → `,r.describe(n.lastResult),` `),D(2),J(``,n.callCount,`×`),D(),j(n.totalMs===void 0?-1:7),D(),j(n.lastCaller?8:-1)}}function h0(e,t){if(e&1&&(F(0,`p`,59),K(1),I()),e&2){let e=W(2);D(),Y(` Showing `,e.instances.length,` of `,e.instanceTotal,` instances. `)}}function g0(e,t){if(e&1&&(F(0,`dt`),K(1,`Per instance`),I(),F(2,`dd`)(3,`ul`,56),M(4,m0,9,6,`li`,65,Jh),I(),A(6,h0,2,2,`p`,59),I()),e&2){let e=W();D(4),N(e.instances),D(2),j(e.instanceTotal?6:-1)}}function _0(e,t){if(e&1&&(F(0,`dt`),K(1,`Last caller`),I(),F(2,`dd`,64),K(3),I()),e&2){let e=W();D(3),q(e.lastCaller)}}function v0(e,t){if(e&1&&(F(0,`dt`),K(1,`Calls`),I(),F(2,`dd`),K(3),I(),A(4,s0,4,3),A(5,l0,5,2),F(6,`dt`),K(7,`Last input`),I(),F(8,`dd`,64),K(9),I(),F(10,`dt`),K(11,`Last output`),I(),F(12,`dd`,64),K(13),I(),A(14,g0,7,1),A(15,_0,4,1)),e&2){let e=t,n=W(4);D(3),q(e.callCount),D(),j(e.totalMs===void 0?-1:4),D(),j(e.errorCount?5:-1),D(4),q(n.describe(e.lastArgs)),D(4),q(n.describe(e.lastResult)),D(),j(e.instances?.length?14:-1),D(),j(e.lastCaller?15:-1)}}function y0(e,t){e&1&&(F(0,`dt`),K(1,`Calls`),I(),F(2,`dd`,68),K(3,`None recorded yet.`),I())}function b0(e,t){e&1&&(F(0,`p`,59),K(1,` The stale check is off for this pipe: it couldn't read the compiled template, which happens in minified builds. `),I())}function x0(e,t){e&1&&(F(0,`p`,59),K(1,`Turn on “Record calls” to see call counts and values.`),I())}function S0(e,t){if(e&1&&(A(0,n0,5,1,`p`,57),A(1,r0,4,0,`p`,57),F(2,`dl`)(3,`dt`),K(4,`Instances`),I(),F(5,`dd`),K(6),I(),F(7,`dt`),K(8,`Used by`),I(),F(9,`dd`)(10,`ul`,58),M(11,o0,3,1,`li`,null,S1),I()(),A(13,v0,16,7)(14,y0,4,0),I(),A(15,b0,2,0,`p`,59),A(16,x0,2,0,`p`,59)),e&2){let e,n,r=t,i=W(3);j((e=r.churn)?0:-1,e),D(),j(r.stale?1:-1),D(5),q(r.instanceCount),D(5),N(r.components),D(2),j((n=r.call)?13:i.instrumenting()?14:-1,n),D(2),j(r.staleCheck===`unavailable`?15:-1),D(),j(!r.call&&!i.instrumenting()?16:-1)}}function C0(e,t){e&1&&(F(0,`p`,54),K(1,` Not in use on the connected page. Open a view that uses it, or connect the app. `),I())}function w0(e,t){if(e&1&&(F(0,`header`,50)(1,`h2`,51),K(2),I(),F(3,`span`,45),K(4),I(),A(5,J1,2,0,`span`,45),A(6,Y1,2,0,`span`,45),I(),F(7,`div`,52)(8,`h3`),K(9,`Declaration`),I(),F(10,`dl`)(11,`dt`),K(12,`Class`),I(),F(13,`dd`,53),K(14),I(),F(15,`dt`),K(16,`Source`),I(),F(17,`dd`),K(18),I(),A(19,X1,4,2),A(20,Z1,4,1),F(21,`dt`),K(22,`Pure`),I(),F(23,`dd`),K(24),I()()(),A(25,$1,8,1,`div`,52),F(26,`div`,52)(27,`h3`),K(28,`Live on the page`),I(),A(29,S0,17,6)(30,C0,2,0,`p`,54),I()),e&2){let e,n=t,r=W(2);D(2),q(n.name),D(),G(`impure`,!n.isPure),D(),q(n.isPure?`pure`:`impure`),D(),j(n.builtin?5:-1),D(),j(n.runtime?6:-1),D(8),q(n.className),D(4),q(r.sourceLabel(n)),D(),j(!n.builtin&&!n.runtime?19:-1),D(),j(n.runtime?-1:20),D(4),J(` `,n.isPure?`Yes, reruns only when an input changes`:`No, reruns on every check`,` `),D(),j(n.usages?.length?25:-1),D(4),j((e=r.liveFor(n.name))?29:30,e)}}function T0(e,t){e&1&&(F(0,`h2`,69),K(1,`Pipe details`),I(),F(2,`div`,70)(3,`p`,27),K(4,`Pick a pipe`),I(),F(5,`p`,28),K(6,` See where it is declared, which components use it and what it last returned. `),I()())}function E0(e,t){if(e&1&&(A(0,A1,9,2,`div`,30),F(1,`div`,31)(2,`div`,32),A(3,W1,3,0,`ul`,33)(4,q1,8,1,`div`,34),I(),F(5,`section`,35),A(6,w0,31,13)(7,T0,7,0),I()()),e&2){let e,t=W();j(t.loadFailed()?0:-1),D(3),j(t.filtered().length?3:4),D(3),j((e=t.selected())?6:7,e)}}function D0(e,t){if(e&1&&(F(0,`p`,59),K(1),I()),e&2){let e=W(2);D(),Y(`Showing `,e.async().length,` of `,t,` subscriptions.`)}}function O0(e,t){if(e&1){let e=B();F(0,`button`,78),H(`click`,function(){let t=C(e);return w(W(3).highlight(t))})(`focus`,function(){let t=C(e);return w(W(3).highlight(t))})(`blur`,function(){return C(e),w(W(3).highlight(null))}),K(1),I()}if(e&2){let e=W().$implicit;k(`aria-label`,`Highlight `+e.component+` on the page`),D(),J(` `,e.component,` `)}}function k0(e,t){if(e&1&&(F(0,`span`,76),K(1),I()),e&2){let e=W().$implicit;D(),q(e.component)}}function A0(e,t){e&1&&(F(0,`span`,45),K(1,`no source`),I())}function j0(e,t){e&1&&(F(0,`span`,43),K(1,`possible duplicate subscription`),I())}function M0(e,t){e&1&&(F(0,`span`,43),K(1,`resubscribing`),I())}function N0(e,t){if(e&1){let e=B();F(0,`li`,74),H(`mouseenter`,function(){let t=C(e).$implicit;return w(W(2).highlight(t.target))})(`mouseleave`,function(){return C(e),w(W(2).highlight(null))}),A(1,O0,2,2,`button`,75)(2,k0,2,1,`span`,76),A(3,A0,2,0,`span`,45),A(4,j0,2,0,`span`,43),A(5,M0,2,0,`span`,43),F(6,`span`,77),K(7),I()()}if(e&2){let e,n=t.$implicit;D(),j((e=n.target)?1:2,e),D(2),j(n.hasSource?-1:3),D(),j(n.duplicate?4:-1),D(),j(n.resubscribing?5:-1),D(2),q(n.latestValue??`no value yet`)}}function P0(e,t){if(e&1&&(F(0,`section`,15)(1,`h2`,71),K(2,` Async subscriptions `),F(3,`span`,18),K(4),I()(),F(5,`p`,59),K(6,` Each `),F(7,`span`,53),K(8,`| async`),I(),K(9,` subscribes on its own. Two on the same source mean the work runs twice. A source that changes on every check, like `),F(10,`span`,53),K(11,`getData() | async`),I(),K(12,`, resubscribes each time. `),I(),A(13,D0,2,2,`p`,59),F(14,`ul`,72),M(15,N0,8,5,`li`,73,Jh),I()()),e&2){let e,t=W();D(4),q(t.async().length),D(9),j((e=t.asyncTotal())?13:-1,e),D(2),N(t.async())}}function F0(e,t){e&1&&(F(0,`span`,18),K(1),I()),e&2&&(D(),q(t.length))}function I0(e,t){e&1&&(F(0,`p`,19),K(1,`Couldn't run the lint check. Try Refresh.`),I())}function L0(e,t){e&1&&(F(0,`p`,20),K(1,`Checking…`),I())}function R0(e,t){e&1&&(F(0,`p`,21),K(1,`No problems found.`),I())}function z0(e,t){if(e&1){let e=B();F(0,`button`,88),H(`click`,function(){C(e),W();let t=E_(6);return w(W(2).showPipe(t))}),F(1,`span`,89),K(2,`Show pipe `),I(),K(3),I()}if(e&2){let e=W().$implicit;D(3),J(``,e.pipe,` `)}}function B0(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,e.pipe,` `)}}function V0(e,t){if(e&1&&(F(0,`li`,79)(1,`div`,80)(2,`span`,81),K(3),I(),F(4,`code`,82),K(5),I(),w_(6),F(7,`span`,83),A(8,z0,4,1,`button`,84)(9,B0,1,1),K(10,` · `),L(11,`app-source-link`,55),I()(),F(12,`p`,85),K(13),I(),F(14,`p`,86)(15,`span`,87),K(16,`Fix`),I(),K(17),I()()),e&2){let e=t.$implicit;D(2),k(`data-tone`,e.severity),D(),q(e.severity),D(2),q(e.rule),D();let n=T_(W(2).pipeFor(e));D(2),j(n?8:9),D(3),P(`file`,e.file)(`line`,e.line),D(2),q(e.message),D(4),J(` `,e.fix)}}function H0(e,t){if(e&1&&(F(0,`ul`,22),M(1,V0,18,9,`li`,79,Jh),I()),e&2){let e=W();D(),N(e.lint())}}var U0=5e3,W0=[{value:`all`,label:`All pipes`},{value:`custom`,label:`Custom`},{value:`builtin`,label:`Built-in`},{value:`runtime`,label:`Runtime only`},{value:`impure`,label:`Impure`},{value:`live`,label:`On the page`},{value:`called`,label:`Called while recording`}],G0=[{value:`source`,label:`Source order`},{value:`calls`,label:`Most calls`},{value:`time`,label:`Most time`}],K0=class e{plural=JE;destroyRef=S(vs);host=S(kl);injector=S(gs);filterInput=av(`filterInput`);rpc=$(null);focus=$(null);focusHandled=Q_();kindOptions=W0;sortOptions=G0;pipes=E([]);filter=E(``);kind=E(`all`);sort=E(`source`);loading=E(!1);loadFailed=E(!1);selected=E(null);live=E([]);async=E([]);asyncTotal=E(void 0);lint=E(null);lintFailed=E(!1);instrumentedPages=E([]);instrumenting=X(()=>this.instrumentedPages().length>0);pendingRecord=E(null);recordMessage=E(null);recordLabel=X(()=>{let e=this.pendingRecord();return e===null?this.instrumenting()?`Stop recording`:`Record calls`:e?`Starting…`:`Stopping…`});pendingTimer;liveByName=X(()=>new Map(this.live().map(e=>[e.name,e])));allPipes=X(()=>{let e=this.pipes(),t=new Set(e.map(e=>e.name)),n=this.live().filter(e=>!t.has(e.name)).map(e=>({name:e.name,className:e.className,file:``,line:0,isStandalone:!0,isPure:e.isPure,runtime:!0}));return n.length?[...e,...n]:e});filtered=X(()=>{let e=this.filter(),t=this.kind()??`all`,n=this.allPipes().filter(n=>this.fitsKind(n,t)&&this.fitsQuery(n,e)),r=this.sort()??`source`;if(r===`source`)return n;let i=e=>{let t=this.liveFor(e.name)?.call;return t?r===`calls`?t.callCount:t.totalMs??0:-1};return n.map((e,t)=>({p:e,index:t,weight:i(e)})).sort((e,t)=>t.weight-e.weight||e.index-t.index).map(({p:e})=>e)});pipesByName=X(()=>{let e=new Map;for(let t of this.allPipes())e.set(t.name,[...e.get(t.name)??[],t]);return e});unsubscribe;constructor(){ac(()=>{let e=this.rpc();e&&(this.refresh(),this.loadLive(e))}),ac(()=>{let e=this.focus();if(!e)return;let t=this.pipesByName().get(e)?.[0];t&&Z(()=>{this.showPipe(t),this.focusHandled.emit()})}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),clearTimeout(this.pendingTimer),this.highlight(null)})}async refresh(){let e=this.rpc();if(e){this.loading.set(!0),this.loadFailed.set(!1);try{let t=await e.scope(`pangular`).rpc.call(`get-pipes`);this.pipes.set(t);let n=this.selected();if(n){let e=this.allPipes().find(e=>e.name===n.name&&e.file===n.file);this.selected.set(e??null)}}catch{this.loadFailed.set(!0)}finally{this.loading.set(!1)}this.loadLint(e)}}async loadLint(e){this.lintFailed.set(!1);try{let t=await e.scope(`pangular`).rpc.call(`pipe-lint`);this.lint.set(t)}catch{this.lintFailed.set(!0)}}async loadLive(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`pipe-usage`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e,n=fT(),r=(n?t?.pages?.find(e=>e.pageId===n):void 0)??t;this.live.set(r?.pipes??[]);let i=this.selected();i?.runtime&&!this.liveByName().has(i.name)&&this.selected.set(null),this.async.set(r?.async??[]),this.asyncTotal.set(r?.asyncTotal);let a=t?.instrumented??[];this.instrumentedPages.set(a),this.pendingRecord()===a.length>0&&this.settleRecord(null)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{}}async toggleInstrument(){let e=this.rpc();if(!e||this.pendingRecord()!==null)return;let t=!this.instrumenting();this.recordMessage.set(null),this.pendingRecord.set(t);let n;try{let r=t?{pageId:fT()??void 0,on:t}:{on:t};n=await e.scope(`pangular`).rpc.call(`request-instrument-pipes`,r)}catch{this.settleRecord(`Couldn't reach the devtools server. Try again.`);return}if(this.pendingRecord()===t){if(n?.pages===0){this.settleRecord(`No page is connected. Open your app in the browser with the devtools running, then record again.`);return}clearTimeout(this.pendingTimer),this.pendingTimer=setTimeout(()=>{this.pendingRecord()===t&&this.settleRecord(t?`No page confirmed recording. Reload the app and try again.`:`No page confirmed it stopped recording. Reload the app to stop it.`)},U0)}}settleRecord(e){clearTimeout(this.pendingTimer),this.pendingRecord.set(null),e!==null&&this.recordMessage.set(e)}sourceLabel(e){return e.builtin?`@angular/common`:e.runtime?`Seen on the page only`:`This project`}liveFor(e){return this.liveByName().get(e)}ms(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}describe(e){if(Array.isArray(e))return e.map(e=>this.describe(e)).join(`, `);if(typeof e==`string`)return e.length>80?`${e.slice(0,80)}…`:e;try{let t=JSON.stringify(e);return t&&t.length>120?`${t.slice(0,120)}…`:t??String(e)}catch{return String(e)}}isSelected(e){let t=this.selected();return t!==null&&t.name===e.name&&t.file===e.file}select(e){this.selected.set(this.isSelected(e)?null:e)}pipeFor(e){let t=this.pipesByName().get(e.pipe);return t?.length?t.find(t=>t.file===e.file)??t[0]:null}showPipe(e){this.fitsQuery(e,this.filter())||this.filter.set(``),this.fitsKind(e,this.kind()??`all`)||this.kind.set(`all`),this.selected.set(e),ed(()=>{let e=this.host.nativeElement;e.querySelector(`.row.selected`)?.scrollIntoView?.({block:`nearest`}),e.querySelector(`#pipe-detail-title`)?.focus()},{injector:this.injector})}fitsKind(e,t){return t===`custom`?!e.builtin&&!e.runtime:t===`builtin`?!!e.builtin:t===`runtime`?!!e.runtime:t===`impure`?!e.isPure:t===`live`?this.liveByName().has(e.name):t!==`called`||!!this.liveByName().get(e.name)?.call}fitsQuery(e,t){let n=t.trim().toLowerCase();return!n||e.name.toLowerCase().includes(n)||e.className.toLowerCase().includes(n)||e.file.toLowerCase().includes(n)}clearFilters(){this.filter.set(``),this.kind.set(`all`),this.filterInput()?.focus()}highlightPipe(e){this.highlight(e?.components.find(e=>e.targets?.length)?.targets?.[0])}highlight(e,t=!1){let n=this.rpc();n&&n.scope(`pangular`).rpc.call(`request-page-highlight`,e?{...e,...t?{reveal:t}:{}}:null).catch(()=>{})}onListKey(e){if(![`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key))return;let t=Array.from(this.host.nativeElement.querySelectorAll(`[data-pipe-row]`));if(!t.length)return;let n=t.indexOf(document.activeElement),r=n;r=e.key===`ArrowDown`?Math.min(n+1,t.length-1):e.key===`ArrowUp`?Math.max(n-1,0):e.key===`Home`?0:t.length-1,e.preventDefault(),t[r]?.focus()}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-pipes-inspector`]],viewQuery:function(e,t){e&1&&Dg(t.filterInput,y1,5),e&2&&Og()},inputs:{rpc:[1,`rpc`],focus:[1,`focus`]},outputs:{focusHandled:`focusHandled`},decls:30,vars:20,consts:[[`filterInput`,``],[1,`intro`],[1,`toolbar`],[`placeholder`,`Filter by pipe, class or file`,`saveKey`,`pipes`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Show pipes`,3,`valueChange`,`options`,`value`],[`ariaLabel`,`Sort pipes`,3,`valueChange`,`options`,`value`],[`aria-live`,`polite`,1,`total`],[1,`actions`],[`type`,`button`,3,`click`,`disabled`],[`type`,`button`,1,`record`,3,`click`],[`aria-hidden`,`true`,1,`rec-dot`],[`role`,`status`,1,`notice`],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[1,`state`],[`aria-labelledby`,`async-title`,1,`section`],[`aria-labelledby`,`lint-title`,1,`section`],[`id`,`lint-title`],[1,`pill`],[`role`,`alert`,1,`empty-line`],[`role`,`status`,1,`empty-line`],[1,`empty-line`,`ok`],[1,`findings`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M12 11v5M12 8h.01`],[`aria-hidden`,`true`,1,`spinner`],[1,`state-title`],[1,`state-hint`],[`type`,`button`,3,`click`],[`role`,`alert`,1,`notice`,`error`],[1,`layout`],[1,`list-wrap`],[`aria-label`,`Pipes`,1,`pipe-list`],[`role`,`status`,1,`state`,`compact`],[`id`,`pipe-detail`,`aria-labelledby`,`pipe-detail-title`,1,`detail`],[`d`,`M12 8v5M12 16h.01`],[`aria-label`,`Pipes`,1,`pipe-list`,3,`keydown`],[`type`,`button`,`data-pipe-row`,``,`aria-controls`,`pipe-detail`,1,`row`,3,`click`,`mouseenter`,`mouseleave`,`focus`,`blur`],[1,`row-main`],[1,`name`,`mono`],[1,`sub`,`mono`],[1,`row-meta`],[1,`chip`,`warn`],[1,`chip`,`live`],[1,`chip`],[1,`row-file`,`mono`],[1,`no-source`],[1,`more`],[1,`chip`,`hot`],[1,`detail-head`],[`id`,`pipe-detail-title`,`tabindex`,`-1`,1,`mono`],[1,`block`],[1,`mono`],[1,`empty-line`],[3,`file`,`line`],[1,`sites`],[`role`,`note`,1,`warning`],[1,`chips`],[1,`hint`],[`type`,`button`,1,`component`],[1,`component`],[`type`,`button`,1,`component`,3,`click`,`mouseenter`,`mouseleave`,`focus`,`blur`],[1,`count`],[1,`mono`,`value`],[1,`instance`],[1,`calls`],[1,`mono`,`value`,`caller`],[1,`muted`],[`id`,`pipe-detail-title`,1,`visually-hidden`],[1,`state`,`compact`],[`id`,`async-title`],[1,`async-list`],[1,`async-row`],[1,`async-row`,3,`mouseenter`,`mouseleave`],[`type`,`button`,1,`component-name`,`mono`],[1,`mono`,`component-name`],[1,`mono`,`value`,`latest`],[`type`,`button`,1,`component-name`,`mono`,3,`click`,`focus`,`blur`],[1,`finding`],[1,`finding-head`],[1,`severity`],[1,`mono`,`rule`],[1,`where`,`mono`],[`type`,`button`,1,`pipe-link`],[1,`finding-message`],[1,`finding-fix`],[1,`fix-label`],[`type`,`button`,1,`pipe-link`,3,`click`],[1,`sr-only`]],template:function(e,t){if(e&1){let e=B();F(0,`p`,1),K(1,` Pipes declared in your source, the built-in pipes your templates use and library pipes seen on the page. Live data shows which components use each pipe on the page; turn on recording to capture calls and the last input and output. `),I(),F(2,`div`,2)(3,`app-search-field`,3,0),S_(`valueChange`,function(n){return C(e),x_(t.filter,n)||(t.filter=n),w(n)}),I(),F(5,`app-select`,4),S_(`valueChange`,function(n){return C(e),x_(t.kind,n)||(t.kind=n),w(n)}),I(),F(6,`app-select`,5),S_(`valueChange`,function(n){return C(e),x_(t.sort,n)||(t.sort=n),w(n)}),I(),F(7,`span`,6),K(8),I(),F(9,`div`,7)(10,`button`,8),H(`click`,function(){return t.refresh()}),K(11,`Refresh`),I(),F(12,`button`,9),H(`click`,function(){return t.toggleInstrument()}),L(13,`span`,10),K(14),I()()(),A(15,C1,6,1,`p`,11),A(16,w1,8,1,`p`,11),A(17,T1,4,0,`div`,12)(18,E1,7,0,`div`,13)(19,D1,5,0,`div`,14)(20,E0,8,3),A(21,P0,17,2,`section`,15),F(22,`section`,16)(23,`h2`,17),K(24,` Lint `),A(25,F0,2,1,`span`,18),I(),A(26,I0,2,0,`p`,19)(27,L0,2,0,`p`,20)(28,R0,2,0,`p`,21)(29,H0,3,0,`ul`,22),I()}if(e&2){let e,n;D(3),b_(`value`,t.filter),D(2),P(`options`,t.kindOptions),b_(`value`,t.kind),D(),P(`options`,t.sortOptions),b_(`value`,t.sort),D(2),Y(``,t.filtered().length,` of `,t.allPipes().length),D(2),P(`disabled`,t.loading()),D(2),G(`on`,t.instrumenting()),k(`aria-pressed`,t.instrumenting())(`aria-busy`,t.pendingRecord()!==null)(`aria-disabled`,t.pendingRecord()!==null),D(2),J(` `,t.recordLabel(),` `),D(),j((e=t.recordMessage())?15:-1,e),D(),j(t.instrumenting()?16:-1),D(),j(t.loading()&&t.allPipes().length===0?17:t.loadFailed()&&t.allPipes().length===0?18:t.allPipes().length===0?19:20),D(4),j(t.async().length>0?21:-1),D(4),j((n=t.lint())?25:-1,n),D(),j(t.lintFailed()?26:t.lint()===null?27:t.lint().length?29:28)}},dependencies:[nP,OD,Cj],styles:[`[_nghost-%COMP%] { +}`]})},w1=[`filterInput`],T1=(e,t)=>t.file+t.name,E1=(e,t)=>t.file+`:`+t.line,D1=(e,t)=>t.name;function O1(e,t){e&1&&(F(0,`p`,11),T(),F(1,`svg`,23),L(2,`circle`,24)(3,`path`,25),I(),cs(),F(4,`span`),K(5),I()()),e&2&&(D(5),q(t))}function k1(e,t){if(e&1&&(F(0,`p`,11),T(),F(1,`svg`,23),L(2,`circle`,24)(3,`path`,25),I(),cs(),F(4,`span`)(5,`strong`),K(6),I(),K(7,` Pipe prototypes are patched in the inspected page to count calls and keep the last input and output. Stop recording when you are done. `),I()()),e&2){let e=W();D(6),J(`Recording on `,e.plural(e.instrumentedPages().length,`page`),`.`)}}function A1(e,t){e&1&&(F(0,`div`,12),L(1,`span`,26),F(2,`p`,27),K(3,`Scanning pipes…`),I()())}function j1(e,t){if(e&1){let e=B();F(0,`div`,13)(1,`p`,27),K(2,`Couldn't load pipes`),I(),F(3,`p`,28),K(4,`The devtools server did not answer. Check that it is running.`),I(),F(5,`button`,29),H(`click`,function(){return C(e),w(W().refresh())}),K(6,`Try again`),I()()}}function M1(e,t){e&1&&(F(0,`div`,14)(1,`p`,27),K(2,`No pipes found`),I(),F(3,`p`,28),K(4,` No @Pipe classes were found in the source, and no template uses a built-in pipe yet. `),I()())}function N1(e,t){e&1&&K(0,` Couldn't scan the source again. The list keeps the last scan. `)}function P1(e,t){e&1&&K(0,` Couldn't scan the source. Only pipes seen on the page are listed. `)}function F1(e,t){if(e&1){let e=B();F(0,`div`,30),T(),F(1,`svg`,23),L(2,`circle`,24)(3,`path`,36),I(),cs(),F(4,`span`),A(5,N1,1,0)(6,P1,1,0),I(),F(7,`button`,8),H(`click`,function(){return C(e),w(W(2).refresh())}),K(8,`Try again`),I()()}if(e&2){let e=W(2);D(5),j(e.pipes().length?5:6),D(2),P(`disabled`,e.loading())}}function I1(e,t){e&1&&(F(0,`span`,43),K(1,`churning`),I())}function L1(e,t){e&1&&(F(0,`span`,43),K(1,`stale?`),I())}function R1(e,t){if(e&1&&(F(0,`span`,49),K(1),I()),e&2){let e=W(),t=W(4);D(),q(t.ms(e.totalMs))}}function z1(e,t){if(e&1&&(F(0,`span`,49),K(1),I(),A(2,R1,2,1,`span`,49)),e&2){let e=t,n=W(4);D(),q(n.plural(e.callCount,`call`)),D(),j(e.totalMs===void 0?-1:2)}}function B1(e,t){if(e&1&&(F(0,`span`,44),K(1),I()),e&2){W();let e=O_(0);D(),J(``,e.instanceCount,` live`)}}function V1(e,t){e&1&&(F(0,`span`,45),K(1,`built-in`),I())}function H1(e,t){e&1&&(F(0,`span`,45),K(1,`runtime only`),I())}function U1(e,t){e&1&&(F(0,`span`,45),K(1,`NgModule`),I())}function W1(e,t){e&1&&(F(0,`span`,47),K(1,`No source location`),I())}function G1(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;Y(` `,e.file,`:`,e.line,` `)}}function K1(e,t){if(e&1&&(F(0,`span`,48),K(1),I()),e&2){let e=W().$implicit;D(),J(`+`,(e.usageCount??1)-1,` more`)}}function q1(e,t){if(e&1&&(F(0,`span`,48),K(1),I()),e&2){let e=W().$implicit;D(),Y(``,e.usageCount,` `,e.usageCount===1?`use`:`uses`)}}function J1(e,t){if(e&1){let e=B();E_(0),F(1,`li`)(2,`button`,38),H(`click`,function(){let t=C(e).$implicit;return w(W(3).select(t))})(`mouseenter`,function(){C(e);let t=O_(0);return w(W(3).highlightPipe(t))})(`mouseleave`,function(){return C(e),w(W(3).highlight(null))})(`focus`,function(){C(e);let t=O_(0);return w(W(3).highlightPipe(t))})(`blur`,function(){return C(e),w(W(3).highlight(null))}),F(3,`span`,39)(4,`span`,40),K(5),I(),F(6,`span`,41),K(7),I()(),F(8,`span`,42),A(9,I1,2,0,`span`,43),A(10,L1,2,0,`span`,43),A(11,z1,3,2),A(12,B1,2,1,`span`,44),A(13,V1,2,0,`span`,45),A(14,H1,2,0,`span`,45),A(15,U1,2,0,`span`,45),F(16,`span`,45),K(17),I()(),F(18,`span`,46),A(19,W1,2,0,`span`,47)(20,G1,1,2),A(21,K1,2,1,`span`,48)(22,q1,2,2,`span`,48),I()()()}if(e&2){let e,n=t.$implicit,r=W(3),i=D_(r.liveFor(n.name));D(2),G(`selected`,r.isSelected(n)),k(`aria-current`,r.isSelected(n)||null),D(3),q(n.name),D(2),q(n.className),D(2),j(i?.churn?9:-1),D(),j(i?.stale?10:-1),D(),j((e=i?.call)?11:-1,e),D(),j(i?12:-1),D(),j(n.builtin?13:-1),D(),j(n.runtime?14:-1),D(),j(n.isStandalone?-1:15),D(),G(`impure`,!n.isPure),D(),q(n.isPure?`pure`:`impure`),D(2),j(n.runtime?19:20),D(2),j(n.builtin&&(n.usageCount??0)>1?21:!n.builtin&&n.usageCount?22:-1)}}function Y1(e,t){if(e&1){let e=B();F(0,`ul`,37),H(`keydown`,function(t){return C(e),w(W(2).onListKey(t))}),M(1,J1,23,18,`li`,null,T1),I()}if(e&2){let e=W(2);D(),N(e.filtered())}}function X1(e,t){e&1&&K(0),e&2&&J(` Nothing matches “`,W(3).filter().trim(),`” in this view. `)}function Z1(e,t){e&1&&K(0,` None of the pipes fit this filter. `)}function Q1(e,t){if(e&1){let e=B();F(0,`div`,34)(1,`p`,27),K(2,`No pipes match`),I(),F(3,`p`,28),A(4,X1,1,1)(5,Z1,1,0),I(),F(6,`button`,29),H(`click`,function(){return C(e),w(W(2).clearFilters())}),K(7,`Clear filters`),I()()}if(e&2){let e=W(2);D(4),j(e.filter().trim()?4:5)}}function $1(e,t){e&1&&(F(0,`span`,45),K(1,`built-in`),I())}function e0(e,t){e&1&&(F(0,`span`,45),K(1,`runtime only`),I())}function t0(e,t){if(e&1&&(F(0,`dt`),K(1,`File`),I(),F(2,`dd`,53),L(3,`app-source-link`,55),I()),e&2){let e=W();D(3),P(`file`,e.file)(`line`,e.line)}}function n0(e,t){if(e&1&&(F(0,`dt`),K(1,`Standalone`),I(),F(2,`dd`),K(3),I()),e&2){let e=W();D(3),q(e.isStandalone?`Yes`:`No, declared in an NgModule`)}}function r0(e,t){if(e&1&&(F(0,`li`,53),L(1,`app-source-link`,55),I()),e&2){let e=t.$implicit;D(),P(`file`,e.file)(`line`,e.line)}}function i0(e,t){if(e&1&&(F(0,`div`,52)(1,`h3`),K(2,` Used in templates `),F(3,`span`,18),K(4),I()(),F(5,`ul`,56),M(6,r0,2,2,`li`,53,E1),I()()),e&2){let e=W();D(4),q(e.usageCount),D(2),N(e.usages)}}function a0(e,t){e&1&&K(0),e&2&&J(` An instance ran `,W().streak,` times in a row and returned an equal result each time: its input changes reference while its contents stay the same. Keep the input stable, for example in a computed(). `)}function o0(e,t){e&1&&K(0),e&2&&J(` An instance returned an equal object or array as a new reference `,W().streak,` times in a row, so the bindings that read it update for nothing. Return the previous result when it is equal, or use a computed(). `)}function s0(e,t){if(e&1&&(F(0,`p`,57)(1,`span`,43),K(2,`churning`),I(),A(3,a0,1,1)(4,o0,1,1),I()),e&2){let e=W();D(3),j(e.isPure?3:4)}}function c0(e,t){e&1&&(F(0,`p`,57)(1,`span`,43),K(2,`experimental`),I(),K(3,` This pure pipe got an argument whose contents changed while its reference stayed the same, so it may be showing a stale value. `),I())}function l0(e,t){if(e&1){let e=B();F(0,`button`,62),H(`click`,function(){let t=C(e);return w(W(5).highlight(t,!0))})(`mouseenter`,function(){let t=C(e);return w(W(5).highlight(t))})(`mouseleave`,function(){return C(e),w(W(5).highlight(null))})(`focus`,function(){let t=C(e);return w(W(5).highlight(t))})(`blur`,function(){return C(e),w(W(5).highlight(null))}),F(1,`span`,53),K(2),I(),F(3,`span`,63),K(4),I()()}if(e&2){let e=W().$implicit;k(`aria-label`,`Highlight `+e.name+` on the page`),D(2),q(e.name),D(2),q(e.count)}}function u0(e,t){if(e&1&&(F(0,`span`,61)(1,`span`,53),K(2),I(),F(3,`span`,63),K(4),I()()),e&2){let e=W().$implicit;D(2),q(e.name),D(2),q(e.count)}}function d0(e,t){if(e&1&&(F(0,`li`),A(1,l0,5,3,`button`,60)(2,u0,5,2,`span`,61),I()),e&2){let e,n=t.$implicit;D(),j((e=n.targets?.[0])?1:2,e)}}function f0(e,t){if(e&1&&(F(0,`dt`),K(1,`Time`),I(),F(2,`dd`),K(3),I()),e&2){let e=W(),t=W(4);D(3),y_(` `,t.ms(e.totalMs),` total, `,t.ms(e.totalMs/e.callCount),` average, `,t.ms(e.maxMs??0),` slowest `)}}function p0(e,t){if(e&1&&(F(0,`span`,64),K(1),I()),e&2){let e=W(2);D(),q(e.lastError)}}function m0(e,t){if(e&1&&(F(0,`dt`),K(1,`Errors`),I(),F(2,`dd`),K(3),A(4,p0,2,1,`span`,64),I()),e&2){let e=W();D(3),J(` `,e.errorCount,` `),D(),j(e.lastError?4:-1)}}function h0(e,t){if(e&1){let e=B();F(0,`button`,62),H(`click`,function(){let t=C(e);return w(W(7).highlight(t,!0))})(`mouseenter`,function(){let t=C(e);return w(W(7).highlight(t))})(`mouseleave`,function(){return C(e),w(W(7).highlight(null))})(`focus`,function(){let t=C(e);return w(W(7).highlight(t))})(`blur`,function(){return C(e),w(W(7).highlight(null))}),F(1,`span`,53),K(2),I()()}if(e&2){let e=W().$implicit;k(`aria-label`,`Highlight `+e.component+` on the page`),D(2),q(e.component)}}function g0(e,t){if(e&1&&(F(0,`span`,61)(1,`span`,53),K(2),I()()),e&2){let e=W().$implicit;D(2),q(e.component)}}function _0(e,t){if(e&1&&(F(0,`span`,66),K(1),I()),e&2){let e=W().$implicit,t=W(6);D(),q(t.ms(e.totalMs))}}function v0(e,t){if(e&1&&(F(0,`span`,67),K(1),I()),e&2){let e=W().$implicit;D(),q(e.lastCaller)}}function y0(e,t){if(e&1&&(F(0,`li`,65),A(1,h0,3,2,`button`,60)(2,g0,3,1,`span`,61),F(3,`span`,64),K(4),F(5,`span`,66),K(6),I(),A(7,_0,2,1,`span`,66),I(),A(8,v0,2,1,`span`,67),I()),e&2){let e,n=t.$implicit,r=W(6);D(),j((e=n.target)?1:2,e),D(3),Y(` `,r.describe(n.lastArgs),` → `,r.describe(n.lastResult),` `),D(2),J(``,n.callCount,`×`),D(),j(n.totalMs===void 0?-1:7),D(),j(n.lastCaller?8:-1)}}function b0(e,t){if(e&1&&(F(0,`p`,59),K(1),I()),e&2){let e=W(2);D(),Y(` Showing `,e.instances.length,` of `,e.instanceTotal,` instances. `)}}function x0(e,t){if(e&1&&(F(0,`dt`),K(1,`Per instance`),I(),F(2,`dd`)(3,`ul`,56),M(4,y0,9,6,`li`,65,Yh),I(),A(6,b0,2,2,`p`,59),I()),e&2){let e=W();D(4),N(e.instances),D(2),j(e.instanceTotal?6:-1)}}function S0(e,t){if(e&1&&(F(0,`dt`),K(1,`Last caller`),I(),F(2,`dd`,64),K(3),I()),e&2){let e=W();D(3),q(e.lastCaller)}}function C0(e,t){if(e&1&&(F(0,`dt`),K(1,`Calls`),I(),F(2,`dd`),K(3),I(),A(4,f0,4,3),A(5,m0,5,2),F(6,`dt`),K(7,`Last input`),I(),F(8,`dd`,64),K(9),I(),F(10,`dt`),K(11,`Last output`),I(),F(12,`dd`,64),K(13),I(),A(14,x0,7,1),A(15,S0,4,1)),e&2){let e=t,n=W(4);D(3),q(e.callCount),D(),j(e.totalMs===void 0?-1:4),D(),j(e.errorCount?5:-1),D(4),q(n.describe(e.lastArgs)),D(4),q(n.describe(e.lastResult)),D(),j(e.instances?.length?14:-1),D(),j(e.lastCaller?15:-1)}}function w0(e,t){e&1&&(F(0,`dt`),K(1,`Calls`),I(),F(2,`dd`,68),K(3,`None recorded yet.`),I())}function T0(e,t){e&1&&(F(0,`p`,59),K(1,` The stale check is off for this pipe: it couldn't read the compiled template, which happens in minified builds. `),I())}function E0(e,t){e&1&&(F(0,`p`,59),K(1,`Turn on “Record calls” to see call counts and values.`),I())}function D0(e,t){if(e&1&&(A(0,s0,5,1,`p`,57),A(1,c0,4,0,`p`,57),F(2,`dl`)(3,`dt`),K(4,`Instances`),I(),F(5,`dd`),K(6),I(),F(7,`dt`),K(8,`Used by`),I(),F(9,`dd`)(10,`ul`,58),M(11,d0,3,1,`li`,null,D1),I()(),A(13,C0,16,7)(14,w0,4,0),I(),A(15,T0,2,0,`p`,59),A(16,E0,2,0,`p`,59)),e&2){let e,n,r=t,i=W(3);j((e=r.churn)?0:-1,e),D(),j(r.stale?1:-1),D(5),q(r.instanceCount),D(5),N(r.components),D(2),j((n=r.call)?13:i.instrumenting()?14:-1,n),D(2),j(r.staleCheck===`unavailable`?15:-1),D(),j(!r.call&&!i.instrumenting()?16:-1)}}function O0(e,t){e&1&&(F(0,`p`,54),K(1,` Not in use on the connected page. Open a view that uses it, or connect the app. `),I())}function k0(e,t){if(e&1&&(F(0,`header`,50)(1,`h2`,51),K(2),I(),F(3,`span`,45),K(4),I(),A(5,$1,2,0,`span`,45),A(6,e0,2,0,`span`,45),I(),F(7,`div`,52)(8,`h3`),K(9,`Declaration`),I(),F(10,`dl`)(11,`dt`),K(12,`Class`),I(),F(13,`dd`,53),K(14),I(),F(15,`dt`),K(16,`Source`),I(),F(17,`dd`),K(18),I(),A(19,t0,4,2),A(20,n0,4,1),F(21,`dt`),K(22,`Pure`),I(),F(23,`dd`),K(24),I()()(),A(25,i0,8,1,`div`,52),F(26,`div`,52)(27,`h3`),K(28,`Live on the page`),I(),A(29,D0,17,6)(30,O0,2,0,`p`,54),I()),e&2){let e,n=t,r=W(2);D(2),q(n.name),D(),G(`impure`,!n.isPure),D(),q(n.isPure?`pure`:`impure`),D(),j(n.builtin?5:-1),D(),j(n.runtime?6:-1),D(8),q(n.className),D(4),q(r.sourceLabel(n)),D(),j(!n.builtin&&!n.runtime?19:-1),D(),j(n.runtime?-1:20),D(4),J(` `,n.isPure?`Yes, reruns only when an input changes`:`No, reruns on every check`,` `),D(),j(n.usages?.length?25:-1),D(4),j((e=r.liveFor(n.name))?29:30,e)}}function A0(e,t){e&1&&(F(0,`h2`,69),K(1,`Pipe details`),I(),F(2,`div`,70)(3,`p`,27),K(4,`Pick a pipe`),I(),F(5,`p`,28),K(6,` See where it is declared, which components use it and what it last returned. `),I()())}function j0(e,t){if(e&1&&(A(0,F1,9,2,`div`,30),F(1,`div`,31)(2,`div`,32),A(3,Y1,3,0,`ul`,33)(4,Q1,8,1,`div`,34),I(),F(5,`section`,35),A(6,k0,31,13)(7,A0,7,0),I()()),e&2){let e,t=W();j(t.loadFailed()?0:-1),D(3),j(t.filtered().length?3:4),D(3),j((e=t.selected())?6:7,e)}}function M0(e,t){if(e&1&&(F(0,`p`,59),K(1),I()),e&2){let e=W(2);D(),Y(`Showing `,e.async().length,` of `,t,` subscriptions.`)}}function N0(e,t){if(e&1){let e=B();F(0,`button`,78),H(`click`,function(){let t=C(e);return w(W(3).highlight(t))})(`focus`,function(){let t=C(e);return w(W(3).highlight(t))})(`blur`,function(){return C(e),w(W(3).highlight(null))}),K(1),I()}if(e&2){let e=W().$implicit;k(`aria-label`,`Highlight `+e.component+` on the page`),D(),J(` `,e.component,` `)}}function P0(e,t){if(e&1&&(F(0,`span`,76),K(1),I()),e&2){let e=W().$implicit;D(),q(e.component)}}function F0(e,t){e&1&&(F(0,`span`,45),K(1,`no source`),I())}function I0(e,t){e&1&&(F(0,`span`,43),K(1,`possible duplicate subscription`),I())}function L0(e,t){e&1&&(F(0,`span`,43),K(1,`resubscribing`),I())}function R0(e,t){if(e&1){let e=B();F(0,`li`,74),H(`mouseenter`,function(){let t=C(e).$implicit;return w(W(2).highlight(t.target))})(`mouseleave`,function(){return C(e),w(W(2).highlight(null))}),A(1,N0,2,2,`button`,75)(2,P0,2,1,`span`,76),A(3,F0,2,0,`span`,45),A(4,I0,2,0,`span`,43),A(5,L0,2,0,`span`,43),F(6,`span`,77),K(7),I()()}if(e&2){let e,n=t.$implicit;D(),j((e=n.target)?1:2,e),D(2),j(n.hasSource?-1:3),D(),j(n.duplicate?4:-1),D(),j(n.resubscribing?5:-1),D(2),q(n.latestValue??`no value yet`)}}function z0(e,t){if(e&1&&(F(0,`section`,15)(1,`h2`,71),K(2,` Async subscriptions `),F(3,`span`,18),K(4),I()(),F(5,`p`,59),K(6,` Each `),F(7,`span`,53),K(8,`| async`),I(),K(9,` subscribes on its own. Two on the same source mean the work runs twice. A source that changes on every check, like `),F(10,`span`,53),K(11,`getData() | async`),I(),K(12,`, resubscribes each time. `),I(),A(13,M0,2,2,`p`,59),F(14,`ul`,72),M(15,R0,8,5,`li`,73,Yh),I()()),e&2){let e,t=W();D(4),q(t.async().length),D(9),j((e=t.asyncTotal())?13:-1,e),D(2),N(t.async())}}function B0(e,t){e&1&&(F(0,`span`,18),K(1),I()),e&2&&(D(),q(t.length))}function V0(e,t){e&1&&(F(0,`p`,19),K(1,`Couldn't run the lint check. Try Refresh.`),I())}function H0(e,t){e&1&&(F(0,`p`,20),K(1,`Checking…`),I())}function U0(e,t){e&1&&(F(0,`p`,21),K(1,`No problems found.`),I())}function W0(e,t){if(e&1){let e=B();F(0,`button`,88),H(`click`,function(){C(e),W();let t=O_(6);return w(W(2).showPipe(t))}),F(1,`span`,89),K(2,`Show pipe `),I(),K(3),I()}if(e&2){let e=W().$implicit;D(3),J(``,e.pipe,` `)}}function G0(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,e.pipe,` `)}}function K0(e,t){if(e&1&&(F(0,`li`,79)(1,`div`,80)(2,`span`,81),K(3),I(),F(4,`code`,82),K(5),I(),E_(6),F(7,`span`,83),A(8,W0,4,1,`button`,84)(9,G0,1,1),K(10,` · `),L(11,`app-source-link`,55),I()(),F(12,`p`,85),K(13),I(),F(14,`p`,86)(15,`span`,87),K(16,`Fix`),I(),K(17),I()()),e&2){let e=t.$implicit;D(2),k(`data-tone`,e.severity),D(),q(e.severity),D(2),q(e.rule),D();let n=D_(W(2).pipeFor(e));D(2),j(n?8:9),D(3),P(`file`,e.file)(`line`,e.line),D(2),q(e.message),D(4),J(` `,e.fix)}}function q0(e,t){if(e&1&&(F(0,`ul`,22),M(1,K0,18,9,`li`,79,Yh),I()),e&2){let e=W();D(),N(e.lint())}}var J0=5e3,Y0=[{value:`all`,label:`All pipes`},{value:`custom`,label:`Custom`},{value:`builtin`,label:`Built-in`},{value:`runtime`,label:`Runtime only`},{value:`impure`,label:`Impure`},{value:`live`,label:`On the page`},{value:`called`,label:`Called while recording`}],X0=[{value:`source`,label:`Source order`},{value:`calls`,label:`Most calls`},{value:`time`,label:`Most time`}],Z0=class e{plural=JE;destroyRef=S(vs);host=S(kl);injector=S(gs);filterInput=sv(`filterInput`);rpc=$(null);focus=$(null);focusHandled=ev();kindOptions=Y0;sortOptions=X0;pipes=E([]);filter=E(``);kind=E(`all`);sort=E(`source`);loading=E(!1);loadFailed=E(!1);selected=E(null);live=E([]);async=E([]);asyncTotal=E(void 0);lint=E(null);lintFailed=E(!1);instrumentedPages=E([]);instrumenting=X(()=>this.instrumentedPages().length>0);pendingRecord=E(null);recordMessage=E(null);recordLabel=X(()=>{let e=this.pendingRecord();return e===null?this.instrumenting()?`Stop recording`:`Record calls`:e?`Starting…`:`Stopping…`});pendingTimer;liveByName=X(()=>new Map(this.live().map(e=>[e.name,e])));allPipes=X(()=>{let e=this.pipes(),t=new Set(e.map(e=>e.name)),n=this.live().filter(e=>!t.has(e.name)).map(e=>({name:e.name,className:e.className,file:``,line:0,isStandalone:!0,isPure:e.isPure,runtime:!0}));return n.length?[...e,...n]:e});filtered=X(()=>{let e=this.filter(),t=this.kind()??`all`,n=this.allPipes().filter(n=>this.fitsKind(n,t)&&this.fitsQuery(n,e)),r=this.sort()??`source`;if(r===`source`)return n;let i=e=>{let t=this.liveFor(e.name)?.call;return t?r===`calls`?t.callCount:t.totalMs??0:-1};return n.map((e,t)=>({p:e,index:t,weight:i(e)})).sort((e,t)=>t.weight-e.weight||e.index-t.index).map(({p:e})=>e)});pipesByName=X(()=>{let e=new Map;for(let t of this.allPipes())e.set(t.name,[...e.get(t.name)??[],t]);return e});unsubscribe;constructor(){ac(()=>{let e=this.rpc();e&&(this.refresh(),this.loadLive(e))}),ac(()=>{let e=this.focus();if(!e)return;let t=this.pipesByName().get(e)?.[0];t&&Z(()=>{this.showPipe(t),this.focusHandled.emit()})}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),clearTimeout(this.pendingTimer),this.highlight(null)})}async refresh(){let e=this.rpc();if(e){this.loading.set(!0),this.loadFailed.set(!1);try{let t=await e.scope(`pangular`).rpc.call(`get-pipes`);this.pipes.set(t);let n=this.selected();if(n){let e=this.allPipes().find(e=>e.name===n.name&&e.file===n.file);this.selected.set(e??null)}}catch{this.loadFailed.set(!0)}finally{this.loading.set(!1)}this.loadLint(e)}}async loadLint(e){this.lintFailed.set(!1);try{let t=await e.scope(`pangular`).rpc.call(`pipe-lint`);this.lint.set(t)}catch{this.lintFailed.set(!0)}}async loadLive(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`pipe-usage`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e,n=fT(),r=(n?t?.pages?.find(e=>e.pageId===n):void 0)??t;this.live.set(r?.pipes??[]);let i=this.selected();i?.runtime&&!this.liveByName().has(i.name)&&this.selected.set(null),this.async.set(r?.async??[]),this.asyncTotal.set(r?.asyncTotal);let a=t?.instrumented??[];this.instrumentedPages.set(a),this.pendingRecord()===a.length>0&&this.settleRecord(null)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{}}async toggleInstrument(){let e=this.rpc();if(!e||this.pendingRecord()!==null)return;let t=!this.instrumenting();this.recordMessage.set(null),this.pendingRecord.set(t);let n;try{let r=t?{pageId:fT()??void 0,on:t}:{on:t};n=await e.scope(`pangular`).rpc.call(`request-instrument-pipes`,r)}catch{this.settleRecord(`Couldn't reach the devtools server. Try again.`);return}if(this.pendingRecord()===t){if(n?.pages===0){this.settleRecord(`No page is connected. Open your app in the browser with the devtools running, then record again.`);return}clearTimeout(this.pendingTimer),this.pendingTimer=setTimeout(()=>{this.pendingRecord()===t&&this.settleRecord(t?`No page confirmed recording. Reload the app and try again.`:`No page confirmed it stopped recording. Reload the app to stop it.`)},J0)}}settleRecord(e){clearTimeout(this.pendingTimer),this.pendingRecord.set(null),e!==null&&this.recordMessage.set(e)}sourceLabel(e){return e.builtin?`@angular/common`:e.runtime?`Seen on the page only`:`This project`}liveFor(e){return this.liveByName().get(e)}ms(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}describe(e){if(Array.isArray(e))return e.map(e=>this.describe(e)).join(`, `);if(typeof e==`string`)return e.length>80?`${e.slice(0,80)}…`:e;try{let t=JSON.stringify(e);return t&&t.length>120?`${t.slice(0,120)}…`:t??String(e)}catch{return String(e)}}isSelected(e){let t=this.selected();return t!==null&&t.name===e.name&&t.file===e.file}select(e){this.selected.set(this.isSelected(e)?null:e)}pipeFor(e){let t=this.pipesByName().get(e.pipe);return t?.length?t.find(t=>t.file===e.file)??t[0]:null}showPipe(e){this.fitsQuery(e,this.filter())||this.filter.set(``),this.fitsKind(e,this.kind()??`all`)||this.kind.set(`all`),this.selected.set(e),td(()=>{let e=this.host.nativeElement;e.querySelector(`.row.selected`)?.scrollIntoView?.({block:`nearest`}),e.querySelector(`#pipe-detail-title`)?.focus()},{injector:this.injector})}fitsKind(e,t){return t===`custom`?!e.builtin&&!e.runtime:t===`builtin`?!!e.builtin:t===`runtime`?!!e.runtime:t===`impure`?!e.isPure:t===`live`?this.liveByName().has(e.name):t!==`called`||!!this.liveByName().get(e.name)?.call}fitsQuery(e,t){let n=t.trim().toLowerCase();return!n||e.name.toLowerCase().includes(n)||e.className.toLowerCase().includes(n)||e.file.toLowerCase().includes(n)}clearFilters(){this.filter.set(``),this.kind.set(`all`),this.filterInput()?.focus()}highlightPipe(e){this.highlight(e?.components.find(e=>e.targets?.length)?.targets?.[0])}highlight(e,t=!1){let n=this.rpc();n&&n.scope(`pangular`).rpc.call(`request-page-highlight`,e?{...e,...t?{reveal:t}:{}}:null).catch(()=>{})}onListKey(e){if(![`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key))return;let t=Array.from(this.host.nativeElement.querySelectorAll(`[data-pipe-row]`));if(!t.length)return;let n=t.indexOf(document.activeElement),r=n;r=e.key===`ArrowDown`?Math.min(n+1,t.length-1):e.key===`ArrowUp`?Math.max(n-1,0):e.key===`Home`?0:t.length-1,e.preventDefault(),t[r]?.focus()}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-pipes-inspector`]],viewQuery:function(e,t){e&1&&Og(t.filterInput,w1,5),e&2&&kg()},inputs:{rpc:[1,`rpc`],focus:[1,`focus`]},outputs:{focusHandled:`focusHandled`},decls:30,vars:20,consts:[[`filterInput`,``],[1,`intro`],[1,`toolbar`],[`placeholder`,`Filter by pipe, class or file`,`saveKey`,`pipes`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Show pipes`,3,`valueChange`,`options`,`value`],[`ariaLabel`,`Sort pipes`,3,`valueChange`,`options`,`value`],[`aria-live`,`polite`,1,`total`],[1,`actions`],[`type`,`button`,3,`click`,`disabled`],[`type`,`button`,1,`record`,3,`click`],[`aria-hidden`,`true`,1,`rec-dot`],[`role`,`status`,1,`notice`],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[1,`state`],[`aria-labelledby`,`async-title`,1,`section`],[`aria-labelledby`,`lint-title`,1,`section`],[`id`,`lint-title`],[1,`pill`],[`role`,`alert`,1,`empty-line`],[`role`,`status`,1,`empty-line`],[1,`empty-line`,`ok`],[1,`findings`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M12 11v5M12 8h.01`],[`aria-hidden`,`true`,1,`spinner`],[1,`state-title`],[1,`state-hint`],[`type`,`button`,3,`click`],[`role`,`alert`,1,`notice`,`error`],[1,`layout`],[1,`list-wrap`],[`aria-label`,`Pipes`,1,`pipe-list`],[`role`,`status`,1,`state`,`compact`],[`id`,`pipe-detail`,`aria-labelledby`,`pipe-detail-title`,1,`detail`],[`d`,`M12 8v5M12 16h.01`],[`aria-label`,`Pipes`,1,`pipe-list`,3,`keydown`],[`type`,`button`,`data-pipe-row`,``,`aria-controls`,`pipe-detail`,1,`row`,3,`click`,`mouseenter`,`mouseleave`,`focus`,`blur`],[1,`row-main`],[1,`name`,`mono`],[1,`sub`,`mono`],[1,`row-meta`],[1,`chip`,`warn`],[1,`chip`,`live`],[1,`chip`],[1,`row-file`,`mono`],[1,`no-source`],[1,`more`],[1,`chip`,`hot`],[1,`detail-head`],[`id`,`pipe-detail-title`,`tabindex`,`-1`,1,`mono`],[1,`block`],[1,`mono`],[1,`empty-line`],[3,`file`,`line`],[1,`sites`],[`role`,`note`,1,`warning`],[1,`chips`],[1,`hint`],[`type`,`button`,1,`component`],[1,`component`],[`type`,`button`,1,`component`,3,`click`,`mouseenter`,`mouseleave`,`focus`,`blur`],[1,`count`],[1,`mono`,`value`],[1,`instance`],[1,`calls`],[1,`mono`,`value`,`caller`],[1,`muted`],[`id`,`pipe-detail-title`,1,`visually-hidden`],[1,`state`,`compact`],[`id`,`async-title`],[1,`async-list`],[1,`async-row`],[1,`async-row`,3,`mouseenter`,`mouseleave`],[`type`,`button`,1,`component-name`,`mono`],[1,`mono`,`component-name`],[1,`mono`,`value`,`latest`],[`type`,`button`,1,`component-name`,`mono`,3,`click`,`focus`,`blur`],[1,`finding`],[1,`finding-head`],[1,`severity`],[1,`mono`,`rule`],[1,`where`,`mono`],[`type`,`button`,1,`pipe-link`],[1,`finding-message`],[1,`finding-fix`],[1,`fix-label`],[`type`,`button`,1,`pipe-link`,3,`click`],[1,`sr-only`]],template:function(e,t){if(e&1){let e=B();F(0,`p`,1),K(1,` Pipes declared in your source, the built-in pipes your templates use and library pipes seen on the page. Live data shows which components use each pipe on the page; turn on recording to capture calls and the last input and output. `),I(),F(2,`div`,2)(3,`app-search-field`,3,0),w_(`valueChange`,function(n){return C(e),C_(t.filter,n)||(t.filter=n),w(n)}),I(),F(5,`app-select`,4),w_(`valueChange`,function(n){return C(e),C_(t.kind,n)||(t.kind=n),w(n)}),I(),F(6,`app-select`,5),w_(`valueChange`,function(n){return C(e),C_(t.sort,n)||(t.sort=n),w(n)}),I(),F(7,`span`,6),K(8),I(),F(9,`div`,7)(10,`button`,8),H(`click`,function(){return t.refresh()}),K(11,`Refresh`),I(),F(12,`button`,9),H(`click`,function(){return t.toggleInstrument()}),L(13,`span`,10),K(14),I()()(),A(15,O1,6,1,`p`,11),A(16,k1,8,1,`p`,11),A(17,A1,4,0,`div`,12)(18,j1,7,0,`div`,13)(19,M1,5,0,`div`,14)(20,j0,8,3),A(21,z0,17,2,`section`,15),F(22,`section`,16)(23,`h2`,17),K(24,` Lint `),A(25,B0,2,1,`span`,18),I(),A(26,V0,2,0,`p`,19)(27,H0,2,0,`p`,20)(28,U0,2,0,`p`,21)(29,q0,3,0,`ul`,22),I()}if(e&2){let e,n;D(3),S_(`value`,t.filter),D(2),P(`options`,t.kindOptions),S_(`value`,t.kind),D(),P(`options`,t.sortOptions),S_(`value`,t.sort),D(2),Y(``,t.filtered().length,` of `,t.allPipes().length),D(2),P(`disabled`,t.loading()),D(2),G(`on`,t.instrumenting()),k(`aria-pressed`,t.instrumenting())(`aria-busy`,t.pendingRecord()!==null)(`aria-disabled`,t.pendingRecord()!==null),D(2),J(` `,t.recordLabel(),` `),D(),j((e=t.recordMessage())?15:-1,e),D(),j(t.instrumenting()?16:-1),D(),j(t.loading()&&t.allPipes().length===0?17:t.loadFailed()&&t.allPipes().length===0?18:t.allPipes().length===0?19:20),D(4),j(t.async().length>0?21:-1),D(4),j((n=t.lint())?25:-1,n),D(),j(t.lintFailed()?26:t.lint()===null?27:t.lint().length?29:28)}},dependencies:[nP,OD,Cj],styles:[`[_nghost-%COMP%] { display: block; color: var(--%NS%text); font-size: 13px; @@ -17559,8 +17573,8 @@ button.pipe-link[_ngcontent-%COMP%]:focus-visible { .spinner[_ngcontent-%COMP%] { animation: none; } -}`]})},q0=(e,t)=>t.id,J0=(e,t)=>t[0];function Y0(e,t){if(e&1){let e=B();F(0,`div`,2)(1,`span`,17),K(2,`Route`),I(),F(3,`app-select`,18),H(`valueChange`,function(t){return C(e),w(W().pick(t))}),I()()}if(e&2){let e=W();D(3),P(`options`,e.routeOptions())(`value`,e.routeKey())}}function X0(e,t){if(e&1&&(K(0,` Sends `),F(1,`span`,19),K(2),I()),e&2){let e=W();D(2),q(e.url())}}function Z0(e,t){if(e&1&&(F(0,`p`,8),K(1),I()),e&2){let e=W();D(),q(e.callsOff)}}function Q0(e,t){if(e&1&&(F(0,`p`,9),K(1),I()),e&2){let e=W();D(),J(` Tick "This request can change data on the dev server" below to send a `,e.method(),` request. `)}}function $0(e,t){if(e&1){let e=B();F(0,`div`,2)(1,`label`,21),K(2),I(),F(3,`input`,22),H(`input`,function(t){let n=C(e).$implicit;return w(W(2).setParam(n,t.target.value))}),I()()}if(e&2){let e=t.$implicit,n=t.$index,r=W(2);D(),P(`for`,`param-`+n),D(),q(e===`**`?`rest of the path`:e),D(),P(`id`,`param-`+n)(`value`,r.paramValues()[e]??``)}}function e2(e,t){if(e&1&&(F(0,`fieldset`,10)(1,`legend`,20),K(2,`Path params`),I(),M(3,$0,4,4,`div`,2,Yh),I()),e&2){let e=W();D(3),N(e.params())}}function t2(e,t){if(e&1&&(F(0,`span`,23),K(1),I()),e&2){let e=W().$implicit,t=W();D(),q(t.pairs(e).length)}}function n2(e,t){if(e&1){let e=B();F(0,`div`,24)(1,`label`,25),K(2),I(),F(3,`input`,26),H(`input`,function(t){let n=C(e).$implicit,r=W().$implicit;return w(W().editPair(r,n.id,`key`,t.target.value))}),I(),F(4,`label`,25),K(5),I(),F(6,`input`,27),H(`input`,function(t){let n=C(e).$implicit,r=W().$implicit;return w(W().editPair(r,n.id,`value`,t.target.value))}),I(),F(7,`button`,12),H(`click`,function(){let t=C(e).$implicit,n=W().$implicit;return w(W().removePair(n,t.id))}),K(8,` Remove `),I()()}if(e&2){let e=t.$implicit,n=t.$index,r=W().$implicit,i=W();D(),P(`for`,r+`-key-`+e.id),D(),Y(``,i.labels[r].key,` `,n+1,` name`),D(),P(`id`,r+`-key-`+e.id)(`placeholder`,i.labels[r].key)(`value`,e.key),D(),P(`for`,r+`-value-`+e.id),D(),Y(``,i.labels[r].key,` `,n+1,` value`),D(),P(`id`,r+`-value-`+e.id)(`value`,e.value),D(),k(`aria-label`,`Remove `+i.labels[r].key.toLowerCase()+` `+(n+1))}}function r2(e,t){if(e&1){let e=B();F(0,`details`,11)(1,`summary`),K(2),A(3,t2,2,1,`span`,23),I(),M(4,n2,9,12,`div`,24,q0),F(6,`button`,12),H(`click`,function(){let t=C(e).$implicit;return w(W().addPair(t))}),K(7),I()()}if(e&2){let e=t.$implicit,n=W();P(`open`,n.pairs(e).length>0),D(2),J(` `,n.labels[e].title,` `),D(),j(n.pairs(e).length?3:-1),D(),N(n.pairs(e)),D(3),J(` `,n.labels[e].add,` `)}}function i2(e,t){if(e&1){let e=B();F(0,`label`,28),K(1,`JSON body`),I(),F(2,`textarea`,29),H(`input`,function(t){return C(e),w(W().body.set(t.target.value))}),I(),F(3,`label`,30)(4,`input`,31),H(`change`,function(){C(e);let t=W();return w(t.confirmSend.set(!t.confirmSend()))}),I(),K(5,` This request can change data on the dev server`),I()}if(e&2){let e=W();D(2),P(`value`,e.body()),D(2),P(`checked`,e.confirmSend())}}function a2(e,t){if(e&1&&(F(0,`p`,14),K(1),I()),e&2){let e=W();D(),Y(`Sending `,e.method(),` `,e.url(),`…`)}}function o2(e,t){if(e&1&&(F(0,`div`,2)(1,`span`,32),K(2,`Refused`),I(),F(3,`span`),K(4),I()()),e&2){let e=W();D(4),q(e.error)}}function s2(e,t){e&1&&K(0),e&2&&J(` · headers after `,W(2).headersMs,` ms `)}function c2(e,t){if(e&1&&(F(0,`dt`,19),K(1),I(),F(2,`dd`,19),K(3),I()),e&2){let e=t.$implicit;D(),q(e[0]),D(2),q(e[1])}}function l2(e,t){if(e&1&&(F(0,`details`)(1,`summary`),K(2),I(),F(3,`dl`,36),M(4,c2,4,2,null,null,J0),I()()),e&2){let e=W(2),t=W();D(2),J(`Response headers (`,t.headerList(e).length,`)`),D(2),N(t.headerList(e))}}function u2(e,t){if(e&1&&(F(0,`div`,2)(1,`span`,33),K(2),I(),F(3,`span`,34),K(4),A(5,s2,1,1),K(6),I()(),A(7,l2,6,1,`details`),F(8,`pre`,35),K(9),I()),e&2){let e=W(),t=W();D(),k(`data-status`,t.statusClass(e.status??0)),D(),q(e.status),D(2),J(``,e.ms,` ms total `),D(),j(e.headersMs===void 0?-1:5),D(),Y(` · `,t.sizeText(e.size),` · `,e.type||`no content type`),D(),j(t.headerList(e).length?7:-1),D(2),q(t.pretty(e.body??``))}}function d2(e,t){e&1&&(F(0,`div`,15),A(1,o2,5,1,`div`,2)(2,u2,10,8),I()),e&2&&(D(),j(t.error?1:2))}function f2(e,t){if(e&1&&(F(0,`span`,39),K(1),I()),e&2){let e=W().$implicit;D(),J(``,e.ms,` ms`)}}function p2(e,t){if(e&1){let e=B();F(0,`li`,2)(1,`span`,33),K(2),I(),F(3,`span`,38),K(4),I(),A(5,f2,2,1,`span`,39),F(6,`button`,12),H(`click`,function(){let t=C(e).$implicit;return w(W(2).restore(t))}),K(7,` Load `),I()()}if(e&2){let e=t.$implicit,n=W(2);D(),k(`data-status`,e.error?`bad`:n.statusClass(e.status??0)),D(),q(e.error?`Refused`:e.status),D(2),Y(``,e.method,` `,e.url),D(),j(e.ms===void 0?-1:5),D(),k(`aria-label`,`Load `+e.method+` `+e.url+` again`)}}function m2(e,t){if(e&1&&(F(0,`div`,16)(1,`h3`),K(2),I(),F(3,`ul`,37),M(4,p2,8,6,`li`,2,Jh),I()()),e&2){let e=W();D(2),J(`History for `,e.template().trim()||`/`),D(2),N(e.history())}}var h2=10,g2={query:{title:`Query`,key:`Name`,add:`Add query parameter`},headers:{title:`Headers`,key:`Header`,add:`Add header`},cookies:{title:`Cookies`,key:`Cookie`,add:`Add cookie`}},_2=0;function v2(e){let t=Array.from(e.matchAll(/:(\w+)/g),e=>e[1]);return/(^|\/)\*\*(\/|$)/.test(e)&&t.push(`**`),[...new Set(t)]}function y2(e,t){return e.replace(/:(\w+)/g,(e,n)=>t[n]?encodeURIComponent(t[n]):e).replace(/(^|\/)\*\*(?=\/|$)/,(e,n)=>t[`**`]?`${n}${t[`**`].split(`/`).map(encodeURIComponent).join(`/`)}`:e)}function b2(e){return`'${e.replace(/'/g,`'\\''`)}'`}var x2=class e{rpc=$(null);routes=$([]);target=$(null);origin=$(``);canCall=X(()=>IT(this.rpc(),`analog`));callsOff=Uw(`analog`);labels=g2;pairLists=[`query`,`headers`,`cookies`];methodOptions=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`].map(e=>({value:e,label:e}));method=E(`GET`);template=E(``);paramValues=E({});query=E([]);headers=E([]);cookies=E([]);body=E(``);response=E(null);sending=E(!1);copied=E(``);historyByRoute=E({});params=X(()=>v2(this.template()));url=X(()=>{let e=y2(this.template().trim(),this.paramValues()),t=new URLSearchParams;for(let e of this.query())e.key.trim()&&t.append(e.key.trim(),e.value);let n=t.toString();return n?`${e}${e.includes(`?`)?`&`:`?`}${n}`:e});confirmSend=Q({source:()=>`${this.method()} ${this.url()}`,computation:()=>!1});needsConfirm=X(()=>this.method()!==`GET`&&!this.confirmSend());canSend=X(()=>this.canCall()&&!this.sending()&&!this.needsConfirm()&&!!this.template().trim());sendHintId=X(()=>this.canCall()?this.needsConfirm()?`analog-confirm-hint`:null:`analog-calls-off`);history=X(()=>this.historyByRoute()[this.template().trim()]??[]);routeOptions=X(()=>this.routes().map(e=>({value:`${e.method} ${e.path}`,label:`${e.method} ${e.path}`})));routeKey=X(()=>{let e=`${this.method()} ${this.template().trim()}`;return this.routeOptions().some(t=>t.value===e)?e:null});lastNonce=-1;constructor(){ac(()=>{let e=this.target();e&&e.nonce!==this.lastNonce&&(this.lastNonce=e.nonce,Z(()=>this.load(e.route)))})}load(e){this.method.set(e.method===`ANY`?`GET`:e.method),this.template.set(e.path),this.paramValues.set({}),this.confirmSend.set(!1),this.response.set(null),queueMicrotask(()=>{let e=this.params().length?`param-0`:`api-path`;document.getElementById(e)?.focus()})}pick(e){let t=this.routes().find(t=>`${t.method} ${t.path}`===e);t&&this.load(t)}setParam(e,t){this.paramValues.update(n=>({...n,[e]:t}))}pairs(e){return this[e]()}addPair(e){let t=_2++;this[e].update(e=>[...e,{id:t,key:``,value:``}]),queueMicrotask(()=>document.getElementById(`${e}-key-${t}`)?.focus())}editPair(e,t,n,r){this[e].update(e=>e.map(e=>e.id===t?{...e,[n]:r}:e))}removePair(e,t){this[e].update(e=>e.filter(e=>e.id!==t))}record(e){let t={};for(let n of this[e]())n.key.trim()&&(t[n.key.trim()]=n.value);return Object.keys(t).length?t:void 0}parsedBody(){if(this.method()===`GET`||!this.body().trim())return{};try{return{body:JSON.parse(this.body())}}catch{return{error:`The body is not valid JSON.`}}}snapshot(){return{method:this.method(),template:this.template().trim(),params:{...this.paramValues()},query:this.query(),headers:this.headers(),cookies:this.cookies(),body:this.body()}}restore(e){let t=e.snapshot;this.method.set(t.method),this.template.set(t.template),this.paramValues.set({...t.params}),this.query.set(t.query),this.headers.set(t.headers),this.cookies.set(t.cookies),this.body.set(t.body),this.response.set(null)}async send(){let e=this.url();if(!this.template().trim()||this.sending()||this.needsConfirm())return;let t=this.parsedBody();if(t.error){this.response.set({error:t.error});return}let n=this.snapshot();this.response.set(null),this.sending.set(!0);try{let r=await vT(this.rpc(),`analog-call-api`,{method:this.method(),path:e,body:t.body,headers:this.record(`headers`),cookies:this.record(`cookies`),confirm:this.confirmSend()})??{error:`No answer from the devtools server.`};this.response.set(r);let i={at:Date.now(),url:e,method:n.method,snapshot:n,...r.error?{error:r.error}:{status:r.status,ms:r.ms}};this.historyByRoute.update(e=>({...e,[n.template]:[i,...e[n.template]??[]].slice(0,h2)}))}finally{this.sending.set(!1),this.confirmSend.set(!1)}}command(e){let t=`${this.origin()||`http://localhost:5173`}${this.url()}`,n={...this.record(`headers`)},r=this.record(`cookies`);r&&(n.cookie=Object.entries(r).map(([e,t])=>`${e}=${t}`).join(`; `));let i=this.method()!==`GET`&&this.body().trim()?this.body().trim():void 0;if(i&&(n[`content-type`]??=`application/json`),e===`curl`)return[`curl -X ${this.method()} ${b2(t)}`,...Object.entries(n).map(([e,t])=>`-H ${b2(`${e}: ${t}`)}`),...i?[`--data ${b2(i)}`]:[]].join(` \\ - `);let a={method:this.method()};return Object.keys(n).length&&(a.headers=n),i&&(a.body=i),`await fetch(${JSON.stringify(t)}, ${JSON.stringify(a,null,2)});`}async copy(e){try{await navigator.clipboard.writeText(this.command(e)),this.copied.set(e===`curl`?`Copied as curl.`:`Copied as fetch.`)}catch{this.copied.set(`Could not copy. The browser blocked the clipboard.`)}}headerList(e){return Object.entries(e.headers??{})}sizeText(e){return e===void 0?`size unknown`:e<1024?`${e} B`:`${(e/1024).toFixed(1)} kB`}statusClass(e){return e>=500||e===0?`bad`:e>=400?`warn`:`good`}pretty(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-analog-playground`]],inputs:{rpc:[1,`rpc`],routes:[1,`routes`],target:[1,`target`],origin:[1,`origin`]},decls:36,vars:14,consts:[[1,`card`,`playground`,3,`submit`],[`id`,`playground-heading`],[1,`row`],[`ariaLabel`,`Method`,1,`method-select`,3,`valueChange`,`options`,`value`],[`for`,`api-path`,1,`sr-only`],[`id`,`api-path`,`type`,`text`,`placeholder`,`/api/v1/products/:id`,`aria-describedby`,`api-path-hint`,1,`field`,`grow`,`mono`,3,`input`,`value`],[`type`,`submit`,1,`btn`,`primary`,3,`disabled`],[`id`,`api-path-hint`,1,`muted`,`small`],[`id`,`analog-calls-off`,1,`muted`],[`id`,`analog-confirm-hint`,1,`muted`],[1,`group`],[1,`group`,3,`open`],[`type`,`button`,1,`btn`,`ghost`,3,`click`],[`role`,`status`,1,`muted`,`small`],[`role`,`status`,1,`muted`],[`role`,`status`,1,`response`],[1,`history`],[`id`,`playground-route-label`,1,`label`],[`labelledBy`,`playground-route-label`,`placeholder`,`Pick an API route`,1,`grow`,3,`valueChange`,`options`,`value`],[1,`mono`],[1,`label`],[1,`pair-key`,`mono`,3,`for`],[`type`,`text`,1,`field`,`grow`,`mono`,3,`input`,`id`,`value`],[1,`pill`],[1,`row`,`pair`],[1,`sr-only`,3,`for`],[`type`,`text`,1,`field`,`mono`,`pair-input`,3,`input`,`id`,`placeholder`,`value`],[`type`,`text`,`placeholder`,`Value`,1,`field`,`grow`,`mono`,3,`input`,`id`,`value`],[`for`,`api-body`,1,`label`],[`id`,`api-body`,`rows`,`3`,`placeholder`,`{"name": "Ada"}`,1,`field`,`mono`,3,`input`,`value`],[1,`check`,`confirm-send`],[`type`,`checkbox`,3,`change`,`checked`],[`data-status`,`bad`,1,`status`],[1,`status`],[1,`muted`,`tnum`],[1,`code`],[1,`facts`,`headers`],[1,`plain`],[1,`mono`,`path`],[1,`muted`,`small`,`tnum`]],template:function(e,t){if(e&1&&(F(0,`form`,0),H(`submit`,function(e){return e.preventDefault(),t.send()}),F(1,`h2`,1),K(2,`Request playground`),I(),A(3,Y0,4,2,`div`,2),F(4,`div`,2)(5,`app-select`,3),H(`valueChange`,function(e){return t.method.set(e??`GET`)}),I(),F(6,`label`,4),K(7,`Path`),I(),F(8,`input`,5),H(`input`,function(e){return t.template.set(e.target.value)}),I(),F(9,`button`,6),K(10),I()(),F(11,`p`,7),K(12,` Write `),F(13,`code`),K(14,`:name`),I(),K(15,` or `),F(16,`code`),K(17,`**`),I(),K(18,` in the path to fill it in below. `),A(19,X0,3,1),I(),A(20,Z0,2,1,`p`,8)(21,Q0,2,1,`p`,9),A(22,e2,5,0,`fieldset`,10),M(23,r2,8,4,`details`,11,Yh),A(25,i2,6,2),F(26,`div`,2)(27,`button`,12),H(`click`,function(){return t.copy(`curl`)}),K(28,`Copy as curl`),I(),F(29,`button`,12),H(`click`,function(){return t.copy(`fetch`)}),K(30,`Copy as fetch`),I(),F(31,`span`,13),K(32),I()(),A(33,a2,2,2,`p`,14)(34,d2,3,1,`div`,15),A(35,m2,6,1,`div`,16),I()),e&2){let e;D(3),j(t.routeOptions().length?3:-1),D(2),P(`options`,t.methodOptions)(`value`,t.method()),D(3),P(`value`,t.template()),D(),P(`disabled`,!t.canSend()),k(`aria-describedby`,t.sendHintId()),D(),J(` `,t.sending()?`Sending…`:`Send`,` `),D(9),j(t.template().trim()?19:-1),D(),j(t.canCall()?t.needsConfirm()?21:-1:20),D(2),j(t.params().length?22:-1),D(),N(t.pairLists),D(2),j(t.method()===`GET`?-1:25),D(7),q(t.copied()),D(),j(t.sending()?33:(e=t.response())?34:-1,e),D(2),j(t.history().length?35:-1)}},dependencies:[OD],styles:[`h2[_ngcontent-%COMP%], +}`]})},Q0=(e,t)=>t.id,$0=(e,t)=>t[0];function e2(e,t){if(e&1){let e=B();F(0,`div`,2)(1,`span`,17),K(2,`Route`),I(),F(3,`app-select`,18),H(`valueChange`,function(t){return C(e),w(W().pick(t))}),I()()}if(e&2){let e=W();D(3),P(`options`,e.routeOptions())(`value`,e.routeKey())}}function t2(e,t){if(e&1&&(K(0,` Sends `),F(1,`span`,19),K(2),I()),e&2){let e=W();D(2),q(e.url())}}function n2(e,t){if(e&1&&(F(0,`p`,8),K(1),I()),e&2){let e=W();D(),q(e.callsOff)}}function r2(e,t){if(e&1&&(F(0,`p`,9),K(1),I()),e&2){let e=W();D(),J(` Tick "This request can change data on the dev server" below to send a `,e.method(),` request. `)}}function i2(e,t){if(e&1){let e=B();F(0,`div`,2)(1,`label`,21),K(2),I(),F(3,`input`,22),H(`input`,function(t){let n=C(e).$implicit;return w(W(2).setParam(n,t.target.value))}),I()()}if(e&2){let e=t.$implicit,n=t.$index,r=W(2);D(),P(`for`,`param-`+n),D(),q(e===`**`?`rest of the path`:e),D(),P(`id`,`param-`+n)(`value`,r.paramValues()[e]??``)}}function a2(e,t){if(e&1&&(F(0,`fieldset`,10)(1,`legend`,20),K(2,`Path params`),I(),M(3,i2,4,4,`div`,2,Xh),I()),e&2){let e=W();D(3),N(e.params())}}function o2(e,t){if(e&1&&(F(0,`span`,23),K(1),I()),e&2){let e=W().$implicit,t=W();D(),q(t.pairs(e).length)}}function s2(e,t){if(e&1){let e=B();F(0,`div`,24)(1,`label`,25),K(2),I(),F(3,`input`,26),H(`input`,function(t){let n=C(e).$implicit,r=W().$implicit;return w(W().editPair(r,n.id,`key`,t.target.value))}),I(),F(4,`label`,25),K(5),I(),F(6,`input`,27),H(`input`,function(t){let n=C(e).$implicit,r=W().$implicit;return w(W().editPair(r,n.id,`value`,t.target.value))}),I(),F(7,`button`,12),H(`click`,function(){let t=C(e).$implicit,n=W().$implicit;return w(W().removePair(n,t.id))}),K(8,` Remove `),I()()}if(e&2){let e=t.$implicit,n=t.$index,r=W().$implicit,i=W();D(),P(`for`,r+`-key-`+e.id),D(),Y(``,i.labels[r].key,` `,n+1,` name`),D(),P(`id`,r+`-key-`+e.id)(`placeholder`,i.labels[r].key)(`value`,e.key),D(),P(`for`,r+`-value-`+e.id),D(),Y(``,i.labels[r].key,` `,n+1,` value`),D(),P(`id`,r+`-value-`+e.id)(`value`,e.value),D(),k(`aria-label`,`Remove `+i.labels[r].key.toLowerCase()+` `+(n+1))}}function c2(e,t){if(e&1){let e=B();F(0,`details`,11)(1,`summary`),K(2),A(3,o2,2,1,`span`,23),I(),M(4,s2,9,12,`div`,24,Q0),F(6,`button`,12),H(`click`,function(){let t=C(e).$implicit;return w(W().addPair(t))}),K(7),I()()}if(e&2){let e=t.$implicit,n=W();P(`open`,n.pairs(e).length>0),D(2),J(` `,n.labels[e].title,` `),D(),j(n.pairs(e).length?3:-1),D(),N(n.pairs(e)),D(3),J(` `,n.labels[e].add,` `)}}function l2(e,t){if(e&1){let e=B();F(0,`label`,28),K(1,`JSON body`),I(),F(2,`textarea`,29),H(`input`,function(t){return C(e),w(W().body.set(t.target.value))}),I(),F(3,`label`,30)(4,`input`,31),H(`change`,function(){C(e);let t=W();return w(t.confirmSend.set(!t.confirmSend()))}),I(),K(5,` This request can change data on the dev server`),I()}if(e&2){let e=W();D(2),P(`value`,e.body()),D(2),P(`checked`,e.confirmSend())}}function u2(e,t){if(e&1&&(F(0,`p`,14),K(1),I()),e&2){let e=W();D(),Y(`Sending `,e.method(),` `,e.url(),`…`)}}function d2(e,t){if(e&1&&(F(0,`div`,2)(1,`span`,32),K(2,`Refused`),I(),F(3,`span`),K(4),I()()),e&2){let e=W();D(4),q(e.error)}}function f2(e,t){e&1&&K(0),e&2&&J(` · headers after `,W(2).headersMs,` ms `)}function p2(e,t){if(e&1&&(F(0,`dt`,19),K(1),I(),F(2,`dd`,19),K(3),I()),e&2){let e=t.$implicit;D(),q(e[0]),D(2),q(e[1])}}function m2(e,t){if(e&1&&(F(0,`details`)(1,`summary`),K(2),I(),F(3,`dl`,36),M(4,p2,4,2,null,null,$0),I()()),e&2){let e=W(2),t=W();D(2),J(`Response headers (`,t.headerList(e).length,`)`),D(2),N(t.headerList(e))}}function h2(e,t){if(e&1&&(F(0,`div`,2)(1,`span`,33),K(2),I(),F(3,`span`,34),K(4),A(5,f2,1,1),K(6),I()(),A(7,m2,6,1,`details`),F(8,`pre`,35),K(9),I()),e&2){let e=W(),t=W();D(),k(`data-status`,t.statusClass(e.status??0)),D(),q(e.status),D(2),J(``,e.ms,` ms total `),D(),j(e.headersMs===void 0?-1:5),D(),Y(` · `,t.sizeText(e.size),` · `,e.type||`no content type`),D(),j(t.headerList(e).length?7:-1),D(2),q(t.pretty(e.body??``))}}function g2(e,t){e&1&&(F(0,`div`,15),A(1,d2,5,1,`div`,2)(2,h2,10,8),I()),e&2&&(D(),j(t.error?1:2))}function _2(e,t){if(e&1&&(F(0,`span`,39),K(1),I()),e&2){let e=W().$implicit;D(),J(``,e.ms,` ms`)}}function v2(e,t){if(e&1){let e=B();F(0,`li`,2)(1,`span`,33),K(2),I(),F(3,`span`,38),K(4),I(),A(5,_2,2,1,`span`,39),F(6,`button`,12),H(`click`,function(){let t=C(e).$implicit;return w(W(2).restore(t))}),K(7,` Load `),I()()}if(e&2){let e=t.$implicit,n=W(2);D(),k(`data-status`,e.error?`bad`:n.statusClass(e.status??0)),D(),q(e.error?`Refused`:e.status),D(2),Y(``,e.method,` `,e.url),D(),j(e.ms===void 0?-1:5),D(),k(`aria-label`,`Load `+e.method+` `+e.url+` again`)}}function y2(e,t){if(e&1&&(F(0,`div`,16)(1,`h3`),K(2),I(),F(3,`ul`,37),M(4,v2,8,6,`li`,2,Yh),I()()),e&2){let e=W();D(2),J(`History for `,e.template().trim()||`/`),D(2),N(e.history())}}var b2=10,x2={query:{title:`Query`,key:`Name`,add:`Add query parameter`},headers:{title:`Headers`,key:`Header`,add:`Add header`},cookies:{title:`Cookies`,key:`Cookie`,add:`Add cookie`}},S2=0;function C2(e){let t=Array.from(e.matchAll(/:(\w+)/g),e=>e[1]);return/(^|\/)\*\*(\/|$)/.test(e)&&t.push(`**`),[...new Set(t)]}function w2(e,t){return e.replace(/:(\w+)/g,(e,n)=>t[n]?encodeURIComponent(t[n]):e).replace(/(^|\/)\*\*(?=\/|$)/,(e,n)=>t[`**`]?`${n}${t[`**`].split(`/`).map(encodeURIComponent).join(`/`)}`:e)}function T2(e){return`'${e.replace(/'/g,`'\\''`)}'`}var E2=class e{rpc=$(null);routes=$([]);target=$(null);origin=$(``);canCall=X(()=>IT(this.rpc(),`analog`));callsOff=Uw(`analog`);labels=x2;pairLists=[`query`,`headers`,`cookies`];methodOptions=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`].map(e=>({value:e,label:e}));method=E(`GET`);template=E(``);paramValues=E({});query=E([]);headers=E([]);cookies=E([]);body=E(``);response=E(null);sending=E(!1);copied=E(``);historyByRoute=E({});params=X(()=>C2(this.template()));url=X(()=>{let e=w2(this.template().trim(),this.paramValues()),t=new URLSearchParams;for(let e of this.query())e.key.trim()&&t.append(e.key.trim(),e.value);let n=t.toString();return n?`${e}${e.includes(`?`)?`&`:`?`}${n}`:e});confirmSend=Q({source:()=>`${this.method()} ${this.url()}`,computation:()=>!1});needsConfirm=X(()=>this.method()!==`GET`&&!this.confirmSend());canSend=X(()=>this.canCall()&&!this.sending()&&!this.needsConfirm()&&!!this.template().trim());sendHintId=X(()=>this.canCall()?this.needsConfirm()?`analog-confirm-hint`:null:`analog-calls-off`);history=X(()=>this.historyByRoute()[this.template().trim()]??[]);routeOptions=X(()=>this.routes().map(e=>({value:`${e.method} ${e.path}`,label:`${e.method} ${e.path}`})));routeKey=X(()=>{let e=`${this.method()} ${this.template().trim()}`;return this.routeOptions().some(t=>t.value===e)?e:null});lastNonce=-1;constructor(){ac(()=>{let e=this.target();e&&e.nonce!==this.lastNonce&&(this.lastNonce=e.nonce,Z(()=>this.load(e.route)))})}load(e){this.method.set(e.method===`ANY`?`GET`:e.method),this.template.set(e.path),this.paramValues.set({}),this.confirmSend.set(!1),this.response.set(null),queueMicrotask(()=>{let e=this.params().length?`param-0`:`api-path`;document.getElementById(e)?.focus()})}pick(e){let t=this.routes().find(t=>`${t.method} ${t.path}`===e);t&&this.load(t)}setParam(e,t){this.paramValues.update(n=>({...n,[e]:t}))}pairs(e){return this[e]()}addPair(e){let t=S2++;this[e].update(e=>[...e,{id:t,key:``,value:``}]),queueMicrotask(()=>document.getElementById(`${e}-key-${t}`)?.focus())}editPair(e,t,n,r){this[e].update(e=>e.map(e=>e.id===t?{...e,[n]:r}:e))}removePair(e,t){this[e].update(e=>e.filter(e=>e.id!==t))}record(e){let t={};for(let n of this[e]())n.key.trim()&&(t[n.key.trim()]=n.value);return Object.keys(t).length?t:void 0}parsedBody(){if(this.method()===`GET`||!this.body().trim())return{};try{return{body:JSON.parse(this.body())}}catch{return{error:`The body is not valid JSON.`}}}snapshot(){return{method:this.method(),template:this.template().trim(),params:{...this.paramValues()},query:this.query(),headers:this.headers(),cookies:this.cookies(),body:this.body()}}restore(e){let t=e.snapshot;this.method.set(t.method),this.template.set(t.template),this.paramValues.set({...t.params}),this.query.set(t.query),this.headers.set(t.headers),this.cookies.set(t.cookies),this.body.set(t.body),this.response.set(null)}async send(){let e=this.url();if(!this.template().trim()||this.sending()||this.needsConfirm())return;let t=this.parsedBody();if(t.error){this.response.set({error:t.error});return}let n=this.snapshot();this.response.set(null),this.sending.set(!0);try{let r=await vT(this.rpc(),`analog-call-api`,{method:this.method(),path:e,body:t.body,headers:this.record(`headers`),cookies:this.record(`cookies`),confirm:this.confirmSend()})??{error:`No answer from the devtools server.`};this.response.set(r);let i={at:Date.now(),url:e,method:n.method,snapshot:n,...r.error?{error:r.error}:{status:r.status,ms:r.ms}};this.historyByRoute.update(e=>({...e,[n.template]:[i,...e[n.template]??[]].slice(0,b2)}))}finally{this.sending.set(!1),this.confirmSend.set(!1)}}command(e){let t=`${this.origin()||`http://localhost:5173`}${this.url()}`,n={...this.record(`headers`)},r=this.record(`cookies`);r&&(n.cookie=Object.entries(r).map(([e,t])=>`${e}=${t}`).join(`; `));let i=this.method()!==`GET`&&this.body().trim()?this.body().trim():void 0;if(i&&(n[`content-type`]??=`application/json`),e===`curl`)return[`curl -X ${this.method()} ${T2(t)}`,...Object.entries(n).map(([e,t])=>`-H ${T2(`${e}: ${t}`)}`),...i?[`--data ${T2(i)}`]:[]].join(` \\ + `);let a={method:this.method()};return Object.keys(n).length&&(a.headers=n),i&&(a.body=i),`await fetch(${JSON.stringify(t)}, ${JSON.stringify(a,null,2)});`}async copy(e){try{await navigator.clipboard.writeText(this.command(e)),this.copied.set(e===`curl`?`Copied as curl.`:`Copied as fetch.`)}catch{this.copied.set(`Could not copy. The browser blocked the clipboard.`)}}headerList(e){return Object.entries(e.headers??{})}sizeText(e){return e===void 0?`size unknown`:e<1024?`${e} B`:`${(e/1024).toFixed(1)} kB`}statusClass(e){return e>=500||e===0?`bad`:e>=400?`warn`:`good`}pretty(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-analog-playground`]],inputs:{rpc:[1,`rpc`],routes:[1,`routes`],target:[1,`target`],origin:[1,`origin`]},decls:36,vars:14,consts:[[1,`card`,`playground`,3,`submit`],[`id`,`playground-heading`],[1,`row`],[`ariaLabel`,`Method`,1,`method-select`,3,`valueChange`,`options`,`value`],[`for`,`api-path`,1,`sr-only`],[`id`,`api-path`,`type`,`text`,`placeholder`,`/api/v1/products/:id`,`aria-describedby`,`api-path-hint`,1,`field`,`grow`,`mono`,3,`input`,`value`],[`type`,`submit`,1,`btn`,`primary`,3,`disabled`],[`id`,`api-path-hint`,1,`muted`,`small`],[`id`,`analog-calls-off`,1,`muted`],[`id`,`analog-confirm-hint`,1,`muted`],[1,`group`],[1,`group`,3,`open`],[`type`,`button`,1,`btn`,`ghost`,3,`click`],[`role`,`status`,1,`muted`,`small`],[`role`,`status`,1,`muted`],[`role`,`status`,1,`response`],[1,`history`],[`id`,`playground-route-label`,1,`label`],[`labelledBy`,`playground-route-label`,`placeholder`,`Pick an API route`,1,`grow`,3,`valueChange`,`options`,`value`],[1,`mono`],[1,`label`],[1,`pair-key`,`mono`,3,`for`],[`type`,`text`,1,`field`,`grow`,`mono`,3,`input`,`id`,`value`],[1,`pill`],[1,`row`,`pair`],[1,`sr-only`,3,`for`],[`type`,`text`,1,`field`,`mono`,`pair-input`,3,`input`,`id`,`placeholder`,`value`],[`type`,`text`,`placeholder`,`Value`,1,`field`,`grow`,`mono`,3,`input`,`id`,`value`],[`for`,`api-body`,1,`label`],[`id`,`api-body`,`rows`,`3`,`placeholder`,`{"name": "Ada"}`,1,`field`,`mono`,3,`input`,`value`],[1,`check`,`confirm-send`],[`type`,`checkbox`,3,`change`,`checked`],[`data-status`,`bad`,1,`status`],[1,`status`],[1,`muted`,`tnum`],[1,`code`],[1,`facts`,`headers`],[1,`plain`],[1,`mono`,`path`],[1,`muted`,`small`,`tnum`]],template:function(e,t){if(e&1&&(F(0,`form`,0),H(`submit`,function(e){return e.preventDefault(),t.send()}),F(1,`h2`,1),K(2,`Request playground`),I(),A(3,e2,4,2,`div`,2),F(4,`div`,2)(5,`app-select`,3),H(`valueChange`,function(e){return t.method.set(e??`GET`)}),I(),F(6,`label`,4),K(7,`Path`),I(),F(8,`input`,5),H(`input`,function(e){return t.template.set(e.target.value)}),I(),F(9,`button`,6),K(10),I()(),F(11,`p`,7),K(12,` Write `),F(13,`code`),K(14,`:name`),I(),K(15,` or `),F(16,`code`),K(17,`**`),I(),K(18,` in the path to fill it in below. `),A(19,t2,3,1),I(),A(20,n2,2,1,`p`,8)(21,r2,2,1,`p`,9),A(22,a2,5,0,`fieldset`,10),M(23,c2,8,4,`details`,11,Xh),A(25,l2,6,2),F(26,`div`,2)(27,`button`,12),H(`click`,function(){return t.copy(`curl`)}),K(28,`Copy as curl`),I(),F(29,`button`,12),H(`click`,function(){return t.copy(`fetch`)}),K(30,`Copy as fetch`),I(),F(31,`span`,13),K(32),I()(),A(33,u2,2,2,`p`,14)(34,g2,3,1,`div`,15),A(35,y2,6,1,`div`,16),I()),e&2){let e;D(3),j(t.routeOptions().length?3:-1),D(2),P(`options`,t.methodOptions)(`value`,t.method()),D(3),P(`value`,t.template()),D(),P(`disabled`,!t.canSend()),k(`aria-describedby`,t.sendHintId()),D(),J(` `,t.sending()?`Sending…`:`Send`,` `),D(9),j(t.template().trim()?19:-1),D(),j(t.canCall()?t.needsConfirm()?21:-1:20),D(2),j(t.params().length?22:-1),D(),N(t.pairLists),D(2),j(t.method()===`GET`?-1:25),D(7),q(t.copied()),D(),j(t.sending()?33:(e=t.response())?34:-1,e),D(2),j(t.history().length?35:-1)}},dependencies:[OD],styles:[`h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%] { display: flex; gap: 8px; @@ -17994,7 +18008,7 @@ code[_ngcontent-%COMP%] { .pair-input[_ngcontent-%COMP%] { flex: 1 1 100%; } -}`]})},S2=(e,t)=>t.file;function C2(e,t){e&1&&(R(0,`p`,4),K(1,`Reading the build output…`),z())}function w2(e,t){e&1&&(R(0,`p`,5),K(1,`Could not read the build output.`),z())}function T2(e,t){e&1&&(R(0,`p`,6),K(1,` No client build yet. Run `),R(2,`code`),K(3,`analog build`),z(),K(4,` to see each page's chunk sizes here. `),z())}function E2(e,t){if(e&1&&(R(0,`dt`),K(1,`Entry`),z(),R(2,`dd`)(3,`span`,8),K(4),z(),R(5,`span`,15),K(6),z()()),e&2){W();let e=E_(0),t=W();D(4),q(e.entry.chunk),D(2),Y(` loads `,t.size(e.entry.size),` (`,t.size(e.entry.gzip),` gzip) with its imports`)}}function D2(e,t){if(e&1&&(R(0,`div`,17),K(1),z()),e&2){let e=W(2).$implicit;D(),Y(` + `,e.shared.length,` shared chunk`,e.shared.length===1?``:`s`,` `)}}function O2(e,t){if(e&1&&(R(0,`span`,16),K(1),z(),A(2,D2,2,2,`div`,17)),e&2){let e=W().$implicit;D(),q(e.chunk),D(),j(e.shared.length?2:-1)}}function k2(e,t){e&1&&(R(0,`span`,17),K(1,`not found`),z())}function A2(e,t){if(e&1&&(K(0),R(1,`div`,17),K(2),z()),e&2){let e=W().$implicit,t=W(2);J(` `,t.size(e.size),` `),D(2),J(``,t.size(e.gzip),` gzip`)}}function j2(e,t){if(e&1&&(R(0,`span`,19),K(1),z()),e&2){let e=t.$implicit;D(),q(e)}}function M2(e,t){if(e&1&&(R(0,`tr`)(1,`td`,16),K(2),z(),R(3,`td`),A(4,O2,3,2)(5,k2,2,0,`span`,17),z(),R(6,`td`,18),A(7,A2,3,2),z(),R(8,`td`),M(9,j2,2,1,`span`,19,Yh),z()()),e&2){let e=t.$implicit;D(2),q(e.path),D(2),j(e.chunk?4:5),D(3),j(e.chunk?7:-1),D(2),N(e.lazy)}}function N2(e,t){e&1&&(R(0,`tr`)(1,`td`,20),K(2,`No pages to match with the build.`),z()())}function P2(e,t){if(e&1&&(R(0,`li`)(1,`span`,16),K(2),z(),R(3,`span`,21),K(4),z()()),e&2){let e=t.$implicit,n=W(2);D(2),q(e.file),D(2),Y(``,n.size(e.size),` · `,n.size(e.gzip),` gzip`)}}function F2(e,t){if(e&1&&(R(0,`p`,14),K(1),z()),e&2){let e=t.$implicit;D(),q(e)}}function I2(e,t){if(e&1&&(w_(0),R(1,`dl`,7)(2,`dt`),K(3,`Output`),z(),R(4,`dd`,8),K(5),z(),R(6,`dt`),K(7,`JavaScript`),z(),R(8,`dd`,9),K(9),z(),R(10,`dt`),K(11,`CSS`),z(),R(12,`dd`,9),K(13),z(),A(14,E2,7,3),z(),R(15,`div`,10)(16,`table`)(17,`thead`)(18,`tr`)(19,`th`,11),K(20,`Route`),z(),R(21,`th`,11),K(22,`Page chunk`),z(),R(23,`th`,12),K(24,`Beyond the entry`),z(),R(25,`th`,11),K(26,`Lazy chunks`),z()()(),R(27,`tbody`),M(28,M2,11,3,`tr`,null,S2,!1,N2,3,0,`tr`),z()()(),R(31,`details`)(32,`summary`),K(33),z(),R(34,`ul`,13),M(35,P2,5,3,`li`,null,S2),z()(),M(37,F2,2,1,`p`,14,Yh)),e&2){let e=W(),t=T_(e.analysis());D(5),Y(``,t.dir,` · `,t.totals.chunks,` files`),D(4),Y(``,e.size(t.totals.js),` (`,e.size(t.totals.jsGzip),` gzip)`),D(4),Y(``,e.size(t.totals.css),` (`,e.size(t.totals.cssGzip),` gzip)`),D(),j(t.entry?14:-1),D(14),N(t.routes),D(5),J(`Largest files (`,t.chunks.length,`)`),D(2),N(t.chunks),D(2),N(t.notes)}}function L2(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} kB`:`${(e/1024/1024).toFixed(2)} MB`}var R2=class e{rpc=$(null);analysis=E(null);loading=E(!0);size=L2;hasBuild=X(()=>!!this.analysis()?.found);constructor(){ac(()=>{let e=this.rpc();Z(()=>void this.fetch(e))})}reload(){this.fetch(this.rpc())}async fetch(e){this.loading.set(!0);let t=await vT(e,`analog-build`);this.analysis.set(t),this.loading.set(!1)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-analog-build`]],inputs:{rpc:[1,`rpc`]},decls:10,vars:3,consts:[[`aria-labelledby`,`build-heading`,1,`card`],[1,`row`,`head`],[`id`,`build-heading`],[`type`,`button`,1,`btn`,`ghost`,3,`click`,`disabled`],[`role`,`status`,1,`muted`],[`data-tone`,`bad`,`role`,`alert`,1,`note`],[1,`muted`],[1,`facts`],[1,`mono`],[1,`tnum`],[`role`,`region`,`aria-label`,`Page chunks`,`tabindex`,`0`,1,`table-wrap`],[`scope`,`col`],[`scope`,`col`,1,`num`],[1,`plain`],[1,`note`],[1,`muted`,`tnum`],[1,`mono`,`path`],[1,`muted`,`small`],[1,`num`],[1,`chip`,`mono`],[`colspan`,`4`,1,`muted`],[1,`muted`,`small`,`tnum`]],template:function(e,t){e&1&&(R(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Build analysis`),z(),R(4,`button`,3),U(`click`,function(){return t.reload()}),K(5),z()(),A(6,C2,2,0,`p`,4)(7,w2,2,0,`p`,5)(8,T2,5,0,`p`,6)(9,I2,39,10),z()),e&2&&(D(4),V(`disabled`,t.loading()),D(),J(` `,t.loading()?`Reading…`:`Read again`,` `),D(),j(t.loading()&&!t.analysis()?6:t.analysis()?t.analysis().found?9:8:7))},styles:[`h2[_ngcontent-%COMP%], +}`]})},D2=(e,t)=>t.file;function O2(e,t){e&1&&(R(0,`p`,4),K(1,`Reading the build output…`),z())}function k2(e,t){e&1&&(R(0,`p`,5),K(1,`Could not read the build output.`),z())}function A2(e,t){e&1&&(R(0,`p`,6),K(1,` No client build yet. Run `),R(2,`code`),K(3,`analog build`),z(),K(4,` to see each page's chunk sizes here. `),z())}function j2(e,t){if(e&1&&(R(0,`dt`),K(1,`Entry`),z(),R(2,`dd`)(3,`span`,8),K(4),z(),R(5,`span`,15),K(6),z()()),e&2){W();let e=O_(0),t=W();D(4),q(e.entry.chunk),D(2),Y(` loads `,t.size(e.entry.size),` (`,t.size(e.entry.gzip),` gzip) with its imports`)}}function M2(e,t){if(e&1&&(R(0,`div`,17),K(1),z()),e&2){let e=W(2).$implicit;D(),Y(` + `,e.shared.length,` shared chunk`,e.shared.length===1?``:`s`,` `)}}function N2(e,t){if(e&1&&(R(0,`span`,16),K(1),z(),A(2,M2,2,2,`div`,17)),e&2){let e=W().$implicit;D(),q(e.chunk),D(),j(e.shared.length?2:-1)}}function P2(e,t){e&1&&(R(0,`span`,17),K(1,`not found`),z())}function F2(e,t){if(e&1&&(K(0),R(1,`div`,17),K(2),z()),e&2){let e=W().$implicit,t=W(2);J(` `,t.size(e.size),` `),D(2),J(``,t.size(e.gzip),` gzip`)}}function I2(e,t){if(e&1&&(R(0,`span`,19),K(1),z()),e&2){let e=t.$implicit;D(),q(e)}}function L2(e,t){if(e&1&&(R(0,`tr`)(1,`td`,16),K(2),z(),R(3,`td`),A(4,N2,3,2)(5,P2,2,0,`span`,17),z(),R(6,`td`,18),A(7,F2,3,2),z(),R(8,`td`),M(9,I2,2,1,`span`,19,Xh),z()()),e&2){let e=t.$implicit;D(2),q(e.path),D(2),j(e.chunk?4:5),D(3),j(e.chunk?7:-1),D(2),N(e.lazy)}}function R2(e,t){e&1&&(R(0,`tr`)(1,`td`,20),K(2,`No pages to match with the build.`),z()())}function z2(e,t){if(e&1&&(R(0,`li`)(1,`span`,16),K(2),z(),R(3,`span`,21),K(4),z()()),e&2){let e=t.$implicit,n=W(2);D(2),q(e.file),D(2),Y(``,n.size(e.size),` · `,n.size(e.gzip),` gzip`)}}function B2(e,t){if(e&1&&(R(0,`p`,14),K(1),z()),e&2){let e=t.$implicit;D(),q(e)}}function V2(e,t){if(e&1&&(E_(0),R(1,`dl`,7)(2,`dt`),K(3,`Output`),z(),R(4,`dd`,8),K(5),z(),R(6,`dt`),K(7,`JavaScript`),z(),R(8,`dd`,9),K(9),z(),R(10,`dt`),K(11,`CSS`),z(),R(12,`dd`,9),K(13),z(),A(14,j2,7,3),z(),R(15,`div`,10)(16,`table`)(17,`thead`)(18,`tr`)(19,`th`,11),K(20,`Route`),z(),R(21,`th`,11),K(22,`Page chunk`),z(),R(23,`th`,12),K(24,`Beyond the entry`),z(),R(25,`th`,11),K(26,`Lazy chunks`),z()()(),R(27,`tbody`),M(28,L2,11,3,`tr`,null,D2,!1,R2,3,0,`tr`),z()()(),R(31,`details`)(32,`summary`),K(33),z(),R(34,`ul`,13),M(35,z2,5,3,`li`,null,D2),z()(),M(37,B2,2,1,`p`,14,Xh)),e&2){let e=W(),t=D_(e.analysis());D(5),Y(``,t.dir,` · `,t.totals.chunks,` files`),D(4),Y(``,e.size(t.totals.js),` (`,e.size(t.totals.jsGzip),` gzip)`),D(4),Y(``,e.size(t.totals.css),` (`,e.size(t.totals.cssGzip),` gzip)`),D(),j(t.entry?14:-1),D(14),N(t.routes),D(5),J(`Largest files (`,t.chunks.length,`)`),D(2),N(t.chunks),D(2),N(t.notes)}}function H2(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} kB`:`${(e/1024/1024).toFixed(2)} MB`}var U2=class e{rpc=$(null);analysis=E(null);loading=E(!0);size=H2;hasBuild=X(()=>!!this.analysis()?.found);constructor(){ac(()=>{let e=this.rpc();Z(()=>void this.fetch(e))})}reload(){this.fetch(this.rpc())}async fetch(e){this.loading.set(!0);let t=await vT(e,`analog-build`);this.analysis.set(t),this.loading.set(!1)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-analog-build`]],inputs:{rpc:[1,`rpc`]},decls:10,vars:3,consts:[[`aria-labelledby`,`build-heading`,1,`card`],[1,`row`,`head`],[`id`,`build-heading`],[`type`,`button`,1,`btn`,`ghost`,3,`click`,`disabled`],[`role`,`status`,1,`muted`],[`data-tone`,`bad`,`role`,`alert`,1,`note`],[1,`muted`],[1,`facts`],[1,`mono`],[1,`tnum`],[`role`,`region`,`aria-label`,`Page chunks`,`tabindex`,`0`,1,`table-wrap`],[`scope`,`col`],[`scope`,`col`,1,`num`],[1,`plain`],[1,`note`],[1,`muted`,`tnum`],[1,`mono`,`path`],[1,`muted`,`small`],[1,`num`],[1,`chip`,`mono`],[`colspan`,`4`,1,`muted`],[1,`muted`,`small`,`tnum`]],template:function(e,t){e&1&&(R(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Build analysis`),z(),R(4,`button`,3),U(`click`,function(){return t.reload()}),K(5),z()(),A(6,O2,2,0,`p`,4)(7,k2,2,0,`p`,5)(8,A2,5,0,`p`,6)(9,V2,39,10),z()),e&2&&(D(4),V(`disabled`,t.loading()),D(),J(` `,t.loading()?`Reading…`:`Read again`,` `),D(),j(t.loading()&&!t.analysis()?6:t.analysis()?t.analysis().found?9:8:7))},styles:[`h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%] { display: flex; gap: 8px; @@ -18377,7 +18391,7 @@ code[_ngcontent-%COMP%] { border-radius: 4px; font-family: var(--%NS%mono); font-size: 12px; -}`]})},z2=(e,t)=>t[0];function B2(e,t){if(e&1&&(F(0,`li`),L(1,`app-analog-value-node`,6),I()),e&2){let e=t.$implicit;D(),P(`name`,e[0])(`value`,e[1])}}function V2(e,t){if(e&1&&(F(0,`li`,4),K(1),I()),e&2){let e=W(3);D(),J(``,e.hidden(),` more not shown`)}}function H2(e,t){if(e&1&&(F(0,`ul`,5),M(1,B2,2,2,`li`,null,z2),A(3,V2,2,1,`li`,4),I()),e&2){let e=W(2);D(),N(e.entries()),D(2),j(e.hidden()?3:-1)}}function U2(e,t){if(e&1){let e=B();F(0,`details`,2),H(`toggle`,function(t){return C(e),w(W().open.set(t.target.open))}),F(1,`summary`)(2,`span`,3),K(3),I(),F(4,`span`,4),K(5),I()(),A(6,H2,4,1,`ul`,5),I()}if(e&2){let e=W();P(`open`,e.open()),D(3),q(e.name()),D(2),q(e.summary()),D(),j(e.open()?6:-1)}}function W2(e,t){if(e&1&&(F(0,`span`,1)(1,`span`,3),K(2),I(),K(3,`: `),F(4,`span`,7),K(5),I()()),e&2){let e=W();D(2),q(e.name()),D(2),k(`data-type`,e.type()),D(),q(e.text())}}var G2=200,K2=class e{name=$(`value`);value=$(void 0);open=E(!1);isBranch=X(()=>{let e=this.value();return!!e&&typeof e==`object`});all=X(()=>{let e=this.value();return!e||typeof e!=`object`?[]:Array.isArray(e)?e.map((e,t)=>[String(t),e]):Object.entries(e)});entries=X(()=>this.all().slice(0,G2));hidden=X(()=>Math.max(0,this.all().length-G2));summary=X(()=>{let e=this.all().length;return Array.isArray(this.value())?`[${e}]`:`{${e} key${e===1?``:`s`}}`});type=X(()=>this.value()===null?`null`:typeof this.value());text=X(()=>{let e=this.value();return typeof e==`string`?JSON.stringify(e):String(e)});static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-analog-value-node`]],inputs:{name:[1,`name`],value:[1,`value`]},decls:2,vars:1,consts:[[3,`open`],[1,`leaf`],[3,`toggle`,`open`],[1,`key`],[1,`muted`,`small`],[`role`,`list`],[3,`name`,`value`],[1,`value`]],template:function(e,t){e&1&&A(0,U2,7,4,`details`,0)(1,W2,6,3,`span`,1),e&2&&j(+!t.isBranch())},dependencies:[e],styles:[`[_nghost-%COMP%] { +}`]})},W2=(e,t)=>t[0];function G2(e,t){if(e&1&&(F(0,`li`),L(1,`app-analog-value-node`,6),I()),e&2){let e=t.$implicit;D(),P(`name`,e[0])(`value`,e[1])}}function K2(e,t){if(e&1&&(F(0,`li`,4),K(1),I()),e&2){let e=W(3);D(),J(``,e.hidden(),` more not shown`)}}function q2(e,t){if(e&1&&(F(0,`ul`,5),M(1,G2,2,2,`li`,null,W2),A(3,K2,2,1,`li`,4),I()),e&2){let e=W(2);D(),N(e.entries()),D(2),j(e.hidden()?3:-1)}}function J2(e,t){if(e&1){let e=B();F(0,`details`,2),H(`toggle`,function(t){return C(e),w(W().open.set(t.target.open))}),F(1,`summary`)(2,`span`,3),K(3),I(),F(4,`span`,4),K(5),I()(),A(6,q2,4,1,`ul`,5),I()}if(e&2){let e=W();P(`open`,e.open()),D(3),q(e.name()),D(2),q(e.summary()),D(),j(e.open()?6:-1)}}function Y2(e,t){if(e&1&&(F(0,`span`,1)(1,`span`,3),K(2),I(),K(3,`: `),F(4,`span`,7),K(5),I()()),e&2){let e=W();D(2),q(e.name()),D(2),k(`data-type`,e.type()),D(),q(e.text())}}var X2=200,Z2=class e{name=$(`value`);value=$(void 0);open=E(!1);isBranch=X(()=>{let e=this.value();return!!e&&typeof e==`object`});all=X(()=>{let e=this.value();return!e||typeof e!=`object`?[]:Array.isArray(e)?e.map((e,t)=>[String(t),e]):Object.entries(e)});entries=X(()=>this.all().slice(0,X2));hidden=X(()=>Math.max(0,this.all().length-X2));summary=X(()=>{let e=this.all().length;return Array.isArray(this.value())?`[${e}]`:`{${e} key${e===1?``:`s`}}`});type=X(()=>this.value()===null?`null`:typeof this.value());text=X(()=>{let e=this.value();return typeof e==`string`?JSON.stringify(e):String(e)});static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-analog-value-node`]],inputs:{name:[1,`name`],value:[1,`value`]},decls:2,vars:1,consts:[[3,`open`],[1,`leaf`],[3,`toggle`,`open`],[1,`key`],[1,`muted`,`small`],[`role`,`list`],[3,`name`,`value`],[1,`value`]],template:function(e,t){e&1&&A(0,J2,7,4,`details`,0)(1,Y2,6,3,`span`,1),e&2&&j(+!t.isBranch())},dependencies:[e],styles:[`[_nghost-%COMP%] { display: block; font-family: var(--%NS%mono); font-size: 12.5px; @@ -18421,7 +18435,7 @@ summary[_ngcontent-%COMP%]:focus-visible { .value[data-type=string][_ngcontent-%COMP%] { color: var(--%NS%ok-text, var(--%NS%text)); -}`]})},q2=(e,t)=>t.key;function J2(e,t){e&1&&(F(0,`p`,3),K(1,`Open a page of the app to see the data its load() returned.`),I())}function Y2(e,t){if(e&1&&(F(0,`p`,3),K(1),I()),e&2){let e=W();D(),J(``,e.page().url,` has no load() data.`)}}function X2(e,t){if(e&1&&(F(0,`span`,9),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function Z2(e,t){if(e&1&&(F(0,`p`,14),K(1),I()),e&2){let e=W();D(),q(e.error)}}function Q2(e,t){if(e&1&&(F(0,`div`,15),L(1,`app-analog-value-node`,16),I()),e&2){let e=W();D(),P(`value`,e.value)}}function $2(e,t){e&1&&(F(0,`p`,3),K(1,`The page has no load() data now.`),I())}function e4(e,t){if(e&1&&A(0,Z2,2,1,`p`,14)(1,Q2,2,1,`div`,15)(2,$2,2,0,`p`,3),e&2){let e=t;j(e.error?0:e.found?1:2)}}function t4(e,t){if(e&1&&(F(0,`pre`,10),K(1),I()),e&2){W();let e=E_(0);D(),q(e.preview)}}function n4(e,t){if(e&1){let e=B();w_(0),F(1,`dl`,6)(2,`dt`),K(3,`Page`),I(),F(4,`dd`,7),K(5),I(),F(6,`dt`),K(7,`Size`),I(),F(8,`dd`,8),K(9),I(),F(10,`dt`),K(11,`Keys`),I(),F(12,`dd`),M(13,X2,2,1,`span`,9,Yh),I()(),A(15,e4,3,1)(16,t4,2,1,`pre`,10),F(17,`div`,11)(18,`button`,12),H(`click`,function(){return C(e),w(W().loadFull())}),K(19),I(),F(20,`span`,13),K(21,`Masked by the redaction rules, up to 200 KB.`),I()()}if(e&2){let e,t=W(),n=T_(t.page().load);D(5),q(t.page().url),D(4),q(t.size(n.bytes)),D(4),N(n.keys),D(2),j((e=t.full())?15:16,e),D(3),P(`disabled`,t.loading()),D(),J(` `,t.loading()?`Asking the page…`:t.full()?`Read again`:`Load the full value`,` `)}}function r4(e,t){e&1&&(F(0,`p`,3),K(1,` No payload from this page. It shows once a server rendered page reports its TransferState (the SSR & HTTP inspector must be on). `),I())}function i4(e,t){e&1&&(F(0,`p`,3),K(1,`The page has no TransferState script, so it was not server rendered.`),I())}function a4(e,t){e&1&&K(0),e&2&&J(` · `,W(2).refetchedCount(),` fetched again by the browser `)}function o4(e,t){if(e&1&&(F(0,`p`,18),K(1),I()),e&2){let e=W(2);D(),q(e.payload().error)}}function s4(e,t){if(e&1&&(F(0,`div`,24),K(1),I()),e&2){let e=W().$implicit;D(),q(e.file)}}function c4(e,t){e&1&&(F(0,`span`,26),K(1,`fetched again`),I())}function l4(e,t){e&1&&(F(0,`span`,27),K(1,`reused`),I())}function u4(e,t){if(e&1&&(F(0,`tr`)(1,`td`,22),K(2),I(),F(3,`td`)(4,`span`,23),K(5),I(),F(6,`span`,22),K(7),I(),A(8,s4,2,1,`div`,24),I(),F(9,`td`,25),K(10),I(),F(11,`td`),A(12,c4,2,0,`span`,26)(13,l4,2,0,`span`,27),I()()),e&2){let e=t.$implicit,n=W(2);D(2),q(e.key),D(3),q(n.kindLabel(e.kind)),D(2),q(e.label),D(),j(e.file?8:-1),D(2),q(n.size(e.size)),D(2),j(e.reuse===`refetched`?12:e.reuse===`reused`?13:-1)}}function d4(e,t){e&1&&(F(0,`tr`)(1,`td`,28),K(2,`The payload is empty.`),I()())}function f4(e,t){if(e&1&&(F(0,`p`,17),K(1),A(2,a4,1,1),I(),A(3,o4,2,1,`p`,18),F(4,`div`,19)(5,`table`)(6,`thead`)(7,`tr`)(8,`th`,20),K(9,`Key`),I(),F(10,`th`,20),K(11,`From`),I(),F(12,`th`,21),K(13,`Size`),I(),F(14,`th`,20),K(15,`In the browser`),I()()(),F(16,`tbody`),M(17,u4,14,6,`tr`,null,q2,!1,d4,3,0,`tr`),I()()()),e&2){let e=W();D(),__(` `,e.rows().length,` entr`,e.rows().length===1?`y`:`ies`,`, `,e.size(e.payload().size),` `),D(),j(e.refetchedCount()?2:-1),D(),j(e.payload().error?3:-1),D(14),N(e.rows())}}function p4(e){if(!e)return;let t=e.replace(/^[a-z]+:\/\/[^/]+/i,``).split(/[?#]/)[0],n=t.indexOf(`/_analog/pages`);if(!(n<0))return(t.slice(n+14)||`/`).replace(/\/\([^/]*\)(?=\/|$)/g,``).replace(/\/-[^/]+-$/,``).replace(/\/index$/,``)||`/`}function m4(e,t,n,r){return e.map(e=>{if(e.fn){let n=t.find(t=>t.id===e.fn.id);return{key:e.key,kind:`fn`,label:`${e.fn.name??n?.name??e.fn.id}()`,file:e.fn.file??n?.file,size:e.size,reuse:r.some(t=>t.id===e.fn.id)?`refetched`:`reused`}}let i=p4(e.http?.url);return i?{key:e.key,kind:`load`,label:`load() of ${i}`,size:e.size,reuse:n.some(e=>e.route===i)?`refetched`:`reused`}:e.source===`hydration`?{key:e.key,kind:`hydration`,label:`Hydration data`,size:e.size}:e.http?{key:e.key,kind:`http`,label:e.http.url??`HTTP response`,size:e.size}:{key:e.key,kind:`state`,label:`App state`,size:e.size}})}var h4={load:`load()`,fn:`server function`,http:`HttpClient`,hydration:`hydration`,state:`state`},g4=class e{rpc=$(null);page=$(null);serverFns=$([]);duplicates=$([]);refetches=$([]);payloads=E({});full=E(null);loading=E(!1);size=L2;destroyRef=S(vs);unsubscribe=null;pageKey=X(()=>`${this.page()?.pageId??``} ${this.page()?.url??``}`);payload=X(()=>{let e=this.page()?.pageId;return e?this.payloads()[e]??null:null});rows=X(()=>m4(this.payload()?.entries??[],this.serverFns(),this.duplicates(),this.refetches()));refetchedCount=X(()=>this.rows().filter(e=>e.reuse===`refetched`).length);constructor(){ac(()=>{let e=this.rpc();Z(()=>void this.subscribe(e))}),ac(()=>{this.pageKey(),Z(()=>this.full.set(null))}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async subscribe(e){if(this.unsubscribe?.(),this.unsubscribe=null,e)try{let t=await e.scope(`pangular`).rpc.sharedState(`http-payloads`);if(this.destroyRef.destroyed)return;let n=e=>this.payloads.set(e?.pages??{});n(t.value()),this.unsubscribe=t.on(`updated`,n)}catch{this.payloads.set({})}}async loadFull(){let e=this.page();if(!e)return;let t=this.pageKey();this.loading.set(!0);try{let n=await vT(this.rpc(),`analog-load-data`,e.pageId);if(t!==this.pageKey())return;this.full.set(n??{found:!1,error:`No answer from the devtools server.`})}finally{this.loading.set(!1)}}kindLabel(e){return h4[e]}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-analog-data`]],inputs:{rpc:[1,`rpc`],page:[1,`page`],serverFns:[1,`serverFns`],duplicates:[1,`duplicates`],refetches:[1,`refetches`]},decls:13,vars:2,consts:[[1,`stack`],[`aria-labelledby`,`data-load-heading`,1,`card`],[`id`,`data-load-heading`],[1,`muted`],[`aria-labelledby`,`data-payload-heading`,1,`card`],[`id`,`data-payload-heading`],[1,`facts`],[1,`mono`],[1,`tnum`],[1,`chip`,`mono`],[1,`code`],[1,`row`],[`type`,`button`,1,`btn`,`ghost`,3,`click`,`disabled`],[1,`muted`,`small`],[`data-tone`,`bad`,`role`,`alert`,1,`note`],[`role`,`region`,`aria-label`,`Full load() value`,`tabindex`,`0`,1,`tree`],[`name`,`load()`,3,`value`],[1,`muted`,`small`,`tnum`],[`data-tone`,`bad`,1,`note`],[`role`,`region`,`aria-label`,`TransferState entries`,`tabindex`,`0`,1,`table-wrap`],[`scope`,`col`],[`scope`,`col`,1,`num`],[1,`mono`,`path`],[1,`pill`],[1,`muted`,`small`,`file`],[1,`num`],[`data-tone`,`warn`,1,`pill`],[`data-tone`,`good`,1,`pill`],[`colspan`,`4`,1,`muted`]],template:function(e,t){e&1&&(F(0,`div`,0)(1,`section`,1)(2,`h2`,2),K(3,`load() data of the open page`),I(),A(4,J2,2,0,`p`,3)(5,Y2,2,1,`p`,3)(6,n4,22,6),I(),F(7,`section`,4)(8,`h2`,5),K(9,`TransferState payload`),I(),A(10,r4,2,0,`p`,3)(11,i4,2,0,`p`,3)(12,f4,20,6),I()()),e&2&&(D(4),j(t.page()?t.page().load?6:5:4),D(6),j(t.payload()?t.payload().found?12:11:10))},dependencies:[K2],styles:[`h2[_ngcontent-%COMP%], +}`]})},Q2=(e,t)=>t.key;function $2(e,t){e&1&&(F(0,`p`,3),K(1,`Open a page of the app to see the data its load() returned.`),I())}function e4(e,t){if(e&1&&(F(0,`p`,3),K(1),I()),e&2){let e=W();D(),J(``,e.page().url,` has no load() data.`)}}function t4(e,t){if(e&1&&(F(0,`span`,9),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function n4(e,t){if(e&1&&(F(0,`p`,14),K(1),I()),e&2){let e=W();D(),q(e.error)}}function r4(e,t){if(e&1&&(F(0,`div`,15),L(1,`app-analog-value-node`,16),I()),e&2){let e=W();D(),P(`value`,e.value)}}function i4(e,t){e&1&&(F(0,`p`,3),K(1,`The page has no load() data now.`),I())}function a4(e,t){if(e&1&&A(0,n4,2,1,`p`,14)(1,r4,2,1,`div`,15)(2,i4,2,0,`p`,3),e&2){let e=t;j(e.error?0:e.found?1:2)}}function o4(e,t){if(e&1&&(F(0,`pre`,10),K(1),I()),e&2){W();let e=O_(0);D(),q(e.preview)}}function s4(e,t){if(e&1){let e=B();E_(0),F(1,`dl`,6)(2,`dt`),K(3,`Page`),I(),F(4,`dd`,7),K(5),I(),F(6,`dt`),K(7,`Size`),I(),F(8,`dd`,8),K(9),I(),F(10,`dt`),K(11,`Keys`),I(),F(12,`dd`),M(13,t4,2,1,`span`,9,Xh),I()(),A(15,a4,3,1)(16,o4,2,1,`pre`,10),F(17,`div`,11)(18,`button`,12),H(`click`,function(){return C(e),w(W().loadFull())}),K(19),I(),F(20,`span`,13),K(21,`Masked by the redaction rules, up to 200 KB.`),I()()}if(e&2){let e,t=W(),n=D_(t.page().load);D(5),q(t.page().url),D(4),q(t.size(n.bytes)),D(4),N(n.keys),D(2),j((e=t.full())?15:16,e),D(3),P(`disabled`,t.loading()),D(),J(` `,t.loading()?`Asking the page…`:t.full()?`Read again`:`Load the full value`,` `)}}function c4(e,t){e&1&&(F(0,`p`,3),K(1,` No payload from this page. It shows once a server rendered page reports its TransferState (the SSR & HTTP inspector must be on). `),I())}function l4(e,t){e&1&&(F(0,`p`,3),K(1,`The page has no TransferState script, so it was not server rendered.`),I())}function u4(e,t){e&1&&K(0),e&2&&J(` · `,W(2).refetchedCount(),` fetched again by the browser `)}function d4(e,t){if(e&1&&(F(0,`p`,18),K(1),I()),e&2){let e=W(2);D(),q(e.payload().error)}}function f4(e,t){if(e&1&&(F(0,`div`,24),K(1),I()),e&2){let e=W().$implicit;D(),q(e.file)}}function p4(e,t){e&1&&(F(0,`span`,26),K(1,`fetched again`),I())}function m4(e,t){e&1&&(F(0,`span`,27),K(1,`reused`),I())}function h4(e,t){if(e&1&&(F(0,`tr`)(1,`td`,22),K(2),I(),F(3,`td`)(4,`span`,23),K(5),I(),F(6,`span`,22),K(7),I(),A(8,f4,2,1,`div`,24),I(),F(9,`td`,25),K(10),I(),F(11,`td`),A(12,p4,2,0,`span`,26)(13,m4,2,0,`span`,27),I()()),e&2){let e=t.$implicit,n=W(2);D(2),q(e.key),D(3),q(n.kindLabel(e.kind)),D(2),q(e.label),D(),j(e.file?8:-1),D(2),q(n.size(e.size)),D(2),j(e.reuse===`refetched`?12:e.reuse===`reused`?13:-1)}}function g4(e,t){e&1&&(F(0,`tr`)(1,`td`,28),K(2,`The payload is empty.`),I()())}function _4(e,t){if(e&1&&(F(0,`p`,17),K(1),A(2,u4,1,1),I(),A(3,d4,2,1,`p`,18),F(4,`div`,19)(5,`table`)(6,`thead`)(7,`tr`)(8,`th`,20),K(9,`Key`),I(),F(10,`th`,20),K(11,`From`),I(),F(12,`th`,21),K(13,`Size`),I(),F(14,`th`,20),K(15,`In the browser`),I()()(),F(16,`tbody`),M(17,h4,14,6,`tr`,null,Q2,!1,g4,3,0,`tr`),I()()()),e&2){let e=W();D(),y_(` `,e.rows().length,` entr`,e.rows().length===1?`y`:`ies`,`, `,e.size(e.payload().size),` `),D(),j(e.refetchedCount()?2:-1),D(),j(e.payload().error?3:-1),D(14),N(e.rows())}}function v4(e){if(!e)return;let t=e.replace(/^[a-z]+:\/\/[^/]+/i,``).split(/[?#]/)[0],n=t.indexOf(`/_analog/pages`);if(!(n<0))return(t.slice(n+14)||`/`).replace(/\/\([^/]*\)(?=\/|$)/g,``).replace(/\/-[^/]+-$/,``).replace(/\/index$/,``)||`/`}function y4(e,t,n,r){return e.map(e=>{if(e.fn){let n=t.find(t=>t.id===e.fn.id);return{key:e.key,kind:`fn`,label:`${e.fn.name??n?.name??e.fn.id}()`,file:e.fn.file??n?.file,size:e.size,reuse:r.some(t=>t.id===e.fn.id)?`refetched`:`reused`}}let i=v4(e.http?.url);return i?{key:e.key,kind:`load`,label:`load() of ${i}`,size:e.size,reuse:n.some(e=>e.route===i)?`refetched`:`reused`}:e.source===`hydration`?{key:e.key,kind:`hydration`,label:`Hydration data`,size:e.size}:e.http?{key:e.key,kind:`http`,label:e.http.url??`HTTP response`,size:e.size}:{key:e.key,kind:`state`,label:`App state`,size:e.size}})}var b4={load:`load()`,fn:`server function`,http:`HttpClient`,hydration:`hydration`,state:`state`},x4=class e{rpc=$(null);page=$(null);serverFns=$([]);duplicates=$([]);refetches=$([]);payloads=E({});full=E(null);loading=E(!1);size=H2;destroyRef=S(vs);unsubscribe=null;pageKey=X(()=>`${this.page()?.pageId??``} ${this.page()?.url??``}`);payload=X(()=>{let e=this.page()?.pageId;return e?this.payloads()[e]??null:null});rows=X(()=>y4(this.payload()?.entries??[],this.serverFns(),this.duplicates(),this.refetches()));refetchedCount=X(()=>this.rows().filter(e=>e.reuse===`refetched`).length);constructor(){ac(()=>{let e=this.rpc();Z(()=>void this.subscribe(e))}),ac(()=>{this.pageKey(),Z(()=>this.full.set(null))}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async subscribe(e){if(this.unsubscribe?.(),this.unsubscribe=null,e)try{let t=await e.scope(`pangular`).rpc.sharedState(`http-payloads`);if(this.destroyRef.destroyed)return;let n=e=>this.payloads.set(e?.pages??{});n(t.value()),this.unsubscribe=t.on(`updated`,n)}catch{this.payloads.set({})}}async loadFull(){let e=this.page();if(!e)return;let t=this.pageKey();this.loading.set(!0);try{let n=await vT(this.rpc(),`analog-load-data`,e.pageId);if(t!==this.pageKey())return;this.full.set(n??{found:!1,error:`No answer from the devtools server.`})}finally{this.loading.set(!1)}}kindLabel(e){return b4[e]}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-analog-data`]],inputs:{rpc:[1,`rpc`],page:[1,`page`],serverFns:[1,`serverFns`],duplicates:[1,`duplicates`],refetches:[1,`refetches`]},decls:13,vars:2,consts:[[1,`stack`],[`aria-labelledby`,`data-load-heading`,1,`card`],[`id`,`data-load-heading`],[1,`muted`],[`aria-labelledby`,`data-payload-heading`,1,`card`],[`id`,`data-payload-heading`],[1,`facts`],[1,`mono`],[1,`tnum`],[1,`chip`,`mono`],[1,`code`],[1,`row`],[`type`,`button`,1,`btn`,`ghost`,3,`click`,`disabled`],[1,`muted`,`small`],[`data-tone`,`bad`,`role`,`alert`,1,`note`],[`role`,`region`,`aria-label`,`Full load() value`,`tabindex`,`0`,1,`tree`],[`name`,`load()`,3,`value`],[1,`muted`,`small`,`tnum`],[`data-tone`,`bad`,1,`note`],[`role`,`region`,`aria-label`,`TransferState entries`,`tabindex`,`0`,1,`table-wrap`],[`scope`,`col`],[`scope`,`col`,1,`num`],[1,`mono`,`path`],[1,`pill`],[1,`muted`,`small`,`file`],[1,`num`],[`data-tone`,`warn`,1,`pill`],[`data-tone`,`good`,1,`pill`],[`colspan`,`4`,1,`muted`]],template:function(e,t){e&1&&(F(0,`div`,0)(1,`section`,1)(2,`h2`,2),K(3,`load() data of the open page`),I(),A(4,$2,2,0,`p`,3)(5,e4,2,1,`p`,3)(6,s4,22,6),I(),F(7,`section`,4)(8,`h2`,5),K(9,`TransferState payload`),I(),A(10,c4,2,0,`p`,3)(11,l4,2,0,`p`,3)(12,_4,20,6),I()()),e&2&&(D(4),j(t.page()?t.page().load?6:5:4),D(6),j(t.payload()?t.payload().found?12:11:10))},dependencies:[Z2],styles:[`h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%] { display: flex; gap: 8px; @@ -18796,15 +18810,15 @@ summary[_ngcontent-%COMP%]:hover { .tree[_ngcontent-%COMP%]:focus-visible { outline: 2px solid var(--%NS%accent); outline-offset: -2px; -}`]})},_4=400;function v4(e){let t=[];for(let[n,r]of e.split(/(`[^`]+`)/).entries())r&&(n%2==1?t.push({text:r.slice(1,-1),code:!0}):t.push(...b4(y4(r))));return t}function y4(e){return e.replace(/!\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/\[([^\]]+)\]\([^)]*\)/g,`$1`).replace(/<[^>]+>/g,``)}function b4(e){let t=[],n=/(\*\*[^*]+\*\*|__[^_]+__|\*[^*\s][^*]*\*|_[^_\s][^_]*_)/g,r=0;for(let i of e.matchAll(n)){i.index>r&&t.push({text:e.slice(r,i.index)});let n=i[0];n.startsWith(`**`)||n.startsWith(`__`)?t.push({text:n.slice(2,-2),strong:!0}):t.push({text:n.slice(1,-1),em:!0}),r=i.index+n.length}return r<e.length&&t.push({text:e.slice(r)}),t}function x4(e){let t=[],n=e.replace(/\r/g,``).split(` -`),r=[],i=()=>{r.length&&t.push({kind:`paragraph`,parts:v4(r.join(` `))}),r=[]};for(let e=0;e<n.length&&t.length<_4;e++){let a=n[e],o=a.match(/^\s*(```|~~~)\s*([\w-]*)/);if(o){i();let r=[];for(e++;e<n.length&&!n[e].trim().startsWith(o[1]);e++)r.push(n[e]);t.push({kind:`code`,lang:o[2],text:r.join(` -`)});continue}let s=a.match(/^(#{1,6})\s+(.*?)\s*#*\s*$/);if(s){i();let e=s[1].length;t.push({kind:`heading`,level:e,parts:v4(s[2])});continue}if(/^\s*([-*_])(\s*\1){2,}\s*$/.test(a)){i(),t.push({kind:`rule`});continue}let c=a.match(/^\s*([-*+]|\d+[.)])\s+(.*)$/);if(c){i();let r=/\d/.test(c[1]),a=[v4(c[2])];for(;e+1<n.length;){let t=n[e+1].match(/^\s*([-*+]|\d+[.)])\s+(.*)$/);if(!t||/\d/.test(t[1])!==r)break;a.push(v4(t[2])),e++}t.push({kind:`list`,ordered:r,items:a});continue}let l=a.match(/^\s*>\s?(.*)$/);if(l){i();let r=[l[1]];for(;e+1<n.length&&/^\s*>/.test(n[e+1]);)r.push(n[++e].replace(/^\s*>\s?/,``));t.push({kind:`quote`,parts:v4(r.join(` `))});continue}a.trim()?r.push(a.trim()):i()}return i(),t}function S4(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function C4(e,t){if(e&1&&(R(0,`strong`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function w4(e,t){if(e&1&&(R(0,`em`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function T4(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,e.text,` `)}}function E4(e,t){if(e&1&&A(0,S4,2,1,`code`)(1,C4,2,1,`strong`)(2,w4,2,1,`em`)(3,T4,1,1),e&2){let e=t.$implicit;j(e.code?0:e.strong?1:e.em?2:3)}}var D4=(e,t)=>t[0];function O4(e,t){if(e&1&&(F(0,`p`,5),K(1),I()),e&2){let e=W();D(),J(`Reading `,e.file(),`…`)}}function k4(e,t){if(e&1&&(F(0,`p`,6),K(1),I()),e&2){let e=W();D(),q(e.error)}}function A4(e,t){if(e&1&&(F(0,`li`),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function j4(e,t){if(e&1&&(F(0,`div`,7)(1,`p`)(2,`strong`),K(3,`Does not match the content schema`),I()(),F(4,`ul`,12),M(5,A4,2,1,`li`,null,Yh),I()()),e&2){let e=W();D(5),N(e.schemaErrors)}}function M4(e,t){if(e&1&&(F(0,`p`,8),K(1),I()),e&2){let e=W(2);D(),J(`Matches `,e.schema(),`.`)}}function N4(e,t){if(e&1&&(F(0,`dt`,13),K(1),I(),F(2,`dd`,13),K(3),I()),e&2){let e=t.$implicit;D(),q(e[0]),D(2),q(e[1])}}function P4(e,t){if(e&1&&(F(0,`dl`,9),M(1,N4,4,2,null,null,D4),I()),e&2){let e=W(2);D(),N(e.frontmatter())}}function F4(e,t){if(e&1&&(F(0,`p`,14),L(1,`app-md-inline`,16),I()),e&2){let e=W().$implicit;k(`data-level`,e.level),D(),P(`parts`,e.parts)}}function I4(e,t){if(e&1&&(F(0,`p`),L(1,`app-md-inline`,16),I()),e&2){let e=W().$implicit;D(),P(`parts`,e.parts)}}function L4(e,t){if(e&1&&(F(0,`blockquote`),L(1,`app-md-inline`,16),I()),e&2){let e=W().$implicit;D(),P(`parts`,e.parts)}}function R4(e,t){if(e&1&&(F(0,`li`),L(1,`app-md-inline`,16),I()),e&2){let e=t.$implicit;D(),P(`parts`,e)}}function z4(e,t){if(e&1&&(F(0,`ol`),M(1,R4,2,1,`li`,null,Jh),I()),e&2){let e=W(2).$implicit;D(),N(e.items)}}function B4(e,t){if(e&1&&(F(0,`li`),L(1,`app-md-inline`,16),I()),e&2){let e=t.$implicit;D(),P(`parts`,e)}}function V4(e,t){if(e&1&&(F(0,`ul`),M(1,B4,2,1,`li`,null,Jh),I()),e&2){let e=W(2).$implicit;D(),N(e.items)}}function H4(e,t){if(e&1&&A(0,z4,3,0,`ol`)(1,V4,3,0,`ul`),e&2){let e=W().$implicit;j(+!e.ordered)}}function U4(e,t){if(e&1&&(F(0,`pre`,15),K(1),I()),e&2){let e=W().$implicit;D(),q(e.text)}}function W4(e,t){e&1&&L(0,`hr`)}function G4(e,t){if(e&1&&A(0,F4,2,2,`p`,14)(1,I4,2,1,`p`)(2,L4,2,1,`blockquote`)(3,H4,2,1)(4,U4,2,1,`pre`,15)(5,W4,1,0,`hr`),e&2){let e,n=t.$implicit;j((e=n.kind)===`heading`?0:e===`paragraph`?1:e===`quote`?2:e===`list`?3:e===`code`?4:e===`rule`?5:-1)}}function K4(e,t){e&1&&(F(0,`p`,11),K(1,`The file has no markdown after its frontmatter.`),I())}function q4(e,t){e&1&&(F(0,`p`,8),K(1,`The preview stops after 20,000 characters.`),I())}function J4(e,t){if(e&1&&(A(0,k4,2,1,`p`,6),A(1,j4,7,0,`div`,7)(2,M4,2,1,`p`,8),A(3,P4,3,0,`dl`,9),F(4,`div`,10),M(5,G4,6,1,null,null,Jh,!1,K4,2,0,`p`,11),A(8,q4,2,0,`p`,8),I()),e&2){let e=t,n=W();j(e.error?0:-1),D(),j(e.schemaErrors?.length?1:n.schema()&&!e.error?2:-1),D(2),j(n.frontmatter().length?3:-1),D(),k(`aria-label`,`Rendered markdown of `+n.file()),D(),N(n.blocks()),D(3),j(e.truncated?8:-1)}}function Y4(e,t){if(e&1&&(F(0,`p`,6),K(1),I()),e&2){let e=W();D(),J(`Could not read `,e.file(),`.`)}}var X4=class e{parts=$([]);static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-md-inline`]],inputs:{parts:[1,`parts`]},decls:2,vars:0,template:function(e,t){e&1&&M(0,E4,4,1,null,null,Jh),e&2&&N(t.parts())},styles:[`code[_ngcontent-%COMP%] { +}`]})},S4=400;function C4(e){let t=[];for(let[n,r]of e.split(/(`[^`]+`)/).entries())r&&(n%2==1?t.push({text:r.slice(1,-1),code:!0}):t.push(...T4(w4(r))));return t}function w4(e){return e.replace(/!\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/\[([^\]]+)\]\([^)]*\)/g,`$1`).replace(/<[^>]+>/g,``)}function T4(e){let t=[],n=/(\*\*[^*]+\*\*|__[^_]+__|\*[^*\s][^*]*\*|_[^_\s][^_]*_)/g,r=0;for(let i of e.matchAll(n)){i.index>r&&t.push({text:e.slice(r,i.index)});let n=i[0];n.startsWith(`**`)||n.startsWith(`__`)?t.push({text:n.slice(2,-2),strong:!0}):t.push({text:n.slice(1,-1),em:!0}),r=i.index+n.length}return r<e.length&&t.push({text:e.slice(r)}),t}function E4(e){let t=[],n=e.replace(/\r/g,``).split(` +`),r=[],i=()=>{r.length&&t.push({kind:`paragraph`,parts:C4(r.join(` `))}),r=[]};for(let e=0;e<n.length&&t.length<S4;e++){let a=n[e],o=a.match(/^\s*(```|~~~)\s*([\w-]*)/);if(o){i();let r=[];for(e++;e<n.length&&!n[e].trim().startsWith(o[1]);e++)r.push(n[e]);t.push({kind:`code`,lang:o[2],text:r.join(` +`)});continue}let s=a.match(/^(#{1,6})\s+(.*?)\s*#*\s*$/);if(s){i();let e=s[1].length;t.push({kind:`heading`,level:e,parts:C4(s[2])});continue}if(/^\s*([-*_])(\s*\1){2,}\s*$/.test(a)){i(),t.push({kind:`rule`});continue}let c=a.match(/^\s*([-*+]|\d+[.)])\s+(.*)$/);if(c){i();let r=/\d/.test(c[1]),a=[C4(c[2])];for(;e+1<n.length;){let t=n[e+1].match(/^\s*([-*+]|\d+[.)])\s+(.*)$/);if(!t||/\d/.test(t[1])!==r)break;a.push(C4(t[2])),e++}t.push({kind:`list`,ordered:r,items:a});continue}let l=a.match(/^\s*>\s?(.*)$/);if(l){i();let r=[l[1]];for(;e+1<n.length&&/^\s*>/.test(n[e+1]);)r.push(n[++e].replace(/^\s*>\s?/,``));t.push({kind:`quote`,parts:C4(r.join(` `))});continue}a.trim()?r.push(a.trim()):i()}return i(),t}function D4(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function O4(e,t){if(e&1&&(R(0,`strong`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function k4(e,t){if(e&1&&(R(0,`em`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function A4(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,e.text,` `)}}function j4(e,t){if(e&1&&A(0,D4,2,1,`code`)(1,O4,2,1,`strong`)(2,k4,2,1,`em`)(3,A4,1,1),e&2){let e=t.$implicit;j(e.code?0:e.strong?1:e.em?2:3)}}var M4=(e,t)=>t[0];function N4(e,t){if(e&1&&(F(0,`p`,5),K(1),I()),e&2){let e=W();D(),J(`Reading `,e.file(),`…`)}}function P4(e,t){if(e&1&&(F(0,`p`,6),K(1),I()),e&2){let e=W();D(),q(e.error)}}function F4(e,t){if(e&1&&(F(0,`li`),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function I4(e,t){if(e&1&&(F(0,`div`,7)(1,`p`)(2,`strong`),K(3,`Does not match the content schema`),I()(),F(4,`ul`,12),M(5,F4,2,1,`li`,null,Xh),I()()),e&2){let e=W();D(5),N(e.schemaErrors)}}function L4(e,t){if(e&1&&(F(0,`p`,8),K(1),I()),e&2){let e=W(2);D(),J(`Matches `,e.schema(),`.`)}}function R4(e,t){if(e&1&&(F(0,`dt`,13),K(1),I(),F(2,`dd`,13),K(3),I()),e&2){let e=t.$implicit;D(),q(e[0]),D(2),q(e[1])}}function z4(e,t){if(e&1&&(F(0,`dl`,9),M(1,R4,4,2,null,null,M4),I()),e&2){let e=W(2);D(),N(e.frontmatter())}}function B4(e,t){if(e&1&&(F(0,`p`,14),L(1,`app-md-inline`,16),I()),e&2){let e=W().$implicit;k(`data-level`,e.level),D(),P(`parts`,e.parts)}}function V4(e,t){if(e&1&&(F(0,`p`),L(1,`app-md-inline`,16),I()),e&2){let e=W().$implicit;D(),P(`parts`,e.parts)}}function H4(e,t){if(e&1&&(F(0,`blockquote`),L(1,`app-md-inline`,16),I()),e&2){let e=W().$implicit;D(),P(`parts`,e.parts)}}function U4(e,t){if(e&1&&(F(0,`li`),L(1,`app-md-inline`,16),I()),e&2){let e=t.$implicit;D(),P(`parts`,e)}}function W4(e,t){if(e&1&&(F(0,`ol`),M(1,U4,2,1,`li`,null,Yh),I()),e&2){let e=W(2).$implicit;D(),N(e.items)}}function G4(e,t){if(e&1&&(F(0,`li`),L(1,`app-md-inline`,16),I()),e&2){let e=t.$implicit;D(),P(`parts`,e)}}function K4(e,t){if(e&1&&(F(0,`ul`),M(1,G4,2,1,`li`,null,Yh),I()),e&2){let e=W(2).$implicit;D(),N(e.items)}}function q4(e,t){if(e&1&&A(0,W4,3,0,`ol`)(1,K4,3,0,`ul`),e&2){let e=W().$implicit;j(+!e.ordered)}}function J4(e,t){if(e&1&&(F(0,`pre`,15),K(1),I()),e&2){let e=W().$implicit;D(),q(e.text)}}function Y4(e,t){e&1&&L(0,`hr`)}function X4(e,t){if(e&1&&A(0,B4,2,2,`p`,14)(1,V4,2,1,`p`)(2,H4,2,1,`blockquote`)(3,q4,2,1)(4,J4,2,1,`pre`,15)(5,Y4,1,0,`hr`),e&2){let e,n=t.$implicit;j((e=n.kind)===`heading`?0:e===`paragraph`?1:e===`quote`?2:e===`list`?3:e===`code`?4:e===`rule`?5:-1)}}function Z4(e,t){e&1&&(F(0,`p`,11),K(1,`The file has no markdown after its frontmatter.`),I())}function Q4(e,t){e&1&&(F(0,`p`,8),K(1,`The preview stops after 20,000 characters.`),I())}function $4(e,t){if(e&1&&(A(0,P4,2,1,`p`,6),A(1,I4,7,0,`div`,7)(2,L4,2,1,`p`,8),A(3,z4,3,0,`dl`,9),F(4,`div`,10),M(5,X4,6,1,null,null,Yh,!1,Z4,2,0,`p`,11),A(8,Q4,2,0,`p`,8),I()),e&2){let e=t,n=W();j(e.error?0:-1),D(),j(e.schemaErrors?.length?1:n.schema()&&!e.error?2:-1),D(2),j(n.frontmatter().length?3:-1),D(),k(`aria-label`,`Rendered markdown of `+n.file()),D(),N(n.blocks()),D(3),j(e.truncated?8:-1)}}function e3(e,t){if(e&1&&(F(0,`p`,6),K(1),I()),e&2){let e=W();D(),J(`Could not read `,e.file(),`.`)}}var t3=class e{parts=$([]);static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-md-inline`]],inputs:{parts:[1,`parts`]},decls:2,vars:0,template:function(e,t){e&1&&M(0,j4,4,1,null,null,Yh),e&2&&N(t.parts())},styles:[`code[_ngcontent-%COMP%] { padding: 1px 5px; border: 1px solid var(--%NS%border); border-radius: 4px; font-family: var(--%NS%mono); font-size: 12px; -}`]})},Z4=class e{rpc=$(null);file=$.required();schema=$(void 0);closed=Q_();data=E(null);loading=E(!0);blocks=X(()=>x4(this.data()?.body??``));frontmatter=X(()=>Object.entries(this.data()?.values??{}).map(([e,t])=>[e,typeof t==`string`?t:JSON.stringify(t)]));run=0;constructor(){ac(()=>{let e=this.file(),t=this.rpc();Z(()=>void this.fetch(t,e))})}async fetch(e,t){let n=++this.run;this.loading.set(!0);let r=await vT(e,`analog-content-preview`,t);n===this.run&&(this.data.set(r),this.loading.set(!1))}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-analog-content-preview`]],inputs:{rpc:[1,`rpc`],file:[1,`file`],schema:[1,`schema`]},outputs:{closed:`closed`},decls:11,vars:2,consts:[[`aria-labelledby`,`content-preview-heading`,1,`card`],[1,`row`,`head`],[`id`,`content-preview-heading`],[1,`file`,`grow`],[`type`,`button`,1,`btn`,`ghost`,3,`click`],[`role`,`status`,1,`muted`],[`data-tone`,`bad`,`role`,`alert`,1,`note`],[`data-tone`,`bad`,`role`,`status`,1,`note`],[1,`muted`,`small`],[1,`facts`],[`role`,`region`,`tabindex`,`0`,1,`md`],[1,`muted`],[1,`plain`],[1,`mono`],[1,`md-heading`],[1,`code`],[3,`parts`]],template:function(e,t){if(e&1&&(F(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Preview`),I(),F(4,`span`,3),K(5),I(),F(6,`button`,4),H(`click`,function(){return t.closed.emit()}),K(7,`Close preview`),I()(),A(8,O4,2,1,`p`,5)(9,J4,9,6)(10,Y4,2,1,`p`,6),I()),e&2){let e;D(5),q(t.file()),D(3),j(t.loading()?8:(e=t.data())?9:10,e)}},dependencies:[X4],styles:[`h2[_ngcontent-%COMP%], +}`]})},n3=class e{rpc=$(null);file=$.required();schema=$(void 0);closed=ev();data=E(null);loading=E(!0);blocks=X(()=>E4(this.data()?.body??``));frontmatter=X(()=>Object.entries(this.data()?.values??{}).map(([e,t])=>[e,typeof t==`string`?t:JSON.stringify(t)]));run=0;constructor(){ac(()=>{let e=this.file(),t=this.rpc();Z(()=>void this.fetch(t,e))})}async fetch(e,t){let n=++this.run;this.loading.set(!0);let r=await vT(e,`analog-content-preview`,t);n===this.run&&(this.data.set(r),this.loading.set(!1))}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-analog-content-preview`]],inputs:{rpc:[1,`rpc`],file:[1,`file`],schema:[1,`schema`]},outputs:{closed:`closed`},decls:11,vars:2,consts:[[`aria-labelledby`,`content-preview-heading`,1,`card`],[1,`row`,`head`],[`id`,`content-preview-heading`],[1,`file`,`grow`],[`type`,`button`,1,`btn`,`ghost`,3,`click`],[`role`,`status`,1,`muted`],[`data-tone`,`bad`,`role`,`alert`,1,`note`],[`data-tone`,`bad`,`role`,`status`,1,`note`],[1,`muted`,`small`],[1,`facts`],[`role`,`region`,`tabindex`,`0`,1,`md`],[1,`muted`],[1,`plain`],[1,`mono`],[1,`md-heading`],[1,`code`],[3,`parts`]],template:function(e,t){if(e&1&&(F(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Preview`),I(),F(4,`span`,3),K(5),I(),F(6,`button`,4),H(`click`,function(){return t.closed.emit()}),K(7,`Close preview`),I()(),A(8,N4,2,1,`p`,5)(9,$4,9,6)(10,e3,2,1,`p`,6),I()),e&2){let e;D(5),q(t.file()),D(3),j(t.loading()?8:(e=t.data())?9:10,e)}},dependencies:[t3],styles:[`h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%] { display: flex; gap: 8px; @@ -19223,7 +19237,7 @@ hr[_ngcontent-%COMP%] { width: 100%; border: none; border-top: 1px solid var(--%NS%border); -}`]})},Q4=(e,t)=>t.id,$4=(e,t)=>t.key,e3=(e,t)=>t.from+t.name,t3=(e,t)=>t.path,n3=(e,t)=>t.name,r3=(e,t)=>t.file;function i3(e,t){e&1&&(R(0,`p`,2),K(1,`Reading the runtime config…`),z())}function a3(e,t){if(e&1){let e=B();R(0,`div`,3)(1,`p`),K(2,`Could not read the runtime config.`),z(),R(3,`button`,4),U(`click`,function(){return C(e),w(W().reload())}),K(4,`Retry`),z()()}}function o3(e,t){e&1&&(R(0,`span`,11),K(1,`masked`),z())}function s3(e,t){e&1&&(R(0,`span`,11),K(1,`code`),z())}function c3(e,t){if(e&1&&(R(0,`tr`)(1,`td`,10),K(2),z(),R(3,`td`,10),K(4),A(5,o3,2,0,`span`,11),A(6,s3,2,0,`span`,11),z(),R(7,`td`,12),K(8),z()()),e&2){let e=t.$implicit;D(2),q(e.key),D(2),J(` `,e.value,` `),D(),j(e.masked?5:-1),D(),j(e.expression?6:-1),D(2),q(e.from)}}function l3(e,t){if(e&1&&(R(0,`div`,8)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,9),K(5,`Key`),z(),R(6,`th`,9),K(7,`Value`),z(),R(8,`th`,9),K(9,`From`),z()()(),R(10,`tbody`),M(11,c3,9,5,`tr`,null,$4),z()()()),e&2){let e=W().$implicit;k(`aria-label`,e.title+` values`),D(11),N(e.values)}}function u3(e,t){if(e&1&&(R(0,`p`,1),K(1),z()),e&2){let e=W().$implicit;D(),q(e.empty)}}function d3(e,t){if(e&1&&(R(0,`section`,5)(1,`h2`,7),K(2),z(),A(3,l3,13,1,`div`,8)(4,u3,2,1,`p`,1),z()),e&2){let e=t.$implicit;k(`aria-labelledby`,`runtime-`+e.id),D(),V(`id`,`runtime-`+e.id),D(),q(e.title),D(),j(e.values.length?3:4)}}function f3(e,t){if(e&1&&(R(0,`span`,15),K(1),z()),e&2){let e=t.$implicit;D(),q(e)}}function p3(e,t){e&1&&(R(0,`span`,12),K(1,`none under src/server/plugins`),z())}function m3(e,t){if(e&1&&(R(0,`span`,15),K(1),z()),e&2){let e=t.$implicit;D(),__(``,e.name,`: `,e.driver??`computed`,``,e.from===`devStorage`?` (dev)`:``)}}function h3(e,t){e&1&&(R(0,`span`,12),K(1,`no mounts in nitro.storage or nitro.devStorage`),z())}function g3(e,t){if(e&1&&(R(0,`span`,15),K(1),z()),e&2){let e=t.$implicit;D(),Y(``,e.path,` · `,e.rule)}}function _3(e,t){e&1&&(R(0,`span`,12),K(1,`no isr, swr or cache rule`),z())}function v3(e,t){if(e&1){let e=B();R(0,`div`,29)(1,`p`,7),K(2),z(),R(3,`label`,31),K(4,`Payload (JSON, optional)`),z(),R(5,`textarea`,32),U(`input`,function(t){return C(e),w(W(5).taskPayload.set(t.target.value))}),z(),R(6,`div`,26)(7,`button`,33),U(`click`,function(){C(e);let t=W().$implicit;return w(W(4).runTask(t.name))}),K(8,` Run task `),z(),R(9,`button`,4),U(`click`,function(){return C(e),w(W(5).taskConfirm.set(null))}),K(10,` Cancel `),z()()()}if(e&2){let e=W(),t=e.$implicit,n=e.$index,r=W(4);k(`aria-labelledby`,`task-confirm-`+n),D(),V(`id`,`task-confirm-`+n),D(),J(` Run `,t.name,` on the dev server? A task can change data. `),D(),V(`htmlFor`,`task-payload-`+n),D(2),V(`id`,`task-payload-`+n)(`value`,r.taskPayload()),D(2),V(`disabled`,r.runningTask()!==null)}}function y3(e,t){if(e&1&&(R(0,`span`,34),K(1),z()),e&2){let e=W();k(`data-status`,e.ok?`good`:`bad`),D(),q(e.status)}}function b3(e,t){if(e&1&&(R(0,`span`,35),K(1),z()),e&2){let e=W();D(),J(` `,e.ms,` ms`)}}function x3(e,t){if(e&1&&(R(0,`span`),K(1),z()),e&2){let e=W();D(),J(` `,e.error)}}function S3(e,t){if(e&1&&(R(0,`pre`,36),K(1),z()),e&2){let e=W();D(),q(e.output)}}function C3(e,t){if(e&1&&(R(0,`div`,30)(1,`p`),A(2,y3,2,2,`span`,34),A(3,b3,2,1,`span`,35),A(4,x3,2,1,`span`),z(),A(5,S3,2,1,`pre`,36),z()),e&2){let e=t;D(2),j(e.status===void 0?-1:2),D(),j(e.ms===void 0?-1:3),D(),j(e.error?4:-1),D(),j(e.output?5:-1)}}function w3(e,t){if(e&1){let e=B();R(0,`li`)(1,`div`,26)(2,`span`,10),K(3),z(),R(4,`span`,27),K(5),z(),R(6,`button`,28),U(`click`,function(){let t=C(e).$implicit;return w(W(4).askTask(t.name))}),K(7),z()(),A(8,v3,11,7,`div`,29),A(9,C3,6,4,`div`,30),z()}if(e&2){let e,n=t.$implicit,r=W(4);D(3),q(n.name),D(2),q(n.file),D(),V(`disabled`,!r.canPurge()||r.runningTask()!==null),k(`aria-describedby`,r.canPurge()?null:`nitro-purge-off`)(`aria-label`,`Run the task `+n.name),D(),J(` `,r.runningTask()===n.name?`Running…`:`Run`,` `),D(),j(r.taskConfirm()===n.name?8:-1),D(),j((e=r.taskResults()[n.name])?9:-1,e)}}function T3(e,t){if(e&1&&(R(0,`ul`,17),M(1,w3,10,8,`li`,null,n3),z()),e&2){let e=W();D(),N(e.tasks)}}function E3(e,t){e&1&&(R(0,`p`,12),K(1,`No tasks under src/server/tasks.`),z())}function D3(e,t){if(e&1){let e=B();R(0,`button`,37),U(`click`,function(){return C(e),w(W(3).ask(null))}),K(1,` Purge all `),z()}if(e&2){let e=W(3);V(`disabled`,!e.canPurge()||e.purging()),k(`aria-describedby`,e.canPurge()?null:`nitro-purge-off`)}}function O3(e,t){if(e&1&&(R(0,`p`,21),K(1),z()),e&2){let e=W(3);D(),q(e.purgeOff)}}function k3(e,t){if(e&1){let e=B();R(0,`div`,22)(1,`p`,38),K(2),z(),R(3,`div`,26)(4,`button`,39),U(`click`,function(){let t=C(e);return w(W(3).purge(t))}),K(5,` Delete `),z(),R(6,`button`,4),U(`click`,function(){return C(e),w(W(3).confirming.set(null))}),K(7,` Cancel `),z()()()}if(e&2){let e=t;D(2),J(` Delete `,e.length===1?`this cache entry`:e.length+` cache entries`,`? The next request renders those routes again. `)}}function A3(e,t){if(e&1){let e=B();R(0,`tr`)(1,`td`,42),K(2),z(),R(3,`td`),K(4),z(),R(5,`td`,43),K(6),z(),R(7,`td`,43)(8,`button`,28),U(`click`,function(){let t=C(e).$implicit;return w(W(4).ask([t.file]))}),K(9,` Purge `),z()()()}if(e&2){let e=t.$implicit,n=W(4);D(),V(`title`,e.file),D(),q(e.key),D(2),q(e.group),D(2),q(n.size(e.size)),D(2),V(`disabled`,!n.canPurge()||n.purging()),k(`aria-label`,`Purge `+e.key)}}function j3(e,t){if(e&1&&(R(0,`div`,24)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,9),K(5,`Key`),z(),R(6,`th`,9),K(7,`Group`),z(),R(8,`th`,40),K(9,`Size`),z(),R(10,`th`,9)(11,`span`,41),K(12,`Actions`),z()()()(),R(13,`tbody`),M(14,A3,10,6,`tr`,null,r3),z()()()),e&2){let e=W();D(14),N(e.entries)}}function M3(e,t){e&1&&K(0),e&2&&J(` The cache folders (`,W(2).cacheDirs.join(`, `),`) hold no entries yet. `)}function N3(e,t){e&1&&K(0,` No Nitro cache folder in the project. `)}function P3(e,t){if(e&1&&(R(0,`p`,1),A(1,M3,1,1)(2,N3,1,0),z()),e&2){let e=W();D(),j(e.cacheDirs.length?1:2)}}function F3(e,t){if(e&1&&(R(0,`p`,25),K(1),z()),e&2){let e=t.$implicit;D(),q(e)}}function I3(e,t){if(e&1&&(R(0,`section`,6)(1,`h2`,13),K(2,`Nitro`),z(),R(3,`dl`,14)(4,`dt`),K(5,`Plugins`),z(),R(6,`dd`),M(7,f3,2,1,`span`,15,Yh,!1,p3,2,0,`span`,12),z(),R(10,`dt`),K(11,`Storage`),z(),R(12,`dd`),M(13,m3,2,3,`span`,15,e3,!1,h3,2,0,`span`,12),z(),R(16,`dt`),K(17,`Cached routes`),z(),R(18,`dd`),M(19,g3,2,2,`span`,15,t3,!1,_3,2,0,`span`,12),z()(),R(22,`h3`,16),K(23),z(),A(24,T3,3,0,`ul`,17)(25,E3,2,0,`p`,12),R(26,`div`,18)(27,`h3`,19),K(28),z(),A(29,D3,2,2,`button`,20),z(),A(30,O3,2,1,`p`,21),A(31,k3,8,1,`div`,22),R(32,`p`,23),K(33),z(),A(34,j3,16,0,`div`,24)(35,P3,3,1,`p`,1),M(36,F3,2,1,`p`,25,Yh),z()),e&2){let e,n=t,r=W(2);D(7),N(n.plugins),D(6),N(n.storage),D(6),N(n.cachedRules),D(4),J(`Tasks (`,n.tasks.length,`)`),D(),j(n.tasks.length?24:25),D(4),J(`Cache entries on disk (`,n.entries.length,`)`),D(),j(n.entries.length?29:-1),D(),j(r.canPurge()?-1:30),D(),j((e=r.confirming())?31:-1,e),D(2),q(r.message()),D(),j(n.entries.length?34:35),D(2),N(n.notes)}}function L3(e,t){if(e&1&&(M(0,d3,5,4,`section`,5,Q4),A(2,I3,38,11,`section`,6)),e&2){let e,t=W();N(t.sections()),D(2),j((e=t.nitro())?2:-1,e)}}var R3=class e{rpc=$(null);config=E(null);injector=S(gs);nitro=E(null);loading=E(!0);failed=E(!1);purging=E(!1);message=E(``);confirming=E(null);taskConfirm=E(null);taskPayload=E(``);runningTask=E(null);taskResults=E({});canPurge=X(()=>IT(this.rpc(),`analog`));purgeOff=Uw(`analog`);size=L2;sections=X(()=>{let e=this.config();return e?[{id:`env`,title:`import.meta.env`,values:e.env,empty:`No VITE_ or ANALOG_ keys in the .env files.`},{id:`runtime-config`,title:`Nitro runtimeConfig`,values:e.runtimeConfig,empty:`No nitro.runtimeConfig in ${e.configFile??`vite.config`}.`},{id:`options`,title:`analog() options`,values:e.options,empty:``}]:[]});constructor(){ac(()=>{let e=this.rpc();Z(()=>void this.fetch(e))})}reload(){this.fetch(this.rpc())}async fetch(e){this.loading.set(!0);let[t,n]=await Promise.all([vT(e,`analog-runtime-config`),vT(e,`analog-nitro`)]);this.config.set(t),this.nitro.set(n),this.failed.set(!t),this.loading.set(!1)}askTask(e){this.taskConfirm.set(e),this.taskPayload.set(``),this.focusAfterRender(`task-run-confirm`)}async runTask(e){if(this.runningTask()!==null)return;let t;if(this.taskPayload().trim())try{t=JSON.parse(this.taskPayload())}catch{this.taskResults.update(t=>({...t,[e]:{ok:!1,name:e,error:`The payload is not valid JSON.`}}));return}this.taskConfirm.set(null),this.runningTask.set(e);try{let n=await vT(this.rpc(),`analog-run-nitro-task`,{name:e,payload:t,confirm:!0});this.taskResults.update(t=>({...t,[e]:n??{ok:!1,name:e,error:`No answer from the devtools server.`}}))}finally{this.runningTask.set(null)}}focusAfterRender(e){ed(()=>document.getElementById(e)?.focus(),{injector:this.injector})}ask(e){let t=this.nitro()?.entries.map(e=>e.file)??[];this.confirming.set(e??t),this.message.set(``),this.focusAfterRender(`nitro-confirm`)}async purge(e){this.purging.set(!0),this.confirming.set(null);try{let t=e.length===(this.nitro()?.entries.length??-1),n=await vT(this.rpc(),`analog-nitro-purge`,{files:t?void 0:e,confirm:!0});n?.ok?this.message.set(`Deleted ${n.removed} cache entr${n.removed===1?`y`:`ies`}.`):this.message.set(n?.error??`Could not purge the cache.`),this.nitro.set(await vT(this.rpc(),`analog-nitro`))}finally{this.purging.set(!1)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-analog-runtime`]],inputs:{rpc:[1,`rpc`]},decls:9,vars:1,consts:[[1,`stack`],[1,`muted`],[`role`,`status`,1,`muted`],[`data-tone`,`bad`,`role`,`alert`,1,`note`],[`type`,`button`,1,`btn`,`ghost`,3,`click`],[1,`card`],[`aria-labelledby`,`runtime-nitro`,1,`card`],[3,`id`],[`role`,`region`,`tabindex`,`0`,1,`table-wrap`],[`scope`,`col`],[1,`mono`,`path`],[1,`pill`],[1,`muted`,`small`],[`id`,`runtime-nitro`],[1,`facts`],[1,`chip`,`mono`],[`id`,`nitro-tasks-heading`],[`aria-labelledby`,`nitro-tasks-heading`,1,`tasks`],[1,`row`,`head`],[`id`,`nitro-cache-heading`],[`type`,`button`,1,`btn`,`ghost`,`danger`,3,`disabled`],[`id`,`nitro-purge-off`,1,`muted`,`small`],[`role`,`alertdialog`,`aria-labelledby`,`nitro-confirm-text`,1,`note`,`confirm`],[`role`,`status`,1,`muted`,`small`],[`role`,`region`,`aria-labelledby`,`nitro-cache-heading`,`tabindex`,`0`,1,`table-wrap`],[1,`note`],[1,`row`],[1,`muted`,`small`,`file`,`grow`],[`type`,`button`,1,`btn`,`ghost`,3,`click`,`disabled`],[`role`,`alertdialog`,1,`note`,`confirm`],[`role`,`status`,1,`task-result`],[1,`label`,3,`for`],[`rows`,`2`,`placeholder`,`{"dryRun": true}`,1,`field`,`mono`,3,`input`,`id`,`value`],[`type`,`button`,`id`,`task-run-confirm`,1,`btn`,`primary`,3,`click`,`disabled`],[1,`status`],[1,`muted`,`small`,`tnum`],[1,`code`],[`type`,`button`,1,`btn`,`ghost`,`danger`,3,`click`,`disabled`],[`id`,`nitro-confirm-text`],[`type`,`button`,`id`,`nitro-confirm`,1,`btn`,`danger`,3,`click`],[`scope`,`col`,1,`num`],[1,`sr-only`],[1,`mono`,`path`,3,`title`],[1,`num`]],template:function(e,t){e&1&&(R(0,`div`,0)(1,`p`,1),K(2,` What the app reads at runtime and what Nitro keeps between requests. Secret names, tokens and the names in `),R(3,`code`),K(4,`redaction.secretNames`),z(),K(5,` are masked. `),z(),A(6,i3,2,0,`p`,2)(7,a3,5,0,`div`,3)(8,L3,3,1),z()),e&2&&(D(6),j(t.loading()&&!t.config()?6:t.failed()?7:8))},styles:[`h2[_ngcontent-%COMP%], +}`]})},r3=(e,t)=>t.id,i3=(e,t)=>t.key,a3=(e,t)=>t.from+t.name,o3=(e,t)=>t.path,s3=(e,t)=>t.name,c3=(e,t)=>t.file;function l3(e,t){e&1&&(R(0,`p`,2),K(1,`Reading the runtime config…`),z())}function u3(e,t){if(e&1){let e=B();R(0,`div`,3)(1,`p`),K(2,`Could not read the runtime config.`),z(),R(3,`button`,4),U(`click`,function(){return C(e),w(W().reload())}),K(4,`Retry`),z()()}}function d3(e,t){e&1&&(R(0,`span`,11),K(1,`masked`),z())}function f3(e,t){e&1&&(R(0,`span`,11),K(1,`code`),z())}function p3(e,t){if(e&1&&(R(0,`tr`)(1,`td`,10),K(2),z(),R(3,`td`,10),K(4),A(5,d3,2,0,`span`,11),A(6,f3,2,0,`span`,11),z(),R(7,`td`,12),K(8),z()()),e&2){let e=t.$implicit;D(2),q(e.key),D(2),J(` `,e.value,` `),D(),j(e.masked?5:-1),D(),j(e.expression?6:-1),D(2),q(e.from)}}function m3(e,t){if(e&1&&(R(0,`div`,8)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,9),K(5,`Key`),z(),R(6,`th`,9),K(7,`Value`),z(),R(8,`th`,9),K(9,`From`),z()()(),R(10,`tbody`),M(11,p3,9,5,`tr`,null,i3),z()()()),e&2){let e=W().$implicit;k(`aria-label`,e.title+` values`),D(11),N(e.values)}}function h3(e,t){if(e&1&&(R(0,`p`,1),K(1),z()),e&2){let e=W().$implicit;D(),q(e.empty)}}function g3(e,t){if(e&1&&(R(0,`section`,5)(1,`h2`,7),K(2),z(),A(3,m3,13,1,`div`,8)(4,h3,2,1,`p`,1),z()),e&2){let e=t.$implicit;k(`aria-labelledby`,`runtime-`+e.id),D(),V(`id`,`runtime-`+e.id),D(),q(e.title),D(),j(e.values.length?3:4)}}function _3(e,t){if(e&1&&(R(0,`span`,15),K(1),z()),e&2){let e=t.$implicit;D(),q(e)}}function v3(e,t){e&1&&(R(0,`span`,12),K(1,`none under src/server/plugins`),z())}function y3(e,t){if(e&1&&(R(0,`span`,15),K(1),z()),e&2){let e=t.$implicit;D(),y_(``,e.name,`: `,e.driver??`computed`,``,e.from===`devStorage`?` (dev)`:``)}}function b3(e,t){e&1&&(R(0,`span`,12),K(1,`no mounts in nitro.storage or nitro.devStorage`),z())}function x3(e,t){if(e&1&&(R(0,`span`,15),K(1),z()),e&2){let e=t.$implicit;D(),Y(``,e.path,` · `,e.rule)}}function S3(e,t){e&1&&(R(0,`span`,12),K(1,`no isr, swr or cache rule`),z())}function C3(e,t){if(e&1){let e=B();R(0,`div`,29)(1,`p`,7),K(2),z(),R(3,`label`,31),K(4,`Payload (JSON, optional)`),z(),R(5,`textarea`,32),U(`input`,function(t){return C(e),w(W(5).taskPayload.set(t.target.value))}),z(),R(6,`div`,26)(7,`button`,33),U(`click`,function(){C(e);let t=W().$implicit;return w(W(4).runTask(t.name))}),K(8,` Run task `),z(),R(9,`button`,4),U(`click`,function(){return C(e),w(W(5).taskConfirm.set(null))}),K(10,` Cancel `),z()()()}if(e&2){let e=W(),t=e.$implicit,n=e.$index,r=W(4);k(`aria-labelledby`,`task-confirm-`+n),D(),V(`id`,`task-confirm-`+n),D(),J(` Run `,t.name,` on the dev server? A task can change data. `),D(),V(`htmlFor`,`task-payload-`+n),D(2),V(`id`,`task-payload-`+n)(`value`,r.taskPayload()),D(2),V(`disabled`,r.runningTask()!==null)}}function w3(e,t){if(e&1&&(R(0,`span`,34),K(1),z()),e&2){let e=W();k(`data-status`,e.ok?`good`:`bad`),D(),q(e.status)}}function T3(e,t){if(e&1&&(R(0,`span`,35),K(1),z()),e&2){let e=W();D(),J(` `,e.ms,` ms`)}}function E3(e,t){if(e&1&&(R(0,`span`),K(1),z()),e&2){let e=W();D(),J(` `,e.error)}}function D3(e,t){if(e&1&&(R(0,`pre`,36),K(1),z()),e&2){let e=W();D(),q(e.output)}}function O3(e,t){if(e&1&&(R(0,`div`,30)(1,`p`),A(2,w3,2,2,`span`,34),A(3,T3,2,1,`span`,35),A(4,E3,2,1,`span`),z(),A(5,D3,2,1,`pre`,36),z()),e&2){let e=t;D(2),j(e.status===void 0?-1:2),D(),j(e.ms===void 0?-1:3),D(),j(e.error?4:-1),D(),j(e.output?5:-1)}}function k3(e,t){if(e&1){let e=B();R(0,`li`)(1,`div`,26)(2,`span`,10),K(3),z(),R(4,`span`,27),K(5),z(),R(6,`button`,28),U(`click`,function(){let t=C(e).$implicit;return w(W(4).askTask(t.name))}),K(7),z()(),A(8,C3,11,7,`div`,29),A(9,O3,6,4,`div`,30),z()}if(e&2){let e,n=t.$implicit,r=W(4);D(3),q(n.name),D(2),q(n.file),D(),V(`disabled`,!r.canPurge()||r.runningTask()!==null),k(`aria-describedby`,r.canPurge()?null:`nitro-purge-off`)(`aria-label`,`Run the task `+n.name),D(),J(` `,r.runningTask()===n.name?`Running…`:`Run`,` `),D(),j(r.taskConfirm()===n.name?8:-1),D(),j((e=r.taskResults()[n.name])?9:-1,e)}}function A3(e,t){if(e&1&&(R(0,`ul`,17),M(1,k3,10,8,`li`,null,s3),z()),e&2){let e=W();D(),N(e.tasks)}}function j3(e,t){e&1&&(R(0,`p`,12),K(1,`No tasks under src/server/tasks.`),z())}function M3(e,t){if(e&1){let e=B();R(0,`button`,37),U(`click`,function(){return C(e),w(W(3).ask(null))}),K(1,` Purge all `),z()}if(e&2){let e=W(3);V(`disabled`,!e.canPurge()||e.purging()),k(`aria-describedby`,e.canPurge()?null:`nitro-purge-off`)}}function N3(e,t){if(e&1&&(R(0,`p`,21),K(1),z()),e&2){let e=W(3);D(),q(e.purgeOff)}}function P3(e,t){if(e&1){let e=B();R(0,`div`,22)(1,`p`,38),K(2),z(),R(3,`div`,26)(4,`button`,39),U(`click`,function(){let t=C(e);return w(W(3).purge(t))}),K(5,` Delete `),z(),R(6,`button`,4),U(`click`,function(){return C(e),w(W(3).confirming.set(null))}),K(7,` Cancel `),z()()()}if(e&2){let e=t;D(2),J(` Delete `,e.length===1?`this cache entry`:e.length+` cache entries`,`? The next request renders those routes again. `)}}function F3(e,t){if(e&1){let e=B();R(0,`tr`)(1,`td`,42),K(2),z(),R(3,`td`),K(4),z(),R(5,`td`,43),K(6),z(),R(7,`td`,43)(8,`button`,28),U(`click`,function(){let t=C(e).$implicit;return w(W(4).ask([t.file]))}),K(9,` Purge `),z()()()}if(e&2){let e=t.$implicit,n=W(4);D(),V(`title`,e.file),D(),q(e.key),D(2),q(e.group),D(2),q(n.size(e.size)),D(2),V(`disabled`,!n.canPurge()||n.purging()),k(`aria-label`,`Purge `+e.key)}}function I3(e,t){if(e&1&&(R(0,`div`,24)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,9),K(5,`Key`),z(),R(6,`th`,9),K(7,`Group`),z(),R(8,`th`,40),K(9,`Size`),z(),R(10,`th`,9)(11,`span`,41),K(12,`Actions`),z()()()(),R(13,`tbody`),M(14,F3,10,6,`tr`,null,c3),z()()()),e&2){let e=W();D(14),N(e.entries)}}function L3(e,t){e&1&&K(0),e&2&&J(` The cache folders (`,W(2).cacheDirs.join(`, `),`) hold no entries yet. `)}function R3(e,t){e&1&&K(0,` No Nitro cache folder in the project. `)}function z3(e,t){if(e&1&&(R(0,`p`,1),A(1,L3,1,1)(2,R3,1,0),z()),e&2){let e=W();D(),j(e.cacheDirs.length?1:2)}}function B3(e,t){if(e&1&&(R(0,`p`,25),K(1),z()),e&2){let e=t.$implicit;D(),q(e)}}function V3(e,t){if(e&1&&(R(0,`section`,6)(1,`h2`,13),K(2,`Nitro`),z(),R(3,`dl`,14)(4,`dt`),K(5,`Plugins`),z(),R(6,`dd`),M(7,_3,2,1,`span`,15,Xh,!1,v3,2,0,`span`,12),z(),R(10,`dt`),K(11,`Storage`),z(),R(12,`dd`),M(13,y3,2,3,`span`,15,a3,!1,b3,2,0,`span`,12),z(),R(16,`dt`),K(17,`Cached routes`),z(),R(18,`dd`),M(19,x3,2,2,`span`,15,o3,!1,S3,2,0,`span`,12),z()(),R(22,`h3`,16),K(23),z(),A(24,A3,3,0,`ul`,17)(25,j3,2,0,`p`,12),R(26,`div`,18)(27,`h3`,19),K(28),z(),A(29,M3,2,2,`button`,20),z(),A(30,N3,2,1,`p`,21),A(31,P3,8,1,`div`,22),R(32,`p`,23),K(33),z(),A(34,I3,16,0,`div`,24)(35,z3,3,1,`p`,1),M(36,B3,2,1,`p`,25,Xh),z()),e&2){let e,n=t,r=W(2);D(7),N(n.plugins),D(6),N(n.storage),D(6),N(n.cachedRules),D(4),J(`Tasks (`,n.tasks.length,`)`),D(),j(n.tasks.length?24:25),D(4),J(`Cache entries on disk (`,n.entries.length,`)`),D(),j(n.entries.length?29:-1),D(),j(r.canPurge()?-1:30),D(),j((e=r.confirming())?31:-1,e),D(2),q(r.message()),D(),j(n.entries.length?34:35),D(2),N(n.notes)}}function H3(e,t){if(e&1&&(M(0,g3,5,4,`section`,5,r3),A(2,V3,38,11,`section`,6)),e&2){let e,t=W();N(t.sections()),D(2),j((e=t.nitro())?2:-1,e)}}var U3=class e{rpc=$(null);config=E(null);injector=S(gs);nitro=E(null);loading=E(!0);failed=E(!1);purging=E(!1);message=E(``);confirming=E(null);taskConfirm=E(null);taskPayload=E(``);runningTask=E(null);taskResults=E({});canPurge=X(()=>IT(this.rpc(),`analog`));purgeOff=Uw(`analog`);size=H2;sections=X(()=>{let e=this.config();return e?[{id:`env`,title:`import.meta.env`,values:e.env,empty:`No VITE_ or ANALOG_ keys in the .env files.`},{id:`runtime-config`,title:`Nitro runtimeConfig`,values:e.runtimeConfig,empty:`No nitro.runtimeConfig in ${e.configFile??`vite.config`}.`},{id:`options`,title:`analog() options`,values:e.options,empty:``}]:[]});constructor(){ac(()=>{let e=this.rpc();Z(()=>void this.fetch(e))})}reload(){this.fetch(this.rpc())}async fetch(e){this.loading.set(!0);let[t,n]=await Promise.all([vT(e,`analog-runtime-config`),vT(e,`analog-nitro`)]);this.config.set(t),this.nitro.set(n),this.failed.set(!t),this.loading.set(!1)}askTask(e){this.taskConfirm.set(e),this.taskPayload.set(``),this.focusAfterRender(`task-run-confirm`)}async runTask(e){if(this.runningTask()!==null)return;let t;if(this.taskPayload().trim())try{t=JSON.parse(this.taskPayload())}catch{this.taskResults.update(t=>({...t,[e]:{ok:!1,name:e,error:`The payload is not valid JSON.`}}));return}this.taskConfirm.set(null),this.runningTask.set(e);try{let n=await vT(this.rpc(),`analog-run-nitro-task`,{name:e,payload:t,confirm:!0});this.taskResults.update(t=>({...t,[e]:n??{ok:!1,name:e,error:`No answer from the devtools server.`}}))}finally{this.runningTask.set(null)}}focusAfterRender(e){td(()=>document.getElementById(e)?.focus(),{injector:this.injector})}ask(e){let t=this.nitro()?.entries.map(e=>e.file)??[];this.confirming.set(e??t),this.message.set(``),this.focusAfterRender(`nitro-confirm`)}async purge(e){this.purging.set(!0),this.confirming.set(null);try{let t=e.length===(this.nitro()?.entries.length??-1),n=await vT(this.rpc(),`analog-nitro-purge`,{files:t?void 0:e,confirm:!0});n?.ok?this.message.set(`Deleted ${n.removed} cache entr${n.removed===1?`y`:`ies`}.`):this.message.set(n?.error??`Could not purge the cache.`),this.nitro.set(await vT(this.rpc(),`analog-nitro`))}finally{this.purging.set(!1)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-analog-runtime`]],inputs:{rpc:[1,`rpc`]},decls:9,vars:1,consts:[[1,`stack`],[1,`muted`],[`role`,`status`,1,`muted`],[`data-tone`,`bad`,`role`,`alert`,1,`note`],[`type`,`button`,1,`btn`,`ghost`,3,`click`],[1,`card`],[`aria-labelledby`,`runtime-nitro`,1,`card`],[3,`id`],[`role`,`region`,`tabindex`,`0`,1,`table-wrap`],[`scope`,`col`],[1,`mono`,`path`],[1,`pill`],[1,`muted`,`small`],[`id`,`runtime-nitro`],[1,`facts`],[1,`chip`,`mono`],[`id`,`nitro-tasks-heading`],[`aria-labelledby`,`nitro-tasks-heading`,1,`tasks`],[1,`row`,`head`],[`id`,`nitro-cache-heading`],[`type`,`button`,1,`btn`,`ghost`,`danger`,3,`disabled`],[`id`,`nitro-purge-off`,1,`muted`,`small`],[`role`,`alertdialog`,`aria-labelledby`,`nitro-confirm-text`,1,`note`,`confirm`],[`role`,`status`,1,`muted`,`small`],[`role`,`region`,`aria-labelledby`,`nitro-cache-heading`,`tabindex`,`0`,1,`table-wrap`],[1,`note`],[1,`row`],[1,`muted`,`small`,`file`,`grow`],[`type`,`button`,1,`btn`,`ghost`,3,`click`,`disabled`],[`role`,`alertdialog`,1,`note`,`confirm`],[`role`,`status`,1,`task-result`],[1,`label`,3,`for`],[`rows`,`2`,`placeholder`,`{"dryRun": true}`,1,`field`,`mono`,3,`input`,`id`,`value`],[`type`,`button`,`id`,`task-run-confirm`,1,`btn`,`primary`,3,`click`,`disabled`],[1,`status`],[1,`muted`,`small`,`tnum`],[1,`code`],[`type`,`button`,1,`btn`,`ghost`,`danger`,3,`click`,`disabled`],[`id`,`nitro-confirm-text`],[`type`,`button`,`id`,`nitro-confirm`,1,`btn`,`danger`,3,`click`],[`scope`,`col`,1,`num`],[1,`sr-only`],[1,`mono`,`path`,3,`title`],[1,`num`]],template:function(e,t){e&1&&(R(0,`div`,0)(1,`p`,1),K(2,` What the app reads at runtime and what Nitro keeps between requests. Secret names, tokens and the names in `),R(3,`code`),K(4,`redaction.secretNames`),z(),K(5,` are masked. `),z(),A(6,l3,2,0,`p`,2)(7,u3,5,0,`div`,3)(8,H3,3,1),z()),e&2&&(D(6),j(t.loading()&&!t.config()?6:t.failed()?7:8))},styles:[`h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%] { display: flex; gap: 8px; @@ -19616,7 +19630,7 @@ code[_ngcontent-%COMP%] { border-radius: 4px; font-family: var(--%NS%mono); font-size: 12px; -}`]})},z3=(e,t)=>t.id;function B3(e,t){if(e&1&&(R(0,`p`,9),K(1),z()),e&2){let e=W();D(),J(`Transforming `,e.file(),`…`)}}function V3(e,t){if(e&1&&(R(0,`p`,10),K(1),z()),e&2){let e=W();D(),q(e.error)}}function H3(e,t){if(e&1&&(R(0,`p`,11)(1,`a`,13),K(2,`Open in vite-plugin-inspect`),z()()),e&2){let e=W();D(),V(`href`,e.inspectUrl,yu)}}function U3(e,t){e&1&&(R(0,`p`,8),K(1,`Clipped to the first 20,000 characters.`),z())}function W3(e,t){if(e&1&&(R(0,`li`)(1,`details`)(2,`summary`)(3,`span`,15),K(4),z(),R(5,`span`,16),K(6),z()(),R(7,`pre`,17),K(8),z(),A(9,U3,2,0,`p`,8),z()()),e&2){let e=t.$implicit;D(4),q(e.plugin),D(2),Y(``,e.ms,` ms · `,e.size,` chars`),D(2),q(e.code),D(),j(e.truncated?9:-1)}}function G3(e,t){if(e&1&&(R(0,`p`,8),K(1),z()),e&2){let e=W(3);D(),J(``,e.unchanged(),` more plugins ran without changing it.`)}}function K3(e,t){if(e&1&&(R(0,`ol`,14),M(1,W3,10,5,`li`,null,Jh),z(),A(3,G3,2,1,`p`,8)),e&2){let e=W(2);D(),N(e.changed()),D(2),j(e.unchanged()?3:-1)}}function q3(e,t){e&1&&(R(0,`p`,12),K(1,`No plugin changed this file.`),z())}function J3(e,t){if(e&1&&(R(0,`li`)(1,`span`,15),K(2),z(),R(3,`span`,19),K(4),z(),R(5,`span`,20),K(6),z()()),e&2){let e=t.$implicit;D(2),q(e.name),D(2),q(e.id),D(),k(`data-tone`,e.found?`good`:`warn`),D(),q(e.found?`in the output`:`not in the output`)}}function Y3(e,t){if(e&1&&(R(0,`div`)(1,`h3`),K(2,`Server function ids`),z(),R(3,`ul`,18),M(4,J3,7,4,`li`,null,z3),z()()),e&2){let e=W(2);D(4),N(e.ids())}}function X3(e,t){if(e&1&&(R(0,`details`)(1,`summary`),K(2,`Code Vite serves`),z(),R(3,`pre`,17),K(4),z()()),e&2){let e=W();D(4),q(e.code)}}function Z3(e,t){if(e&1&&(A(0,V3,2,1,`p`,10),A(1,H3,3,1,`p`,11),A(2,K3,4,1)(3,q3,2,0,`p`,12),A(4,Y3,6,0,`div`),A(5,X3,5,1,`details`)),e&2){let e=t,n=W();j(e.error?0:-1),D(),j(e.inspectUrl?1:-1),D(),j(n.changed().length?2:e.error?-1:3),D(2),j(n.ids().length?4:-1),D(),j(e.code?5:-1)}}var Q3=class e{rpc=$(null);file=$.required();serverFns=$([]);closed=Q_();ssr=E(!1);trace=E(null);loading=E(!0);changed=X(()=>(this.trace()?.steps??[]).filter(e=>e.changed));unchanged=X(()=>(this.trace()?.steps.length??0)-this.changed().length);ids=X(()=>{let e=this.trace();return e?this.serverFns().filter(t=>t.file===e.file).map(t=>({...t,found:e.code.includes(t.id)})):[]});run=0;constructor(){ac(()=>{let e=this.file(),t=this.ssr();Z(()=>void this.fetch(e,t))})}reload(){this.fetch(this.file(),this.ssr())}async fetch(e,t){let n=++this.run;this.loading.set(!0);let r=await vT(this.rpc(),`analog-transform`,{file:e,ssr:t});n===this.run&&(this.trace.set(r??{file:e,ssr:t,steps:[],code:``,error:`No answer from the devtools server.`}),this.loading.set(!1))}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-analog-transform`]],inputs:{rpc:[1,`rpc`],file:[1,`file`],serverFns:[1,`serverFns`]},outputs:{closed:`closed`},decls:17,vars:4,consts:[[`aria-labelledby`,`transform-heading`,1,`card`],[1,`row`,`head`],[`id`,`transform-heading`],[1,`file`,`grow`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[`type`,`button`,1,`btn`,`ghost`,3,`click`,`disabled`],[`type`,`button`,1,`btn`,`ghost`,3,`click`],[1,`muted`,`small`],[`role`,`status`,1,`muted`],[`data-tone`,`bad`,`role`,`alert`,1,`note`],[1,`small`],[1,`muted`],[`target`,`_blank`,`rel`,`noopener`,3,`href`],[1,`steps`],[1,`mono`],[1,`muted`,`small`,`tnum`],[1,`code`],[1,`plain`],[1,`mono`,`muted`],[1,`pill`]],template:function(e,t){if(e&1&&(R(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Vite transform stack`),z(),R(4,`span`,3),K(5),z(),R(6,`label`,4)(7,`input`,5),U(`change`,function(){return t.ssr.set(!t.ssr())}),z(),K(8,` Server build (SSR)`),z(),R(9,`button`,6),U(`click`,function(){return t.reload()}),K(10,` Run again `),z(),R(11,`button`,7),U(`click`,function(){return t.closed.emit()}),K(12,`Close`),z()(),R(13,`p`,8),K(14,` Transforms the file again on the dev server and lists each plugin that changed it, in order. `),z(),A(15,B3,2,1,`p`,9)(16,Z3,6,5),z()),e&2){let e;D(5),q(t.file()),D(2),V(`checked`,t.ssr()),D(2),V(`disabled`,t.loading()),D(6),j(t.loading()?15:(e=t.trace())?16:-1,e)}},styles:[`h2[_ngcontent-%COMP%], +}`]})},W3=(e,t)=>t.id;function G3(e,t){if(e&1&&(R(0,`p`,9),K(1),z()),e&2){let e=W();D(),J(`Transforming `,e.file(),`…`)}}function K3(e,t){if(e&1&&(R(0,`p`,10),K(1),z()),e&2){let e=W();D(),q(e.error)}}function q3(e,t){if(e&1&&(R(0,`p`,11)(1,`a`,13),K(2,`Open in vite-plugin-inspect`),z()()),e&2){let e=W();D(),V(`href`,e.inspectUrl,bu)}}function J3(e,t){e&1&&(R(0,`p`,8),K(1,`Clipped to the first 20,000 characters.`),z())}function Y3(e,t){if(e&1&&(R(0,`li`)(1,`details`)(2,`summary`)(3,`span`,15),K(4),z(),R(5,`span`,16),K(6),z()(),R(7,`pre`,17),K(8),z(),A(9,J3,2,0,`p`,8),z()()),e&2){let e=t.$implicit;D(4),q(e.plugin),D(2),Y(``,e.ms,` ms · `,e.size,` chars`),D(2),q(e.code),D(),j(e.truncated?9:-1)}}function X3(e,t){if(e&1&&(R(0,`p`,8),K(1),z()),e&2){let e=W(3);D(),J(``,e.unchanged(),` more plugins ran without changing it.`)}}function Z3(e,t){if(e&1&&(R(0,`ol`,14),M(1,Y3,10,5,`li`,null,Yh),z(),A(3,X3,2,1,`p`,8)),e&2){let e=W(2);D(),N(e.changed()),D(2),j(e.unchanged()?3:-1)}}function Q3(e,t){e&1&&(R(0,`p`,12),K(1,`No plugin changed this file.`),z())}function $3(e,t){if(e&1&&(R(0,`li`)(1,`span`,15),K(2),z(),R(3,`span`,19),K(4),z(),R(5,`span`,20),K(6),z()()),e&2){let e=t.$implicit;D(2),q(e.name),D(2),q(e.id),D(),k(`data-tone`,e.found?`good`:`warn`),D(),q(e.found?`in the output`:`not in the output`)}}function e6(e,t){if(e&1&&(R(0,`div`)(1,`h3`),K(2,`Server function ids`),z(),R(3,`ul`,18),M(4,$3,7,4,`li`,null,W3),z()()),e&2){let e=W(2);D(4),N(e.ids())}}function t6(e,t){if(e&1&&(R(0,`details`)(1,`summary`),K(2,`Code Vite serves`),z(),R(3,`pre`,17),K(4),z()()),e&2){let e=W();D(4),q(e.code)}}function n6(e,t){if(e&1&&(A(0,K3,2,1,`p`,10),A(1,q3,3,1,`p`,11),A(2,Z3,4,1)(3,Q3,2,0,`p`,12),A(4,e6,6,0,`div`),A(5,t6,5,1,`details`)),e&2){let e=t,n=W();j(e.error?0:-1),D(),j(e.inspectUrl?1:-1),D(),j(n.changed().length?2:e.error?-1:3),D(2),j(n.ids().length?4:-1),D(),j(e.code?5:-1)}}var r6=class e{rpc=$(null);file=$.required();serverFns=$([]);closed=ev();ssr=E(!1);trace=E(null);loading=E(!0);changed=X(()=>(this.trace()?.steps??[]).filter(e=>e.changed));unchanged=X(()=>(this.trace()?.steps.length??0)-this.changed().length);ids=X(()=>{let e=this.trace();return e?this.serverFns().filter(t=>t.file===e.file).map(t=>({...t,found:e.code.includes(t.id)})):[]});run=0;constructor(){ac(()=>{let e=this.file(),t=this.ssr();Z(()=>void this.fetch(e,t))})}reload(){this.fetch(this.file(),this.ssr())}async fetch(e,t){let n=++this.run;this.loading.set(!0);let r=await vT(this.rpc(),`analog-transform`,{file:e,ssr:t});n===this.run&&(this.trace.set(r??{file:e,ssr:t,steps:[],code:``,error:`No answer from the devtools server.`}),this.loading.set(!1))}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-analog-transform`]],inputs:{rpc:[1,`rpc`],file:[1,`file`],serverFns:[1,`serverFns`]},outputs:{closed:`closed`},decls:17,vars:4,consts:[[`aria-labelledby`,`transform-heading`,1,`card`],[1,`row`,`head`],[`id`,`transform-heading`],[1,`file`,`grow`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[`type`,`button`,1,`btn`,`ghost`,3,`click`,`disabled`],[`type`,`button`,1,`btn`,`ghost`,3,`click`],[1,`muted`,`small`],[`role`,`status`,1,`muted`],[`data-tone`,`bad`,`role`,`alert`,1,`note`],[1,`small`],[1,`muted`],[`target`,`_blank`,`rel`,`noopener`,3,`href`],[1,`steps`],[1,`mono`],[1,`muted`,`small`,`tnum`],[1,`code`],[1,`plain`],[1,`mono`,`muted`],[1,`pill`]],template:function(e,t){if(e&1&&(R(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Vite transform stack`),z(),R(4,`span`,3),K(5),z(),R(6,`label`,4)(7,`input`,5),U(`change`,function(){return t.ssr.set(!t.ssr())}),z(),K(8,` Server build (SSR)`),z(),R(9,`button`,6),U(`click`,function(){return t.reload()}),K(10,` Run again `),z(),R(11,`button`,7),U(`click`,function(){return t.closed.emit()}),K(12,`Close`),z()(),R(13,`p`,8),K(14,` Transforms the file again on the dev server and lists each plugin that changed it, in order. `),z(),A(15,G3,2,1,`p`,9)(16,n6,6,5),z()),e&2){let e;D(5),q(t.file()),D(2),V(`checked`,t.ssr()),D(2),V(`disabled`,t.loading()),D(6),j(t.loading()?15:(e=t.trace())?16:-1,e)}},styles:[`h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%] { display: flex; gap: 8px; @@ -20012,7 +20026,7 @@ a[_ngcontent-%COMP%] { a[_ngcontent-%COMP%]:focus-visible { outline: 2px solid var(--%NS%accent); outline-offset: 2px; -}`]})},$3=()=>[],e6=()=>[`/`],t6=(e,t)=>t.id,n6=(e,t)=>t.route.id,r6=(e,t)=>t[0],i6=(e,t)=>t.file+t.method,a6=(e,t)=>t.path,o6=(e,t)=>t.mode,s6=(e,t)=>t.file,c6=(e,t)=>t.file+t.line,l6=(e,t)=>t.rule;function u6(e,t){if(e&1){let e=B();F(0,`div`,0)(1,`h2`,3),K(2,`Could not read the project.`),I(),F(3,`p`,4),K(4,` Check that the dev server with Pangular Inspector is still running, then retry. `),I(),F(5,`button`,5),H(`click`,function(){return C(e),w(W().retry())}),K(6,`Retry`),I()()}}function d6(e,t){e&1&&(F(0,`div`,1),L(1,`span`,6),F(2,`span`),K(3,`Reading the project…`),I()())}function f6(e,t){e&1&&(F(0,`div`,2)(1,`h2`,3),K(2,`This app is not an Analog app.`),I(),F(3,`p`,4),K(4,` Add `),F(5,`code`),K(6,`pangular()`),I(),K(7,` from `),F(8,`code`),K(9,`@pangular-inspector/devtools/vite`),I(),K(10,` next to `),F(11,`code`),K(12,`analog()`),I(),K(13,` in vite.config.ts and run the Analog dev server. `),I()())}function p6(e,t){if(e&1&&(F(0,`div`,11)(1,`span`,9),K(2,`Open in the browser`),I(),F(3,`span`,17),K(4),I()()),e&2){let e=t;D(3),P(`title`,e.url),D(),q(e.url)}}function m6(e,t){if(e&1&&(F(0,`span`,19),K(1),I()),e&2){let e=W().$implicit;k(`data-tone`,e.tone),D(),q(e.count)}}function h6(e,t){if(e&1){let e=B();F(0,`button`,18),H(`click`,function(){let t=C(e).$implicit;return w(W(2).view.set(t.id))}),K(1),A(2,m6,2,2,`span`,19),I()}if(e&2){let e=t.$implicit,n=W(2);P(`id`,`analog-tab-`+e.id),k(`aria-selected`,e.id===n.view())(`aria-controls`,`analog-panel-`+e.id)(`tabindex`,e.id===n.view()?0:-1),D(),J(` `,e.label,` `),D(),j(e.count===null?-1:2)}}function g6(e,t){e&1&&(F(0,`div`,27),K(1),I()),e&2&&(D(),q(t))}function _6(e,t){if(e&1&&(F(0,`app-source-link`,37),K(1),I()),e&2){let e=W().$implicit,t=W(5);P(`file`,e.file),D(),q(t.short(e.file))}}function v6(e,t){if(e&1&&(F(0,`span`,34),K(1),I()),e&2){let e=W().$implicit;D(),q(e.fullPath)}}function y6(e,t){if(e&1&&(F(0,`li`),A(1,_6,2,2,`app-source-link`,37)(2,v6,2,1,`span`,34),F(3,`span`,38),K(4),I()()),e&2){let e=t.$implicit;D(),j(e.file?1:2),D(2),k(`data-kind`,e.kind),D(),q(e.kind)}}function b6(e,t){if(e&1&&(F(0,`span`,39),K(1),I()),e&2){let e=t.$implicit;D(),Y(``,e[0],` = `,e[1])}}function x6(e,t){if(e&1&&(F(0,`div`,36),M(1,b6,2,2,`span`,39,r6),I()),e&2){let e=W(2),t=W(3);D(),N(t.paramList(e.match.params))}}function S6(e,t){if(e&1&&(F(0,`strong`,34),K(1),I(),K(2,` renders `),F(3,`ol`,35),M(4,y6,5,3,`li`,null,t6),I(),A(6,x6,3,0,`div`,36)),e&2){let e=W(),t=W(3);D(),q(e.url),D(3),N(e.match.chain),D(2),j(t.paramList(e.match.params).length?6:-1)}}function C6(e,t){if(e&1&&(F(0,`app-source-link`,37),K(1),I()),e&2){let e=W().$implicit,t=W(6);P(`file`,e.file),D(),q(t.short(e.file))}}function w6(e,t){if(e&1&&(F(0,`span`,34),K(1),I()),e&2){let e=W().$implicit;D(),q(e.path)}}function T6(e,t){if(e&1&&(F(0,`li`),A(1,C6,2,2,`app-source-link`,37)(2,w6,2,1,`span`,34),F(3,`span`,4),K(4),I()()),e&2){let e=t.$implicit;D(),j(e.file?1:2),D(3),q(e.reason)}}function E6(e,t){if(e&1&&(F(0,`ul`,40),M(1,T6,5,2,`li`,null,Jh),I()),e&2){let e=W(2);D(),N(e.match.rejected.slice(0,5))}}function D6(e,t){if(e&1&&(F(0,`strong`,34),K(1),I(),K(2,` matches no file route. Angular throws NG04002 "Cannot match any routes". `),A(3,E6,3,0,`ul`,40)),e&2){let e=W();D(),q(e.url),D(2),j(e.match.rejected.length?3:-1)}}function O6(e,t){if(e&1&&(F(0,`div`,28),A(1,S6,7,2)(2,D6,4,2),I()),e&2){let e=t;k(`data-tone`,e.match.matched?`good`:`bad`),D(),j(e.match.matched?1:2)}}function k6(e,t){e&1&&(F(0,`span`,42),K(1,`└`),I())}function A6(e,t){if(e&1&&(F(0,`span`,44),K(1),I()),e&2){let e=W().$implicit,t=W(3);D(),q(t.openText(e.route))}}function j6(e,t){if(e&1&&(F(0,`app-source-link`,45)(1,`span`,51),K(2),I(),K(3),I()),e&2){let e=W().$implicit,t=W(3);P(`file`,e.route.file),D(2),q(t.dir(e.route.file)),D(),q(t.base(e.route.file))}}function M6(e,t){e&1&&(F(0,`span`,4),K(1,`folder only`),I())}function N6(e,t){if(e&1&&(F(0,`span`,47),K(1),I()),e&2){let e=t.$implicit;D(),J(``,e,`()`)}}function P6(e,t){if(e&1&&(F(0,`span`,48),K(1),I()),e&2){let e=W().$implicit;D(),J(`"`,e.route.title,`"`)}}function F6(e,t){if(e&1&&(F(0,`span`,39),K(1),I()),e&2){let e=W().$implicit;D(),q(e)}}function I6(e,t){if(e&1&&A(0,F6,2,1,`span`,39),e&2){let e=t.$implicit;j(e===`title`?-1:0)}}function L6(e,t){if(e&1){let e=B();F(0,`button`,52),H(`click`,function(){C(e);let t=W().$implicit;return w(W(3).showTransform(t.route.file))}),K(1,` Transform `),I()}if(e&2){let e=W().$implicit,t=W(3);k(`aria-label`,`Show the Vite transform stack of `+e.route.file)(`aria-pressed`,t.transformFile()===e.route.file)}}function R6(e,t){if(e&1&&(F(0,`tr`)(1,`td`)(2,`div`,41),A(3,k6,2,0,`span`,42),F(4,`span`,43),K(5),I(),F(6,`span`,38),K(7),I(),A(8,A6,2,1,`span`,44),I()(),F(9,`td`),A(10,j6,4,3,`app-source-link`,45)(11,M6,2,0,`span`,4),I(),F(12,`td`)(13,`div`,46),M(14,N6,2,1,`span`,47,Yh),I()(),F(16,`td`),A(17,P6,2,1,`span`,48),M(18,I6,1,1,null,null,Yh),I(),F(20,`td`,49),A(21,L6,2,2,`button`,50),I()()),e&2){let e=t.$implicit,n=W(3);G(`open`,n.isOpen(e.route))(`dim`,e.route.kind===`group`||e.route.kind===`implicit`),D(2),Xg(`padding-left`,e.depth*16,`px`),D(),j(e.depth?3:-1),D(2),q(e.route.fullPath),D(),k(`data-kind`,e.route.kind),D(),q(n.kindText(e.route)),D(),j(n.isOpen(e.route)?8:-1),D(2),j(e.route.file?10:11),D(4),N(n.serverExports(e.route)),D(3),j(e.route.title?17:-1),D(),N(e.route.routeMeta??F_(14,$3)),D(3),j(e.route.file&&e.route.kind!==`markdown`?21:-1)}}function z6(e,t){e&1&&K(0,` No route matches the filter. Try part of a path or a file name. `)}function B6(e,t){e&1&&K(0,` No file routes yet. Add a .page.ts file under src/app/pages. `)}function V6(e,t){if(e&1&&(F(0,`tr`)(1,`td`,53),A(2,z6,1,0)(3,B6,1,0),I()()),e&2){let e=W(3);D(2),j(e.filter().trim()?2:3)}}function H6(e,t){if(e&1){let e=B();F(0,`app-analog-transform`,54),H(`closed`,function(){let t=C(e);return w(W(3).closeTransform(t))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`file`,t)(`serverFns`,e.serverFns())}}function U6(e,t){if(e&1){let e=B();F(0,`div`,20)(1,`form`,21),H(`submit`,function(t){C(e);let n=W(2);return t.preventDefault(),w(n.explain())}),F(2,`label`,22),K(3,`Test a URL`),I(),F(4,`input`,23),H(`input`,function(t){return C(e),w(W(2).testUrl.set(t.target.value))}),I(),F(5,`button`,24),K(6),I()(),F(7,`app-search-field`,25),S_(`valueChange`,function(t){C(e);let n=W(2);return x_(n.filter,t)||(n.filter=t),w(t)}),I()(),F(8,`div`,26),A(9,g6,2,1,`div`,27)(10,O6,3,2,`div`,28),I(),F(11,`div`,29)(12,`table`)(13,`thead`)(14,`tr`)(15,`th`,30),K(16,`Route`),I(),F(17,`th`,30),K(18,`File`),I(),F(19,`th`,30),K(20,`Data`),I(),F(21,`th`,30),K(22,`Route meta`),I(),F(23,`th`,30)(24,`span`,31),K(25,`Actions`),I()()()(),F(26,`tbody`),M(27,R6,22,15,`tr`,32,n6,!1,V6,4,1,`tr`),I()()(),A(30,H6,1,3,`app-analog-transform`,33)}if(e&2){let e,t,n=W(2);D(4),P(`value`,n.testUrl()),D(),P(`disabled`,n.explaining()),D(),J(` `,n.explaining()?`Explaining…`:`Explain`,` `),D(),b_(`value`,n.filter),D(2),j((e=n.explainError())?9:(e=n.explained())?10:-1,e),D(18),N(n.routeRows()),D(3),j((t=n.transformFile())?30:-1,t)}}function W6(e,t){if(e&1&&(F(0,`span`,34),K(1),I(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;D(),q(e),D(),J(``,n===r-1?``:`, `,` `)}}function G6(e,t){if(e&1&&(F(0,`div`,55)(1,`strong`),K(2,`load() ran twice`),I(),K(3,` for `),M(4,W6,3,2,null,null,Yh),K(6,` : once while server rendering, again in the browser. TransferState did not serve the server result. `),I()),e&2){let e=W(3);D(4),N(e.duplicates())}}function K6(e,t){if(e&1&&(F(0,`span`,34),K(1),I(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;D(),q(e),D(),J(``,n===r-1?``:`, `,` `)}}function q6(e,t){if(e&1&&(F(0,`div`,55)(1,`strong`),K(2,`Server function read ran twice`),I(),K(3,`: `),M(4,K6,3,2,null,null,Yh),K(6,` ran while server rendering, then again in the browser. The browser did not use the TransferState seed. `),I()),e&2){let e=W(3);D(4),N(e.refetchedFns())}}function J6(e,t){if(e&1){let e=B();F(0,`label`)(1,`input`,74),H(`change`,function(){let t=C(e).$implicit;return w(W(3).kind.set(t))}),I(),K(2),F(3,`span`,4),K(4),I()()}if(e&2){let e=t.$implicit,n=W(3);G(`on`,n.kind()===e),D(),P(`checked`,n.kind()===e),k(`data-kind`,e),D(),J(` `,n.kindLabel(e),` `),D(2),q(n.kindCount(e))}}function Y6(e,t){if(e&1){let e=B();F(0,`label`,65)(1,`input`,75),H(`change`,function(t){return C(e),w(W(3).allTabs.set(t.target.checked))}),I(),K(2,` All tabs (including untagged) `),I()}if(e&2){let e=W(3);D(),P(`checked`,e.allTabs())}}function X6(e,t){if(e&1&&K(0),e&2){let e=W(4);Y(` Showing the newest `,e.shownCount(),` of `,e.matchingCalls().length,`. `)}}function Z6(e,t){e&1&&K(0),e&2&&J(` The dev server keeps only the newest `,W(4).maxServerCalls,` calls and drops older ones. `)}function Q6(e,t){if(e&1&&(F(0,`p`,68),A(1,X6,1,2),A(2,Z6,1,1),I()),e&2){let e=W(3);D(),j(e.shownCount()<e.matchingCalls().length?1:-1),D(),j(e.serverFull()?2:-1)}}function $6(e,t){if(e&1&&(F(0,`app-source-link`,83),K(1),I()),e&2){let e=W(),t=W(5);P(`file`,e.file),D(),q(t.short(e.file))}}function e8(e,t){if(e&1&&(F(0,`strong`,80),K(1),I(),A(2,$6,2,2,`app-source-link`,83)),e&2){let e=t;D(),q(e.name),D(),j(e.file?2:-1)}}function t8(e,t){if(e&1&&(F(0,`span`,80),K(1),I()),e&2){let e=W().$implicit;D(),q(e.url)}}function n8(e,t){e&1&&(F(0,`span`,38),K(1,`ran during server rendering`),I())}function r8(e,t){if(e&1&&K(0),e&2){let e=W(2).$implicit;J(` to `,e.location,` `)}}function i8(e,t){if(e&1&&(F(0,`span`,38),K(1),A(2,r8,1,1),I()),e&2){let e=W().$implicit,t=W(4);k(`data-tone`,t.outcomeTone(e.outcome)),D(),J(``,t.outcomeLabel(e.outcome),` `),D(),j(e.location?2:-1)}}function a8(e,t){if(e&1&&(F(0,`span`,38),K(1),I()),e&2){let e=W().$implicit;k(`data-mode`,e.render===`ssr`?`ssr`:`client`),D(),q(e.render===`ssr`?`server rendered`:`client only`)}}function o8(e,t){if(e&1&&(F(0,`details`)(1,`summary`),K(2,`Response`),I(),F(3,`pre`,84),K(4),I()()),e&2){let e=W().$implicit,t=W(4);D(4),q(t.pretty(e.preview))}}function s8(e,t){e&1&&(F(0,`span`,4),K(1,`in process`),I())}function c8(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,e.ms,` ms `)}}function l8(e,t){if(e&1&&(F(0,`tr`)(1,`td`,77),K(2),I(),F(3,`td`)(4,`span`,38),K(5),I()(),F(6,`td`,78)(7,`div`,46)(8,`span`,79),K(9),I(),A(10,e8,3,2)(11,t8,2,1,`span`,80),A(12,n8,2,0,`span`,38),A(13,i8,3,3,`span`,38),A(14,a8,2,2,`span`,38),I(),A(15,o8,5,1,`details`),I(),F(16,`td`)(17,`span`,81),K(18),I()(),F(19,`td`,82),A(20,s8,2,0,`span`,4)(21,c8,1,1),I(),F(22,`td`,4),K(23),I()()),e&2){let e,n=t.$implicit,r=W(4);D(2),q(r.time(n.at)),D(2),k(`data-call`,n.kind),D(),q(r.kindLabel(n.kind)),D(3),k(`data-method`,n.method),D(),q(n.method),D(),j((e=r.fnOf(n))?10:11,e),D(2),j(n.seeded?12:-1),D(),j(n.outcome?13:-1),D(),j(n.render?14:-1),D(),j(n.preview?15:-1),D(2),k(`data-status`,r.statusClass(n.status)),D(),q(n.status),D(2),j(n.seeded?20:21),D(3),q(n.from)}}function u8(e,t){if(e&1&&(F(0,`div`,69)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,30),K(5,`At`),I(),F(6,`th`,30),K(7,`Kind`),I(),F(8,`th`,30),K(9,`Request`),I(),F(10,`th`,30),K(11,`Status`),I(),F(12,`th`,76),K(13,`Duration`),I(),F(14,`th`,30),K(15,`From`),I()()(),F(16,`tbody`),M(17,l8,24,14,`tr`,null,t6),I()()()),e&2){let e=W(3);D(17),N(e.calls())}}function d8(e,t){e&1&&K(0),e&2&&J(` Nothing matches “`,W(4).callQuery().trim(),`” with these filters. `)}function f8(e,t){e&1&&K(0),e&2&&J(` None of the `,W(4).tabCalls().length,` calls fit these filters. `)}function p8(e,t){if(e&1){let e=B();F(0,`div`,70)(1,`p`,85),K(2,`No calls match.`),I(),F(3,`p`,4),A(4,d8,1,1)(5,f8,1,1),I(),F(6,`div`,86)(7,`button`,52),H(`click`,function(){return C(e),w(W(3).clearCallFilters())}),K(8,` Clear filters `),I()()()}if(e&2){let e=W(3);D(4),j(e.callQuery().trim()?4:5)}}function m8(e,t){e&1&&K(0,` No calls of this kind yet. `)}function h8(e,t){e&1&&K(0,` No calls from this tab yet. `)}function g8(e,t){e&1&&K(0,` No calls yet. `)}function _8(e,t){e&1&&K(0),e&2&&J(` Tick “All tabs (including untagged)” to see the `,W(4).allCalls().length,` calls from other tabs or tied to no tab. `)}function v8(e,t){if(e&1&&(F(0,`div`,71)(1,`p`,85),A(2,m8,1,0)(3,h8,1,0)(4,g8,1,0),I(),F(5,`p`,4),K(6,` Navigate in the app to see page renders, load() fetches, form actions, server functions and API calls. `),A(7,_8,1,1),I()()),e&2){let e=W(3);D(2),j(e.tabCalls().length?2:e.allCalls().length?3:4),D(5),j(!e.tabCalls().length&&e.allCalls().length?7:-1)}}function y8(e,t){if(e&1){let e=B();F(0,`tr`)(1,`td`)(2,`span`,79),K(3),I()(),F(4,`td`,34),K(5),I(),F(6,`td`)(7,`app-source-link`,45)(8,`span`,51),K(9),I(),K(10),I()(),F(11,`td`,49)(12,`button`,52),H(`click`,function(){let t=C(e).$implicit;return w(W(3).tryApi(t))}),K(13,` Try `),I()()()}if(e&2){let e=t.$implicit,n=W(3);D(2),k(`data-method`,e.method),D(),q(e.method),D(2),q(e.path),D(2),P(`file`,e.file),D(2),q(n.dir(e.file)),D(),q(n.base(e.file)),D(2),k(`aria-label`,`Try `+e.method+` `+e.path)}}function b8(e,t){e&1&&(F(0,`tr`)(1,`td`,87),K(2,` No API routes. Add a handler under src/server/routes to test it here. `),I()())}function x8(e,t){if(e&1&&(F(0,`tr`)(1,`td`)(2,`span`,79),K(3),I()(),F(4,`td`,34),K(5),I(),F(6,`td`)(7,`app-source-link`,45)(8,`span`,51),K(9),I(),K(10),I()(),F(11,`td`,89),K(12),I()()),e&2){let e=t.$implicit,n=W(4);D(2),k(`data-method`,e.method),D(),q(e.method),D(2),q(e.name),D(2),P(`file`,e.file),D(2),q(n.dir(e.file)),D(),q(n.base(e.file)),D(2),q(n.fnCalls(e.id))}}function S8(e,t){if(e&1&&(F(0,`h2`),K(1,`Server functions`),I(),F(2,`div`,88)(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,30),K(7,`Method`),I(),F(8,`th`,30),K(9,`Name`),I(),F(10,`th`,30),K(11,`File`),I(),F(12,`th`,76),K(13,`Calls`),I()()(),F(14,`tbody`),M(15,x8,13,7,`tr`,null,t6),I()()()),e&2){let e=W(3);D(15),N(e.serverFns())}}function Mre(e,t){if(e&1){let e=B();A(0,G6,7,0,`div`,55),A(1,q6,7,0,`div`,55),F(2,`h2`,56),K(3,`Server calls`),I(),F(4,`div`,57)(5,`fieldset`,58)(6,`legend`,31),K(7,`Show calls of kind`),I(),M(8,J6,5,6,`label`,59,Yh),I(),F(10,`div`,60)(11,`button`,61),H(`click`,function(){return C(e),w(W(2).clearCalls())}),K(12,` Clear calls `),I(),F(13,`span`,62),K(14),I()()(),F(15,`div`,63)(16,`app-search-field`,64),S_(`valueChange`,function(t){C(e);let n=W(2);return x_(n.callQuery,t)||(n.callQuery=t),w(t)}),I(),F(17,`label`,65)(18,`input`,66),H(`change`,function(t){return C(e),w(W(2).failedOnly.set(t.target.checked))}),I(),K(19,` Failed only `),I(),A(20,Y6,3,1,`label`,65),F(21,`span`,67),K(22),I()(),A(23,Q6,3,2,`p`,68),A(24,u8,19,0,`div`,69)(25,p8,9,1,`div`,70)(26,v8,8,2,`div`,71),F(27,`h2`),K(28,`API routes`),I(),F(29,`div`,72)(30,`table`)(31,`thead`)(32,`tr`)(33,`th`,30),K(34,`Method`),I(),F(35,`th`,30),K(36,`Path`),I(),F(37,`th`,30),K(38,`File`),I(),F(39,`th`,30)(40,`span`,31),K(41,`Actions`),I()()()(),F(42,`tbody`),M(43,y8,14,7,`tr`,null,i6,!1,b8,3,0,`tr`),I()()(),A(46,S8,17,0),L(47,`app-analog-playground`,73)}if(e&2){let e=W(2);j(e.duplicates().length?0:-1),D(),j(e.refetchedFns().length?1:-1),D(7),N(e.kinds),D(3),P(`disabled`,!e.allCalls().length),D(3),q(e.callsMessage()),D(2),b_(`value`,e.callQuery),D(2),P(`checked`,e.failedOnly()),D(2),j(e.scopePageId()?20:-1),D(2),Y(``,e.matchingCalls().length,` of `,e.tabCalls().length),D(),j(e.shownCount()<e.matchingCalls().length||e.serverFull()?23:-1),D(),j(e.calls().length?24:e.tabCalls().length&&e.callFiltered()?25:26),D(19),N(e.project().api),D(3),j(e.serverFns().length?46:-1),D(),P(`rpc`,e.rpc())(`routes`,e.project().api)(`target`,e.tryTarget())(`origin`,e.devOrigin())}}function Nre(e,t){if(e&1&&K(0),e&2){let e=t.$implicit;J(` `,e,` `)}}function Pre(e,t){if(e&1&&(F(0,`p`,90),K(1,` The analog() options in vite.config could not be read in full, so these modes and the prerender plan may be incomplete. `),M(2,Nre,1,1,null,null,Yh),I()),e&2){let e=W(3);D(2),N(e.plan().configPartial)}}function Fre(e,t){if(e&1&&(F(0,`span`,38),K(1),I()),e&2){let e=t.$implicit;k(`data-mode`,e.mode),D(),Y(``,e.label,` · `,e.count)}}function Ire(e,t){if(e&1&&(F(0,`div`,36),M(1,Fre,2,3,`span`,38,o6),I()),e&2){let e=W(3);D(),N(e.modeCounts())}}function Lre(e,t){e&1&&(F(0,`span`,95),K(1,`differs from config`),I())}function Rre(e,t){if(e&1&&(F(0,`div`,46)(1,`span`,81),K(2),I(),F(3,`span`,94),K(4),I(),A(5,Lre,2,0,`span`,95),I()),e&2){let e=t,n=W().$implicit,r=W(3);D(),k(`data-status`,r.statusClass(e.status)),D(),q(e.status),D(2),Y(``,e.render===`client`?`client only`:`server rendered`,` · `,e.ms,` ms`),D(),j(r.mismatch(n)?5:-1)}}function zre(e,t){e&1&&(F(0,`span`,93),K(1,`not requested yet`),I())}function Bre(e,t){e&1&&(F(0,`span`,96),K(1,`Checking…`),I())}function Vre(e,t){if(e&1&&(F(0,`span`,97),K(1),I()),e&2){let e=W();D(),q(e.error)}}function Hre(e,t){if(e&1&&(F(0,`span`,93),K(1),I()),e&2){let e=W(2);D(),q(e.note)}}function Ure(e,t){if(e&1&&(F(0,`div`,46)(1,`span`,38),K(2),I(),F(3,`span`,38),K(4),I(),A(5,Hre,2,1,`span`,93),I()),e&2){let e=W(),t=W(4);D(),k(`data-mode`,e.observed),D(),q(t.modeLabel(e.observed)),D(),k(`data-tone`,e.matches?`good`:`warn`),D(),q(e.matches?`fits the config`:`differs from config`),D(),j(e.note?5:-1)}}function Wre(e,t){if(e&1&&A(0,Bre,2,0,`span`,96)(1,Vre,2,1,`span`,97)(2,Ure,6,5,`div`,46),e&2){let e=t;j(e===`running`?0:e.error?1:2)}}function Gre(e,t){if(e&1&&(F(0,`app-source-link`,45)(1,`span`,51),K(2),I(),K(3),I()),e&2){let e=W().$implicit,t=W(3);P(`file`,e.file),D(2),q(t.dir(e.file)),D(),q(t.base(e.file))}}function Kre(e,t){if(e&1){let e=B();F(0,`tr`)(1,`td`,43),K(2),I(),F(3,`td`)(4,`div`,46)(5,`span`,38),K(6),I(),F(7,`span`,93),K(8),I()()(),F(9,`td`),A(10,Rre,6,5,`div`,46)(11,zre,2,0,`span`,93),I(),F(12,`td`),A(13,Wre,3,1),F(14,`button`,61),H(`click`,function(){let t=C(e).$implicit;return w(W(3).checkRender(t.path))}),K(15,` Check `),I()(),F(16,`td`),A(17,Gre,4,3,`app-source-link`,45),I()()}if(e&2){let e,n,r=t.$implicit,i=W(3);D(2),q(r.path),D(3),k(`data-mode`,r.mode),D(),q(i.modeLabel(r.mode)),D(2),q(r.reason),D(2),j((e=r.last)?10:11,e),D(3),j((n=i.checks()[r.path])?13:-1,n),D(),P(`disabled`,i.checks()[r.path]===`running`),k(`aria-label`,`Request `+r.path+` and check its render mode`),D(3),j(r.file?17:-1)}}function qre(e,t){e&1&&(F(0,`tr`)(1,`td`,53),K(2,` No page routes to render yet. Add a .page.ts file under src/app/pages. `),I()())}function Jre(e,t){e&1&&(F(0,`p`,4),K(1,` prerender.routes is a function, so the list is known only at build time. `),I())}function Yre(e,t){if(e&1&&(F(0,`span`,39),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function Xre(e,t){e&1&&(F(0,`span`,93),K(1,`default, nothing configured`),I())}function Zre(e,t){if(e&1&&(F(0,`span`,39),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function Qre(e,t){if(e&1&&(F(0,`dt`),K(1,`From routeRules`),I(),F(2,`dd`),M(3,Zre,2,1,`span`,39,Yh),I()),e&2){let e=W(2);D(3),N(e.fromRules)}}function $re(e,t){if(e&1&&(F(0,`span`,100),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function eie(e,t){if(e&1&&(F(0,`dt`),K(1,`Static, not listed`),I(),F(2,`dd`),M(3,$re,2,1,`span`,100,Yh),I()),e&2){let e=W(2);D(3),N(e.staticMissing)}}function tie(e,t){if(e&1&&(F(0,`span`,39),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function nie(e,t){if(e&1&&(F(0,`dt`),K(1,`Need explicit entries`),I(),F(2,`dd`),M(3,tie,2,1,`span`,39,Yh),I()),e&2){let e=W(2);D(3),N(e.dynamic)}}function rie(e,t){if(e&1&&(F(0,`span`,101),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function iie(e,t){if(e&1&&(K(0,` · missing `),M(1,rie,2,1,`span`,101,Yh)),e&2){let e=W(3);D(),N(e.notBuilt)}}function aie(e,t){if(e&1&&(K(0),A(1,iie,3,0)),e&2){let e=W(2);J(` `,W(3).plural(e.built.length,`page`),` in dist/analog/public `),D(),j(e.notBuilt.length?1:-1)}}function oie(e,t){e&1&&(F(0,`span`,93),K(1,`no build yet`),I())}function sie(e,t){if(e&1&&(F(0,`dl`,98)(1,`dt`),K(2,`Listed`),I(),F(3,`dd`),M(4,Yre,2,1,`span`,39,Yh),A(6,Xre,2,0,`span`,93),I(),A(7,Qre,5,0),A(8,eie,5,0),A(9,nie,5,0),F(10,`dt`),K(11,`Build output`),I(),F(12,`dd`,99),A(13,aie,2,2)(14,oie,2,0,`span`,93),I()()),e&2){let e=W();D(4),N(e.listed??F_(5,e6)),D(2),j(e.listed?-1:6),D(),j(e.fromRules?.length?7:-1),D(),j(e.staticMissing.length?8:-1),D(),j(e.dynamic.length?9:-1),D(4),j(e.built.length?13:14)}}function cie(e,t){e&1&&(F(0,`div`,92)(1,`h2`),K(2,`Prerender plan`),I(),A(3,Jre,2,0,`p`,4)(4,sie,15,6,`dl`,98),I()),e&2&&(D(3),j(t.dynamicConfig?3:4))}function lie(e,t){if(e&1&&(A(0,Pre,4,0,`p`,90),A(1,Ire,3,0,`div`,36),F(2,`div`,91)(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,30),K(7,`Route`),I(),F(8,`th`,30),K(9,`Configured`),I(),F(10,`th`,30),K(11,`Last request`),I(),F(12,`th`,30),K(13,`Dev server check`),I(),F(14,`th`,30),K(15,`File`),I()()(),F(16,`tbody`),M(17,Kre,18,9,`tr`,null,a6,!1,qre,3,0,`tr`),I()()(),A(20,cie,5,1,`div`,92),L(21,`app-analog-build`,16)),e&2){let e,t=W(2);j(t.plan()?.configPartial?.length?0:-1),D(),j(t.modeCounts().length?1:-1),D(16),N(t.renderRows()),D(3),j((e=t.plan())?20:-1,e),D(),P(`rpc`,t.rpc())}}function uie(e,t){if(e&1&&(F(0,`div`)(1,`span`,97),K(2),I()()),e&2){let e=W().$implicit;D(2),q(e.error)}}function die(e,t){if(e&1&&(F(0,`div`)(1,`span`,95),K(2),I()()),e&2){let e=W(5);D(2),J(`takes over `,e.base(t))}}function fie(e,t){if(e&1&&(F(0,`div`)(1,`span`,95),K(2),I()()),e&2){let e=W().$implicit,t=W(4);D(2),q(t.plural(e.schemaErrors.length,`schema problem`))}}function pie(e,t){if(e&1){let e=B();F(0,`tr`)(1,`td`)(2,`strong`),K(3),I(),A(4,uie,3,1,`div`),A(5,die,3,1,`div`),A(6,fie,3,1,`div`),I(),F(7,`td`,43),K(8),I(),F(9,`td`,34),K(10),I(),F(11,`td`,105),K(12),I(),F(13,`td`)(14,`app-source-link`,45)(15,`span`,51),K(16),I(),K(17),I()(),F(18,`td`,49)(19,`button`,52),H(`click`,function(){let t=C(e).$implicit;return w(W(4).showPreview(t.file))}),K(20,` Preview `),I()()()}if(e&2){let e,n=t.$implicit,r=W(4);D(3),q(n.attributes.title||`(no title)`),D(),j(n.error?4:-1),D(),j((e=r.shadowed(n.file))?5:-1,e),D(),j(n.schemaErrors?.length?6:-1),D(2),q(r.contentUrl(n.file)??``),D(2),q(n.slug),D(2),q(n.attributes.date||``),D(2),P(`file`,n.file),D(2),q(r.dir(n.file)),D(),q(r.base(n.file)),D(2),k(`aria-label`,`Preview `+n.file)(`aria-pressed`,r.previewFile()===n.file)}}function mie(e,t){if(e&1&&(F(0,`div`,102)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,30),K(5,`Title`),I(),F(6,`th`,30),K(7,`URL`),I(),F(8,`th`,30),K(9,`Slug`),I(),F(10,`th`,30),K(11,`Date`),I(),F(12,`th`,30),K(13,`File`),I(),F(14,`th`,30)(15,`span`,31),K(16,`Actions`),I()()()(),F(17,`tbody`),M(18,pie,21,12,`tr`,null,s6),I()()()),e&2){let e=W(3);D(18),N(e.project().content)}}function hie(e,t){e&1&&(F(0,`div`,71)(1,`p`,85),K(2,`No markdown files under src/content.`),I(),F(3,`p`,4),K(4,` Add a .md file there to see its title, slug, date and the URL it serves. `),I()())}function gie(e,t){if(e&1&&(F(0,`span`,97),K(1),I()),e&2){let e=W();D(),q(e.error)}}function _ie(e,t){if(e&1&&(F(0,`span`,93),K(1),I()),e&2){let e=W(2);D(),J(` (skips `,e.unsupported.join(`, `),`)`)}}function vie(e,t){if(e&1&&(F(0,`span`,34),K(1),I(),A(2,_ie,2,1,`span`,93)),e&2){let e=W();D(),q(e.file),D(),j(e.unsupported?.length?2:-1)}}function yie(e,t){e&1&&A(0,gie,2,1,`span`,97)(1,vie,3,2),e&2&&j(+!t.error)}function bie(e,t){e&1&&(F(0,`span`,93),K(1,`none; set `),F(2,`code`),K(3,`analog.contentSchema`),I(),K(4,` to check frontmatter`),I())}function xie(e,t){if(e&1&&(F(0,`app-source-link`,106),K(1),I()),e&2){let e=t.$implicit,n=W(4);P(`file`,e.file)(`line`,e.line),D(),__(``,e.api,` · `,n.base(e.file),`:`,e.line)}}function Sie(e,t){e&1&&(F(0,`span`,93),K(1,`no injectContentFiles, injectContent or contentFilesSource call under src`),I())}function Cie(e,t){if(e&1&&(F(0,`dl`,103)(1,`dt`),K(2,`Schema`),I(),F(3,`dd`),A(4,yie,2,1)(5,bie,5,0,`span`,93),I(),F(6,`dt`),K(7,`Read by`),I(),F(8,`dd`),M(9,xie,2,5,`app-source-link`,106,c6,!1,Sie,2,0,`span`,93),I()()),e&2){let e,t=W(3);D(4),j((e=t.project().contentSchema)?4:5,e),D(5),N(t.project().contentUsage??F_(2,$3))}}function wie(e,t){if(e&1){let e=B();F(0,`app-analog-content-preview`,107),H(`closed`,function(){let t=C(e);return w(W(3).closePreview(t))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`file`,t)(`schema`,e.project().contentSchema?.error?void 0:e.project().contentSchema?.file)}}function Tie(e,t){if(e&1&&(A(0,mie,20,0,`div`,102)(1,hie,5,0,`div`,71),A(2,Cie,12,3,`dl`,103),A(3,wie,1,3,`app-analog-content-preview`,104)),e&2){let e,t=W(2);j(+!t.project().content.length),D(2),j(t.project().content.length?2:-1),D(),j((e=t.previewFile())?3:-1,e)}}function Eie(e,t){if(e&1&&L(0,`app-analog-data`,15),e&2){let e=W(2);P(`rpc`,e.rpc())(`page`,e.page())(`serverFns`,e.serverFns())(`duplicates`,e.state().duplicates??F_(5,$3))(`refetches`,e.state().refetches??F_(6,$3))}}function Die(e,t){e&1&&L(0,`app-analog-runtime`,16),e&2&&P(`rpc`,W(2).rpc())}function Oie(e,t){if(e&1&&(F(0,`span`,19),K(1),I()),e&2){let e=W().$implicit;D(),q(e.items.length)}}function kie(e,t){if(e&1&&(F(0,`app-source-link`,45)(1,`span`,51),K(2),I(),K(3),I()),e&2){let e=W().$implicit,t=W(5);P(`file`,e.file),D(2),q(t.dir(e.file)),D(),q(t.base(e.file))}}function Aie(e,t){if(e&1&&(F(0,`span`,43),K(1),I()),e&2){let e=W().$implicit;D(),q(e.path)}}function jie(e,t){if(e&1&&(F(0,`p`,115),K(1),I()),e&2){let e=W().$implicit;D(),q(e.message)}}function Mie(e,t){if(e&1&&(F(0,`li`),A(1,kie,4,3,`app-source-link`,45),A(2,Aie,2,1,`span`,43),A(3,jie,2,1,`p`,115),I()),e&2){let e=t.$implicit;D(),j(e.file?1:-1),D(),j(e.path&&e.path!==e.file?2:-1),D(),j(e.message?3:-1)}}function Nie(e,t){if(e&1&&(F(0,`li`)(1,`div`,110)(2,`span`,38),K(3),I(),F(4,`strong`,111),K(5),I(),A(6,Oie,2,1,`span`,19),I(),F(7,`p`),K(8),I(),F(9,`ul`,112),M(10,Mie,4,3,`li`,null,Jh),I(),F(12,`div`,113)(13,`strong`),K(14,`How to fix`),I(),K(15),I(),F(16,`span`,114),K(17),I()()),e&2){let e=t.$implicit,n=W(4);k(`data-tone`,n.tone(e.severity)),D(2),k(`data-tone`,n.tone(e.severity)),D(),q(e.severity),D(2),q(e.title),D(),j(e.items.length>1?6:-1),D(2),q(e.summary),D(2),N(e.items),D(5),J(` `,e.fix),D(2),q(e.rule)}}function Pie(e,t){if(e&1&&(F(0,`p`,4),K(1),I(),F(2,`ul`,109),M(3,Nie,18,8,`li`,null,l6),I()),e&2){let e=W(3);D(),Y(` `,e.plural(e.findings().length,`issue`),` in `,e.plural(e.lintCards().length,`group`),`. Each card says what is wrong, where, and how to fix it. `),D(2),N(e.lintCards())}}function Fie(e,t){e&1&&(F(0,`div`,108)(1,`strong`),K(2,`No Analog problems found.`),I(),K(3,` Routes, server files, prerender config and content all check out. `),I())}function Iie(e,t){e&1&&A(0,Pie,5,2)(1,Fie,4,0,`div`,108),e&2&&j(+!W(2).findings().length)}function Lie(e,t){if(e&1){let e=B();F(0,`section`,7)(1,`div`,8)(2,`span`,9),K(3,`Analog`),I(),F(4,`span`,10),K(5),I()(),F(6,`div`,8)(7,`span`,9),K(8,`Pages`),I(),F(9,`span`,10),K(10),I()(),F(11,`div`,8)(12,`span`,9),K(13,`API routes`),I(),F(14,`span`,10),K(15),I()(),F(16,`div`,8)(17,`span`,9),K(18,`Server calls`),I(),F(19,`span`,10),K(20),I()(),F(21,`div`,8)(22,`span`,9),K(23,`Issues`),I(),F(24,`span`,10),K(25),I()(),A(26,p6,5,2,`div`,11),I(),F(27,`div`,12),H(`keydown`,function(t){return C(e),w(W().onKey(t))}),M(28,h6,3,6,`button`,13,t6),I(),F(30,`div`,14),A(31,U6,31,7)(32,Mre,48,17)(33,lie,22,5)(34,Tie,4,3)(35,Eie,1,7,`app-analog-data`,15)(36,Die,1,1,`app-analog-runtime`,16)(37,Iie,2,1),I()}if(e&2){let e,t,n=W();D(5),q(n.project().version||`unknown`),D(5),q(n.pageCount()),D(5),q(n.project().api.length),D(5),q(n.tabCalls().length),D(),k(`data-tone`,n.lintTone()||`good`),D(4),q(n.lintCount().errors+n.lintCount().warnings),D(),j((e=n.page())?26:-1,e),D(2),N(n.views()),D(2),P(`id`,`analog-panel-`+n.view()),k(`aria-labelledby`,`analog-tab-`+n.view()),D(),j((t=n.view())===`routes`?31:t===`server`?32:t===`render`?33:t===`content`?34:t===`data`?35:t===`runtime`?36:t===`lint`?37:-1)}}var Rie={"scan-error":{title:`A folder could not be read`,summary:`Its files are missing from routes, API routes and lint results.`},"duplicate-url":{title:`Two files serve the same URL`,summary:`Only one of them is reachable; the other never renders.`},"sibling-params":{title:`Two dynamic pages in one folder`,summary:`Both are [param] pages at the same level, so the first one always wins.`},"missing-default-export":{title:`Page has no default export`,summary:`Analog needs the component as the default export, so the page renders nothing.`},"redirect-with-component":{title:`Redirect page also exports a component`,summary:`The redirect runs first, so the component never shows.`},"redirect-path-match":{title:`Redirect matches too much`,summary:`An empty-path redirect without pathMatch "full" catches every URL below it.`},"layout-without-outlet":{title:`Layout has no router-outlet`,summary:`The layout has child pages, but without <router-outlet> they never render.`},"server-without-load":{title:`.server.ts without load or action`,summary:`The server file exports no load, action or server function, so Analog calls nothing.`},"orphan-server-file":{title:`.server.ts without a page`,summary:`No page file sits next to it, so its load never runs.`},"api-method-suffix":{title:`Unknown method suffix on an API file`,summary:`The suffix is not an HTTP method, so it becomes part of the URL.`},"duplicate-api-route":{title:`Two handlers for one API route`,summary:`Two files answer the same method and path.`},"api-outside-prefix":{title:`Server route outside the API prefix`,summary:`During vite dev only routes under the prefix reach Nitro.`},"prerender-unknown-route":{title:`Prerender entry matches no page`,summary:`prerender.routes lists a path that no page file serves.`},"prerender-missing-root":{title:`Home page is not prerendered`,summary:`static is on, but prerender.routes leaves out /.`},"content-frontmatter":{title:`Broken frontmatter`,summary:`The markdown frontmatter cannot be read.`},"content-schema":{title:`Frontmatter does not match the content schema`,summary:`The keys or values differ from the JSON Schema that analog.contentSchema names.`},"content-schema-unreadable":{title:`The content schema could not be used`,summary:`analog.contentSchema names a file that is missing, outside the project or not JSON.`},"duplicate-slug":{title:`Two posts share a slug`,summary:`injectContent picks one of them at random.`},"content-shadows-page":{title:`Markdown file takes over a page`,summary:`Files under src/content are routes too, so these URLs render the markdown file instead of the [param] page.`},"load-fetched-twice":{title:`load() runs twice`,summary:`These pages fetched their data while rendering on the server and again in the browser.`},"fn-fetched-twice":{title:`Server function read runs twice`,summary:`These reads ran while rendering on the server and again in the browser right after hydration.`},"restart-needed":{title:`New pages need a restart`,summary:`These page files exist, but the running router does not know them yet.`},"hydration-error":{title:`Hydration error`,summary:`The browser DOM did not match the server HTML.`},"api-not-found":{title:`API call failed with 404 or 405`,summary:`A request hit a path or method that no server route handles.`}},C8=200,zie=new Set([`missing-default-export`,`redirect-with-component`,`redirect-path-match`,`layout-without-outlet`,`server-without-load`,`orphan-server-file`,`load-fetched-twice`,`restart-needed`,`prerender-missing-root`]),w8={ssr:`SSR`,ssg:`Prerendered`,client:`Client only`,cached:`Cached`,redirect:`Redirect`},Bie={all:`All`,page:`Pages`,load:`load()`,action:`Actions`,fn:`Server fn`,api:`API`},Vie={success:`succeeded`,redirect:`redirected`,invalid:`validation errors`,error:`failed`},Hie={success:`good`,redirect:`info`,invalid:`warn`,error:`bad`};function T8(e,t=0,n=[]){for(let r of e)n.push({route:r,depth:t}),T8(r.children,t+1,n);return n}var Uie=class e{plural=JE;rpc=$(null);kinds=[`all`,`page`,`load`,`action`,`fn`,`api`];view=E(`routes`);project=E(null);loadFailed=E(!1);state=E({});findings=E([]);renderRows=E([]);plan=E(null);filter=E(``);testUrl=E(``);explained=E(null);explainError=E(``);explaining=E(!1);kind=E(`all`);devOrigin=X(()=>{let e=this.page()?.url??``;if(/^https?:\/\//.test(e))try{return new URL(e).origin}catch{return``}return/^https?:$/.test(location.protocol)?location.origin:``});transformFile=E(null);previewFile=E(null);checks=E({});tryTarget=Q({source:this.view,computation:()=>null});tryNonce=0;unsubscribe=null;refreshTimer;refreshRun=0;destroyRef=S(vs);host=S(kl);hostPageId=fT();page=X(()=>{let e=this.state().pages??[];return(this.hostPageId?e.find(e=>e.pageId===this.hostPageId):e[0])??null});openFiles=X(()=>{let e=new Map;for(let t of this.page()?.chain??[])t.file&&(!e.has(t.file)||!t.outlet)&&e.set(t.file,t.outlet??``);return e});allCalls=X(()=>this.state().calls??[]);scopePageId=X(()=>this.page()?.pageId);allTabs=E(!1);tabCalls=X(()=>{let e=this.scopePageId(),t=this.allCalls();return this.allTabs()||!e?t:t.filter(t=>t.pageId===e)});maxServerCalls=C8;callQuery=E(``);failedOnly=E(!1);callsMessage=E(``);callFiltered=X(()=>!!this.callQuery().trim()||this.failedOnly());matchingCalls=X(()=>{let e=this.kind(),t=this.callQuery().trim().toLowerCase(),n=this.failedOnly();return this.tabCalls().filter(r=>(e===`all`||r.kind===e)&&(!n||this.isFailed(r))&&(!t||this.callText(r).includes(t)))});calls=X(()=>this.matchingCalls().slice(-150).reverse());shownCount=X(()=>this.calls().length);serverFull=X(()=>this.allCalls().length>=C8);allRoutes=X(()=>T8(this.project()?.routes??[]));pageCount=X(()=>this.allRoutes().filter(e=>e.route.file&&e.route.kind!==`layout`).length);routeRows=X(()=>{let e=this.filter().trim().toLowerCase();return e?this.allRoutes().filter(t=>t.route.fullPath.toLowerCase().includes(e)||!!t.route.file?.toLowerCase().includes(e)):this.allRoutes()});serverFns=X(()=>this.project()?.serverFns??[]);fnById=X(()=>new Map(this.serverFns().map(e=>[e.id,e])));shownRoutes=X(()=>new Set(this.tabCalls().map(e=>`${e.kind} ${e.route??``}`)));refetchedFns=X(()=>Array.from(new Set((this.state().refetches??[]).filter(e=>this.shownRoutes().has(`fn ${e.id}`)).map(e=>this.fnById().get(e.id)?.name??e.id))));duplicates=X(()=>Array.from(new Set((this.state().duplicates??[]).filter(e=>this.shownRoutes().has(`load ${e.route}`)).map(e=>e.route))));modeCounts=X(()=>[`ssr`,`ssg`,`cached`,`client`,`redirect`].map(e=>({mode:e,label:w8[e],count:this.renderRows().filter(t=>t.mode===e).length})).filter(e=>e.count));lintCards=X(()=>{let e={error:0,warning:1,info:2},t=new Map;for(let e of this.findings()){let n=t.get(e.rule);if(!n){let r=Rie[e.rule];n={rule:e.rule,severity:e.severity,title:r?.title??e.rule,summary:r?.summary??e.message,fix:e.fix,items:[]},t.set(e.rule,n)}let r=zie.has(e.rule)||e.message===n.summary?void 0:e.message;n.items.some(t=>t.file===e.file&&t.path===e.path&&t.message===r)||n.items.push({file:e.file,path:e.path,message:r})}return Array.from(t.values()).sort((t,n)=>e[t.severity]-e[n.severity])});lintCount=X(()=>{let e=this.findings();return{errors:e.filter(e=>e.severity===`error`).length,warnings:e.filter(e=>e.severity===`warning`).length}});lintTone=X(()=>{let{errors:e,warnings:t}=this.lintCount();return e?`bad`:t?`warn`:``});views=X(()=>{let{errors:e,warnings:t}=this.lintCount();return[{id:`routes`,label:`Routes`,count:this.pageCount(),tone:``},{id:`server`,label:`Server`,count:this.tabCalls().length,tone:``},{id:`render`,label:`Render`,count:this.renderRows().length,tone:``},{id:`content`,label:`Content`,count:this.project()?.content.length??0,tone:``},{id:`data`,label:`Data`,count:null,tone:``},{id:`runtime`,label:`Runtime`,count:null,tone:``},{id:`lint`,label:`Lint`,count:e+t,tone:this.lintTone()}]});constructor(){ac(()=>{let e=this.rpc();e&&Z(()=>void this.load(e))}),ac(()=>{let e=this.view();this.state(),Z(()=>this.scheduleRefresh(e))}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),clearTimeout(this.refreshTimer)})}async load(e){let t=await vT(e,`analog-project`);if(!this.destroyRef.destroyed){this.project.set(t),this.loadFailed.set(t===null);try{let t=await e.scope(`pangular`).rpc.sharedState(`analog`);if(this.destroyRef.destroyed)return;let n=e=>this.state.set(e??{});n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.state.set({})}this.destroyRef.destroyed||await this.refresh(this.view())}}retry(){let e=this.rpc();e&&(this.loadFailed.set(!1),this.load(e))}scheduleRefresh(e){clearTimeout(this.refreshTimer),this.refreshTimer=setTimeout(()=>void this.refresh(e),300)}async refresh(e){let t=this.rpc();if(!t)return;let n=++this.refreshRun,[r,i]=await Promise.all([vT(t,`analog-lint`,this.hostPageId??void 0),vT(t,`analog-render`)]);if(n===this.refreshRun&&(this.findings.set(r??[]),this.renderRows.set(i?.rows??[]),this.plan.set(i?.plan??null),e===`routes`||e===`content`||this.project()===null)){let e=await vT(t,`analog-project`);e&&n===this.refreshRun&&(this.project.set(e),this.loadFailed.set(!1))}}isOpen(e){return!!e.file&&this.openFiles().has(e.file)}openText(e){let t=e.file?this.openFiles().get(e.file):void 0;return t?`open in ${t}`:`open`}kindText(e){return e.catchAll?e.catchAll===`optional`?`optional catch-all`:`catch-all`:e.kind===`implicit`?`folder`:e.kind}serverExports(e){return(e.serverExports??[]).filter(e=>e===`load`||e===`action`)}short(e){return e?.replace(/^\/src\/app\//,``).replace(/^\//,``)}dir(e){let t=this.short(e)??e;return t.includes(`/`)?t.slice(0,t.lastIndexOf(`/`)+1):``}base(e){return e.slice(e.lastIndexOf(`/`)+1)}paramList(e){return Object.entries(e)}kindLabel(e){return Bie[e]}kindCount(e){return e===`all`?this.tabCalls().length:this.tabCalls().filter(t=>t.kind===e).length}modeLabel(e){return w8[e]}mismatch(e){return!e.last?.render||e.mode===`redirect`?!1:e.mode===`client`?e.last.render!==`client`:e.last.render===`client`}fnOf(e){return e.kind===`fn`&&e.route?this.fnById().get(e.route):void 0}fnCalls(e){return this.tabCalls().filter(t=>t.kind===`fn`&&t.route===e).length}outcomeLabel(e){return Vie[e]}outcomeTone(e){return Hie[e]}statusClass(e){return e>=500||e===0?`bad`:e>=400?`warn`:`good`}tone(e){return e===`error`?`bad`:e===`warning`?`warn`:`info`}shadowed(e){return this.findings().find(t=>t.rule===`content-shadows-page`&&t.file===e)?.relatedFile}contentUrl(e){return this.allRoutes().find(t=>t.route.file===e)?.route.fullPath}pretty(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}time=GE;showTransform(e){this.transformFile.set(this.transformFile()===e?null:e)}closeTransform(e){this.transformFile.set(null),this.refocus(`Show the Vite transform stack of ${e}`)}showPreview(e){this.previewFile.set(this.previewFile()===e?null:e)}closePreview(e){this.previewFile.set(null),this.refocus(`Preview ${e}`)}refocus(e){queueMicrotask(()=>this.host.nativeElement.querySelector(`button[aria-label="${CSS.escape(e)}"]`)?.focus())}async checkRender(e){this.checks.update(t=>({...t,[e]:`running`}));let t=await vT(this.rpc(),`analog-render-check`,e);this.checks.update(n=>({...n,[e]:t??{path:e,error:`No answer from the devtools server.`}}))}tryApi(e){this.tryTarget.set({route:e,nonce:++this.tryNonce})}isFailed(e){return!e.status||e.status>=400||e.outcome===`error`}callText(e){let t=this.fnOf(e);return[e.url,e.route,t?.name,t?.file].filter(Boolean).join(` `).toLowerCase()}clearCallFilters(){this.callQuery.set(``),this.failedOnly.set(!1),this.kind.set(`all`),queueMicrotask(()=>this.host.nativeElement.querySelector(`#analog-call-search`)?.focus())}async clearCalls(){let e=this.rpc();try{if(!e)throw Error(`No devtools server`);await _T(e,`analog-clear-calls`),this.callsMessage.set(`Calls cleared.`),queueMicrotask(()=>this.host.nativeElement.querySelector(`input[name="analog-kind"]:checked`)?.focus())}catch{this.callsMessage.set(`Could not clear the calls.`)}}async explain(){let e=this.testUrl().trim();if(!e){this.explained.set(null),this.explainError.set(`Type a URL to explain, for example /products/42.`);return}this.explaining.set(!0),this.explainError.set(``);try{let t=await _T(this.rpc(),`analog-explain-url`,e);if(!t)throw Error(`The devtools server did not answer`);this.explained.set({url:e,match:t})}catch(t){let n=String(t?.message||`The devtools server did not answer`);this.explained.set(null),this.explainError.set(`Could not explain ${e}. ${n.replace(/\.?$/,`.`)}`)}finally{this.explaining.set(!1)}}onKey(e){let t=this.views().map(e=>e.id),n=t.indexOf(this.view()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.view.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#analog-tab-${t[r]}`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-analog-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`role`,`alert`,1,`empty`],[`role`,`status`,1,`loading`],[1,`empty`],[1,`empty-title`],[1,`muted`],[`type`,`button`,1,`btn`,3,`click`],[`aria-hidden`,`true`,1,`spinner`],[`aria-label`,`Analog summary`,1,`summary`],[1,`stat`],[1,`label`],[1,`value`],[1,`stat`,`wide`],[`role`,`tablist`,`aria-label`,`Analog views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[3,`rpc`,`page`,`serverFns`,`duplicates`,`refetches`],[3,`rpc`],[1,`value`,`mono`,3,`title`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`count`],[1,`toolbar`],[1,`inline`,`explain`,3,`submit`],[`for`,`analog-url`],[`id`,`analog-url`,`type`,`text`,`placeholder`,`/products/42`,1,`field`,`grow`,`mono`,3,`input`,`value`],[`type`,`submit`,1,`btn`,`primary`,3,`disabled`],[`inputId`,`route-filter`,`placeholder`,`Filter by path or file`,`saveKey`,`analog-routes`,1,`filter`,3,`valueChange`,`value`],[`role`,`status`,1,`explain-result`],[`data-tone`,`bad`,1,`callout`],[1,`callout`],[`role`,`region`,`aria-label`,`File routes`,`tabindex`,`0`,1,`table-wrap`],[`scope`,`col`],[1,`sr-only`],[3,`open`,`dim`],[3,`rpc`,`file`,`serverFns`],[1,`mono`],[1,`chain`],[1,`chips`],[1,`mono`,3,`file`],[1,`pill`],[1,`chip`,`mono`],[1,`plain`],[1,`route`],[`aria-hidden`,`true`,1,`guide`],[1,`mono`,`path`],[1,`pill`,`live`],[1,`file`,3,`file`],[1,`meta`],[`data-kind`,`load`,1,`pill`],[1,`chip`],[1,`actions`],[`type`,`button`,1,`btn`,`ghost`],[1,`dir`],[`type`,`button`,1,`btn`,`ghost`,3,`click`],[`colspan`,`5`,1,`empty-row`],[3,`closed`,`rpc`,`file`,`serverFns`],[`data-tone`,`warn`,`role`,`note`,1,`callout`],[`id`,`analog-calls-heading`],[1,`calls-bar`],[1,`segmented`],[3,`on`],[1,`calls-actions`],[`type`,`button`,1,`btn`,`ghost`,3,`click`,`disabled`],[`role`,`status`,1,`calls-message`],[`role`,`group`,`aria-label`,`Filter the server calls`,1,`call-filters`],[`inputId`,`analog-call-search`,`placeholder`,`Filter by URL, path or function`,`saveKey`,`analog-calls`,1,`search`,3,`valueChange`,`value`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[`aria-live`,`polite`,1,`total`],[1,`note`],[`role`,`region`,`aria-label`,`Server calls`,`tabindex`,`0`,1,`table-wrap`],[`role`,`status`,1,`empty-box`,`no-match`],[1,`empty-box`],[`role`,`region`,`aria-label`,`API routes`,`tabindex`,`0`,1,`table-wrap`],[3,`rpc`,`routes`,`target`,`origin`],[`type`,`radio`,`name`,`analog-kind`,1,`sr-only`,3,`change`,`checked`],[`type`,`checkbox`,`data-testid`,`analog-all-tabs`,3,`change`,`checked`],[`scope`,`col`,1,`num`],[1,`muted`,`nowrap`],[1,`request`],[1,`method`],[1,`mono`,`url`],[1,`status`],[1,`num`,`nowrap`],[1,`mono`,`muted`,3,`file`],[1,`code`],[1,`empty-lead`],[1,`empty-actions`],[`colspan`,`4`,1,`empty-row`],[`role`,`region`,`aria-label`,`Server functions`,`tabindex`,`0`,1,`table-wrap`],[1,`num`,`tnum`],[`role`,`status`,1,`note`],[`role`,`region`,`aria-label`,`Render modes`,`tabindex`,`0`,1,`table-wrap`],[1,`card`],[1,`muted`,`small`],[1,`muted`,`small`,`tnum`],[`data-tone`,`warn`,1,`pill`],[`role`,`status`,1,`muted`,`small`],[`data-tone`,`bad`,1,`pill`],[1,`facts`],[1,`tnum`],[`data-tone`,`warn`,1,`chip`,`mono`],[`data-tone`,`bad`,1,`chip`,`mono`],[`role`,`region`,`aria-label`,`Content files`,`tabindex`,`0`,1,`table-wrap`],[1,`facts`,`content-facts`],[3,`rpc`,`file`,`schema`],[1,`muted`,`nowrap`,`tnum`],[1,`chip`,`mono`,3,`file`,`line`],[3,`closed`,`rpc`,`file`,`schema`],[`data-tone`,`good`,`role`,`status`,1,`callout`],[1,`findings`],[1,`finding-head`],[1,`finding-title`],[1,`where`],[1,`fix`],[1,`rule`,`mono`],[1,`detail`]],template:function(e,t){e&1&&A(0,u6,7,0,`div`,0)(1,d6,4,0,`div`,1)(2,f6,14,0,`div`,2)(3,Lie,38,10),e&2&&j(t.project()===null&&t.loadFailed()?0:t.project()===null?1:t.project().analog?3:2)},dependencies:[nP,Cj,x2,R2,g4,Z4,R3,Q3],styles:[`@charset "UTF-8"; +}`]})},i6=()=>[],a6=()=>[`/`],o6=(e,t)=>t.id,s6=(e,t)=>t.route.id,c6=(e,t)=>t[0],l6=(e,t)=>t.file+t.method,u6=(e,t)=>t.path,d6=(e,t)=>t.mode,f6=(e,t)=>t.file,p6=(e,t)=>t.file+t.line,m6=(e,t)=>t.rule;function h6(e,t){if(e&1){let e=B();F(0,`div`,0)(1,`h2`,3),K(2,`Could not read the project.`),I(),F(3,`p`,4),K(4,` Check that the dev server with Pangular Inspector is still running, then retry. `),I(),F(5,`button`,5),H(`click`,function(){return C(e),w(W().retry())}),K(6,`Retry`),I()()}}function g6(e,t){e&1&&(F(0,`div`,1),L(1,`span`,6),F(2,`span`),K(3,`Reading the project…`),I()())}function _6(e,t){e&1&&(F(0,`div`,2)(1,`h2`,3),K(2,`This app is not an Analog app.`),I(),F(3,`p`,4),K(4,` Add `),F(5,`code`),K(6,`pangular()`),I(),K(7,` from `),F(8,`code`),K(9,`@pangular-inspector/devtools/vite`),I(),K(10,` next to `),F(11,`code`),K(12,`analog()`),I(),K(13,` in vite.config.ts and run the Analog dev server. `),I()())}function v6(e,t){if(e&1&&(F(0,`div`,11)(1,`span`,9),K(2,`Open in the browser`),I(),F(3,`span`,17),K(4),I()()),e&2){let e=t;D(3),P(`title`,e.url),D(),q(e.url)}}function y6(e,t){if(e&1&&(F(0,`span`,19),K(1),I()),e&2){let e=W().$implicit;k(`data-tone`,e.tone),D(),q(e.count)}}function b6(e,t){if(e&1){let e=B();F(0,`button`,18),H(`click`,function(){let t=C(e).$implicit;return w(W(2).view.set(t.id))}),K(1),A(2,y6,2,2,`span`,19),I()}if(e&2){let e=t.$implicit,n=W(2);P(`id`,`analog-tab-`+e.id),k(`aria-selected`,e.id===n.view())(`aria-controls`,`analog-panel-`+e.id)(`tabindex`,e.id===n.view()?0:-1),D(),J(` `,e.label,` `),D(),j(e.count===null?-1:2)}}function x6(e,t){e&1&&(F(0,`div`,27),K(1),I()),e&2&&(D(),q(t))}function S6(e,t){if(e&1&&(F(0,`app-source-link`,37),K(1),I()),e&2){let e=W().$implicit,t=W(5);P(`file`,e.file),D(),q(t.short(e.file))}}function C6(e,t){if(e&1&&(F(0,`span`,34),K(1),I()),e&2){let e=W().$implicit;D(),q(e.fullPath)}}function w6(e,t){if(e&1&&(F(0,`li`),A(1,S6,2,2,`app-source-link`,37)(2,C6,2,1,`span`,34),F(3,`span`,38),K(4),I()()),e&2){let e=t.$implicit;D(),j(e.file?1:2),D(2),k(`data-kind`,e.kind),D(),q(e.kind)}}function T6(e,t){if(e&1&&(F(0,`span`,39),K(1),I()),e&2){let e=t.$implicit;D(),Y(``,e[0],` = `,e[1])}}function E6(e,t){if(e&1&&(F(0,`div`,36),M(1,T6,2,2,`span`,39,c6),I()),e&2){let e=W(2),t=W(3);D(),N(t.paramList(e.match.params))}}function D6(e,t){if(e&1&&(F(0,`strong`,34),K(1),I(),K(2,` renders `),F(3,`ol`,35),M(4,w6,5,3,`li`,null,o6),I(),A(6,E6,3,0,`div`,36)),e&2){let e=W(),t=W(3);D(),q(e.url),D(3),N(e.match.chain),D(2),j(t.paramList(e.match.params).length?6:-1)}}function O6(e,t){if(e&1&&(F(0,`app-source-link`,37),K(1),I()),e&2){let e=W().$implicit,t=W(6);P(`file`,e.file),D(),q(t.short(e.file))}}function k6(e,t){if(e&1&&(F(0,`span`,34),K(1),I()),e&2){let e=W().$implicit;D(),q(e.path)}}function A6(e,t){if(e&1&&(F(0,`li`),A(1,O6,2,2,`app-source-link`,37)(2,k6,2,1,`span`,34),F(3,`span`,4),K(4),I()()),e&2){let e=t.$implicit;D(),j(e.file?1:2),D(3),q(e.reason)}}function j6(e,t){if(e&1&&(F(0,`ul`,40),M(1,A6,5,2,`li`,null,Yh),I()),e&2){let e=W(2);D(),N(e.match.rejected.slice(0,5))}}function M6(e,t){if(e&1&&(F(0,`strong`,34),K(1),I(),K(2,` matches no file route. Angular throws NG04002 "Cannot match any routes". `),A(3,j6,3,0,`ul`,40)),e&2){let e=W();D(),q(e.url),D(2),j(e.match.rejected.length?3:-1)}}function N6(e,t){if(e&1&&(F(0,`div`,28),A(1,D6,7,2)(2,M6,4,2),I()),e&2){let e=t;k(`data-tone`,e.match.matched?`good`:`bad`),D(),j(e.match.matched?1:2)}}function P6(e,t){e&1&&(F(0,`span`,42),K(1,`└`),I())}function F6(e,t){if(e&1&&(F(0,`span`,44),K(1),I()),e&2){let e=W().$implicit,t=W(3);D(),q(t.openText(e.route))}}function I6(e,t){if(e&1&&(F(0,`app-source-link`,45)(1,`span`,51),K(2),I(),K(3),I()),e&2){let e=W().$implicit,t=W(3);P(`file`,e.route.file),D(2),q(t.dir(e.route.file)),D(),q(t.base(e.route.file))}}function L6(e,t){e&1&&(F(0,`span`,4),K(1,`folder only`),I())}function R6(e,t){if(e&1&&(F(0,`span`,47),K(1),I()),e&2){let e=t.$implicit;D(),J(``,e,`()`)}}function z6(e,t){if(e&1&&(F(0,`span`,48),K(1),I()),e&2){let e=W().$implicit;D(),J(`"`,e.route.title,`"`)}}function B6(e,t){if(e&1&&(F(0,`span`,39),K(1),I()),e&2){let e=W().$implicit;D(),q(e)}}function V6(e,t){if(e&1&&A(0,B6,2,1,`span`,39),e&2){let e=t.$implicit;j(e===`title`?-1:0)}}function H6(e,t){if(e&1){let e=B();F(0,`button`,52),H(`click`,function(){C(e);let t=W().$implicit;return w(W(3).showTransform(t.route.file))}),K(1,` Transform `),I()}if(e&2){let e=W().$implicit,t=W(3);k(`aria-label`,`Show the Vite transform stack of `+e.route.file)(`aria-pressed`,t.transformFile()===e.route.file)}}function U6(e,t){if(e&1&&(F(0,`tr`)(1,`td`)(2,`div`,41),A(3,P6,2,0,`span`,42),F(4,`span`,43),K(5),I(),F(6,`span`,38),K(7),I(),A(8,F6,2,1,`span`,44),I()(),F(9,`td`),A(10,I6,4,3,`app-source-link`,45)(11,L6,2,0,`span`,4),I(),F(12,`td`)(13,`div`,46),M(14,R6,2,1,`span`,47,Xh),I()(),F(16,`td`),A(17,z6,2,1,`span`,48),M(18,V6,1,1,null,null,Xh),I(),F(20,`td`,49),A(21,H6,2,2,`button`,50),I()()),e&2){let e=t.$implicit,n=W(3);G(`open`,n.isOpen(e.route))(`dim`,e.route.kind===`group`||e.route.kind===`implicit`),D(2),Zg(`padding-left`,e.depth*16,`px`),D(),j(e.depth?3:-1),D(2),q(e.route.fullPath),D(),k(`data-kind`,e.route.kind),D(),q(n.kindText(e.route)),D(),j(n.isOpen(e.route)?8:-1),D(2),j(e.route.file?10:11),D(4),N(n.serverExports(e.route)),D(3),j(e.route.title?17:-1),D(),N(e.route.routeMeta??L_(14,i6)),D(3),j(e.route.file&&e.route.kind!==`markdown`?21:-1)}}function W6(e,t){e&1&&K(0,` No route matches the filter. Try part of a path or a file name. `)}function G6(e,t){e&1&&K(0,` No file routes yet. Add a .page.ts file under src/app/pages. `)}function K6(e,t){if(e&1&&(F(0,`tr`)(1,`td`,53),A(2,W6,1,0)(3,G6,1,0),I()()),e&2){let e=W(3);D(2),j(e.filter().trim()?2:3)}}function q6(e,t){if(e&1){let e=B();F(0,`app-analog-transform`,54),H(`closed`,function(){let t=C(e);return w(W(3).closeTransform(t))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`file`,t)(`serverFns`,e.serverFns())}}function J6(e,t){if(e&1){let e=B();F(0,`div`,20)(1,`form`,21),H(`submit`,function(t){C(e);let n=W(2);return t.preventDefault(),w(n.explain())}),F(2,`label`,22),K(3,`Test a URL`),I(),F(4,`input`,23),H(`input`,function(t){return C(e),w(W(2).testUrl.set(t.target.value))}),I(),F(5,`button`,24),K(6),I()(),F(7,`app-search-field`,25),w_(`valueChange`,function(t){C(e);let n=W(2);return C_(n.filter,t)||(n.filter=t),w(t)}),I()(),F(8,`div`,26),A(9,x6,2,1,`div`,27)(10,N6,3,2,`div`,28),I(),F(11,`div`,29)(12,`table`)(13,`thead`)(14,`tr`)(15,`th`,30),K(16,`Route`),I(),F(17,`th`,30),K(18,`File`),I(),F(19,`th`,30),K(20,`Data`),I(),F(21,`th`,30),K(22,`Route meta`),I(),F(23,`th`,30)(24,`span`,31),K(25,`Actions`),I()()()(),F(26,`tbody`),M(27,U6,22,15,`tr`,32,s6,!1,K6,4,1,`tr`),I()()(),A(30,q6,1,3,`app-analog-transform`,33)}if(e&2){let e,t,n=W(2);D(4),P(`value`,n.testUrl()),D(),P(`disabled`,n.explaining()),D(),J(` `,n.explaining()?`Explaining…`:`Explain`,` `),D(),S_(`value`,n.filter),D(2),j((e=n.explainError())?9:(e=n.explained())?10:-1,e),D(18),N(n.routeRows()),D(3),j((t=n.transformFile())?30:-1,t)}}function Y6(e,t){if(e&1&&(F(0,`span`,34),K(1),I(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;D(),q(e),D(),J(``,n===r-1?``:`, `,` `)}}function X6(e,t){if(e&1&&(F(0,`div`,55)(1,`strong`),K(2,`load() ran twice`),I(),K(3,` for `),M(4,Y6,3,2,null,null,Xh),K(6,` : once while server rendering, again in the browser. TransferState did not serve the server result. `),I()),e&2){let e=W(3);D(4),N(e.duplicates())}}function Z6(e,t){if(e&1&&(F(0,`span`,34),K(1),I(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;D(),q(e),D(),J(``,n===r-1?``:`, `,` `)}}function Q6(e,t){if(e&1&&(F(0,`div`,55)(1,`strong`),K(2,`Server function read ran twice`),I(),K(3,`: `),M(4,Z6,3,2,null,null,Xh),K(6,` ran while server rendering, then again in the browser. The browser did not use the TransferState seed. `),I()),e&2){let e=W(3);D(4),N(e.refetchedFns())}}function $6(e,t){if(e&1){let e=B();F(0,`label`)(1,`input`,74),H(`change`,function(){let t=C(e).$implicit;return w(W(3).kind.set(t))}),I(),K(2),F(3,`span`,4),K(4),I()()}if(e&2){let e=t.$implicit,n=W(3);G(`on`,n.kind()===e),D(),P(`checked`,n.kind()===e),k(`data-kind`,e),D(),J(` `,n.kindLabel(e),` `),D(2),q(n.kindCount(e))}}function e8(e,t){if(e&1){let e=B();F(0,`label`,65)(1,`input`,75),H(`change`,function(t){return C(e),w(W(3).allTabs.set(t.target.checked))}),I(),K(2,` All tabs (including untagged) `),I()}if(e&2){let e=W(3);D(),P(`checked`,e.allTabs())}}function t8(e,t){if(e&1&&K(0),e&2){let e=W(4);Y(` Showing the newest `,e.shownCount(),` of `,e.matchingCalls().length,`. `)}}function n8(e,t){e&1&&K(0),e&2&&J(` The dev server keeps only the newest `,W(4).maxServerCalls,` calls and drops older ones. `)}function r8(e,t){if(e&1&&(F(0,`p`,68),A(1,t8,1,2),A(2,n8,1,1),I()),e&2){let e=W(3);D(),j(e.shownCount()<e.matchingCalls().length?1:-1),D(),j(e.serverFull()?2:-1)}}function i8(e,t){if(e&1&&(F(0,`app-source-link`,83),K(1),I()),e&2){let e=W(),t=W(5);P(`file`,e.file),D(),q(t.short(e.file))}}function a8(e,t){if(e&1&&(F(0,`strong`,80),K(1),I(),A(2,i8,2,2,`app-source-link`,83)),e&2){let e=t;D(),q(e.name),D(),j(e.file?2:-1)}}function o8(e,t){if(e&1&&(F(0,`span`,80),K(1),I()),e&2){let e=W().$implicit;D(),q(e.url)}}function s8(e,t){e&1&&(F(0,`span`,38),K(1,`ran during server rendering`),I())}function c8(e,t){if(e&1&&K(0),e&2){let e=W(2).$implicit;J(` to `,e.location,` `)}}function l8(e,t){if(e&1&&(F(0,`span`,38),K(1),A(2,c8,1,1),I()),e&2){let e=W().$implicit,t=W(4);k(`data-tone`,t.outcomeTone(e.outcome)),D(),J(``,t.outcomeLabel(e.outcome),` `),D(),j(e.location?2:-1)}}function u8(e,t){if(e&1&&(F(0,`span`,38),K(1),I()),e&2){let e=W().$implicit;k(`data-mode`,e.render===`ssr`?`ssr`:`client`),D(),q(e.render===`ssr`?`server rendered`:`client only`)}}function d8(e,t){if(e&1&&(F(0,`details`)(1,`summary`),K(2,`Response`),I(),F(3,`pre`,84),K(4),I()()),e&2){let e=W().$implicit,t=W(4);D(4),q(t.pretty(e.preview))}}function f8(e,t){e&1&&(F(0,`span`,4),K(1,`in process`),I())}function p8(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,e.ms,` ms `)}}function m8(e,t){if(e&1&&(F(0,`tr`)(1,`td`,77),K(2),I(),F(3,`td`)(4,`span`,38),K(5),I()(),F(6,`td`,78)(7,`div`,46)(8,`span`,79),K(9),I(),A(10,a8,3,2)(11,o8,2,1,`span`,80),A(12,s8,2,0,`span`,38),A(13,l8,3,3,`span`,38),A(14,u8,2,2,`span`,38),I(),A(15,d8,5,1,`details`),I(),F(16,`td`)(17,`span`,81),K(18),I()(),F(19,`td`,82),A(20,f8,2,0,`span`,4)(21,p8,1,1),I(),F(22,`td`,4),K(23),I()()),e&2){let e,n=t.$implicit,r=W(4);D(2),q(r.time(n.at)),D(2),k(`data-call`,n.kind),D(),q(r.kindLabel(n.kind)),D(3),k(`data-method`,n.method),D(),q(n.method),D(),j((e=r.fnOf(n))?10:11,e),D(2),j(n.seeded?12:-1),D(),j(n.outcome?13:-1),D(),j(n.render?14:-1),D(),j(n.preview?15:-1),D(2),k(`data-status`,r.statusClass(n.status)),D(),q(n.status),D(2),j(n.seeded?20:21),D(3),q(n.from)}}function h8(e,t){if(e&1&&(F(0,`div`,69)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,30),K(5,`At`),I(),F(6,`th`,30),K(7,`Kind`),I(),F(8,`th`,30),K(9,`Request`),I(),F(10,`th`,30),K(11,`Status`),I(),F(12,`th`,76),K(13,`Duration`),I(),F(14,`th`,30),K(15,`From`),I()()(),F(16,`tbody`),M(17,m8,24,14,`tr`,null,o6),I()()()),e&2){let e=W(3);D(17),N(e.calls())}}function g8(e,t){e&1&&K(0),e&2&&J(` Nothing matches “`,W(4).callQuery().trim(),`” with these filters. `)}function _8(e,t){e&1&&K(0),e&2&&J(` None of the `,W(4).tabCalls().length,` calls fit these filters. `)}function v8(e,t){if(e&1){let e=B();F(0,`div`,70)(1,`p`,85),K(2,`No calls match.`),I(),F(3,`p`,4),A(4,g8,1,1)(5,_8,1,1),I(),F(6,`div`,86)(7,`button`,52),H(`click`,function(){return C(e),w(W(3).clearCallFilters())}),K(8,` Clear filters `),I()()()}if(e&2){let e=W(3);D(4),j(e.callQuery().trim()?4:5)}}function y8(e,t){e&1&&K(0,` No calls of this kind yet. `)}function b8(e,t){e&1&&K(0,` No calls from this tab yet. `)}function x8(e,t){e&1&&K(0,` No calls yet. `)}function S8(e,t){e&1&&K(0),e&2&&J(` Tick “All tabs (including untagged)” to see the `,W(4).allCalls().length,` calls from other tabs or tied to no tab. `)}function Mre(e,t){if(e&1&&(F(0,`div`,71)(1,`p`,85),A(2,y8,1,0)(3,b8,1,0)(4,x8,1,0),I(),F(5,`p`,4),K(6,` Navigate in the app to see page renders, load() fetches, form actions, server functions and API calls. `),A(7,S8,1,1),I()()),e&2){let e=W(3);D(2),j(e.tabCalls().length?2:e.allCalls().length?3:4),D(5),j(!e.tabCalls().length&&e.allCalls().length?7:-1)}}function Nre(e,t){if(e&1){let e=B();F(0,`tr`)(1,`td`)(2,`span`,79),K(3),I()(),F(4,`td`,34),K(5),I(),F(6,`td`)(7,`app-source-link`,45)(8,`span`,51),K(9),I(),K(10),I()(),F(11,`td`,49)(12,`button`,52),H(`click`,function(){let t=C(e).$implicit;return w(W(3).tryApi(t))}),K(13,` Try `),I()()()}if(e&2){let e=t.$implicit,n=W(3);D(2),k(`data-method`,e.method),D(),q(e.method),D(2),q(e.path),D(2),P(`file`,e.file),D(2),q(n.dir(e.file)),D(),q(n.base(e.file)),D(2),k(`aria-label`,`Try `+e.method+` `+e.path)}}function Pre(e,t){e&1&&(F(0,`tr`)(1,`td`,87),K(2,` No API routes. Add a handler under src/server/routes to test it here. `),I()())}function Fre(e,t){if(e&1&&(F(0,`tr`)(1,`td`)(2,`span`,79),K(3),I()(),F(4,`td`,34),K(5),I(),F(6,`td`)(7,`app-source-link`,45)(8,`span`,51),K(9),I(),K(10),I()(),F(11,`td`,89),K(12),I()()),e&2){let e=t.$implicit,n=W(4);D(2),k(`data-method`,e.method),D(),q(e.method),D(2),q(e.name),D(2),P(`file`,e.file),D(2),q(n.dir(e.file)),D(),q(n.base(e.file)),D(2),q(n.fnCalls(e.id))}}function Ire(e,t){if(e&1&&(F(0,`h2`),K(1,`Server functions`),I(),F(2,`div`,88)(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,30),K(7,`Method`),I(),F(8,`th`,30),K(9,`Name`),I(),F(10,`th`,30),K(11,`File`),I(),F(12,`th`,76),K(13,`Calls`),I()()(),F(14,`tbody`),M(15,Fre,13,7,`tr`,null,o6),I()()()),e&2){let e=W(3);D(15),N(e.serverFns())}}function Lre(e,t){if(e&1){let e=B();A(0,X6,7,0,`div`,55),A(1,Q6,7,0,`div`,55),F(2,`h2`,56),K(3,`Server calls`),I(),F(4,`div`,57)(5,`fieldset`,58)(6,`legend`,31),K(7,`Show calls of kind`),I(),M(8,$6,5,6,`label`,59,Xh),I(),F(10,`div`,60)(11,`button`,61),H(`click`,function(){return C(e),w(W(2).clearCalls())}),K(12,` Clear calls `),I(),F(13,`span`,62),K(14),I()()(),F(15,`div`,63)(16,`app-search-field`,64),w_(`valueChange`,function(t){C(e);let n=W(2);return C_(n.callQuery,t)||(n.callQuery=t),w(t)}),I(),F(17,`label`,65)(18,`input`,66),H(`change`,function(t){return C(e),w(W(2).failedOnly.set(t.target.checked))}),I(),K(19,` Failed only `),I(),A(20,e8,3,1,`label`,65),F(21,`span`,67),K(22),I()(),A(23,r8,3,2,`p`,68),A(24,h8,19,0,`div`,69)(25,v8,9,1,`div`,70)(26,Mre,8,2,`div`,71),F(27,`h2`),K(28,`API routes`),I(),F(29,`div`,72)(30,`table`)(31,`thead`)(32,`tr`)(33,`th`,30),K(34,`Method`),I(),F(35,`th`,30),K(36,`Path`),I(),F(37,`th`,30),K(38,`File`),I(),F(39,`th`,30)(40,`span`,31),K(41,`Actions`),I()()()(),F(42,`tbody`),M(43,Nre,14,7,`tr`,null,l6,!1,Pre,3,0,`tr`),I()()(),A(46,Ire,17,0),L(47,`app-analog-playground`,73)}if(e&2){let e=W(2);j(e.duplicates().length?0:-1),D(),j(e.refetchedFns().length?1:-1),D(7),N(e.kinds),D(3),P(`disabled`,!e.allCalls().length),D(3),q(e.callsMessage()),D(2),S_(`value`,e.callQuery),D(2),P(`checked`,e.failedOnly()),D(2),j(e.scopePageId()?20:-1),D(2),Y(``,e.matchingCalls().length,` of `,e.tabCalls().length),D(),j(e.shownCount()<e.matchingCalls().length||e.serverFull()?23:-1),D(),j(e.calls().length?24:e.tabCalls().length&&e.callFiltered()?25:26),D(19),N(e.project().api),D(3),j(e.serverFns().length?46:-1),D(),P(`rpc`,e.rpc())(`routes`,e.project().api)(`target`,e.tryTarget())(`origin`,e.devOrigin())}}function Rre(e,t){if(e&1&&K(0),e&2){let e=t.$implicit;J(` `,e,` `)}}function zre(e,t){if(e&1&&(F(0,`p`,90),K(1,` The analog() options in vite.config could not be read in full, so these modes and the prerender plan may be incomplete. `),M(2,Rre,1,1,null,null,Xh),I()),e&2){let e=W(3);D(2),N(e.plan().configPartial)}}function Bre(e,t){if(e&1&&(F(0,`span`,38),K(1),I()),e&2){let e=t.$implicit;k(`data-mode`,e.mode),D(),Y(``,e.label,` · `,e.count)}}function Vre(e,t){if(e&1&&(F(0,`div`,36),M(1,Bre,2,3,`span`,38,d6),I()),e&2){let e=W(3);D(),N(e.modeCounts())}}function Hre(e,t){e&1&&(F(0,`span`,95),K(1,`differs from config`),I())}function Ure(e,t){if(e&1&&(F(0,`div`,46)(1,`span`,81),K(2),I(),F(3,`span`,94),K(4),I(),A(5,Hre,2,0,`span`,95),I()),e&2){let e=t,n=W().$implicit,r=W(3);D(),k(`data-status`,r.statusClass(e.status)),D(),q(e.status),D(2),Y(``,e.render===`client`?`client only`:`server rendered`,` · `,e.ms,` ms`),D(),j(r.mismatch(n)?5:-1)}}function Wre(e,t){e&1&&(F(0,`span`,93),K(1,`not requested yet`),I())}function Gre(e,t){e&1&&(F(0,`span`,96),K(1,`Checking…`),I())}function Kre(e,t){if(e&1&&(F(0,`span`,97),K(1),I()),e&2){let e=W();D(),q(e.error)}}function qre(e,t){if(e&1&&(F(0,`span`,93),K(1),I()),e&2){let e=W(2);D(),q(e.note)}}function Jre(e,t){if(e&1&&(F(0,`div`,46)(1,`span`,38),K(2),I(),F(3,`span`,38),K(4),I(),A(5,qre,2,1,`span`,93),I()),e&2){let e=W(),t=W(4);D(),k(`data-mode`,e.observed),D(),q(t.modeLabel(e.observed)),D(),k(`data-tone`,e.matches?`good`:`warn`),D(),q(e.matches?`fits the config`:`differs from config`),D(),j(e.note?5:-1)}}function Yre(e,t){if(e&1&&A(0,Gre,2,0,`span`,96)(1,Kre,2,1,`span`,97)(2,Jre,6,5,`div`,46),e&2){let e=t;j(e===`running`?0:e.error?1:2)}}function Xre(e,t){if(e&1&&(F(0,`app-source-link`,45)(1,`span`,51),K(2),I(),K(3),I()),e&2){let e=W().$implicit,t=W(3);P(`file`,e.file),D(2),q(t.dir(e.file)),D(),q(t.base(e.file))}}function Zre(e,t){if(e&1){let e=B();F(0,`tr`)(1,`td`,43),K(2),I(),F(3,`td`)(4,`div`,46)(5,`span`,38),K(6),I(),F(7,`span`,93),K(8),I()()(),F(9,`td`),A(10,Ure,6,5,`div`,46)(11,Wre,2,0,`span`,93),I(),F(12,`td`),A(13,Yre,3,1),F(14,`button`,61),H(`click`,function(){let t=C(e).$implicit;return w(W(3).checkRender(t.path))}),K(15,` Check `),I()(),F(16,`td`),A(17,Xre,4,3,`app-source-link`,45),I()()}if(e&2){let e,n,r=t.$implicit,i=W(3);D(2),q(r.path),D(3),k(`data-mode`,r.mode),D(),q(i.modeLabel(r.mode)),D(2),q(r.reason),D(2),j((e=r.last)?10:11,e),D(3),j((n=i.checks()[r.path])?13:-1,n),D(),P(`disabled`,i.checks()[r.path]===`running`),k(`aria-label`,`Request `+r.path+` and check its render mode`),D(3),j(r.file?17:-1)}}function Qre(e,t){e&1&&(F(0,`tr`)(1,`td`,53),K(2,` No page routes to render yet. Add a .page.ts file under src/app/pages. `),I()())}function $re(e,t){e&1&&(F(0,`p`,4),K(1,` prerender.routes is a function, so the list is known only at build time. `),I())}function eie(e,t){if(e&1&&(F(0,`span`,39),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function tie(e,t){e&1&&(F(0,`span`,93),K(1,`default, nothing configured`),I())}function nie(e,t){if(e&1&&(F(0,`span`,39),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function rie(e,t){if(e&1&&(F(0,`dt`),K(1,`From routeRules`),I(),F(2,`dd`),M(3,nie,2,1,`span`,39,Xh),I()),e&2){let e=W(2);D(3),N(e.fromRules)}}function iie(e,t){if(e&1&&(F(0,`span`,100),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function aie(e,t){if(e&1&&(F(0,`dt`),K(1,`Static, not listed`),I(),F(2,`dd`),M(3,iie,2,1,`span`,100,Xh),I()),e&2){let e=W(2);D(3),N(e.staticMissing)}}function oie(e,t){if(e&1&&(F(0,`span`,39),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function sie(e,t){if(e&1&&(F(0,`dt`),K(1,`Need explicit entries`),I(),F(2,`dd`),M(3,oie,2,1,`span`,39,Xh),I()),e&2){let e=W(2);D(3),N(e.dynamic)}}function cie(e,t){if(e&1&&(F(0,`span`,101),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function lie(e,t){if(e&1&&(K(0,` · missing `),M(1,cie,2,1,`span`,101,Xh)),e&2){let e=W(3);D(),N(e.notBuilt)}}function uie(e,t){if(e&1&&(K(0),A(1,lie,3,0)),e&2){let e=W(2);J(` `,W(3).plural(e.built.length,`page`),` in dist/analog/public `),D(),j(e.notBuilt.length?1:-1)}}function die(e,t){e&1&&(F(0,`span`,93),K(1,`no build yet`),I())}function fie(e,t){if(e&1&&(F(0,`dl`,98)(1,`dt`),K(2,`Listed`),I(),F(3,`dd`),M(4,eie,2,1,`span`,39,Xh),A(6,tie,2,0,`span`,93),I(),A(7,rie,5,0),A(8,aie,5,0),A(9,sie,5,0),F(10,`dt`),K(11,`Build output`),I(),F(12,`dd`,99),A(13,uie,2,2)(14,die,2,0,`span`,93),I()()),e&2){let e=W();D(4),N(e.listed??L_(5,a6)),D(2),j(e.listed?-1:6),D(),j(e.fromRules?.length?7:-1),D(),j(e.staticMissing.length?8:-1),D(),j(e.dynamic.length?9:-1),D(4),j(e.built.length?13:14)}}function pie(e,t){e&1&&(F(0,`div`,92)(1,`h2`),K(2,`Prerender plan`),I(),A(3,$re,2,0,`p`,4)(4,fie,15,6,`dl`,98),I()),e&2&&(D(3),j(t.dynamicConfig?3:4))}function mie(e,t){if(e&1&&(A(0,zre,4,0,`p`,90),A(1,Vre,3,0,`div`,36),F(2,`div`,91)(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,30),K(7,`Route`),I(),F(8,`th`,30),K(9,`Configured`),I(),F(10,`th`,30),K(11,`Last request`),I(),F(12,`th`,30),K(13,`Dev server check`),I(),F(14,`th`,30),K(15,`File`),I()()(),F(16,`tbody`),M(17,Zre,18,9,`tr`,null,u6,!1,Qre,3,0,`tr`),I()()(),A(20,pie,5,1,`div`,92),L(21,`app-analog-build`,16)),e&2){let e,t=W(2);j(t.plan()?.configPartial?.length?0:-1),D(),j(t.modeCounts().length?1:-1),D(16),N(t.renderRows()),D(3),j((e=t.plan())?20:-1,e),D(),P(`rpc`,t.rpc())}}function hie(e,t){if(e&1&&(F(0,`div`)(1,`span`,97),K(2),I()()),e&2){let e=W().$implicit;D(2),q(e.error)}}function gie(e,t){if(e&1&&(F(0,`div`)(1,`span`,95),K(2),I()()),e&2){let e=W(5);D(2),J(`takes over `,e.base(t))}}function _ie(e,t){if(e&1&&(F(0,`div`)(1,`span`,95),K(2),I()()),e&2){let e=W().$implicit,t=W(4);D(2),q(t.plural(e.schemaErrors.length,`schema problem`))}}function vie(e,t){if(e&1){let e=B();F(0,`tr`)(1,`td`)(2,`strong`),K(3),I(),A(4,hie,3,1,`div`),A(5,gie,3,1,`div`),A(6,_ie,3,1,`div`),I(),F(7,`td`,43),K(8),I(),F(9,`td`,34),K(10),I(),F(11,`td`,105),K(12),I(),F(13,`td`)(14,`app-source-link`,45)(15,`span`,51),K(16),I(),K(17),I()(),F(18,`td`,49)(19,`button`,52),H(`click`,function(){let t=C(e).$implicit;return w(W(4).showPreview(t.file))}),K(20,` Preview `),I()()()}if(e&2){let e,n=t.$implicit,r=W(4);D(3),q(n.attributes.title||`(no title)`),D(),j(n.error?4:-1),D(),j((e=r.shadowed(n.file))?5:-1,e),D(),j(n.schemaErrors?.length?6:-1),D(2),q(r.contentUrl(n.file)??``),D(2),q(n.slug),D(2),q(n.attributes.date||``),D(2),P(`file`,n.file),D(2),q(r.dir(n.file)),D(),q(r.base(n.file)),D(2),k(`aria-label`,`Preview `+n.file)(`aria-pressed`,r.previewFile()===n.file)}}function yie(e,t){if(e&1&&(F(0,`div`,102)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,30),K(5,`Title`),I(),F(6,`th`,30),K(7,`URL`),I(),F(8,`th`,30),K(9,`Slug`),I(),F(10,`th`,30),K(11,`Date`),I(),F(12,`th`,30),K(13,`File`),I(),F(14,`th`,30)(15,`span`,31),K(16,`Actions`),I()()()(),F(17,`tbody`),M(18,vie,21,12,`tr`,null,f6),I()()()),e&2){let e=W(3);D(18),N(e.project().content)}}function bie(e,t){e&1&&(F(0,`div`,71)(1,`p`,85),K(2,`No markdown files under src/content.`),I(),F(3,`p`,4),K(4,` Add a .md file there to see its title, slug, date and the URL it serves. `),I()())}function xie(e,t){if(e&1&&(F(0,`span`,97),K(1),I()),e&2){let e=W();D(),q(e.error)}}function Sie(e,t){if(e&1&&(F(0,`span`,93),K(1),I()),e&2){let e=W(2);D(),J(` (skips `,e.unsupported.join(`, `),`)`)}}function Cie(e,t){if(e&1&&(F(0,`span`,34),K(1),I(),A(2,Sie,2,1,`span`,93)),e&2){let e=W();D(),q(e.file),D(),j(e.unsupported?.length?2:-1)}}function wie(e,t){e&1&&A(0,xie,2,1,`span`,97)(1,Cie,3,2),e&2&&j(+!t.error)}function Tie(e,t){e&1&&(F(0,`span`,93),K(1,`none; set `),F(2,`code`),K(3,`analog.contentSchema`),I(),K(4,` to check frontmatter`),I())}function Eie(e,t){if(e&1&&(F(0,`app-source-link`,106),K(1),I()),e&2){let e=t.$implicit,n=W(4);P(`file`,e.file)(`line`,e.line),D(),y_(``,e.api,` · `,n.base(e.file),`:`,e.line)}}function Die(e,t){e&1&&(F(0,`span`,93),K(1,`no injectContentFiles, injectContent or contentFilesSource call under src`),I())}function Oie(e,t){if(e&1&&(F(0,`dl`,103)(1,`dt`),K(2,`Schema`),I(),F(3,`dd`),A(4,wie,2,1)(5,Tie,5,0,`span`,93),I(),F(6,`dt`),K(7,`Read by`),I(),F(8,`dd`),M(9,Eie,2,5,`app-source-link`,106,p6,!1,Die,2,0,`span`,93),I()()),e&2){let e,t=W(3);D(4),j((e=t.project().contentSchema)?4:5,e),D(5),N(t.project().contentUsage??L_(2,i6))}}function kie(e,t){if(e&1){let e=B();F(0,`app-analog-content-preview`,107),H(`closed`,function(){let t=C(e);return w(W(3).closePreview(t))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`file`,t)(`schema`,e.project().contentSchema?.error?void 0:e.project().contentSchema?.file)}}function Aie(e,t){if(e&1&&(A(0,yie,20,0,`div`,102)(1,bie,5,0,`div`,71),A(2,Oie,12,3,`dl`,103),A(3,kie,1,3,`app-analog-content-preview`,104)),e&2){let e,t=W(2);j(+!t.project().content.length),D(2),j(t.project().content.length?2:-1),D(),j((e=t.previewFile())?3:-1,e)}}function jie(e,t){if(e&1&&L(0,`app-analog-data`,15),e&2){let e=W(2);P(`rpc`,e.rpc())(`page`,e.page())(`serverFns`,e.serverFns())(`duplicates`,e.state().duplicates??L_(5,i6))(`refetches`,e.state().refetches??L_(6,i6))}}function Mie(e,t){e&1&&L(0,`app-analog-runtime`,16),e&2&&P(`rpc`,W(2).rpc())}function Nie(e,t){if(e&1&&(F(0,`span`,19),K(1),I()),e&2){let e=W().$implicit;D(),q(e.items.length)}}function Pie(e,t){if(e&1&&(F(0,`app-source-link`,45)(1,`span`,51),K(2),I(),K(3),I()),e&2){let e=W().$implicit,t=W(5);P(`file`,e.file),D(2),q(t.dir(e.file)),D(),q(t.base(e.file))}}function Fie(e,t){if(e&1&&(F(0,`span`,43),K(1),I()),e&2){let e=W().$implicit;D(),q(e.path)}}function Iie(e,t){if(e&1&&(F(0,`p`,115),K(1),I()),e&2){let e=W().$implicit;D(),q(e.message)}}function Lie(e,t){if(e&1&&(F(0,`li`),A(1,Pie,4,3,`app-source-link`,45),A(2,Fie,2,1,`span`,43),A(3,Iie,2,1,`p`,115),I()),e&2){let e=t.$implicit;D(),j(e.file?1:-1),D(),j(e.path&&e.path!==e.file?2:-1),D(),j(e.message?3:-1)}}function Rie(e,t){if(e&1&&(F(0,`li`)(1,`div`,110)(2,`span`,38),K(3),I(),F(4,`strong`,111),K(5),I(),A(6,Nie,2,1,`span`,19),I(),F(7,`p`),K(8),I(),F(9,`ul`,112),M(10,Lie,4,3,`li`,null,Yh),I(),F(12,`div`,113)(13,`strong`),K(14,`How to fix`),I(),K(15),I(),F(16,`span`,114),K(17),I()()),e&2){let e=t.$implicit,n=W(4);k(`data-tone`,n.tone(e.severity)),D(2),k(`data-tone`,n.tone(e.severity)),D(),q(e.severity),D(2),q(e.title),D(),j(e.items.length>1?6:-1),D(2),q(e.summary),D(2),N(e.items),D(5),J(` `,e.fix),D(2),q(e.rule)}}function zie(e,t){if(e&1&&(F(0,`p`,4),K(1),I(),F(2,`ul`,109),M(3,Rie,18,8,`li`,null,m6),I()),e&2){let e=W(3);D(),Y(` `,e.plural(e.findings().length,`issue`),` in `,e.plural(e.lintCards().length,`group`),`. Each card says what is wrong, where, and how to fix it. `),D(2),N(e.lintCards())}}function Bie(e,t){e&1&&(F(0,`div`,108)(1,`strong`),K(2,`No Analog problems found.`),I(),K(3,` Routes, server files, prerender config and content all check out. `),I())}function Vie(e,t){e&1&&A(0,zie,5,2)(1,Bie,4,0,`div`,108),e&2&&j(+!W(2).findings().length)}function Hie(e,t){if(e&1){let e=B();F(0,`section`,7)(1,`div`,8)(2,`span`,9),K(3,`Analog`),I(),F(4,`span`,10),K(5),I()(),F(6,`div`,8)(7,`span`,9),K(8,`Pages`),I(),F(9,`span`,10),K(10),I()(),F(11,`div`,8)(12,`span`,9),K(13,`API routes`),I(),F(14,`span`,10),K(15),I()(),F(16,`div`,8)(17,`span`,9),K(18,`Server calls`),I(),F(19,`span`,10),K(20),I()(),F(21,`div`,8)(22,`span`,9),K(23,`Issues`),I(),F(24,`span`,10),K(25),I()(),A(26,v6,5,2,`div`,11),I(),F(27,`div`,12),H(`keydown`,function(t){return C(e),w(W().onKey(t))}),M(28,b6,3,6,`button`,13,o6),I(),F(30,`div`,14),A(31,J6,31,7)(32,Lre,48,17)(33,mie,22,5)(34,Aie,4,3)(35,jie,1,7,`app-analog-data`,15)(36,Mie,1,1,`app-analog-runtime`,16)(37,Vie,2,1),I()}if(e&2){let e,t,n=W();D(5),q(n.project().version||`unknown`),D(5),q(n.pageCount()),D(5),q(n.project().api.length),D(5),q(n.tabCalls().length),D(),k(`data-tone`,n.lintTone()||`good`),D(4),q(n.lintCount().errors+n.lintCount().warnings),D(),j((e=n.page())?26:-1,e),D(2),N(n.views()),D(2),P(`id`,`analog-panel-`+n.view()),k(`aria-labelledby`,`analog-tab-`+n.view()),D(),j((t=n.view())===`routes`?31:t===`server`?32:t===`render`?33:t===`content`?34:t===`data`?35:t===`runtime`?36:t===`lint`?37:-1)}}var Uie={"scan-error":{title:`A folder could not be read`,summary:`Its files are missing from routes, API routes and lint results.`},"duplicate-url":{title:`Two files serve the same URL`,summary:`Only one of them is reachable; the other never renders.`},"sibling-params":{title:`Two dynamic pages in one folder`,summary:`Both are [param] pages at the same level, so the first one always wins.`},"missing-default-export":{title:`Page has no default export`,summary:`Analog needs the component as the default export, so the page renders nothing.`},"redirect-with-component":{title:`Redirect page also exports a component`,summary:`The redirect runs first, so the component never shows.`},"redirect-path-match":{title:`Redirect matches too much`,summary:`An empty-path redirect without pathMatch "full" catches every URL below it.`},"layout-without-outlet":{title:`Layout has no router-outlet`,summary:`The layout has child pages, but without <router-outlet> they never render.`},"server-without-load":{title:`.server.ts without load or action`,summary:`The server file exports no load, action or server function, so Analog calls nothing.`},"orphan-server-file":{title:`.server.ts without a page`,summary:`No page file sits next to it, so its load never runs.`},"api-method-suffix":{title:`Unknown method suffix on an API file`,summary:`The suffix is not an HTTP method, so it becomes part of the URL.`},"duplicate-api-route":{title:`Two handlers for one API route`,summary:`Two files answer the same method and path.`},"api-outside-prefix":{title:`Server route outside the API prefix`,summary:`During vite dev only routes under the prefix reach Nitro.`},"prerender-unknown-route":{title:`Prerender entry matches no page`,summary:`prerender.routes lists a path that no page file serves.`},"prerender-missing-root":{title:`Home page is not prerendered`,summary:`static is on, but prerender.routes leaves out /.`},"content-frontmatter":{title:`Broken frontmatter`,summary:`The markdown frontmatter cannot be read.`},"content-schema":{title:`Frontmatter does not match the content schema`,summary:`The keys or values differ from the JSON Schema that analog.contentSchema names.`},"content-schema-unreadable":{title:`The content schema could not be used`,summary:`analog.contentSchema names a file that is missing, outside the project or not JSON.`},"duplicate-slug":{title:`Two posts share a slug`,summary:`injectContent picks one of them at random.`},"content-shadows-page":{title:`Markdown file takes over a page`,summary:`Files under src/content are routes too, so these URLs render the markdown file instead of the [param] page.`},"load-fetched-twice":{title:`load() runs twice`,summary:`These pages fetched their data while rendering on the server and again in the browser.`},"fn-fetched-twice":{title:`Server function read runs twice`,summary:`These reads ran while rendering on the server and again in the browser right after hydration.`},"restart-needed":{title:`New pages need a restart`,summary:`These page files exist, but the running router does not know them yet.`},"hydration-error":{title:`Hydration error`,summary:`The browser DOM did not match the server HTML.`},"api-not-found":{title:`API call failed with 404 or 405`,summary:`A request hit a path or method that no server route handles.`}},C8=200,Wie=new Set([`missing-default-export`,`redirect-with-component`,`redirect-path-match`,`layout-without-outlet`,`server-without-load`,`orphan-server-file`,`load-fetched-twice`,`restart-needed`,`prerender-missing-root`]),w8={ssr:`SSR`,ssg:`Prerendered`,client:`Client only`,cached:`Cached`,redirect:`Redirect`},Gie={all:`All`,page:`Pages`,load:`load()`,action:`Actions`,fn:`Server fn`,api:`API`},Kie={success:`succeeded`,redirect:`redirected`,invalid:`validation errors`,error:`failed`},qie={success:`good`,redirect:`info`,invalid:`warn`,error:`bad`};function T8(e,t=0,n=[]){for(let r of e)n.push({route:r,depth:t}),T8(r.children,t+1,n);return n}var Jie=class e{plural=JE;rpc=$(null);kinds=[`all`,`page`,`load`,`action`,`fn`,`api`];view=E(`routes`);project=E(null);loadFailed=E(!1);state=E({});findings=E([]);renderRows=E([]);plan=E(null);filter=E(``);testUrl=E(``);explained=E(null);explainError=E(``);explaining=E(!1);kind=E(`all`);devOrigin=X(()=>{let e=this.page()?.url??``;if(/^https?:\/\//.test(e))try{return new URL(e).origin}catch{return``}return/^https?:$/.test(location.protocol)?location.origin:``});transformFile=E(null);previewFile=E(null);checks=E({});tryTarget=Q({source:this.view,computation:()=>null});tryNonce=0;unsubscribe=null;refreshTimer;refreshRun=0;destroyRef=S(vs);host=S(kl);hostPageId=fT();page=X(()=>{let e=this.state().pages??[];return(this.hostPageId?e.find(e=>e.pageId===this.hostPageId):e[0])??null});openFiles=X(()=>{let e=new Map;for(let t of this.page()?.chain??[])t.file&&(!e.has(t.file)||!t.outlet)&&e.set(t.file,t.outlet??``);return e});allCalls=X(()=>this.state().calls??[]);scopePageId=X(()=>this.page()?.pageId);allTabs=E(!1);tabCalls=X(()=>{let e=this.scopePageId(),t=this.allCalls();return this.allTabs()||!e?t:t.filter(t=>t.pageId===e)});maxServerCalls=C8;callQuery=E(``);failedOnly=E(!1);callsMessage=E(``);callFiltered=X(()=>!!this.callQuery().trim()||this.failedOnly());matchingCalls=X(()=>{let e=this.kind(),t=this.callQuery().trim().toLowerCase(),n=this.failedOnly();return this.tabCalls().filter(r=>(e===`all`||r.kind===e)&&(!n||this.isFailed(r))&&(!t||this.callText(r).includes(t)))});calls=X(()=>this.matchingCalls().slice(-150).reverse());shownCount=X(()=>this.calls().length);serverFull=X(()=>this.allCalls().length>=C8);allRoutes=X(()=>T8(this.project()?.routes??[]));pageCount=X(()=>this.allRoutes().filter(e=>e.route.file&&e.route.kind!==`layout`).length);routeRows=X(()=>{let e=this.filter().trim().toLowerCase();return e?this.allRoutes().filter(t=>t.route.fullPath.toLowerCase().includes(e)||!!t.route.file?.toLowerCase().includes(e)):this.allRoutes()});serverFns=X(()=>this.project()?.serverFns??[]);fnById=X(()=>new Map(this.serverFns().map(e=>[e.id,e])));shownRoutes=X(()=>new Set(this.tabCalls().map(e=>`${e.kind} ${e.route??``}`)));refetchedFns=X(()=>Array.from(new Set((this.state().refetches??[]).filter(e=>this.shownRoutes().has(`fn ${e.id}`)).map(e=>this.fnById().get(e.id)?.name??e.id))));duplicates=X(()=>Array.from(new Set((this.state().duplicates??[]).filter(e=>this.shownRoutes().has(`load ${e.route}`)).map(e=>e.route))));modeCounts=X(()=>[`ssr`,`ssg`,`cached`,`client`,`redirect`].map(e=>({mode:e,label:w8[e],count:this.renderRows().filter(t=>t.mode===e).length})).filter(e=>e.count));lintCards=X(()=>{let e={error:0,warning:1,info:2},t=new Map;for(let e of this.findings()){let n=t.get(e.rule);if(!n){let r=Uie[e.rule];n={rule:e.rule,severity:e.severity,title:r?.title??e.rule,summary:r?.summary??e.message,fix:e.fix,items:[]},t.set(e.rule,n)}let r=Wie.has(e.rule)||e.message===n.summary?void 0:e.message;n.items.some(t=>t.file===e.file&&t.path===e.path&&t.message===r)||n.items.push({file:e.file,path:e.path,message:r})}return Array.from(t.values()).sort((t,n)=>e[t.severity]-e[n.severity])});lintCount=X(()=>{let e=this.findings();return{errors:e.filter(e=>e.severity===`error`).length,warnings:e.filter(e=>e.severity===`warning`).length}});lintTone=X(()=>{let{errors:e,warnings:t}=this.lintCount();return e?`bad`:t?`warn`:``});views=X(()=>{let{errors:e,warnings:t}=this.lintCount();return[{id:`routes`,label:`Routes`,count:this.pageCount(),tone:``},{id:`server`,label:`Server`,count:this.tabCalls().length,tone:``},{id:`render`,label:`Render`,count:this.renderRows().length,tone:``},{id:`content`,label:`Content`,count:this.project()?.content.length??0,tone:``},{id:`data`,label:`Data`,count:null,tone:``},{id:`runtime`,label:`Runtime`,count:null,tone:``},{id:`lint`,label:`Lint`,count:e+t,tone:this.lintTone()}]});constructor(){ac(()=>{let e=this.rpc();e&&Z(()=>void this.load(e))}),ac(()=>{let e=this.view();this.state(),Z(()=>this.scheduleRefresh(e))}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),clearTimeout(this.refreshTimer)})}async load(e){let t=await vT(e,`analog-project`);if(!this.destroyRef.destroyed){this.project.set(t),this.loadFailed.set(t===null);try{let t=await e.scope(`pangular`).rpc.sharedState(`analog`);if(this.destroyRef.destroyed)return;let n=e=>this.state.set(e??{});n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.state.set({})}this.destroyRef.destroyed||await this.refresh(this.view())}}retry(){let e=this.rpc();e&&(this.loadFailed.set(!1),this.load(e))}scheduleRefresh(e){clearTimeout(this.refreshTimer),this.refreshTimer=setTimeout(()=>void this.refresh(e),300)}async refresh(e){let t=this.rpc();if(!t)return;let n=++this.refreshRun,[r,i]=await Promise.all([vT(t,`analog-lint`,this.hostPageId??void 0),vT(t,`analog-render`)]);if(n===this.refreshRun&&(this.findings.set(r??[]),this.renderRows.set(i?.rows??[]),this.plan.set(i?.plan??null),e===`routes`||e===`content`||this.project()===null)){let e=await vT(t,`analog-project`);e&&n===this.refreshRun&&(this.project.set(e),this.loadFailed.set(!1))}}isOpen(e){return!!e.file&&this.openFiles().has(e.file)}openText(e){let t=e.file?this.openFiles().get(e.file):void 0;return t?`open in ${t}`:`open`}kindText(e){return e.catchAll?e.catchAll===`optional`?`optional catch-all`:`catch-all`:e.kind===`implicit`?`folder`:e.kind}serverExports(e){return(e.serverExports??[]).filter(e=>e===`load`||e===`action`)}short(e){return e?.replace(/^\/src\/app\//,``).replace(/^\//,``)}dir(e){let t=this.short(e)??e;return t.includes(`/`)?t.slice(0,t.lastIndexOf(`/`)+1):``}base(e){return e.slice(e.lastIndexOf(`/`)+1)}paramList(e){return Object.entries(e)}kindLabel(e){return Gie[e]}kindCount(e){return e===`all`?this.tabCalls().length:this.tabCalls().filter(t=>t.kind===e).length}modeLabel(e){return w8[e]}mismatch(e){return!e.last?.render||e.mode===`redirect`?!1:e.mode===`client`?e.last.render!==`client`:e.last.render===`client`}fnOf(e){return e.kind===`fn`&&e.route?this.fnById().get(e.route):void 0}fnCalls(e){return this.tabCalls().filter(t=>t.kind===`fn`&&t.route===e).length}outcomeLabel(e){return Kie[e]}outcomeTone(e){return qie[e]}statusClass(e){return e>=500||e===0?`bad`:e>=400?`warn`:`good`}tone(e){return e===`error`?`bad`:e===`warning`?`warn`:`info`}shadowed(e){return this.findings().find(t=>t.rule===`content-shadows-page`&&t.file===e)?.relatedFile}contentUrl(e){return this.allRoutes().find(t=>t.route.file===e)?.route.fullPath}pretty(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}time=GE;showTransform(e){this.transformFile.set(this.transformFile()===e?null:e)}closeTransform(e){this.transformFile.set(null),this.refocus(`Show the Vite transform stack of ${e}`)}showPreview(e){this.previewFile.set(this.previewFile()===e?null:e)}closePreview(e){this.previewFile.set(null),this.refocus(`Preview ${e}`)}refocus(e){queueMicrotask(()=>this.host.nativeElement.querySelector(`button[aria-label="${CSS.escape(e)}"]`)?.focus())}async checkRender(e){this.checks.update(t=>({...t,[e]:`running`}));let t=await vT(this.rpc(),`analog-render-check`,e);this.checks.update(n=>({...n,[e]:t??{path:e,error:`No answer from the devtools server.`}}))}tryApi(e){this.tryTarget.set({route:e,nonce:++this.tryNonce})}isFailed(e){return!e.status||e.status>=400||e.outcome===`error`}callText(e){let t=this.fnOf(e);return[e.url,e.route,t?.name,t?.file].filter(Boolean).join(` `).toLowerCase()}clearCallFilters(){this.callQuery.set(``),this.failedOnly.set(!1),this.kind.set(`all`),queueMicrotask(()=>this.host.nativeElement.querySelector(`#analog-call-search`)?.focus())}async clearCalls(){let e=this.rpc();try{if(!e)throw Error(`No devtools server`);await _T(e,`analog-clear-calls`),this.callsMessage.set(`Calls cleared.`),queueMicrotask(()=>this.host.nativeElement.querySelector(`input[name="analog-kind"]:checked`)?.focus())}catch{this.callsMessage.set(`Could not clear the calls.`)}}async explain(){let e=this.testUrl().trim();if(!e){this.explained.set(null),this.explainError.set(`Type a URL to explain, for example /products/42.`);return}this.explaining.set(!0),this.explainError.set(``);try{let t=await _T(this.rpc(),`analog-explain-url`,e);if(!t)throw Error(`The devtools server did not answer`);this.explained.set({url:e,match:t})}catch(t){let n=String(t?.message||`The devtools server did not answer`);this.explained.set(null),this.explainError.set(`Could not explain ${e}. ${n.replace(/\.?$/,`.`)}`)}finally{this.explaining.set(!1)}}onKey(e){let t=this.views().map(e=>e.id),n=t.indexOf(this.view()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.view.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#analog-tab-${t[r]}`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-analog-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`role`,`alert`,1,`empty`],[`role`,`status`,1,`loading`],[1,`empty`],[1,`empty-title`],[1,`muted`],[`type`,`button`,1,`btn`,3,`click`],[`aria-hidden`,`true`,1,`spinner`],[`aria-label`,`Analog summary`,1,`summary`],[1,`stat`],[1,`label`],[1,`value`],[1,`stat`,`wide`],[`role`,`tablist`,`aria-label`,`Analog views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[3,`rpc`,`page`,`serverFns`,`duplicates`,`refetches`],[3,`rpc`],[1,`value`,`mono`,3,`title`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`count`],[1,`toolbar`],[1,`inline`,`explain`,3,`submit`],[`for`,`analog-url`],[`id`,`analog-url`,`type`,`text`,`placeholder`,`/products/42`,1,`field`,`grow`,`mono`,3,`input`,`value`],[`type`,`submit`,1,`btn`,`primary`,3,`disabled`],[`inputId`,`route-filter`,`placeholder`,`Filter by path or file`,`saveKey`,`analog-routes`,1,`filter`,3,`valueChange`,`value`],[`role`,`status`,1,`explain-result`],[`data-tone`,`bad`,1,`callout`],[1,`callout`],[`role`,`region`,`aria-label`,`File routes`,`tabindex`,`0`,1,`table-wrap`],[`scope`,`col`],[1,`sr-only`],[3,`open`,`dim`],[3,`rpc`,`file`,`serverFns`],[1,`mono`],[1,`chain`],[1,`chips`],[1,`mono`,3,`file`],[1,`pill`],[1,`chip`,`mono`],[1,`plain`],[1,`route`],[`aria-hidden`,`true`,1,`guide`],[1,`mono`,`path`],[1,`pill`,`live`],[1,`file`,3,`file`],[1,`meta`],[`data-kind`,`load`,1,`pill`],[1,`chip`],[1,`actions`],[`type`,`button`,1,`btn`,`ghost`],[1,`dir`],[`type`,`button`,1,`btn`,`ghost`,3,`click`],[`colspan`,`5`,1,`empty-row`],[3,`closed`,`rpc`,`file`,`serverFns`],[`data-tone`,`warn`,`role`,`note`,1,`callout`],[`id`,`analog-calls-heading`],[1,`calls-bar`],[1,`segmented`],[3,`on`],[1,`calls-actions`],[`type`,`button`,1,`btn`,`ghost`,3,`click`,`disabled`],[`role`,`status`,1,`calls-message`],[`role`,`group`,`aria-label`,`Filter the server calls`,1,`call-filters`],[`inputId`,`analog-call-search`,`placeholder`,`Filter by URL, path or function`,`saveKey`,`analog-calls`,1,`search`,3,`valueChange`,`value`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[`aria-live`,`polite`,1,`total`],[1,`note`],[`role`,`region`,`aria-label`,`Server calls`,`tabindex`,`0`,1,`table-wrap`],[`role`,`status`,1,`empty-box`,`no-match`],[1,`empty-box`],[`role`,`region`,`aria-label`,`API routes`,`tabindex`,`0`,1,`table-wrap`],[3,`rpc`,`routes`,`target`,`origin`],[`type`,`radio`,`name`,`analog-kind`,1,`sr-only`,3,`change`,`checked`],[`type`,`checkbox`,`data-testid`,`analog-all-tabs`,3,`change`,`checked`],[`scope`,`col`,1,`num`],[1,`muted`,`nowrap`],[1,`request`],[1,`method`],[1,`mono`,`url`],[1,`status`],[1,`num`,`nowrap`],[1,`mono`,`muted`,3,`file`],[1,`code`],[1,`empty-lead`],[1,`empty-actions`],[`colspan`,`4`,1,`empty-row`],[`role`,`region`,`aria-label`,`Server functions`,`tabindex`,`0`,1,`table-wrap`],[1,`num`,`tnum`],[`role`,`status`,1,`note`],[`role`,`region`,`aria-label`,`Render modes`,`tabindex`,`0`,1,`table-wrap`],[1,`card`],[1,`muted`,`small`],[1,`muted`,`small`,`tnum`],[`data-tone`,`warn`,1,`pill`],[`role`,`status`,1,`muted`,`small`],[`data-tone`,`bad`,1,`pill`],[1,`facts`],[1,`tnum`],[`data-tone`,`warn`,1,`chip`,`mono`],[`data-tone`,`bad`,1,`chip`,`mono`],[`role`,`region`,`aria-label`,`Content files`,`tabindex`,`0`,1,`table-wrap`],[1,`facts`,`content-facts`],[3,`rpc`,`file`,`schema`],[1,`muted`,`nowrap`,`tnum`],[1,`chip`,`mono`,3,`file`,`line`],[3,`closed`,`rpc`,`file`,`schema`],[`data-tone`,`good`,`role`,`status`,1,`callout`],[1,`findings`],[1,`finding-head`],[1,`finding-title`],[1,`where`],[1,`fix`],[1,`rule`,`mono`],[1,`detail`]],template:function(e,t){e&1&&A(0,h6,7,0,`div`,0)(1,g6,4,0,`div`,1)(2,_6,14,0,`div`,2)(3,Hie,38,10),e&2&&j(t.project()===null&&t.loadFailed()?0:t.project()===null?1:t.project().analog?3:2)},dependencies:[nP,Cj,E2,U2,x4,n3,U3,r6],styles:[`@charset "UTF-8"; [_nghost-%COMP%] { --%NS%good: var(--%NS%ok); --%NS%bad: var(--%NS%danger); @@ -21164,7 +21178,7 @@ h2[_ngcontent-%COMP%] { color: var(--%NS%text-strong); font-size: 15px; font-weight: 600; -}`]})},Wie=(e,t)=>t.id,Gie=(e,t)=>t.name;function Kie(e,t){if(e&1&&(R(0,`div`,5)(1,`dt`),K(2),z(),R(3,`dd`),K(4),z()()),e&2){let e=t.$implicit;D(2),q(e.name),D(),G(`masked`,e.masked),D(),q(e.value)}}function qie(e,t){if(e&1&&(R(0,`dl`),M(1,Kie,5,4,`div`,5,Gie),z()),e&2){let e=W().$implicit;D(),N(e.rows)}}function Jie(e,t){if(e&1&&(R(0,`p`,4),K(1),z()),e&2){let e=W().$implicit;D(),q(e.none)}}function Yie(e,t){if(e&1&&(R(0,`section`,1)(1,`h4`,3),K(2),z(),A(3,qie,3,0,`dl`)(4,Jie,2,1,`p`,4),z()),e&2){let e=t.$implicit;k(`aria-labelledby`,e.id),D(),V(`id`,e.id),D(),Y(``,e.title,` (`,e.rows.length,`)`),D(),j(e.rows.length?3:4)}}var Xie=class e{callId=$(``);request=$(void 0);response=$(void 0);sides=X(()=>[{id:`req-headers-${this.callId()}`,title:`Request headers`,rows:E8(this.request()),none:`None recorded.`},{id:`res-headers-${this.callId()}`,title:`Response headers`,rows:E8(this.response()),none:`None recorded. A cross-origin response shows only the headers CORS exposes.`}]);static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-http-headers`]],inputs:{callId:[1,`callId`],request:[1,`request`],response:[1,`response`]},decls:8,vars:0,consts:[[1,`headers`],[1,`side`],[1,`note`],[3,`id`],[1,`none`],[1,`row`]],template:function(e,t){e&1&&(R(0,`div`,0),M(1,Yie,5,5,`section`,1,Wie),z(),R(3,`p`,2),K(4,` Request headers are the ones the call had when it reached `),R(5,`code`),K(6,`withPangular()`),z(),K(7,`, before later interceptors added theirs. Credentials, cookies and secret values are masked. `),z()),e&2&&(D(),N(t.sides()))},styles:[`[_nghost-%COMP%] { +}`]})},Yie=(e,t)=>t.id,Xie=(e,t)=>t.name;function Zie(e,t){if(e&1&&(R(0,`div`,5)(1,`dt`),K(2),z(),R(3,`dd`),K(4),z()()),e&2){let e=t.$implicit;D(2),q(e.name),D(),G(`masked`,e.masked),D(),q(e.value)}}function Qie(e,t){if(e&1&&(R(0,`dl`),M(1,Zie,5,4,`div`,5,Xie),z()),e&2){let e=W().$implicit;D(),N(e.rows)}}function $ie(e,t){if(e&1&&(R(0,`p`,4),K(1),z()),e&2){let e=W().$implicit;D(),q(e.none)}}function eae(e,t){if(e&1&&(R(0,`section`,1)(1,`h4`,3),K(2),z(),A(3,Qie,3,0,`dl`)(4,$ie,2,1,`p`,4),z()),e&2){let e=t.$implicit;k(`aria-labelledby`,e.id),D(),V(`id`,e.id),D(),Y(``,e.title,` (`,e.rows.length,`)`),D(),j(e.rows.length?3:4)}}var tae=class e{callId=$(``);request=$(void 0);response=$(void 0);sides=X(()=>[{id:`req-headers-${this.callId()}`,title:`Request headers`,rows:E8(this.request()),none:`None recorded.`},{id:`res-headers-${this.callId()}`,title:`Response headers`,rows:E8(this.response()),none:`None recorded. A cross-origin response shows only the headers CORS exposes.`}]);static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-http-headers`]],inputs:{callId:[1,`callId`],request:[1,`request`],response:[1,`response`]},decls:8,vars:0,consts:[[1,`headers`],[1,`side`],[1,`note`],[3,`id`],[1,`none`],[1,`row`]],template:function(e,t){e&1&&(R(0,`div`,0),M(1,eae,5,5,`section`,1,Yie),z(),R(3,`p`,2),K(4,` Request headers are the ones the call had when it reached `),R(5,`code`),K(6,`withPangular()`),z(),K(7,`, before later interceptors added theirs. Credentials, cookies and secret values are masked. `),z()),e&2&&(D(),N(t.sides()))},styles:[`[_nghost-%COMP%] { display: block; margin-top: 12px; } @@ -21231,7 +21245,7 @@ dd.masked[_ngcontent-%COMP%] { .note[_ngcontent-%COMP%] { margin-top: 8px; -}`]})};function E8(e){return Object.entries(e??{}).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>({name:e,value:t,masked:t.includes(`[redacted]`)}))}var Zie=(e,t)=>t.key,Qie=(e,t)=>t.call.id;function $ie(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,14),H(`click`,function(){let t=C(e).$implicit;return w(W(3).open.emit(t.call.id))}),F(2,`span`,15)(3,`span`,16),K(4),I(),F(5,`span`,17),K(6),I()(),F(7,`span`,18),L(8,`span`),I(),F(9,`span`,19)(10,`span`),K(11),I(),K(12),I()()()}if(e&2){let e=t.$implicit,n=W(3);D(),G(`selected`,n.selectedId()===e.call.id),k(`data-call-id`,e.call.id)(`aria-pressed`,n.selectedId()===e.call.id)(`aria-label`,e.label)(`aria-controls`,n.selectedId()?`call-preview`:null),D(3),q(e.call.method),D(),P(`title`,e.call.url),D(),q(n.pathOf(e.call.url)),D(2),Zg(`bar `+e.tone),Xg(`left`,e.left,`%`)(`width`,e.width,`%`),D(2),Zg(`status status-`+e.tone),D(),q(e.status),D(),Y(` · +`,e.offsetMs,` ms · `,e.call.durationMs,` ms`)}}function eae(e,t){if(e&1&&(F(0,`section`,7)(1,`h3`,8)(2,`span`,9),K(3),I(),F(4,`span`,10),K(5,`, `),I(),F(6,`span`,11),K(7),I(),F(8,`span`,10),K(9,`, `),I(),F(10,`span`,12),K(11),I()(),F(12,`ul`,13),M(13,$ie,13,20,`li`,null,Qie),I()()),e&2){let e=t.$implicit;k(`aria-labelledby`,`wf-`+e.key),D(),P(`id`,`wf-`+e.key),D(2),J(`Navigation `,e.index),D(3),P(`title`,e.url),D(),q(e.url||`Unknown page`),D(4),__(``,e.rows.length,` `,e.rows.length===1?`call`:`calls`,`, `,e.spanMs,` ms`),D(2),N(e.rows)}}function tae(e,t){if(e&1&&(F(0,`div`,1)(1,`span`),L(2,`i`,2),K(3,`Network`),I(),F(4,`span`),L(5,`i`,3),K(6,`Transfer cache`),I(),F(7,`span`),L(8,`i`,4),K(9,`Failed`),I(),F(10,`span`),L(11,`i`,5),K(12,`Cancelled`),I()(),F(13,`div`,6),M(14,eae,15,8,`section`,7,Zie),I()),e&2){let e=W();D(14),N(e.groups())}}function nae(e,t){e&1&&(F(0,`div`,0)(1,`p`),K(2,`No client calls to show.`),I(),F(3,`p`,20),K(4,` The waterfall shows calls made in the browser. Clear the filters or pick All sides, then use the page. `),I()())}function D8(e){try{let t=new URL(e,`http://x`);return t.pathname+t.search}catch{return e}}function O8(e){return e.cancelled?`cancelled`:e.status?String(e.status):`ERR`}function rae(e){return e.cancelled?`neutral`:!e.status||e.status>=400||e.error?`bad`:e.cacheHit?`cache`:`ok`}function iae(e){let t=[],n=e.filter(e=>e.side===`client`).sort((e,t)=>e.at-t.at),r;for(let e of n){let n=e.pageUrl??``;(!r||r.url!==n)&&(r={key:`${e.at}:${e.id}`,index:t.length+1,url:n,startedAt:e.at,spanMs:0,rows:[]},t.push(r));let i=e.at-r.startedAt;r.spanMs=Math.max(r.spanMs,i+Math.max(e.durationMs,0)),r.rows.push({call:e,offsetMs:i,left:0,width:0,tone:rae(e),status:O8(e)+(e.cacheHit&&!e.cancelled?` cache`:``),label:``})}for(let e of t){let t=Math.max(e.spanMs,1);for(let n of e.rows)n.left=n.offsetMs/t*100,n.width=Math.max(Math.max(n.call.durationMs,0)/t*100,.8),n.label=`${n.call.method} ${D8(n.call.url)}, starts at +${n.offsetMs} ms, takes ${n.call.durationMs} ms, status ${O8(n.call)}`+(n.call.cacheHit?`, transfer cache`:``)}return t.reverse()}var aae=class e{calls=$([]);selectedId=$(null);open=Q_();groups=X(()=>iae(this.calls()));pathOf=D8;static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-network-waterfall`]],inputs:{calls:[1,`calls`],selectedId:[1,`selectedId`]},outputs:{open:`open`},decls:2,vars:1,consts:[[`role`,`status`,1,`empty`],[`aria-hidden`,`true`,1,`legend`],[1,`swatch`,`ok`],[1,`swatch`,`cache`],[1,`swatch`,`bad`],[1,`swatch`,`neutral`],[`appRovingList`,`button.wf-row`,1,`groups`],[1,`group`],[1,`group-head`,3,`id`],[1,`group-title`],[1,`sr-only`],[1,`group-url`,3,`title`],[1,`group-meta`],[1,`rows`],[`type`,`button`,1,`wf-row`,3,`click`],[1,`name`],[1,`method`],[1,`path`,3,`title`],[`aria-hidden`,`true`,1,`track`],[`aria-hidden`,`true`,1,`time`],[1,`muted`,`small`]],template:function(e,t){e&1&&A(0,tae,16,0)(1,nae,5,0,`div`,0),e&2&&j(+!t.groups().length)},dependencies:[iV],styles:[`[_nghost-%COMP%] { +}`]})};function E8(e){return Object.entries(e??{}).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>({name:e,value:t,masked:t.includes(`[redacted]`)}))}var nae=(e,t)=>t.key,rae=(e,t)=>t.call.id;function iae(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,14),H(`click`,function(){let t=C(e).$implicit;return w(W(3).open.emit(t.call.id))}),F(2,`span`,15)(3,`span`,16),K(4),I(),F(5,`span`,17),K(6),I()(),F(7,`span`,18),L(8,`span`),I(),F(9,`span`,19)(10,`span`),K(11),I(),K(12),I()()()}if(e&2){let e=t.$implicit,n=W(3);D(),G(`selected`,n.selectedId()===e.call.id),k(`data-call-id`,e.call.id)(`aria-pressed`,n.selectedId()===e.call.id)(`aria-label`,e.label)(`aria-controls`,n.selectedId()?`call-preview`:null),D(3),q(e.call.method),D(),P(`title`,e.call.url),D(),q(n.pathOf(e.call.url)),D(2),Qg(`bar `+e.tone),Zg(`left`,e.left,`%`)(`width`,e.width,`%`),D(2),Qg(`status status-`+e.tone),D(),q(e.status),D(),Y(` · +`,e.offsetMs,` ms · `,e.call.durationMs,` ms`)}}function aae(e,t){if(e&1&&(F(0,`section`,7)(1,`h3`,8)(2,`span`,9),K(3),I(),F(4,`span`,10),K(5,`, `),I(),F(6,`span`,11),K(7),I(),F(8,`span`,10),K(9,`, `),I(),F(10,`span`,12),K(11),I()(),F(12,`ul`,13),M(13,iae,13,20,`li`,null,rae),I()()),e&2){let e=t.$implicit;k(`aria-labelledby`,`wf-`+e.key),D(),P(`id`,`wf-`+e.key),D(2),J(`Navigation `,e.index),D(3),P(`title`,e.url),D(),q(e.url||`Unknown page`),D(4),y_(``,e.rows.length,` `,e.rows.length===1?`call`:`calls`,`, `,e.spanMs,` ms`),D(2),N(e.rows)}}function oae(e,t){if(e&1&&(F(0,`div`,1)(1,`span`),L(2,`i`,2),K(3,`Network`),I(),F(4,`span`),L(5,`i`,3),K(6,`Transfer cache`),I(),F(7,`span`),L(8,`i`,4),K(9,`Failed`),I(),F(10,`span`),L(11,`i`,5),K(12,`Cancelled`),I()(),F(13,`div`,6),M(14,aae,15,8,`section`,7,nae),I()),e&2){let e=W();D(14),N(e.groups())}}function sae(e,t){e&1&&(F(0,`div`,0)(1,`p`),K(2,`No client calls to show.`),I(),F(3,`p`,20),K(4,` The waterfall shows calls made in the browser. Clear the filters or pick All sides, then use the page. `),I()())}function D8(e){try{let t=new URL(e,`http://x`);return t.pathname+t.search}catch{return e}}function O8(e){return e.cancelled?`cancelled`:e.status?String(e.status):`ERR`}function cae(e){return e.cancelled?`neutral`:!e.status||e.status>=400||e.error?`bad`:e.cacheHit?`cache`:`ok`}function lae(e){let t=[],n=e.filter(e=>e.side===`client`).sort((e,t)=>e.at-t.at),r;for(let e of n){let n=e.pageUrl??``;(!r||r.url!==n)&&(r={key:`${e.at}:${e.id}`,index:t.length+1,url:n,startedAt:e.at,spanMs:0,rows:[]},t.push(r));let i=e.at-r.startedAt;r.spanMs=Math.max(r.spanMs,i+Math.max(e.durationMs,0)),r.rows.push({call:e,offsetMs:i,left:0,width:0,tone:cae(e),status:O8(e)+(e.cacheHit&&!e.cancelled?` cache`:``),label:``})}for(let e of t){let t=Math.max(e.spanMs,1);for(let n of e.rows)n.left=n.offsetMs/t*100,n.width=Math.max(Math.max(n.call.durationMs,0)/t*100,.8),n.label=`${n.call.method} ${D8(n.call.url)}, starts at +${n.offsetMs} ms, takes ${n.call.durationMs} ms, status ${O8(n.call)}`+(n.call.cacheHit?`, transfer cache`:``)}return t.reverse()}var uae=class e{calls=$([]);selectedId=$(null);open=ev();groups=X(()=>lae(this.calls()));pathOf=D8;static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-network-waterfall`]],inputs:{calls:[1,`calls`],selectedId:[1,`selectedId`]},outputs:{open:`open`},decls:2,vars:1,consts:[[`role`,`status`,1,`empty`],[`aria-hidden`,`true`,1,`legend`],[1,`swatch`,`ok`],[1,`swatch`,`cache`],[1,`swatch`,`bad`],[1,`swatch`,`neutral`],[`appRovingList`,`button.wf-row`,1,`groups`],[1,`group`],[1,`group-head`,3,`id`],[1,`group-title`],[1,`sr-only`],[1,`group-url`,3,`title`],[1,`group-meta`],[1,`rows`],[`type`,`button`,1,`wf-row`,3,`click`],[1,`name`],[1,`method`],[1,`path`,3,`title`],[`aria-hidden`,`true`,1,`track`],[`aria-hidden`,`true`,1,`time`],[1,`muted`,`small`]],template:function(e,t){e&1&&A(0,oae,16,0)(1,sae,5,0,`div`,0),e&2&&j(+!t.groups().length)},dependencies:[lV],styles:[`[_nghost-%COMP%] { display: block; } @@ -21437,10 +21451,10 @@ dd.masked[_ngcontent-%COMP%] { .wf-row[_ngcontent-%COMP%] { transition: none; } -}`]})};function oae(e){let t=/^[a-z][a-z\d+.-]*:\/\/[^/?#]*/i.exec(e);if(t)return t[0].length;let n=/^\/\/[^/?#]*/.exec(e);return n?n[0].length:0}function sae(e,t){let n=t.startsWith(`^`),r=(n?t.slice(1):t).split(`*`),i=n?oae(e):0;for(let[t,a]of r.entries()){if(!a)continue;let r=e.indexOf(a,i);if(r<0||n&&t===0&&r!==i)return!1;i=r+a.length}return!0}function cae(e,t){let n=e.pattern.trim();return!!n&&(e.target===`both`||e.target===t.side)&&(!e.method||e.method.toUpperCase()===t.method.toUpperCase())&&sae(t.url,n)}function lae(e,t){return t.pattern.trim()?e.filter(e=>cae(t,e)):[]}var k8=[{id:`offline`,label:`Offline`,description:`Fails every browser request with a network error (status 0).`,rules:[{pattern:`*`,target:`client`,status:0}]},{id:`slow-3g`,label:`Slow 3G`,description:`Holds every browser request back 2000 ms before it is sent.`,rules:[{pattern:`*`,target:`client`,delayMs:2e3}]},{id:`flaky`,label:`Flaky`,description:`Fails 30% of browser requests with 503 Service Unavailable.`,rules:[{pattern:`*`,target:`client`,status:503,chance:30}]}];function uae(e,t){let n=k8.find(t=>t.id===e);return n?n.rules.map(e=>({...e,id:t(),enabled:!0})):[]}var A8=`page_1`,j8=2e3;function M8(e){return Object.entries(e??{}).map(([e,t])=>({name:e,value:t}))}function N8(e,t){if(!t||/^[a-z][a-z\d+.-]*:/i.test(e))return e;try{return new URL(e,t).href}catch{return e}}function P8(e){try{return[...new URL(e,`http://x`).searchParams].map(([e,t])=>({name:e,value:t}))}catch{return[]}}function F8(e){let t=new Date(Number.isFinite(e)?e:0);return Number.isNaN(t.getTime())?new Date(0).toISOString():t.toISOString()}function dae(e){let t=[];return e.cacheHit&&t.push(`transfer cache`),e.mocked&&t.push(`mocked by a fault rule`),e.faulted&&t.push(`failed by a fault rule`),e.delayMs&&t.push(`delayed ${e.delayMs} ms by a fault rule`),e.cancelled&&t.push(`cancelled`),e.requestId&&t.push(`SSR request ${e.requestId}`),e.origin&&t.push(`likely started by ${e.origin===`defer`?`@defer`:`${e.origin}()`}`),t}function fae(e,t){let n=N8(e.url,e.side===`client`?t:void 0),r=e.responseHeaders?.[`content-type`]??`x-unknown`,i=dae(e),a=e.error&&!e.preview?void 0:e.preview,o=Math.max(0,e.durationMs);return{pageref:A8,startedDateTime:F8(e.at),time:o,request:{method:e.method,url:n,httpVersion:`HTTP/1.1`,cookies:[],headers:M8(e.requestHeaders),queryString:P8(n),headersSize:-1,bodySize:-1},response:{status:e.status,statusText:e.cancelled?`cancelled`:e.error??``,httpVersion:`HTTP/1.1`,cookies:[],headers:M8(e.responseHeaders),content:{size:a?.length??0,mimeType:r,...a===void 0?{}:{text:a},...a!==void 0&&a.length>=j8?{comment:`Clipped at ${j8} characters.`}:{}},redirectURL:e.redirectedTo??``,headersSize:-1,bodySize:-1},cache:{},timings:{send:0,wait:o,receive:0},...i.length?{comment:i.join(`, `)}:{},_side:e.side,...i.length?{_notes:i}:{}}}function pae(e,t){let n=N8(e.url,t),r=Math.max(0,e.renderMs);return{pageref:A8,startedDateTime:F8(e.at),time:Math.max(0,e.durationMs),request:{method:e.method,url:n,httpVersion:`HTTP/1.1`,cookies:[],headers:[],queryString:P8(n),headersSize:-1,bodySize:-1},response:{status:e.status,statusText:``,httpVersion:`HTTP/1.1`,cookies:[],headers:M8(e.headers),content:{size:0,mimeType:e.headers[`content-type`]??`text/html`},redirectURL:e.headers.location??``,headersSize:-1,bodySize:-1},cache:{},timings:{send:0,wait:r,receive:Math.max(0,e.durationMs-r)},comment:`SSR request ${e.id}: the server render that served the page`,_side:`document`}}function mae(e){let t=[...e.ssrRequest?[pae(e.ssrRequest,e.origin)]:[],...e.calls.map(t=>fae(t,e.origin))].sort((e,t)=>e.startedDateTime.localeCompare(t.startedDateTime)),n=t[0]?.startedDateTime??F8(Date.now());return{log:{version:`1.2`,creator:e.creator??{name:`Pangular Inspector`,version:`unknown`},pages:[{startedDateTime:n,id:A8,title:e.title??``,pageTimings:{}}],entries:t,comment:`Exported by Pangular Inspector. Secrets are masked as [redacted]. Request bodies are not recorded and response bodies are clipped previews.`}}}var hae=new Set([`POST`,`PUT`,`PATCH`,`DELETE`]);function I8(e,t,n){let r=[],i=/\[redacted\]|%5Bredacted%5D/i;return(i.test(t)||Object.values(e.requestHeaders??{}).some(e=>i.test(e)))&&r.push(`${n} Masked values ([redacted]) must be filled in before it runs.`),hae.has(e.method.toUpperCase())&&r.push(`${n} The request body was not recorded.`),r}function gae(e,t){let n=N8(e.url,e.side===`client`?t:void 0),r=e.method.toUpperCase(),i=e.requestHeaders??{},a={...r===`GET`?{}:{method:r},...Object.keys(i).length?{headers:i}:{}},o=Object.keys(a).length?`${JSON.stringify(n)}, ${JSON.stringify(a,null,2)}`:JSON.stringify(n);return[...I8(e,n,`//`),`await fetch(${o});`].join(` -`)}function L8(e){return`'${e.replace(/'/g,`'\\''`)}'`}function _ae(e,t){let n=N8(e.url,e.side===`client`?t:void 0),r=e.method.toUpperCase(),i=[`curl ${L8(n)}`];r===`HEAD`?i.push(`--head`):r!==`GET`&&i.push(`-X ${L8(r)}`);for(let[t,n]of Object.entries(e.requestHeaders??{}))i.push(`-H ${L8(`${t}: ${n}`)}`);return[...I8(e,n,`#`),i.join(` \\ +}`]})};function dae(e){let t=/^[a-z][a-z\d+.-]*:\/\/[^/?#]*/i.exec(e);if(t)return t[0].length;let n=/^\/\/[^/?#]*/.exec(e);return n?n[0].length:0}function fae(e,t){let n=t.startsWith(`^`),r=(n?t.slice(1):t).split(`*`),i=n?dae(e):0;for(let[t,a]of r.entries()){if(!a)continue;let r=e.indexOf(a,i);if(r<0||n&&t===0&&r!==i)return!1;i=r+a.length}return!0}function pae(e,t){let n=e.pattern.trim();return!!n&&(e.target===`both`||e.target===t.side)&&(!e.method||e.method.toUpperCase()===t.method.toUpperCase())&&fae(t.url,n)}function mae(e,t){return t.pattern.trim()?e.filter(e=>pae(t,e)):[]}var k8=[{id:`offline`,label:`Offline`,description:`Fails every browser request with a network error (status 0).`,rules:[{pattern:`*`,target:`client`,status:0}]},{id:`slow-3g`,label:`Slow 3G`,description:`Holds every browser request back 2000 ms before it is sent.`,rules:[{pattern:`*`,target:`client`,delayMs:2e3}]},{id:`flaky`,label:`Flaky`,description:`Fails 30% of browser requests with 503 Service Unavailable.`,rules:[{pattern:`*`,target:`client`,status:503,chance:30}]}];function hae(e,t){let n=k8.find(t=>t.id===e);return n?n.rules.map(e=>({...e,id:t(),enabled:!0})):[]}var A8=`page_1`,j8=2e3;function M8(e){return Object.entries(e??{}).map(([e,t])=>({name:e,value:t}))}function N8(e,t){if(!t||/^[a-z][a-z\d+.-]*:/i.test(e))return e;try{return new URL(e,t).href}catch{return e}}function P8(e){try{return[...new URL(e,`http://x`).searchParams].map(([e,t])=>({name:e,value:t}))}catch{return[]}}function F8(e){let t=new Date(Number.isFinite(e)?e:0);return Number.isNaN(t.getTime())?new Date(0).toISOString():t.toISOString()}function gae(e){let t=[];return e.cacheHit&&t.push(`transfer cache`),e.mocked&&t.push(`mocked by a fault rule`),e.faulted&&t.push(`failed by a fault rule`),e.delayMs&&t.push(`delayed ${e.delayMs} ms by a fault rule`),e.cancelled&&t.push(`cancelled`),e.requestId&&t.push(`SSR request ${e.requestId}`),e.origin&&t.push(`likely started by ${e.origin===`defer`?`@defer`:`${e.origin}()`}`),t}function _ae(e,t){let n=N8(e.url,e.side===`client`?t:void 0),r=e.responseHeaders?.[`content-type`]??`x-unknown`,i=gae(e),a=e.error&&!e.preview?void 0:e.preview,o=Math.max(0,e.durationMs);return{pageref:A8,startedDateTime:F8(e.at),time:o,request:{method:e.method,url:n,httpVersion:`HTTP/1.1`,cookies:[],headers:M8(e.requestHeaders),queryString:P8(n),headersSize:-1,bodySize:-1},response:{status:e.status,statusText:e.cancelled?`cancelled`:e.error??``,httpVersion:`HTTP/1.1`,cookies:[],headers:M8(e.responseHeaders),content:{size:a?.length??0,mimeType:r,...a===void 0?{}:{text:a},...a!==void 0&&a.length>=j8?{comment:`Clipped at ${j8} characters.`}:{}},redirectURL:e.redirectedTo??``,headersSize:-1,bodySize:-1},cache:{},timings:{send:0,wait:o,receive:0},...i.length?{comment:i.join(`, `)}:{},_side:e.side,...i.length?{_notes:i}:{}}}function vae(e,t){let n=N8(e.url,t),r=Math.max(0,e.renderMs);return{pageref:A8,startedDateTime:F8(e.at),time:Math.max(0,e.durationMs),request:{method:e.method,url:n,httpVersion:`HTTP/1.1`,cookies:[],headers:[],queryString:P8(n),headersSize:-1,bodySize:-1},response:{status:e.status,statusText:``,httpVersion:`HTTP/1.1`,cookies:[],headers:M8(e.headers),content:{size:0,mimeType:e.headers[`content-type`]??`text/html`},redirectURL:e.headers.location??``,headersSize:-1,bodySize:-1},cache:{},timings:{send:0,wait:r,receive:Math.max(0,e.durationMs-r)},comment:`SSR request ${e.id}: the server render that served the page`,_side:`document`}}function yae(e){let t=[...e.ssrRequest?[vae(e.ssrRequest,e.origin)]:[],...e.calls.map(t=>_ae(t,e.origin))].sort((e,t)=>e.startedDateTime.localeCompare(t.startedDateTime)),n=t[0]?.startedDateTime??F8(Date.now());return{log:{version:`1.2`,creator:e.creator??{name:`Pangular Inspector`,version:`unknown`},pages:[{startedDateTime:n,id:A8,title:e.title??``,pageTimings:{}}],entries:t,comment:`Exported by Pangular Inspector. Secrets are masked as [redacted]. Request bodies are not recorded and response bodies are clipped previews.`}}}var bae=new Set([`POST`,`PUT`,`PATCH`,`DELETE`]);function I8(e,t,n){let r=[],i=/\[redacted\]|%5Bredacted%5D/i;return(i.test(t)||Object.values(e.requestHeaders??{}).some(e=>i.test(e)))&&r.push(`${n} Masked values ([redacted]) must be filled in before it runs.`),bae.has(e.method.toUpperCase())&&r.push(`${n} The request body was not recorded.`),r}function xae(e,t){let n=N8(e.url,e.side===`client`?t:void 0),r=e.method.toUpperCase(),i=e.requestHeaders??{},a={...r===`GET`?{}:{method:r},...Object.keys(i).length?{headers:i}:{}},o=Object.keys(a).length?`${JSON.stringify(n)}, ${JSON.stringify(a,null,2)}`:JSON.stringify(n);return[...I8(e,n,`//`),`await fetch(${o});`].join(` +`)}function L8(e){return`'${e.replace(/'/g,`'\\''`)}'`}function Sae(e,t){let n=N8(e.url,e.side===`client`?t:void 0),r=e.method.toUpperCase(),i=[`curl ${L8(n)}`];r===`HEAD`?i.push(`--head`):r!==`GET`&&i.push(`-X ${L8(r)}`);for(let[t,n]of Object.entries(e.requestHeaders??{}))i.push(`-H ${L8(`${t}: ${n}`)}`);return[...I8(e,n,`#`),i.join(` \\ `)].join(` -`)}function vae(e,t={}){let n=t.budget??102400,r=e.entries.reduce((e,t)=>e+Math.max(t.size,0),0),i=[...e.entries].filter(e=>e.size>0).sort((e,t)=>t.size-e.size).slice(0,t.top??5).map(e=>({key:e.key,label:e.http?.url??e.key,size:e.size,share:r?Math.round(e.size/r*1e3)/10:0})),a=new Map;for(let t of e.entries){let e=t.http?.url;e&&a.set(e,[...a.get(e)??[],t])}let o=[...a].filter(([,e])=>e.length>1).map(([e,t])=>({url:e,keys:t.map(e=>e.key),size:t.reduce((e,t)=>e+t.size,0)})).sort((e,t)=>t.size-e.size);return{size:e.size,budget:n,overBudget:e.size>n,largest:i,sameUrl:o}}function yae(e){return e<1024?`${e} B`:e<1048576?`${Number((e/1024).toFixed(1))} KB`:`${Number((e/1024/1024).toFixed(1))} MB`}var R8={duplicateWindowMs:2e3,chainGapMs:50,minChain:3};function z8(e){try{let t=new URL(e,`http://x`);return t.pathname+t.search}catch{return e}}function bae(e){return e.filter(e=>e.side===`client`&&!e.cacheHit&&!e.mocked&&!e.cancelled).sort((e,t)=>e.at-t.at)}function B8(e){return`${e.method} ${z8(e.url)}`}function xae(e,t){let n=new Map;for(let t of e){if(t.method.toUpperCase()!==`GET`)continue;let e=`${t.pageUrl??``} ${t.method.toUpperCase()} ${t.url}`;n.set(e,[...n.get(e)??[],t])}let r=[];for(let e of n.values()){let n=[],i=()=>{if(n.length>1){let e=n[n.length-1].at-n[0].at;r.push({kind:`duplicate`,message:`${B8(n[0])} ran ${n.length} times within ${e} ms.`,hint:`Share one request (a service with shareReplay, one resource, or a signal store) instead of fetching it from each place that needs it.`,callIds:n.map(e=>e.id),wastedMs:n.slice(1).reduce((e,t)=>e+Math.max(t.durationMs,0),0)})}};for(let r of e)n.length&&r.at-n[n.length-1].at>t&&(i(),n=[]),n.push(r);i()}return r}function Sae(e,t,n){let r=[];for(let n of e){let e=r.find(e=>{let r=e[e.length-1],i=r.at+Math.max(r.durationMs,0);return(r.pageUrl??``)===(n.pageUrl??``)&&n.at>=i&&n.at-i<=t});e?e.push(n):r.push([n])}return r.filter(e=>e.length>=n).map(e=>{let t=e[0],n=e[e.length-1],r=n.at+Math.max(n.durationMs,0)-t.at,i=Math.max(...e.map(e=>Math.max(e.durationMs,0)));return{kind:`waterfall`,message:`${e.length} calls ran one after another, ${r} ms in all: ${e.map(B8).join(` → `)}.`,hint:`If a call does not need the response before it, start them together (forkJoin, Promise.all, or separate resources). Run in parallel they would take about as long as the slowest one.`,callIds:e.map(e=>e.id),wastedMs:Math.max(0,r-i)}})}function Cae(e,t){let n=new Map;for(let e of t)e.side!==`server`||e.status===0||e.status>=400||n.set(`${e.method.toUpperCase()} ${z8(e.url)}`,e);let r=new Set,i=[];for(let t of e){let e=`${t.method.toUpperCase()} ${z8(t.url)}`,a=n.get(e);a&&!r.has(e)&&(r.add(e),i.push({kind:`refetch`,message:`${B8(t)} ran on the server and again in the browser.`,hint:`The transfer cache did not answer it. Check that the browser request matches the server one (URL, params, headers) and that Angular may cache it; explain-ssr-request says why it was not stored.`,callIds:[a.id,t.id],wastedMs:Math.max(t.durationMs,0)}))}return i}function wae(e,t={}){let n=bae(e);return[...xae(n,t.duplicateWindowMs??R8.duplicateWindowMs),...Sae(n,t.chainGapMs??R8.chainGapMs,t.minChain??R8.minChain),...t.serverCalls?Cae(n,t.serverCalls):[]]}function Tae(e,t){if(e&1){let e=B();R(0,`button`,0),U(`click`,function(){return C(e),w(W().copy(`fetch`))}),K(1,` Copy as fetch `),z(),R(2,`button`,0),U(`click`,function(){return C(e),w(W().copy(`curl`))}),K(3,` Copy as cURL `),z()}if(e&2){let e=t;k(`aria-label`,`Copy `+e.method+` `+e.url+` as fetch`),D(2),k(`aria-label`,`Copy `+e.method+` `+e.url+` as cURL`)}}var Eae=class e{call=$(null);done=Q_();document=S(_s);async copy(e){let t=this.call();if(!t)return;let n=this.document.defaultView?.location,r=/^https?:$/.test(n?.protocol??``)?n.origin:void 0,i=e===`fetch`?gae(t,r):_ae(t,r);try{await this.document.defaultView.navigator.clipboard.writeText(i);let t=i.includes(`[redacted]`)?` Fill in the masked values first.`:``;this.done.emit(`Copied as ${e===`fetch`?`fetch`:`cURL`}.${t}`)}catch{this.done.emit(`The clipboard is not available here.`)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-call-copy`]],inputs:{call:[1,`call`]},outputs:{done:`done`},decls:1,vars:1,consts:[[`type`,`button`,3,`click`]],template:function(e,t){if(e&1&&A(0,Tae,4,2),e&2){let e;j((e=t.call())?0:-1,e)}},styles:[`[_nghost-%COMP%] { +`)}function Cae(e,t={}){let n=t.budget??102400,r=e.entries.reduce((e,t)=>e+Math.max(t.size,0),0),i=[...e.entries].filter(e=>e.size>0).sort((e,t)=>t.size-e.size).slice(0,t.top??5).map(e=>({key:e.key,label:e.http?.url??e.key,size:e.size,share:r?Math.round(e.size/r*1e3)/10:0})),a=new Map;for(let t of e.entries){let e=t.http?.url;e&&a.set(e,[...a.get(e)??[],t])}let o=[...a].filter(([,e])=>e.length>1).map(([e,t])=>({url:e,keys:t.map(e=>e.key),size:t.reduce((e,t)=>e+t.size,0)})).sort((e,t)=>t.size-e.size);return{size:e.size,budget:n,overBudget:e.size>n,largest:i,sameUrl:o}}function wae(e){return e<1024?`${e} B`:e<1048576?`${Number((e/1024).toFixed(1))} KB`:`${Number((e/1024/1024).toFixed(1))} MB`}var R8={duplicateWindowMs:2e3,chainGapMs:50,minChain:3};function z8(e){try{let t=new URL(e,`http://x`);return t.pathname+t.search}catch{return e}}function Tae(e){return e.filter(e=>e.side===`client`&&!e.cacheHit&&!e.mocked&&!e.cancelled).sort((e,t)=>e.at-t.at)}function B8(e){return`${e.method} ${z8(e.url)}`}function Eae(e,t){let n=new Map;for(let t of e){if(t.method.toUpperCase()!==`GET`)continue;let e=`${t.pageUrl??``} ${t.method.toUpperCase()} ${t.url}`;n.set(e,[...n.get(e)??[],t])}let r=[];for(let e of n.values()){let n=[],i=()=>{if(n.length>1){let e=n[n.length-1].at-n[0].at;r.push({kind:`duplicate`,message:`${B8(n[0])} ran ${n.length} times within ${e} ms.`,hint:`Share one request (a service with shareReplay, one resource, or a signal store) instead of fetching it from each place that needs it.`,callIds:n.map(e=>e.id),wastedMs:n.slice(1).reduce((e,t)=>e+Math.max(t.durationMs,0),0)})}};for(let r of e)n.length&&r.at-n[n.length-1].at>t&&(i(),n=[]),n.push(r);i()}return r}function Dae(e,t,n){let r=[];for(let n of e){let e=r.find(e=>{let r=e[e.length-1],i=r.at+Math.max(r.durationMs,0);return(r.pageUrl??``)===(n.pageUrl??``)&&n.at>=i&&n.at-i<=t});e?e.push(n):r.push([n])}return r.filter(e=>e.length>=n).map(e=>{let t=e[0],n=e[e.length-1],r=n.at+Math.max(n.durationMs,0)-t.at,i=Math.max(...e.map(e=>Math.max(e.durationMs,0)));return{kind:`waterfall`,message:`${e.length} calls ran one after another, ${r} ms in all: ${e.map(B8).join(` → `)}.`,hint:`If a call does not need the response before it, start them together (forkJoin, Promise.all, or separate resources). Run in parallel they would take about as long as the slowest one.`,callIds:e.map(e=>e.id),wastedMs:Math.max(0,r-i)}})}function Oae(e,t){let n=new Map;for(let e of t)e.side!==`server`||e.status===0||e.status>=400||n.set(`${e.method.toUpperCase()} ${z8(e.url)}`,e);let r=new Set,i=[];for(let t of e){let e=`${t.method.toUpperCase()} ${z8(t.url)}`,a=n.get(e);a&&!r.has(e)&&(r.add(e),i.push({kind:`refetch`,message:`${B8(t)} ran on the server and again in the browser.`,hint:`The transfer cache did not answer it. Check that the browser request matches the server one (URL, params, headers) and that Angular may cache it; explain-ssr-request says why it was not stored.`,callIds:[a.id,t.id],wastedMs:Math.max(t.durationMs,0)}))}return i}function kae(e,t={}){let n=Tae(e);return[...Eae(n,t.duplicateWindowMs??R8.duplicateWindowMs),...Dae(n,t.chainGapMs??R8.chainGapMs,t.minChain??R8.minChain),...t.serverCalls?Oae(n,t.serverCalls):[]]}function Aae(e,t){if(e&1){let e=B();R(0,`button`,0),U(`click`,function(){return C(e),w(W().copy(`fetch`))}),K(1,` Copy as fetch `),z(),R(2,`button`,0),U(`click`,function(){return C(e),w(W().copy(`curl`))}),K(3,` Copy as cURL `),z()}if(e&2){let e=t;k(`aria-label`,`Copy `+e.method+` `+e.url+` as fetch`),D(2),k(`aria-label`,`Copy `+e.method+` `+e.url+` as cURL`)}}var jae=class e{call=$(null);done=ev();document=S(_s);async copy(e){let t=this.call();if(!t)return;let n=this.document.defaultView?.location,r=/^https?:$/.test(n?.protocol??``)?n.origin:void 0,i=e===`fetch`?xae(t,r):Sae(t,r);try{await this.document.defaultView.navigator.clipboard.writeText(i);let t=i.includes(`[redacted]`)?` Fill in the masked values first.`:``;this.done.emit(`Copied as ${e===`fetch`?`fetch`:`cURL`}.${t}`)}catch{this.done.emit(`The clipboard is not available here.`)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-call-copy`]],inputs:{call:[1,`call`]},outputs:{done:`done`},decls:1,vars:1,consts:[[`type`,`button`,3,`click`]],template:function(e,t){if(e&1&&A(0,Aae,4,2),e&2){let e;j((e=t.call())?0:-1,e)}},styles:[`[_nghost-%COMP%] { display: contents; } @@ -21473,7 +21487,7 @@ button[_ngcontent-%COMP%]:focus-visible { button[_ngcontent-%COMP%] { transition: none; } -}`]})};function Dae(e,t){if(e&1&&(R(0,`span`,0),K(1),z()),e&2){let e=W();V(`title`,e.title()),D(),J(`likely `,e.label())}}var Oae={httpResource:`httpResource()`,resource:`resource()`,defer:`@defer`},kae=class e{origin=$(void 0);label=X(()=>{let e=this.origin();return e?Oae[e]:``});title=X(()=>`Started by ${this.label()}, guessed from the call stack. Development builds only; it can miss.`);static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-call-origin`]],inputs:{origin:[1,`origin`]},decls:1,vars:1,consts:[[1,`tag`,3,`title`]],template:function(e,t){e&1&&A(0,Dae,2,2,`span`,0),e&2&&j(t.origin()?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})};function Mae(e,t){if(e&1&&(R(0,`span`,0),K(1),z()),e&2){let e=W();V(`title`,e.title()),D(),J(`likely `,e.label())}}var Nae={httpResource:`httpResource()`,resource:`resource()`,defer:`@defer`},Pae=class e{origin=$(void 0);label=X(()=>{let e=this.origin();return e?Nae[e]:``});title=X(()=>`Started by ${this.label()}, guessed from the call stack. Development builds only; it can miss.`);static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-call-origin`]],inputs:{origin:[1,`origin`]},decls:1,vars:1,consts:[[1,`tag`,3,`title`]],template:function(e,t){e&1&&A(0,Mae,2,2,`span`,0),e&2&&j(t.origin()?0:-1)},styles:[`[_nghost-%COMP%] { display: contents; } @@ -21489,7 +21503,7 @@ button[_ngcontent-%COMP%]:focus-visible { font-size: 11px; font-weight: 600; white-space: nowrap; -}`]})};function Aae(e){return`pangular-${(e??``).replace(/[?#].*$/,``).replace(/[^a-z0-9]+/gi,`-`).replace(/^-+|-+$/g,``).toLowerCase().slice(0,60)||`home`}.har`}var jae=class e{calls=$([]);ssrRequest=$(null);title=$(``);pageUrl=$(void 0);done=Q_();document=S(_s);save(){let e=this.calls();if(!e.length)return;let t=this.document.defaultView?.location,n=/^https?:$/.test(t?.protocol??``)?t.origin:void 0,r=mae({calls:e,ssrRequest:this.ssrRequest(),title:this.title(),origin:n}),i=this.document.defaultView?.URL?.createObjectURL?.(new Blob([JSON.stringify(r,null,2)],{type:`application/json`}));if(!i){this.done.emit(`Saving files is not available here.`);return}let a=this.document.createElement(`a`);a.href=i,a.download=Aae(this.pageUrl()),a.click(),setTimeout(()=>this.document.defaultView?.URL?.revokeObjectURL?.(i));let o=r.log.entries.length;this.done.emit(`Saved ${o} request${o===1?``:`s`} as ${a.download}.`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-har-export`]],inputs:{calls:[1,`calls`],ssrRequest:[1,`ssrRequest`],title:[1,`title`],pageUrl:[1,`pageUrl`]},outputs:{done:`done`},decls:4,vars:1,consts:[[`type`,`button`,`aria-describedby`,`har-export-note`,3,`click`,`disabled`],[`id`,`har-export-note`,1,`sr-only`]],template:function(e,t){e&1&&(R(0,`button`,0),U(`click`,function(){return t.save()}),K(1,` Export HAR `),z(),R(2,`span`,1),K(3,`Saves the timeline as a HAR file with secrets masked.`),z()),e&2&&V(`disabled`,!t.calls().length)},styles:[`[_nghost-%COMP%] { +}`]})};function Fae(e){return`pangular-${(e??``).replace(/[?#].*$/,``).replace(/[^a-z0-9]+/gi,`-`).replace(/^-+|-+$/g,``).toLowerCase().slice(0,60)||`home`}.har`}var Iae=class e{calls=$([]);ssrRequest=$(null);title=$(``);pageUrl=$(void 0);done=ev();document=S(_s);save(){let e=this.calls();if(!e.length)return;let t=this.document.defaultView?.location,n=/^https?:$/.test(t?.protocol??``)?t.origin:void 0,r=yae({calls:e,ssrRequest:this.ssrRequest(),title:this.title(),origin:n}),i=this.document.defaultView?.URL?.createObjectURL?.(new Blob([JSON.stringify(r,null,2)],{type:`application/json`}));if(!i){this.done.emit(`Saving files is not available here.`);return}let a=this.document.createElement(`a`);a.href=i,a.download=Fae(this.pageUrl()),a.click(),setTimeout(()=>this.document.defaultView?.URL?.revokeObjectURL?.(i));let o=r.log.entries.length;this.done.emit(`Saved ${o} request${o===1?``:`s`} as ${a.download}.`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-har-export`]],inputs:{calls:[1,`calls`],ssrRequest:[1,`ssrRequest`],title:[1,`title`],pageUrl:[1,`pageUrl`]},outputs:{done:`done`},decls:4,vars:1,consts:[[`type`,`button`,`aria-describedby`,`har-export-note`,3,`click`,`disabled`],[`id`,`har-export-note`,1,`sr-only`]],template:function(e,t){e&1&&(R(0,`button`,0),U(`click`,function(){return t.save()}),K(1,` Export HAR `),z(),R(2,`span`,1),K(3,`Saves the timeline as a HAR file with secrets masked.`),z()),e&2&&V(`disabled`,!t.calls().length)},styles:[`[_nghost-%COMP%] { display: contents; } @@ -21523,7 +21537,7 @@ button[_ngcontent-%COMP%]:disabled { button[_ngcontent-%COMP%] { transition: none; } -}`]})},Mae=(e,t)=>t.kind+`:`+t.callIds.join(`,`);function Nae(e,t){e&1&&(R(0,`p`,1),K(1,`No client calls to check yet.`),z())}function Pae(e,t){e&1&&(R(0,`p`,2),K(1,`No duplicate requests, waterfalls or repeated server calls.`),z())}function Fae(e,t){if(e&1&&(R(0,`span`,6),K(1),z()),e&2){let e=W().$implicit;D(),J(`About `,e.wastedMs,` ms to win.`)}}function Iae(e,t){if(e&1){let e=B();R(0,`li`)(1,`span`,4),K(2),z(),R(3,`p`,5),K(4),A(5,Fae,2,1,`span`,6),z(),R(6,`p`,7),K(7),z(),R(8,`button`,8),U(`click`,function(){let t=C(e).$implicit;return w(W(2).open.emit(t.callIds[0]))}),K(9,` Show first call `),z()()}if(e&2){let e=t.$implicit,n=W(2);D(),k(`data-kind`,e.kind),D(),q(n.kindLabel(e.kind)),D(2),J(` `,e.message,` `),D(),j(e.wastedMs?5:-1),D(2),q(e.hint),D(),k(`aria-label`,`Show the first call of: `+e.message)}}function Lae(e,t){if(e&1&&(R(0,`ul`,3),M(1,Iae,10,6,`li`,null,Mae),z()),e&2){let e=W();D(),N(e.findings())}}var Rae={duplicate:`Duplicate`,waterfall:`Waterfall`,refetch:`Repeated server call`},zae=class e{calls=$([]);serverCalls=$([]);open=Q_();defaults=R8;findings=X(()=>wae(this.calls(),{serverCalls:this.serverCalls()}));kindLabel(e){return Rae[e]}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-http-lint`]],inputs:{calls:[1,`calls`],serverCalls:[1,`serverCalls`]},outputs:{open:`open`},decls:5,vars:3,consts:[[1,`intro`],[1,`none`],[1,`none`,`ok`],[1,`findings`],[1,`kind`],[1,`message`],[1,`cost`],[1,`hint`],[`type`,`button`,3,`click`]],template:function(e,t){e&1&&(R(0,`p`,0),K(1),z(),A(2,Nae,2,0,`p`,1)(3,Pae,2,0,`p`,2)(4,Lae,3,0,`ul`,3)),e&2&&(D(),Y(` Same GET again within `,t.defaults.duplicateWindowMs,` ms, `,t.defaults.minChain,` or more calls in a row that could start together, and server calls the browser made again. Transfer cache hits, mocks and cancelled calls are left out. `),D(),j(t.calls().length?t.findings().length?4:3:2))},styles:[`[_nghost-%COMP%] { +}`]})},Lae=(e,t)=>t.kind+`:`+t.callIds.join(`,`);function Rae(e,t){e&1&&(R(0,`p`,1),K(1,`No client calls to check yet.`),z())}function zae(e,t){e&1&&(R(0,`p`,2),K(1,`No duplicate requests, waterfalls or repeated server calls.`),z())}function Bae(e,t){if(e&1&&(R(0,`span`,6),K(1),z()),e&2){let e=W().$implicit;D(),J(`About `,e.wastedMs,` ms to win.`)}}function Vae(e,t){if(e&1){let e=B();R(0,`li`)(1,`span`,4),K(2),z(),R(3,`p`,5),K(4),A(5,Bae,2,1,`span`,6),z(),R(6,`p`,7),K(7),z(),R(8,`button`,8),U(`click`,function(){let t=C(e).$implicit;return w(W(2).open.emit(t.callIds[0]))}),K(9,` Show first call `),z()()}if(e&2){let e=t.$implicit,n=W(2);D(),k(`data-kind`,e.kind),D(),q(n.kindLabel(e.kind)),D(2),J(` `,e.message,` `),D(),j(e.wastedMs?5:-1),D(2),q(e.hint),D(),k(`aria-label`,`Show the first call of: `+e.message)}}function Hae(e,t){if(e&1&&(R(0,`ul`,3),M(1,Vae,10,6,`li`,null,Lae),z()),e&2){let e=W();D(),N(e.findings())}}var Uae={duplicate:`Duplicate`,waterfall:`Waterfall`,refetch:`Repeated server call`},Wae=class e{calls=$([]);serverCalls=$([]);open=ev();defaults=R8;findings=X(()=>kae(this.calls(),{serverCalls:this.serverCalls()}));kindLabel(e){return Uae[e]}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-http-lint`]],inputs:{calls:[1,`calls`],serverCalls:[1,`serverCalls`]},outputs:{open:`open`},decls:5,vars:3,consts:[[1,`intro`],[1,`none`],[1,`none`,`ok`],[1,`findings`],[1,`kind`],[1,`message`],[1,`cost`],[1,`hint`],[`type`,`button`,3,`click`]],template:function(e,t){e&1&&(R(0,`p`,0),K(1),z(),A(2,Rae,2,0,`p`,1)(3,zae,2,0,`p`,2)(4,Hae,3,0,`ul`,3)),e&2&&(D(),Y(` Same GET again within `,t.defaults.duplicateWindowMs,` ms, `,t.defaults.minChain,` or more calls in a row that could start together, and server calls the browser made again. Transfer cache hits, mocks and cancelled calls are left out. `),D(),j(t.calls().length?t.findings().length?4:3:2))},styles:[`[_nghost-%COMP%] { display: block; } @@ -21619,7 +21633,7 @@ button[_ngcontent-%COMP%]:focus-visible { button[_ngcontent-%COMP%] { transition: none; } -}`]})},Bae=(e,t)=>t.key,Vae=(e,t)=>t.url;function Hae(e,t){if(e&1&&(R(0,`p`,0)(1,`strong`),K(2),z(),K(3,` The payload is inlined in the HTML, so it delays the first render. Look at the largest entries below. `),z()),e&2){let e=W(),t=E_(0);D(2),Y(``,e.bytes(t.size),`, over the `,e.bytes(t.budget),` budget.`)}}function Uae(e,t){if(e&1&&(R(0,`p`,1),K(1),z()),e&2){let e=W(),t=E_(0);D(),Y(``,e.bytes(t.size),`, within the `,e.bytes(t.budget),` budget.`)}}function Wae(e,t){if(e&1&&(R(0,`li`)(1,`span`,4),K(2),z(),R(3,`span`,5),K(4),z(),R(5,`span`,6),og(6,`span`),z()()),e&2){let e=t.$implicit,n=W(2);D(),V(`title`,e.key),D(),q(e.label),D(2),Y(``,n.bytes(e.size),`, `,e.share,`%`),D(2),Xg(`width`,e.share,`%`)}}function Gae(e,t){if(e&1&&(R(0,`h3`,2),K(1,`Largest entries`),z(),R(2,`ol`,3),M(3,Wae,7,6,`li`,null,Bae),z()),e&2){W();let e=E_(0);D(3),N(e.largest)}}function Kae(e,t){if(e&1&&(R(0,`li`)(1,`code`,10),K(2),z(),R(3,`span`,5),K(4),z()()),e&2){let e=t.$implicit,n=W(2);D(2),q(e.url),D(2),Y(``,e.keys.length,` keys, `,n.bytes(e.size))}}function qae(e,t){if(e&1&&(R(0,`h3`,7),K(1),z(),R(2,`p`,8),K(3,` Each key holds its own response, because the headers, params or body differ. Check whether one request could serve them all. `),z(),R(4,`ul`,9),M(5,Kae,5,3,`li`,null,Vae),z()),e&2){W();let e=E_(0);D(),J(` Same URL stored more than once (`,e.sameUrl.length,`) `),D(4),N(e.sameUrl)}}var Jae=class e{size=$(0);entries=$([]);insights=X(()=>vae({size:this.size(),entries:this.entries()}));bytes(e){return yae(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-payload-insights`]],inputs:{size:[1,`size`],entries:[1,`entries`]},decls:5,vars:4,consts:[[1,`budget`,`over`],[1,`budget`],[`id`,`payload-largest-heading`],[`aria-labelledby`,`payload-largest-heading`,1,`largest`],[1,`name`,3,`title`],[1,`size`],[`aria-hidden`,`true`,1,`bar`],[`id`,`payload-same-url-heading`],[1,`hint`],[`aria-labelledby`,`payload-same-url-heading`,1,`same-url`],[1,`name`]],template:function(e,t){if(e&1&&(w_(0),A(1,Hae,4,2,`p`,0)(2,Uae,2,2,`p`,1),A(3,Gae,5,0),A(4,qae,7,1)),e&2){let e=T_(t.insights());D(),j(e.overBudget?1:2),D(2),j(e.largest.length?3:-1),D(),j(e.sameUrl.length?4:-1)}},styles:[`[_nghost-%COMP%] { +}`]})},Gae=(e,t)=>t.key,Kae=(e,t)=>t.url;function qae(e,t){if(e&1&&(R(0,`p`,0)(1,`strong`),K(2),z(),K(3,` The payload is inlined in the HTML, so it delays the first render. Look at the largest entries below. `),z()),e&2){let e=W(),t=O_(0);D(2),Y(``,e.bytes(t.size),`, over the `,e.bytes(t.budget),` budget.`)}}function Jae(e,t){if(e&1&&(R(0,`p`,1),K(1),z()),e&2){let e=W(),t=O_(0);D(),Y(``,e.bytes(t.size),`, within the `,e.bytes(t.budget),` budget.`)}}function Yae(e,t){if(e&1&&(R(0,`li`)(1,`span`,4),K(2),z(),R(3,`span`,5),K(4),z(),R(5,`span`,6),sg(6,`span`),z()()),e&2){let e=t.$implicit,n=W(2);D(),V(`title`,e.key),D(),q(e.label),D(2),Y(``,n.bytes(e.size),`, `,e.share,`%`),D(2),Zg(`width`,e.share,`%`)}}function Xae(e,t){if(e&1&&(R(0,`h3`,2),K(1,`Largest entries`),z(),R(2,`ol`,3),M(3,Yae,7,6,`li`,null,Gae),z()),e&2){W();let e=O_(0);D(3),N(e.largest)}}function Zae(e,t){if(e&1&&(R(0,`li`)(1,`code`,10),K(2),z(),R(3,`span`,5),K(4),z()()),e&2){let e=t.$implicit,n=W(2);D(2),q(e.url),D(2),Y(``,e.keys.length,` keys, `,n.bytes(e.size))}}function Qae(e,t){if(e&1&&(R(0,`h3`,7),K(1),z(),R(2,`p`,8),K(3,` Each key holds its own response, because the headers, params or body differ. Check whether one request could serve them all. `),z(),R(4,`ul`,9),M(5,Zae,5,3,`li`,null,Kae),z()),e&2){W();let e=O_(0);D(),J(` Same URL stored more than once (`,e.sameUrl.length,`) `),D(4),N(e.sameUrl)}}var $ae=class e{size=$(0);entries=$([]);insights=X(()=>Cae({size:this.size(),entries:this.entries()}));bytes(e){return wae(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-payload-insights`]],inputs:{size:[1,`size`],entries:[1,`entries`]},decls:5,vars:4,consts:[[1,`budget`,`over`],[1,`budget`],[`id`,`payload-largest-heading`],[`aria-labelledby`,`payload-largest-heading`,1,`largest`],[1,`name`,3,`title`],[1,`size`],[`aria-hidden`,`true`,1,`bar`],[`id`,`payload-same-url-heading`],[1,`hint`],[`aria-labelledby`,`payload-same-url-heading`,1,`same-url`],[1,`name`]],template:function(e,t){if(e&1&&(E_(0),A(1,qae,4,2,`p`,0)(2,Jae,2,2,`p`,1),A(3,Xae,5,0),A(4,Qae,7,1)),e&2){let e=D_(t.insights());D(),j(e.overBudget?1:2),D(2),j(e.largest.length?3:-1),D(),j(e.sameUrl.length?4:-1)}},styles:[`[_nghost-%COMP%] { display: block; margin-bottom: 12px; } @@ -21694,7 +21708,7 @@ li[_ngcontent-%COMP%] { .same-url[_ngcontent-%COMP%] { margin-top: 6px; -}`]})},Yae=class e{calls=$([]);pattern=$(``);method=$(``);target=$(`both`);matched=X(()=>{let e=this.pattern().trim();return e?lae(this.calls(),{pattern:e,method:this.method()||void 0,target:this.target()}).length:null});text=X(()=>{let e=this.matched();if(e===null)return``;let t=this.calls().length;if(!t)return`No calls recorded yet to check the pattern against.`;if(t===1)return e?`Matches the only recorded call.`:`Does not match the only recorded call. It can still match later requests.`;let n=`${t} recorded calls`;return e===0?`Matches none of the ${n}. It can still match later requests.`:e===t?`Matches all ${n}.`:`Matches ${e} of the ${n}.`});static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-rule-match-count`]],inputs:{calls:[1,`calls`],pattern:[1,`pattern`],method:[1,`method`],target:[1,`target`]},decls:2,vars:1,consts:[[`role`,`status`,1,`match`]],template:function(e,t){e&1&&(R(0,`p`,0),K(1),z()),e&2&&(D(),q(t.text()))},styles:[`[_nghost-%COMP%] { +}`]})},eoe=class e{calls=$([]);pattern=$(``);method=$(``);target=$(`both`);matched=X(()=>{let e=this.pattern().trim();return e?mae(this.calls(),{pattern:e,method:this.method()||void 0,target:this.target()}).length:null});text=X(()=>{let e=this.matched();if(e===null)return``;let t=this.calls().length;if(!t)return`No calls recorded yet to check the pattern against.`;if(t===1)return e?`Matches the only recorded call.`:`Does not match the only recorded call. It can still match later requests.`;let n=`${t} recorded calls`;return e===0?`Matches none of the ${n}. It can still match later requests.`:e===t?`Matches all ${n}.`:`Matches ${e} of the ${n}.`});static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-rule-match-count`]],inputs:{calls:[1,`calls`],pattern:[1,`pattern`],method:[1,`method`],target:[1,`target`]},decls:2,vars:1,consts:[[`role`,`status`,1,`match`]],template:function(e,t){e&1&&(R(0,`p`,0),K(1),z()),e&2&&(D(),q(t.text()))},styles:[`[_nghost-%COMP%] { display: block; } @@ -21703,7 +21717,7 @@ li[_ngcontent-%COMP%] { min-height: 1.5em; color: var(--%NS%text-2); font-size: 12px; -}`]})},Xae=(e,t)=>t.id;function Zae(e,t){if(e&1){let e=B();R(0,`li`)(1,`button`,3),U(`click`,function(){let t=C(e).$implicit;return w(W().add.emit(t.id))}),K(2),z(),R(3,`span`,4),K(4),z()()}if(e&2){let e=t.$implicit,n=W();D(),V(`disabled`,n.disabled()),k(`data-preset`,e.id)(`aria-describedby`,`preset-`+e.id+` `+n.describedBy()),D(),J(` `,e.label,` `),D(),V(`id`,`preset-`+e.id),D(),q(e.description)}}var Qae=class e{disabled=$(!1);describedBy=$(``);add=Q_();presets=k8;static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-rule-presets`]],inputs:{disabled:[1,`disabled`],describedBy:[1,`describedBy`]},outputs:{add:`add`},decls:8,vars:0,consts:[[`role`,`group`,`aria-labelledby`,`rule-presets-label`,1,`presets`],[`id`,`rule-presets-label`,1,`label`],[1,`note`],[`type`,`button`,1,`ghost`,3,`click`,`disabled`],[1,`what`,3,`id`]],template:function(e,t){e&1&&(R(0,`div`,0)(1,`span`,1),K(2,`Presets`),z(),R(3,`ul`),M(4,Zae,5,6,`li`,null,Xae),z(),R(6,`p`,2),K(7,` A preset adds plain rules for every browser request. Rules above it match first. Remove the rules to stop it. `),z()()),e&2&&(D(4),N(t.presets))},styles:[`[_nghost-%COMP%] { +}`]})},toe=(e,t)=>t.id;function noe(e,t){if(e&1){let e=B();R(0,`li`)(1,`button`,3),U(`click`,function(){let t=C(e).$implicit;return w(W().add.emit(t.id))}),K(2),z(),R(3,`span`,4),K(4),z()()}if(e&2){let e=t.$implicit,n=W();D(),V(`disabled`,n.disabled()),k(`data-preset`,e.id)(`aria-describedby`,`preset-`+e.id+` `+n.describedBy()),D(),J(` `,e.label,` `),D(),V(`id`,`preset-`+e.id),D(),q(e.description)}}var roe=class e{disabled=$(!1);describedBy=$(``);add=ev();presets=k8;static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-rule-presets`]],inputs:{disabled:[1,`disabled`],describedBy:[1,`describedBy`]},outputs:{add:`add`},decls:8,vars:0,consts:[[`role`,`group`,`aria-labelledby`,`rule-presets-label`,1,`presets`],[`id`,`rule-presets-label`,1,`label`],[1,`note`],[`type`,`button`,1,`ghost`,3,`click`,`disabled`],[1,`what`,3,`id`]],template:function(e,t){e&1&&(R(0,`div`,0)(1,`span`,1),K(2,`Presets`),z(),R(3,`ul`),M(4,noe,5,6,`li`,null,toe),z(),R(6,`p`,2),K(7,` A preset adds plain rules for every browser request. Rules above it match first. Remove the rules to stop it. `),z()()),e&2&&(D(4),N(t.presets))},styles:[`[_nghost-%COMP%] { display: block; margin-bottom: 12px; } @@ -21770,7 +21784,7 @@ button[_ngcontent-%COMP%]:disabled { button[_ngcontent-%COMP%] { transition: none; } -}`]})},$ae=[`callsBody`],eoe=()=>[],V8=(e,t)=>t.id,toe=(e,t)=>t.id+t.kind,noe=(e,t)=>t.entry.side+t.entry.id,roe=(e,t)=>t.key;function ioe(e,t){e&1&&(F(0,`div`,2),L(1,`span`,74),F(2,`span`),K(3,`Loading…`),I()())}function aoe(e,t){if(e&1){let e=B();F(0,`div`,3)(1,`strong`),K(2,`Could not reach the devtools server.`),I(),F(3,`span`),K(4,`Check that the app's dev server is running with the devtools plugin.`),I(),F(5,`button`,24),H(`click`,function(){return C(e),w(W().retry())}),K(6,`Try again`),I()()}}function ooe(e,t){e&1&&(F(0,`span`,90),K(1,`this page`),I())}function soe(e,t){e&1&&(F(0,`span`,91),K(1,`overridden`),I())}function coe(e,t){e&1&&(F(0,`span`,92),K(1,`aborted`),I())}function loe(e,t){if(e&1){let e=B();F(0,`tr`,81),H(`click`,function(){let t=C(e).$implicit;return w(W(2).selectedRequestId.set(t.id))}),F(1,`td`,82)(2,`button`,83)(3,`span`,84),K(4),I(),K(5),F(6,`span`,85),K(7),I()()(),F(8,`td`,86),L(9,`span`,87),K(10),I(),F(11,`td`),K(12),I(),F(13,`td`,88),K(14),I(),F(15,`td`,88),K(16),I(),F(17,`td`)(18,`div`,89),A(19,ooe,2,0,`span`,90),A(20,soe,2,0,`span`,91),A(21,coe,2,0,`span`,92),I()()()}if(e&2){let e=t.$implicit,n=W(2);G(`selected`,n.selectedRequest()?.id===e.id),D(2),P(`title`,e.url),k(`aria-pressed`,n.selectedRequest()?.id===e.id),D(2),q(e.method),D(),J(` `,e.url,` `),D(2),Y(`, `,e.status,`, `,n.renderModeLabel(e.renderMode)),D(),G(`ok`,n.statusTone(e.status)===`ok`)(`redirect`,n.statusTone(e.status)===`redirect`)(`bad`,n.statusTone(e.status)===`bad`),D(2),J(``,e.status,` `),D(2),q(n.renderModeLabel(e.renderMode)),D(2),J(``,e.renderMs,` ms`),D(2),Y(``,e.fetches,` (`,e.fetchMs,` ms)`),D(3),j(e.id===n.selected()?.ssrRequestId?19:-1),D(),j(e.overrides?.length?20:-1),D(),j(e.aborted?21:-1)}}function uoe(e,t){e&1&&(F(0,`p`,63),K(1),F(2,`code`),K(3,`ssrMiddleware`),I(),K(4,` saw it, so the render mode can't be read and TransferState edits can't apply. Mount `),F(5,`code`),K(6,`ssrMiddleware`),I(),K(7,` after `),F(8,`code`),K(9,`compression()`),I(),K(10,`. `),I()),e&2&&(D(),J(` The body was already compressed (`,t,`) when `))}function doe(e,t){if(e&1&&(F(0,`span`,97),K(1),I()),e&2){let e=W().$implicit;D(),q(e.note)}}function foe(e,t){if(e&1&&(F(0,`p`,96)(1,`span`,91),K(2),I(),F(3,`span`),K(4),I(),A(5,doe,2,1,`span`,97),I()),e&2){let e=t.$implicit,n=W(4);D(2),q(n.overrideLabel(e.kind)),D(2),q(e.applied?`applied`:`not applied`),D(),j(e.note?5:-1)}}function poe(e,t){if(e&1&&(F(0,`h3`),K(1,`Overrides from the panel`),I(),F(2,`p`,63),K(3,` This response was changed on purpose, so it is not what the app sends on its own. `),I(),M(4,foe,6,3,`p`,96,toe)),e&2){let e=W();D(4),N(e.overrides)}}function moe(e,t){if(e&1&&(K(0,` to `),F(1,`code`),K(2),I()),e&2){let e=W().$implicit;D(2),q(e.finalUrl)}}function hoe(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2,`Guards`),I(),F(3,`dd`),K(4),I()()),e&2){let e=W().$implicit,t=W(4);D(3),G(`bad`,t.guardVerdict(e)===`rejected`),D(),Y(` `,t.msLabel(e.guards.ms),``,t.guardVerdict(e)?`, `+t.guardVerdict(e):``,` `)}}function goe(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2,`Resolvers`),I(),F(3,`dd`),K(4),I()()),e&2){let e=W().$implicit,t=W(4);D(4),q(t.msLabel(e.resolvers.ms))}}function _oe(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2,`Navigation total`),I(),F(3,`dd`),K(4),I()()),e&2){let e=W().$implicit;D(4),J(``,e.durationMs,` ms`)}}function voe(e,t){if(e&1&&(F(0,`p`,63),K(1),I()),e&2){let e=W().$implicit;D(),q(e.reason)}}function yoe(e,t){if(e&1&&(F(0,`dl`,98)(1,`div`)(2,`dt`),K(3,`Navigation`),I(),F(4,`dd`)(5,`code`),K(6),I(),A(7,moe,3,1),K(8),I()(),A(9,hoe,5,4,`div`),A(10,goe,5,1,`div`),A(11,_oe,5,1,`div`),I(),A(12,voe,2,1,`p`,63)),e&2){let e=t.$implicit;D(6),q(e.url),D(),j(e.finalUrl?7:-1),D(),J(` (`,e.outcome,`) `),D(),j(e.guards?9:-1),D(),j(e.resolvers?10:-1),D(),j(e.durationMs===void 0?-1:11),D(),j(e.reason?12:-1)}}function boe(e,t){if(e&1&&(F(0,`h3`),K(1,`Router during the render`),I(),M(2,yoe,13,7,null,null,Jh)),e&2){let e=W();D(2),N(e.navigations)}}function xoe(e,t){e&1&&(F(0,`span`,90),K(1,`cached`),I())}function Soe(e,t){if(e&1&&(F(0,`span`,100),K(1,`not cached`),I()),e&2){let e=W().$implicit;P(`title`,W(3).skipText(e.cacheSkip))}}function Coe(e,t){if(e&1&&(F(0,`p`,101),K(1),I()),e&2){let e=W().$implicit,t=W(3);D(),J(`Not cached: `,t.skipText(e.cacheSkip),`.`)}}function woe(e,t){if(e&1&&(F(0,`p`,96)(1,`span`,84),K(2),I(),F(3,`span`,99),K(4),I(),F(5,`span`,86),K(6),I(),F(7,`span`,97),K(8),I(),A(9,xoe,2,0,`span`,90)(10,Soe,2,1,`span`,100),I(),A(11,Coe,2,1,`p`,101)),e&2){let e=t.$implicit,n=W(3);D(2),q(e.method),D(),P(`title`,e.url),D(),q(e.url),D(),G(`ok`,n.callTone(e)===`ok`)(`bad`,n.callTone(e)===`bad`),D(),q(n.statusLabel(e)),D(2),J(``,e.durationMs,` ms`),D(),j(e.cacheStored?9:e.cacheSkip?10:-1),D(2),j(!e.cacheStored&&e.cacheSkip?11:-1)}}function Toe(e,t){e&1&&(F(0,`p`,63),K(1,`The render made no HttpClient calls.`),I())}function Eoe(e,t){e&1&&(F(0,`p`,101),K(1),I()),e&2&&(D(),J(`Why: `,t,`.`))}function Doe(e,t){if(e&1&&(F(0,`p`,96)(1,`span`,84),K(2),I(),F(3,`span`,99),K(4),I(),F(5,`span`,92),K(6,`cache miss`),I()(),A(7,Eoe,2,1,`p`,101)),e&2){let e,n=t.$implicit,r=W(4);D(2),q(n.method),D(),P(`title`,n.url),D(),q(n.url),D(3),j((e=r.refetchReason(n))?7:-1,e)}}function Ooe(e,t){if(e&1&&(F(0,`h3`),K(1),I(),F(2,`p`,63),K(3,` These calls ran on the server and again after hydration instead of reading the transfer cache. `),I(),M(4,Doe,8,4,null,null,V8)),e&2){let e=W(3);D(),J(`Fetched again in the browser (`,e.refetched().length,`)`),D(3),N(e.refetched())}}function koe(e,t){e&1&&(F(0,`p`,95),K(1,`No server call ran again in the browser.`),I())}function Aoe(e,t){if(e&1&&(F(0,`div`,80)(1,`h3`,93),K(2),F(3,`code`),K(4),I()(),F(5,`dl`,94)(6,`div`)(7,`dt`),K(8,`Request id`),I(),F(9,`dd`)(10,`code`),K(11),I()()(),F(12,`div`)(13,`dt`),K(14,`Render`),I(),F(15,`dd`),K(16),I()(),F(17,`div`)(18,`dt`),K(19,`Total`),I(),F(20,`dd`),K(21),I()(),F(22,`div`)(23,`dt`),K(24,`Sent`),I(),F(25,`dd`),K(26),I()(),F(27,`div`)(28,`dt`),K(29,`Browser page`),I(),F(30,`dd`),K(31),I()()(),A(32,uoe,11,1,`p`,63),A(33,poe,6,0),A(34,boe,4,0),F(35,`h3`),K(36),I(),M(37,woe,12,11,null,null,V8,!1,Toe,2,0,`p`,63),A(40,Ooe,6,1)(41,koe,2,0,`p`,95),I()),e&2){let e,n=t,r=W(2);D(2),J(` `,n.method,` `),D(2),q(n.url),D(7),q(n.id),D(5),J(``,n.renderMs,` ms`),D(5),J(``,n.durationMs,` ms`),D(5),J(``,n.bytes,` B`),D(5),q(r.requestPage()?.title||r.requestPage()?.url||`not connected`),D(),j((e=r.compressedWith(n))?32:-1,e),D(),j(n.overrides?.length?33:-1),D(),j(n.navigations?.length?34:-1),D(2),J(`Server calls (`,r.requestCalls().length,`)`),D(),N(r.requestCalls()),D(3),j(r.refetched().length?40:r.requestPage()&&r.requestCalls().length?41:-1)}}function joe(e,t){if(e&1&&(F(0,`div`,75)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,76),K(5,`Request`),I(),F(6,`th`,76),K(7,`Status`),I(),F(8,`th`,76),K(9,`Render mode`),I(),F(10,`th`,77),K(11,`Render`),I(),F(12,`th`,77),K(13,`Server calls`),I(),F(14,`th`,76),K(15,`Notes`),I()()(),F(16,`tbody`,78),M(17,loe,22,22,`tr`,79,V8),I()()(),A(19,Aoe,42,13,`div`,80)),e&2){let e,t=W();D(17),N(t.requests()),D(2),j((e=t.selectedRequest())?19:-1,e)}}function Moe(e,t){e&1&&(F(0,`div`,14)(1,`p`),K(2,`No SSR requests traced.`),I(),F(3,`p`,63),K(4,` Add `),F(5,`code`),K(6,`app.use(devtools.ssrMiddleware)`),I(),K(7,` before the Angular handler in `),F(8,`code`),K(9,`server.ts`),I(),K(10,`, or wrap a web-standard handler with `),F(11,`code`),K(12,`withPangularSsr()`),I(),K(13,`, then load a server rendered page. `),I()())}function Noe(e,t){if(e&1){let e=B();F(0,`app-network-waterfall`,102),H(`open`,function(t){return C(e),w(W().openCall(t))}),I()}if(e&2){let e=W();P(`calls`,e.waterfallCalls())(`selectedId`,e.selectedCall()?.id??null)}}function Poe(e,t){e&1&&(F(0,`p`,103),K(1,` Rows render as you scroll, so the browser's find only sees the ones near view; the search field searches them all. `),I())}function Foe(e,t){if(e&1&&(F(0,`tr`,106),L(1,`td`,107),I()),e&2){let e=W(2);D(),Xg(`height`,e.callWindow.padTop(),`px`)}}function Ioe(e,t){e&1&&L(0,`app-call-origin`,111),e&2&&(W(),P(`origin`,E_(0).origin))}function Loe(e,t){e&1&&(F(0,`span`,108),K(1,`transfer cache`),I())}function Roe(e,t){if(e&1&&(F(0,`span`,108),K(1),I()),e&2){W();let e=E_(0);D(),J(`delayed `,e.delayMs,` ms`)}}function zoe(e,t){e&1&&(F(0,`span`,91),K(1,`mocked`),I())}function Boe(e,t){e&1&&(F(0,`span`,92),K(1,`faulted`),I())}function Voe(e,t){if(e&1&&(F(0,`span`,112),K(1,`rule `),F(2,`code`),K(3),I()()),e&2){let e=t;P(`title`,`Matched rule: `+e),D(3),q(e)}}function Hoe(e,t){if(e&1){let e=B();w_(0),F(1,`tr`,81),H(`click`,function(){C(e);let t=E_(0);return w(W(2).openCall(t.id))}),F(2,`td`)(3,`span`,108),K(4),I()(),F(5,`td`,84),K(6),I(),F(7,`td`,82)(8,`button`,109),K(9),I()(),F(10,`td`,110),K(11),I(),F(12,`td`,86),L(13,`span`,87),K(14),I(),F(15,`td`,88),K(16),I(),F(17,`td`)(18,`div`,89),A(19,Ioe,1,1,`app-call-origin`,111),A(20,Loe,2,0,`span`,108),A(21,Roe,2,1,`span`,108),A(22,zoe,2,0,`span`,91),A(23,Boe,2,0,`span`,92),A(24,Voe,4,2,`span`,112),I()()()}if(e&2){let e,n=t.$implicit,r=W(2),i=T_(n.entry);D(),G(`selected`,r.selectedCall()?.id===i.id),k(`aria-rowindex`,n.index+2)(`data-vindex`,n.index),D(2),G(`server`,i.side===`server`),D(),q(i.side===`server`?`SSR`:`Client`),D(2),q(i.method),D(2),P(`title`,i.url),k(`data-call-id`,i.id)(`aria-pressed`,r.selectedCall()?.id===i.id)(`aria-controls`,r.selectedCall()?`call-preview`:null),D(),J(` `,i.url,` `),D(),P(`title`,i.pageUrl??``),D(),J(` `,i.pageUrl??``,` `),D(),G(`ok`,r.callTone(i)===`ok`)(`redirect`,r.callTone(i)===`redirect`)(`bad`,r.callTone(i)===`bad`),D(2),J(``,r.statusLabel(i),` `),D(2),J(``,i.durationMs,` ms`),D(3),j(i.origin?19:-1),D(),j(i.cacheHit?20:-1),D(),j(i.delayMs?21:-1),D(),j(i.mocked?22:-1),D(),j(i.faulted?23:-1),D(),j((e=r.rulePatternOf(i))?24:-1,e)}}function Uoe(e,t){if(e&1&&(F(0,`tr`,106),L(1,`td`,107),I()),e&2){let e=W(2);D(),Xg(`height`,e.callWindow.padBottom(),`px`)}}function Woe(e,t){if(e&1&&(A(0,Poe,2,0,`p`,103),F(1,`div`,75)(2,`table`)(3,`thead`)(4,`tr`,104)(5,`th`,76),K(6,`Side`),I(),F(7,`th`,76),K(8,`Method`),I(),F(9,`th`,76),K(10,`URL`),I(),F(11,`th`,76),K(12,`Page`),I(),F(13,`th`,76),K(14,`Status`),I(),F(15,`th`,77),K(16,`Time`),I(),F(17,`th`,76),K(18,`Notes`),I()()(),F(19,`tbody`,105,0),A(21,Foe,2,2,`tr`,106),M(22,Hoe,25,30,`tr`,79,noe),A(24,Uoe,2,2,`tr`,106),I()()()),e&2){let e=W();j(e.callWindow.enabled()?0:-1),D(2),k(`aria-rowcount`,e.visibleCalls().length+1),D(17),P(`rovingWindow`,e.callWindow),D(2),j(e.callWindow.padTop()?21:-1),D(),N(e.shownCalls()),D(2),j(e.callWindow.padBottom()?24:-1)}}function Goe(e,t){e&1&&K(0),e&2&&J(` Nothing matches “`,W(2).callQuery().trim(),`” with these filters. `)}function Koe(e,t){e&1&&K(0),e&2&&J(` None of the `,W(2).timeline().length,` requests fit these filters. `)}function qoe(e,t){if(e&1){let e=B();F(0,`div`,28)(1,`p`),K(2,`No requests match.`),I(),F(3,`p`,63),A(4,Goe,1,1)(5,Koe,1,1),I(),F(6,`div`,113)(7,`button`,24),H(`click`,function(){return C(e),w(W().clearCallFilters())}),K(8,`Clear filters`),I()()()}if(e&2){let e=W();D(4),j(e.callQuery().trim()?4:5)}}function Joe(e,t){e&1&&(F(0,`div`,14)(1,`p`),K(2,`No requests yet.`),I(),F(3,`p`,63),K(4,` Add `),F(5,`code`),K(6,`withPangular()`),I(),K(7,` to `),F(8,`code`),K(9,`provideHttpClient`),I(),K(10,`, then load a page of the app. `),I()())}function Yoe(e,t){if(e&1){let e=B();F(0,`button`,121),H(`click`,function(){C(e);let t=W();return w(W().copyPreview(t))}),K(1,` Copy `),I()}if(e&2){let e=W();k(`aria-label`,`Copy the response of `+e.method+` `+e.url)}}function Xoe(e,t){e&1&&(F(0,`p`,123),K(1,` Matched rule `),F(2,`code`),K(3),I()()),e&2&&(D(3),q(t))}function Zoe(e,t){if(e&1){let e=B();F(0,`div`,114),H(`keydown.escape`,function(){return C(e),w(W().closePreview())}),F(1,`div`,115)(2,`h3`,116),K(3,`Response preview`),I(),F(4,`div`,117),A(5,Yoe,2,1,`button`,118),F(6,`app-call-copy`,119),H(`done`,function(t){return C(e),w(W().message.set(t))}),I(),F(7,`button`,120),H(`click`,function(){let t=C(e);return w(W().mockCall(t))}),K(8,` Mock this request `),I(),F(9,`button`,121),H(`click`,function(){return C(e),w(W().closePreview())}),K(10,`Close`),I()()(),F(11,`p`,122)(12,`span`,84),K(13),I(),F(14,`span`,86),K(15),I(),F(16,`span`,99),K(17),I()(),A(18,Xoe,4,1,`p`,123),F(19,`pre`,124),K(20),I(),L(21,`app-http-headers`,125),I()}if(e&2){let e,n=t,r=W();D(5),j(!n.error&&n.preview?5:-1),D(),P(`call`,n),D(),P(`disabled`,!r.canWrite()),k(`aria-describedby`,r.canWrite()?null:`http-writes-off`),D(6),q(n.method),D(),G(`ok`,r.callTone(n)===`ok`)(`redirect`,r.callTone(n)===`redirect`)(`bad`,r.callTone(n)===`bad`),D(),q(r.statusLabel(n)),D(),P(`title`,n.url),D(),q(n.url),D(),j((e=r.rulePatternOf(n))?18:-1,e),D(),G(`error`,!!n.error&&!n.cancelled),k(`aria-label`,n.error?`Response error`:`Response body`),D(),q(n.error??r.previewText(n)??`(no body)`),D(),P(`callId`,n.id)(`request`,n.requestHeaders)(`response`,n.responseHeaders)}}function Qoe(e,t){if(e&1&&(F(0,`p`,35),K(1),I()),e&2){let e=W();D(),q(e.writesOff)}}function $oe(e,t){e&1&&(F(0,`p`,53),K(1,` SSR mocks are not transferred to the client: the browser requests the URL again and gets the real response unless the rule also applies on the client. `),I())}function ese(e,t){e&1&&(F(0,`span`),K(1,`passthrough`),I())}function tse(e,t){e&1&&(F(0,`span`,132),K(1,`network error`),I())}function nse(e,t){if(e&1&&(F(0,`span`,86),K(1),I()),e&2){let e=W().$implicit,t=W();G(`ok`,t.statusTone(e.status)===`ok`)(`redirect`,t.statusTone(e.status)===`redirect`)(`bad`,t.statusTone(e.status)===`bad`),D(),q(e.status)}}function rse(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W().$implicit;D(),J(``,e.delayMs,` ms`)}}function ise(e,t){e&1&&(F(0,`span`),K(1,`mock body`),I())}function ase(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W().$implicit;D(),J(``,e.chance,`% of requests`)}}function ose(e,t){e&1&&(F(0,`p`,134),K(1,` The SSR mock is not written to TransferState, so the browser requests this URL again. `),I())}function sse(e,t){if(e&1){let e=B();F(0,`li`)(1,`label`,126)(2,`input`,127),H(`change`,function(){let t=C(e).$implicit;return w(W().toggleRule(t.id))}),I(),F(3,`code`,128)(4,`span`,129),K(5),I(),K(6),I()(),F(7,`button`,130),H(`click`,function(){let t=C(e).$implicit;return w(W().removeRule(t.id))}),K(8,` Remove `),I(),F(9,`span`,131)(10,`span`),K(11),I(),A(12,ese,2,0,`span`)(13,tse,2,0,`span`,132)(14,nse,2,7,`span`,133),A(15,rse,2,1,`span`),A(16,ise,2,0,`span`),A(17,ase,2,1,`span`),I(),A(18,ose,2,0,`p`,134),I()}if(e&2){let e=t.$implicit,n=W();G(`off`,!e.enabled),D(2),P(`checked`,e.enabled)(`disabled`,!n.canWrite()),k(`aria-describedby`,n.canWrite()?null:`http-writes-off`)(`aria-label`,`Enable rule for `+e.pattern),D(),P(`title`,e.pattern),D(2),q(e.method||`ANY`),D(),J(` `,e.pattern),D(),P(`disabled`,!n.canWrite()),k(`aria-describedby`,n.canWrite()?null:`http-writes-off`)(`aria-label`,`Remove rule for `+e.pattern),D(4),q(n.targetLabel(e.target)),D(),j(e.status===void 0?12:e.status===0?13:14),D(3),j(e.delayMs?15:-1),D(),j(e.body?16:-1),D(),j(e.chance?17:-1),D(),j(n.mocksOnServer(e)?18:-1)}}function cse(e,t){e&1&&(F(0,`li`,60),K(1,`No rules. SSR rules apply on the next page load.`),I())}function lse(e,t){if(e&1){let e=B();F(0,`p`,68),K(1,` Throws while the server renders, so it needs `),F(2,`code`),K(3,`providePangularHttp()`),I(),K(4,` and a page the engine renders. Prerendered files served as static files skip it. `),I(),F(5,`label`),K(6,` Error message `),F(7,`input`,135),H(`input`,function(t){return C(e),w(W().patchOverride(`message`,t))}),I()()}if(e&2){let e=W();D(7),P(`value`,e.overrideDraft().message)}}function use(e,t){e&1&&K(0,` For a cached HTTP response this is the whole cache record, not only the response body. `)}function dse(e,t){e&1&&(F(0,`p`,139),K(1,` Filled in from the TransferState payload. The value starts empty because the panel only shows a redacted copy, so type the JSON the server should send. `),A(2,use,1,0),I()),e&2&&(D(2),j(t===`http`?2:-1))}function fse(e,t){if(e&1){let e=B();F(0,`label`),K(1,` TransferState key `),F(2,`input`,136),H(`input`,function(t){return C(e),w(W().patchOverride(`key`,t))}),I()(),F(3,`label`)(4,`span`),K(5,`New JSON value `),F(6,`span`,38),K(7,`(empty removes the entry)`),I()(),F(8,`textarea`,137),H(`input`,function(t){return C(e),w(W().patchOverride(`value`,t))}),I()(),F(9,`p`,138),K(10),I(),A(11,dse,3,1,`p`,139)}if(e&2){let e,t=W();D(2),P(`value`,t.overrideDraft().key),D(6),P(`value`,t.overrideDraft().value),k(`aria-invalid`,t.overrideValueError()?`true`:null)(`aria-describedby`,t.overrideFromPayload()?`override-value-error override-value-note`:`override-value-error`),D(2),q(t.overrideValueError()),D(),j((e=t.overrideFromPayload())?11:-1,e)}}function pse(e,t){e&1&&(F(0,`p`,68),K(1,` Serves `),F(2,`code`),K(3,`index.csr.html`),I(),K(4,` instead of rendering. Needs `),F(5,`code`),K(6,`browserDistFolder`),I(),K(7,` in `),F(8,`code`),K(9,`initPangularHub()`),I(),K(10,`. `),I())}function mse(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W().$implicit;D(),q(e.message)}}function hse(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W().$implicit;D(),Y(``,e.value===void 0?`remove`:`set`,` `,e.key)}}function gse(e,t){if(e&1){let e=B();F(0,`li`)(1,`label`,126)(2,`input`,127),H(`change`,function(){let t=C(e).$implicit;return w(W().toggleOverride(t.id))}),I(),F(3,`code`,128)(4,`span`,129),K(5),I(),K(6),I()(),F(7,`button`,140),H(`click`,function(){let t=C(e).$implicit;return w(W().removeOverride(t.id))}),K(8,` Remove `),I(),F(9,`span`,131),A(10,mse,2,1,`span`),A(11,hse,2,2,`span`),I()()}if(e&2){let e=t.$implicit,n=W();G(`off`,!e.enabled),D(2),P(`checked`,e.enabled)(`disabled`,!n.canWrite()),k(`aria-label`,`Enable `+n.overrideLabel(e.kind)+` for `+e.pattern),D(),P(`title`,e.pattern),D(2),q(n.overrideLabel(e.kind)),D(),J(` `,e.pattern),D(),P(`disabled`,!n.canWrite()),k(`aria-label`,`Remove `+n.overrideLabel(e.kind)+` for `+e.pattern),D(3),j(e.message?10:-1),D(),j(e.key?11:-1)}}function _se(e,t){e&1&&(F(0,`li`,60),K(1,`No overrides.`),I())}function vse(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2,`DOM nodes hydrated`),I(),F(3,`dd`),K(4),I()(),F(5,`div`)(6,`dt`),K(7,`DOM nodes skipped`),I(),F(8,`dd`),K(9),I()(),F(10,`div`)(11,`dt`),K(12,`Mismatched components`),I(),F(13,`dd`),K(14),I()()),e&2){let e=t;D(4),q(e.hydrated),D(5),q(e.skipped),D(4),G(`bad`,e.mismatched>0),D(),q(e.mismatched)}}function yse(e,t){if(e&1&&(F(0,`span`,142)(1,`span`,143),K(2,`Expected`),I(),F(3,`code`),K(4),I()()),e&2){let e=W().$implicit;D(4),q(e.expected)}}function bse(e,t){if(e&1&&(F(0,`span`,142)(1,`span`,143),K(2,`Actual`),I(),F(3,`code`),K(4),I()()),e&2){let e=W().$implicit;D(4),q(e.actual)}}function xse(e,t){if(e&1&&(F(0,`li`)(1,`code`),K(2),I(),A(3,yse,5,1,`span`,142),A(4,bse,5,1,`span`,142),I()),e&2){let e=t.$implicit;D(2),q(e.isClass?e.component:`<`+e.component+`>`),D(),j(e.expected?3:-1),D(),j(e.actual?4:-1)}}function Sse(e,t){if(e&1&&(F(0,`h3`),K(1),I(),F(2,`ul`,141),M(3,xse,5,3,`li`,null,Jh),I()),e&2){let e=W();D(),J(`Mismatches (`,e.mismatches.length,`)`),D(2),N(e.mismatches)}}function Cse(e,t){if(e&1&&(F(0,`li`)(1,`code`),K(2),I()()),e&2){let e=t.$implicit;D(2),q(e)}}function wse(e,t){if(e&1&&(F(0,`h3`),K(1,`ngSkipHydration hosts`),I(),F(2,`ul`,144),M(3,Cse,3,1,`li`,null,Jh),I()),e&2){let e=W();D(3),N(e.skipHydrationHosts)}}function Tse(e,t){e&1&&(F(0,`h3`),K(1,`Warnings`),I(),F(2,`p`,63),K(3,` Not captured: add `),F(4,`code`),K(5,`providePangularHttp()`),I(),K(6,` to the app providers. `),I())}function Ese(e,t){if(e&1&&(F(0,`pre`,145),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function Dse(e,t){e&1&&(F(0,`p`,95),K(1,`No hydration warnings.`),I())}function Ose(e,t){if(e&1&&(F(0,`h3`),K(1),I(),M(2,Ese,2,1,`pre`,145,Jh,!1,Dse,2,0,`p`,95)),e&2){let e=W();D(),J(`Warnings (`,e.warnings.length,`)`),D(),N(e.warnings)}}function kse(e,t){if(e&1&&(F(0,`dl`,94)(1,`div`)(2,`dt`),K(3,`Enabled`),I(),F(4,`dd`)(5,`span`,108),K(6),I()()(),F(7,`div`)(8,`dt`),K(9,`Hydrated components`),I(),F(10,`dd`),K(11),I()(),F(12,`div`)(13,`dt`),K(14,`Hydrated nodes`),I(),F(15,`dd`),K(16),I()(),F(17,`div`)(18,`dt`),K(19,`Skipped components`),I(),F(20,`dd`),K(21),I()(),F(22,`div`)(23,`dt`),K(24,`App stable after`),I(),F(25,`dd`),K(26),I()(),F(27,`div`)(28,`dt`),K(29,`Incremental defer blocks`),I(),F(30,`dd`),K(31),I()(),A(32,vse,15,5),I(),A(33,Sse,5,1),A(34,wse,5,0),A(35,Tse,7,0)(36,Ose,5,2)),e&2){let e,n=t;D(5),G(`on`,n.enabled)(`off-tag`,!n.enabled),D(),q(n.enabled?`yes`:`no (client render only)`),D(5),q(n.hydratedComponents??`n/a`),D(5),q(n.hydratedNodes??`n/a`),D(5),q(n.componentsSkippedHydration??`n/a`),D(5),q(n.stableMs===void 0?`n/a`:n.stableMs+` ms`),D(5),q(n.deferBlocksWithIncrementalHydration??`n/a`),D(),j((e=n.nodes)?32:-1,e),D(),j(n.mismatches?.length?33:-1),D(),j(n.skipHydrationHosts.length?34:-1),D(),j(n.warningsCaptured===!1?35:36)}}function Ase(e,t){e&1&&(F(0,`div`,14)(1,`p`),K(2,`No hydration data for this page.`),I(),F(3,`p`,63),K(4,`Open a server rendered page of the app to see its stats.`),I()())}function jse(e,t){e&1&&(F(0,`div`,14)(1,`p`),K(2,`No TransferState script: this page was not server rendered.`),I()())}function Mse(e,t){if(e&1&&(F(0,`p`,147),K(1),I()),e&2){let e=W(2);D(),q(e.error)}}function Nse(e,t){e&1&&(F(0,`span`,108),K(1),I()),e&2&&(D(),q(t))}function Pse(e,t){if(e&1&&(F(0,`span`,108),K(1),I(),F(2,`span`,151),K(3),I()),e&2){let e=t,n=W().$implicit,r=W(3);G(`server`,r.statusTone(e.status)===`ok`)(`fault`,r.statusTone(e.status)===`bad`),D(),J(`HTTP `,e.status),D(2),q(e.url??n.key)}}function Fse(e,t){if(e&1&&(F(0,`span`,151),K(1),I()),e&2){let e=W().$implicit;D(),q(e.key)}}function Ise(e,t){if(e&1){let e=B();F(0,`button`,121),H(`click`,function(){C(e);let t=W().$implicit;return w(W(3).editEntry(t))}),K(1,` Edit in SSR overrides `),I()}if(e&2){let e=W().$implicit;k(`aria-label`,`Edit in SSR overrides, key `+e.key)}}function Lse(e,t){if(e&1){let e=B();F(0,`details`)(1,`summary`),L(2,`span`,150),A(3,Nse,2,1,`span`,108),A(4,Pse,4,6)(5,Fse,2,1,`span`,151),F(6,`span`,152),K(7),I()(),F(8,`div`,153)(9,`span`,154),K(10,`Key`),I(),F(11,`code`,155),K(12),I(),F(13,`div`,156)(14,`button`,121),H(`click`,function(){let t=C(e).$implicit;return w(W(3).copyKey(t.key))}),K(15,` Copy `),I(),A(16,Ise,2,1,`button`,118),I()(),F(17,`pre`,157),K(18),V_(19,`json`),I()()}if(e&2){let e,n,r=t.$implicit,i=W(3);D(3),j((e=i.payloadLabel(r))?3:-1,e),D(),j((n=r.http)?4:5,n),D(3),J(``,r.size,` B`),D(5),q(r.key),D(2),k(`aria-label`,`Copy key `+r.key),D(2),j(i.canEditEntry(r)?16:-1),D(),k(`aria-label`,`Value of `+r.key),D(),q(H_(19,8,r.value))}}function Rse(e,t){if(e&1&&(F(0,`p`,146),K(1),I(),A(2,Mse,2,1,`p`,147),L(3,`app-payload-insights`,148),F(4,`div`,149),M(5,Lse,20,10,`details`,null,roe),I()),e&2){let e=W();D(),__(` `,e.entries.length,` entr`,e.entries.length===1?`y`:`ies`,`, `,e.size,` bytes `),D(),j(e.error?2:-1),D(),P(`size`,e.size)(`entries`,e.entries),D(2),N(e.entries)}}function zse(e,t){e&1&&A(0,jse,3,0,`div`,14)(1,Rse,7,6),e&2&&j(+!!t.found)}function Bse(e,t){e&1&&(F(0,`div`,14)(1,`p`),K(2,`Open a page of the app to see its payload.`),I()())}var H8={kind:`render-error`,pattern:``,message:``,key:``,value:``},Vse={"render-error":`Render error`,"client-render":`Client render`,"state-edit":`TransferState edit`},Hse={server:`Server`,prerender:`Prerender`,client:`Client`,redirect:`Redirect`,"not-rendered":`Not rendered`,unknown:`Unknown`},U8={pattern:``,method:``,target:`both`,status:``,delayMs:``,body:``,chance:``};function W8(){return`r${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`}function G8(e){if(!e.trim())return;let t=Number(e);return Number.isInteger(t)&&t>=1&&t<=99?t:null}function K8(e){try{let t=new URL(e,`http://x`);return t.pathname+t.search}catch{return e}}var Use=/\[redacted\]|%5Bredacted%5D/gi;function Wse(e){return(/^([a-z][a-z\d+.-]*:|\/\/)/i.test(e)?K8(e):e).replace(Use,`*`)}function Gse(e){let t=qE(e);if(t!==null)return t;try{return JSON.parse(e),e.trim()}catch{return null}}var q8=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`];function Kse(e){try{return new URL(e,`http://x`).pathname}catch{return``}}function qse(e){let t=Kse(e);return t===`/`?``:t}var Jse=/\[redacted\]|%5Bredacted%5D/i,Yse=200,J8=50,Y8=500,X8=1e5,Xse=[{value:``,label:`None`},...tw.map(([e,t])=>({value:String(e),label:`${e} ${t}`}))],Zse=class e{rpc=$(null);canWrite=X(()=>IT(this.rpc(),`http`));writesOff=Uw(`http`);loading=E(!1);failed=E(!1);serverCalls=E([]);pages=E([]);payloads=E({});serverDropped=E(0);requests=E([]);rules=E([]);addingRule=E(!1);addingOverride=E(!1);ruleSaves=Promise.resolve(!0);overrideSaves=Promise.resolve(!0);overrides=E([]);overrideDraft=E({...H8});overrideFromPayload=E(null);overrideKindOptions=[{value:`render-error`,label:`Render error`},{value:`client-render`,label:`Force Client render`},{value:`state-edit`,label:`Edit TransferState entry`}];overrideValueError=X(()=>{let e=this.overrideDraft().value.trim();if(!e)return``;try{return JSON.parse(e),``}catch{return`The value must be valid JSON.`}});overrideReady=X(()=>{let e=this.overrideDraft();return!e.pattern.trim()||this.overrides().length>=20?!1:e.kind!==`state-edit`||!!e.key.trim()&&!this.overrideValueError()});hostPageId=fT();selectedPageId=Q({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:e.find(e=>e.pageId===this.hostPageId)?.pageId??e[0]?.pageId??null});selectedCallId=E(null);draft=E({...U8});message=E(``);bodyPlaceholder=`{ "error": "Service unavailable" }`;statusOptions=Xse;unsubscribe=[];destroyRef=S(vs);injector=S(gs);host=S(kl);selected=X(()=>this.pages().find(e=>e.pageId===this.selectedPageId())??null);pageRequestId=X(()=>this.selected()?.ssrRequestId??null);selectedRequestId=Q(()=>this.pageRequestId());selectedPayload=X(()=>{let e=this.selectedPageId();return e?this.payloads()[e]??null:null});maxCalls=X(()=>NT(this.rpc()).limits.httpCalls);droppedCalls=X(()=>(this.selected()?.dropped??0)+this.serverDropped());pageServerCalls=X(()=>{let e=this.selected()?.initialUrl;return e?this.serverCalls().filter(t=>!t.pageUrl||t.pageUrl===e):this.serverCalls()});renderServerCalls=X(()=>{let e=this.pageRequestId();return e?this.serverCalls().filter(t=>t.requestId===e):[]});timeline=X(()=>[...this.pageServerCalls(),...this.selected()?.calls??[]].sort((e,t)=>t.at-e.at));callQuery=E(``);timelineView=E(`table`);waterfallCalls=X(()=>this.visibleCalls().filter(e=>e.side===`client`));sideFilter=E(`all`);failedOnly=E(!1);sideOptions=[{value:`all`,label:`All sides`},{value:`server`,label:`SSR`},{value:`client`,label:`Client`}];callWindow=new HN({count:X(()=>this.visibleCalls().length),estimate:37});shownCalls=X(()=>{let{start:e,end:t}=this.callWindow.range();return this.visibleCalls().slice(e,t).map((t,n)=>({entry:t,index:e+n}))});callsBody=av(`callsBody`);visibleCalls=X(()=>{let e=this.callQuery().trim().toLowerCase(),t=this.sideFilter()??`all`,n=this.failedOnly();return this.timeline().filter(r=>(t===`all`||r.side===t)&&(!n||this.isFailed(r))&&(!e||`${r.method} ${r.url}`.toLowerCase().includes(e)||`${r.method} ${K8(r.url)}`.toLowerCase().includes(e)))});countText=X(()=>{let e=this.timeline().length;if(this.timelineView()!==`waterfall`)return`${this.visibleCalls().length} of ${e}`;let t=this.waterfallCalls().length;return`${t} client ${t===1?`call`:`calls`} of ${e}`});filterStatus=X(()=>{this.callQuery(),this.sideFilter(),this.failedOnly(),this.timelineView(),this.filterFlip=!this.filterFlip;let e=Z(()=>this.countText());return this.filterFlip?`${e}\u00a0`:e});filterFlip=!0;selectedCall=X(()=>this.visibleCalls().find(e=>e.id===this.selectedCallId())??null);pageSsrRequest=X(()=>this.requests().find(e=>e.id===this.pageRequestId())??null);selectedRequest=X(()=>this.requests().find(e=>e.id===this.selectedRequestId())??null);requestCalls=X(()=>{let e=this.selectedRequest()?.id;return e?this.serverCalls().filter(t=>t.requestId===e):[]});requestPage=X(()=>{let e=this.selectedRequest()?.id;return e?this.pages().find(t=>t.ssrRequestId===e)??null:null});refetched=X(()=>{let e=this.selectedRequest(),t=this.requestPage();if(!e||!t)return[];let n=new Set(this.requestCalls().filter(e=>e.status).map(e=>`${e.method} ${K8(e.url)}`));return t.calls.filter(t=>t.side===`client`&&!t.cacheHit&&!t.mocked&&t.at>=e.at&&n.has(`${t.method} ${K8(t.url)}`))});draftMocksOnServer=X(()=>{let e=this.draftRule();return!!e&&this.mocksOnServer(e)});draftRule=X(()=>{let e=this.draft(),t=e.pattern.trim();if(!t||t.length>Y8||this.bodyError()||this.rules().length>=J8)return null;let n=e.body.trim(),r=Math.min(Math.max(Math.round(Number(e.delayMs))||0,0),1e4),i=e.status.trim()?Number(e.status):n?200:void 0;if(i!==void 0&&!nw(i)||i===void 0&&!r)return null;let a=G8(e.chance);return a===null?null:{pattern:t,enabled:!0,target:e.target,...e.method?{method:e.method}:{},...i===void 0?{}:{status:i},...r?{delayMs:r}:{},...n?{body:n}:{},...a===void 0?{}:{chance:a}}});draftHint=X(()=>{let e=this.draft();return this.rules().length>=J8?`You can add up to ${J8} rules. Remove one to add another.`:e.pattern.trim()?e.pattern.trim().length>Y8?`The URL pattern is limited to ${Y8} characters.`:this.bodyError()?``:e.status.trim()&&!nw(Number(e.status))?`Pick a status from the list.`:G8(e.chance)===null?`Chance is a whole percent from 1 to 99.`:this.draftRule()?!e.status.trim()&&e.body.trim()?`With no status, the mock body returns 200.`:``:`Set a status, a delay or a mock body.`:`Enter a URL pattern to add a rule.`});bodyError=X(()=>{let e=this.draft().body.trim();if(!e)return``;if(e.length>X8)return`The mock body is limited to ${X8} characters.`;try{return JSON.parse(e),``}catch{return`The mock body must be valid JSON.`}});constructor(){ac(()=>{let e=this.callsBody()?.nativeElement;e&&this.callWindow.attach(e)}),ac(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.stopListening())}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=e.scope(`pangular`).rpc,[n,r]=await Promise.all([t.sharedState(`http`),t.sharedState(`http-payloads`)]);if(this.destroyRef.destroyed)return;let i=e=>{let t=e;this.serverCalls.set(t?.serverCalls??[]),this.serverDropped.set(t?.serverDropped??0),this.requests.set([...t?.requests??[]].reverse()),this.pages.set(t?.pages??[]),this.rules.set(t?.rules??[]),this.overrides.set(t?.ssrOverrides??[])},a=e=>this.payloads.set(e?.pages??{});i(n.value()),a(r.value()),this.stopListening(),this.unsubscribe=[n.on(`updated`,i),r.on(`updated`,a)]}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}retry(){let e=this.rpc();e&&this.load(e)}guardVerdict(e){return e.guards?.passed===!1?e.outcome===`redirected`?`redirected`:`rejected`:``}msLabel(e){return e===void 0?`n/a`:`${e} ms`}skipText(e){return ew[e]??``}refetchReason(e){let t=`${e.method} ${K8(e.url)}`,n=this.requestCalls().filter(e=>`${e.method} ${K8(e.url)}`===t),r=n[0];return r?.cacheSkip&&n.every(e=>e.cacheSkip===r.cacheSkip)?this.skipText(r.cacheSkip):``}compressedWith(e){if(e.compressedBeforeTrace)return e.headers[`content-encoding`]??`unknown encoding`}renderModeLabel(e){return Hse[e]??`Unknown`}statusLabel(e){return e.cancelled?`cancelled`:e.status?String(e.status):`ERR`}callTone(e){return e.cancelled?`neutral`:this.statusTone(e.status)}isFailed(e){return!!e.cancelled||!e.status||e.status>=400}clearCallFilters(){this.callQuery.set(``),this.sideFilter.set(`all`),this.failedOnly.set(!1),this.host.nativeElement.querySelector(`#timeline-search`)?.focus()}rulePatternOf(e){return e.rulePattern?e.rulePattern:e.ruleId?this.rules().find(t=>t.id===e.ruleId)?.pattern??null:null}openCall(e){this.selectedCallId.set(e),ed(()=>this.host.nativeElement.querySelector(`#preview-heading`)?.focus(),{injector:this.injector})}previewText(e){if(e.preview!==void 0)return qE(e.preview)??e.preview}async copyPreview(e){let t=this.previewText(e);if(t)try{await navigator.clipboard.writeText(t),this.message.set(`Copied.`)}catch{this.message.set(`The clipboard is not available here.`)}}mockCall(e){let t=e.method.toUpperCase(),n=Wse(e.url),r=e.error||!e.preview?null:Gse(e.preview);this.draft.set({...U8,pattern:n,method:t,body:r??``});let i=`${t} ${n}`;this.message.set(r?`Filled in a rule for ${i} with the preview as its body. Check it, then add the rule.`:e.preview&&!e.error?`Filled in a rule for ${i}. The preview is not complete JSON, so it is not used as the body.`:`Filled in a rule for ${i}. Set a status, a delay or a body, then add the rule.`),ed(()=>this.host.nativeElement.querySelector(`#rule-pattern`)?.focus(),{injector:this.injector})}closePreview(){let e=this.selectedCallId();this.selectedCallId.set(null),e&&[...this.host.nativeElement.querySelectorAll(`button[data-call-id]`)].find(t=>t.dataset.callId===e)?.focus()}stopListening(){for(let e of this.unsubscribe.splice(0))e()}statusTone(e){return e===void 0?`neutral`:e===0||e>=400?`bad`:e>=300?`redirect`:e>=200?`ok`:`neutral`}mocksOnServer(e){return e.target!==`client`&&e.status!==void 0&&e.status>0&&e.status<400}payloadLabel(e){return e.source===`hydration`?`hydration annotations`:e.fn?`Analog server function ${e.fn.name??e.fn.id}`:e.source===`analog`?`Analog`:null}targetLabel(e){return e===`both`?`SSR + client`:e===`server`?`SSR only`:`Client only`}pageOptions=X(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url})));methodOptions=X(()=>{let e=this.draft().method;return[{value:``,label:`Any`},...(e&&!q8.includes(e)?[...q8,e]:q8).map(e=>({value:e,label:e}))]});targetOptions=[{value:`both`,label:`SSR + client`},{value:`server`,label:`SSR only`},{value:`client`,label:`Client only`}];selectPage(e){e&&this.selectedPageId.set(e),this.selectedCallId.set(null),this.overrideFromPayload.set(null)}setDraft(e,t){this.draft.update(n=>({...n,[e]:t}))}patch(e,t){let n=t.target.value;this.draft.update(t=>({...t,[e]:n}))}async addRule(e){e.preventDefault();let t=this.draftRule();if(!t||this.addingRule())return;let n={id:W8(),...t};this.addingRule.set(!0);let r=await this.saveRules(e=>[[...e,n],n],`Rule added.`);this.addingRule.set(!1),r&&(this.draft.set({...U8}),this.host.nativeElement.querySelector(`#rule-pattern`)?.focus())}async addPreset(e){let t=uae(e,W8);if(t.length){if(this.rules().length+t.length>J8){this.message.set(`You can add up to ${J8} rules. Remove one to add the preset.`);return}await this.saveRules(e=>[[...e,...t],t[0]],`Added ${t.length===1?`a rule`:`${t.length} rules`} for every browser request.`)}}toggleRule(e){this.saveRules(t=>{let n=t.find(t=>t.id===e);return n?[t.map(t=>t.id===e?{...t,enabled:!t.enabled}:t),n]:null},`Rule updated.`)}async removeRule(e){let t=-1;await this.saveRules(n=>(t=n.findIndex(t=>t.id===e),t<0?null:[n.filter(t=>t.id!==e),n[t]]),`Rule removed.`)&&this.focusAfterRemove(`[data-remove-rule]`,t,`#rule-list-heading`)}async clearCalls(){try{await _T(this.rpc(),`clear-http-calls`),this.selectedCallId.set(null),this.message.set(`Timeline cleared.`)}catch{this.message.set(`Could not clear the timeline.`)}}overrideLabel(e){return Vse[e]??e}setOverrideDraft(e,t){this.overrideDraft.update(n=>({...n,[e]:t})),e===`kind`&&t!==`state-edit`&&this.overrideFromPayload.set(null)}patchOverride(e,t){let n=t.target.value;this.overrideDraft.update(t=>({...t,[e]:n})),e===`key`&&this.overrideFromPayload.set(null)}async copyKey(e){try{await navigator.clipboard.writeText(e),this.message.set(`Copied.`)}catch{this.message.set(`The clipboard is not available here.`)}}canEditEntry(e){let{key:t}=e;return this.canWrite()&&!!t&&t===t.trim()&&t.length<=Yse&&!Jse.test(t)}editEntry(e){if(!this.canEditEntry(e))return;let t=this.selected();this.overrideDraft.set({...H8,kind:`state-edit`,pattern:t?qse(t.initialUrl??t.url):``,key:e.key}),this.overrideFromPayload.set(e.http?`http`:`other`),this.message.set(`Editing the TransferState entry in SSR overrides.`),ed(()=>{let e=this.host.nativeElement.querySelector(this.overrideDraft().pattern?`#override-value`:`#override-pattern`);e?.scrollIntoView?.({block:`center`}),e?.focus()},{injector:this.injector})}async addOverride(e){if(e.preventDefault(),!this.overrideReady()||this.addingOverride())return;let t=this.overrideDraft(),n={id:`o${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`,kind:t.kind,pattern:t.pattern.trim(),enabled:!0,...t.kind===`render-error`&&t.message.trim()?{message:t.message.trim()}:{},...t.kind===`state-edit`?{key:t.key.trim()}:{},...t.kind===`state-edit`&&t.value.trim()?{value:t.value.trim()}:{}};this.addingOverride.set(!0);let r=await this.saveOverrides(e=>[...e,n],`Override added. Reload the page.`);this.addingOverride.set(!1),r&&(this.overrideDraft.set({...H8,kind:t.kind}),this.overrideFromPayload.set(null),this.host.nativeElement.querySelector(`#override-pattern`)?.focus())}toggleOverride(e){this.saveOverrides(t=>t.some(t=>t.id===e)?t.map(t=>t.id===e?{...t,enabled:!t.enabled}:t):null,`Override updated. Reload the page.`)}async removeOverride(e){let t=-1;await this.saveOverrides(n=>(t=n.findIndex(t=>t.id===e),t<0?null:n.filter(t=>t.id!==e)),`Override removed.`)&&this.focusAfterRemove(`[data-remove-override]`,t,`#override-list-heading`)}focusAfterRemove(e,t,n){ed(()=>{let r=this.host.nativeElement,i=r.querySelectorAll(e);(i[Math.min(t,i.length-1)]??r.querySelector(n))?.focus()},{injector:this.injector})}announce(e){if(this.message()!==e){this.message.set(e);return}this.message.set(``),ed(()=>{this.message()===``&&this.message.set(e)},{injector:this.injector})}saveOverrides(e,t){let n=this.overrideSaves.then(async()=>{let n=e(this.overrides());if(!n)return!1;try{let e=await _T(this.rpc(),`set-ssr-overrides`,n);return this.overrides.set(Array.isArray(e)?e:n),this.announce(t),!0}catch{return this.message.set(`Could not save the overrides.`),!1}});return this.overrideSaves=n,n}saveRules(e,t){let n=this.ruleSaves.then(async()=>{let n=e(this.rules());if(!n)return!1;let[r,i]=n;try{let e=await _T(this.rpc(),`set-http-rules`,r);return this.rules.set(Array.isArray(e)?e:r),this.announce(i.target===`client`?t:`${t} Reload the page to apply it to SSR.`),!0}catch{return this.message.set(`Could not save the rules.`),!1}});return this.ruleSaves=n,n}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-network-inspector`]],viewQuery:function(e,t){e&1&&Dg(t.callsBody,$ae,5),e&2&&Og()},inputs:{rpc:[1,`rpc`]},decls:145,vars:73,consts:[[`callsBody`,``],[1,`page-intro`],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`,`error`],[1,`toolbar`,3,`hidden`],[1,`page-picker`],[`id`,`page-picker-label`],[`labelledBy`,`page-picker-label`,`emptyText`,`No connected page`,`placeholder`,`No connected page`,3,`valueChange`,`options`,`value`],[`type`,`button`,3,`click`,`disabled`],[3,`done`,`calls`,`ssrRequest`,`title`,`pageUrl`],[`role`,`status`,1,`message`],[1,`grid`,3,`hidden`],[`aria-labelledby`,`ssr-heading`,1,`panel`,`wide`],[`id`,`ssr-heading`],[1,`empty`],[`aria-labelledby`,`timeline-heading`,1,`panel`,`wide`],[`id`,`timeline-heading`],[`what`,`HTTP calls`,`limit`,`httpCalls`,3,`dropped`,`max`],[`role`,`group`,`aria-label`,`Filter the HTTP timeline`,1,`filters`],[`inputId`,`timeline-search`,`placeholder`,`Filter by URL or method`,`saveKey`,`network`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Side`,1,`side-filter`,3,`valueChange`,`options`,`value`],[1,`inline`,`failed-toggle`],[`type`,`checkbox`,3,`change`,`checked`],[`role`,`group`,`aria-label`,`Timeline view`,1,`view-toggle`],[`type`,`button`,3,`click`],[1,`total`],[`role`,`status`,1,`sr-only`],[3,`calls`,`selectedId`],[`role`,`status`,1,`empty`,`no-match`],[`id`,`call-preview`,`role`,`region`,`aria-labelledby`,`preview-heading`,1,`preview`],[`aria-labelledby`,`lint-heading`,1,`panel`,`wide`],[`id`,`lint-heading`],[3,`open`,`calls`,`serverCalls`],[`aria-labelledby`,`rules-heading`,1,`panel`],[`id`,`rules-heading`],[`id`,`http-writes-off`,1,`muted`,`small`],[3,`add`,`disabled`,`describedBy`],[`id`,`rule-form`,1,`rule-form`,3,`submit`],[1,`hint`],[`id`,`rule-pattern`,`required`,``,`spellcheck`,`false`,`autocomplete`,`off`,`placeholder`,`e.g. /api/products`,3,`input`,`value`],[3,`calls`,`pattern`,`method`,`target`],[1,`row`],[1,`field-group`],[`id`,`rule-method-label`],[`labelledBy`,`rule-method-label`,3,`valueChange`,`options`,`value`],[`id`,`rule-target-label`],[`labelledBy`,`rule-target-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`id`,`rule-status-label`],[`labelledBy`,`rule-status-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`type`,`number`,`inputmode`,`numeric`,`min`,`0`,`max`,`10000`,`placeholder`,`0`,3,`input`,`value`],[`id`,`rule-chance`,`type`,`number`,`inputmode`,`numeric`,`min`,`1`,`max`,`99`,`step`,`1`,`placeholder`,`100`,3,`input`,`value`],[`rows`,`3`,`spellcheck`,`false`,`aria-describedby`,`body-error`,3,`input`,`placeholder`,`value`],[`id`,`body-error`,1,`field-error`],[`id`,`rule-ssr-note`,1,`muted`,`small`],[`id`,`rule-hint`,1,`muted`,`small`],[1,`form-actions`],[`type`,`submit`,3,`disabled`],[`id`,`rule-list-heading`,`tabindex`,`-1`,1,`rules-heading`],[1,`rules`],[3,`off`],[1,`empty-rule`],[`aria-labelledby`,`overrides-heading`,1,`panel`],[`id`,`overrides-heading`],[1,`muted`,`small`],[1,`rule-form`,3,`submit`],[`id`,`override-kind-label`],[`labelledBy`,`override-kind-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`id`,`override-pattern`,`required`,``,`spellcheck`,`false`,`autocomplete`,`off`,`placeholder`,`e.g. /examples/ssr`,3,`input`,`value`],[`id`,`override-kind-help`,1,`muted`,`small`],[`id`,`override-list-heading`,`tabindex`,`-1`,1,`rules-heading`],[`aria-labelledby`,`hydration-heading`,1,`panel`],[`id`,`hydration-heading`],[`aria-labelledby`,`payload-heading`,1,`panel`,`wide`],[`id`,`payload-heading`],[`aria-hidden`,`true`,1,`spinner`],[1,`table-wrap`],[`scope`,`col`],[`scope`,`col`,1,`num`],[`appRovingList`,`button.ssr-row`],[3,`selected`],[`id`,`ssr-detail`,`role`,`region`,`aria-labelledby`,`ssr-detail-heading`,1,`preview`],[3,`click`],[1,`url`],[`type`,`button`,`aria-controls`,`ssr-detail`,1,`link`,`ssr-row`,3,`title`],[1,`method`],[1,`sr-only`],[1,`status`],[`aria-hidden`,`true`,1,`dot`],[1,`num`],[1,`notes`],[1,`tag`,`server`],[1,`tag`,`mock`],[1,`tag`,`fault`],[`id`,`ssr-detail-heading`],[1,`stats`],[1,`muted`,`small`,`ok-note`],[1,`request-call`],[1,`muted`],[1,`stats`,`nav-stats`],[1,`preview-url`,3,`title`],[1,`tag`,3,`title`],[1,`muted`,`small`,`skip-reason`],[3,`open`,`calls`,`selectedId`],[1,`muted`,`small`,`window-note`],[`aria-rowindex`,`1`],[`appRovingList`,`button[data-call-id]`,3,`rovingWindow`],[`aria-hidden`,`true`,1,`spacer`],[`colspan`,`7`],[1,`tag`],[`type`,`button`,1,`link`,3,`title`],[1,`page-url`,3,`title`],[3,`origin`],[1,`tag`,`rule-ref`,3,`title`],[1,`empty-actions`],[`id`,`call-preview`,`role`,`region`,`aria-labelledby`,`preview-heading`,1,`preview`,3,`keydown.escape`],[1,`preview-head`],[`id`,`preview-heading`,`tabindex`,`-1`],[1,`preview-actions`],[`type`,`button`,1,`ghost`],[3,`done`,`call`],[`type`,`button`,`aria-controls`,`rule-form`,1,`ghost`,3,`click`,`disabled`],[`type`,`button`,1,`ghost`,3,`click`],[1,`preview-meta`],[1,`preview-rule`],[`tabindex`,`0`,`role`,`region`,1,`preview-body`],[3,`callId`,`request`,`response`],[1,`inline`],[`type`,`checkbox`,3,`change`,`checked`,`disabled`],[1,`rule-pattern`,3,`title`],[1,`rule-method`],[`type`,`button`,`data-remove-rule`,``,1,`link`,`remove`,3,`click`,`disabled`],[1,`rule-meta`],[1,`status`,`bad`],[1,`status`,3,`ok`,`redirect`,`bad`],[1,`rule-note`],[`spellcheck`,`false`,`placeholder`,`Simulated render error`,`aria-describedby`,`override-kind-help`,3,`input`,`value`],[`id`,`override-key`,`spellcheck`,`false`,`autocomplete`,`off`,3,`input`,`value`],[`id`,`override-value`,`rows`,`3`,`spellcheck`,`false`,3,`input`,`value`],[`id`,`override-value-error`,1,`field-error`],[`id`,`override-value-note`,1,`muted`,`small`],[`type`,`button`,`data-remove-override`,``,1,`link`,`remove`,3,`click`,`disabled`],[1,`plain`,`mismatches`],[1,`mismatch-row`],[1,`mismatch-label`],[1,`plain`],[1,`warn`],[1,`muted`,`small`,`summary-line`],[`role`,`alert`,1,`bad`],[3,`size`,`entries`],[1,`entries`],[`aria-hidden`,`true`,1,`chevron`],[1,`entry-key`],[1,`entry-size`],[1,`entry-key-row`],[1,`entry-key-label`],[1,`entry-key-text`],[1,`entry-actions`],[`tabindex`,`0`,`role`,`region`]],template:function(e,t){if(e&1&&(F(0,`p`,1),K(1,` HttpClient calls made while rendering on the server and in the browser, from the live page and the devtools server, with hydration stats, the TransferState payload and fault injection. `),I(),A(2,ioe,4,0,`div`,2)(3,aoe,7,0,`div`,3),F(4,`div`,4)(5,`div`,5)(6,`span`,6),K(7,`Page`),I(),F(8,`app-select`,7),H(`valueChange`,function(e){return t.selectPage(e)}),I()(),F(9,`button`,8),H(`click`,function(){return t.clearCalls()}),K(10,` Clear timeline `),I(),F(11,`app-har-export`,9),H(`done`,function(e){return t.message.set(e)}),I(),F(12,`p`,10),K(13),I()(),F(14,`div`,11)(15,`section`,12)(16,`h2`,13),K(17),I(),A(18,joe,20,1)(19,Moe,14,0,`div`,14),I(),F(20,`section`,15)(21,`h2`,16),K(22),I(),L(23,`app-limit-note`,17),F(24,`div`,18)(25,`app-search-field`,19),S_(`valueChange`,function(e){return x_(t.callQuery,e)||(t.callQuery=e),e}),I(),F(26,`app-select`,20),S_(`valueChange`,function(e){return x_(t.sideFilter,e)||(t.sideFilter=e),e}),I(),F(27,`label`,21)(28,`input`,22),H(`change`,function(e){return t.failedOnly.set(e.target.checked)}),I(),K(29,` Failed only `),I(),F(30,`div`,23)(31,`button`,24),H(`click`,function(){return t.timelineView.set(`table`)}),K(32,` Table `),I(),F(33,`button`,24),H(`click`,function(){return t.timelineView.set(`waterfall`)}),K(34,` Waterfall `),I()(),F(35,`span`,25),K(36),I(),F(37,`span`,26),K(38),I()(),A(39,Noe,1,2,`app-network-waterfall`,27)(40,Woe,25,5)(41,qoe,9,1,`div`,28)(42,Joe,11,0,`div`,14),A(43,Zoe,22,22,`div`,29),I(),F(44,`section`,30)(45,`h2`,31),K(46,`HTTP lint`),I(),F(47,`app-http-lint`,32),H(`open`,function(e){return t.openCall(e)}),I()(),F(48,`section`,33)(49,`h2`,34),K(50,`Fault injection`),I(),A(51,Qoe,2,1,`p`,35),F(52,`app-rule-presets`,36),H(`add`,function(e){return t.addPreset(e)}),I(),F(53,`form`,37),H(`submit`,function(e){return t.addRule(e)}),F(54,`label`)(55,`span`),K(56,`URL pattern `),F(57,`span`,38),K(58,`(substring or * glob, ^ anchors the path)`),I()(),F(59,`input`,39),H(`input`,function(e){return t.patch(`pattern`,e)}),I()(),L(60,`app-rule-match-count`,40),F(61,`div`,41)(62,`div`,42)(63,`span`,43),K(64,`Method`),I(),F(65,`app-select`,44),H(`valueChange`,function(e){return t.setDraft(`method`,e??``)}),I()(),F(66,`div`,42)(67,`span`,45),K(68,`Apply on`),I(),F(69,`app-select`,46),H(`valueChange`,function(e){return t.setDraft(`target`,e??`both`)}),I()()(),F(70,`div`,41)(71,`div`,42)(72,`span`,47),K(73,`Status`),I(),F(74,`app-select`,48),H(`valueChange`,function(e){return t.setDraft(`status`,e??``)}),I()(),F(75,`label`),K(76,` Delay (ms) `),F(77,`input`,49),H(`input`,function(e){return t.patch(`delayMs`,e)}),I()()(),F(78,`label`)(79,`span`),K(80,`Chance (%) `),F(81,`span`,38),K(82,`(optional, share of matching requests)`),I()(),F(83,`input`,50),H(`input`,function(e){return t.patch(`chance`,e)}),I()(),F(84,`label`)(85,`span`),K(86,`Mock JSON body `),F(87,`span`,38),K(88,`(optional)`),I()(),F(89,`textarea`,51),H(`input`,function(e){return t.patch(`body`,e)}),I()(),F(90,`p`,52),K(91),I(),A(92,$oe,2,0,`p`,53),F(93,`p`,54),K(94),I(),F(95,`div`,55)(96,`button`,56),K(97,` Add rule `),I()()(),F(98,`h3`,57),K(99),I(),F(100,`ul`,58),M(101,sse,19,18,`li`,59,V8,!1,cse,2,0,`li`,60),I()(),F(104,`section`,61)(105,`h2`,62),K(106,`SSR overrides`),I(),F(107,`p`,63),K(108,` Development only. These change what the server sends for matching pages, from the next full page load, and the request is marked `),F(109,`strong`),K(110,`overridden`),I(),K(111,`. `),I(),F(112,`form`,64),H(`submit`,function(e){return t.addOverride(e)}),F(113,`div`,42)(114,`span`,65),K(115,`Override`),I(),F(116,`app-select`,66),H(`valueChange`,function(e){return t.setOverrideDraft(`kind`,e??`render-error`)}),I()(),F(117,`label`)(118,`span`),K(119,`Page pattern `),F(120,`span`,38),K(121,`(substring or * glob, ^ anchors the path)`),I()(),F(122,`input`,67),H(`input`,function(e){return t.patchOverride(`pattern`,e)}),I()(),A(123,lse,8,1)(124,fse,12,6)(125,pse,11,0,`p`,68),F(126,`div`,55)(127,`button`,56),K(128,` Add override `),I()()(),F(129,`h3`,69),K(130),I(),F(131,`ul`,58),M(132,gse,12,12,`li`,59,V8,!1,_se,2,0,`li`,60),I()(),F(135,`section`,70)(136,`h2`,71),K(137,`Hydration`),I(),A(138,kse,37,14)(139,Ase,5,0,`div`,14),I(),F(140,`section`,72)(141,`h2`,73),K(142,`TransferState payload`),I(),A(143,zse,2,1)(144,Bse,3,0,`div`,14),I()()),e&2){let e,n,r,i;D(2),j(t.loading()?2:t.failed()?3:-1),D(2),P(`hidden`,t.loading()),D(4),P(`options`,t.pageOptions())(`value`,t.selected()?.pageId??null),D(),P(`disabled`,!t.canWrite()),k(`aria-describedby`,t.canWrite()?null:`http-writes-off`),D(2),P(`calls`,t.timeline())(`ssrRequest`,t.pageSsrRequest())(`title`,t.selected()?.title??``)(`pageUrl`,t.selected()?.url),D(2),q(t.message()),D(),P(`hidden`,t.loading()),D(3),J(`SSR requests (`,t.requests().length,`)`),D(),j(t.requests().length?18:19),D(4),J(`HTTP timeline (`,t.timeline().length,`)`),D(),P(`dropped`,t.droppedCalls())(`max`,t.maxCalls()),D(),G(`no-calls`,!t.timeline().length),D(),b_(`value`,t.callQuery),D(),P(`options`,t.sideOptions),b_(`value`,t.sideFilter),D(2),P(`checked`,t.failedOnly()),D(3),k(`aria-pressed`,t.timelineView()===`table`),D(2),k(`aria-pressed`,t.timelineView()===`waterfall`),D(3),q(t.countText()),D(2),q(t.filterStatus()),D(),j(t.visibleCalls().length&&t.timelineView()===`waterfall`?39:t.visibleCalls().length?40:t.timeline().length?41:42),D(4),j((e=t.selectedCall())?43:-1,e),D(4),P(`calls`,t.selected()?.calls??F_(72,eoe))(`serverCalls`,t.renderServerCalls()),D(4),j(t.canWrite()?-1:51),D(),P(`disabled`,!t.canWrite())(`describedBy`,t.canWrite()?``:`http-writes-off`),D(7),P(`value`,t.draft().pattern),D(),P(`calls`,t.timeline())(`pattern`,t.draft().pattern)(`method`,t.draft().method)(`target`,t.draft().target),D(5),P(`options`,t.methodOptions())(`value`,t.draft().method),D(4),P(`describedBy`,t.draftMocksOnServer()?`rule-ssr-note`:``)(`options`,t.targetOptions)(`value`,t.draft().target),D(5),P(`describedBy`,t.draftMocksOnServer()?`rule-ssr-note`:``)(`options`,t.statusOptions)(`value`,t.draft().status),D(3),P(`value`,t.draft().delayMs),D(6),P(`value`,t.draft().chance),D(6),P(`placeholder`,t.bodyPlaceholder)(`value`,t.draft().body),k(`aria-invalid`,t.bodyError()?`true`:null),D(2),q(t.bodyError()),D(),j(t.draftMocksOnServer()?92:-1),D(2),q(t.draftHint()),D(2),P(`disabled`,!t.canWrite()||!t.draftRule()),k(`aria-disabled`,t.addingRule()||null)(`aria-describedby`,t.canWrite()?`rule-hint`:`http-writes-off`),D(3),J(` Rules (`,t.rules().length,`) `),D(2),N(t.rules()),D(15),P(`describedBy`,t.overrideDraft().kind===`state-edit`?``:`override-kind-help`)(`options`,t.overrideKindOptions)(`value`,t.overrideDraft().kind),D(6),P(`value`,t.overrideDraft().pattern),D(),j((n=t.overrideDraft().kind)===`render-error`?123:n===`state-edit`?124:n===`client-render`?125:-1),D(4),P(`disabled`,!t.canWrite()||!t.overrideReady()),k(`aria-disabled`,t.addingOverride()||null)(`aria-describedby`,t.canWrite()?null:`http-writes-off`),D(3),J(` Overrides (`,t.overrides().length,`) `),D(2),N(t.overrides()),D(6),j((r=t.selected()?.hydration)?138:139,r),D(5),j((i=t.selectedPayload())?143:144,i)}},dependencies:[nP,Eae,kae,jae,Xie,zae,eO,aae,Jae,iV,Yae,Qae,OD,Uv],styles:[`@charset "UTF-8"; +}`]})},ioe=[`callsBody`],aoe=()=>[],V8=(e,t)=>t.id,ooe=(e,t)=>t.id+t.kind,soe=(e,t)=>t.entry.side+t.entry.id,coe=(e,t)=>t.key;function loe(e,t){e&1&&(F(0,`div`,2),L(1,`span`,75),F(2,`span`),K(3,`Loading…`),I()())}function uoe(e,t){if(e&1){let e=B();F(0,`div`,3)(1,`strong`),K(2,`Could not reach the devtools server.`),I(),F(3,`span`),K(4,`Check that the app's dev server is running with the devtools plugin.`),I(),F(5,`button`,24),H(`click`,function(){return C(e),w(W().retry())}),K(6,`Try again`),I()()}}function doe(e,t){e&1&&(F(0,`span`,91),K(1,`this page`),I())}function foe(e,t){e&1&&(F(0,`span`,92),K(1,`overridden`),I())}function poe(e,t){e&1&&(F(0,`span`,93),K(1,`aborted`),I())}function moe(e,t){if(e&1){let e=B();F(0,`tr`,82),H(`click`,function(){let t=C(e).$implicit;return w(W(2).selectedRequestId.set(t.id))}),F(1,`td`,83)(2,`button`,84)(3,`span`,85),K(4),I(),K(5),F(6,`span`,86),K(7),I()()(),F(8,`td`,87),L(9,`span`,88),K(10),I(),F(11,`td`),K(12),I(),F(13,`td`,89),K(14),I(),F(15,`td`,89),K(16),I(),F(17,`td`)(18,`div`,90),A(19,doe,2,0,`span`,91),A(20,foe,2,0,`span`,92),A(21,poe,2,0,`span`,93),I()()()}if(e&2){let e=t.$implicit,n=W(2);G(`selected`,n.selectedRequest()?.id===e.id),D(2),P(`title`,e.url),k(`aria-pressed`,n.selectedRequest()?.id===e.id),D(2),q(e.method),D(),J(` `,e.url,` `),D(2),Y(`, `,e.status,`, `,n.renderModeLabel(e.renderMode)),D(),G(`ok`,n.statusTone(e.status)===`ok`)(`redirect`,n.statusTone(e.status)===`redirect`)(`bad`,n.statusTone(e.status)===`bad`),D(2),J(``,e.status,` `),D(2),q(n.renderModeLabel(e.renderMode)),D(2),J(``,e.renderMs,` ms`),D(2),Y(``,e.fetches,` (`,e.fetchMs,` ms)`),D(3),j(e.id===n.selected()?.ssrRequestId?19:-1),D(),j(e.overrides?.length?20:-1),D(),j(e.aborted?21:-1)}}function hoe(e,t){e&1&&(F(0,`p`,63),K(1),F(2,`code`),K(3,`ssrMiddleware`),I(),K(4,` saw it, so the render mode can't be read and TransferState edits can't apply. Mount `),F(5,`code`),K(6,`ssrMiddleware`),I(),K(7,` after `),F(8,`code`),K(9,`compression()`),I(),K(10,`. `),I()),e&2&&(D(),J(` The body was already compressed (`,t,`) when `))}function goe(e,t){if(e&1&&(F(0,`span`,98),K(1),I()),e&2){let e=W().$implicit;D(),q(e.note)}}function _oe(e,t){if(e&1&&(F(0,`p`,97)(1,`span`,92),K(2),I(),F(3,`span`),K(4),I(),A(5,goe,2,1,`span`,98),I()),e&2){let e=t.$implicit,n=W(4);D(2),q(n.overrideLabel(e.kind)),D(2),q(e.applied?`applied`:`not applied`),D(),j(e.note?5:-1)}}function voe(e,t){if(e&1&&(F(0,`h3`),K(1,`Overrides from the panel`),I(),F(2,`p`,63),K(3,` This response was changed on purpose, so it is not what the app sends on its own. `),I(),M(4,_oe,6,3,`p`,97,ooe)),e&2){let e=W();D(4),N(e.overrides)}}function yoe(e,t){if(e&1&&(K(0,` to `),F(1,`code`),K(2),I()),e&2){let e=W().$implicit;D(2),q(e.finalUrl)}}function boe(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2,`Guards`),I(),F(3,`dd`),K(4),I()()),e&2){let e=W().$implicit,t=W(4);D(3),G(`bad`,t.guardVerdict(e)===`rejected`),D(),Y(` `,t.msLabel(e.guards.ms),``,t.guardVerdict(e)?`, `+t.guardVerdict(e):``,` `)}}function xoe(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2,`Resolvers`),I(),F(3,`dd`),K(4),I()()),e&2){let e=W().$implicit,t=W(4);D(4),q(t.msLabel(e.resolvers.ms))}}function Soe(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2,`Navigation total`),I(),F(3,`dd`),K(4),I()()),e&2){let e=W().$implicit;D(4),J(``,e.durationMs,` ms`)}}function Coe(e,t){if(e&1&&(F(0,`p`,63),K(1),I()),e&2){let e=W().$implicit;D(),q(e.reason)}}function woe(e,t){if(e&1&&(F(0,`dl`,99)(1,`div`)(2,`dt`),K(3,`Navigation`),I(),F(4,`dd`)(5,`code`),K(6),I(),A(7,yoe,3,1),K(8),I()(),A(9,boe,5,4,`div`),A(10,xoe,5,1,`div`),A(11,Soe,5,1,`div`),I(),A(12,Coe,2,1,`p`,63)),e&2){let e=t.$implicit;D(6),q(e.url),D(),j(e.finalUrl?7:-1),D(),J(` (`,e.outcome,`) `),D(),j(e.guards?9:-1),D(),j(e.resolvers?10:-1),D(),j(e.durationMs===void 0?-1:11),D(),j(e.reason?12:-1)}}function Toe(e,t){if(e&1&&(F(0,`h3`),K(1,`Router during the render`),I(),M(2,woe,13,7,null,null,Yh)),e&2){let e=W();D(2),N(e.navigations)}}function Eoe(e,t){e&1&&(F(0,`span`,91),K(1,`cached`),I())}function Doe(e,t){if(e&1&&(F(0,`span`,101),K(1,`not cached`),I()),e&2){let e=W().$implicit;P(`title`,W(3).skipText(e.cacheSkip))}}function Ooe(e,t){if(e&1&&(F(0,`p`,102),K(1),I()),e&2){let e=W().$implicit,t=W(3);D(),J(`Not cached: `,t.skipText(e.cacheSkip),`.`)}}function koe(e,t){if(e&1&&(F(0,`p`,97)(1,`span`,85),K(2),I(),F(3,`span`,100),K(4),I(),F(5,`span`,87),K(6),I(),F(7,`span`,98),K(8),I(),A(9,Eoe,2,0,`span`,91)(10,Doe,2,1,`span`,101),I(),A(11,Ooe,2,1,`p`,102)),e&2){let e=t.$implicit,n=W(3);D(2),q(e.method),D(),P(`title`,e.url),D(),q(e.url),D(),G(`ok`,n.callTone(e)===`ok`)(`bad`,n.callTone(e)===`bad`),D(),q(n.statusLabel(e)),D(2),J(``,e.durationMs,` ms`),D(),j(e.cacheStored?9:e.cacheSkip?10:-1),D(2),j(!e.cacheStored&&e.cacheSkip?11:-1)}}function Aoe(e,t){e&1&&(F(0,`p`,63),K(1,`The render made no HttpClient calls.`),I())}function joe(e,t){e&1&&(F(0,`p`,102),K(1),I()),e&2&&(D(),J(`Why: `,t,`.`))}function Moe(e,t){if(e&1&&(F(0,`p`,97)(1,`span`,85),K(2),I(),F(3,`span`,100),K(4),I(),F(5,`span`,93),K(6,`cache miss`),I()(),A(7,joe,2,1,`p`,102)),e&2){let e,n=t.$implicit,r=W(4);D(2),q(n.method),D(),P(`title`,n.url),D(),q(n.url),D(3),j((e=r.refetchReason(n))?7:-1,e)}}function Noe(e,t){if(e&1&&(F(0,`h3`),K(1),I(),F(2,`p`,63),K(3,` These calls ran on the server and again after hydration instead of reading the transfer cache. `),I(),M(4,Moe,8,4,null,null,V8)),e&2){let e=W(3);D(),J(`Fetched again in the browser (`,e.refetched().length,`)`),D(3),N(e.refetched())}}function Poe(e,t){e&1&&(F(0,`p`,96),K(1,`No server call ran again in the browser.`),I())}function Foe(e,t){if(e&1&&(F(0,`div`,81)(1,`h3`,94),K(2),F(3,`code`),K(4),I()(),F(5,`dl`,95)(6,`div`)(7,`dt`),K(8,`Request id`),I(),F(9,`dd`)(10,`code`),K(11),I()()(),F(12,`div`)(13,`dt`),K(14,`Render`),I(),F(15,`dd`),K(16),I()(),F(17,`div`)(18,`dt`),K(19,`Total`),I(),F(20,`dd`),K(21),I()(),F(22,`div`)(23,`dt`),K(24,`Sent`),I(),F(25,`dd`),K(26),I()(),F(27,`div`)(28,`dt`),K(29,`Browser page`),I(),F(30,`dd`),K(31),I()()(),A(32,hoe,11,1,`p`,63),A(33,voe,6,0),A(34,Toe,4,0),F(35,`h3`),K(36),I(),M(37,koe,12,11,null,null,V8,!1,Aoe,2,0,`p`,63),A(40,Noe,6,1)(41,Poe,2,0,`p`,96),I()),e&2){let e,n=t,r=W(2);D(2),J(` `,n.method,` `),D(2),q(n.url),D(7),q(n.id),D(5),J(``,n.renderMs,` ms`),D(5),J(``,n.durationMs,` ms`),D(5),J(``,n.bytes,` B`),D(5),q(r.requestPage()?.title||r.requestPage()?.url||`not connected`),D(),j((e=r.compressedWith(n))?32:-1,e),D(),j(n.overrides?.length?33:-1),D(),j(n.navigations?.length?34:-1),D(2),J(`Server calls (`,r.requestCalls().length,`)`),D(),N(r.requestCalls()),D(3),j(r.refetched().length?40:r.requestPage()&&r.requestCalls().length?41:-1)}}function Ioe(e,t){if(e&1&&(F(0,`div`,76)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,77),K(5,`Request`),I(),F(6,`th`,77),K(7,`Status`),I(),F(8,`th`,77),K(9,`Render mode`),I(),F(10,`th`,78),K(11,`Render`),I(),F(12,`th`,78),K(13,`Server calls`),I(),F(14,`th`,77),K(15,`Notes`),I()()(),F(16,`tbody`,79),M(17,moe,22,22,`tr`,80,V8),I()()(),A(19,Foe,42,13,`div`,81)),e&2){let e,t=W();D(17),N(t.requests()),D(2),j((e=t.selectedRequest())?19:-1,e)}}function Loe(e,t){e&1&&(F(0,`div`,14)(1,`p`),K(2,`No SSR requests traced.`),I(),F(3,`p`,63),K(4,` Add `),F(5,`code`),K(6,`app.use(devtools.ssrMiddleware)`),I(),K(7,` before the Angular handler in `),F(8,`code`),K(9,`server.ts`),I(),K(10,`, or wrap a web-standard handler with `),F(11,`code`),K(12,`withPangularSsr()`),I(),K(13,`, then load a server rendered page. `),I()())}function Roe(e,t){if(e&1){let e=B();F(0,`app-network-waterfall`,103),H(`open`,function(t){return C(e),w(W().openCall(t))}),I()}if(e&2){let e=W();P(`calls`,e.waterfallCalls())(`selectedId`,e.selectedCall()?.id??null)}}function zoe(e,t){e&1&&(F(0,`p`,104),K(1,` Rows render as you scroll, so the browser's find only sees the ones near view; the search field searches them all. `),I())}function Boe(e,t){if(e&1&&(F(0,`tr`,107),L(1,`td`,108),I()),e&2){let e=W(2);D(),Zg(`height`,e.callWindow.padTop(),`px`)}}function Voe(e,t){e&1&&L(0,`app-call-origin`,112),e&2&&(W(),P(`origin`,O_(0).origin))}function Hoe(e,t){e&1&&(F(0,`span`,109),K(1,`transfer cache`),I())}function Uoe(e,t){if(e&1&&(F(0,`span`,109),K(1),I()),e&2){W();let e=O_(0);D(),J(`delayed `,e.delayMs,` ms`)}}function Woe(e,t){e&1&&(F(0,`span`,92),K(1,`mocked`),I())}function Goe(e,t){e&1&&(F(0,`span`,93),K(1,`faulted`),I())}function Koe(e,t){if(e&1&&(F(0,`span`,113),K(1,`rule `),F(2,`code`),K(3),I()()),e&2){let e=t;P(`title`,`Matched rule: `+e),D(3),q(e)}}function qoe(e,t){if(e&1){let e=B();E_(0),F(1,`tr`,82),H(`click`,function(){C(e);let t=O_(0);return w(W(2).openCall(t.id))}),F(2,`td`)(3,`span`,109),K(4),I()(),F(5,`td`,85),K(6),I(),F(7,`td`,83)(8,`button`,110),K(9),I()(),F(10,`td`,111),K(11),I(),F(12,`td`,87),L(13,`span`,88),K(14),I(),F(15,`td`,89),K(16),I(),F(17,`td`)(18,`div`,90),A(19,Voe,1,1,`app-call-origin`,112),A(20,Hoe,2,0,`span`,109),A(21,Uoe,2,1,`span`,109),A(22,Woe,2,0,`span`,92),A(23,Goe,2,0,`span`,93),A(24,Koe,4,2,`span`,113),I()()()}if(e&2){let e,n=t.$implicit,r=W(2),i=D_(n.entry);D(),G(`selected`,r.selectedCall()?.id===i.id),k(`aria-rowindex`,n.index+2)(`data-vindex`,n.index),D(2),G(`server`,i.side===`server`),D(),q(i.side===`server`?`SSR`:`Client`),D(2),q(i.method),D(2),P(`title`,i.url),k(`data-call-id`,i.id)(`aria-pressed`,r.selectedCall()?.id===i.id)(`aria-controls`,r.selectedCall()?`call-preview`:null),D(),J(` `,i.url,` `),D(),P(`title`,i.pageUrl??``),D(),J(` `,i.pageUrl??``,` `),D(),G(`ok`,r.callTone(i)===`ok`)(`redirect`,r.callTone(i)===`redirect`)(`bad`,r.callTone(i)===`bad`),D(2),J(``,r.statusLabel(i),` `),D(2),J(``,i.durationMs,` ms`),D(3),j(i.origin?19:-1),D(),j(i.cacheHit?20:-1),D(),j(i.delayMs?21:-1),D(),j(i.mocked?22:-1),D(),j(i.faulted?23:-1),D(),j((e=r.rulePatternOf(i))?24:-1,e)}}function Joe(e,t){if(e&1&&(F(0,`tr`,107),L(1,`td`,108),I()),e&2){let e=W(2);D(),Zg(`height`,e.callWindow.padBottom(),`px`)}}function Yoe(e,t){if(e&1&&(A(0,zoe,2,0,`p`,104),F(1,`div`,76)(2,`table`)(3,`thead`)(4,`tr`,105)(5,`th`,77),K(6,`Side`),I(),F(7,`th`,77),K(8,`Method`),I(),F(9,`th`,77),K(10,`URL`),I(),F(11,`th`,77),K(12,`Page`),I(),F(13,`th`,77),K(14,`Status`),I(),F(15,`th`,78),K(16,`Time`),I(),F(17,`th`,77),K(18,`Notes`),I()()(),F(19,`tbody`,106,0),A(21,Boe,2,2,`tr`,107),M(22,qoe,25,30,`tr`,80,soe),A(24,Joe,2,2,`tr`,107),I()()()),e&2){let e=W();j(e.callWindow.enabled()?0:-1),D(2),k(`aria-rowcount`,e.visibleCalls().length+1),D(17),P(`rovingWindow`,e.callWindow),D(2),j(e.callWindow.padTop()?21:-1),D(),N(e.shownCalls()),D(2),j(e.callWindow.padBottom()?24:-1)}}function Xoe(e,t){e&1&&K(0),e&2&&J(` Nothing matches “`,W(2).callQuery().trim(),`” with these filters. `)}function Zoe(e,t){e&1&&K(0),e&2&&J(` None of the `,W(2).timeline().length,` requests fit these filters. `)}function Qoe(e,t){if(e&1){let e=B();F(0,`div`,28)(1,`p`),K(2,`No requests match.`),I(),F(3,`p`,63),A(4,Xoe,1,1)(5,Zoe,1,1),I(),F(6,`div`,114)(7,`button`,24),H(`click`,function(){return C(e),w(W().clearCallFilters())}),K(8,`Clear filters`),I()()()}if(e&2){let e=W();D(4),j(e.callQuery().trim()?4:5)}}function $oe(e,t){e&1&&(F(0,`div`,14)(1,`p`),K(2,`No requests yet.`),I(),F(3,`p`,63),K(4,` Add `),F(5,`code`),K(6,`withPangular()`),I(),K(7,` to `),F(8,`code`),K(9,`provideHttpClient`),I(),K(10,`, then load a page of the app. `),I()())}function ese(e,t){if(e&1){let e=B();F(0,`button`,122),H(`click`,function(){C(e);let t=W();return w(W().copyPreview(t))}),K(1,` Copy `),I()}if(e&2){let e=W();k(`aria-label`,`Copy the response of `+e.method+` `+e.url)}}function tse(e,t){e&1&&(F(0,`p`,124),K(1,` Matched rule `),F(2,`code`),K(3),I()()),e&2&&(D(3),q(t))}function nse(e,t){if(e&1){let e=B();F(0,`div`,115),H(`keydown.escape`,function(){return C(e),w(W().closePreview())}),F(1,`div`,116)(2,`h3`,117),K(3,`Response preview`),I(),F(4,`div`,118),A(5,ese,2,1,`button`,119),F(6,`app-call-copy`,120),H(`done`,function(t){return C(e),w(W().message.set(t))}),I(),F(7,`button`,121),H(`click`,function(){let t=C(e);return w(W().mockCall(t))}),K(8,` Mock this request `),I(),F(9,`button`,122),H(`click`,function(){return C(e),w(W().closePreview())}),K(10,`Close`),I()()(),F(11,`p`,123)(12,`span`,85),K(13),I(),F(14,`span`,87),K(15),I(),F(16,`span`,100),K(17),I()(),A(18,tse,4,1,`p`,124),L(19,`app-redaction-count`,125),F(20,`pre`,126),K(21),I(),L(22,`app-http-headers`,127),I()}if(e&2){let e,n=t,r=W();D(5),j(!n.error&&n.preview?5:-1),D(),P(`call`,n),D(),P(`disabled`,!r.canWrite()),k(`aria-describedby`,r.canWrite()?null:`http-writes-off`),D(6),q(n.method),D(),G(`ok`,r.callTone(n)===`ok`)(`redirect`,r.callTone(n)===`redirect`)(`bad`,r.callTone(n)===`bad`),D(),q(r.statusLabel(n)),D(),P(`title`,n.url),D(),q(n.url),D(),j((e=r.rulePatternOf(n))?18:-1,e),D(),P(`value`,n),D(),G(`error`,!!n.error&&!n.cancelled),k(`aria-label`,n.error?`Response error`:`Response body`),D(),q(n.error??r.previewText(n)??`(no body)`),D(),P(`callId`,n.id)(`request`,n.requestHeaders)(`response`,n.responseHeaders)}}function rse(e,t){if(e&1&&(F(0,`p`,35),K(1),I()),e&2){let e=W();D(),q(e.writesOff)}}function ise(e,t){e&1&&(F(0,`p`,53),K(1,` SSR mocks are not transferred to the client: the browser requests the URL again and gets the real response unless the rule also applies on the client. `),I())}function ase(e,t){e&1&&(F(0,`span`),K(1,`passthrough`),I())}function ose(e,t){e&1&&(F(0,`span`,134),K(1,`network error`),I())}function sse(e,t){if(e&1&&(F(0,`span`,87),K(1),I()),e&2){let e=W().$implicit,t=W();G(`ok`,t.statusTone(e.status)===`ok`)(`redirect`,t.statusTone(e.status)===`redirect`)(`bad`,t.statusTone(e.status)===`bad`),D(),q(e.status)}}function cse(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W().$implicit;D(),J(``,e.delayMs,` ms`)}}function lse(e,t){e&1&&(F(0,`span`),K(1,`mock body`),I())}function use(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W().$implicit;D(),J(``,e.chance,`% of requests`)}}function dse(e,t){e&1&&(F(0,`p`,136),K(1,` The SSR mock is not written to TransferState, so the browser requests this URL again. `),I())}function fse(e,t){if(e&1){let e=B();F(0,`li`)(1,`label`,128)(2,`input`,129),H(`change`,function(){let t=C(e).$implicit;return w(W().toggleRule(t.id))}),I(),F(3,`code`,130)(4,`span`,131),K(5),I(),K(6),I()(),F(7,`button`,132),H(`click`,function(){let t=C(e).$implicit;return w(W().removeRule(t.id))}),K(8,` Remove `),I(),F(9,`span`,133)(10,`span`),K(11),I(),A(12,ase,2,0,`span`)(13,ose,2,0,`span`,134)(14,sse,2,7,`span`,135),A(15,cse,2,1,`span`),A(16,lse,2,0,`span`),A(17,use,2,1,`span`),I(),A(18,dse,2,0,`p`,136),I()}if(e&2){let e=t.$implicit,n=W();G(`off`,!e.enabled),D(2),P(`checked`,e.enabled)(`disabled`,!n.canWrite()),k(`aria-describedby`,n.canWrite()?null:`http-writes-off`)(`aria-label`,`Enable rule for `+e.pattern),D(),P(`title`,e.pattern),D(2),q(e.method||`ANY`),D(),J(` `,e.pattern),D(),P(`disabled`,!n.canWrite()),k(`aria-describedby`,n.canWrite()?null:`http-writes-off`)(`aria-label`,`Remove rule for `+e.pattern),D(4),q(n.targetLabel(e.target)),D(),j(e.status===void 0?12:e.status===0?13:14),D(3),j(e.delayMs?15:-1),D(),j(e.body?16:-1),D(),j(e.chance?17:-1),D(),j(n.mocksOnServer(e)?18:-1)}}function pse(e,t){e&1&&(F(0,`li`,60),K(1,`No rules. SSR rules apply on the next page load.`),I())}function mse(e,t){if(e&1){let e=B();F(0,`p`,68),K(1,` Throws while the server renders, so it needs `),F(2,`code`),K(3,`providePangularHttp()`),I(),K(4,` and a page the engine renders. Prerendered files served as static files skip it. `),I(),F(5,`label`),K(6,` Error message `),F(7,`input`,137),H(`input`,function(t){return C(e),w(W().patchOverride(`message`,t))}),I()()}if(e&2){let e=W();D(7),P(`value`,e.overrideDraft().message)}}function hse(e,t){e&1&&K(0,` For a cached HTTP response this is the whole cache record, not only the response body. `)}function gse(e,t){e&1&&(F(0,`p`,141),K(1,` Filled in from the TransferState payload. The value starts empty because the panel only shows a redacted copy, so type the JSON the server should send. `),A(2,hse,1,0),I()),e&2&&(D(2),j(t===`http`?2:-1))}function _se(e,t){if(e&1){let e=B();F(0,`label`),K(1,` TransferState key `),F(2,`input`,138),H(`input`,function(t){return C(e),w(W().patchOverride(`key`,t))}),I()(),F(3,`label`)(4,`span`),K(5,`New JSON value `),F(6,`span`,38),K(7,`(empty removes the entry)`),I()(),F(8,`textarea`,139),H(`input`,function(t){return C(e),w(W().patchOverride(`value`,t))}),I()(),F(9,`p`,140),K(10),I(),A(11,gse,3,1,`p`,141)}if(e&2){let e,t=W();D(2),P(`value`,t.overrideDraft().key),D(6),P(`value`,t.overrideDraft().value),k(`aria-invalid`,t.overrideValueError()?`true`:null)(`aria-describedby`,t.overrideFromPayload()?`override-value-error override-value-note`:`override-value-error`),D(2),q(t.overrideValueError()),D(),j((e=t.overrideFromPayload())?11:-1,e)}}function vse(e,t){e&1&&(F(0,`p`,68),K(1,` Serves `),F(2,`code`),K(3,`index.csr.html`),I(),K(4,` instead of rendering. Needs `),F(5,`code`),K(6,`browserDistFolder`),I(),K(7,` in `),F(8,`code`),K(9,`initPangularHub()`),I(),K(10,`. `),I())}function yse(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W().$implicit;D(),q(e.message)}}function bse(e,t){if(e&1&&(F(0,`span`),K(1),I()),e&2){let e=W().$implicit;D(),Y(``,e.value===void 0?`remove`:`set`,` `,e.key)}}function xse(e,t){if(e&1){let e=B();F(0,`li`)(1,`label`,128)(2,`input`,129),H(`change`,function(){let t=C(e).$implicit;return w(W().toggleOverride(t.id))}),I(),F(3,`code`,130)(4,`span`,131),K(5),I(),K(6),I()(),F(7,`button`,142),H(`click`,function(){let t=C(e).$implicit;return w(W().removeOverride(t.id))}),K(8,` Remove `),I(),F(9,`span`,133),A(10,yse,2,1,`span`),A(11,bse,2,2,`span`),I()()}if(e&2){let e=t.$implicit,n=W();G(`off`,!e.enabled),D(2),P(`checked`,e.enabled)(`disabled`,!n.canWrite()),k(`aria-label`,`Enable `+n.overrideLabel(e.kind)+` for `+e.pattern),D(),P(`title`,e.pattern),D(2),q(n.overrideLabel(e.kind)),D(),J(` `,e.pattern),D(),P(`disabled`,!n.canWrite()),k(`aria-label`,`Remove `+n.overrideLabel(e.kind)+` for `+e.pattern),D(3),j(e.message?10:-1),D(),j(e.key?11:-1)}}function Sse(e,t){e&1&&(F(0,`li`,60),K(1,`No overrides.`),I())}function Cse(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2,`DOM nodes hydrated`),I(),F(3,`dd`),K(4),I()(),F(5,`div`)(6,`dt`),K(7,`DOM nodes skipped`),I(),F(8,`dd`),K(9),I()(),F(10,`div`)(11,`dt`),K(12,`Mismatched components`),I(),F(13,`dd`),K(14),I()()),e&2){let e=t;D(4),q(e.hydrated),D(5),q(e.skipped),D(4),G(`bad`,e.mismatched>0),D(),q(e.mismatched)}}function wse(e,t){if(e&1&&(F(0,`span`,144)(1,`span`,145),K(2,`Expected`),I(),F(3,`code`),K(4),I()()),e&2){let e=W().$implicit;D(4),q(e.expected)}}function Tse(e,t){if(e&1&&(F(0,`span`,144)(1,`span`,145),K(2,`Actual`),I(),F(3,`code`),K(4),I()()),e&2){let e=W().$implicit;D(4),q(e.actual)}}function Ese(e,t){if(e&1&&(F(0,`li`)(1,`code`),K(2),I(),A(3,wse,5,1,`span`,144),A(4,Tse,5,1,`span`,144),I()),e&2){let e=t.$implicit;D(2),q(e.isClass?e.component:`<`+e.component+`>`),D(),j(e.expected?3:-1),D(),j(e.actual?4:-1)}}function Dse(e,t){if(e&1&&(F(0,`h3`),K(1),I(),F(2,`ul`,143),M(3,Ese,5,3,`li`,null,Yh),I()),e&2){let e=W();D(),J(`Mismatches (`,e.mismatches.length,`)`),D(2),N(e.mismatches)}}function Ose(e,t){if(e&1&&(F(0,`li`)(1,`code`),K(2),I()()),e&2){let e=t.$implicit;D(2),q(e)}}function kse(e,t){if(e&1&&(F(0,`h3`),K(1,`ngSkipHydration hosts`),I(),F(2,`ul`,146),M(3,Ose,3,1,`li`,null,Yh),I()),e&2){let e=W();D(3),N(e.skipHydrationHosts)}}function Ase(e,t){e&1&&(F(0,`h3`),K(1,`Warnings`),I(),F(2,`p`,63),K(3,` Not captured: add `),F(4,`code`),K(5,`providePangularHttp()`),I(),K(6,` to the app providers. `),I())}function jse(e,t){if(e&1&&(F(0,`pre`,147),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function Mse(e,t){e&1&&(F(0,`p`,96),K(1,`No hydration warnings.`),I())}function Nse(e,t){if(e&1&&(F(0,`h3`),K(1),I(),M(2,jse,2,1,`pre`,147,Yh,!1,Mse,2,0,`p`,96)),e&2){let e=W();D(),J(`Warnings (`,e.warnings.length,`)`),D(),N(e.warnings)}}function Pse(e,t){if(e&1&&(F(0,`dl`,95)(1,`div`)(2,`dt`),K(3,`Enabled`),I(),F(4,`dd`)(5,`span`,109),K(6),I()()(),F(7,`div`)(8,`dt`),K(9,`Hydrated components`),I(),F(10,`dd`),K(11),I()(),F(12,`div`)(13,`dt`),K(14,`Hydrated nodes`),I(),F(15,`dd`),K(16),I()(),F(17,`div`)(18,`dt`),K(19,`Skipped components`),I(),F(20,`dd`),K(21),I()(),F(22,`div`)(23,`dt`),K(24,`App stable after`),I(),F(25,`dd`),K(26),I()(),F(27,`div`)(28,`dt`),K(29,`Incremental defer blocks`),I(),F(30,`dd`),K(31),I()(),A(32,Cse,15,5),I(),A(33,Dse,5,1),A(34,kse,5,0),A(35,Ase,7,0)(36,Nse,5,2)),e&2){let e,n=t;D(5),G(`on`,n.enabled)(`off-tag`,!n.enabled),D(),q(n.enabled?`yes`:`no (client render only)`),D(5),q(n.hydratedComponents??`n/a`),D(5),q(n.hydratedNodes??`n/a`),D(5),q(n.componentsSkippedHydration??`n/a`),D(5),q(n.stableMs===void 0?`n/a`:n.stableMs+` ms`),D(5),q(n.deferBlocksWithIncrementalHydration??`n/a`),D(),j((e=n.nodes)?32:-1,e),D(),j(n.mismatches?.length?33:-1),D(),j(n.skipHydrationHosts.length?34:-1),D(),j(n.warningsCaptured===!1?35:36)}}function Fse(e,t){e&1&&(F(0,`div`,14)(1,`p`),K(2,`No hydration data for this page.`),I(),F(3,`p`,63),K(4,`Open a server rendered page of the app to see its stats.`),I()())}function Ise(e,t){if(e&1){let e=B();F(0,`div`,74)(1,`button`,148),H(`click`,function(){let t=C(e);return w(W().refetchPayload(t.pageId))}),K(2),I(),F(3,`span`,149),K(4,` Renders this URL again on the server, with this tab's cookies, and shows the payload it sends now. The tab does not reload. `),I()()}if(e&2){let e=W();D(),P(`disabled`,!e.canWrite()||e.refetching()),k(`aria-describedby`,e.canWrite()?`refetch-hint`:`http-writes-off refetch-hint`),D(),J(` `,e.refetching()?`Refetching…`:`Refetch`,` `)}}function Lse(e,t){e&1&&(F(0,`div`,14)(1,`p`),K(2,`No TransferState script: this page was not server rendered.`),I()())}function Rse(e,t){e&1&&(F(0,`span`,151),K(1,`Refetched`),I())}function zse(e,t){if(e&1&&(F(0,`p`,152),K(1),I()),e&2){let e=W(2);D(),q(e.error)}}function Bse(e,t){e&1&&(F(0,`span`,109),K(1),I()),e&2&&(D(),q(t))}function Vse(e,t){if(e&1&&(F(0,`span`,109),K(1),I(),F(2,`span`,156),K(3),I()),e&2){let e=t,n=W().$implicit,r=W(3);G(`server`,r.statusTone(e.status)===`ok`)(`fault`,r.statusTone(e.status)===`bad`),D(),J(`HTTP `,e.status),D(2),q(e.url??n.key)}}function Hse(e,t){if(e&1&&(F(0,`span`,156),K(1),I()),e&2){let e=W().$implicit;D(),q(e.key)}}function Use(e,t){if(e&1){let e=B();F(0,`button`,122),H(`click`,function(){C(e);let t=W().$implicit;return w(W(3).editEntry(t))}),K(1,` Edit in SSR overrides `),I()}if(e&2){let e=W().$implicit;k(`aria-label`,`Edit in SSR overrides, key `+e.key)}}function Wse(e,t){if(e&1){let e=B();F(0,`details`)(1,`summary`),L(2,`span`,155),A(3,Bse,2,1,`span`,109),A(4,Vse,4,6)(5,Hse,2,1,`span`,156),F(6,`span`,157),K(7),I()(),F(8,`div`,158)(9,`span`,159),K(10,`Key`),I(),F(11,`code`,160),K(12),I(),F(13,`div`,161)(14,`button`,122),H(`click`,function(){let t=C(e).$implicit;return w(W(3).copyKey(t.key))}),K(15,` Copy `),I(),A(16,Use,2,1,`button`,119),I()(),F(17,`pre`,162),K(18),U_(19,`json`),I()()}if(e&2){let e,n,r=t.$implicit,i=W(3);D(3),j((e=i.payloadLabel(r))?3:-1,e),D(),j((n=r.http)?4:5,n),D(3),J(``,r.size,` B`),D(5),q(r.key),D(2),k(`aria-label`,`Copy key `+r.key),D(2),j(i.canEditEntry(r)?16:-1),D(),k(`aria-label`,`Value of `+r.key),D(),q(W_(19,8,r.value))}}function Gse(e,t){if(e&1&&(F(0,`p`,150),K(1),A(2,Rse,2,0,`span`,151),I(),A(3,zse,2,1,`p`,152),L(4,`app-redaction-count`,125)(5,`app-payload-insights`,153),F(6,`div`,154),M(7,Wse,20,10,`details`,null,coe),I()),e&2){let e=W();D(),y_(` `,e.entries.length,` entr`,e.entries.length===1?`y`:`ies`,`, `,e.size,` bytes `),D(),j(e.refetchedAt?2:-1),D(),j(e.error?3:-1),D(),P(`value`,e.entries),D(),P(`size`,e.size)(`entries`,e.entries),D(2),N(e.entries)}}function Kse(e,t){e&1&&A(0,Lse,3,0,`div`,14)(1,Gse,9,8),e&2&&j(+!!t.found)}function qse(e,t){e&1&&(F(0,`div`,14)(1,`p`),K(2,`Open a page of the app to see its payload.`),I()())}var H8={kind:`render-error`,pattern:``,message:``,key:``,value:``},Jse={"render-error":`Render error`,"client-render":`Client render`,"state-edit":`TransferState edit`},Yse={server:`Server`,prerender:`Prerender`,client:`Client`,redirect:`Redirect`,"not-rendered":`Not rendered`,unknown:`Unknown`},U8={pattern:``,method:``,target:`both`,status:``,delayMs:``,body:``,chance:``};function W8(){return`r${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`}function G8(e){if(!e.trim())return;let t=Number(e);return Number.isInteger(t)&&t>=1&&t<=99?t:null}function K8(e){try{let t=new URL(e,`http://x`);return t.pathname+t.search}catch{return e}}var Xse=/\[redacted\]|%5Bredacted%5D/gi;function Zse(e){return(/^([a-z][a-z\d+.-]*:|\/\/)/i.test(e)?K8(e):e).replace(Xse,`*`)}function Qse(e){let t=qE(e);if(t!==null)return t;try{return JSON.parse(e),e.trim()}catch{return null}}var q8=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`];function $se(e){try{return new URL(e,`http://x`).pathname}catch{return``}}function ece(e){let t=$se(e);return t===`/`?``:t}var tce=/\[redacted\]|%5Bredacted%5D/i,nce=200,J8=50,Y8=500,X8=1e5,rce=[{value:``,label:`None`},...tw.map(([e,t])=>({value:String(e),label:`${e} ${t}`}))],ice=class e{rpc=$(null);canWrite=X(()=>IT(this.rpc(),`http`));writesOff=Uw(`http`);loading=E(!1);failed=E(!1);serverCalls=E([]);pages=E([]);payloads=E({});serverDropped=E(0);requests=E([]);rules=E([]);addingRule=E(!1);addingOverride=E(!1);ruleSaves=Promise.resolve(!0);overrideSaves=Promise.resolve(!0);overrides=E([]);overrideDraft=E({...H8});overrideFromPayload=E(null);overrideKindOptions=[{value:`render-error`,label:`Render error`},{value:`client-render`,label:`Force Client render`},{value:`state-edit`,label:`Edit TransferState entry`}];overrideValueError=X(()=>{let e=this.overrideDraft().value.trim();if(!e)return``;try{return JSON.parse(e),``}catch{return`The value must be valid JSON.`}});overrideReady=X(()=>{let e=this.overrideDraft();return!e.pattern.trim()||this.overrides().length>=20?!1:e.kind!==`state-edit`||!!e.key.trim()&&!this.overrideValueError()});hostPageId=fT();selectedPageId=Q({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:e.find(e=>e.pageId===this.hostPageId)?.pageId??e[0]?.pageId??null});selectedCallId=E(null);draft=E({...U8});message=E(``);refetching=E(!1);bodyPlaceholder=`{ "error": "Service unavailable" }`;statusOptions=rce;unsubscribe=[];destroyRef=S(vs);injector=S(gs);host=S(kl);selected=X(()=>this.pages().find(e=>e.pageId===this.selectedPageId())??null);pageRequestId=X(()=>this.selected()?.ssrRequestId??null);selectedRequestId=Q(()=>this.pageRequestId());selectedPayload=X(()=>{let e=this.selectedPageId();return e?this.payloads()[e]??null:null});maxCalls=X(()=>NT(this.rpc()).limits.httpCalls);droppedCalls=X(()=>(this.selected()?.dropped??0)+this.serverDropped());pageServerCalls=X(()=>{let e=this.selected()?.initialUrl;return e?this.serverCalls().filter(t=>!t.pageUrl||t.pageUrl===e):this.serverCalls()});renderServerCalls=X(()=>{let e=this.pageRequestId();return e?this.serverCalls().filter(t=>t.requestId===e):[]});timeline=X(()=>[...this.pageServerCalls(),...this.selected()?.calls??[]].sort((e,t)=>t.at-e.at));callQuery=E(``);timelineView=E(`table`);waterfallCalls=X(()=>this.visibleCalls().filter(e=>e.side===`client`));sideFilter=E(`all`);failedOnly=E(!1);sideOptions=[{value:`all`,label:`All sides`},{value:`server`,label:`SSR`},{value:`client`,label:`Client`}];callWindow=new HN({count:X(()=>this.visibleCalls().length),estimate:37});shownCalls=X(()=>{let{start:e,end:t}=this.callWindow.range();return this.visibleCalls().slice(e,t).map((t,n)=>({entry:t,index:e+n}))});callsBody=sv(`callsBody`);visibleCalls=X(()=>{let e=this.callQuery().trim().toLowerCase(),t=this.sideFilter()??`all`,n=this.failedOnly();return this.timeline().filter(r=>(t===`all`||r.side===t)&&(!n||this.isFailed(r))&&(!e||`${r.method} ${r.url}`.toLowerCase().includes(e)||`${r.method} ${K8(r.url)}`.toLowerCase().includes(e)))});countText=X(()=>{let e=this.timeline().length;if(this.timelineView()!==`waterfall`)return`${this.visibleCalls().length} of ${e}`;let t=this.waterfallCalls().length;return`${t} client ${t===1?`call`:`calls`} of ${e}`});filterStatus=X(()=>{this.callQuery(),this.sideFilter(),this.failedOnly(),this.timelineView(),this.filterFlip=!this.filterFlip;let e=Z(()=>this.countText());return this.filterFlip?`${e}\u00a0`:e});filterFlip=!0;selectedCall=X(()=>this.visibleCalls().find(e=>e.id===this.selectedCallId())??null);pageSsrRequest=X(()=>this.requests().find(e=>e.id===this.pageRequestId())??null);selectedRequest=X(()=>this.requests().find(e=>e.id===this.selectedRequestId())??null);requestCalls=X(()=>{let e=this.selectedRequest()?.id;return e?this.serverCalls().filter(t=>t.requestId===e):[]});requestPage=X(()=>{let e=this.selectedRequest()?.id;return e?this.pages().find(t=>t.ssrRequestId===e)??null:null});refetched=X(()=>{let e=this.selectedRequest(),t=this.requestPage();if(!e||!t)return[];let n=new Set(this.requestCalls().filter(e=>e.status).map(e=>`${e.method} ${K8(e.url)}`));return t.calls.filter(t=>t.side===`client`&&!t.cacheHit&&!t.mocked&&t.at>=e.at&&n.has(`${t.method} ${K8(t.url)}`))});draftMocksOnServer=X(()=>{let e=this.draftRule();return!!e&&this.mocksOnServer(e)});draftRule=X(()=>{let e=this.draft(),t=e.pattern.trim();if(!t||t.length>Y8||this.bodyError()||this.rules().length>=J8)return null;let n=e.body.trim(),r=Math.min(Math.max(Math.round(Number(e.delayMs))||0,0),1e4),i=e.status.trim()?Number(e.status):n?200:void 0;if(i!==void 0&&!nw(i)||i===void 0&&!r)return null;let a=G8(e.chance);return a===null?null:{pattern:t,enabled:!0,target:e.target,...e.method?{method:e.method}:{},...i===void 0?{}:{status:i},...r?{delayMs:r}:{},...n?{body:n}:{},...a===void 0?{}:{chance:a}}});draftHint=X(()=>{let e=this.draft();return this.rules().length>=J8?`You can add up to ${J8} rules. Remove one to add another.`:e.pattern.trim()?e.pattern.trim().length>Y8?`The URL pattern is limited to ${Y8} characters.`:this.bodyError()?``:e.status.trim()&&!nw(Number(e.status))?`Pick a status from the list.`:G8(e.chance)===null?`Chance is a whole percent from 1 to 99.`:this.draftRule()?!e.status.trim()&&e.body.trim()?`With no status, the mock body returns 200.`:``:`Set a status, a delay or a mock body.`:`Enter a URL pattern to add a rule.`});bodyError=X(()=>{let e=this.draft().body.trim();if(!e)return``;if(e.length>X8)return`The mock body is limited to ${X8} characters.`;try{return JSON.parse(e),``}catch{return`The mock body must be valid JSON.`}});constructor(){ac(()=>{let e=this.callsBody()?.nativeElement;e&&this.callWindow.attach(e)}),ac(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.stopListening())}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=e.scope(`pangular`).rpc,[n,r]=await Promise.all([t.sharedState(`http`),t.sharedState(`http-payloads`)]);if(this.destroyRef.destroyed)return;let i=e=>{let t=e;this.serverCalls.set(t?.serverCalls??[]),this.serverDropped.set(t?.serverDropped??0),this.requests.set([...t?.requests??[]].reverse()),this.pages.set(t?.pages??[]),this.rules.set(t?.rules??[]),this.overrides.set(t?.ssrOverrides??[])},a=e=>this.payloads.set(e?.pages??{});i(n.value()),a(r.value()),this.stopListening(),this.unsubscribe=[n.on(`updated`,i),r.on(`updated`,a)]}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}retry(){let e=this.rpc();e&&this.load(e)}guardVerdict(e){return e.guards?.passed===!1?e.outcome===`redirected`?`redirected`:`rejected`:``}msLabel(e){return e===void 0?`n/a`:`${e} ms`}skipText(e){return ew[e]??``}refetchReason(e){let t=`${e.method} ${K8(e.url)}`,n=this.requestCalls().filter(e=>`${e.method} ${K8(e.url)}`===t),r=n[0];return r?.cacheSkip&&n.every(e=>e.cacheSkip===r.cacheSkip)?this.skipText(r.cacheSkip):``}compressedWith(e){if(e.compressedBeforeTrace)return e.headers[`content-encoding`]??`unknown encoding`}renderModeLabel(e){return Yse[e]??`Unknown`}statusLabel(e){return e.cancelled?`cancelled`:e.status?String(e.status):`ERR`}callTone(e){return e.cancelled?`neutral`:this.statusTone(e.status)}isFailed(e){return!!e.cancelled||!e.status||e.status>=400}clearCallFilters(){this.callQuery.set(``),this.sideFilter.set(`all`),this.failedOnly.set(!1),this.host.nativeElement.querySelector(`#timeline-search`)?.focus()}rulePatternOf(e){return e.rulePattern?e.rulePattern:e.ruleId?this.rules().find(t=>t.id===e.ruleId)?.pattern??null:null}openCall(e){this.selectedCallId.set(e),td(()=>this.host.nativeElement.querySelector(`#preview-heading`)?.focus(),{injector:this.injector})}previewText(e){if(e.preview!==void 0)return qE(e.preview)??e.preview}async copyPreview(e){let t=this.previewText(e);if(t)try{await navigator.clipboard.writeText(t),this.message.set(`Copied.`)}catch{this.message.set(`The clipboard is not available here.`)}}mockCall(e){let t=e.method.toUpperCase(),n=Zse(e.url),r=e.error||!e.preview?null:Qse(e.preview);this.draft.set({...U8,pattern:n,method:t,body:r??``});let i=`${t} ${n}`;this.message.set(r?`Filled in a rule for ${i} with the preview as its body. Check it, then add the rule.`:e.preview&&!e.error?`Filled in a rule for ${i}. The preview is not complete JSON, so it is not used as the body.`:`Filled in a rule for ${i}. Set a status, a delay or a body, then add the rule.`),td(()=>this.host.nativeElement.querySelector(`#rule-pattern`)?.focus(),{injector:this.injector})}closePreview(){let e=this.selectedCallId();this.selectedCallId.set(null),e&&[...this.host.nativeElement.querySelectorAll(`button[data-call-id]`)].find(t=>t.dataset.callId===e)?.focus()}stopListening(){for(let e of this.unsubscribe.splice(0))e()}statusTone(e){return e===void 0?`neutral`:e===0||e>=400?`bad`:e>=300?`redirect`:e>=200?`ok`:`neutral`}mocksOnServer(e){return e.target!==`client`&&e.status!==void 0&&e.status>0&&e.status<400}payloadLabel(e){return e.source===`hydration`?`hydration annotations`:e.fn?`Analog server function ${e.fn.name??e.fn.id}`:e.source===`analog`?`Analog`:null}targetLabel(e){return e===`both`?`SSR + client`:e===`server`?`SSR only`:`Client only`}pageOptions=X(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url})));methodOptions=X(()=>{let e=this.draft().method;return[{value:``,label:`Any`},...(e&&!q8.includes(e)?[...q8,e]:q8).map(e=>({value:e,label:e}))]});targetOptions=[{value:`both`,label:`SSR + client`},{value:`server`,label:`SSR only`},{value:`client`,label:`Client only`}];selectPage(e){e&&this.selectedPageId.set(e),this.selectedCallId.set(null),this.overrideFromPayload.set(null)}setDraft(e,t){this.draft.update(n=>({...n,[e]:t}))}patch(e,t){let n=t.target.value;this.draft.update(t=>({...t,[e]:n}))}async addRule(e){e.preventDefault();let t=this.draftRule();if(!t||this.addingRule())return;let n={id:W8(),...t};this.addingRule.set(!0);let r=await this.saveRules(e=>[[...e,n],n],`Rule added.`);this.addingRule.set(!1),r&&(this.draft.set({...U8}),this.host.nativeElement.querySelector(`#rule-pattern`)?.focus())}async addPreset(e){let t=hae(e,W8);if(t.length){if(this.rules().length+t.length>J8){this.message.set(`You can add up to ${J8} rules. Remove one to add the preset.`);return}await this.saveRules(e=>[[...e,...t],t[0]],`Added ${t.length===1?`a rule`:`${t.length} rules`} for every browser request.`)}}toggleRule(e){this.saveRules(t=>{let n=t.find(t=>t.id===e);return n?[t.map(t=>t.id===e?{...t,enabled:!t.enabled}:t),n]:null},`Rule updated.`)}async removeRule(e){let t=-1;await this.saveRules(n=>(t=n.findIndex(t=>t.id===e),t<0?null:[n.filter(t=>t.id!==e),n[t]]),`Rule removed.`)&&this.focusAfterRemove(`[data-remove-rule]`,t,`#rule-list-heading`)}async clearCalls(){try{await _T(this.rpc(),`clear-http-calls`),this.selectedCallId.set(null),this.message.set(`Timeline cleared.`)}catch{this.message.set(`Could not clear the timeline.`)}}overrideLabel(e){return Jse[e]??e}setOverrideDraft(e,t){this.overrideDraft.update(n=>({...n,[e]:t})),e===`kind`&&t!==`state-edit`&&this.overrideFromPayload.set(null)}patchOverride(e,t){let n=t.target.value;this.overrideDraft.update(t=>({...t,[e]:n})),e===`key`&&this.overrideFromPayload.set(null)}async copyKey(e){try{await navigator.clipboard.writeText(e),this.message.set(`Copied.`)}catch{this.message.set(`The clipboard is not available here.`)}}canEditEntry(e){let{key:t}=e;return this.canWrite()&&!!t&&t===t.trim()&&t.length<=nce&&!tce.test(t)}editEntry(e){if(!this.canEditEntry(e))return;let t=this.selected();this.overrideDraft.set({...H8,kind:`state-edit`,pattern:t?ece(t.initialUrl??t.url):``,key:e.key}),this.overrideFromPayload.set(e.http?`http`:`other`),this.message.set(`Editing the TransferState entry in SSR overrides.`),td(()=>{let e=this.host.nativeElement.querySelector(this.overrideDraft().pattern?`#override-value`:`#override-pattern`);e?.scrollIntoView?.({block:`center`}),e?.focus()},{injector:this.injector})}async addOverride(e){if(e.preventDefault(),!this.overrideReady()||this.addingOverride())return;let t=this.overrideDraft(),n={id:`o${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`,kind:t.kind,pattern:t.pattern.trim(),enabled:!0,...t.kind===`render-error`&&t.message.trim()?{message:t.message.trim()}:{},...t.kind===`state-edit`?{key:t.key.trim()}:{},...t.kind===`state-edit`&&t.value.trim()?{value:t.value.trim()}:{}};this.addingOverride.set(!0);let r=await this.saveOverrides(e=>[...e,n],`Override added. Reload the page.`);this.addingOverride.set(!1),r&&(this.overrideDraft.set({...H8,kind:t.kind}),this.overrideFromPayload.set(null),this.host.nativeElement.querySelector(`#override-pattern`)?.focus())}toggleOverride(e){this.saveOverrides(t=>t.some(t=>t.id===e)?t.map(t=>t.id===e?{...t,enabled:!t.enabled}:t):null,`Override updated. Reload the page.`)}async removeOverride(e){let t=-1;await this.saveOverrides(n=>(t=n.findIndex(t=>t.id===e),t<0?null:n.filter(t=>t.id!==e)),`Override removed.`)&&this.focusAfterRemove(`[data-remove-override]`,t,`#override-list-heading`)}focusAfterRemove(e,t,n){td(()=>{let r=this.host.nativeElement,i=r.querySelectorAll(e);(i[Math.min(t,i.length-1)]??r.querySelector(n))?.focus()},{injector:this.injector})}async refetchPayload(e){if(!this.refetching()){this.refetching.set(!0);try{let t=await _T(this.rpc(),`request-http-payload-refetch`,{pageId:e});if(!t)this.announce(`Could not reach the devtools server.`);else if(t.error)this.announce(t.error);else if(!t.found)this.announce(`The server answered ${t.status} without a TransferState payload.`);else{let e=t.entries??0;this.announce(`Refetched: ${e} entr${e===1?`y`:`ies`}.`)}}catch{this.announce(`Could not refetch the payload.`)}finally{this.refetching.set(!1)}}}announce(e){if(this.message()!==e){this.message.set(e);return}this.message.set(``),td(()=>{this.message()===``&&this.message.set(e)},{injector:this.injector})}saveOverrides(e,t){let n=this.overrideSaves.then(async()=>{let n=e(this.overrides());if(!n)return!1;try{let e=await _T(this.rpc(),`set-ssr-overrides`,n);return this.overrides.set(Array.isArray(e)?e:n),this.announce(t),!0}catch{return this.message.set(`Could not save the overrides.`),!1}});return this.overrideSaves=n,n}saveRules(e,t){let n=this.ruleSaves.then(async()=>{let n=e(this.rules());if(!n)return!1;let[r,i]=n;try{let e=await _T(this.rpc(),`set-http-rules`,r);return this.rules.set(Array.isArray(e)?e:r),this.announce(i.target===`client`?t:`${t} Reload the page to apply it to SSR.`),!0}catch{return this.message.set(`Could not save the rules.`),!1}});return this.ruleSaves=n,n}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-network-inspector`]],viewQuery:function(e,t){e&1&&Og(t.callsBody,ioe,5),e&2&&kg()},inputs:{rpc:[1,`rpc`]},decls:146,vars:74,consts:[[`callsBody`,``],[1,`page-intro`],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`,`error`],[1,`toolbar`,3,`hidden`],[1,`page-picker`],[`id`,`page-picker-label`],[`labelledBy`,`page-picker-label`,`emptyText`,`No connected page`,`placeholder`,`No connected page`,3,`valueChange`,`options`,`value`],[`type`,`button`,3,`click`,`disabled`],[3,`done`,`calls`,`ssrRequest`,`title`,`pageUrl`],[`role`,`status`,1,`message`],[1,`grid`,3,`hidden`],[`aria-labelledby`,`ssr-heading`,1,`panel`,`wide`],[`id`,`ssr-heading`],[1,`empty`],[`aria-labelledby`,`timeline-heading`,1,`panel`,`wide`],[`id`,`timeline-heading`],[`what`,`HTTP calls`,`limit`,`httpCalls`,3,`dropped`,`max`],[`role`,`group`,`aria-label`,`Filter the HTTP timeline`,1,`filters`],[`inputId`,`timeline-search`,`placeholder`,`Filter by URL or method`,`saveKey`,`network`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Side`,1,`side-filter`,3,`valueChange`,`options`,`value`],[1,`inline`,`failed-toggle`],[`type`,`checkbox`,3,`change`,`checked`],[`role`,`group`,`aria-label`,`Timeline view`,1,`view-toggle`],[`type`,`button`,3,`click`],[1,`total`],[`role`,`status`,1,`sr-only`],[3,`calls`,`selectedId`],[`role`,`status`,1,`empty`,`no-match`],[`id`,`call-preview`,`role`,`region`,`aria-labelledby`,`preview-heading`,1,`preview`],[`aria-labelledby`,`lint-heading`,1,`panel`,`wide`],[`id`,`lint-heading`],[3,`open`,`calls`,`serverCalls`],[`aria-labelledby`,`rules-heading`,1,`panel`],[`id`,`rules-heading`],[`id`,`http-writes-off`,1,`muted`,`small`],[3,`add`,`disabled`,`describedBy`],[`id`,`rule-form`,1,`rule-form`,3,`submit`],[1,`hint`],[`id`,`rule-pattern`,`required`,``,`spellcheck`,`false`,`autocomplete`,`off`,`placeholder`,`e.g. /api/products`,3,`input`,`value`],[3,`calls`,`pattern`,`method`,`target`],[1,`row`],[1,`field-group`],[`id`,`rule-method-label`],[`labelledBy`,`rule-method-label`,3,`valueChange`,`options`,`value`],[`id`,`rule-target-label`],[`labelledBy`,`rule-target-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`id`,`rule-status-label`],[`labelledBy`,`rule-status-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`type`,`number`,`inputmode`,`numeric`,`min`,`0`,`max`,`10000`,`placeholder`,`0`,3,`input`,`value`],[`id`,`rule-chance`,`type`,`number`,`inputmode`,`numeric`,`min`,`1`,`max`,`99`,`step`,`1`,`placeholder`,`100`,3,`input`,`value`],[`rows`,`3`,`spellcheck`,`false`,`aria-describedby`,`body-error`,3,`input`,`placeholder`,`value`],[`id`,`body-error`,1,`field-error`],[`id`,`rule-ssr-note`,1,`muted`,`small`],[`id`,`rule-hint`,1,`muted`,`small`],[1,`form-actions`],[`type`,`submit`,3,`disabled`],[`id`,`rule-list-heading`,`tabindex`,`-1`,1,`rules-heading`],[1,`rules`],[3,`off`],[1,`empty-rule`],[`aria-labelledby`,`overrides-heading`,1,`panel`],[`id`,`overrides-heading`],[1,`muted`,`small`],[1,`rule-form`,3,`submit`],[`id`,`override-kind-label`],[`labelledBy`,`override-kind-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`id`,`override-pattern`,`required`,``,`spellcheck`,`false`,`autocomplete`,`off`,`placeholder`,`e.g. /examples/ssr`,3,`input`,`value`],[`id`,`override-kind-help`,1,`muted`,`small`],[`id`,`override-list-heading`,`tabindex`,`-1`,1,`rules-heading`],[`aria-labelledby`,`hydration-heading`,1,`panel`],[`id`,`hydration-heading`],[`aria-labelledby`,`payload-heading`,1,`panel`,`wide`],[`id`,`payload-heading`],[1,`payload-tools`],[`aria-hidden`,`true`,1,`spinner`],[1,`table-wrap`],[`scope`,`col`],[`scope`,`col`,1,`num`],[`appRovingList`,`button.ssr-row`],[3,`selected`],[`id`,`ssr-detail`,`role`,`region`,`aria-labelledby`,`ssr-detail-heading`,1,`preview`],[3,`click`],[1,`url`],[`type`,`button`,`aria-controls`,`ssr-detail`,1,`link`,`ssr-row`,3,`title`],[1,`method`],[1,`sr-only`],[1,`status`],[`aria-hidden`,`true`,1,`dot`],[1,`num`],[1,`notes`],[1,`tag`,`server`],[1,`tag`,`mock`],[1,`tag`,`fault`],[`id`,`ssr-detail-heading`],[1,`stats`],[1,`muted`,`small`,`ok-note`],[1,`request-call`],[1,`muted`],[1,`stats`,`nav-stats`],[1,`preview-url`,3,`title`],[1,`tag`,3,`title`],[1,`muted`,`small`,`skip-reason`],[3,`open`,`calls`,`selectedId`],[1,`muted`,`small`,`window-note`],[`aria-rowindex`,`1`],[`appRovingList`,`button[data-call-id]`,3,`rovingWindow`],[`aria-hidden`,`true`,1,`spacer`],[`colspan`,`7`],[1,`tag`],[`type`,`button`,1,`link`,3,`title`],[1,`page-url`,3,`title`],[3,`origin`],[1,`tag`,`rule-ref`,3,`title`],[1,`empty-actions`],[`id`,`call-preview`,`role`,`region`,`aria-labelledby`,`preview-heading`,1,`preview`,3,`keydown.escape`],[1,`preview-head`],[`id`,`preview-heading`,`tabindex`,`-1`],[1,`preview-actions`],[`type`,`button`,1,`ghost`],[3,`done`,`call`],[`type`,`button`,`aria-controls`,`rule-form`,1,`ghost`,3,`click`,`disabled`],[`type`,`button`,1,`ghost`,3,`click`],[1,`preview-meta`],[1,`preview-rule`],[3,`value`],[`tabindex`,`0`,`role`,`region`,1,`preview-body`],[3,`callId`,`request`,`response`],[1,`inline`],[`type`,`checkbox`,3,`change`,`checked`,`disabled`],[1,`rule-pattern`,3,`title`],[1,`rule-method`],[`type`,`button`,`data-remove-rule`,``,1,`link`,`remove`,3,`click`,`disabled`],[1,`rule-meta`],[1,`status`,`bad`],[1,`status`,3,`ok`,`redirect`,`bad`],[1,`rule-note`],[`spellcheck`,`false`,`placeholder`,`Simulated render error`,`aria-describedby`,`override-kind-help`,3,`input`,`value`],[`id`,`override-key`,`spellcheck`,`false`,`autocomplete`,`off`,3,`input`,`value`],[`id`,`override-value`,`rows`,`3`,`spellcheck`,`false`,3,`input`,`value`],[`id`,`override-value-error`,1,`field-error`],[`id`,`override-value-note`,1,`muted`,`small`],[`type`,`button`,`data-remove-override`,``,1,`link`,`remove`,3,`click`,`disabled`],[1,`plain`,`mismatches`],[1,`mismatch-row`],[1,`mismatch-label`],[1,`plain`],[1,`warn`],[`type`,`button`,`data-refetch-payload`,``,3,`click`,`disabled`],[`id`,`refetch-hint`,1,`muted`,`small`],[1,`muted`,`small`,`summary-line`],[`data-refetched`,``,1,`tag`],[`role`,`alert`,1,`bad`],[3,`size`,`entries`],[1,`entries`],[`aria-hidden`,`true`,1,`chevron`],[1,`entry-key`],[1,`entry-size`],[1,`entry-key-row`],[1,`entry-key-label`],[1,`entry-key-text`],[1,`entry-actions`],[`tabindex`,`0`,`role`,`region`]],template:function(e,t){if(e&1&&(F(0,`p`,1),K(1,` HttpClient calls made while rendering on the server and in the browser, from the live page and the devtools server, with hydration stats, the TransferState payload and fault injection. `),I(),A(2,loe,4,0,`div`,2)(3,uoe,7,0,`div`,3),F(4,`div`,4)(5,`div`,5)(6,`span`,6),K(7,`Page`),I(),F(8,`app-select`,7),H(`valueChange`,function(e){return t.selectPage(e)}),I()(),F(9,`button`,8),H(`click`,function(){return t.clearCalls()}),K(10,` Clear timeline `),I(),F(11,`app-har-export`,9),H(`done`,function(e){return t.message.set(e)}),I(),F(12,`p`,10),K(13),I()(),F(14,`div`,11)(15,`section`,12)(16,`h2`,13),K(17),I(),A(18,Ioe,20,1)(19,Loe,14,0,`div`,14),I(),F(20,`section`,15)(21,`h2`,16),K(22),I(),L(23,`app-limit-note`,17),F(24,`div`,18)(25,`app-search-field`,19),w_(`valueChange`,function(e){return C_(t.callQuery,e)||(t.callQuery=e),e}),I(),F(26,`app-select`,20),w_(`valueChange`,function(e){return C_(t.sideFilter,e)||(t.sideFilter=e),e}),I(),F(27,`label`,21)(28,`input`,22),H(`change`,function(e){return t.failedOnly.set(e.target.checked)}),I(),K(29,` Failed only `),I(),F(30,`div`,23)(31,`button`,24),H(`click`,function(){return t.timelineView.set(`table`)}),K(32,` Table `),I(),F(33,`button`,24),H(`click`,function(){return t.timelineView.set(`waterfall`)}),K(34,` Waterfall `),I()(),F(35,`span`,25),K(36),I(),F(37,`span`,26),K(38),I()(),A(39,Roe,1,2,`app-network-waterfall`,27)(40,Yoe,25,5)(41,Qoe,9,1,`div`,28)(42,$oe,11,0,`div`,14),A(43,nse,23,23,`div`,29),I(),F(44,`section`,30)(45,`h2`,31),K(46,`HTTP lint`),I(),F(47,`app-http-lint`,32),H(`open`,function(e){return t.openCall(e)}),I()(),F(48,`section`,33)(49,`h2`,34),K(50,`Fault injection`),I(),A(51,rse,2,1,`p`,35),F(52,`app-rule-presets`,36),H(`add`,function(e){return t.addPreset(e)}),I(),F(53,`form`,37),H(`submit`,function(e){return t.addRule(e)}),F(54,`label`)(55,`span`),K(56,`URL pattern `),F(57,`span`,38),K(58,`(substring or * glob, ^ anchors the path)`),I()(),F(59,`input`,39),H(`input`,function(e){return t.patch(`pattern`,e)}),I()(),L(60,`app-rule-match-count`,40),F(61,`div`,41)(62,`div`,42)(63,`span`,43),K(64,`Method`),I(),F(65,`app-select`,44),H(`valueChange`,function(e){return t.setDraft(`method`,e??``)}),I()(),F(66,`div`,42)(67,`span`,45),K(68,`Apply on`),I(),F(69,`app-select`,46),H(`valueChange`,function(e){return t.setDraft(`target`,e??`both`)}),I()()(),F(70,`div`,41)(71,`div`,42)(72,`span`,47),K(73,`Status`),I(),F(74,`app-select`,48),H(`valueChange`,function(e){return t.setDraft(`status`,e??``)}),I()(),F(75,`label`),K(76,` Delay (ms) `),F(77,`input`,49),H(`input`,function(e){return t.patch(`delayMs`,e)}),I()()(),F(78,`label`)(79,`span`),K(80,`Chance (%) `),F(81,`span`,38),K(82,`(optional, share of matching requests)`),I()(),F(83,`input`,50),H(`input`,function(e){return t.patch(`chance`,e)}),I()(),F(84,`label`)(85,`span`),K(86,`Mock JSON body `),F(87,`span`,38),K(88,`(optional)`),I()(),F(89,`textarea`,51),H(`input`,function(e){return t.patch(`body`,e)}),I()(),F(90,`p`,52),K(91),I(),A(92,ise,2,0,`p`,53),F(93,`p`,54),K(94),I(),F(95,`div`,55)(96,`button`,56),K(97,` Add rule `),I()()(),F(98,`h3`,57),K(99),I(),F(100,`ul`,58),M(101,fse,19,18,`li`,59,V8,!1,pse,2,0,`li`,60),I()(),F(104,`section`,61)(105,`h2`,62),K(106,`SSR overrides`),I(),F(107,`p`,63),K(108,` Development only. These change what the server sends for matching pages, from the next full page load, and the request is marked `),F(109,`strong`),K(110,`overridden`),I(),K(111,`. `),I(),F(112,`form`,64),H(`submit`,function(e){return t.addOverride(e)}),F(113,`div`,42)(114,`span`,65),K(115,`Override`),I(),F(116,`app-select`,66),H(`valueChange`,function(e){return t.setOverrideDraft(`kind`,e??`render-error`)}),I()(),F(117,`label`)(118,`span`),K(119,`Page pattern `),F(120,`span`,38),K(121,`(substring or * glob, ^ anchors the path)`),I()(),F(122,`input`,67),H(`input`,function(e){return t.patchOverride(`pattern`,e)}),I()(),A(123,mse,8,1)(124,_se,12,6)(125,vse,11,0,`p`,68),F(126,`div`,55)(127,`button`,56),K(128,` Add override `),I()()(),F(129,`h3`,69),K(130),I(),F(131,`ul`,58),M(132,xse,12,12,`li`,59,V8,!1,Sse,2,0,`li`,60),I()(),F(135,`section`,70)(136,`h2`,71),K(137,`Hydration`),I(),A(138,Pse,37,14)(139,Fse,5,0,`div`,14),I(),F(140,`section`,72)(141,`h2`,73),K(142,`TransferState payload`),I(),A(143,Ise,5,3,`div`,74),A(144,Kse,2,1)(145,qse,3,0,`div`,14),I()()),e&2){let e,n,r,i,a;D(2),j(t.loading()?2:t.failed()?3:-1),D(2),P(`hidden`,t.loading()),D(4),P(`options`,t.pageOptions())(`value`,t.selected()?.pageId??null),D(),P(`disabled`,!t.canWrite()),k(`aria-describedby`,t.canWrite()?null:`http-writes-off`),D(2),P(`calls`,t.timeline())(`ssrRequest`,t.pageSsrRequest())(`title`,t.selected()?.title??``)(`pageUrl`,t.selected()?.url),D(2),q(t.message()),D(),P(`hidden`,t.loading()),D(3),J(`SSR requests (`,t.requests().length,`)`),D(),j(t.requests().length?18:19),D(4),J(`HTTP timeline (`,t.timeline().length,`)`),D(),P(`dropped`,t.droppedCalls())(`max`,t.maxCalls()),D(),G(`no-calls`,!t.timeline().length),D(),S_(`value`,t.callQuery),D(),P(`options`,t.sideOptions),S_(`value`,t.sideFilter),D(2),P(`checked`,t.failedOnly()),D(3),k(`aria-pressed`,t.timelineView()===`table`),D(2),k(`aria-pressed`,t.timelineView()===`waterfall`),D(3),q(t.countText()),D(2),q(t.filterStatus()),D(),j(t.visibleCalls().length&&t.timelineView()===`waterfall`?39:t.visibleCalls().length?40:t.timeline().length?41:42),D(4),j((e=t.selectedCall())?43:-1,e),D(4),P(`calls`,t.selected()?.calls??L_(73,aoe))(`serverCalls`,t.renderServerCalls()),D(4),j(t.canWrite()?-1:51),D(),P(`disabled`,!t.canWrite())(`describedBy`,t.canWrite()?``:`http-writes-off`),D(7),P(`value`,t.draft().pattern),D(),P(`calls`,t.timeline())(`pattern`,t.draft().pattern)(`method`,t.draft().method)(`target`,t.draft().target),D(5),P(`options`,t.methodOptions())(`value`,t.draft().method),D(4),P(`describedBy`,t.draftMocksOnServer()?`rule-ssr-note`:``)(`options`,t.targetOptions)(`value`,t.draft().target),D(5),P(`describedBy`,t.draftMocksOnServer()?`rule-ssr-note`:``)(`options`,t.statusOptions)(`value`,t.draft().status),D(3),P(`value`,t.draft().delayMs),D(6),P(`value`,t.draft().chance),D(6),P(`placeholder`,t.bodyPlaceholder)(`value`,t.draft().body),k(`aria-invalid`,t.bodyError()?`true`:null),D(2),q(t.bodyError()),D(),j(t.draftMocksOnServer()?92:-1),D(2),q(t.draftHint()),D(2),P(`disabled`,!t.canWrite()||!t.draftRule()),k(`aria-disabled`,t.addingRule()||null)(`aria-describedby`,t.canWrite()?`rule-hint`:`http-writes-off`),D(3),J(` Rules (`,t.rules().length,`) `),D(2),N(t.rules()),D(15),P(`describedBy`,t.overrideDraft().kind===`state-edit`?``:`override-kind-help`)(`options`,t.overrideKindOptions)(`value`,t.overrideDraft().kind),D(6),P(`value`,t.overrideDraft().pattern),D(),j((n=t.overrideDraft().kind)===`render-error`?123:n===`state-edit`?124:n===`client-render`?125:-1),D(4),P(`disabled`,!t.canWrite()||!t.overrideReady()),k(`aria-disabled`,t.addingOverride()||null)(`aria-describedby`,t.canWrite()?null:`http-writes-off`),D(3),J(` Overrides (`,t.overrides().length,`) `),D(2),N(t.overrides()),D(6),j((r=t.selected()?.hydration)?138:139,r),D(5),j((i=t.selected())?143:-1,i),D(),j((a=t.selectedPayload())?144:145,a)}},dependencies:[nP,jae,Pae,Iae,tae,Wae,eO,uae,$ae,cP,lV,eoe,roe,OD,Gv],styles:[`@charset "UTF-8"; .page-intro[_ngcontent-%COMP%] { margin: 0 0 12px; color: var(--%NS%text-2); @@ -22744,6 +22758,19 @@ dd[_ngcontent-%COMP%] { font-variant-numeric: tabular-nums; } +.payload-tools[_ngcontent-%COMP%] { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 8px 12px; + margin-bottom: 12px; +} + +.payload-tools[_ngcontent-%COMP%] .muted[_ngcontent-%COMP%] { + flex: 1 1 240px; + min-width: 0; +} + .entries[_ngcontent-%COMP%] { border-top: 1px solid var(--%NS%border); } @@ -22860,7 +22887,7 @@ summary[_ngcontent-%COMP%]:hover .entry-key[_ngcontent-%COMP%] { .message[_ngcontent-%COMP%] { text-align: left; } -}`]})};function Qse(e,t){e&1&&(T(),R(0,`svg`,9),og(1,`path`,20),z())}function $se(e,t){e&1&&(T(),R(0,`svg`,10)(1,`defs`)(2,`linearGradient`,21),og(3,`stop`,22)(4,`stop`,23),z()(),og(5,`path`,24),R(6,`g`,25),og(7,`path`,26)(8,`path`,27)(9,`path`,28)(10,`path`,29),z()())}function ece(e,t){e&1&&(T(),R(0,`svg`,11),og(1,`path`,30)(2,`path`,31)(3,`path`,32)(4,`path`,33),z())}function tce(e,t){e&1&&(T(),R(0,`svg`,9),og(1,`path`,34)(2,`path`,35)(3,`path`,36)(4,`path`,37)(5,`path`,38)(6,`path`,39),z())}function nce(e,t){if(e&1&&(R(0,`a`,16)(1,`span`,40)(2,`strong`),K(3),z()(),R(4,`span`,41),K(5,`→`),z(),R(6,`span`,42),K(7,`(opens in a new tab)`),z()()),e&2){let e=t;V(`href`,e.href,yu),D(3),q(e.label)}}function rce(e,t){if(e&1&&(R(0,`li`),K(1),z()),e&2){let e=t.$implicit,n=t.$index;Xg(`animation-delay`,200+n*120,`ms`),D(),q(e)}}var ice=class e{info=$.required();plansTitle=X(()=>{let e=this.info();return e.plansTitle??(e.link?`In an ${e.name} app`:`On the roadmap`)});static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-coming-soon`]],hostVars:2,hostBindings:function(e,t){e&2&&Xg(`--%NS%brand`,t.info().color)},inputs:{info:[1,`info`]},decls:29,vars:6,consts:[[`aria-labelledby`,`soon-title`,1,`soon`],[`aria-hidden`,`true`,1,`stage`],[1,`ring`,`r1`],[1,`ring`,`r2`],[1,`orbit`,`o1`],[1,`dot`],[1,`orbit`,`o2`],[1,`orbit`,`o3`],[1,`logo`],[`viewBox`,`0 0 256 256`,`width`,`96`,`height`,`96`],[`viewBox`,`0 0 32 32`,`width`,`88`,`height`,`88`],[`viewBox`,`0 0 256 182`,`width`,`104`,`height`,`74`],[1,`badge`],[`aria-hidden`,`true`,1,`spark`],[`id`,`soon-title`],[1,`summary`],[`target`,`_blank`,`rel`,`noopener noreferrer`,1,`author`,`cta`,3,`href`],[1,`plans-title`],[1,`plans`],[3,`animation-delay`],[`fill`,`#3c5afd`,`d`,`M237.248 18.752q18.061 18.06 18.748 45.247V192c-.457 18.12-6.707 33.207-18.748 45.247c-12.04 12.04-27.127 18.291-45.251 18.752H63.999q-27.187-.69-45.247-18.752C6.712 225.208.46 210.121 0 192.001V64q.69-27.187 18.752-45.247Q36.812.692 63.999 0h127.998c18.124.46 33.211 6.711 45.251 18.752m-17.655 103q-6.033-6.003-6.28-15.066V64q-.192-9.063-6.221-15.091c-4.02-4.023-9.054-6.093-15.095-6.22h-21.312v106.626L85.315 42.687H63.999c-6.042.128-11.072 2.198-15.091 6.221c-4.023 4.02-6.093 9.05-6.22 15.09v42.688q-.249 9.063-6.281 15.066q-6.03 5.996-15.091 6.246q9.062.255 15.09 6.25c4.024 4.002 6.115 9.024 6.281 15.066V192c.128 6.037 2.198 11.072 6.221 15.091q6.03 6.03 15.09 6.22h21.317V106.687l85.37 106.627h21.312c6.041-.128 11.076-2.202 15.095-6.221s6.093-9.054 6.22-15.09v-42.688q.249-9.063 6.281-15.066q6.03-5.995 15.091-6.25q-9.062-.25-15.09-6.246`],[`id`,`an-hero-grad`,`x1`,`0`,`y1`,`0`,`x2`,`1`,`y2`,`1`],[`offset`,`0`,`stop-color`,`#f0224f`],[`offset`,`1`,`stop-color`,`#c4002d`],[`d`,`M16 0C27.2 0 32 4.8 32 16S27.2 32 16 32 0 27.2 0 16 4.8 0 16 0Z`,`fill`,`url(#an-hero-grad)`],[`transform`,`translate(6.4 6.4) scale(0.8)`,`fill`,`#fff`],[`d`,`M14.8486 0L23.138 16.8551L23.9996 3.99892L14.8486 0Z`],[`d`,`M16.9875 17.7114H7.01272L5.73926 20.627L12.0001 24L18.261 20.627L16.9875 17.7114Z`],[`d`,`M8.72168 13.9298H15.2812L11.9997 6.39575L8.72168 13.9298Z`],[`d`,`M9.15103 0L0 3.99892L0.861556 16.8551L9.15103 0Z`],[`fill`,`#c30f2e`,`d`,`M152.228.001L48.455 181.046H256L152.228 0z`],[`fill`,`#dd0330`,`d`,`M88.314 26.967L0 181.52h176.628L88.315 26.967z`],[`fill`,`#fff`,`d`,`M18.167 135.294h220.236v-2.419H18.167z`],[`fill`,`#fff`,`d`,`M204.38 170.667c-.861 0-1.67-.358-2.348-1.034c-4.045-4.063-4.221-20.586-4.026-45.33c.11-13.521.257-32.043-1.9-33.504c-2.104.873-2.315 16.172-2.451 26.301c-.162 11.785-.327 23.98-2.242 30.189c-.57 1.84-1.306 3.525-2.786 3.39c-2.086-.185-2.76-3.48-4.317-16.478c-.647-5.4-1.317-10.98-2.101-13.14a11 11 0 0 0-.269-.66c-.835 1.889-1.8 7.079-2.47 10.682c-.927 4.976-1.803 9.676-2.9 11.726c-.847 1.575-2.19 3.63-4.067 3.231c-2.558-.537-3.323-5.693-3.552-8.719c0-25.455-3.33-28.417-3.997-28.753l-.107.081l-.162-.036c-2.377 1.038-2.506 9.294-2.627 17.276c-.096 5.856-.198 12.492-1.053 18.701c-1.108 8.05-2.448 9.603-4.115 9.507c-3.838-.262-3.95-13.482-3.95-14.987c0-.472.012-1.028.027-1.642c.074-3.076.205-8.8-1.687-10.604c-.25-.239-.603-.515-.879-.437c-1.347.339-2.745 4.714-3.209 6.153c-.147.457-.265.833-.364 1.09c-.078.214-.177.515-.294.88c-1.02 3.095-2.18 6.183-4.16 6.944c-.732.284-1.498.222-2.216-.183c-.953-.541-1.73-1.646-2.455-3.482c-.397-1.016-.735-2.046-1.082-3.081c-.419-1.263-.85-2.569-1.384-3.808c-.419-.965-1.464-1.4-2.796-1.164c-2.768.494-3.232 3.29-3.622 7.5c-.07.733-.137 1.452-.228 2.128c-.011.198-.501 6.38-.814 8.344c-.865 5.39-2.002 7.512-3.89 7.358c-4.66-.398-6.798-20.836-6.684-29.47c.088-6.592-1.104-9-1.818-9.382c-.074-.034-.189-.096-.46.095c-.843.571-1.594 2.348-1.363 4.215c2.566 20.32.674 43.592-3.96 48.833c-1.46 1.649-3.448 1.627-4.832.236c-4.049-4.064-4.218-20.586-4.026-45.33c.11-13.521.254-32.043-1.9-33.504c-2.105.873-2.311 16.172-2.45 26.301c-.163 11.785-.329 23.98-2.246 30.189c-.57 1.84-1.307 3.525-2.782 3.39c-2.091-.186-2.761-3.48-4.321-16.478c-.649-5.4-1.319-10.98-2.101-13.14c-.1-.273-.189-.49-.27-.66c-.832 1.889-1.796 7.079-2.466 10.682c-.927 4.976-1.803 9.676-2.904 11.726c-.846 1.575-2.19 3.63-4.063 3.231c-2.558-.537-3.324-5.693-3.552-8.719c-.003-25.455-3.33-28.417-3.997-28.753l-.106.081l-.166-.036c-2.374 1.038-2.503 9.293-2.629 17.276c-.091 5.856-.194 12.492-1.048 18.701c-1.107 8.05-2.437 9.618-4.111 9.507c-3.846-.262-3.958-13.482-3.958-14.987c0-.472.016-1.028.03-1.642c.074-3.076.207-8.8-1.685-10.604c-.25-.239-.603-.515-.88-.438c-1.347.34-2.75 4.715-3.206 6.155a47 47 0 0 1-.364 1.09q-.16.432-.298.875c-1.02 3.096-2.18 6.187-4.155 6.95c-.736.282-1.506.22-2.22-.185c-.953-.541-1.734-1.646-2.454-3.482c-.398-1.016-.74-2.046-1.083-3.081c-.42-1.263-.854-2.569-1.387-3.808c-.416-.965-1.465-1.4-2.797-1.164c-3.188.567-3.943 4.52-4.55 9.238l-.106.839l-2.411-.32l.114-.824c.527-4.137 1.328-10.39 6.53-11.31c2.446-.435 4.585.581 5.446 2.583c.578 1.34 1.031 2.695 1.466 4.008c.324.99.654 1.98 1.037 2.959c.674 1.708 1.197 2.15 1.392 2.257c1.218-.38 2.462-4.167 2.873-5.414c.13-.402.24-.732.328-.968c.085-.233.195-.571.328-.98c1.097-3.43 2.474-7.144 4.918-7.762c.747-.191 1.903-.166 3.157 1.035c2.665 2.544 2.525 8.48 2.433 12.41c-.014.59-.028 1.126-.028 1.583c0 6.272.93 10.655 1.64 12.16c.367-.77.998-2.63 1.598-7.007c.831-6.066.938-12.624 1.027-18.41c.161-10.24.275-17.663 3.982-19.408c.552-.339 1.469-.522 2.436-.033c3.586 1.803 5.326 11.885 5.326 30.817c.225 2.926 1.013 6.006 1.66 6.448c.004-.066.53-.39 1.394-2.01c.925-1.718 1.845-6.665 2.655-11.026c1.792-9.614 2.606-12.989 4.726-13.166c1.615-.158 2.362 1.896 2.676 2.76c.883 2.422 1.537 7.888 2.23 13.678c.54 4.49 1.31 10.902 2.094 13.497c.084-.228.18-.5.283-.836c1.815-5.878 1.98-17.887 2.14-29.507c.22-16.14.503-26.139 3.448-28.226a2.44 2.44 0 0 1 2.233-.316c3.448 1.144 3.714 11.254 3.519 35.8c-.14 17.799-.313 39.952 3.323 43.603c.317.32.542.32.622.32c.17 0 .413-.161.67-.452c3.681-4.162 6.01-26.022 3.372-46.927c-.328-2.602.677-5.337 2.392-6.514c.946-.652 2.036-.736 2.978-.232c2.145 1.14 3.187 5.024 3.102 11.546c-.15 11.387 2.584 24.714 4.37 26.842c.282-.471.842-1.763 1.379-5.145c.301-1.87.799-8.153.806-8.216c.09-.71.155-1.398.217-2.097c.369-3.924.82-8.804 5.613-9.654c2.444-.435 4.583.577 5.448 2.583c.577 1.34 1.027 2.695 1.46 4.008c.332.99.664 1.98 1.046 2.959c.67 1.708 1.197 2.15 1.387 2.257c1.218-.38 2.467-4.167 2.875-5.41c.132-.402.243-.737.328-.973c.088-.228.195-.57.324-.979c1.1-3.43 2.477-7.144 4.924-7.762c.74-.191 1.9-.166 3.154 1.035c2.665 2.543 2.526 8.48 2.437 12.41q-.029.792-.033 1.583c0 6.272.931 10.655 1.641 12.16c.365-.77.994-2.63 1.601-7.007c.832-6.066.931-12.624 1.027-18.41c.159-10.24.273-17.663 3.98-19.408c.55-.339 1.467-.522 2.44-.033c3.58 1.803 5.325 11.884 5.325 30.817c.224 2.926 1.012 6.006 1.656 6.448c.008-.066.526-.39 1.399-2.01c.923-1.718 1.84-6.665 2.653-11.026c1.786-9.614 2.602-12.989 4.722-13.166c1.62-.158 2.367 1.896 2.68 2.76c.88 2.422 1.535 7.888 2.233 13.678c.534 4.49 1.304 10.902 2.092 13.497c.08-.228.176-.5.28-.836c1.813-5.878 1.976-17.887 2.138-29.507c.216-16.14.504-26.139 3.448-28.226a2.45 2.45 0 0 1 2.234-.316c3.452 1.144 3.718 11.254 3.52 35.8c-.141 17.799-.314 39.952 3.319 43.603c.324.32.544.32.63.32c.165 0 .408-.161.662-.452c3.687-4.162 6.014-26.022 3.375-46.927c-.342-2.723.43-5.47 1.84-6.526c.71-.537 1.575-.647 2.37-.313c2.054.877 3.445 4.63 4.255 11.484c.339 2.87.641 5.974.931 9.036c.641 6.683 1.509 15.69 2.684 17.67c.36-.46 1.096-1.704 2.19-5.038l2.307.753c-1.696 5.157-3.026 7.1-4.755 6.902c-2.69-.299-3.468-5.734-4.84-20.055c-.29-3.048-.59-6.132-.928-8.989c-1.03-8.74-2.782-9.532-2.801-9.54c-.342.174-1.137 1.992-.842 4.31c2.558 20.32.673 43.597-3.964 48.834c-.747.842-1.587 1.27-2.485 1.27`],[`fill`,`#53b9ff`,`d`,`M39.863 54.115L.311 93.716l60.995 61.179L0 216.385l39.428 39.619l61.43-61.507l61.097 61.068l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m140.517 154.896l-39.658 39.601l61.097 61.069l39.552-39.602z`],[`fill-opacity`,`.2`,`d`,`m140.517 154.896l-39.658 39.601l15.267 15.182z`],[`fill`,`#53b9ff`,`d`,`M194.57 100.985L256 39.478L216.431 0l-61.412 61.384L93.917.311L54.365 39.913L216.01 201.761l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m115.36 100.987l39.659-39.602L93.917.313L54.365 39.914z`],[`fill-opacity`,`.2`,`d`,`m115.359 100.985l39.659-39.601l-15.271-15.186z`],[1,`who`],[`aria-hidden`,`true`,1,`go`],[1,`sr-only`]],template:function(e,t){if(e&1&&(R(0,`section`,0)(1,`div`,1),og(2,`span`,2)(3,`span`,3),R(4,`span`,4),og(5,`span`,5),z(),R(6,`span`,6),og(7,`span`,5),z(),R(8,`span`,7),og(9,`span`,5),z(),R(10,`div`,8),A(11,Qse,2,0,`:svg:svg`,9)(12,$se,11,0,`:svg:svg`,10)(13,ece,5,0,`:svg:svg`,11)(14,tce,7,0,`:svg:svg`,9),z()(),R(15,`p`,12)(16,`span`,13),K(17,`✦`),z(),K(18),z(),R(19,`h2`,14),K(20),z(),R(21,`p`,15),K(22),z(),A(23,nce,8,2,`a`,16),R(24,`h3`,17),K(25),z(),R(26,`ul`,18),M(27,rce,2,3,`li`,19,Yh),z()()),e&2){let e,n;D(11),j((e=t.info().id)===`nativescript`?11:e===`angular-native`?12:e===`analog`?13:e===`capacitor`?14:-1),D(7),J(` `,t.info().badge),D(2),q(t.info().heading),D(2),q(t.info().summary),D(),j((n=t.info().link)?23:-1,n),D(2),J(` `,t.plansTitle(),` `),D(2),N(t.info().plans)}},styles:[`[_nghost-%COMP%] { +}`]})};function ace(e,t){e&1&&(T(),R(0,`svg`,9),sg(1,`path`,20),z())}function oce(e,t){e&1&&(T(),R(0,`svg`,10)(1,`defs`)(2,`linearGradient`,21),sg(3,`stop`,22)(4,`stop`,23),z()(),sg(5,`path`,24),R(6,`g`,25),sg(7,`path`,26)(8,`path`,27)(9,`path`,28)(10,`path`,29),z()())}function sce(e,t){e&1&&(T(),R(0,`svg`,11),sg(1,`path`,30)(2,`path`,31)(3,`path`,32)(4,`path`,33),z())}function cce(e,t){e&1&&(T(),R(0,`svg`,9),sg(1,`path`,34)(2,`path`,35)(3,`path`,36)(4,`path`,37)(5,`path`,38)(6,`path`,39),z())}function lce(e,t){if(e&1&&(R(0,`a`,16)(1,`span`,40)(2,`strong`),K(3),z()(),R(4,`span`,41),K(5,`→`),z(),R(6,`span`,42),K(7,`(opens in a new tab)`),z()()),e&2){let e=t;V(`href`,e.href,bu),D(3),q(e.label)}}function uce(e,t){if(e&1&&(R(0,`li`),K(1),z()),e&2){let e=t.$implicit,n=t.$index;Zg(`animation-delay`,200+n*120,`ms`),D(),q(e)}}var dce=class e{info=$.required();plansTitle=X(()=>{let e=this.info();return e.plansTitle??(e.link?`In an ${e.name} app`:`On the roadmap`)});static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-coming-soon`]],hostVars:2,hostBindings:function(e,t){e&2&&Zg(`--%NS%brand`,t.info().color)},inputs:{info:[1,`info`]},decls:29,vars:6,consts:[[`aria-labelledby`,`soon-title`,1,`soon`],[`aria-hidden`,`true`,1,`stage`],[1,`ring`,`r1`],[1,`ring`,`r2`],[1,`orbit`,`o1`],[1,`dot`],[1,`orbit`,`o2`],[1,`orbit`,`o3`],[1,`logo`],[`viewBox`,`0 0 256 256`,`width`,`96`,`height`,`96`],[`viewBox`,`0 0 32 32`,`width`,`88`,`height`,`88`],[`viewBox`,`0 0 256 182`,`width`,`104`,`height`,`74`],[1,`badge`],[`aria-hidden`,`true`,1,`spark`],[`id`,`soon-title`],[1,`summary`],[`target`,`_blank`,`rel`,`noopener noreferrer`,1,`author`,`cta`,3,`href`],[1,`plans-title`],[1,`plans`],[3,`animation-delay`],[`fill`,`#3c5afd`,`d`,`M237.248 18.752q18.061 18.06 18.748 45.247V192c-.457 18.12-6.707 33.207-18.748 45.247c-12.04 12.04-27.127 18.291-45.251 18.752H63.999q-27.187-.69-45.247-18.752C6.712 225.208.46 210.121 0 192.001V64q.69-27.187 18.752-45.247Q36.812.692 63.999 0h127.998c18.124.46 33.211 6.711 45.251 18.752m-17.655 103q-6.033-6.003-6.28-15.066V64q-.192-9.063-6.221-15.091c-4.02-4.023-9.054-6.093-15.095-6.22h-21.312v106.626L85.315 42.687H63.999c-6.042.128-11.072 2.198-15.091 6.221c-4.023 4.02-6.093 9.05-6.22 15.09v42.688q-.249 9.063-6.281 15.066q-6.03 5.996-15.091 6.246q9.062.255 15.09 6.25c4.024 4.002 6.115 9.024 6.281 15.066V192c.128 6.037 2.198 11.072 6.221 15.091q6.03 6.03 15.09 6.22h21.317V106.687l85.37 106.627h21.312c6.041-.128 11.076-2.202 15.095-6.221s6.093-9.054 6.22-15.09v-42.688q.249-9.063 6.281-15.066q6.03-5.995 15.091-6.25q-9.062-.25-15.09-6.246`],[`id`,`an-hero-grad`,`x1`,`0`,`y1`,`0`,`x2`,`1`,`y2`,`1`],[`offset`,`0`,`stop-color`,`#f0224f`],[`offset`,`1`,`stop-color`,`#c4002d`],[`d`,`M16 0C27.2 0 32 4.8 32 16S27.2 32 16 32 0 27.2 0 16 4.8 0 16 0Z`,`fill`,`url(#an-hero-grad)`],[`transform`,`translate(6.4 6.4) scale(0.8)`,`fill`,`#fff`],[`d`,`M14.8486 0L23.138 16.8551L23.9996 3.99892L14.8486 0Z`],[`d`,`M16.9875 17.7114H7.01272L5.73926 20.627L12.0001 24L18.261 20.627L16.9875 17.7114Z`],[`d`,`M8.72168 13.9298H15.2812L11.9997 6.39575L8.72168 13.9298Z`],[`d`,`M9.15103 0L0 3.99892L0.861556 16.8551L9.15103 0Z`],[`fill`,`#c30f2e`,`d`,`M152.228.001L48.455 181.046H256L152.228 0z`],[`fill`,`#dd0330`,`d`,`M88.314 26.967L0 181.52h176.628L88.315 26.967z`],[`fill`,`#fff`,`d`,`M18.167 135.294h220.236v-2.419H18.167z`],[`fill`,`#fff`,`d`,`M204.38 170.667c-.861 0-1.67-.358-2.348-1.034c-4.045-4.063-4.221-20.586-4.026-45.33c.11-13.521.257-32.043-1.9-33.504c-2.104.873-2.315 16.172-2.451 26.301c-.162 11.785-.327 23.98-2.242 30.189c-.57 1.84-1.306 3.525-2.786 3.39c-2.086-.185-2.76-3.48-4.317-16.478c-.647-5.4-1.317-10.98-2.101-13.14a11 11 0 0 0-.269-.66c-.835 1.889-1.8 7.079-2.47 10.682c-.927 4.976-1.803 9.676-2.9 11.726c-.847 1.575-2.19 3.63-4.067 3.231c-2.558-.537-3.323-5.693-3.552-8.719c0-25.455-3.33-28.417-3.997-28.753l-.107.081l-.162-.036c-2.377 1.038-2.506 9.294-2.627 17.276c-.096 5.856-.198 12.492-1.053 18.701c-1.108 8.05-2.448 9.603-4.115 9.507c-3.838-.262-3.95-13.482-3.95-14.987c0-.472.012-1.028.027-1.642c.074-3.076.205-8.8-1.687-10.604c-.25-.239-.603-.515-.879-.437c-1.347.339-2.745 4.714-3.209 6.153c-.147.457-.265.833-.364 1.09c-.078.214-.177.515-.294.88c-1.02 3.095-2.18 6.183-4.16 6.944c-.732.284-1.498.222-2.216-.183c-.953-.541-1.73-1.646-2.455-3.482c-.397-1.016-.735-2.046-1.082-3.081c-.419-1.263-.85-2.569-1.384-3.808c-.419-.965-1.464-1.4-2.796-1.164c-2.768.494-3.232 3.29-3.622 7.5c-.07.733-.137 1.452-.228 2.128c-.011.198-.501 6.38-.814 8.344c-.865 5.39-2.002 7.512-3.89 7.358c-4.66-.398-6.798-20.836-6.684-29.47c.088-6.592-1.104-9-1.818-9.382c-.074-.034-.189-.096-.46.095c-.843.571-1.594 2.348-1.363 4.215c2.566 20.32.674 43.592-3.96 48.833c-1.46 1.649-3.448 1.627-4.832.236c-4.049-4.064-4.218-20.586-4.026-45.33c.11-13.521.254-32.043-1.9-33.504c-2.105.873-2.311 16.172-2.45 26.301c-.163 11.785-.329 23.98-2.246 30.189c-.57 1.84-1.307 3.525-2.782 3.39c-2.091-.186-2.761-3.48-4.321-16.478c-.649-5.4-1.319-10.98-2.101-13.14c-.1-.273-.189-.49-.27-.66c-.832 1.889-1.796 7.079-2.466 10.682c-.927 4.976-1.803 9.676-2.904 11.726c-.846 1.575-2.19 3.63-4.063 3.231c-2.558-.537-3.324-5.693-3.552-8.719c-.003-25.455-3.33-28.417-3.997-28.753l-.106.081l-.166-.036c-2.374 1.038-2.503 9.293-2.629 17.276c-.091 5.856-.194 12.492-1.048 18.701c-1.107 8.05-2.437 9.618-4.111 9.507c-3.846-.262-3.958-13.482-3.958-14.987c0-.472.016-1.028.03-1.642c.074-3.076.207-8.8-1.685-10.604c-.25-.239-.603-.515-.88-.438c-1.347.34-2.75 4.715-3.206 6.155a47 47 0 0 1-.364 1.09q-.16.432-.298.875c-1.02 3.096-2.18 6.187-4.155 6.95c-.736.282-1.506.22-2.22-.185c-.953-.541-1.734-1.646-2.454-3.482c-.398-1.016-.74-2.046-1.083-3.081c-.42-1.263-.854-2.569-1.387-3.808c-.416-.965-1.465-1.4-2.797-1.164c-3.188.567-3.943 4.52-4.55 9.238l-.106.839l-2.411-.32l.114-.824c.527-4.137 1.328-10.39 6.53-11.31c2.446-.435 4.585.581 5.446 2.583c.578 1.34 1.031 2.695 1.466 4.008c.324.99.654 1.98 1.037 2.959c.674 1.708 1.197 2.15 1.392 2.257c1.218-.38 2.462-4.167 2.873-5.414c.13-.402.24-.732.328-.968c.085-.233.195-.571.328-.98c1.097-3.43 2.474-7.144 4.918-7.762c.747-.191 1.903-.166 3.157 1.035c2.665 2.544 2.525 8.48 2.433 12.41c-.014.59-.028 1.126-.028 1.583c0 6.272.93 10.655 1.64 12.16c.367-.77.998-2.63 1.598-7.007c.831-6.066.938-12.624 1.027-18.41c.161-10.24.275-17.663 3.982-19.408c.552-.339 1.469-.522 2.436-.033c3.586 1.803 5.326 11.885 5.326 30.817c.225 2.926 1.013 6.006 1.66 6.448c.004-.066.53-.39 1.394-2.01c.925-1.718 1.845-6.665 2.655-11.026c1.792-9.614 2.606-12.989 4.726-13.166c1.615-.158 2.362 1.896 2.676 2.76c.883 2.422 1.537 7.888 2.23 13.678c.54 4.49 1.31 10.902 2.094 13.497c.084-.228.18-.5.283-.836c1.815-5.878 1.98-17.887 2.14-29.507c.22-16.14.503-26.139 3.448-28.226a2.44 2.44 0 0 1 2.233-.316c3.448 1.144 3.714 11.254 3.519 35.8c-.14 17.799-.313 39.952 3.323 43.603c.317.32.542.32.622.32c.17 0 .413-.161.67-.452c3.681-4.162 6.01-26.022 3.372-46.927c-.328-2.602.677-5.337 2.392-6.514c.946-.652 2.036-.736 2.978-.232c2.145 1.14 3.187 5.024 3.102 11.546c-.15 11.387 2.584 24.714 4.37 26.842c.282-.471.842-1.763 1.379-5.145c.301-1.87.799-8.153.806-8.216c.09-.71.155-1.398.217-2.097c.369-3.924.82-8.804 5.613-9.654c2.444-.435 4.583.577 5.448 2.583c.577 1.34 1.027 2.695 1.46 4.008c.332.99.664 1.98 1.046 2.959c.67 1.708 1.197 2.15 1.387 2.257c1.218-.38 2.467-4.167 2.875-5.41c.132-.402.243-.737.328-.973c.088-.228.195-.57.324-.979c1.1-3.43 2.477-7.144 4.924-7.762c.74-.191 1.9-.166 3.154 1.035c2.665 2.543 2.526 8.48 2.437 12.41q-.029.792-.033 1.583c0 6.272.931 10.655 1.641 12.16c.365-.77.994-2.63 1.601-7.007c.832-6.066.931-12.624 1.027-18.41c.159-10.24.273-17.663 3.98-19.408c.55-.339 1.467-.522 2.44-.033c3.58 1.803 5.325 11.884 5.325 30.817c.224 2.926 1.012 6.006 1.656 6.448c.008-.066.526-.39 1.399-2.01c.923-1.718 1.84-6.665 2.653-11.026c1.786-9.614 2.602-12.989 4.722-13.166c1.62-.158 2.367 1.896 2.68 2.76c.88 2.422 1.535 7.888 2.233 13.678c.534 4.49 1.304 10.902 2.092 13.497c.08-.228.176-.5.28-.836c1.813-5.878 1.976-17.887 2.138-29.507c.216-16.14.504-26.139 3.448-28.226a2.45 2.45 0 0 1 2.234-.316c3.452 1.144 3.718 11.254 3.52 35.8c-.141 17.799-.314 39.952 3.319 43.603c.324.32.544.32.63.32c.165 0 .408-.161.662-.452c3.687-4.162 6.014-26.022 3.375-46.927c-.342-2.723.43-5.47 1.84-6.526c.71-.537 1.575-.647 2.37-.313c2.054.877 3.445 4.63 4.255 11.484c.339 2.87.641 5.974.931 9.036c.641 6.683 1.509 15.69 2.684 17.67c.36-.46 1.096-1.704 2.19-5.038l2.307.753c-1.696 5.157-3.026 7.1-4.755 6.902c-2.69-.299-3.468-5.734-4.84-20.055c-.29-3.048-.59-6.132-.928-8.989c-1.03-8.74-2.782-9.532-2.801-9.54c-.342.174-1.137 1.992-.842 4.31c2.558 20.32.673 43.597-3.964 48.834c-.747.842-1.587 1.27-2.485 1.27`],[`fill`,`#53b9ff`,`d`,`M39.863 54.115L.311 93.716l60.995 61.179L0 216.385l39.428 39.619l61.43-61.507l61.097 61.068l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m140.517 154.896l-39.658 39.601l61.097 61.069l39.552-39.602z`],[`fill-opacity`,`.2`,`d`,`m140.517 154.896l-39.658 39.601l15.267 15.182z`],[`fill`,`#53b9ff`,`d`,`M194.57 100.985L256 39.478L216.431 0l-61.412 61.384L93.917.311L54.365 39.913L216.01 201.761l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m115.36 100.987l39.659-39.602L93.917.313L54.365 39.914z`],[`fill-opacity`,`.2`,`d`,`m115.359 100.985l39.659-39.601l-15.271-15.186z`],[1,`who`],[`aria-hidden`,`true`,1,`go`],[1,`sr-only`]],template:function(e,t){if(e&1&&(R(0,`section`,0)(1,`div`,1),sg(2,`span`,2)(3,`span`,3),R(4,`span`,4),sg(5,`span`,5),z(),R(6,`span`,6),sg(7,`span`,5),z(),R(8,`span`,7),sg(9,`span`,5),z(),R(10,`div`,8),A(11,ace,2,0,`:svg:svg`,9)(12,oce,11,0,`:svg:svg`,10)(13,sce,5,0,`:svg:svg`,11)(14,cce,7,0,`:svg:svg`,9),z()(),R(15,`p`,12)(16,`span`,13),K(17,`✦`),z(),K(18),z(),R(19,`h2`,14),K(20),z(),R(21,`p`,15),K(22),z(),A(23,lce,8,2,`a`,16),R(24,`h3`,17),K(25),z(),R(26,`ul`,18),M(27,uce,2,3,`li`,19,Xh),z()()),e&2){let e,n;D(11),j((e=t.info().id)===`nativescript`?11:e===`angular-native`?12:e===`analog`?13:e===`capacitor`?14:-1),D(7),J(` `,t.info().badge),D(2),q(t.info().heading),D(2),q(t.info().summary),D(),j((n=t.info().link)?23:-1,n),D(2),J(` `,t.plansTitle(),` `),D(2),N(t.info().plans)}},styles:[`[_nghost-%COMP%] { display: block; min-height: 100%; background: radial-gradient(60% 50% at 50% 18%, color-mix(in srgb, var(--%NS%brand) 22%, transparent), transparent 70%); @@ -23206,9 +23233,9 @@ h2[_ngcontent-%COMP%] { .author[_ngcontent-%COMP%]:hover .go[_ngcontent-%COMP%] { transform: none; } -}`]})},ace=new Set([`CapacitorCookies`,`CapacitorHttp`,`SystemBars`,`WebView`]);function oce(e){return e==null?`Unknown`:e?`Yes`:`No`}function sce(e,t){let n=t.size?Math.max(...t.values())+1:0;for(let r of e)t.has(r.pageId)||t.set(r.pageId,n++);let r=new Set(e.map(e=>e.pageId));for(let e of t.keys())r.has(e)||t.delete(e);return[...e].sort((e,n)=>t.get(e.pageId)-t.get(n.pageId))}function cce(e,t){let n=[...e].sort((e,t)=>t.reportedAt-e.reportedAt);return e.find(e=>e.pageId===t)?.pageId??n.find(e=>e.info.bridge)?.pageId??n[0]?.pageId??null}var Z8=new WeakMap;function lce(e){let t=e.calls;if(Array.isArray(t))return e;let n=Z8.get(e);if(!n){let r=Object.values(t??{}).filter(e=>!!e&&typeof e.id==`number`);n={...e,calls:r.sort((e,t)=>e.id-t.id)},Z8.set(e,n)}return n}function Q8(e){let t=e?.pages;return!t||typeof t!=`object`?[]:Object.values(t).filter(e=>e&&typeof e.pageId==`string`&&!!e.info).map(lce).sort((e,t)=>t.reportedAt-e.reportedAt)}function $8(e){let t=e.error;return!!t&&(t.code===`UNIMPLEMENTED`||/not implemented/i.test(t.message))}function e5(e,t){return e.durationMs===void 0?e.status===`pending`?Math.max(0,t-e.startedAt):0:e.durationMs}function t5(e,t,n){return t===`failed`?e.status===`error`:t===`pending`?e.status===`pending`:t!==`slow`||e5(e,n)>=500}function n5(e){if(e<1e3)return`${Math.max(0,Math.round(e))} ms`;let t=Math.round(e/1e3);if(t<60)return`${t} s`;let n=Math.round(t/60);return n<60?`${n} min`:`${Math.round(n/60)} h`}function uce(e,t){let n=t-e;return n<1e3?`just now`:`${n5(n)} ago`}function r5(e,t){return ace.has(e.name)?null:e.registered===!0&&!e.available?t===`android`||t===`ios`?{before:`Not available on ${t}. Run `,command:`npx cap sync ${t}`,after:`, then run the app again.`}:{before:`Not available here. Run `,command:`npx cap sync`,after:` if it should be native.`}:e.native&&e.registered===!1?{before:`Installed, not imported by the app.`}:null}function dce(e,t){let n=e.info,r=n=>e.calls.filter(e=>t5(e,n,t)).length,i=n.env.capacitorHttp;return{pageId:e.pageId,platform:n.platform,native:n.native,logsCalls:n.bridge||n.webCalls,calls:e.calls.length,failed:r(`failed`),slow:r(`slow`),pending:r(`pending`),capacitorHttp:i===null?`Unknown`:i?`On`:`Off`,hints:n.plugins.filter(e=>r5(e,n.platform)).length}}function fce(e){let t=new Map;for(let n of e){if(n.removed)continue;let e=`${n.plugin} ${n.event}`;t.set(e,(t.get(e)??0)+1)}return t}var i5=/^[A-Za-z_$][\w$]*$/;function a5(e,t=``){if(e===void 0)return`undefined`;if(typeof e!=`object`||!e)return JSON.stringify(e)??String(e);let n=`${t} `;if(Array.isArray(e))return e.length?`[\n${e.map(e=>n+a5(e,n)).join(`, +}`]})},fce=new Set([`CapacitorCookies`,`CapacitorHttp`,`SystemBars`,`WebView`]);function pce(e){return e==null?`Unknown`:e?`Yes`:`No`}function mce(e,t){let n=t.size?Math.max(...t.values())+1:0;for(let r of e)t.has(r.pageId)||t.set(r.pageId,n++);let r=new Set(e.map(e=>e.pageId));for(let e of t.keys())r.has(e)||t.delete(e);return[...e].sort((e,n)=>t.get(e.pageId)-t.get(n.pageId))}function hce(e,t){let n=[...e].sort((e,t)=>t.reportedAt-e.reportedAt);return e.find(e=>e.pageId===t)?.pageId??n.find(e=>e.info.bridge)?.pageId??n[0]?.pageId??null}var Z8=new WeakMap;function gce(e){let t=e.calls;if(Array.isArray(t))return e;let n=Z8.get(e);if(!n){let r=Object.values(t??{}).filter(e=>!!e&&typeof e.id==`number`);n={...e,calls:r.sort((e,t)=>e.id-t.id)},Z8.set(e,n)}return n}function Q8(e){let t=e?.pages;return!t||typeof t!=`object`?[]:Object.values(t).filter(e=>e&&typeof e.pageId==`string`&&!!e.info).map(gce).sort((e,t)=>t.reportedAt-e.reportedAt)}function $8(e){let t=e.error;return!!t&&(t.code===`UNIMPLEMENTED`||/not implemented/i.test(t.message))}function e5(e,t){return e.durationMs===void 0?e.status===`pending`?Math.max(0,t-e.startedAt):0:e.durationMs}function t5(e,t,n){return t===`failed`?e.status===`error`:t===`pending`?e.status===`pending`:t!==`slow`||e5(e,n)>=500}function n5(e){if(e<1e3)return`${Math.max(0,Math.round(e))} ms`;let t=Math.round(e/1e3);if(t<60)return`${t} s`;let n=Math.round(t/60);return n<60?`${n} min`:`${Math.round(n/60)} h`}function _ce(e,t){let n=t-e;return n<1e3?`just now`:`${n5(n)} ago`}function r5(e,t){return fce.has(e.name)?null:e.registered===!0&&!e.available?t===`android`||t===`ios`?{before:`Not available on ${t}. Run `,command:`npx cap sync ${t}`,after:`, then run the app again.`}:{before:`Not available here. Run `,command:`npx cap sync`,after:` if it should be native.`}:e.native&&e.registered===!1?{before:`Installed, not imported by the app.`}:null}function vce(e,t){let n=e.info,r=n=>e.calls.filter(e=>t5(e,n,t)).length,i=n.env.capacitorHttp;return{pageId:e.pageId,platform:n.platform,native:n.native,logsCalls:n.bridge||n.webCalls,calls:e.calls.length,failed:r(`failed`),slow:r(`slow`),pending:r(`pending`),capacitorHttp:i===null?`Unknown`:i?`On`:`Off`,hints:n.plugins.filter(e=>r5(e,n.platform)).length}}function yce(e){let t=new Map;for(let n of e){if(n.removed)continue;let e=`${n.plugin} ${n.event}`;t.set(e,(t.get(e)??0)+1)}return t}var i5=/^[A-Za-z_$][\w$]*$/;function a5(e,t=``){if(e===void 0)return`undefined`;if(typeof e!=`object`||!e)return JSON.stringify(e)??String(e);let n=`${t} `;if(Array.isArray(e))return e.length?`[\n${e.map(e=>n+a5(e,n)).join(`, `)},\n${t}]`:`[]`;let r=Object.entries(e);return r.length?`{\n${r.map(([e,t])=>`${n}${i5.test(e)?e:JSON.stringify(e)}: ${a5(t,n)}`).join(`, -`)},\n${t}}`:`{}`}function pce(e){let t=i5.test(e.plugin)?e.plugin:`Capacitor.Plugins[${JSON.stringify(e.plugin)}]`,n=i5.test(e.method)?`.${e.method}`:`[${JSON.stringify(e.method)}]`,r=e.args===void 0?[]:[a5(e.args)];return e.kind===`callback`&&(r.length||r.push(`{}`),r.push(`(result, error) => {}`)),`await ${t}${n}(${r.join(`, `)});`}function o5(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e,null,2)??`undefined`}catch{return String(e)}}function mce(e,t=120){let n;try{n=JSON.stringify(e)??`undefined`}catch{n=String(e)}return n.length>t?`${n.slice(0,t-1)}…`:n}function hce(e,t){if(e&1){let e=B();R(0,`button`,8),U(`click`,function(){let t=C(e).$implicit;return w(W().tab.set(t))}),K(1),z()}if(e&2){let e=t.$implicit,n=W();V(`id`,`cap-tab-`+e),k(`aria-selected`,n.tab()===e)(`aria-controls`,`cap-panel-`+e)(`tabindex`,n.tab()===e?0:-1),D(),J(` `,n.tabLabel(e),` `)}}function gce(e,t){e&1&&(R(0,`p`,9),K(1,`No arguments.`),z())}function _ce(e,t){if(e&1&&(R(0,`pre`,10),K(1),z()),e&2){let e=W(2),t=E_(0);D(),q(e.json(t.args))}}function vce(e,t){e&1&&A(0,gce,2,0,`p`,9)(1,_ce,2,1,`pre`,10),e&2&&(W(),j(E_(0).args===void 0?0:1))}function yce(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W();D(),q(e.code)}}function bce(e,t){if(e&1&&(R(0,`p`,11),A(1,yce,2,1,`code`),K(2),z()),e&2){let e=t;D(),j(e.code?1:-1),D(),J(` `,e.message,` `)}}function xce(e,t){e&1&&(R(0,`p`,9),K(1,`No answer yet.`),z())}function Sce(e,t){if(e&1&&(R(0,`p`,9),K(1),z()),e&2){W(3);let e=E_(0);D(),J(`The latest of `,e.callbacks,` callbacks.`)}}function Cce(e,t){e&1&&(R(0,`p`,9),K(1,`Resolved without a value.`),z())}function wce(e,t){if(e&1&&(R(0,`pre`,12),K(1),z()),e&2){let e=W(3),t=E_(0);D(),q(e.json(t.result))}}function Tce(e,t){if(e&1&&(A(0,Sce,2,1,`p`,9),A(1,Cce,2,0,`p`,9)(2,wce,2,1,`pre`,12)),e&2){W(2);let e=E_(0);j(e.callbacks&&e.callbacks>1?0:-1),D(),j(e.result===void 0?1:2)}}function Ece(e,t){if(e&1&&A(0,bce,3,2,`p`,11)(1,xce,2,0,`p`,9)(2,Tce,3,2),e&2){let e;W();let t=E_(0);j((e=t.error)?0:t.status===`pending`?1:2,e)}}function Dce(e,t){if(e&1&&(R(0,`div`)(1,`dt`),K(2,`Callbacks`),z(),R(3,`dd`),K(4),z()()),e&2){W(2);let e=E_(0);D(4),q(e.callbacks??0)}}function Oce(e,t){if(e&1&&(R(0,`dl`)(1,`div`)(2,`dt`),K(3,`Started`),z(),R(4,`dd`),K(5),z()(),R(6,`div`)(7,`dt`),K(8,`Finished`),z(),R(9,`dd`),K(10),z()(),R(11,`div`)(12,`dt`),K(13),z(),R(14,`dd`),K(15),z()(),A(16,Dce,5,1,`div`),z()),e&2){let e=W(),t=E_(0);D(5),q(e.time(t.startedAt)),D(5),J(` `,t.durationMs===void 0?`Not yet`:e.time(t.startedAt+t.durationMs),` `),D(3),q(t.status===`pending`?`Waiting for`:`Duration`),D(2),q(e.span(e.took(t,e.now()))),D(),j(t.kind===`callback`?16:-1)}}var s5=[`args`,`outcome`,`timing`],kce=class e{call=$.required();now=$.required();announce=Q_();host=S(kl);tab=E(`args`);tabOrder=s5;json=o5;time=GE;span=n5;took=e5;statusText=X(()=>{let e=this.call();return e.status===`pending`?`Pending`:e.status===`ok`?`OK`:$8(e)?`Not implemented`:`Error`});panelHasFocusable=X(()=>{let e=this.call();return this.tab()===`args`?e.args!==void 0:this.tab()===`outcome`&&!e.error&&e.status===`ok`&&e.result!==void 0});tabLabel(e){return e===`args`?`Arguments`:e===`timing`?`Timing`:this.call().status===`error`?`Error`:`Result`}onTabKey(e){let t=s5.indexOf(this.tab()),n;if(e.key===`ArrowRight`)n=(t+1)%s5.length;else if(e.key===`ArrowLeft`)n=(t-1+s5.length)%s5.length;else if(e.key===`Home`)n=0;else if(e.key===`End`)n=s5.length-1;else return;e.preventDefault();let r=s5[n];this.tab.set(r),this.host.nativeElement.querySelector(`#cap-tab-${r}`)?.focus()}async copy(e){let t=this.call(),n=`${t.plugin}.${t.method}()`,r=e===`json`?o5(t):pce(t);try{await navigator.clipboard.writeText(r),this.announce.emit(`Copied ${n} as ${e===`json`?`JSON`:`code`}.`)}catch{this.announce.emit(`The clipboard is not available here.`)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-capacitor-call-detail`]],inputs:{call:[1,`call`],now:[1,`now`]},outputs:{announce:`announce`},decls:19,vars:10,consts:[[`id`,`cap-detail`,`aria-labelledby`,`cap-detail-title`,1,`detail`],[`id`,`cap-detail-title`],[1,`meta`],[1,`actions`],[`type`,`button`,1,`small`,3,`click`],[`role`,`tablist`,`aria-label`,`Call details`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`muted`],[`tabindex`,`0`,`aria-label`,`Arguments`],[1,`error-text`],[`tabindex`,`0`,`aria-label`,`Result`]],template:function(e,t){if(e&1&&(w_(0),R(1,`section`,0)(2,`h3`,1)(3,`code`),K(4),z()(),R(5,`p`,2),K(6),z(),R(7,`div`,3)(8,`button`,4),U(`click`,function(){return t.copy(`json`)}),K(9,`Copy as JSON`),z(),R(10,`button`,4),U(`click`,function(){return t.copy(`code`)}),K(11,`Copy as code`),z()(),R(12,`div`,5),U(`keydown`,function(e){return t.onTabKey(e)}),M(13,hce,2,5,`button`,6,Yh),z(),R(15,`div`,7),A(16,vce,2,1)(17,Ece,3,1)(18,Oce,17,5,`dl`),z()()),e&2){let e,n=T_(t.call());D(4),Y(``,n.plugin,`.`,n.method,`()`),D(2),__(` `,t.statusText(),`, `,n.via,`, `,n.kind===`callback`?`stream`:`promise`,` `),D(7),N(t.tabOrder),D(2),V(`id`,`cap-panel-`+t.tab()),k(`aria-labelledby`,`cap-tab-`+t.tab())(`tabindex`,t.panelHasFocusable()?null:0),D(),j((e=t.tab())===`args`?16:e===`outcome`?17:e===`timing`?18:-1)}},styles:[`.detail[_ngcontent-%COMP%] { +`)},\n${t}}`:`{}`}function bce(e){let t=i5.test(e.plugin)?e.plugin:`Capacitor.Plugins[${JSON.stringify(e.plugin)}]`,n=i5.test(e.method)?`.${e.method}`:`[${JSON.stringify(e.method)}]`,r=e.args===void 0?[]:[a5(e.args)];return e.kind===`callback`&&(r.length||r.push(`{}`),r.push(`(result, error) => {}`)),`await ${t}${n}(${r.join(`, `)});`}function o5(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e,null,2)??`undefined`}catch{return String(e)}}function xce(e,t=120){let n;try{n=JSON.stringify(e)??`undefined`}catch{n=String(e)}return n.length>t?`${n.slice(0,t-1)}…`:n}function Sce(e,t){if(e&1){let e=B();R(0,`button`,8),U(`click`,function(){let t=C(e).$implicit;return w(W().tab.set(t))}),K(1),z()}if(e&2){let e=t.$implicit,n=W();V(`id`,`cap-tab-`+e),k(`aria-selected`,n.tab()===e)(`aria-controls`,`cap-panel-`+e)(`tabindex`,n.tab()===e?0:-1),D(),J(` `,n.tabLabel(e),` `)}}function Cce(e,t){e&1&&(R(0,`p`,9),K(1,`No arguments.`),z())}function wce(e,t){if(e&1&&(R(0,`pre`,10),K(1),z()),e&2){let e=W(2),t=O_(0);D(),q(e.json(t.args))}}function Tce(e,t){e&1&&A(0,Cce,2,0,`p`,9)(1,wce,2,1,`pre`,10),e&2&&(W(),j(O_(0).args===void 0?0:1))}function Ece(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W();D(),q(e.code)}}function Dce(e,t){if(e&1&&(R(0,`p`,11),A(1,Ece,2,1,`code`),K(2),z()),e&2){let e=t;D(),j(e.code?1:-1),D(),J(` `,e.message,` `)}}function Oce(e,t){e&1&&(R(0,`p`,9),K(1,`No answer yet.`),z())}function kce(e,t){if(e&1&&(R(0,`p`,9),K(1),z()),e&2){W(3);let e=O_(0);D(),J(`The latest of `,e.callbacks,` callbacks.`)}}function Ace(e,t){e&1&&(R(0,`p`,9),K(1,`Resolved without a value.`),z())}function jce(e,t){if(e&1&&(R(0,`pre`,12),K(1),z()),e&2){let e=W(3),t=O_(0);D(),q(e.json(t.result))}}function Mce(e,t){if(e&1&&(A(0,kce,2,1,`p`,9),A(1,Ace,2,0,`p`,9)(2,jce,2,1,`pre`,12)),e&2){W(2);let e=O_(0);j(e.callbacks&&e.callbacks>1?0:-1),D(),j(e.result===void 0?1:2)}}function Nce(e,t){if(e&1&&A(0,Dce,3,2,`p`,11)(1,Oce,2,0,`p`,9)(2,Mce,3,2),e&2){let e;W();let t=O_(0);j((e=t.error)?0:t.status===`pending`?1:2,e)}}function Pce(e,t){if(e&1&&(R(0,`div`)(1,`dt`),K(2,`Callbacks`),z(),R(3,`dd`),K(4),z()()),e&2){W(2);let e=O_(0);D(4),q(e.callbacks??0)}}function Fce(e,t){if(e&1&&(R(0,`dl`)(1,`div`)(2,`dt`),K(3,`Started`),z(),R(4,`dd`),K(5),z()(),R(6,`div`)(7,`dt`),K(8,`Finished`),z(),R(9,`dd`),K(10),z()(),R(11,`div`)(12,`dt`),K(13),z(),R(14,`dd`),K(15),z()(),A(16,Pce,5,1,`div`),z()),e&2){let e=W(),t=O_(0);D(5),q(e.time(t.startedAt)),D(5),J(` `,t.durationMs===void 0?`Not yet`:e.time(t.startedAt+t.durationMs),` `),D(3),q(t.status===`pending`?`Waiting for`:`Duration`),D(2),q(e.span(e.took(t,e.now()))),D(),j(t.kind===`callback`?16:-1)}}var s5=[`args`,`outcome`,`timing`],Ice=class e{call=$.required();now=$.required();announce=ev();host=S(kl);tab=E(`args`);tabOrder=s5;json=o5;time=GE;span=n5;took=e5;statusText=X(()=>{let e=this.call();return e.status===`pending`?`Pending`:e.status===`ok`?`OK`:$8(e)?`Not implemented`:`Error`});panelHasFocusable=X(()=>{let e=this.call();return this.tab()===`args`?e.args!==void 0:this.tab()===`outcome`&&!e.error&&e.status===`ok`&&e.result!==void 0});tabLabel(e){return e===`args`?`Arguments`:e===`timing`?`Timing`:this.call().status===`error`?`Error`:`Result`}onTabKey(e){let t=s5.indexOf(this.tab()),n;if(e.key===`ArrowRight`)n=(t+1)%s5.length;else if(e.key===`ArrowLeft`)n=(t-1+s5.length)%s5.length;else if(e.key===`Home`)n=0;else if(e.key===`End`)n=s5.length-1;else return;e.preventDefault();let r=s5[n];this.tab.set(r),this.host.nativeElement.querySelector(`#cap-tab-${r}`)?.focus()}async copy(e){let t=this.call(),n=`${t.plugin}.${t.method}()`,r=e===`json`?o5(t):bce(t);try{await navigator.clipboard.writeText(r),this.announce.emit(`Copied ${n} as ${e===`json`?`JSON`:`code`}.`)}catch{this.announce.emit(`The clipboard is not available here.`)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-capacitor-call-detail`]],inputs:{call:[1,`call`],now:[1,`now`]},outputs:{announce:`announce`},decls:19,vars:10,consts:[[`id`,`cap-detail`,`aria-labelledby`,`cap-detail-title`,1,`detail`],[`id`,`cap-detail-title`],[1,`meta`],[1,`actions`],[`type`,`button`,1,`small`,3,`click`],[`role`,`tablist`,`aria-label`,`Call details`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`muted`],[`tabindex`,`0`,`aria-label`,`Arguments`],[1,`error-text`],[`tabindex`,`0`,`aria-label`,`Result`]],template:function(e,t){if(e&1&&(E_(0),R(1,`section`,0)(2,`h3`,1)(3,`code`),K(4),z()(),R(5,`p`,2),K(6),z(),R(7,`div`,3)(8,`button`,4),U(`click`,function(){return t.copy(`json`)}),K(9,`Copy as JSON`),z(),R(10,`button`,4),U(`click`,function(){return t.copy(`code`)}),K(11,`Copy as code`),z()(),R(12,`div`,5),U(`keydown`,function(e){return t.onTabKey(e)}),M(13,Sce,2,5,`button`,6,Xh),z(),R(15,`div`,7),A(16,Tce,2,1)(17,Nce,3,1)(18,Fce,17,5,`dl`),z()()),e&2){let e,n=D_(t.call());D(4),Y(``,n.plugin,`.`,n.method,`()`),D(2),y_(` `,t.statusText(),`, `,n.via,`, `,n.kind===`callback`?`stream`:`promise`,` `),D(7),N(t.tabOrder),D(2),V(`id`,`cap-panel-`+t.tab()),k(`aria-labelledby`,`cap-tab-`+t.tab())(`tabindex`,t.panelHasFocusable()?null:0),D(),j((e=t.tab())===`args`?16:e===`outcome`?17:e===`timing`?18:-1)}},styles:[`.detail[_ngcontent-%COMP%] { border: 1px solid var(--%NS%border); border-radius: var(--%NS%radius); background: var(--%NS%surface); @@ -23361,7 +23388,7 @@ dd[_ngcontent-%COMP%] { margin: 0; color: var(--%NS%text); font-variant-numeric: tabular-nums; -}`]})},Ace=(e,t)=>t.plugin,jce=(e,t)=>t.label;function Mce(e,t){if(e&1&&(R(0,`span`,5),K(1),z(),K(2,` `),R(3,`span`,6),K(4,`from `),R(5,`code`),K(6),z(),K(7),z()),e&2){let e=W().$implicit,t=W(2);D(),q(e.value),D(5),q(e.from),D(),J(`, `,t.ago(e.at,t.now()))}}function Nce(e,t){e&1&&(R(0,`span`,4),K(1,`Not reported yet`),z())}function Pce(e,t){if(e&1&&(R(0,`div`)(1,`dt`),K(2),z(),R(3,`dd`),A(4,Mce,8,3)(5,Nce,2,0,`span`,4),z()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),j(e.value===null?5:4)}}function Fce(e,t){if(e&1&&(R(0,`article`,2)(1,`h3`,3)(2,`code`),K(3),z()(),R(4,`dl`),M(5,Pce,6,2,`div`,null,jce),z()()),e&2){let e=t.$implicit;k(`aria-labelledby`,`cap-state-`+e.plugin),D(),V(`id`,`cap-state-`+e.plugin),D(2),q(e.plugin),D(2),N(e.fields)}}function Ice(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function c5(e,t=e=>e){return n=>{let r=Ice(n)?n[e]:void 0;return typeof r==`string`||typeof r==`number`||typeof r==`boolean`?t(String(r)):null}}function l5(e,t,n){return[...e.map(e=>({method:e,read:n})),...t.map(e=>({event:e,read:n}))]}var Lce=[{plugin:`Foldable`,fields:[{label:`Fold state`,sources:l5([`getFoldState`],[`foldStateChange`],c5(`state`))},{label:`Posture`,sources:l5([`getFoldState`],[`foldStateChange`],c5(`posture`))},{label:`Hinge orientation`,sources:l5([`getFoldState`],[`foldStateChange`],c5(`hingeOrientation`))},{label:`Hinge angle`,sources:l5([`getHingeAngle`],[`hingeAngleChange`],c5(`angle`,e=>`${e}°`))},{label:`Active display`,sources:l5([`getFoldState`],[`foldStateChange`],c5(`activeDisplay`))},{label:`Size class`,sources:l5([`getSizeClass`],[`sizeClassChange`],e=>{let t=c5(`widthClass`)(e),n=c5(`heightClass`)(e);return!t&&!n?null:[t&&`width ${t}`,n&&`height ${n}`].filter(Boolean).join(`, `)})}]}];function Rce(e,t,n){let r=null,i=(e,t,i)=>{if(r&&r.at>=i)return;let a=n.read(e);a!==null&&(r={value:a,from:t,at:i})};if(`method`in n)for(let r of e.calls)r.plugin===t&&r.method===n.method&&r.status===`ok`&&i(r.result,`${n.method}()`,r.startedAt+(r.durationMs??0));else for(let r of e.listeners)r.plugin===t&&r.event===n.event&&r.lastEventAt!==void 0&&r.last!==void 0&&i(r.last,n.event,r.lastEventAt);return r}function zce(e,t=Lce){let n=new Set(e.info.plugins.map(e=>e.name));return t.filter(e=>n.has(e.plugin)).map(t=>({plugin:t.plugin,fields:t.fields.map(n=>{let r=null;for(let i of n.sources){let n=Rce(e,t.plugin,i);n&&(!r||n.at>r.at)&&(r=n)}let i=r;return{label:n.label,value:i?.value??null,from:i?.from??null,at:i?.at??null}})}))}var Bce=class e{cards=$.required();now=$.required();ago=uce;static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-capacitor-state`]],inputs:{cards:[1,`cards`],now:[1,`now`]},decls:5,vars:0,consts:[[1,`lead`],[1,`cards`],[1,`card`],[3,`id`],[1,`missing`],[1,`value`],[1,`source`]],template:function(e,t){e&1&&(R(0,`p`,0),K(1,` Read from the results and events the app already received. The panel calls nothing in the app. `),z(),R(2,`div`,1),M(3,Fce,7,3,`article`,2,Ace),z()),e&2&&(D(3),N(t.cards()))},styles:[`[_nghost-%COMP%] { +}`]})},Lce=(e,t)=>t.plugin,Rce=(e,t)=>t.label;function zce(e,t){if(e&1&&(R(0,`span`,5),K(1),z(),K(2,` `),R(3,`span`,6),K(4,`from `),R(5,`code`),K(6),z(),K(7),z()),e&2){let e=W().$implicit,t=W(2);D(),q(e.value),D(5),q(e.from),D(),J(`, `,t.ago(e.at,t.now()))}}function Bce(e,t){e&1&&(R(0,`span`,4),K(1,`Not reported yet`),z())}function Vce(e,t){if(e&1&&(R(0,`div`)(1,`dt`),K(2),z(),R(3,`dd`),A(4,zce,8,3)(5,Bce,2,0,`span`,4),z()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),j(e.value===null?5:4)}}function Hce(e,t){if(e&1&&(R(0,`article`,2)(1,`h3`,3)(2,`code`),K(3),z()(),R(4,`dl`),M(5,Vce,6,2,`div`,null,Rce),z()()),e&2){let e=t.$implicit;k(`aria-labelledby`,`cap-state-`+e.plugin),D(),V(`id`,`cap-state-`+e.plugin),D(2),q(e.plugin),D(2),N(e.fields)}}function Uce(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function c5(e,t=e=>e){return n=>{let r=Uce(n)?n[e]:void 0;return typeof r==`string`||typeof r==`number`||typeof r==`boolean`?t(String(r)):null}}function l5(e,t,n){return[...e.map(e=>({method:e,read:n})),...t.map(e=>({event:e,read:n}))]}var Wce=[{plugin:`Foldable`,fields:[{label:`Fold state`,sources:l5([`getFoldState`],[`foldStateChange`],c5(`state`))},{label:`Posture`,sources:l5([`getFoldState`],[`foldStateChange`],c5(`posture`))},{label:`Hinge orientation`,sources:l5([`getFoldState`],[`foldStateChange`],c5(`hingeOrientation`))},{label:`Hinge angle`,sources:l5([`getHingeAngle`],[`hingeAngleChange`],c5(`angle`,e=>`${e}°`))},{label:`Active display`,sources:l5([`getFoldState`],[`foldStateChange`],c5(`activeDisplay`))},{label:`Size class`,sources:l5([`getSizeClass`],[`sizeClassChange`],e=>{let t=c5(`widthClass`)(e),n=c5(`heightClass`)(e);return!t&&!n?null:[t&&`width ${t}`,n&&`height ${n}`].filter(Boolean).join(`, `)})}]}];function Gce(e,t,n){let r=null,i=(e,t,i)=>{if(r&&r.at>=i)return;let a=n.read(e);a!==null&&(r={value:a,from:t,at:i})};if(`method`in n)for(let r of e.calls)r.plugin===t&&r.method===n.method&&r.status===`ok`&&i(r.result,`${n.method}()`,r.startedAt+(r.durationMs??0));else for(let r of e.listeners)r.plugin===t&&r.event===n.event&&r.lastEventAt!==void 0&&r.last!==void 0&&i(r.last,n.event,r.lastEventAt);return r}function Kce(e,t=Wce){let n=new Set(e.info.plugins.map(e=>e.name));return t.filter(e=>n.has(e.plugin)).map(t=>({plugin:t.plugin,fields:t.fields.map(n=>{let r=null;for(let i of n.sources){let n=Gce(e,t.plugin,i);n&&(!r||n.at>r.at)&&(r=n)}let i=r;return{label:n.label,value:i?.value??null,from:i?.from??null,at:i?.at??null}})}))}var qce=class e{cards=$.required();now=$.required();ago=_ce;static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-capacitor-state`]],inputs:{cards:[1,`cards`],now:[1,`now`]},decls:5,vars:0,consts:[[1,`lead`],[1,`cards`],[1,`card`],[3,`id`],[1,`missing`],[1,`value`],[1,`source`]],template:function(e,t){e&1&&(R(0,`p`,0),K(1,` Read from the results and events the app already received. The panel calls nothing in the app. `),z(),R(2,`div`,1),M(3,Hce,7,3,`article`,2,Lce),z()),e&2&&(D(3),N(t.cards()))},styles:[`[_nghost-%COMP%] { display: block; } @@ -23437,7 +23464,7 @@ dd[_ngcontent-%COMP%] { .missing[_ngcontent-%COMP%] { font-style: italic; -}`]})},Vce=(e,t)=>t.filter,u5=(e,t)=>t.id,Hce=(e,t)=>t.name;function Uce(e,t){e&1&&(F(0,`p`,1),K(1,`Loading Capacitor data…`),I())}function Wce(e,t){if(e&1){let e=B();F(0,`div`,2)(1,`p`),K(2,`Can't read the Capacitor data from the devtools server.`),I(),F(3,`button`,3),H(`click`,function(){return C(e),w(W().retry())}),K(4,`Retry`),I()()}}function Gce(e,t){if(e&1){let e=B();F(0,`button`,27),H(`click`,function(){let t=C(e).$implicit;return w(W(4).pickFilter(t.filter))}),F(1,`span`,24),K(2),I(),K(3,` `),F(4,`span`,25),K(5),I()()}if(e&2){let e=t.$implicit,n=W(4);k(`data-filter`,e.filter)(`aria-pressed`,n.callFilter()===e.filter),D(2),q(e.label),D(3),q(e.count)}}function Kce(e,t){if(e&1&&M(0,Gce,6,4,`button`,26,Vce),e&2){let e=W();N(W(2).callStats(e))}}function qce(e,t){if(e&1&&(F(0,`span`,23)(1,`span`,24),K(2,`Platform`),I(),K(3,` `),F(4,`span`,25)(5,`code`),K(6),I(),K(7),I()(),A(8,Kce,2,0),F(9,`span`,23)(10,`span`,24),K(11,`CapacitorHttp`),I(),K(12,` `),F(13,`span`,25),K(14),I()(),F(15,`span`,23)(16,`span`,24),K(17,`Plugin hints`),I(),K(18,` `),F(19,`span`,25),K(20),I()()),e&2){let e=t;D(6),q(e.platform),D(),J(` `,e.native?`native`:`web`),D(),j(e.logsCalls?8:-1),D(6),q(e.capacitorHttp),D(6),q(e.hints)}}function Jce(e,t){if(e&1){let e=B();F(0,`div`,10)(1,`span`,28),K(2,`Page`),I(),F(3,`app-select`,29),H(`valueChange`,function(t){return C(e),w(W(2).selectedPageId.set(t))}),I()()}if(e&2){let e=W(),t=W();D(3),P(`options`,t.pageOptions())(`value`,e.pageId)}}function Yce(e,t){if(e&1&&(F(0,`section`,12)(1,`h2`,30),K(2,`Plugin state`),I(),L(3,`app-capacitor-state`,31),I()),e&2){let e=W(2);D(3),P(`cards`,e.stateCards())(`now`,e.now())}}function Xce(e,t){if(e&1&&(F(0,`p`,15),K(1,` Plugin calls aren't shown on this page. Native calls are logged on iOS and Android, where plugins go through the native bridge. To log calls a web implementation answers, load `),F(2,`code`),K(3,`@pangular-inspector/devtools/capacitor-hook`),I(),K(4,` before `),F(5,`code`),K(6,`@capacitor/core`),I(),K(7,`. `),F(8,`a`,32),K(9,`How to log web calls`),F(10,`span`,6),K(11,` (opens in a new tab)`),I()()()),e&2){let e=W(2);D(8),P(`href`,e.guideUrl,yu)}}function Zce(e,t){if(e&1&&(F(0,`p`,15),K(1,` Only native calls are logged. Calls a web implementation answers are left out. `),F(2,`a`,32),K(3,`How to log them too`),F(4,`span`,6),K(5,` (opens in a new tab)`),I()()()),e&2){let e=W(3);D(2),P(`href`,e.guideUrl,yu)}}function Qce(e,t){e&1&&(F(0,`p`,18),K(1,`No plugin calls yet. Use the app and they show up here.`),I())}function $ce(e,t){if(e&1){let e=B();F(0,`div`,18)(1,`p`),K(2,`No call matches the filters.`),I(),F(3,`p`,39),K(4),I(),F(5,`button`,3),H(`click`,function(){C(e),W();let t=kg(3);return W(2).clearFilters(),w(t.focus())}),K(6,` Clear filters `),I()()}if(e&2){let e=W(2),t=W();D(4),__(` `,e.calls.length,` `,e.calls.length===1?`call is`:`calls are`,` hidden by `,t.hiddenBy(),`. `)}}function ele(e,t){e&1&&(T(),L(0,`path`,46))}function tle(e,t){e&1&&(T(),L(0,`circle`,51)(1,`path`,52))}function nle(e,t){e&1&&(T(),L(0,`circle`,51)(1,`path`,53))}function rle(e,t){e&1&&(T(),L(0,`circle`,51)(1,`path`,54))}function ile(e,t){e&1&&(F(0,`span`,47),K(1,`stream`),I())}function ale(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,42),H(`focus`,function(){let t=C(e).$implicit;return w(W(4).focusedCallId.set(t.id))})(`click`,function(){let t=C(e).$implicit;return w(W(4).select(t.id))}),F(2,`code`,43),K(3),I(),F(4,`span`,44),T(),F(5,`svg`,45),A(6,ele,1,0,`:svg:path`,46)(7,tle,2,0)(8,nle,2,0)(9,rle,2,0),I(),K(10),I(),A(11,ile,2,0,`span`,47),cs(),F(12,`span`,48)(13,`span`,49),L(14,`span`),I(),K(15),I(),F(16,`span`,47),K(17),I(),F(18,`time`,50),K(19),I()()()}if(e&2){let e,n=t.$implicit,r=W(4);D(),G(`selected`,r.selected()?.id===n.id),k(`aria-pressed`,r.selected()?.id===n.id)(`tabindex`,r.tabStop()===n.id?0:-1),D(2),Y(``,n.plugin,`.`,n.method,`()`),D(),k(`data-tone`,r.tone(n)),D(2),j((e=r.tone(n))===`ok`?6:e===`danger`?7:e===`warn`?8:9),D(4),J(` `,r.statusLabel(n),` `),D(),j(n.kind===`callback`?11:-1),D(3),Xg(`width`,r.barWidth(n),`%`),D(),J(` `,r.durationText(n),` `),D(2),q(n.via),D(2),q(r.time(n.startedAt))}}function ole(e,t){if(e&1){let e=B();F(0,`app-capacitor-call-detail`,55),H(`announce`,function(t){return C(e),w(W(4).announce(t))}),I()}if(e&2){let e=W(4);P(`call`,t)(`now`,e.now())}}function sle(e,t){if(e&1){let e=B();F(0,`div`,38)(1,`ol`,40),H(`keydown`,function(t){return C(e),w(W(3).onListKey(t))}),M(2,ale,20,15,`li`,null,u5),I(),A(4,ole,1,2,`app-capacitor-call-detail`,41),I()}if(e&2){let e,t=W(3);D(2),N(t.shownCalls()),D(2),j((e=t.selected())?4:-1,e)}}function cle(e,t){if(e&1){let e=B();A(0,Zce,6,1,`p`,15),F(1,`div`,33)(2,`app-search-field`,34,0),H(`valueChange`,function(t){return C(e),w(W(2).setSearch(t))}),I(),F(4,`app-select`,35),H(`valueChange`,function(t){return C(e),w(W(2).setFilter(t))}),I(),F(5,`span`,36),K(6),I()(),L(7,`app-limit-note`,37),A(8,Qce,2,0,`p`,18)(9,$ce,7,3,`div`,18)(10,sle,5,1,`div`,38)}if(e&2){let e=W(),t=W();j(e.info.webCalls?-1:0),D(2),P(`value`,t.filter()),D(2),P(`options`,t.filterOptions)(`value`,t.callFilter()),D(2),Y(``,t.shownCalls().length,` of `,e.calls.length,` calls`),D(),P(`dropped`,e.dropped)(`max`,t.maxCalls()),D(),j(e.calls.length?t.shownCalls().length?10:9:8)}}function lle(e,t){e&1&&(F(0,`p`,18),K(1,`No plugins are registered or installed.`),I())}function ule(e,t){if(e&1&&(F(0,`code`),K(1),I()),e&2){let e=W();D(),q(e.command)}}function dle(e,t){if(e&1){let e=B();F(0,`button`,61),H(`click`,function(){C(e);let t=W();return w(W(4).copyCommand(t.command))}),K(1,` Copy `),I()}e&2&&k(`aria-label`,`Copy `+W().command)}function fle(e,t){if(e&1&&(F(0,`span`,59),K(1),A(2,ule,2,1,`code`),K(3),I(),A(4,dle,2,1,`button`,60)),e&2){let e=t;D(),q(e.before),D(),j(e.command?2:-1),D(),q(e.after),D(),j(e.command?4:-1)}}function ple(e,t){if(e&1&&(F(0,`tr`)(1,`th`,57)(2,`code`),K(3),I()(),F(4,`td`),K(5),I(),F(6,`td`),K(7),I(),F(8,`td`),K(9),I(),F(10,`td`,58),A(11,fle,5,4),I()()),e&2){let e,n=t.$implicit,r=W(2),i=W();D(3),q(n.name),D(2),q(n.available?`Yes`:`No`),D(2),q(i.yesNo(n.registered)),D(2),q(n.native?`Yes`:`No`),D(2),j((e=i.pluginHint(n,r.info.platform))?11:-1,e)}}function mle(e,t){if(e&1&&(F(0,`div`,19)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,56),K(5,`Plugin`),I(),F(6,`th`,56),K(7,`Available`),I(),F(8,`th`,56),K(9,`Imported`),I(),F(10,`th`,56),K(11,`Native`),I(),F(12,`th`,56),K(13,`Note`),I()()(),F(14,`tbody`),M(15,ple,12,5,`tr`,null,Hce),I()()()),e&2){let e=W();D(15),N(e.info.plugins)}}function hle(e,t){e&1&&(F(0,`p`,18),K(1,`No plugin listeners. They show up when the app calls addListener.`),I())}function gle(e,t){if(e&1&&(F(0,`code`,64),K(1),I()),e&2){let e=W(2).$implicit,t=W(3);D(),q(t.preview(e.last))}}function _le(e,t){e&1&&(F(0,`span`,64),K(1,`No data`),I())}function vle(e,t){if(e&1&&(A(0,gle,2,1,`code`,64)(1,_le,2,0,`span`,64),F(2,`span`,39),K(3),I()),e&2){let e=W().$implicit,t=W(3);j(+(e.last===void 0)),D(3),J(`at `,t.time(e.lastEventAt))}}function yle(e,t){e&1&&K(0,` None yet `)}function ble(e,t){if(e&1&&(F(0,`span`,63),T(),F(1,`svg`,45),L(2,`path`,65)(3,`path`,66),I(),K(4),I()),e&2){let e=W().$implicit,t=W(3);D(4),J(` `,t.leakCount(e),` active listeners: possible leak `)}}function xle(e,t){if(e&1&&(F(0,`tr`)(1,`th`,57)(2,`code`),K(3),I()(),F(4,`td`)(5,`code`),K(6),I()(),F(7,`td`),K(8),I(),F(9,`td`,62),A(10,vle,4,2)(11,yle,1,0),I(),F(12,`td`),K(13),A(14,ble,5,1,`span`,63),I()()),e&2){let e=t.$implicit,n=W(3);D(3),q(e.plugin),D(3),q(e.event),D(2),q(e.events),D(2),j(e.lastEventAt?10:11),D(3),J(` `,e.removed?`Removed`:`Active`,` `),D(),j(!e.removed&&n.leakCount(e)>1?14:-1)}}function Sle(e,t){if(e&1&&(F(0,`div`,22)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,56),K(5,`Plugin`),I(),F(6,`th`,56),K(7,`Event`),I(),F(8,`th`,56),K(9,`Events`),I(),F(10,`th`,56),K(11,`Last event`),I(),F(12,`th`,56),K(13,`State`),I()()(),F(14,`tbody`),M(15,xle,15,6,`tr`,null,u5),I()()()),e&2){let e=W();D(15),N(e.listeners)}}function Cle(e,t){if(e&1&&(F(0,`p`,4),K(1,` Plugin calls, plugins and listeners of a Capacitor app, as its WebView reports them. Values are masked like other live data. `),I(),F(2,`div`,5),A(3,qce,21,5),F(4,`span`,6),K(5),I()(),F(6,`section`,7)(7,`div`,8)(8,`h2`,9),K(9,`Environment`),I(),A(10,Jce,4,2,`div`,10),I(),F(11,`dl`)(12,`div`)(13,`dt`),K(14,`Platform`),I(),F(15,`dd`)(16,`code`),K(17),I(),K(18),I()(),F(19,`div`)(20,`dt`),K(21,`Server URL`),I(),F(22,`dd`)(23,`code`),K(24),I()()(),F(25,`div`)(26,`dt`),K(27,`CapacitorHttp`),I(),F(28,`dd`),K(29),I()(),F(30,`div`)(31,`dt`),K(32,`Calls logged`),I(),F(33,`dd`),K(34),I()(),F(35,`div`,11)(36,`dt`),K(37,`User agent`),I(),F(38,`dd`)(39,`code`),K(40),I()()()()(),A(41,Yce,4,2,`section`,12),F(42,`section`,13)(43,`h2`,14),K(44,`Plugin calls`),I(),A(45,Xce,12,1,`p`,15)(46,cle,11,9),I(),F(47,`section`,16)(48,`h2`,17),K(49,`Plugins`),I(),A(50,lle,2,0,`p`,18)(51,mle,17,0,`div`,19),I(),F(52,`section`,20)(53,`h2`,21),K(54,`Listeners`),I(),A(55,hle,2,0,`p`,18)(56,Sle,17,0,`div`,22),I()),e&2){let e,n=t,r=W();D(3),j((e=r.summary())?3:-1,e),D(2),q(r.message()),D(5),j(r.pageOptions().length>1?10:-1),D(7),q(n.info.platform),D(),J(` (`,n.info.native?`native`:`web`,`) `),D(6),q(n.info.env.serverUrl||`none`),D(5),J(` `,n.info.env.capacitorHttp===null?`Unknown`:n.info.env.capacitorHttp?`On`:`Off`,` `),D(5),q(r.loggedLabel()),D(6),q(n.info.env.userAgent||`unknown`),D(),j(r.stateCards().length?41:-1),D(4),j(!n.info.bridge&&!n.info.webCalls?45:46),D(5),j(n.info.plugins.length?51:50),D(5),j(n.listeners.length?56:55)}}function wle(e,t){e&1&&(F(0,`p`,1),K(1,` No Capacitor app reports to this server. Start the overlay in the app, then use it. `),I())}var Tle=`https://pangular-inspector.dev/inspectors/capacitor/#web-calls`,Ele=2e3,d5={all:`All calls`,failed:`Failed`,slow:`Slow (500 ms or more)`,pending:`Pending`},Dle=class e{rpc=$(null);destroyRef=S(vs);host=S(kl);injector=S(gs);seen=new Map;hostPageId=fT();unsubscribe;time=GE;preview=mce;pluginHint=r5;guideUrl=Tle;yesNo=oce;filterOptions=Object.keys(d5).map(e=>({value:e,label:d5[e]}));pages=E([]);loaded=E(!1);failed=E(!1);selectedPageId=Q({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:cce(e,this.hostPageId)});selectedCallId=E(null);focusedCallId=E(null);filter=E(``);callFilter=E(`all`);now=E(Date.now());message=E(``);page=X(()=>{let e=this.selectedPageId();return this.pages().find(t=>t.pageId===e)??null});pageOptions=X(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.info.platform})));maxCalls=X(()=>NT(this.rpc()).limits.capacitorCalls);loggedLabel=X(()=>{let e=this.page()?.info;return e?e.bridge&&e.webCalls?`Native and web`:e.bridge?`Native only`:e.webCalls?`Web only`:`None on this platform`:``});shownCalls=X(()=>{let e=this.page();if(!e)return[];let t=this.filter().trim().toLowerCase(),n=this.callFilter(),r=n===`slow`?this.now():0;return[...e.calls].filter(e=>t5(e,n,r)).filter(e=>!t||`${e.plugin}.${e.method}`.toLowerCase().includes(t)).sort((e,t)=>t.startedAt-e.startedAt)});selected=X(()=>this.shownCalls().find(e=>e.id===this.selectedCallId())??null);tabStop=X(()=>{let e=this.shownCalls();for(let t of[this.focusedCallId(),this.selectedCallId()])if(t!==null&&e.some(e=>e.id===t))return t;return e[0]?.id??null});slowest=X(()=>{let e=this.now();return Math.max(1,...this.shownCalls().map(t=>e5(t,e)))});hiddenBy=X(()=>{let e=[],t=this.filter().trim();return t&&e.push(`the search “${t}”`),this.callFilter()!==`all`&&e.push(`the ${d5[this.callFilter()]} filter`),e.join(` and `)});stateCards=X(()=>{let e=this.page();return e?zce(e):[]});leaks=X(()=>fce(this.page()?.listeners??[]));liveSummary=X(()=>{let e=this.page();return e?dce(e,this.now()):null});summary=E(null);summaryShownAt=0;summaryTimer;messageFlip=!1;constructor(){ac(()=>{let e=this.rpc();e&&this.load(e)}),ac(()=>{let e=this.liveSummary();Z(()=>this.queueSummary(e))});let e=setInterval(()=>this.now.set(Date.now()),1e3);this.destroyRef.onDestroy(()=>{clearInterval(e),clearTimeout(this.summaryTimer),this.unsubscribe?.()})}retry(){let e=this.rpc();e&&this.load(e)}callStats(e){return[{filter:`all`,label:`Calls`,count:e.calls},{filter:`failed`,label:`Failed`,count:e.failed},{filter:`slow`,label:`Slow, 500 ms+`,count:e.slow},{filter:`pending`,label:`Pending`,count:e.pending}]}select(e){this.selectedCallId.set(e),ed(()=>{globalThis.matchMedia?.(`(max-width: 880px)`).matches&&this.host.nativeElement.querySelector(`#cap-detail`)?.scrollIntoView?.({block:`nearest`})},{injector:this.injector})}onListKey(e){if(![`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key))return;let t=Array.from(this.host.nativeElement.querySelectorAll(`[data-cap-call]`));if(!t.length)return;let n=t.indexOf(document.activeElement),r=n;r=e.key===`ArrowDown`?Math.min(n+1,t.length-1):e.key===`ArrowUp`?Math.max(n-1,0):e.key===`Home`?0:t.length-1,e.preventDefault(),t[r]?.focus()}setSearch(e){e!==this.filter()&&(this.filter.set(e),this.announceCount())}setFilter(e){e!==this.callFilter()&&(this.callFilter.set(e),this.announceCount())}pickFilter(e){this.setFilter(this.callFilter()===e?`all`:e)}clearFilters(){this.filter.set(``),this.callFilter.set(`all`),this.announceCount()}announce(e){this.messageFlip=!this.messageFlip,this.message.set(this.messageFlip?`${e} `:e)}async copyCommand(e){try{await navigator.clipboard.writeText(e),this.announce(`Copied ${e}.`)}catch{this.announce(`The clipboard is not available here.`)}}leakCount(e){return this.leaks().get(`${e.plugin} ${e.event}`)??0}tone(e){return e.status===`pending`?`accent`:e.status===`ok`?`ok`:$8(e)?`warn`:`danger`}statusLabel(e){return e.status===`pending`?`Pending`:e.status===`ok`?`OK`:$8(e)?`Not implemented`:`Error`}durationText(e){return e.status===`pending`?`waiting ${n5(e5(e,this.now()))}`:e.durationMs===void 0?``:`${Math.round(e.durationMs)} ms`}barWidth(e){return Math.min(100,e5(e,this.now())/this.slowest()*100)}announceCount(){let e=this.page();e&&this.announce(`${this.shownCalls().length} of ${e.calls.length} calls shown`)}queueSummary(e){let t=this.summary();if(JSON.stringify(e)===JSON.stringify(t))return;clearTimeout(this.summaryTimer),this.summaryTimer=void 0;let n=this.summaryShownAt+Ele-Date.now();if(!t||!e||e.pageId!==t.pageId||n<=0){this.summary.set(e),this.summaryShownAt=Date.now();return}this.summaryTimer=setTimeout(()=>{this.summaryTimer=void 0,this.summary.set(this.liveSummary()),this.summaryShownAt=Date.now()},n)}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`capacitor`);if(this.destroyRef.destroyed)return;let n=e=>this.pages.set(sce(Q8(e),this.seen));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-capacitor-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`intro`],[`role`,`status`,`aria-label`,`Capacitor summary`,`aria-atomic`,`false`,1,`strip`],[1,`sr-only`],[`aria-labelledby`,`cap-env-title`,1,`env`],[1,`env-head`],[`id`,`cap-env-title`],[1,`page-picker`],[1,`wide`],[`aria-labelledby`,`cap-state-title`],[`aria-labelledby`,`cap-calls-title`],[`id`,`cap-calls-title`],[1,`notice`],[`aria-labelledby`,`cap-plugins-title`],[`id`,`cap-plugins-title`],[1,`empty`],[`tabindex`,`0`,`role`,`group`,`aria-label`,`Plugins table`,1,`table-wrap`],[`aria-labelledby`,`cap-listeners-title`],[`id`,`cap-listeners-title`],[`tabindex`,`0`,`role`,`group`,`aria-label`,`Listeners table`,1,`table-wrap`],[`aria-atomic`,`true`,1,`stat`],[1,`stat-label`],[1,`stat-value`],[`type`,`button`,`aria-atomic`,`true`,1,`stat`],[`type`,`button`,`aria-atomic`,`true`,1,`stat`,3,`click`],[`id`,`cap-page-label`,1,`label-key`],[`labelledBy`,`cap-page-label`,3,`valueChange`,`options`,`value`],[`id`,`cap-state-title`],[3,`cards`,`now`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`toolbar`],[`placeholder`,`Filter by plugin or method`,`saveKey`,`capacitor`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Show calls`,1,`show`,3,`valueChange`,`options`,`value`],[1,`count`],[`what`,`plugin calls`,`limit`,`capacitorCalls`,3,`dropped`,`max`],[1,`split`],[1,`muted`],[`aria-label`,`Plugin calls, newest first`,1,`calls`,3,`keydown`],[3,`call`,`now`],[`type`,`button`,`data-cap-call`,``,1,`call`,3,`focus`,`click`],[1,`name`],[1,`chip`,`status`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M20 6 9 17l-5-5`],[1,`chip`,`via`],[1,`duration`],[`aria-hidden`,`true`,1,`bar`],[1,`when`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`m15 9-6 6M9 9l6 6`],[`d`,`M5.6 5.6l12.8 12.8`],[`d`,`M12 7v5l3 2`],[3,`announce`,`call`,`now`],[`scope`,`col`],[`scope`,`row`],[1,`note`],[1,`hint`],[`type`,`button`,1,`copy`],[`type`,`button`,1,`copy`,3,`click`],[1,`last`],[`data-tone`,`warn`,1,`chip`,`leak`],[1,`payload`],[`d`,`M12 3 2 21h20z`],[`d`,`M12 10v4M12 17.5v.01`]],template:function(e,t){if(e&1&&A(0,Uce,2,0,`p`,1)(1,Wce,5,0,`div`,2)(2,Cle,57,13)(3,wle,2,0,`p`,1),e&2){let e;j(t.loaded()?t.failed()?1:(e=t.page())?2:3:0,e)}},dependencies:[nP,eO,OD,kce,Bce],styles:[`[_nghost-%COMP%] { +}`]})},Jce=(e,t)=>t.filter,u5=(e,t)=>t.id,Yce=(e,t)=>t.name;function Xce(e,t){e&1&&(F(0,`p`,1),K(1,`Loading Capacitor data…`),I())}function Zce(e,t){if(e&1){let e=B();F(0,`div`,2)(1,`p`),K(2,`Can't read the Capacitor data from the devtools server.`),I(),F(3,`button`,3),H(`click`,function(){return C(e),w(W().retry())}),K(4,`Retry`),I()()}}function Qce(e,t){if(e&1){let e=B();F(0,`button`,27),H(`click`,function(){let t=C(e).$implicit;return w(W(4).pickFilter(t.filter))}),F(1,`span`,24),K(2),I(),K(3,` `),F(4,`span`,25),K(5),I()()}if(e&2){let e=t.$implicit,n=W(4);k(`data-filter`,e.filter)(`aria-pressed`,n.callFilter()===e.filter),D(2),q(e.label),D(3),q(e.count)}}function $ce(e,t){if(e&1&&M(0,Qce,6,4,`button`,26,Jce),e&2){let e=W();N(W(2).callStats(e))}}function ele(e,t){if(e&1&&(F(0,`span`,23)(1,`span`,24),K(2,`Platform`),I(),K(3,` `),F(4,`span`,25)(5,`code`),K(6),I(),K(7),I()(),A(8,$ce,2,0),F(9,`span`,23)(10,`span`,24),K(11,`CapacitorHttp`),I(),K(12,` `),F(13,`span`,25),K(14),I()(),F(15,`span`,23)(16,`span`,24),K(17,`Plugin hints`),I(),K(18,` `),F(19,`span`,25),K(20),I()()),e&2){let e=t;D(6),q(e.platform),D(),J(` `,e.native?`native`:`web`),D(),j(e.logsCalls?8:-1),D(6),q(e.capacitorHttp),D(6),q(e.hints)}}function tle(e,t){if(e&1){let e=B();F(0,`div`,10)(1,`span`,28),K(2,`Page`),I(),F(3,`app-select`,29),H(`valueChange`,function(t){return C(e),w(W(2).selectedPageId.set(t))}),I()()}if(e&2){let e=W(),t=W();D(3),P(`options`,t.pageOptions())(`value`,e.pageId)}}function nle(e,t){if(e&1&&(F(0,`section`,12)(1,`h2`,30),K(2,`Plugin state`),I(),L(3,`app-capacitor-state`,31),I()),e&2){let e=W(2);D(3),P(`cards`,e.stateCards())(`now`,e.now())}}function rle(e,t){if(e&1&&(F(0,`p`,15),K(1,` Plugin calls aren't shown on this page. Native calls are logged on iOS and Android, where plugins go through the native bridge. To log calls a web implementation answers, load `),F(2,`code`),K(3,`@pangular-inspector/devtools/capacitor-hook`),I(),K(4,` before `),F(5,`code`),K(6,`@capacitor/core`),I(),K(7,`. `),F(8,`a`,32),K(9,`How to log web calls`),F(10,`span`,6),K(11,` (opens in a new tab)`),I()()()),e&2){let e=W(2);D(8),P(`href`,e.guideUrl,bu)}}function ile(e,t){if(e&1&&(F(0,`p`,15),K(1,` Only native calls are logged. Calls a web implementation answers are left out. `),F(2,`a`,32),K(3,`How to log them too`),F(4,`span`,6),K(5,` (opens in a new tab)`),I()()()),e&2){let e=W(3);D(2),P(`href`,e.guideUrl,bu)}}function ale(e,t){e&1&&(F(0,`p`,18),K(1,`No plugin calls yet. Use the app and they show up here.`),I())}function ole(e,t){if(e&1){let e=B();F(0,`div`,18)(1,`p`),K(2,`No call matches the filters.`),I(),F(3,`p`,39),K(4),I(),F(5,`button`,3),H(`click`,function(){C(e),W();let t=Ag(3);return W(2).clearFilters(),w(t.focus())}),K(6,` Clear filters `),I()()}if(e&2){let e=W(2),t=W();D(4),y_(` `,e.calls.length,` `,e.calls.length===1?`call is`:`calls are`,` hidden by `,t.hiddenBy(),`. `)}}function sle(e,t){e&1&&(T(),L(0,`path`,46))}function cle(e,t){e&1&&(T(),L(0,`circle`,51)(1,`path`,52))}function lle(e,t){e&1&&(T(),L(0,`circle`,51)(1,`path`,53))}function ule(e,t){e&1&&(T(),L(0,`circle`,51)(1,`path`,54))}function dle(e,t){e&1&&(F(0,`span`,47),K(1,`stream`),I())}function fle(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,42),H(`focus`,function(){let t=C(e).$implicit;return w(W(4).focusedCallId.set(t.id))})(`click`,function(){let t=C(e).$implicit;return w(W(4).select(t.id))}),F(2,`code`,43),K(3),I(),F(4,`span`,44),T(),F(5,`svg`,45),A(6,sle,1,0,`:svg:path`,46)(7,cle,2,0)(8,lle,2,0)(9,ule,2,0),I(),K(10),I(),A(11,dle,2,0,`span`,47),cs(),F(12,`span`,48)(13,`span`,49),L(14,`span`),I(),K(15),I(),F(16,`span`,47),K(17),I(),F(18,`time`,50),K(19),I()()()}if(e&2){let e,n=t.$implicit,r=W(4);D(),G(`selected`,r.selected()?.id===n.id),k(`aria-pressed`,r.selected()?.id===n.id)(`tabindex`,r.tabStop()===n.id?0:-1),D(2),Y(``,n.plugin,`.`,n.method,`()`),D(),k(`data-tone`,r.tone(n)),D(2),j((e=r.tone(n))===`ok`?6:e===`danger`?7:e===`warn`?8:9),D(4),J(` `,r.statusLabel(n),` `),D(),j(n.kind===`callback`?11:-1),D(3),Zg(`width`,r.barWidth(n),`%`),D(),J(` `,r.durationText(n),` `),D(2),q(n.via),D(2),q(r.time(n.startedAt))}}function ple(e,t){if(e&1){let e=B();F(0,`app-capacitor-call-detail`,55),H(`announce`,function(t){return C(e),w(W(4).announce(t))}),I()}if(e&2){let e=W(4);P(`call`,t)(`now`,e.now())}}function mle(e,t){if(e&1){let e=B();F(0,`div`,38)(1,`ol`,40),H(`keydown`,function(t){return C(e),w(W(3).onListKey(t))}),M(2,fle,20,15,`li`,null,u5),I(),A(4,ple,1,2,`app-capacitor-call-detail`,41),I()}if(e&2){let e,t=W(3);D(2),N(t.shownCalls()),D(2),j((e=t.selected())?4:-1,e)}}function hle(e,t){if(e&1){let e=B();A(0,ile,6,1,`p`,15),F(1,`div`,33)(2,`app-search-field`,34,0),H(`valueChange`,function(t){return C(e),w(W(2).setSearch(t))}),I(),F(4,`app-select`,35),H(`valueChange`,function(t){return C(e),w(W(2).setFilter(t))}),I(),F(5,`span`,36),K(6),I()(),L(7,`app-limit-note`,37),A(8,ale,2,0,`p`,18)(9,ole,7,3,`div`,18)(10,mle,5,1,`div`,38)}if(e&2){let e=W(),t=W();j(e.info.webCalls?-1:0),D(2),P(`value`,t.filter()),D(2),P(`options`,t.filterOptions)(`value`,t.callFilter()),D(2),Y(``,t.shownCalls().length,` of `,e.calls.length,` calls`),D(),P(`dropped`,e.dropped)(`max`,t.maxCalls()),D(),j(e.calls.length?t.shownCalls().length?10:9:8)}}function gle(e,t){e&1&&(F(0,`p`,18),K(1,`No plugins are registered or installed.`),I())}function _le(e,t){if(e&1&&(F(0,`code`),K(1),I()),e&2){let e=W();D(),q(e.command)}}function vle(e,t){if(e&1){let e=B();F(0,`button`,61),H(`click`,function(){C(e);let t=W();return w(W(4).copyCommand(t.command))}),K(1,` Copy `),I()}e&2&&k(`aria-label`,`Copy `+W().command)}function yle(e,t){if(e&1&&(F(0,`span`,59),K(1),A(2,_le,2,1,`code`),K(3),I(),A(4,vle,2,1,`button`,60)),e&2){let e=t;D(),q(e.before),D(),j(e.command?2:-1),D(),q(e.after),D(),j(e.command?4:-1)}}function ble(e,t){if(e&1&&(F(0,`tr`)(1,`th`,57)(2,`code`),K(3),I()(),F(4,`td`),K(5),I(),F(6,`td`),K(7),I(),F(8,`td`),K(9),I(),F(10,`td`,58),A(11,yle,5,4),I()()),e&2){let e,n=t.$implicit,r=W(2),i=W();D(3),q(n.name),D(2),q(n.available?`Yes`:`No`),D(2),q(i.yesNo(n.registered)),D(2),q(n.native?`Yes`:`No`),D(2),j((e=i.pluginHint(n,r.info.platform))?11:-1,e)}}function xle(e,t){if(e&1&&(F(0,`div`,19)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,56),K(5,`Plugin`),I(),F(6,`th`,56),K(7,`Available`),I(),F(8,`th`,56),K(9,`Imported`),I(),F(10,`th`,56),K(11,`Native`),I(),F(12,`th`,56),K(13,`Note`),I()()(),F(14,`tbody`),M(15,ble,12,5,`tr`,null,Yce),I()()()),e&2){let e=W();D(15),N(e.info.plugins)}}function Sle(e,t){e&1&&(F(0,`p`,18),K(1,`No plugin listeners. They show up when the app calls addListener.`),I())}function Cle(e,t){if(e&1&&(F(0,`code`,64),K(1),I()),e&2){let e=W(2).$implicit,t=W(3);D(),q(t.preview(e.last))}}function wle(e,t){e&1&&(F(0,`span`,64),K(1,`No data`),I())}function Tle(e,t){if(e&1&&(A(0,Cle,2,1,`code`,64)(1,wle,2,0,`span`,64),F(2,`span`,39),K(3),I()),e&2){let e=W().$implicit,t=W(3);j(+(e.last===void 0)),D(3),J(`at `,t.time(e.lastEventAt))}}function Ele(e,t){e&1&&K(0,` None yet `)}function Dle(e,t){if(e&1&&(F(0,`span`,63),T(),F(1,`svg`,45),L(2,`path`,65)(3,`path`,66),I(),K(4),I()),e&2){let e=W().$implicit,t=W(3);D(4),J(` `,t.leakCount(e),` active listeners: possible leak `)}}function Ole(e,t){if(e&1&&(F(0,`tr`)(1,`th`,57)(2,`code`),K(3),I()(),F(4,`td`)(5,`code`),K(6),I()(),F(7,`td`),K(8),I(),F(9,`td`,62),A(10,Tle,4,2)(11,Ele,1,0),I(),F(12,`td`),K(13),A(14,Dle,5,1,`span`,63),I()()),e&2){let e=t.$implicit,n=W(3);D(3),q(e.plugin),D(3),q(e.event),D(2),q(e.events),D(2),j(e.lastEventAt?10:11),D(3),J(` `,e.removed?`Removed`:`Active`,` `),D(),j(!e.removed&&n.leakCount(e)>1?14:-1)}}function kle(e,t){if(e&1&&(F(0,`div`,22)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,56),K(5,`Plugin`),I(),F(6,`th`,56),K(7,`Event`),I(),F(8,`th`,56),K(9,`Events`),I(),F(10,`th`,56),K(11,`Last event`),I(),F(12,`th`,56),K(13,`State`),I()()(),F(14,`tbody`),M(15,Ole,15,6,`tr`,null,u5),I()()()),e&2){let e=W();D(15),N(e.listeners)}}function Ale(e,t){if(e&1&&(F(0,`p`,4),K(1,` Plugin calls, plugins and listeners of a Capacitor app, as its WebView reports them. Values are masked like other live data. `),I(),F(2,`div`,5),A(3,ele,21,5),F(4,`span`,6),K(5),I()(),F(6,`section`,7)(7,`div`,8)(8,`h2`,9),K(9,`Environment`),I(),A(10,tle,4,2,`div`,10),I(),F(11,`dl`)(12,`div`)(13,`dt`),K(14,`Platform`),I(),F(15,`dd`)(16,`code`),K(17),I(),K(18),I()(),F(19,`div`)(20,`dt`),K(21,`Server URL`),I(),F(22,`dd`)(23,`code`),K(24),I()()(),F(25,`div`)(26,`dt`),K(27,`CapacitorHttp`),I(),F(28,`dd`),K(29),I()(),F(30,`div`)(31,`dt`),K(32,`Calls logged`),I(),F(33,`dd`),K(34),I()(),F(35,`div`,11)(36,`dt`),K(37,`User agent`),I(),F(38,`dd`)(39,`code`),K(40),I()()()()(),A(41,nle,4,2,`section`,12),F(42,`section`,13)(43,`h2`,14),K(44,`Plugin calls`),I(),A(45,rle,12,1,`p`,15)(46,hle,11,9),I(),F(47,`section`,16)(48,`h2`,17),K(49,`Plugins`),I(),A(50,gle,2,0,`p`,18)(51,xle,17,0,`div`,19),I(),F(52,`section`,20)(53,`h2`,21),K(54,`Listeners`),I(),A(55,Sle,2,0,`p`,18)(56,kle,17,0,`div`,22),I()),e&2){let e,n=t,r=W();D(3),j((e=r.summary())?3:-1,e),D(2),q(r.message()),D(5),j(r.pageOptions().length>1?10:-1),D(7),q(n.info.platform),D(),J(` (`,n.info.native?`native`:`web`,`) `),D(6),q(n.info.env.serverUrl||`none`),D(5),J(` `,n.info.env.capacitorHttp===null?`Unknown`:n.info.env.capacitorHttp?`On`:`Off`,` `),D(5),q(r.loggedLabel()),D(6),q(n.info.env.userAgent||`unknown`),D(),j(r.stateCards().length?41:-1),D(4),j(!n.info.bridge&&!n.info.webCalls?45:46),D(5),j(n.info.plugins.length?51:50),D(5),j(n.listeners.length?56:55)}}function jle(e,t){e&1&&(F(0,`p`,1),K(1,` No Capacitor app reports to this server. Start the overlay in the app, then use it. `),I())}var Mle=`https://pangular-inspector.dev/inspectors/capacitor/#web-calls`,Nle=2e3,d5={all:`All calls`,failed:`Failed`,slow:`Slow (500 ms or more)`,pending:`Pending`},Ple=class e{rpc=$(null);destroyRef=S(vs);host=S(kl);injector=S(gs);seen=new Map;hostPageId=fT();unsubscribe;time=GE;preview=xce;pluginHint=r5;guideUrl=Mle;yesNo=pce;filterOptions=Object.keys(d5).map(e=>({value:e,label:d5[e]}));pages=E([]);loaded=E(!1);failed=E(!1);selectedPageId=Q({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:hce(e,this.hostPageId)});selectedCallId=E(null);focusedCallId=E(null);filter=E(``);callFilter=E(`all`);now=E(Date.now());message=E(``);page=X(()=>{let e=this.selectedPageId();return this.pages().find(t=>t.pageId===e)??null});pageOptions=X(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.info.platform})));maxCalls=X(()=>NT(this.rpc()).limits.capacitorCalls);loggedLabel=X(()=>{let e=this.page()?.info;return e?e.bridge&&e.webCalls?`Native and web`:e.bridge?`Native only`:e.webCalls?`Web only`:`None on this platform`:``});shownCalls=X(()=>{let e=this.page();if(!e)return[];let t=this.filter().trim().toLowerCase(),n=this.callFilter(),r=n===`slow`?this.now():0;return[...e.calls].filter(e=>t5(e,n,r)).filter(e=>!t||`${e.plugin}.${e.method}`.toLowerCase().includes(t)).sort((e,t)=>t.startedAt-e.startedAt)});selected=X(()=>this.shownCalls().find(e=>e.id===this.selectedCallId())??null);tabStop=X(()=>{let e=this.shownCalls();for(let t of[this.focusedCallId(),this.selectedCallId()])if(t!==null&&e.some(e=>e.id===t))return t;return e[0]?.id??null});slowest=X(()=>{let e=this.now();return Math.max(1,...this.shownCalls().map(t=>e5(t,e)))});hiddenBy=X(()=>{let e=[],t=this.filter().trim();return t&&e.push(`the search “${t}”`),this.callFilter()!==`all`&&e.push(`the ${d5[this.callFilter()]} filter`),e.join(` and `)});stateCards=X(()=>{let e=this.page();return e?Kce(e):[]});leaks=X(()=>yce(this.page()?.listeners??[]));liveSummary=X(()=>{let e=this.page();return e?vce(e,this.now()):null});summary=E(null);summaryShownAt=0;summaryTimer;messageFlip=!1;constructor(){ac(()=>{let e=this.rpc();e&&this.load(e)}),ac(()=>{let e=this.liveSummary();Z(()=>this.queueSummary(e))});let e=setInterval(()=>this.now.set(Date.now()),1e3);this.destroyRef.onDestroy(()=>{clearInterval(e),clearTimeout(this.summaryTimer),this.unsubscribe?.()})}retry(){let e=this.rpc();e&&this.load(e)}callStats(e){return[{filter:`all`,label:`Calls`,count:e.calls},{filter:`failed`,label:`Failed`,count:e.failed},{filter:`slow`,label:`Slow, 500 ms+`,count:e.slow},{filter:`pending`,label:`Pending`,count:e.pending}]}select(e){this.selectedCallId.set(e),td(()=>{globalThis.matchMedia?.(`(max-width: 880px)`).matches&&this.host.nativeElement.querySelector(`#cap-detail`)?.scrollIntoView?.({block:`nearest`})},{injector:this.injector})}onListKey(e){if(![`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key))return;let t=Array.from(this.host.nativeElement.querySelectorAll(`[data-cap-call]`));if(!t.length)return;let n=t.indexOf(document.activeElement),r=n;r=e.key===`ArrowDown`?Math.min(n+1,t.length-1):e.key===`ArrowUp`?Math.max(n-1,0):e.key===`Home`?0:t.length-1,e.preventDefault(),t[r]?.focus()}setSearch(e){e!==this.filter()&&(this.filter.set(e),this.announceCount())}setFilter(e){e!==this.callFilter()&&(this.callFilter.set(e),this.announceCount())}pickFilter(e){this.setFilter(this.callFilter()===e?`all`:e)}clearFilters(){this.filter.set(``),this.callFilter.set(`all`),this.announceCount()}announce(e){this.messageFlip=!this.messageFlip,this.message.set(this.messageFlip?`${e} `:e)}async copyCommand(e){try{await navigator.clipboard.writeText(e),this.announce(`Copied ${e}.`)}catch{this.announce(`The clipboard is not available here.`)}}leakCount(e){return this.leaks().get(`${e.plugin} ${e.event}`)??0}tone(e){return e.status===`pending`?`accent`:e.status===`ok`?`ok`:$8(e)?`warn`:`danger`}statusLabel(e){return e.status===`pending`?`Pending`:e.status===`ok`?`OK`:$8(e)?`Not implemented`:`Error`}durationText(e){return e.status===`pending`?`waiting ${n5(e5(e,this.now()))}`:e.durationMs===void 0?``:`${Math.round(e.durationMs)} ms`}barWidth(e){return Math.min(100,e5(e,this.now())/this.slowest()*100)}announceCount(){let e=this.page();e&&this.announce(`${this.shownCalls().length} of ${e.calls.length} calls shown`)}queueSummary(e){let t=this.summary();if(JSON.stringify(e)===JSON.stringify(t))return;clearTimeout(this.summaryTimer),this.summaryTimer=void 0;let n=this.summaryShownAt+Nle-Date.now();if(!t||!e||e.pageId!==t.pageId||n<=0){this.summary.set(e),this.summaryShownAt=Date.now();return}this.summaryTimer=setTimeout(()=>{this.summaryTimer=void 0,this.summary.set(this.liveSummary()),this.summaryShownAt=Date.now()},n)}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`capacitor`);if(this.destroyRef.destroyed)return;let n=e=>this.pages.set(mce(Q8(e),this.seen));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-capacitor-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`intro`],[`role`,`status`,`aria-label`,`Capacitor summary`,`aria-atomic`,`false`,1,`strip`],[1,`sr-only`],[`aria-labelledby`,`cap-env-title`,1,`env`],[1,`env-head`],[`id`,`cap-env-title`],[1,`page-picker`],[1,`wide`],[`aria-labelledby`,`cap-state-title`],[`aria-labelledby`,`cap-calls-title`],[`id`,`cap-calls-title`],[1,`notice`],[`aria-labelledby`,`cap-plugins-title`],[`id`,`cap-plugins-title`],[1,`empty`],[`tabindex`,`0`,`role`,`group`,`aria-label`,`Plugins table`,1,`table-wrap`],[`aria-labelledby`,`cap-listeners-title`],[`id`,`cap-listeners-title`],[`tabindex`,`0`,`role`,`group`,`aria-label`,`Listeners table`,1,`table-wrap`],[`aria-atomic`,`true`,1,`stat`],[1,`stat-label`],[1,`stat-value`],[`type`,`button`,`aria-atomic`,`true`,1,`stat`],[`type`,`button`,`aria-atomic`,`true`,1,`stat`,3,`click`],[`id`,`cap-page-label`,1,`label-key`],[`labelledBy`,`cap-page-label`,3,`valueChange`,`options`,`value`],[`id`,`cap-state-title`],[3,`cards`,`now`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`toolbar`],[`placeholder`,`Filter by plugin or method`,`saveKey`,`capacitor`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Show calls`,1,`show`,3,`valueChange`,`options`,`value`],[1,`count`],[`what`,`plugin calls`,`limit`,`capacitorCalls`,3,`dropped`,`max`],[1,`split`],[1,`muted`],[`aria-label`,`Plugin calls, newest first`,1,`calls`,3,`keydown`],[3,`call`,`now`],[`type`,`button`,`data-cap-call`,``,1,`call`,3,`focus`,`click`],[1,`name`],[1,`chip`,`status`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M20 6 9 17l-5-5`],[1,`chip`,`via`],[1,`duration`],[`aria-hidden`,`true`,1,`bar`],[1,`when`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`m15 9-6 6M9 9l6 6`],[`d`,`M5.6 5.6l12.8 12.8`],[`d`,`M12 7v5l3 2`],[3,`announce`,`call`,`now`],[`scope`,`col`],[`scope`,`row`],[1,`note`],[1,`hint`],[`type`,`button`,1,`copy`],[`type`,`button`,1,`copy`,3,`click`],[1,`last`],[`data-tone`,`warn`,1,`chip`,`leak`],[1,`payload`],[`d`,`M12 3 2 21h20z`],[`d`,`M12 10v4M12 17.5v.01`]],template:function(e,t){if(e&1&&A(0,Xce,2,0,`p`,1)(1,Zce,5,0,`div`,2)(2,Ale,57,13)(3,jle,2,0,`p`,1),e&2){let e;j(t.loaded()?t.failed()?1:(e=t.page())?2:3:0,e)}},dependencies:[nP,eO,OD,Ice,qce],styles:[`[_nghost-%COMP%] { display: block; font-size: 13px; } @@ -23920,7 +23947,7 @@ td.last[_ngcontent-%COMP%] { .empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .state[_ngcontent-%COMP%] p[_ngcontent-%COMP%] { margin: 0 0 8px; -}`]})};function f5(e,t,n=600){let r=E(``),i=!0,a;return ac(()=>{if(e(),i){i=!1;return}clearTimeout(a),a=setTimeout(()=>{let e=Z(t);r.update(t=>t===e?`${e} `:e)},n)}),S(vs).onDestroy(()=>clearTimeout(a)),r.asReadonly()}var Ole=[`log`,`info`,`warn`,`error`,`debug`];function kle(e){return e.split("`").map((e,t)=>({code:t%2==1,text:e})).filter(e=>e.text)}var Ale={handler:`ErrorHandler`,window:`Uncaught`,promise:`Unhandled rejection`};function p5(e){return!!e&&typeof e==`object`}function jle(e){let t=p5(e)?e.pages:void 0;return p5(t)?Object.values(t).filter(e=>p5(e)&&typeof e.pageId==`string`).map(e=>({pageId:e.pageId,url:typeof e.url==`string`?e.url:``,title:typeof e.title==`string`?e.title:``,reportedAt:typeof e.reportedAt==`number`?e.reportedAt:0,handler:e.handler===`wrapped`?`wrapped`:`none`,errors:p5(e.errors)?Object.values(e.errors):[],console:p5(e.console)?Object.values(e.console).sort((e,t)=>e.id-t.id):[],dropped:p5(e.dropped)?{errors:Number(e.dropped.errors)||0,console:Number(e.dropped.console)||0}:{errors:0,console:0}})).sort((e,t)=>t.reportedAt-e.reportedAt):[]}function Mle(e,t){return t&&e.some(e=>e.pageId===t)?t:e.length>1?`all`:e[0]?.pageId??`all`}function Nle(e,t){return e.filter(e=>t===`all`||e.pageId===t).flatMap(e=>e.errors.map(t=>({...t,pageId:e.pageId}))).sort((e,t)=>t.lastAt-e.lastAt)}function Ple(e,t){return e.filter(e=>t===`all`||e.pageId===t).flatMap(e=>e.console.map(t=>({...t,pageId:e.pageId}))).sort((e,t)=>t.at-e.at||t.id-e.id)}function Fle(e,t){return t?.startsWith(`https://angular.dev/errors/`)?{code:e,href:t}:{code:e}}var Ile=(e,t)=>t.signal+t.at,Lle=(e,t)=>t.id+e;function Rle(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W();D(),q(e.binding)}}function zle(e,t){e&1&&(R(0,`span`,2),K(1,`A text interpolation (Angular doesn't name it)`),z())}function Ble(e,t){if(e&1&&(R(0,`span`,2),K(1,` in `),z(),R(2,`code`),K(3),z()),e&2){let e=W();D(3),q(e.template)}}function Vle(e,t){if(e&1&&(R(0,`code`),K(1),z(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;D(),q(e),D(),J(``,n===r-1?``:`, `,` `)}}function Hle(e,t){if(e&1&&(R(0,`dt`),K(1,`Held by`),z(),R(2,`dd`),M(3,Vle,3,2,null,null,Yh),z()),e&2){let e=W();D(3),N(e.members)}}function Ule(e,t){e&1&&(R(0,`p`,4),K(1,` Values are hidden: the binding or a field that holds them has a secret-looking name. `),z())}function Wle(e,t){e&1&&(R(0,`p`,4),K(1,` Angular says this view was created after its parent was checked, so a change detection hook such as `),R(2,`code`),K(3,`ngAfterViewInit`),z(),K(4,` created it. `),z())}function Gle(e,t){if(e&1&&(R(0,`li`)(1,`code`),K(2),z()()),e&2){let e=t.$implicit;D(2),q(e)}}function Kle(e,t){if(e&1&&(R(0,`ol`,6),M(1,Gle,3,1,`li`,null,Jh),z()),e&2){let e=W().$implicit;D(),N(e.stack)}}function qle(e,t){e&1&&(R(0,`span`,2),K(1,` (turn on write stacks in the Signals tab and reproduce to see the code)`),z())}function Jle(e,t){if(e&1&&(R(0,`li`),K(1,` Signal `),R(2,`code`),K(3),z(),K(4),A(5,Kle,3,0,`ol`,6)(6,qle,2,0,`span`,2),z()),e&2){let e=t.$implicit,n=W(4);D(3),q(e.signal),D(),J(` at `,n.time(e.at),` `),D(),j(e.stack?.length?5:6)}}function Yle(e,t){if(e&1&&(R(0,`h4`,0),K(1,`Written by`),z(),R(2,`ul`,5),M(3,Jle,7,3,`li`,null,Ile),z()),e&2){let e=W();D(3),N(e.writes)}}function Xle(e,t){e&1&&(R(0,`p`,4),K(1,` No named signal was written with this value just before the check. Look for code that sets a field the template reads during change detection, such as `),R(2,`code`),K(3,`ngAfterViewInit`),z(),K(4,`, a getter that returns a new value each time, or a child that changes its parent. `),z())}function Zle(e,t){e&1&&(R(0,`p`,4),K(1,` Where it was written is unknown: the page doesn't report signal writes (the Signals inspector is off, or Angular is older than 17). `),z())}function Qle(e,t){if(e&1&&(R(0,`h3`,0),K(1,`What changed`),z(),R(2,`dl`,1)(3,`dt`),K(4,`Binding`),z(),R(5,`dd`),A(6,Rle,2,1,`code`)(7,zle,2,0,`span`,2),A(8,Ble,4,1),z(),R(9,`dt`),K(10,`Previous`),z(),R(11,`dd`)(12,`code`,3),K(13),z()(),R(14,`dt`),K(15,`Current`),z(),R(16,`dd`)(17,`code`,3),K(18),z()(),A(19,Hle,5,0),z(),A(20,Ule,2,0,`p`,4),A(21,Wle,5,0,`p`,4),A(22,Yle,5,0)(23,Xle,5,0,`p`,4)(24,Zle,2,0,`p`,4)),e&2){let e=t;D(6),j(e.binding?6:7),D(2),j(e.template?8:-1),D(5),q(e.previous),D(5),q(e.current),D(),j(e.members?.length?19:-1),D(),j(e.masked?20:-1),D(),j(e.creation?21:-1),D(),j(e.writes?.length?22:e.writesKnown?23:24)}}function $le(e,t){if(e&1&&A(0,Qle,25,8),e&2){let e;j((e=W().changed())?0:-1,e)}}function eue(e,t){if(e&1&&(R(0,`p`,7),K(1),z()),e&2){let e=W();D(),q(e.summary)}}function tue(e,t){if(e&1&&(R(0,`span`,14),K(1),z()),e&2){let e=W().$implicit;D(),q(e.op===`expected`?`Server only:`:`Client only:`)}}function nue(e,t){if(e&1&&(R(0,`li`)(1,`span`,13),K(2),z(),A(3,tue,2,1,`span`,14),R(4,`code`),K(5),z()()),e&2){let e=t.$implicit,n=W(4);k(`data-op`,e.op),D(2),q(n.signOf(e.op)),D(),j(e.op===`same`?-1:3),D(2),q(e.text)}}function rue(e,t){if(e&1&&(R(0,`p`,8)(1,`span`,9),K(2,`−`),z(),K(3,` server HTML Angular expected `),R(4,`span`,10),K(5,`+`),z(),K(6,` client DOM it found `),z(),R(7,`div`,11)(8,`ol`,12),M(9,nue,6,4,`li`,null,Jh),z()()),e&2){let e=W();D(9),N(e.diff)}}function iue(e,t){e&1&&(R(0,`p`,4),K(1,`Angular described neither side of the mismatch.`),z())}function aue(e,t){e&1&&(R(0,`p`,4),K(1,` Angular thinks a browser extension or third-party script changed the DOM before hydration. Try a clean browser profile, or add `),R(2,`code`),K(3,`ngSkipHydration`),z(),K(4,` to the host. `),z())}function oue(e,t){if(e&1&&(R(0,`h3`,0),K(1,`Server vs client DOM`),z(),A(2,eue,2,1,`p`,7),A(3,rue,11,0)(4,iue,2,0,`p`,4),A(5,aue,5,0,`p`,4)),e&2){let e=t;D(2),j(e.summary?2:-1),D(),j(e.diff?.length?3:4),D(2),j(e.external?5:-1)}}function sue(e,t){if(e&1&&A(0,oue,6,3),e&2){let e;j((e=W().mismatch())?0:-1,e)}}function cue(e,t){if(e&1&&(R(0,`code`),K(1),z(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;D(),q(e),D(),J(``,n===r-1?``:` → `,` `)}}function lue(e,t){if(e&1&&(R(0,`dt`),K(1,`Path`),z(),R(2,`dd`),M(3,cue,3,2,null,null,Jh),z()),e&2){let e=W();D(3),N(e.path)}}function uue(e,t){if(e&1&&(R(0,`dt`),K(1,`Source`),z(),R(2,`dd`)(3,`code`),K(4),z()()),e&2){let e=W();D(4),q(e.source)}}function due(e,t){if(e&1){let e=B();R(0,`button`,18),U(`click`,function(){C(e);let t=W();return w(W(2).explainLookup(t.token))}),K(1),z()}if(e&2){let e=W(3);k(`aria-disabled`,e.loading()||null),D(),J(` `,e.lookup()?`Explain lookup again`:`Explain lookup`,` `)}}function fue(e,t){e&1&&(R(0,`p`,4),K(1,` The component that asked for it wasn't found on the page, so the lookup can't be walked from here. `),z())}function pue(e,t){e&1&&(R(0,`p`,4),K(1,`Walking the lookup…`),z())}function mue(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function hue(e,t){if(e&1&&(R(0,`span`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function gue(e,t){if(e&1&&A(0,mue,2,1,`code`)(1,hue,2,1,`span`),e&2){let e=t.$implicit;j(+!e.code)}}function _ue(e,t){if(e&1&&(R(0,`p`,17),M(1,gue,2,1,null,null,Jh),z()),e&2){let e=W(3);D(),N(e.segments(t))}}function vue(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function yue(e,t){if(e&1&&(R(0,`span`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function bue(e,t){if(e&1&&A(0,vue,2,1,`code`)(1,yue,2,1,`span`),e&2){let e=t.$implicit;j(+!e.code)}}function xue(e,t){if(e&1&&(R(0,`p`,7),M(1,bue,2,1,null,null,Jh),z()),e&2){let e=W(3);D(),N(e.segments(t.summary))}}function Sue(e,t){if(e&1&&(R(0,`code`,2),K(1),z()),e&2){let e=W().$implicit;D(),q(e.component)}}function Cue(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function wue(e,t){if(e&1&&(R(0,`span`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function Tue(e,t){if(e&1&&A(0,Cue,2,1,`code`)(1,wue,2,1,`span`),e&2){let e=t.$implicit;j(+!e.code)}}function Eue(e,t){if(e&1&&(R(0,`li`)(1,`span`,20)(2,`code`),K(3),z(),A(4,Sue,2,1,`code`,2),z(),R(5,`span`,21),K(6),z(),R(7,`span`,22),M(8,Tue,2,1,null,null,Jh),z()()),e&2){let e=t.$implicit,n=W(4);D(3),q(e.name),D(),j(e.component?4:-1),D(),k(`data-tone`,n.stepTone[e.status]),D(),q(n.stepLabel[e.status]),D(2),N(n.segments(e.reason))}}function Due(e,t){e&1&&K(0,` This Angular version has no resolution path, so the path follows the rendered tree. `)}function Oue(e,t){if(e&1&&(R(0,`ol`,19),M(1,Eue,10,4,`li`,null,Lle),z(),R(3,`p`,4),K(4,` Read from the injector tree the page reported, assuming no `),R(5,`code`),K(6,`self`),z(),K(7,`, `),R(8,`code`),K(9,`skipSelf`),z(),K(10,`, `),R(11,`code`),K(12,`host`),z(),K(13,` or `),R(14,`code`),K(15,`optional`),z(),K(16,`. Agents can pass those to `),R(17,`code`),K(18,`explain-injection`),z(),K(19,`. `),A(20,Due,1,0),z()),e&2){let e=t;D(),N(e.steps),D(19),j(e.approximate?20:-1)}}function kue(e,t){if(e&1&&(R(0,`h3`,0),K(1,`Missing provider`),z(),R(2,`dl`,1)(3,`dt`),K(4,`Token`),z(),R(5,`dd`)(6,`code`),K(7),z()(),A(8,lue,5,0),A(9,uue,5,1),z(),A(10,due,2,2,`button`,15)(11,fue,2,0,`p`,4),R(12,`div`,16),A(13,pue,2,0,`p`,4)(14,_ue,3,0,`p`,17)(15,xue,3,0,`p`,7),z(),A(16,Oue,21,1)),e&2){let e,n,r=t,i=W(2);D(7),q(r.token),D(),j(r.path?.length?8:-1),D(),j(r.source?9:-1),D(),j(i.canExplain()&&i.owner()?10:i.owner()?-1:11),D(3),j(i.loading()?13:(e=i.lookupError())?14:(e=i.lookup())?15:-1,e),D(3),j((n=!i.loading()&&!i.lookupError()&&i.lookup())?16:-1,n)}}function Aue(e,t){if(e&1&&A(0,kue,17,6),e&2){let e;j((e=W().missing())?0:-1,e)}}var jue={provides:`Provides it`,missing:`Not provided`,hidden:`Hidden`,skipped:`Skipped`,"not-asked":`Not asked`,unknown:`Unknown`},Mue={provides:`ok`,missing:`plain`,hidden:`warn`,skipped:`plain`,"not-asked":`plain`,unknown:`warn`},Nue=class e{explain=$.required();owner=$(void 0);pageId=$(``);rpc=$(null);canExplain=$(!1);time=GE;segments=kle;stepLabel=jue;stepTone=Mue;changed=X(()=>{let e=this.explain();return e.kind===`expression-changed`?e:null});mismatch=X(()=>{let e=this.explain();return e.kind===`hydration-mismatch`?e:null});missing=X(()=>{let e=this.explain();return e.kind===`missing-provider`?e:null});loading=E(!1);lookup=E(null);lookupError=E(null);signOf(e){return e===`expected`?`−`:e===`actual`?`+`:` `}async explainLookup(e){let t=this.rpc(),n=this.owner();if(t&&n&&!this.loading()){this.loading.set(!0),this.lookupError.set(null);try{let r=await t.scope(`pangular`).rpc.call(`explain-injection`,{selector:n.id,token:e,pageId:this.pageId()});!r||`error`in r?(this.lookup.set(null),this.lookupError.set(r?.error??`The server didn't answer.`)):this.lookup.set(r)}catch{this.lookup.set(null),this.lookupError.set(`Can't reach the devtools server. Try again.`)}finally{this.loading.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-error-explain`]],inputs:{explain:[1,`explain`],owner:[1,`owner`],pageId:[1,`pageId`],rpc:[1,`rpc`],canExplain:[1,`canExplain`]},decls:3,vars:1,consts:[[1,`label`],[1,`facts`],[1,`muted`],[1,`value`],[1,`note`],[1,`writes`],[`aria-label`,`App frames that wrote it`,1,`frames`],[1,`summary`],[1,`legend`],[`aria-hidden`,`true`,1,`sign`,`expected`],[`aria-hidden`,`true`,1,`sign`,`actual`],[`tabindex`,`0`,`role`,`region`,`aria-label`,`Server vs client DOM diff`,1,`diff-wrap`],[1,`diff`],[`aria-hidden`,`true`,1,`sign`],[1,`sr-only`],[`type`,`button`,1,`small`],[`aria-live`,`polite`],[`role`,`alert`,1,`note`],[`type`,`button`,1,`small`,3,`click`],[`aria-label`,`Injectors Angular asks, in order`,1,`steps`],[1,`step-name`],[1,`chip`],[1,`reason`]],template:function(e,t){if(e&1&&A(0,$le,1,1)(1,sue,1,1)(2,Aue,1,1),e&2){let e;j((e=t.explain().kind)===`expression-changed`?0:e===`hydration-mismatch`?1:e===`missing-provider`?2:-1)}},styles:[`[_nghost-%COMP%] { +}`]})};function f5(e,t,n=600){let r=E(``),i=!0,a;return ac(()=>{if(e(),i){i=!1;return}clearTimeout(a),a=setTimeout(()=>{let e=Z(t);r.update(t=>t===e?`${e} `:e)},n)}),S(vs).onDestroy(()=>clearTimeout(a)),r.asReadonly()}var Fle=[`log`,`info`,`warn`,`error`,`debug`];function Ile(e){return e.split("`").map((e,t)=>({code:t%2==1,text:e})).filter(e=>e.text)}var Lle={handler:`ErrorHandler`,window:`Uncaught`,promise:`Unhandled rejection`};function p5(e){return!!e&&typeof e==`object`}function Rle(e){let t=p5(e)?e.pages:void 0;return p5(t)?Object.values(t).filter(e=>p5(e)&&typeof e.pageId==`string`).map(e=>({pageId:e.pageId,url:typeof e.url==`string`?e.url:``,title:typeof e.title==`string`?e.title:``,reportedAt:typeof e.reportedAt==`number`?e.reportedAt:0,handler:e.handler===`wrapped`?`wrapped`:`none`,errors:p5(e.errors)?Object.values(e.errors):[],console:p5(e.console)?Object.values(e.console).sort((e,t)=>e.id-t.id):[],dropped:p5(e.dropped)?{errors:Number(e.dropped.errors)||0,console:Number(e.dropped.console)||0}:{errors:0,console:0}})).sort((e,t)=>t.reportedAt-e.reportedAt):[]}function zle(e,t){return t&&e.some(e=>e.pageId===t)?t:e.length>1?`all`:e[0]?.pageId??`all`}function Ble(e,t){return e.filter(e=>t===`all`||e.pageId===t).flatMap(e=>e.errors.map(t=>({...t,pageId:e.pageId}))).sort((e,t)=>t.lastAt-e.lastAt)}function Vle(e,t){return e.filter(e=>t===`all`||e.pageId===t).flatMap(e=>e.console.map(t=>({...t,pageId:e.pageId}))).sort((e,t)=>t.at-e.at||t.id-e.id)}function Hle(e,t){return t?.startsWith(`https://angular.dev/errors/`)?{code:e,href:t}:{code:e}}var Ule=(e,t)=>t.signal+t.at,Wle=(e,t)=>t.id+e;function Gle(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W();D(),q(e.binding)}}function Kle(e,t){e&1&&(R(0,`span`,2),K(1,`A text interpolation (Angular doesn't name it)`),z())}function qle(e,t){if(e&1&&(R(0,`span`,2),K(1,` in `),z(),R(2,`code`),K(3),z()),e&2){let e=W();D(3),q(e.template)}}function Jle(e,t){if(e&1&&(R(0,`code`),K(1),z(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;D(),q(e),D(),J(``,n===r-1?``:`, `,` `)}}function Yle(e,t){if(e&1&&(R(0,`dt`),K(1,`Held by`),z(),R(2,`dd`),M(3,Jle,3,2,null,null,Xh),z()),e&2){let e=W();D(3),N(e.members)}}function Xle(e,t){e&1&&(R(0,`p`,4),K(1,` Values are hidden: the binding or a field that holds them has a secret-looking name. `),z())}function Zle(e,t){e&1&&(R(0,`p`,4),K(1,` Angular says this view was created after its parent was checked, so a change detection hook such as `),R(2,`code`),K(3,`ngAfterViewInit`),z(),K(4,` created it. `),z())}function Qle(e,t){if(e&1&&(R(0,`li`)(1,`code`),K(2),z()()),e&2){let e=t.$implicit;D(2),q(e)}}function $le(e,t){if(e&1&&(R(0,`ol`,6),M(1,Qle,3,1,`li`,null,Yh),z()),e&2){let e=W().$implicit;D(),N(e.stack)}}function eue(e,t){e&1&&(R(0,`span`,2),K(1,` (turn on write stacks in the Signals tab and reproduce to see the code)`),z())}function tue(e,t){if(e&1&&(R(0,`li`),K(1,` Signal `),R(2,`code`),K(3),z(),K(4),A(5,$le,3,0,`ol`,6)(6,eue,2,0,`span`,2),z()),e&2){let e=t.$implicit,n=W(4);D(3),q(e.signal),D(),J(` at `,n.time(e.at),` `),D(),j(e.stack?.length?5:6)}}function nue(e,t){if(e&1&&(R(0,`h4`,0),K(1,`Written by`),z(),R(2,`ul`,5),M(3,tue,7,3,`li`,null,Ule),z()),e&2){let e=W();D(3),N(e.writes)}}function rue(e,t){e&1&&(R(0,`p`,4),K(1,` No named signal was written with this value just before the check. Look for code that sets a field the template reads during change detection, such as `),R(2,`code`),K(3,`ngAfterViewInit`),z(),K(4,`, a getter that returns a new value each time, or a child that changes its parent. `),z())}function iue(e,t){e&1&&(R(0,`p`,4),K(1,` Where it was written is unknown: the page doesn't report signal writes (the Signals inspector is off, or Angular is older than 17). `),z())}function aue(e,t){if(e&1&&(R(0,`h3`,0),K(1,`What changed`),z(),R(2,`dl`,1)(3,`dt`),K(4,`Binding`),z(),R(5,`dd`),A(6,Gle,2,1,`code`)(7,Kle,2,0,`span`,2),A(8,qle,4,1),z(),R(9,`dt`),K(10,`Previous`),z(),R(11,`dd`)(12,`code`,3),K(13),z()(),R(14,`dt`),K(15,`Current`),z(),R(16,`dd`)(17,`code`,3),K(18),z()(),A(19,Yle,5,0),z(),A(20,Xle,2,0,`p`,4),A(21,Zle,5,0,`p`,4),A(22,nue,5,0)(23,rue,5,0,`p`,4)(24,iue,2,0,`p`,4)),e&2){let e=t;D(6),j(e.binding?6:7),D(2),j(e.template?8:-1),D(5),q(e.previous),D(5),q(e.current),D(),j(e.members?.length?19:-1),D(),j(e.masked?20:-1),D(),j(e.creation?21:-1),D(),j(e.writes?.length?22:e.writesKnown?23:24)}}function oue(e,t){if(e&1&&A(0,aue,25,8),e&2){let e;j((e=W().changed())?0:-1,e)}}function sue(e,t){if(e&1&&(R(0,`p`,7),K(1),z()),e&2){let e=W();D(),q(e.summary)}}function cue(e,t){if(e&1&&(R(0,`span`,14),K(1),z()),e&2){let e=W().$implicit;D(),q(e.op===`expected`?`Server only:`:`Client only:`)}}function lue(e,t){if(e&1&&(R(0,`li`)(1,`span`,13),K(2),z(),A(3,cue,2,1,`span`,14),R(4,`code`),K(5),z()()),e&2){let e=t.$implicit,n=W(4);k(`data-op`,e.op),D(2),q(n.signOf(e.op)),D(),j(e.op===`same`?-1:3),D(2),q(e.text)}}function uue(e,t){if(e&1&&(R(0,`p`,8)(1,`span`,9),K(2,`−`),z(),K(3,` server HTML Angular expected `),R(4,`span`,10),K(5,`+`),z(),K(6,` client DOM it found `),z(),R(7,`div`,11)(8,`ol`,12),M(9,lue,6,4,`li`,null,Yh),z()()),e&2){let e=W();D(9),N(e.diff)}}function due(e,t){e&1&&(R(0,`p`,4),K(1,`Angular described neither side of the mismatch.`),z())}function fue(e,t){e&1&&(R(0,`p`,4),K(1,` Angular thinks a browser extension or third-party script changed the DOM before hydration. Try a clean browser profile, or add `),R(2,`code`),K(3,`ngSkipHydration`),z(),K(4,` to the host. `),z())}function pue(e,t){if(e&1&&(R(0,`h3`,0),K(1,`Server vs client DOM`),z(),A(2,sue,2,1,`p`,7),A(3,uue,11,0)(4,due,2,0,`p`,4),A(5,fue,5,0,`p`,4)),e&2){let e=t;D(2),j(e.summary?2:-1),D(),j(e.diff?.length?3:4),D(2),j(e.external?5:-1)}}function mue(e,t){if(e&1&&A(0,pue,6,3),e&2){let e;j((e=W().mismatch())?0:-1,e)}}function hue(e,t){if(e&1&&(R(0,`code`),K(1),z(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;D(),q(e),D(),J(``,n===r-1?``:` → `,` `)}}function gue(e,t){if(e&1&&(R(0,`dt`),K(1,`Path`),z(),R(2,`dd`),M(3,hue,3,2,null,null,Yh),z()),e&2){let e=W();D(3),N(e.path)}}function _ue(e,t){if(e&1&&(R(0,`dt`),K(1,`Source`),z(),R(2,`dd`)(3,`code`),K(4),z()()),e&2){let e=W();D(4),q(e.source)}}function vue(e,t){if(e&1){let e=B();R(0,`button`,18),U(`click`,function(){C(e);let t=W();return w(W(2).explainLookup(t.token))}),K(1),z()}if(e&2){let e=W(3);k(`aria-disabled`,e.loading()||null),D(),J(` `,e.lookup()?`Explain lookup again`:`Explain lookup`,` `)}}function yue(e,t){e&1&&(R(0,`p`,4),K(1,` The component that asked for it wasn't found on the page, so the lookup can't be walked from here. `),z())}function bue(e,t){e&1&&(R(0,`p`,4),K(1,`Walking the lookup…`),z())}function xue(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function Sue(e,t){if(e&1&&(R(0,`span`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function Cue(e,t){if(e&1&&A(0,xue,2,1,`code`)(1,Sue,2,1,`span`),e&2){let e=t.$implicit;j(+!e.code)}}function wue(e,t){if(e&1&&(R(0,`p`,17),M(1,Cue,2,1,null,null,Yh),z()),e&2){let e=W(3);D(),N(e.segments(t))}}function Tue(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function Eue(e,t){if(e&1&&(R(0,`span`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function Due(e,t){if(e&1&&A(0,Tue,2,1,`code`)(1,Eue,2,1,`span`),e&2){let e=t.$implicit;j(+!e.code)}}function Oue(e,t){if(e&1&&(R(0,`p`,7),M(1,Due,2,1,null,null,Yh),z()),e&2){let e=W(3);D(),N(e.segments(t.summary))}}function kue(e,t){if(e&1&&(R(0,`code`,2),K(1),z()),e&2){let e=W().$implicit;D(),q(e.component)}}function Aue(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function jue(e,t){if(e&1&&(R(0,`span`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function Mue(e,t){if(e&1&&A(0,Aue,2,1,`code`)(1,jue,2,1,`span`),e&2){let e=t.$implicit;j(+!e.code)}}function Nue(e,t){if(e&1&&(R(0,`li`)(1,`span`,20)(2,`code`),K(3),z(),A(4,kue,2,1,`code`,2),z(),R(5,`span`,21),K(6),z(),R(7,`span`,22),M(8,Mue,2,1,null,null,Yh),z()()),e&2){let e=t.$implicit,n=W(4);D(3),q(e.name),D(),j(e.component?4:-1),D(),k(`data-tone`,n.stepTone[e.status]),D(),q(n.stepLabel[e.status]),D(2),N(n.segments(e.reason))}}function Pue(e,t){e&1&&K(0,` This Angular version has no resolution path, so the path follows the rendered tree. `)}function Fue(e,t){if(e&1&&(R(0,`ol`,19),M(1,Nue,10,4,`li`,null,Wle),z(),R(3,`p`,4),K(4,` Read from the injector tree the page reported, assuming no `),R(5,`code`),K(6,`self`),z(),K(7,`, `),R(8,`code`),K(9,`skipSelf`),z(),K(10,`, `),R(11,`code`),K(12,`host`),z(),K(13,` or `),R(14,`code`),K(15,`optional`),z(),K(16,`. Agents can pass those to `),R(17,`code`),K(18,`explain-injection`),z(),K(19,`. `),A(20,Pue,1,0),z()),e&2){let e=t;D(),N(e.steps),D(19),j(e.approximate?20:-1)}}function Iue(e,t){if(e&1&&(R(0,`h3`,0),K(1,`Missing provider`),z(),R(2,`dl`,1)(3,`dt`),K(4,`Token`),z(),R(5,`dd`)(6,`code`),K(7),z()(),A(8,gue,5,0),A(9,_ue,5,1),z(),A(10,vue,2,2,`button`,15)(11,yue,2,0,`p`,4),R(12,`div`,16),A(13,bue,2,0,`p`,4)(14,wue,3,0,`p`,17)(15,Oue,3,0,`p`,7),z(),A(16,Fue,21,1)),e&2){let e,n,r=t,i=W(2);D(7),q(r.token),D(),j(r.path?.length?8:-1),D(),j(r.source?9:-1),D(),j(i.canExplain()&&i.owner()?10:i.owner()?-1:11),D(3),j(i.loading()?13:(e=i.lookupError())?14:(e=i.lookup())?15:-1,e),D(3),j((n=!i.loading()&&!i.lookupError()&&i.lookup())?16:-1,n)}}function Lue(e,t){if(e&1&&A(0,Iue,17,6),e&2){let e;j((e=W().missing())?0:-1,e)}}var Rue={provides:`Provides it`,missing:`Not provided`,hidden:`Hidden`,skipped:`Skipped`,"not-asked":`Not asked`,unknown:`Unknown`},zue={provides:`ok`,missing:`plain`,hidden:`warn`,skipped:`plain`,"not-asked":`plain`,unknown:`warn`},Bue=class e{explain=$.required();owner=$(void 0);pageId=$(``);rpc=$(null);canExplain=$(!1);time=GE;segments=Ile;stepLabel=Rue;stepTone=zue;changed=X(()=>{let e=this.explain();return e.kind===`expression-changed`?e:null});mismatch=X(()=>{let e=this.explain();return e.kind===`hydration-mismatch`?e:null});missing=X(()=>{let e=this.explain();return e.kind===`missing-provider`?e:null});loading=E(!1);lookup=E(null);lookupError=E(null);signOf(e){return e===`expected`?`−`:e===`actual`?`+`:` `}async explainLookup(e){let t=this.rpc(),n=this.owner();if(t&&n&&!this.loading()){this.loading.set(!0),this.lookupError.set(null);try{let r=await t.scope(`pangular`).rpc.call(`explain-injection`,{selector:n.id,token:e,pageId:this.pageId()});!r||`error`in r?(this.lookup.set(null),this.lookupError.set(r?.error??`The server didn't answer.`)):this.lookup.set(r)}catch{this.lookup.set(null),this.lookupError.set(`Can't reach the devtools server. Try again.`)}finally{this.loading.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-error-explain`]],inputs:{explain:[1,`explain`],owner:[1,`owner`],pageId:[1,`pageId`],rpc:[1,`rpc`],canExplain:[1,`canExplain`]},decls:3,vars:1,consts:[[1,`label`],[1,`facts`],[1,`muted`],[1,`value`],[1,`note`],[1,`writes`],[`aria-label`,`App frames that wrote it`,1,`frames`],[1,`summary`],[1,`legend`],[`aria-hidden`,`true`,1,`sign`,`expected`],[`aria-hidden`,`true`,1,`sign`,`actual`],[`tabindex`,`0`,`role`,`region`,`aria-label`,`Server vs client DOM diff`,1,`diff-wrap`],[1,`diff`],[`aria-hidden`,`true`,1,`sign`],[1,`sr-only`],[`type`,`button`,1,`small`],[`aria-live`,`polite`],[`role`,`alert`,1,`note`],[`type`,`button`,1,`small`,3,`click`],[`aria-label`,`Injectors Angular asks, in order`,1,`steps`],[1,`step-name`],[1,`chip`],[1,`reason`]],template:function(e,t){if(e&1&&A(0,oue,1,1)(1,mue,1,1)(2,Lue,1,1),e&2){let e;j((e=t.explain().kind)===`expression-changed`?0:e===`hydration-mismatch`?1:e===`missing-provider`?2:-1)}},styles:[`[_nghost-%COMP%] { display: grid; gap: 6px; min-width: 0; @@ -24125,7 +24152,7 @@ dd[_ngcontent-%COMP%] { border-color: var(--%NS%border); background: var(--%NS%surface-2); color: var(--%NS%text-2); -}`]})},m5=(e,t)=>t.pageId+t.id;function Pue(e,t){e&1&&(F(0,`p`,1),K(1,`Loading errors…`),I())}function Fue(e,t){if(e&1){let e=B();F(0,`div`,2)(1,`p`),K(2,`Can't read the errors from the devtools server.`),I(),F(3,`button`,3),H(`click`,function(){return C(e),w(W().retry())}),K(4,`Retry`),I()()}}function Iue(e,t){e&1&&(F(0,`div`,1)(1,`p`),K(2,`No page reports errors yet.`),I(),F(3,`p`,4),K(4,` Open the app with the overlay loaded. Errors and console calls show up here as they happen. `),I()())}function Lue(e,t){if(e&1){let e=B();F(0,`app-select`,17),H(`valueChange`,function(t){return C(e),w(W(2).level.set(t))}),I()}if(e&2){let e=W(2);P(`options`,e.levelOptions)(`value`,e.level())}}function Rue(e,t){if(e&1){let e=B();F(0,`app-select`,18),H(`valueChange`,function(t){C(e);let n=W(2);return w(n.pageId.set(t??n.allPages))}),I()}if(e&2){let e=W(2);P(`options`,e.pageOptions())(`value`,e.pageId())}}function zue(e,t){e&1&&(F(0,`p`,20),K(1,` Angular's ErrorHandler isn't wrapped on this page yet, so errors Angular catches show up only when the default handler logs them. `),I())}function Bue(e,t){if(e&1&&(F(0,`p`,20),K(1),I()),e&2){let e=W(3);D(),Y(` `,e.droppedErrors(),` older error `,e.droppedErrors()===1?`group was`:`groups were`,` dropped. Each page keeps its last 100. `)}}function Vue(e,t){e&1&&(F(0,`p`,21),K(1,` No errors since the page loaded. Errors show up here as the app hits them. `),I())}function Hue(e,t){if(e&1){let e=B();F(0,`div`,21)(1,`p`),K(2),I(),F(3,`button`,3),H(`click`,function(){C(e),W(2);let t=kg(13);return W().filter.set(``),w(t.focus())}),K(4,` Clear filters `),I()()}if(e&2){let e=W(3);D(2),J(`No error matches “`,e.filter(),`”.`)}}function Uue(e,t){if(e&1&&(F(0,`a`,30),K(1),F(2,`span`,32),K(3,` reference (opens in a new tab)`),I()()),e&2){let e=W();P(`href`,t,yu),D(),q(e)}}function Wue(e,t){if(e&1&&(F(0,`span`,31),K(1),I()),e&2){let e=W();D(),q(e)}}function Gue(e,t){if(e&1&&A(0,Uue,4,2,`a`,30)(1,Wue,2,1,`span`,31),e&2){let e,n=W().$implicit;j((e=W(4).codeLink(t,n.docUrl).href)?0:1,e)}}function Kue(e,t){if(e&1&&(F(0,`span`,28),K(1),I()),e&2){let e=t.$implicit,n=W(5);D(),q(n.sourceLabels[e])}}function que(e,t){if(e&1&&(F(0,`span`,4),K(1),I()),e&2){let e=W().$implicit,t=W(4);D(),q(t.pageLabel(e.pageId))}}function Jue(e,t){if(e&1){let e=B();F(0,`button`,34),H(`click`,function(){C(e);let t=W(),n=W().$implicit;return w(W(4).showComponent.emit({id:t.id,pageId:n.pageId}))}),K(1,` Show component `),F(2,`code`),K(3),I()()}if(e&2){let e=W();D(3),q(e.name)}}function Yue(e,t){if(e&1&&(F(0,`span`,4),K(1,`In `),F(2,`code`),K(3),I()()),e&2){let e=W();D(3),q(e.name)}}function Xue(e,t){e&1&&A(0,Jue,4,1,`button`,33)(1,Yue,4,1,`span`,4),e&2&&j(+!W(5).canShowComponent())}function Zue(e,t){if(e&1&&L(0,`app-error-explain`,29),e&2){let e=W().$implicit,n=W(4);P(`explain`,t)(`owner`,e.owner)(`pageId`,e.pageId)(`rpc`,n.rpc())(`canExplain`,n.canExplainInjection())}}function Que(e,t){if(e&1&&(F(0,`details`)(1,`summary`),K(2,`Stack`),I(),F(3,`pre`,35),K(4),I()()),e&2){let e=W().$implicit;D(4),q(e.stack)}}function $ue(e,t){if(e&1&&(F(0,`li`,23)(1,`div`,24)(2,`span`,25),K(3),I(),F(4,`code`,26),K(5),I()(),F(6,`div`,27),A(7,Gue,2,1),M(8,Kue,2,1,`span`,28,Yh),F(10,`span`,4),K(11),I(),A(12,que,2,1,`span`,4),A(13,Xue,2,1),I(),A(14,Zue,1,5,`app-error-explain`,29),A(15,Que,5,1,`details`),I()),e&2){let e,n,r,i=t.$implicit,a=W(4);D(2),k(`aria-label`,a.timesLabel(i.count)),D(),J(` `,i.count,`× `),D(2),q(i.message),D(2),j((e=i.code)?7:-1,e),D(),N(i.sources),D(3),J(`Last at `,a.time(i.lastAt)),D(),j(a.showPage()?12:-1),D(),j((n=i.owner)?13:-1,n),D(),j((r=i.explain)?14:-1,r),D(),j(i.stack?15:-1)}}function ede(e,t){if(e&1&&(F(0,`ol`,22),M(1,$ue,16,9,`li`,23,m5),I()),e&2){let e=W(3);D(),N(e.shownErrors())}}function tde(e,t){if(e&1&&(F(0,`section`,15)(1,`h2`,19),K(2,`Errors`),I(),A(3,zue,2,0,`p`,20),A(4,Bue,2,2,`p`,20),A(5,Vue,2,0,`p`,21)(6,Hue,5,1,`div`,21)(7,ede,3,0,`ol`,22),I()),e&2){let e=W(2);D(3),j(e.unwrapped()?3:-1),D(),j(e.droppedErrors()?4:-1),D(),j(e.errors().length?e.shownErrors().length?7:6:5)}}function nde(e,t){if(e&1&&(F(0,`p`,20),K(1),I()),e&2){let e=W(3);D(),Y(` `,e.droppedConsole(),` older `,e.droppedConsole()===1?`call was`:`calls were`,` dropped. Each page keeps its last 200. `)}}function rde(e,t){e&1&&(F(0,`p`,21),K(1,` No console calls since the overlay connected. They show up here as the app logs. `),I())}function ide(e,t){if(e&1){let e=B();F(0,`div`,21)(1,`p`),K(2,`No console call matches the filters.`),I(),F(3,`button`,3),H(`click`,function(){C(e),W(2);let t=kg(13);return W().clearFilters(),w(t.focus())}),K(4,` Clear filters `),I()()}}function ade(e,t){if(e&1&&(F(0,`span`,25),K(1),I()),e&2){let e=W().$implicit;k(`aria-label`,W(4).timesLabel(e.count)),D(),J(``,e.count,`×`)}}function ode(e,t){if(e&1&&(F(0,`a`,30),K(1),F(2,`span`,32),K(3,` reference (opens in a new tab)`),I()()),e&2){let e=W();P(`href`,t,yu),D(),q(e)}}function sde(e,t){if(e&1&&(F(0,`span`,42),K(1),I()),e&2){let e=W();D(),q(e)}}function cde(e,t){if(e&1&&A(0,ode,4,2,`a`,30)(1,sde,2,1,`span`,42),e&2){let e,n=W().$implicit;j((e=W(4).codeLink(t,n.docUrl).href)?0:1,e)}}function lde(e,t){if(e&1&&(F(0,`li`,38)(1,`span`,39),K(2),I(),F(3,`code`,40),K(4),I(),A(5,ade,2,2,`span`,25),A(6,cde,2,1),F(7,`time`,41),K(8),I()()),e&2){let e,n=t.$implicit,r=W(4);D(),k(`data-tone`,r.levelTone[n.level]),D(),q(n.level),D(2),q(n.text),D(),j(n.count>1?5:-1),D(),j((e=n.code)?6:-1,e),D(2),q(r.time(n.at))}}function ude(e,t){if(e&1&&(F(0,`ol`,37),M(1,lde,9,6,`li`,38,m5),I()),e&2){let e=W(3);D(),N(e.shownEntries())}}function dde(e,t){if(e&1&&(F(0,`section`,16)(1,`h2`,36),K(2,`Console`),I(),A(3,nde,2,2,`p`,20),A(4,rde,2,0,`p`,21)(5,ide,5,0,`div`,21)(6,ude,3,0,`ol`,37),I()),e&2){let e=W(2);D(3),j(e.droppedConsole()?3:-1),D(),j(e.entries().length?e.shownEntries().length?6:5:4)}}function fde(e,t){if(e&1){let e=B();F(0,`p`,5),K(1,` Errors from Angular's ErrorHandler, uncaught errors and unhandled promise rejections on the live page, grouped by message, and the page's console calls. Messages and values are masked like other live data. `),I(),F(2,`div`,6)(3,`div`,7)(4,`button`,8),H(`click`,function(){return C(e),w(W().view.set(`errors`))}),K(5,` Errors `),F(6,`span`,9),K(7),I()(),F(8,`button`,8),H(`click`,function(){return C(e),w(W().view.set(`console`))}),K(9,` Console `),F(10,`span`,9),K(11),I()()(),F(12,`app-search-field`,10,0),S_(`valueChange`,function(t){C(e);let n=W();return x_(n.filter,t)||(n.filter=t),w(t)}),I(),A(14,Lue,1,2,`app-select`,11),A(15,Rue,1,2,`app-select`,12),F(16,`span`,13),K(17),I(),F(18,`p`,14),K(19),I()(),A(20,tde,8,3,`section`,15)(21,dde,7,2,`section`,16)}if(e&2){let e=W();D(4),k(`aria-pressed`,e.view()===`errors`),D(3),q(e.errors().length),D(),k(`aria-pressed`,e.view()===`console`),D(3),q(e.entries().length),D(),P(`placeholder`,e.view()===`errors`?`Filter by message or code`:`Filter by text`)(`saveKey`,`errors-`+e.view()),b_(`value`,e.filter),D(2),j(e.view()===`console`?14:-1),D(),j(e.pageOptions().length>2?15:-1),D(2),q(e.countText()),D(2),q(e.countStatus()),D(),j(e.view()===`errors`?20:21)}}var pde={error:`danger`,warn:`warn`,info:`accent`,log:`plain`,debug:`plain`},mde=class e{rpc=$(null);canShowComponent=$(!0);canExplainInjection=$(!1);showComponent=Q_();destroyRef=S(vs);hostPageId=fT();unsubscribe;time=GE;codeLink=Fle;sourceLabels=Ale;levelTone=pde;allPages=`all`;levelOptions=[{value:`all`,label:`All levels`},...Ole.map(e=>({value:e,label:e}))];pages=E([]);loaded=E(!1);failed=E(!1);view=E(`errors`);filter=E(``);level=E(`all`);pageId=Q({source:()=>this.pages(),computation:(e,t)=>t?.value&&(t.value===`all`||e.some(e=>e.pageId===t.value))?t.value:Mle(e,this.hostPageId)});pageOptions=X(()=>[{value:`all`,label:`All pages`},...this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.url}))]);showPage=X(()=>this.pageId()===`all`&&this.pages().length>1);picked=X(()=>this.pages().filter(e=>this.pageId()===`all`||e.pageId===this.pageId()));unwrapped=X(()=>this.picked().some(e=>e.handler!==`wrapped`));droppedErrors=X(()=>this.picked().reduce((e,t)=>e+t.dropped.errors,0));droppedConsole=X(()=>this.picked().reduce((e,t)=>e+t.dropped.console,0));errors=X(()=>Nle(this.pages(),this.pageId()));entries=X(()=>Ple(this.pages(),this.pageId()));shownErrors=X(()=>{let e=this.filter().trim().toLowerCase();return e?this.errors().filter(t=>t.message.toLowerCase().includes(e)||(t.code??``).toLowerCase().includes(e)||(t.owner?.name??``).toLowerCase().includes(e)):this.errors()});shownEntries=X(()=>{let e=this.filter().trim().toLowerCase(),t=this.level();return this.entries().filter(n=>(t===`all`||n.level===t)&&(!e||n.text.toLowerCase().includes(e)))});countText=X(()=>{let[e,t,n]=this.view()===`errors`?[this.shownErrors().length,this.errors().length,`error`]:[this.shownEntries().length,this.entries().length,`call`];return`${e} of ${t} ${t===1?n:`${n}s`}`});countStatus=f5(()=>[this.view(),this.filter(),this.level(),this.pageId()],()=>this.countText());constructor(){ac(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}retry(){let e=this.rpc();e&&this.load(e)}clearFilters(){this.filter.set(``),this.level.set(`all`)}timesLabel(e){return e===1?`Once`:`${e} times`}pageLabel(e){let t=this.pages().find(t=>t.pageId===e);return t?.title||t?.url||e}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`errors`);if(this.destroyRef.destroyed)return;let n=e=>this.pages.set(jle(e));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-errors-inspector`]],inputs:{rpc:[1,`rpc`],canShowComponent:[1,`canShowComponent`],canExplainInjection:[1,`canExplainInjection`]},outputs:{showComponent:`showComponent`},decls:4,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`],[1,`intro`],[1,`toolbar`],[`role`,`group`,`aria-label`,`Show`,1,`views`],[`type`,`button`,1,`view`,3,`click`],[1,`badge`],[1,`search`,3,`valueChange`,`placeholder`,`saveKey`,`value`],[`ariaLabel`,`Console level`,1,`level-select`,3,`options`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`options`,`value`],[1,`count`],[`role`,`status`,1,`sr-only`],[`aria-labelledby`,`errors-title`],[`aria-labelledby`,`console-title`],[`ariaLabel`,`Console level`,1,`level-select`,3,`valueChange`,`options`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`valueChange`,`options`,`value`],[`id`,`errors-title`,1,`sr-only`],[1,`notice`],[1,`empty`],[`aria-label`,`Errors, most recent first`,1,`errors`],[1,`error`],[1,`head`],[1,`times`],[1,`message`],[1,`meta`],[1,`chip`,`source`],[3,`explain`,`owner`,`pageId`,`rpc`,`canExplain`],[`target`,`_blank`,`rel`,`noopener noreferrer`,1,`chip`,`code`,3,`href`],[`title`,`No page in Angular's error reference`,1,`chip`,`code`,`plain`],[1,`sr-only`],[`type`,`button`,1,`link`],[`type`,`button`,1,`link`,3,`click`],[`tabindex`,`0`,`aria-label`,`Stack trace`],[`id`,`console-title`,1,`sr-only`],[`aria-label`,`Console calls, newest first`,1,`console`],[1,`entry`],[1,`chip`,`level`],[1,`text`],[1,`when`],[1,`chip`,`code`,`plain`]],template:function(e,t){e&1&&A(0,Pue,2,0,`p`,1)(1,Fue,5,0,`div`,2)(2,Iue,5,0,`div`,1)(3,fde,22,12),e&2&&j(t.loaded()?t.failed()?1:t.pages().length?3:2:0)},dependencies:[nP,OD,Nue],styles:[`[_nghost-%COMP%] { +}`]})},m5=(e,t)=>t.pageId+t.id;function Vue(e,t){e&1&&(F(0,`p`,1),K(1,`Loading errors…`),I())}function Hue(e,t){if(e&1){let e=B();F(0,`div`,2)(1,`p`),K(2,`Can't read the errors from the devtools server.`),I(),F(3,`button`,3),H(`click`,function(){return C(e),w(W().retry())}),K(4,`Retry`),I()()}}function Uue(e,t){e&1&&(F(0,`div`,1)(1,`p`),K(2,`No page reports errors yet.`),I(),F(3,`p`,4),K(4,` Open the app with the overlay loaded. Errors and console calls show up here as they happen. `),I()())}function Wue(e,t){if(e&1){let e=B();F(0,`app-select`,17),H(`valueChange`,function(t){return C(e),w(W(2).level.set(t))}),I()}if(e&2){let e=W(2);P(`options`,e.levelOptions)(`value`,e.level())}}function Gue(e,t){if(e&1){let e=B();F(0,`app-select`,18),H(`valueChange`,function(t){C(e);let n=W(2);return w(n.pageId.set(t??n.allPages))}),I()}if(e&2){let e=W(2);P(`options`,e.pageOptions())(`value`,e.pageId())}}function Kue(e,t){e&1&&(F(0,`p`,20),K(1,` Angular's ErrorHandler isn't wrapped on this page yet, so errors Angular catches show up only when the default handler logs them. `),I())}function que(e,t){if(e&1&&(F(0,`p`,20),K(1),I()),e&2){let e=W(3);D(),Y(` `,e.droppedErrors(),` older error `,e.droppedErrors()===1?`group was`:`groups were`,` dropped. Each page keeps its last 100. `)}}function Jue(e,t){e&1&&(F(0,`p`,21),K(1,` No errors since the page loaded. Errors show up here as the app hits them. `),I())}function Yue(e,t){if(e&1){let e=B();F(0,`div`,21)(1,`p`),K(2),I(),F(3,`button`,3),H(`click`,function(){C(e),W(2);let t=Ag(13);return W().filter.set(``),w(t.focus())}),K(4,` Clear filters `),I()()}if(e&2){let e=W(3);D(2),J(`No error matches “`,e.filter(),`”.`)}}function Xue(e,t){if(e&1&&(F(0,`a`,30),K(1),F(2,`span`,32),K(3,` reference (opens in a new tab)`),I()()),e&2){let e=W();P(`href`,t,bu),D(),q(e)}}function Zue(e,t){if(e&1&&(F(0,`span`,31),K(1),I()),e&2){let e=W();D(),q(e)}}function Que(e,t){if(e&1&&A(0,Xue,4,2,`a`,30)(1,Zue,2,1,`span`,31),e&2){let e,n=W().$implicit;j((e=W(4).codeLink(t,n.docUrl).href)?0:1,e)}}function $ue(e,t){if(e&1&&(F(0,`span`,28),K(1),I()),e&2){let e=t.$implicit,n=W(5);D(),q(n.sourceLabels[e])}}function ede(e,t){if(e&1&&(F(0,`span`,4),K(1),I()),e&2){let e=W().$implicit,t=W(4);D(),q(t.pageLabel(e.pageId))}}function tde(e,t){if(e&1){let e=B();F(0,`button`,34),H(`click`,function(){C(e);let t=W(),n=W().$implicit;return w(W(4).showComponent.emit({id:t.id,pageId:n.pageId}))}),K(1,` Show component `),F(2,`code`),K(3),I()()}if(e&2){let e=W();D(3),q(e.name)}}function nde(e,t){if(e&1&&(F(0,`span`,4),K(1,`In `),F(2,`code`),K(3),I()()),e&2){let e=W();D(3),q(e.name)}}function rde(e,t){e&1&&A(0,tde,4,1,`button`,33)(1,nde,4,1,`span`,4),e&2&&j(+!W(5).canShowComponent())}function ide(e,t){if(e&1&&L(0,`app-error-explain`,29),e&2){let e=W().$implicit,n=W(4);P(`explain`,t)(`owner`,e.owner)(`pageId`,e.pageId)(`rpc`,n.rpc())(`canExplain`,n.canExplainInjection())}}function ade(e,t){if(e&1&&(F(0,`details`)(1,`summary`),K(2,`Stack`),I(),F(3,`pre`,35),K(4),I()()),e&2){let e=W().$implicit;D(4),q(e.stack)}}function ode(e,t){if(e&1&&(F(0,`li`,23)(1,`div`,24)(2,`span`,25),K(3),I(),F(4,`code`,26),K(5),I()(),F(6,`div`,27),A(7,Que,2,1),M(8,$ue,2,1,`span`,28,Xh),F(10,`span`,4),K(11),I(),A(12,ede,2,1,`span`,4),A(13,rde,2,1),I(),A(14,ide,1,5,`app-error-explain`,29),A(15,ade,5,1,`details`),I()),e&2){let e,n,r,i=t.$implicit,a=W(4);D(2),k(`aria-label`,a.timesLabel(i.count)),D(),J(` `,i.count,`× `),D(2),q(i.message),D(2),j((e=i.code)?7:-1,e),D(),N(i.sources),D(3),J(`Last at `,a.time(i.lastAt)),D(),j(a.showPage()?12:-1),D(),j((n=i.owner)?13:-1,n),D(),j((r=i.explain)?14:-1,r),D(),j(i.stack?15:-1)}}function sde(e,t){if(e&1&&(F(0,`ol`,22),M(1,ode,16,9,`li`,23,m5),I()),e&2){let e=W(3);D(),N(e.shownErrors())}}function cde(e,t){if(e&1&&(F(0,`section`,15)(1,`h2`,19),K(2,`Errors`),I(),A(3,Kue,2,0,`p`,20),A(4,que,2,2,`p`,20),A(5,Jue,2,0,`p`,21)(6,Yue,5,1,`div`,21)(7,sde,3,0,`ol`,22),I()),e&2){let e=W(2);D(3),j(e.unwrapped()?3:-1),D(),j(e.droppedErrors()?4:-1),D(),j(e.errors().length?e.shownErrors().length?7:6:5)}}function lde(e,t){if(e&1&&(F(0,`p`,20),K(1),I()),e&2){let e=W(3);D(),Y(` `,e.droppedConsole(),` older `,e.droppedConsole()===1?`call was`:`calls were`,` dropped. Each page keeps its last 200. `)}}function ude(e,t){e&1&&(F(0,`p`,21),K(1,` No console calls since the overlay connected. They show up here as the app logs. `),I())}function dde(e,t){if(e&1){let e=B();F(0,`div`,21)(1,`p`),K(2,`No console call matches the filters.`),I(),F(3,`button`,3),H(`click`,function(){C(e),W(2);let t=Ag(13);return W().clearFilters(),w(t.focus())}),K(4,` Clear filters `),I()()}}function fde(e,t){if(e&1&&(F(0,`span`,25),K(1),I()),e&2){let e=W().$implicit;k(`aria-label`,W(4).timesLabel(e.count)),D(),J(``,e.count,`×`)}}function pde(e,t){if(e&1&&(F(0,`a`,30),K(1),F(2,`span`,32),K(3,` reference (opens in a new tab)`),I()()),e&2){let e=W();P(`href`,t,bu),D(),q(e)}}function mde(e,t){if(e&1&&(F(0,`span`,42),K(1),I()),e&2){let e=W();D(),q(e)}}function hde(e,t){if(e&1&&A(0,pde,4,2,`a`,30)(1,mde,2,1,`span`,42),e&2){let e,n=W().$implicit;j((e=W(4).codeLink(t,n.docUrl).href)?0:1,e)}}function gde(e,t){if(e&1&&(F(0,`li`,38)(1,`span`,39),K(2),I(),F(3,`code`,40),K(4),I(),A(5,fde,2,2,`span`,25),A(6,hde,2,1),F(7,`time`,41),K(8),I()()),e&2){let e,n=t.$implicit,r=W(4);D(),k(`data-tone`,r.levelTone[n.level]),D(),q(n.level),D(2),q(n.text),D(),j(n.count>1?5:-1),D(),j((e=n.code)?6:-1,e),D(2),q(r.time(n.at))}}function _de(e,t){if(e&1&&(F(0,`ol`,37),M(1,gde,9,6,`li`,38,m5),I()),e&2){let e=W(3);D(),N(e.shownEntries())}}function vde(e,t){if(e&1&&(F(0,`section`,16)(1,`h2`,36),K(2,`Console`),I(),A(3,lde,2,2,`p`,20),A(4,ude,2,0,`p`,21)(5,dde,5,0,`div`,21)(6,_de,3,0,`ol`,37),I()),e&2){let e=W(2);D(3),j(e.droppedConsole()?3:-1),D(),j(e.entries().length?e.shownEntries().length?6:5:4)}}function yde(e,t){if(e&1){let e=B();F(0,`p`,5),K(1,` Errors from Angular's ErrorHandler, uncaught errors and unhandled promise rejections on the live page, grouped by message, and the page's console calls. Messages and values are masked like other live data. `),I(),F(2,`div`,6)(3,`div`,7)(4,`button`,8),H(`click`,function(){return C(e),w(W().view.set(`errors`))}),K(5,` Errors `),F(6,`span`,9),K(7),I()(),F(8,`button`,8),H(`click`,function(){return C(e),w(W().view.set(`console`))}),K(9,` Console `),F(10,`span`,9),K(11),I()()(),F(12,`app-search-field`,10,0),w_(`valueChange`,function(t){C(e);let n=W();return C_(n.filter,t)||(n.filter=t),w(t)}),I(),A(14,Wue,1,2,`app-select`,11),A(15,Gue,1,2,`app-select`,12),F(16,`span`,13),K(17),I(),F(18,`p`,14),K(19),I()(),A(20,cde,8,3,`section`,15)(21,vde,7,2,`section`,16)}if(e&2){let e=W();D(4),k(`aria-pressed`,e.view()===`errors`),D(3),q(e.errors().length),D(),k(`aria-pressed`,e.view()===`console`),D(3),q(e.entries().length),D(),P(`placeholder`,e.view()===`errors`?`Filter by message or code`:`Filter by text`)(`saveKey`,`errors-`+e.view()),S_(`value`,e.filter),D(2),j(e.view()===`console`?14:-1),D(),j(e.pageOptions().length>2?15:-1),D(2),q(e.countText()),D(2),q(e.countStatus()),D(),j(e.view()===`errors`?20:21)}}var bde={error:`danger`,warn:`warn`,info:`accent`,log:`plain`,debug:`plain`},xde=class e{rpc=$(null);canShowComponent=$(!0);canExplainInjection=$(!1);showComponent=ev();destroyRef=S(vs);hostPageId=fT();unsubscribe;time=GE;codeLink=Hle;sourceLabels=Lle;levelTone=bde;allPages=`all`;levelOptions=[{value:`all`,label:`All levels`},...Fle.map(e=>({value:e,label:e}))];pages=E([]);loaded=E(!1);failed=E(!1);view=E(`errors`);filter=E(``);level=E(`all`);pageId=Q({source:()=>this.pages(),computation:(e,t)=>t?.value&&(t.value===`all`||e.some(e=>e.pageId===t.value))?t.value:zle(e,this.hostPageId)});pageOptions=X(()=>[{value:`all`,label:`All pages`},...this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.url}))]);showPage=X(()=>this.pageId()===`all`&&this.pages().length>1);picked=X(()=>this.pages().filter(e=>this.pageId()===`all`||e.pageId===this.pageId()));unwrapped=X(()=>this.picked().some(e=>e.handler!==`wrapped`));droppedErrors=X(()=>this.picked().reduce((e,t)=>e+t.dropped.errors,0));droppedConsole=X(()=>this.picked().reduce((e,t)=>e+t.dropped.console,0));errors=X(()=>Ble(this.pages(),this.pageId()));entries=X(()=>Vle(this.pages(),this.pageId()));shownErrors=X(()=>{let e=this.filter().trim().toLowerCase();return e?this.errors().filter(t=>t.message.toLowerCase().includes(e)||(t.code??``).toLowerCase().includes(e)||(t.owner?.name??``).toLowerCase().includes(e)):this.errors()});shownEntries=X(()=>{let e=this.filter().trim().toLowerCase(),t=this.level();return this.entries().filter(n=>(t===`all`||n.level===t)&&(!e||n.text.toLowerCase().includes(e)))});countText=X(()=>{let[e,t,n]=this.view()===`errors`?[this.shownErrors().length,this.errors().length,`error`]:[this.shownEntries().length,this.entries().length,`call`];return`${e} of ${t} ${t===1?n:`${n}s`}`});countStatus=f5(()=>[this.view(),this.filter(),this.level(),this.pageId()],()=>this.countText());constructor(){ac(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}retry(){let e=this.rpc();e&&this.load(e)}clearFilters(){this.filter.set(``),this.level.set(`all`)}timesLabel(e){return e===1?`Once`:`${e} times`}pageLabel(e){let t=this.pages().find(t=>t.pageId===e);return t?.title||t?.url||e}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`errors`);if(this.destroyRef.destroyed)return;let n=e=>this.pages.set(Rle(e));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-errors-inspector`]],inputs:{rpc:[1,`rpc`],canShowComponent:[1,`canShowComponent`],canExplainInjection:[1,`canExplainInjection`]},outputs:{showComponent:`showComponent`},decls:4,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`],[1,`intro`],[1,`toolbar`],[`role`,`group`,`aria-label`,`Show`,1,`views`],[`type`,`button`,1,`view`,3,`click`],[1,`badge`],[1,`search`,3,`valueChange`,`placeholder`,`saveKey`,`value`],[`ariaLabel`,`Console level`,1,`level-select`,3,`options`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`options`,`value`],[1,`count`],[`role`,`status`,1,`sr-only`],[`aria-labelledby`,`errors-title`],[`aria-labelledby`,`console-title`],[`ariaLabel`,`Console level`,1,`level-select`,3,`valueChange`,`options`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`valueChange`,`options`,`value`],[`id`,`errors-title`,1,`sr-only`],[1,`notice`],[1,`empty`],[`aria-label`,`Errors, most recent first`,1,`errors`],[1,`error`],[1,`head`],[1,`times`],[1,`message`],[1,`meta`],[1,`chip`,`source`],[3,`explain`,`owner`,`pageId`,`rpc`,`canExplain`],[`target`,`_blank`,`rel`,`noopener noreferrer`,1,`chip`,`code`,3,`href`],[`title`,`No page in Angular's error reference`,1,`chip`,`code`,`plain`],[1,`sr-only`],[`type`,`button`,1,`link`],[`type`,`button`,1,`link`,3,`click`],[`tabindex`,`0`,`aria-label`,`Stack trace`],[`id`,`console-title`,1,`sr-only`],[`aria-label`,`Console calls, newest first`,1,`console`],[1,`entry`],[1,`chip`,`level`],[1,`text`],[1,`when`],[1,`chip`,`code`,`plain`]],template:function(e,t){e&1&&A(0,Vue,2,0,`p`,1)(1,Hue,5,0,`div`,2)(2,Uue,5,0,`div`,1)(3,yde,22,12),e&2&&j(t.loaded()?t.failed()?1:t.pages().length?3:2:0)},dependencies:[nP,OD,Bue],styles:[`[_nghost-%COMP%] { display: block; font-size: 13px; } @@ -24458,7 +24485,7 @@ pre[_ngcontent-%COMP%]:focus-visible { .empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .state[_ngcontent-%COMP%] p[_ngcontent-%COMP%] { margin: 0 0 8px; -}`]})},hde=e=>({$implicit:e,depth:0}),gde=(e,t)=>({$implicit:e,depth:t}),h5=(e,t)=>t.key;function _de(e,t){if(e&1&&(F(0,`div`,6)(1,`dt`),K(2),I(),F(3,`dd`),K(4),I()()),e&2){let e=t.$implicit;k(`data-tone`,e.tone??null),D(2),q(e.label),D(2),q(e.value)}}function vde(e,t){if(e&1&&(F(0,`dl`,3),M(1,_de,5,3,`div`,6,Jh),I()),e&2){W();let e=E_(0);D(),N(e.items)}}function yde(e,t){if(e&1&&(F(0,`p`,4),K(1),I()),e&2){W();let e=E_(0);D(),q(e.text)}}function bde(e,t){if(e&1&&(F(0,`p`,7),K(1),I()),e&2){W(2);let e=E_(0);D(),q(e.empty??`No rows.`)}}function xde(e,t){e&1&&(F(0,`p`,7),K(1,`No row matches the filter.`),I())}function Sde(e,t){if(e&1&&(F(0,`th`,9),K(1),I()),e&2){let e=t.$implicit;D(),q(e.label)}}function Cde(e,t){if(e&1&&(F(0,`span`,10),K(1),I()),e&2){W();let e=E_(0),n=W(4);k(`data-tone`,t),D(),q(n.cellText(e))}}function wde(e,t){if(e&1&&K(0),e&2){W();let e=E_(0);J(` `,W(4).cellText(e),` `)}}function Tde(e,t){if(e&1&&(w_(0),F(1,`td`),A(2,Cde,2,2,`span`,10)(3,wde,1,1),I()),e&2){let e,n=t.$implicit,r=W().$implicit,i=W(3),a=T_(r[n.key]);D(2),j((e=i.toneOf(a))?2:3,e)}}function Ede(e,t){if(e&1&&(F(0,`tr`),M(1,Tde,4,2,`td`,null,h5),I()),e&2){W(3);let e=E_(0);D(),N(e.columns)}}function Dde(e,t){if(e&1&&(F(0,`div`,8)(1,`table`)(2,`thead`)(3,`tr`),M(4,Sde,2,1,`th`,9,h5),I()(),F(6,`tbody`),M(7,Ede,3,0,`tr`,null,Jh),I()()()),e&2){let e=W(2),t=E_(0);k(`aria-labelledby`,e.headingId()),D(4),N(t.columns),D(3),N(e.rows())}}function Ode(e,t){if(e&1&&A(0,bde,2,1,`p`,7)(1,xde,2,0,`p`,7)(2,Dde,9,1,`div`,8),e&2){let e=W();j(E_(0).rows.length?e.rows().length?2:1:0)}}function kde(e,t){if(e&1&&(F(0,`p`,7),K(1),I()),e&2){W(2);let e=E_(0);D(),q(e.empty??`Nothing listed.`)}}function Ade(e,t){e&1&&(F(0,`p`,7),K(1,`No item matches the filter.`),I())}function jde(e,t){if(e&1&&(F(0,`span`,10),K(1),I()),e&2){let e=t;k(`data-tone`,e.tone??`neutral`),D(),q(e.label)}}function Mde(e,t){if(e&1&&(F(0,`span`,13),K(1),I()),e&2){let e=W().$implicit;D(),q(e.detail)}}function Nde(e,t){if(e&1&&(F(0,`li`)(1,`span`,12),K(2),I(),A(3,jde,2,2,`span`,10),A(4,Mde,2,1,`span`,13),I()),e&2){let e,n=t.$implicit;D(2),q(n.label),D(),j((e=n.badge)?3:-1,e),D(),j(n.detail?4:-1)}}function Pde(e,t){if(e&1&&(F(0,`ul`,11),M(1,Nde,5,3,`li`,null,Jh),I()),e&2){let e=W(2);D(),N(e.items())}}function Fde(e,t){if(e&1&&A(0,kde,2,1,`p`,7)(1,Ade,2,0,`p`,7)(2,Pde,3,0,`ul`,11),e&2){let e=W();j(E_(0).items.length?e.items().length?2:1:0)}}function Ide(e,t){if(e&1&&ug(0,5),e&2){W();let e=kg(10),t=E_(0);P(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,I_(2,hde,t.value))}}function Lde(e,t){if(e&1&&(F(0,`code`,14),K(1),I()),e&2){let e=W().$implicit,t=W();D(),q(t.leafText(e))}}function Rde(e,t){if(e&1&&(F(0,`details`,17)(1,`summary`)(2,`span`,18),K(3),I(),F(4,`span`,19),K(5),I()(),ug(6,5),I()),e&2){let e=W().$implicit,t=W(2).depth,n=E_(0);W();let r=kg(10);P(`open`,t===0&&n.length<=8),D(3),q(e.key),D(2),q(e.summary),D(),P(`ngTemplateOutlet`,r)(`ngTemplateOutletContext`,L_(5,gde,e.value,t+1))}}function zde(e,t){if(e&1&&(F(0,`span`,18),K(1),I(),F(2,`code`,14),K(3),I()),e&2){let e=W().$implicit;D(),q(e.key),D(2),q(e.summary)}}function Bde(e,t){if(e&1&&(F(0,`li`),A(1,Rde,7,8,`details`,17)(2,zde,4,2),I()),e&2){let e=t.$implicit,n=W(2).depth,r=W();D(),j(e.nested&&n<r.maxDepth?1:2)}}function Vde(e,t){if(e&1&&(F(0,`ul`,16),M(1,Bde,3,1,`li`,null,h5),I()),e&2){let e=W().depth,t=E_(0);G(`root`,e===0),D(),N(t)}}function Hde(e,t){if(e&1&&(w_(0),A(1,Lde,2,1,`code`,14)(2,Vde,3,2,`ul`,15)),e&2){let e=t.$implicit,n=T_(W().entriesOf(e));D(),j(n.length?2:1)}}function g5(e){return e==null?``:typeof e==`object`?e.text:String(e)}function _5(e,t){return!t||e.toLowerCase().includes(t)}function Ude(e,t){let n=t.trim().toLowerCase();return e.kind===`table`?{shown:e.rows.filter(t=>e.columns.some(e=>_5(g5(t[e.key]),n))).length,total:e.rows.length}:e.kind===`list`?{shown:e.items.filter(e=>_5(`${e.label} ${e.detail??``} ${e.badge?.label??``}`,n)).length,total:e.items.length}:{shown:0,total:0}}var Wde=8,Gde=200;function Kde(e){return!e||typeof e!=`object`?[]:(Array.isArray(e)?e.map((e,t)=>[String(t),e]):Object.entries(e)).slice(0,Gde).map(([e,t])=>{let n=!!t&&typeof t==`object`;return{key:e,value:t,nested:n,summary:Array.isArray(t)?`Array(${t.length})`:n?`{${Object.keys(t).length}}`:t===null?`null`:typeof t==`string`?JSON.stringify(t):String(t)}})}var qde=class e{section=$.required();filter=$(``);index=$(0);maxDepth=Wde;cellText=g5;entriesOf=Kde;headingId=X(()=>`plugin-section-${this.index()}`);text=X(()=>this.filter().trim().toLowerCase());rows=X(()=>{let e=this.section();if(e.kind!==`table`)return[];let t=this.text();return e.rows.filter(n=>e.columns.some(e=>_5(g5(n[e.key]),t)))});items=X(()=>{let e=this.section();if(e.kind!==`list`)return[];let t=this.text();return e.items.filter(e=>_5(`${e.label} ${e.detail??``} ${e.badge?.label??``}`,t))});toneOf(e){return e&&typeof e==`object`&&e.tone?e.tone:null}leafText(e){return e==null?String(e):Array.isArray(e)?`[]`:typeof e==`object`?`{}`:typeof e==`string`?JSON.stringify(e):String(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-plugin-section`]],inputs:{section:[1,`section`],filter:[1,`filter`],index:[1,`index`]},decls:11,vars:5,consts:[[`tree`,``],[1,`section`],[1,`title`,3,`id`],[1,`stats`],[1,`text`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[1,`stat`],[1,`empty`],[`tabindex`,`0`,`role`,`region`,1,`table-wrap`],[`scope`,`col`],[1,`chip`],[1,`list`],[1,`label`],[1,`detail`],[1,`leaf`],[1,`tree`,3,`root`],[1,`tree`],[3,`open`],[1,`key`],[1,`summary`]],template:function(e,t){if(e&1&&(w_(0),F(1,`section`,1)(2,`h3`,2),K(3),I(),A(4,vde,3,0,`dl`,3)(5,yde,2,1,`p`,4)(6,Ode,3,1)(7,Fde,3,1)(8,Ide,1,4,`ng-container`,5),I(),Eh(9,Hde,3,2,`ng-template`,null,0,G_)),e&2){let e,n=T_(t.section());D(),k(`aria-labelledby`,t.headingId()),D(),P(`id`,t.headingId()),D(),q(n.title),D(),j((e=n.kind)===`stats`?4:e===`text`?5:e===`table`?6:e===`list`?7:e===`tree`?8:-1)}},dependencies:[Vv],styles:[`[_nghost-%COMP%] { +}`]})},Sde=e=>({$implicit:e,depth:0}),Cde=(e,t)=>({$implicit:e,depth:t}),h5=(e,t)=>t.key;function wde(e,t){if(e&1&&(F(0,`div`,6)(1,`dt`),K(2),I(),F(3,`dd`),K(4),I()()),e&2){let e=t.$implicit;k(`data-tone`,e.tone??null),D(2),q(e.label),D(2),q(e.value)}}function Tde(e,t){if(e&1&&(F(0,`dl`,3),M(1,wde,5,3,`div`,6,Yh),I()),e&2){W();let e=O_(0);D(),N(e.items)}}function Ede(e,t){if(e&1&&(F(0,`p`,4),K(1),I()),e&2){W();let e=O_(0);D(),q(e.text)}}function Dde(e,t){if(e&1&&(F(0,`p`,7),K(1),I()),e&2){W(2);let e=O_(0);D(),q(e.empty??`No rows.`)}}function Ode(e,t){e&1&&(F(0,`p`,7),K(1,`No row matches the filter.`),I())}function kde(e,t){if(e&1&&(F(0,`th`,9),K(1),I()),e&2){let e=t.$implicit;D(),q(e.label)}}function Ade(e,t){if(e&1&&(F(0,`span`,10),K(1),I()),e&2){W();let e=O_(0),n=W(4);k(`data-tone`,t),D(),q(n.cellText(e))}}function jde(e,t){if(e&1&&K(0),e&2){W();let e=O_(0);J(` `,W(4).cellText(e),` `)}}function Mde(e,t){if(e&1&&(E_(0),F(1,`td`),A(2,Ade,2,2,`span`,10)(3,jde,1,1),I()),e&2){let e,n=t.$implicit,r=W().$implicit,i=W(3),a=D_(r[n.key]);D(2),j((e=i.toneOf(a))?2:3,e)}}function Nde(e,t){if(e&1&&(F(0,`tr`),M(1,Mde,4,2,`td`,null,h5),I()),e&2){W(3);let e=O_(0);D(),N(e.columns)}}function Pde(e,t){if(e&1&&(F(0,`div`,8)(1,`table`)(2,`thead`)(3,`tr`),M(4,kde,2,1,`th`,9,h5),I()(),F(6,`tbody`),M(7,Nde,3,0,`tr`,null,Yh),I()()()),e&2){let e=W(2),t=O_(0);k(`aria-labelledby`,e.headingId()),D(4),N(t.columns),D(3),N(e.rows())}}function Fde(e,t){if(e&1&&A(0,Dde,2,1,`p`,7)(1,Ode,2,0,`p`,7)(2,Pde,9,1,`div`,8),e&2){let e=W();j(O_(0).rows.length?e.rows().length?2:1:0)}}function Ide(e,t){if(e&1&&(F(0,`p`,7),K(1),I()),e&2){W(2);let e=O_(0);D(),q(e.empty??`Nothing listed.`)}}function Lde(e,t){e&1&&(F(0,`p`,7),K(1,`No item matches the filter.`),I())}function Rde(e,t){if(e&1&&(F(0,`span`,10),K(1),I()),e&2){let e=t;k(`data-tone`,e.tone??`neutral`),D(),q(e.label)}}function zde(e,t){if(e&1&&(F(0,`span`,13),K(1),I()),e&2){let e=W().$implicit;D(),q(e.detail)}}function Bde(e,t){if(e&1&&(F(0,`li`)(1,`span`,12),K(2),I(),A(3,Rde,2,2,`span`,10),A(4,zde,2,1,`span`,13),I()),e&2){let e,n=t.$implicit;D(2),q(n.label),D(),j((e=n.badge)?3:-1,e),D(),j(n.detail?4:-1)}}function Vde(e,t){if(e&1&&(F(0,`ul`,11),M(1,Bde,5,3,`li`,null,Yh),I()),e&2){let e=W(2);D(),N(e.items())}}function Hde(e,t){if(e&1&&A(0,Ide,2,1,`p`,7)(1,Lde,2,0,`p`,7)(2,Vde,3,0,`ul`,11),e&2){let e=W();j(O_(0).items.length?e.items().length?2:1:0)}}function Ude(e,t){if(e&1&&dg(0,5),e&2){W();let e=Ag(10),t=O_(0);P(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,R_(2,Sde,t.value))}}function Wde(e,t){if(e&1&&(F(0,`code`,14),K(1),I()),e&2){let e=W().$implicit,t=W();D(),q(t.leafText(e))}}function Gde(e,t){if(e&1&&(F(0,`details`,17)(1,`summary`)(2,`span`,18),K(3),I(),F(4,`span`,19),K(5),I()(),dg(6,5),I()),e&2){let e=W().$implicit,t=W(2).depth,n=O_(0);W();let r=Ag(10);P(`open`,t===0&&n.length<=8),D(3),q(e.key),D(2),q(e.summary),D(),P(`ngTemplateOutlet`,r)(`ngTemplateOutletContext`,z_(5,Cde,e.value,t+1))}}function Kde(e,t){if(e&1&&(F(0,`span`,18),K(1),I(),F(2,`code`,14),K(3),I()),e&2){let e=W().$implicit;D(),q(e.key),D(2),q(e.summary)}}function qde(e,t){if(e&1&&(F(0,`li`),A(1,Gde,7,8,`details`,17)(2,Kde,4,2),I()),e&2){let e=t.$implicit,n=W(2).depth,r=W();D(),j(e.nested&&n<r.maxDepth?1:2)}}function Jde(e,t){if(e&1&&(F(0,`ul`,16),M(1,qde,3,1,`li`,null,h5),I()),e&2){let e=W().depth,t=O_(0);G(`root`,e===0),D(),N(t)}}function Yde(e,t){if(e&1&&(E_(0),A(1,Wde,2,1,`code`,14)(2,Jde,3,2,`ul`,15)),e&2){let e=t.$implicit,n=D_(W().entriesOf(e));D(),j(n.length?2:1)}}function g5(e){return e==null?``:typeof e==`object`?e.text:String(e)}function _5(e,t){return!t||e.toLowerCase().includes(t)}function Xde(e,t){let n=t.trim().toLowerCase();return e.kind===`table`?{shown:e.rows.filter(t=>e.columns.some(e=>_5(g5(t[e.key]),n))).length,total:e.rows.length}:e.kind===`list`?{shown:e.items.filter(e=>_5(`${e.label} ${e.detail??``} ${e.badge?.label??``}`,n)).length,total:e.items.length}:{shown:0,total:0}}var Zde=8,Qde=200;function $de(e){return!e||typeof e!=`object`?[]:(Array.isArray(e)?e.map((e,t)=>[String(t),e]):Object.entries(e)).slice(0,Qde).map(([e,t])=>{let n=!!t&&typeof t==`object`;return{key:e,value:t,nested:n,summary:Array.isArray(t)?`Array(${t.length})`:n?`{${Object.keys(t).length}}`:t===null?`null`:typeof t==`string`?JSON.stringify(t):String(t)}})}var efe=class e{section=$.required();filter=$(``);index=$(0);maxDepth=Zde;cellText=g5;entriesOf=$de;headingId=X(()=>`plugin-section-${this.index()}`);text=X(()=>this.filter().trim().toLowerCase());rows=X(()=>{let e=this.section();if(e.kind!==`table`)return[];let t=this.text();return e.rows.filter(n=>e.columns.some(e=>_5(g5(n[e.key]),t)))});items=X(()=>{let e=this.section();if(e.kind!==`list`)return[];let t=this.text();return e.items.filter(e=>_5(`${e.label} ${e.detail??``} ${e.badge?.label??``}`,t))});toneOf(e){return e&&typeof e==`object`&&e.tone?e.tone:null}leafText(e){return e==null?String(e):Array.isArray(e)?`[]`:typeof e==`object`?`{}`:typeof e==`string`?JSON.stringify(e):String(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-plugin-section`]],inputs:{section:[1,`section`],filter:[1,`filter`],index:[1,`index`]},decls:11,vars:5,consts:[[`tree`,``],[1,`section`],[1,`title`,3,`id`],[1,`stats`],[1,`text`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[1,`stat`],[1,`empty`],[`tabindex`,`0`,`role`,`region`,1,`table-wrap`],[`scope`,`col`],[1,`chip`],[1,`list`],[1,`label`],[1,`detail`],[1,`leaf`],[1,`tree`,3,`root`],[1,`tree`],[3,`open`],[1,`key`],[1,`summary`]],template:function(e,t){if(e&1&&(E_(0),F(1,`section`,1)(2,`h3`,2),K(3),I(),A(4,Tde,3,0,`dl`,3)(5,Ede,2,1,`p`,4)(6,Fde,3,1)(7,Hde,3,1)(8,Ude,1,4,`ng-container`,5),I(),Dh(9,Yde,3,2,`ng-template`,null,0,q_)),e&2){let e,n=D_(t.section());D(),k(`aria-labelledby`,t.headingId()),D(),P(`id`,t.headingId()),D(),q(n.title),D(),j((e=n.kind)===`stats`?4:e===`text`?5:e===`table`?6:e===`list`?7:e===`tree`?8:-1)}},dependencies:[Uv],styles:[`[_nghost-%COMP%] { display: block; } @@ -24686,7 +24713,7 @@ summary[_ngcontent-%COMP%]:focus-visible { color: var(--%NS%text); font-family: var(--%NS%font-mono); font-size: 12px; -}`]})},Jde=()=>[],Yde=(e,t)=>t.name,Xde=(e,t)=>t.id;function Zde(e,t){e&1&&(F(0,`p`,1),K(1,`Loading plugins…`),I())}function Qde(e,t){if(e&1){let e=B();F(0,`div`,2)(1,`p`),K(2,`Can't read the plugins from the devtools server.`),I(),F(3,`button`,3),H(`click`,function(){return C(e),w(W().retry())}),K(4,`Retry`),I()()}}function $de(e,t){e&1&&(F(0,`div`,1)(1,`p`),K(2,`No plugin reports yet.`),I(),F(3,`p`,4),K(4,` A library adds a tab here with `),F(5,`code`),K(6,`registerPangularPlugin()`),I(),K(7,` from `),F(8,`code`),K(9,`@pangular-inspector/devtools/plugin`),I(),K(10,`. Its view shows up once the app runs with the overlay loaded. `),I()())}function efe(e,t){if(e&1){let e=B();F(0,`button`,15),H(`click`,function(){let t=C(e).$implicit;return w(W(2).pluginId.set(t))}),K(1),I()}if(e&2){let e=t.$implicit,n=W(2);k(`aria-pressed`,n.pluginId()===e),D(),J(` `,n.titleOf(e),` `)}}function tfe(e,t){if(e&1){let e=B();F(0,`app-select`,16),H(`valueChange`,function(t){return C(e),w(W(2).pageId.set(t||null))}),I()}if(e&2){let e=W(2);P(`options`,e.pageOptions())(`value`,e.pageId()??``)}}function nfe(e,t){if(e&1&&(F(0,`span`,19),K(1),I()),e&2){let e=W();D(),q(e.version)}}function rfe(e,t){if(e&1&&(F(0,`span`,20),K(1),I()),e&2){let e=t.$implicit;k(`data-tone`,e.tone??`plain`),D(),q(e.label)}}function ife(e,t){e&1&&(F(0,`p`,21),K(1),I()),e&2&&(D(),q(t))}function afe(e,t){if(e&1&&(F(0,`p`,4),K(1),I()),e&2){let e=W();D(),q(e.description)}}function ofe(e,t){if(e&1&&(F(0,`p`,22),K(1),I()),e&2){let e=W();D(),q(e.error)}}function sfe(e,t){if(e&1&&(F(0,`p`,4),K(1,` Actions of this plugin are turned off in the devtools config (`),F(2,`code`),K(3,`actions.plugins`),I(),K(4,` or `),F(5,`code`),K(6),I(),K(7,`). `),I()),e&2){let e=W(2);D(6),J(`plugins.`,e.id,`.actions`)}}function cfe(e,t){if(e&1){let e=B();F(0,`p`,27),K(1),I(),F(2,`button`,28),H(`click`,function(){let t=C(e);return w(W(4).run(t.name))}),K(3),I(),F(4,`button`,3),H(`click`,function(){return C(e),w(W(4).confirming.set(null))}),K(5,`Cancel`),I()}if(e&2){let e=t;D(),q(e.confirm),D(2),J(` `,e.label,` `)}}function lfe(e,t){if(e&1){let e=B();F(0,`button`,3),H(`click`,function(){let t=C(e).$implicit;return w(W(5).ask(t))}),K(1),I()}if(e&2){let e=t.$implicit;k(`aria-disabled`,W(5).running()||null),D(),J(` `,e.label,` `)}}function ufe(e,t){e&1&&M(0,lfe,2,2,`button`,29,Yde),e&2&&N(W(4).actions())}function dfe(e,t){if(e&1&&(F(0,`div`,23),A(1,sfe,8,1,`p`,4)(2,cfe,6,2)(3,ufe,2,0),I()),e&2){let e,t=W(3);D(),j(t.actionsAllowed()?(e=t.confirming())?2:3:1,e)}}function ffe(e,t){e&1&&(F(0,`p`,25),K(1,` The plugin has not reported a view yet. It reports while this panel is open. `),I())}function pfe(e,t){e&1&&(F(0,`p`,25),K(1,`The plugin reported no sections.`),I())}function mfe(e,t){if(e&1){let e=B();F(0,`div`,25)(1,`p`),K(2),I(),F(3,`button`,3),H(`click`,function(){C(e),W(2);let t=kg(7);return W().filter.set(``),w(t.focus())}),K(4,` Clear filters `),I()()}if(e&2){let e=W(3);D(2),J(`No row or item matches “`,e.filter().trim(),`”.`)}}function hfe(e,t){if(e&1&&L(0,`app-plugin-section`,30),e&2){let e=t.$implicit,n=t.$index,r=W(4);P(`section`,e)(`filter`,r.filter())(`index`,n)}}function gfe(e,t){if(e&1&&(F(0,`div`,26),M(1,hfe,1,3,`app-plugin-section`,30,Jh),I()),e&2){let e=W();D(),N(e.view.sections)}}function _fe(e,t){if(e&1&&(F(0,`section`,12)(1,`div`,17)(2,`h2`,18),K(3),I(),A(4,nfe,2,1,`span`,19),F(5,`span`,20),K(6),I(),M(7,rfe,2,2,`span`,20,Jh),I(),A(9,ife,2,1,`p`,21),A(10,afe,2,1,`p`,4),A(11,ofe,2,1,`p`,22),A(12,dfe,4,1,`div`,23),F(13,`p`,24),K(14),I(),A(15,ffe,2,0,`p`,25)(16,pfe,2,0,`p`,25)(17,mfe,5,1,`div`,25)(18,gfe,3,0,`div`,26),I()),e&2){let e,n=t,r=W(2);D(3),q(n.title),D(),j(n.version?4:-1),D(),k(`data-tone`,r.statusTone[n.status]),D(),q(r.statusLabel[n.status]),D(),N(n.view?.badges??F_(10,Jde)),D(2),j((e=n.view?.summary)?9:-1,e),D(),j(n.description?10:-1),D(),j(n.error?11:-1),D(),j(r.actions().length?12:-1),D(2),q(r.result()),D(),j(n.view?n.view.sections.length?r.filter().trim()&&!r.filterMatches()?17:18:16:15)}}function vfe(e,t){if(e&1&&(F(0,`p`,13),K(1),I()),e&2){let e=W(2);D(),J(` No page reports the `,e.titleOf(e.pluginId()??``),` plugin. Open the app with the plugin registered and the overlay loaded. `)}}function yfe(e,t){e&1&&(F(0,`span`,4),K(1,`Hidden from agents by the config`),I())}function bfe(e,t){if(e&1&&(F(0,`li`)(1,`code`),K(2),I(),F(3,`span`,20),K(4),I(),A(5,yfe,2,0,`span`,4),F(6,`p`,4),K(7),I()()),e&2){let e=t.$implicit;D(2),q(e.id),D(),k(`data-tone`,e.safety===`read`?`plain`:`warn`),D(),q(e.safety),D(),j(e.registered?-1:5),D(2),q(e.description)}}function xfe(e,t){e&1&&(F(0,`li`,4),K(1,`This plugin has no agent tools.`),I())}function Sfe(e,t){e&1&&(F(0,`section`,14)(1,`h2`,31),K(2,`Agent tools`),I(),F(3,`ul`),M(4,bfe,8,5,`li`,null,Xde,!1,xfe,2,0,`li`,4),I()()),e&2&&(D(4),N(t.tools))}function Cfe(e,t){if(e&1){let e=B();F(0,`p`,5),K(1,` Views that libraries report from the live page through the plugin API. The values come from each plugin's code on the page and are masked like other live data. `),I(),F(2,`div`,6)(3,`div`,7),M(4,efe,2,2,`button`,8,Yh),I(),F(6,`app-search-field`,9,0),S_(`valueChange`,function(t){C(e);let n=W();return x_(n.filter,t)||(n.filter=t),w(t)}),I(),A(8,tfe,1,2,`app-select`,10),F(9,`span`,11),K(10),I()(),A(11,_fe,19,11,`section`,12)(12,vfe,2,1,`p`,13),A(13,Sfe,7,1,`section`,14)}if(e&2){let e,t,n=W();D(4),N(n.pluginIds()),D(2),b_(`value`,n.filter),D(2),j(n.pageOptions().length>1?8:-1),D(2),q(n.countText()),D(),j((e=n.entry())?11:12,e),D(2),j((t=n.server())?13:-1,t)}}function v5(e){let t=e??{};return{pages:(t.pages&&typeof t.pages==`object`?Object.values(t.pages).filter(e=>e&&typeof e.pageId==`string`&&Array.isArray(e.plugins)):[]).sort((e,t)=>t.reportedAt-e.reportedAt),server:Array.isArray(t.server)?t.server:[]}}function wfe(e){let t=v5(e);return t.server.length>0||t.pages.some(e=>e.plugins.length>0)}var Tfe={running:`Running`,error:`Failed`,unsupported:`Needs a newer Pangular`},Efe={running:`ok`,error:`danger`,unsupported:`warn`},Dfe=class e{rpc=$(null);destroyRef=S(vs);hostPageId=fT();unsubscribe;statusLabel=Tfe;statusTone=Efe;state=E({pages:[],server:[]});loaded=E(!1);failed=E(!1);filter=E(``);running=E(!1);pluginIds=X(()=>{let e=new Set;for(let t of this.state().pages)for(let n of t.plugins)e.add(n.id);for(let t of this.state().server)e.add(t.id);return[...e].sort((e,t)=>this.titleOf(e).localeCompare(this.titleOf(t)))});pluginId=Q({source:()=>this.pluginIds(),computation:(e,t)=>t?.value&&e.includes(t.value)?t.value:e[0]??null});pages=X(()=>this.state().pages.filter(e=>e.plugins.some(e=>e.id===this.pluginId())));pageId=Q({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:e.find(e=>e.pageId===this.hostPageId)?.pageId??e[0]?.pageId??null});target=X(()=>`${this.pluginId()}\n${this.pageId()}`);result=Q({source:this.target,computation:()=>``});confirming=Q({source:this.target,computation:()=>null});pageOptions=X(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.url})));entry=X(()=>this.pages().find(e=>e.pageId===this.pageId())?.plugins.find(e=>e.id===this.pluginId())??null);server=X(()=>this.state().server.find(e=>e.id===this.pluginId())??null);actions=X(()=>{let e=this.entry();return(e?.view?.actions??[]).filter(t=>e.actions.includes(t.name))});actionsAllowed=X(()=>{let e=this.pluginId();return!!e&&iw(e,NT(this.rpc())).actions});counts=X(()=>(this.entry()?.view?.sections??[]).reduce((e,t)=>{let{shown:n,total:r}=Ude(t,this.filter());return{shown:e.shown+n,total:e.total+r}},{shown:0,total:0}));filterMatches=X(()=>this.counts().shown>0);countText=X(()=>{let{shown:e,total:t}=this.counts();return t?`${e} of ${t} rows and items`:``});constructor(){ac(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}titleOf(e){for(let t of this.state().pages){let n=t.plugins.find(t=>t.id===e);if(n)return n.title||e}return this.state().server.find(t=>t.id===e)?.title||e}retry(){let e=this.rpc();e&&this.load(e)}ask(e){if(!this.running()){if(e.confirm){this.confirming.set({name:e.name,label:e.label,confirm:e.confirm});return}this.run(e.name)}}async run(e){let t=this.rpc(),n=this.pluginId(),r=this.pageId();if(this.confirming.set(null),t&&n&&r&&!this.running()&&this.actions().some(t=>t.name===e)){this.running.set(!0),this.result.set(``);try{let i=await t.scope(`pangular`).rpc.call(`request-plugin-action`,{pageId:r,pluginId:n,action:e});this.result.set(i?.ok?`Done.`:i?.error??`The action failed.`)}catch{this.result.set(`The devtools server did not answer. Check that it's still running.`)}finally{this.running.set(!1)}}}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`plugins`);if(this.destroyRef.destroyed)return;let n=e=>this.state.set(v5(e));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-plugins-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`],[1,`intro`],[1,`toolbar`],[`role`,`group`,`aria-label`,`Plugin`,1,`plugins`],[`type`,`button`,1,`view`],[`placeholder`,`Filter rows and items`,`saveKey`,`plugins`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`options`,`value`],[`role`,`status`,1,`count`],[`aria-labelledby`,`plugin-title`,1,`plugin`],[1,`notice`],[`aria-labelledby`,`plugin-tools-title`,1,`tools`],[`type`,`button`,1,`view`,3,`click`],[`ariaLabel`,`Page`,1,`page-select`,3,`valueChange`,`options`,`value`],[1,`head`],[`id`,`plugin-title`],[1,`chip`,`plain`],[1,`chip`],[1,`summary`],[`role`,`alert`,1,`notice`],[`role`,`group`,`aria-label`,`Plugin actions`,1,`actions`],[`role`,`status`,1,`result`],[1,`empty`],[1,`sections`],[1,`confirm`],[`type`,`button`,1,`small`,`primary`,3,`click`],[`type`,`button`,1,`small`],[3,`section`,`filter`,`index`],[`id`,`plugin-tools-title`,1,`label`]],template:function(e,t){e&1&&A(0,Zde,2,0,`p`,1)(1,Qde,5,0,`div`,2)(2,$de,11,0,`div`,1)(3,Cfe,14,5),e&2&&j(t.loaded()?t.failed()?1:t.pluginIds().length?3:2:0)},dependencies:[nP,OD,qde],styles:[`[_nghost-%COMP%] { +}`]})},tfe=()=>[],nfe=(e,t)=>t.name,rfe=(e,t)=>t.id;function ife(e,t){e&1&&(F(0,`p`,1),K(1,`Loading plugins…`),I())}function afe(e,t){if(e&1){let e=B();F(0,`div`,2)(1,`p`),K(2,`Can't read the plugins from the devtools server.`),I(),F(3,`button`,3),H(`click`,function(){return C(e),w(W().retry())}),K(4,`Retry`),I()()}}function ofe(e,t){e&1&&(F(0,`div`,1)(1,`p`),K(2,`No plugin reports yet.`),I(),F(3,`p`,4),K(4,` A library adds a tab here with `),F(5,`code`),K(6,`registerPangularPlugin()`),I(),K(7,` from `),F(8,`code`),K(9,`@pangular-inspector/devtools/plugin`),I(),K(10,`. Its view shows up once the app runs with the overlay loaded. `),I()())}function sfe(e,t){if(e&1){let e=B();F(0,`button`,15),H(`click`,function(){let t=C(e).$implicit;return w(W(2).pluginId.set(t))}),K(1),I()}if(e&2){let e=t.$implicit,n=W(2);k(`aria-pressed`,n.pluginId()===e),D(),J(` `,n.titleOf(e),` `)}}function cfe(e,t){if(e&1){let e=B();F(0,`app-select`,16),H(`valueChange`,function(t){return C(e),w(W(2).pageId.set(t||null))}),I()}if(e&2){let e=W(2);P(`options`,e.pageOptions())(`value`,e.pageId()??``)}}function lfe(e,t){if(e&1&&(F(0,`span`,19),K(1),I()),e&2){let e=W();D(),q(e.version)}}function ufe(e,t){if(e&1&&(F(0,`span`,20),K(1),I()),e&2){let e=t.$implicit;k(`data-tone`,e.tone??`plain`),D(),q(e.label)}}function dfe(e,t){e&1&&(F(0,`p`,21),K(1),I()),e&2&&(D(),q(t))}function ffe(e,t){if(e&1&&(F(0,`p`,4),K(1),I()),e&2){let e=W();D(),q(e.description)}}function pfe(e,t){if(e&1&&(F(0,`p`,22),K(1),I()),e&2){let e=W();D(),q(e.error)}}function mfe(e,t){if(e&1&&(F(0,`p`,4),K(1,` Actions of this plugin are turned off in the devtools config (`),F(2,`code`),K(3,`actions.plugins`),I(),K(4,` or `),F(5,`code`),K(6),I(),K(7,`). `),I()),e&2){let e=W(2);D(6),J(`plugins.`,e.id,`.actions`)}}function hfe(e,t){if(e&1){let e=B();F(0,`p`,27),K(1),I(),F(2,`button`,28),H(`click`,function(){let t=C(e);return w(W(4).run(t.name))}),K(3),I(),F(4,`button`,3),H(`click`,function(){return C(e),w(W(4).confirming.set(null))}),K(5,`Cancel`),I()}if(e&2){let e=t;D(),q(e.confirm),D(2),J(` `,e.label,` `)}}function gfe(e,t){if(e&1){let e=B();F(0,`button`,3),H(`click`,function(){let t=C(e).$implicit;return w(W(5).ask(t))}),K(1),I()}if(e&2){let e=t.$implicit;k(`aria-disabled`,W(5).running()||null),D(),J(` `,e.label,` `)}}function _fe(e,t){e&1&&M(0,gfe,2,2,`button`,29,nfe),e&2&&N(W(4).actions())}function vfe(e,t){if(e&1&&(F(0,`div`,23),A(1,mfe,8,1,`p`,4)(2,hfe,6,2)(3,_fe,2,0),I()),e&2){let e,t=W(3);D(),j(t.actionsAllowed()?(e=t.confirming())?2:3:1,e)}}function yfe(e,t){e&1&&(F(0,`p`,25),K(1,` The plugin has not reported a view yet. It reports while this panel is open. `),I())}function bfe(e,t){e&1&&(F(0,`p`,25),K(1,`The plugin reported no sections.`),I())}function xfe(e,t){if(e&1){let e=B();F(0,`div`,25)(1,`p`),K(2),I(),F(3,`button`,3),H(`click`,function(){C(e),W(2);let t=Ag(7);return W().filter.set(``),w(t.focus())}),K(4,` Clear filters `),I()()}if(e&2){let e=W(3);D(2),J(`No row or item matches “`,e.filter().trim(),`”.`)}}function Sfe(e,t){if(e&1&&L(0,`app-plugin-section`,30),e&2){let e=t.$implicit,n=t.$index,r=W(4);P(`section`,e)(`filter`,r.filter())(`index`,n)}}function Cfe(e,t){if(e&1&&(F(0,`div`,26),M(1,Sfe,1,3,`app-plugin-section`,30,Yh),I()),e&2){let e=W();D(),N(e.view.sections)}}function wfe(e,t){if(e&1&&(F(0,`section`,12)(1,`div`,17)(2,`h2`,18),K(3),I(),A(4,lfe,2,1,`span`,19),F(5,`span`,20),K(6),I(),M(7,ufe,2,2,`span`,20,Yh),I(),A(9,dfe,2,1,`p`,21),A(10,ffe,2,1,`p`,4),A(11,pfe,2,1,`p`,22),A(12,vfe,4,1,`div`,23),F(13,`p`,24),K(14),I(),A(15,yfe,2,0,`p`,25)(16,bfe,2,0,`p`,25)(17,xfe,5,1,`div`,25)(18,Cfe,3,0,`div`,26),I()),e&2){let e,n=t,r=W(2);D(3),q(n.title),D(),j(n.version?4:-1),D(),k(`data-tone`,r.statusTone[n.status]),D(),q(r.statusLabel[n.status]),D(),N(n.view?.badges??L_(10,tfe)),D(2),j((e=n.view?.summary)?9:-1,e),D(),j(n.description?10:-1),D(),j(n.error?11:-1),D(),j(r.actions().length?12:-1),D(2),q(r.result()),D(),j(n.view?n.view.sections.length?r.filter().trim()&&!r.filterMatches()?17:18:16:15)}}function Tfe(e,t){if(e&1&&(F(0,`p`,13),K(1),I()),e&2){let e=W(2);D(),J(` No page reports the `,e.titleOf(e.pluginId()??``),` plugin. Open the app with the plugin registered and the overlay loaded. `)}}function Efe(e,t){e&1&&(F(0,`span`,4),K(1,`Hidden from agents by the config`),I())}function Dfe(e,t){if(e&1&&(F(0,`li`)(1,`code`),K(2),I(),F(3,`span`,20),K(4),I(),A(5,Efe,2,0,`span`,4),F(6,`p`,4),K(7),I()()),e&2){let e=t.$implicit;D(2),q(e.id),D(),k(`data-tone`,e.safety===`read`?`plain`:`warn`),D(),q(e.safety),D(),j(e.registered?-1:5),D(2),q(e.description)}}function Ofe(e,t){e&1&&(F(0,`li`,4),K(1,`This plugin has no agent tools.`),I())}function kfe(e,t){e&1&&(F(0,`section`,14)(1,`h2`,31),K(2,`Agent tools`),I(),F(3,`ul`),M(4,Dfe,8,5,`li`,null,rfe,!1,Ofe,2,0,`li`,4),I()()),e&2&&(D(4),N(t.tools))}function Afe(e,t){if(e&1){let e=B();F(0,`p`,5),K(1,` Views that libraries report from the live page through the plugin API. The values come from each plugin's code on the page and are masked like other live data. `),I(),F(2,`div`,6)(3,`div`,7),M(4,sfe,2,2,`button`,8,Xh),I(),F(6,`app-search-field`,9,0),w_(`valueChange`,function(t){C(e);let n=W();return C_(n.filter,t)||(n.filter=t),w(t)}),I(),A(8,cfe,1,2,`app-select`,10),F(9,`span`,11),K(10),I()(),A(11,wfe,19,11,`section`,12)(12,Tfe,2,1,`p`,13),A(13,kfe,7,1,`section`,14)}if(e&2){let e,t,n=W();D(4),N(n.pluginIds()),D(2),S_(`value`,n.filter),D(2),j(n.pageOptions().length>1?8:-1),D(2),q(n.countText()),D(),j((e=n.entry())?11:12,e),D(2),j((t=n.server())?13:-1,t)}}function v5(e){let t=e??{};return{pages:(t.pages&&typeof t.pages==`object`?Object.values(t.pages).filter(e=>e&&typeof e.pageId==`string`&&Array.isArray(e.plugins)):[]).sort((e,t)=>t.reportedAt-e.reportedAt),server:Array.isArray(t.server)?t.server:[]}}function jfe(e){let t=v5(e);return t.server.length>0||t.pages.some(e=>e.plugins.length>0)}var Mfe={running:`Running`,error:`Failed`,unsupported:`Needs a newer Pangular`},Nfe={running:`ok`,error:`danger`,unsupported:`warn`},Pfe=class e{rpc=$(null);destroyRef=S(vs);hostPageId=fT();unsubscribe;statusLabel=Mfe;statusTone=Nfe;state=E({pages:[],server:[]});loaded=E(!1);failed=E(!1);filter=E(``);running=E(!1);pluginIds=X(()=>{let e=new Set;for(let t of this.state().pages)for(let n of t.plugins)e.add(n.id);for(let t of this.state().server)e.add(t.id);return[...e].sort((e,t)=>this.titleOf(e).localeCompare(this.titleOf(t)))});pluginId=Q({source:()=>this.pluginIds(),computation:(e,t)=>t?.value&&e.includes(t.value)?t.value:e[0]??null});pages=X(()=>this.state().pages.filter(e=>e.plugins.some(e=>e.id===this.pluginId())));pageId=Q({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:e.find(e=>e.pageId===this.hostPageId)?.pageId??e[0]?.pageId??null});target=X(()=>`${this.pluginId()}\n${this.pageId()}`);result=Q({source:this.target,computation:()=>``});confirming=Q({source:this.target,computation:()=>null});pageOptions=X(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.url})));entry=X(()=>this.pages().find(e=>e.pageId===this.pageId())?.plugins.find(e=>e.id===this.pluginId())??null);server=X(()=>this.state().server.find(e=>e.id===this.pluginId())??null);actions=X(()=>{let e=this.entry();return(e?.view?.actions??[]).filter(t=>e.actions.includes(t.name))});actionsAllowed=X(()=>{let e=this.pluginId();return!!e&&iw(e,NT(this.rpc())).actions});counts=X(()=>(this.entry()?.view?.sections??[]).reduce((e,t)=>{let{shown:n,total:r}=Xde(t,this.filter());return{shown:e.shown+n,total:e.total+r}},{shown:0,total:0}));filterMatches=X(()=>this.counts().shown>0);countText=X(()=>{let{shown:e,total:t}=this.counts();return t?`${e} of ${t} rows and items`:``});constructor(){ac(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}titleOf(e){for(let t of this.state().pages){let n=t.plugins.find(t=>t.id===e);if(n)return n.title||e}return this.state().server.find(t=>t.id===e)?.title||e}retry(){let e=this.rpc();e&&this.load(e)}ask(e){if(!this.running()){if(e.confirm){this.confirming.set({name:e.name,label:e.label,confirm:e.confirm});return}this.run(e.name)}}async run(e){let t=this.rpc(),n=this.pluginId(),r=this.pageId();if(this.confirming.set(null),t&&n&&r&&!this.running()&&this.actions().some(t=>t.name===e)){this.running.set(!0),this.result.set(``);try{let i=await t.scope(`pangular`).rpc.call(`request-plugin-action`,{pageId:r,pluginId:n,action:e});this.result.set(i?.ok?`Done.`:i?.error??`The action failed.`)}catch{this.result.set(`The devtools server did not answer. Check that it's still running.`)}finally{this.running.set(!1)}}}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`plugins`);if(this.destroyRef.destroyed)return;let n=e=>this.state.set(v5(e));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-plugins-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`],[1,`intro`],[1,`toolbar`],[`role`,`group`,`aria-label`,`Plugin`,1,`plugins`],[`type`,`button`,1,`view`],[`placeholder`,`Filter rows and items`,`saveKey`,`plugins`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`options`,`value`],[`role`,`status`,1,`count`],[`aria-labelledby`,`plugin-title`,1,`plugin`],[1,`notice`],[`aria-labelledby`,`plugin-tools-title`,1,`tools`],[`type`,`button`,1,`view`,3,`click`],[`ariaLabel`,`Page`,1,`page-select`,3,`valueChange`,`options`,`value`],[1,`head`],[`id`,`plugin-title`],[1,`chip`,`plain`],[1,`chip`],[1,`summary`],[`role`,`alert`,1,`notice`],[`role`,`group`,`aria-label`,`Plugin actions`,1,`actions`],[`role`,`status`,1,`result`],[1,`empty`],[1,`sections`],[1,`confirm`],[`type`,`button`,1,`small`,`primary`,3,`click`],[`type`,`button`,1,`small`],[3,`section`,`filter`,`index`],[`id`,`plugin-tools-title`,1,`label`]],template:function(e,t){e&1&&A(0,ife,2,0,`p`,1)(1,afe,5,0,`div`,2)(2,ofe,11,0,`div`,1)(3,Afe,14,5),e&2&&j(t.loaded()?t.failed()?1:t.pluginIds().length?3:2:0)},dependencies:[nP,OD,efe],styles:[`[_nghost-%COMP%] { display: block; font-size: 13px; } @@ -24989,7 +25016,7 @@ h2[_ngcontent-%COMP%] { .tools[_ngcontent-%COMP%] li[_ngcontent-%COMP%] p[_ngcontent-%COMP%] { flex-basis: 100%; -}`]})},Ofe=[`accessibility`,`errors`,`hydration`,`change-detection`,`leaks`,`router`,`forms`,`http`,`pipes`],y5={accessibility:`Accessibility`,"change-detection":`Change detection`,leaks:`Leaks`,errors:`Errors`,router:`Router`,forms:`Forms`,hydration:`Hydration`,http:`HTTP`,pipes:`Pipes`},b5=[{key:`cdCycles`,label:`Change detection cycles`},{key:`cdMeanMs`,label:`Mean cycle time`,unit:`ms`},{key:`cdMaxMs`,label:`Slowest cycle`,unit:`ms`},{key:`wastedChecks`,label:`Wasted checks`},{key:`wastedPercent`,label:`Wasted checks`,unit:`%`},{key:`retained`,label:`Retained components`},{key:`openSubscriptions`,label:`Open subscriptions after destroy`},{key:`errorGroups`,label:`Error groups`},{key:`errors`,label:`Error occurrences`},{key:`axeViolations`,label:`axe rules broken`},{key:`axeNodes`,label:`axe elements`},{key:`httpFailures`,label:`Failed HTTP calls`},{key:`findingsError`,label:`Errors found`},{key:`findingsWarning`,label:`Warnings found`},{key:`findingsInfo`,label:`Info found`}];function kfe(e){let t=Object.entries(e.args??{}).filter(([e])=>e!==`page`).map(([e,t])=>`${e}: ${JSON.stringify(t)}`).join(`, `);return`${e.tool.replace(/^pangular:/,``)}${t?` { ${t} }`:``}`}function Afe(e){let t=e??{};return{pages:Array.isArray(t.pages)?t.pages.filter(e=>typeof e?.pageId==`string`):[],report:t.report&&Array.isArray(t.report.findings)&&Array.isArray(t.report.sources)?t.report:null,session:t.session??{before:null,after:null,diff:null},axe:t.axe??null}}var jfe=(e,t)=>t.label,x5=(e,t)=>t.key;function Mfe(e,t){if(e&1&&(R(0,`p`,0),K(1),z()),e&2){let e=t.$implicit;D(),q(e)}}function Nfe(e,t){if(e&1&&(R(0,`tr`)(1,`th`,12),K(2),z(),R(3,`td`),K(4),z(),R(5,`td`),K(6),z(),R(7,`td`)(8,`span`,13),K(9),z()()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.before),D(2),q(e.after),D(2),k(`data-tone`,e.tone),D(),q(e.change)}}function Pfe(e,t){if(e&1&&(R(0,`li`)(1,`span`,14),K(2),z(),K(3),z()),e&2){let e=t.$implicit,n=W(2);D(2),q(n.areaLabel[e.area]),D(),J(` `,n.label(e),` `)}}function Ffe(e,t){if(e&1&&(R(0,`ul`),M(1,Pfe,4,2,`li`,null,x5),z()),e&2){let e=W();D(),N(e.diff().resolved)}}function Ife(e,t){e&1&&(R(0,`p`,7),K(1,`None.`),z())}function Lfe(e,t){if(e&1&&(R(0,`li`)(1,`span`,14),K(2),z(),K(3),z()),e&2){let e=t.$implicit,n=W(2);D(2),q(n.areaLabel[e.area]),D(),J(` `,n.label(e),` `)}}function Rfe(e,t){if(e&1&&(R(0,`ul`),M(1,Lfe,4,2,`li`,null,x5),z()),e&2){let e=W();D(),N(e.diff().added)}}function zfe(e,t){e&1&&(R(0,`p`,7),K(1,`None.`),z())}function Bfe(e,t){if(e&1&&(R(0,`li`)(1,`span`,14),K(2),z(),K(3),z()),e&2){let e=t.$implicit,n=W(2);D(2),q(n.areaLabel[e.area]),D(),__(` `,n.label(e),`: `,e.countBefore,`× → `,e.count??1,`× `)}}function Vfe(e,t){if(e&1&&(R(0,`ul`),M(1,Bfe,4,4,`li`,null,x5),z()),e&2){let e=W();D(),N(e.changed())}}function Hfe(e,t){if(e&1&&(R(0,`p`,7),K(1),z()),e&2){let e=W();D(),J(``,e.diff().remaining.length,` still there with the same count.`)}}var Ufe=class e{diff=$.required();areaLabel=y5;changed=X(()=>this.diff().remaining.filter(e=>e.countBefore!==void 0&&e.countBefore!==e.count));rows=X(()=>{let e=new Map(this.diff().metrics.map(e=>[e.metric,e]));return b5.filter(t=>e.has(t.key)).map(t=>{let n=e.get(t.key),r=t.unit?` ${t.unit}`:``,i=e=>e===void 0?`Not measured`:`${e}${r}`,a=n.delta;return{label:t.unit===`%`?`${t.label} (%)`:t.label,before:i(n.before),after:i(n.after),change:a===void 0?`Not compared`:a===0?`Same`:`${a>0?`+`:`−`}${Math.abs(a)}${r}, ${a<0?`better`:`worse`}`,tone:a===void 0||a===0?`plain`:a<0?`ok`:`danger`}})});label(e){return`${e.rule}${e.subject?` in ${e.subject}`:``}`}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-audit-diff`]],inputs:{diff:[1,`diff`]},decls:35,vars:6,consts:[[1,`notice`],[`tabindex`,`0`,`role`,`region`,`aria-label`,`Numbers before and after`,1,`table-wrap`],[1,`sr-only`],[`scope`,`col`],[1,`lists`],[`aria-labelledby`,`audit-resolved`],[`id`,`audit-resolved`],[1,`muted`],[`aria-labelledby`,`audit-added`],[`id`,`audit-added`],[`aria-labelledby`,`audit-changed`],[`id`,`audit-changed`],[`scope`,`row`],[1,`chip`],[1,`area`]],template:function(e,t){e&1&&(M(0,Mfe,2,1,`p`,0,Yh),R(2,`div`,1)(3,`table`)(4,`caption`,2),K(5,` Numbers before and after. Lower is better for each. `),z(),R(6,`thead`)(7,`tr`)(8,`th`,3),K(9,`Number`),z(),R(10,`th`,3),K(11,`Before`),z(),R(12,`th`,3),K(13,`After`),z(),R(14,`th`,3),K(15,`Change`),z()()(),R(16,`tbody`),M(17,Nfe,10,5,`tr`,null,jfe),z()()(),R(19,`div`,4)(20,`section`,5)(21,`h3`,6),K(22),z(),A(23,Ffe,3,0,`ul`)(24,Ife,2,0,`p`,7),z(),R(25,`section`,8)(26,`h3`,9),K(27),z(),A(28,Rfe,3,0,`ul`)(29,zfe,2,0,`p`,7),z(),R(30,`section`,10)(31,`h3`,11),K(32),z(),A(33,Vfe,3,0,`ul`)(34,Hfe,2,1,`p`,7),z()()),e&2&&(N(t.diff().notes),D(17),N(t.rows()),D(5),J(`Resolved (`,t.diff().resolved.length,`)`),D(),j(t.diff().resolved.length?23:24),D(4),J(`New (`,t.diff().added.length,`)`),D(),j(t.diff().added.length?28:29),D(4),J(`Changed count (`,t.changed().length,`)`),D(),j(t.changed().length?33:34))},styles:[`[_nghost-%COMP%] { +}`]})},Ffe=[`accessibility`,`errors`,`hydration`,`change-detection`,`leaks`,`router`,`forms`,`http`,`pipes`],y5={accessibility:`Accessibility`,"change-detection":`Change detection`,leaks:`Leaks`,errors:`Errors`,router:`Router`,forms:`Forms`,hydration:`Hydration`,http:`HTTP`,pipes:`Pipes`},b5=[{key:`cdCycles`,label:`Change detection cycles`},{key:`cdMeanMs`,label:`Mean cycle time`,unit:`ms`},{key:`cdMaxMs`,label:`Slowest cycle`,unit:`ms`},{key:`wastedChecks`,label:`Wasted checks`},{key:`wastedPercent`,label:`Wasted checks`,unit:`%`},{key:`retained`,label:`Retained components`},{key:`openSubscriptions`,label:`Open subscriptions after destroy`},{key:`errorGroups`,label:`Error groups`},{key:`errors`,label:`Error occurrences`},{key:`axeViolations`,label:`axe rules broken`},{key:`axeNodes`,label:`axe elements`},{key:`httpFailures`,label:`Failed HTTP calls`},{key:`findingsError`,label:`Errors found`},{key:`findingsWarning`,label:`Warnings found`},{key:`findingsInfo`,label:`Info found`}];function Ife(e){let t=Object.entries(e.args??{}).filter(([e])=>e!==`page`).map(([e,t])=>`${e}: ${JSON.stringify(t)}`).join(`, `);return`${e.tool.replace(/^pangular:/,``)}${t?` { ${t} }`:``}`}function Lfe(e){let t=e??{};return{pages:Array.isArray(t.pages)?t.pages.filter(e=>typeof e?.pageId==`string`):[],report:t.report&&Array.isArray(t.report.findings)&&Array.isArray(t.report.sources)?t.report:null,session:t.session??{before:null,after:null,diff:null},axe:t.axe??null}}var Rfe=(e,t)=>t.label,x5=(e,t)=>t.key;function zfe(e,t){if(e&1&&(R(0,`p`,0),K(1),z()),e&2){let e=t.$implicit;D(),q(e)}}function Bfe(e,t){if(e&1&&(R(0,`tr`)(1,`th`,12),K(2),z(),R(3,`td`),K(4),z(),R(5,`td`),K(6),z(),R(7,`td`)(8,`span`,13),K(9),z()()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.before),D(2),q(e.after),D(2),k(`data-tone`,e.tone),D(),q(e.change)}}function Vfe(e,t){if(e&1&&(R(0,`li`)(1,`span`,14),K(2),z(),K(3),z()),e&2){let e=t.$implicit,n=W(2);D(2),q(n.areaLabel[e.area]),D(),J(` `,n.label(e),` `)}}function Hfe(e,t){if(e&1&&(R(0,`ul`),M(1,Vfe,4,2,`li`,null,x5),z()),e&2){let e=W();D(),N(e.diff().resolved)}}function Ufe(e,t){e&1&&(R(0,`p`,7),K(1,`None.`),z())}function Wfe(e,t){if(e&1&&(R(0,`li`)(1,`span`,14),K(2),z(),K(3),z()),e&2){let e=t.$implicit,n=W(2);D(2),q(n.areaLabel[e.area]),D(),J(` `,n.label(e),` `)}}function Gfe(e,t){if(e&1&&(R(0,`ul`),M(1,Wfe,4,2,`li`,null,x5),z()),e&2){let e=W();D(),N(e.diff().added)}}function Kfe(e,t){e&1&&(R(0,`p`,7),K(1,`None.`),z())}function qfe(e,t){if(e&1&&(R(0,`li`)(1,`span`,14),K(2),z(),K(3),z()),e&2){let e=t.$implicit,n=W(2);D(2),q(n.areaLabel[e.area]),D(),y_(` `,n.label(e),`: `,e.countBefore,`× → `,e.count??1,`× `)}}function Jfe(e,t){if(e&1&&(R(0,`ul`),M(1,qfe,4,4,`li`,null,x5),z()),e&2){let e=W();D(),N(e.changed())}}function Yfe(e,t){if(e&1&&(R(0,`p`,7),K(1),z()),e&2){let e=W();D(),J(``,e.diff().remaining.length,` still there with the same count.`)}}var Xfe=class e{diff=$.required();areaLabel=y5;changed=X(()=>this.diff().remaining.filter(e=>e.countBefore!==void 0&&e.countBefore!==e.count));rows=X(()=>{let e=new Map(this.diff().metrics.map(e=>[e.metric,e]));return b5.filter(t=>e.has(t.key)).map(t=>{let n=e.get(t.key),r=t.unit?` ${t.unit}`:``,i=e=>e===void 0?`Not measured`:`${e}${r}`,a=n.delta;return{label:t.unit===`%`?`${t.label} (%)`:t.label,before:i(n.before),after:i(n.after),change:a===void 0?`Not compared`:a===0?`Same`:`${a>0?`+`:`−`}${Math.abs(a)}${r}, ${a<0?`better`:`worse`}`,tone:a===void 0||a===0?`plain`:a<0?`ok`:`danger`}})});label(e){return`${e.rule}${e.subject?` in ${e.subject}`:``}`}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-audit-diff`]],inputs:{diff:[1,`diff`]},decls:35,vars:6,consts:[[1,`notice`],[`tabindex`,`0`,`role`,`region`,`aria-label`,`Numbers before and after`,1,`table-wrap`],[1,`sr-only`],[`scope`,`col`],[1,`lists`],[`aria-labelledby`,`audit-resolved`],[`id`,`audit-resolved`],[1,`muted`],[`aria-labelledby`,`audit-added`],[`id`,`audit-added`],[`aria-labelledby`,`audit-changed`],[`id`,`audit-changed`],[`scope`,`row`],[1,`chip`],[1,`area`]],template:function(e,t){e&1&&(M(0,zfe,2,1,`p`,0,Xh),R(2,`div`,1)(3,`table`)(4,`caption`,2),K(5,` Numbers before and after. Lower is better for each. `),z(),R(6,`thead`)(7,`tr`)(8,`th`,3),K(9,`Number`),z(),R(10,`th`,3),K(11,`Before`),z(),R(12,`th`,3),K(13,`After`),z(),R(14,`th`,3),K(15,`Change`),z()()(),R(16,`tbody`),M(17,Bfe,10,5,`tr`,null,Rfe),z()()(),R(19,`div`,4)(20,`section`,5)(21,`h3`,6),K(22),z(),A(23,Hfe,3,0,`ul`)(24,Ufe,2,0,`p`,7),z(),R(25,`section`,8)(26,`h3`,9),K(27),z(),A(28,Gfe,3,0,`ul`)(29,Kfe,2,0,`p`,7),z(),R(30,`section`,10)(31,`h3`,11),K(32),z(),A(33,Jfe,3,0,`ul`)(34,Yfe,2,1,`p`,7),z()()),e&2&&(N(t.diff().notes),D(17),N(t.rows()),D(5),J(`Resolved (`,t.diff().resolved.length,`)`),D(),j(t.diff().resolved.length?23:24),D(4),J(`New (`,t.diff().added.length,`)`),D(),j(t.diff().added.length?28:29),D(4),J(`Changed count (`,t.changed().length,`)`),D(),j(t.changed().length?33:34))},styles:[`[_nghost-%COMP%] { display: grid; gap: 12px; } @@ -25110,7 +25137,7 @@ ul[_ngcontent-%COMP%] { margin: 0; color: var(--%NS%text-2); font-size: 12px; -}`]})},Wfe=(e,t)=>t.label,Gfe=(e,t)=>t.key,Kfe=(e,t)=>t.area;function qfe(e,t){e&1&&(F(0,`div`,1)(1,`p`),K(2,`The audit reads a live page, and a static report has none.`),I(),F(3,`p`,3),K(4,`Open the panel from the server that runs the app to audit it.`),I()())}function Jfe(e,t){e&1&&(F(0,`p`,1),K(1,`Loading the audit…`),I())}function Yfe(e,t){if(e&1){let e=B();F(0,`div`,2)(1,`p`),K(2,`Can't read the audit from the devtools server.`),I(),F(3,`button`,4),H(`click`,function(){return C(e),w(W().refresh())}),K(4,`Retry`),I()()}}function Xfe(e,t){e&1&&(F(0,`div`,1)(1,`p`),K(2,`No page reports live data yet.`),I(),F(3,`p`,3),K(4,` Open the app with the overlay loaded. The audit reads what the other inspectors collect from it. `),I()())}function Zfe(e,t){if(e&1){let e=B();F(0,`app-select`,30),H(`valueChange`,function(t){return C(e),w(W(2).pickPage(t))}),I()}if(e&2){let e=W(2);P(`options`,e.pageOptions())(`value`,e.pageId())}}function Qfe(e,t){e&1&&(F(0,`p`,15),K(1),I()),e&2&&(D(),q(t))}function $fe(e,t){if(e&1){let e=B();F(0,`button`,13),H(`click`,function(){return C(e),w(W(2).mark(`clear`))}),K(1,` Clear `),I()}e&2&&P(`disabled`,W(2).busy())}function epe(e,t){e&1&&(F(0,`p`,15),K(1),I()),e&2&&(D(),q(t))}function tpe(e,t){e&1&&L(0,`app-audit-diff`,21),e&2&&P(`diff`,t)}function npe(e,t){e&1&&(F(0,`p`,24),K(1,` No finding on this page. Run axe, or record change detection, to check more. `),I())}function rpe(e,t){if(e&1){let e=B();F(0,`div`,24)(1,`p`),K(2,`No finding matches the filters.`),I(),F(3,`button`,4),H(`click`,function(){C(e),W();let t=kg(7);return W().clearFilters(),w(t.focus())}),K(4,` Clear filters `),I()()}}function ipe(e,t){if(e&1&&(F(0,`code`,36),K(1),I()),e&2){let e=W().$implicit;D(),q(e.subject)}}function ape(e,t){if(e&1&&(F(0,`span`,37),K(1),I()),e&2){let e=W().$implicit;k(`aria-label`,e.count+` times`),D(),J(``,e.count,`×`)}}function ope(e,t){if(e&1){let e=B();F(0,`button`,41),H(`focus`,function(){C(e);let t=W(2).$implicit;return w(W(3).highlight(t))})(`blur`,function(){return C(e),w(W(5).highlight(null))})(`click`,function(){C(e);let t=W(2).$implicit,n=W(3);return w(n.showComponent.emit({id:t.elementId,pageId:n.pageId()}))}),K(1,` Show component `),I()}}function spe(e,t){if(e&1){let e=B();F(0,`button`,41),H(`focus`,function(){C(e);let t=W(2).$implicit;return w(W(3).highlight(t))})(`blur`,function(){return C(e),w(W(5).highlight(null))})(`click`,function(){C(e);let t=W(2).$implicit;return w(W(3).highlight(t,!0))}),K(1,` Show in page `),I()}}function cpe(e,t){if(e&1&&A(0,ope,2,0,`button`,40)(1,spe,2,0,`button`,40),e&2){let e=W().$implicit;j(+!W(3).isComponentArea(e.area))}}function lpe(e,t){if(e&1){let e=B();F(0,`li`,32),H(`mouseenter`,function(){let t=C(e).$implicit;return w(W(3).highlight(t))})(`mouseleave`,function(){return C(e),w(W(3).highlight(null))}),F(1,`div`,33)(2,`span`,34),K(3),I(),F(4,`span`,35),K(5),I(),A(6,ipe,2,1,`code`,36),A(7,ape,2,2,`span`,37),I(),F(8,`p`,38),K(9),I(),F(10,`div`,39)(11,`span`,3),K(12,`Rule `),F(13,`code`),K(14),I()(),F(15,`span`,3),K(16,`Agent tool `),F(17,`code`),K(18),I()(),A(19,cpe,2,1),I()()}if(e&2){let e=t.$implicit,n=W(3);D(2),k(`data-tone`,n.tone[e.severity]),D(),q(e.severity),D(2),q(n.areaLabel[e.area]),D(),j(e.subject?6:-1),D(),j((e.count??1)>1?7:-1),D(2),q(e.why),D(5),q(e.rule),D(4),q(n.toolCall(e)),D(),j(e.elementId&&n.canShowComponent()?19:-1)}}function upe(e,t){if(e&1&&(F(0,`ol`,25),M(1,lpe,20,9,`li`,31,Gfe),I()),e&2){let e=W(2);D(),N(e.shown())}}function dpe(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2),I(),F(3,`dd`),K(4),I()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.value)}}function fpe(e,t){if(e&1&&(F(0,`li`)(1,`strong`),K(2),I(),K(3),I()),e&2){let e=t.$implicit,n=W(3);D(2),q(n.areaLabel[e.area]),D(),J(` `,e.state===`off`?`Its inspector is turned off.`:e.note??`Nothing to read yet.`,` `)}}function ppe(e,t){if(e&1&&(F(0,`section`,29)(1,`h2`,42),K(2,`Not checked`),I(),F(3,`ul`,43),M(4,fpe,4,2,`li`,null,Kfe),I()()),e&2){let e=W(2);D(4),N(e.coverage())}}function mpe(e,t){if(e&1){let e=B();F(0,`p`,5),K(1,` One ranked list of what the inspectors found on the live page, with an axe pass over the app when you run one. Take a baseline before a change and an after audit to compare them. Agents get the same list from the `),F(2,`code`),K(3,`audit`),I(),K(4,` tool. `),I(),F(5,`div`,6)(6,`app-search-field`,7,0),S_(`valueChange`,function(t){C(e);let n=W();return x_(n.filter,t)||(n.filter=t),w(t)}),I(),F(8,`app-select`,8),H(`valueChange`,function(t){return C(e),w(W().area.set(t??`all`))}),I(),F(9,`app-select`,9),H(`valueChange`,function(t){return C(e),w(W().severity.set(t??`all`))}),I(),A(10,Zfe,1,2,`app-select`,10),F(11,`span`,11),K(12),I(),F(13,`p`,12),K(14),I(),F(15,`button`,13),H(`click`,function(){return C(e),w(W().runAxe())}),K(16),I(),F(17,`button`,13),H(`click`,function(){return C(e),w(W().refresh())}),K(18,`Refresh`),I()(),F(19,`p`,14),K(20),I(),A(21,Qfe,2,1,`p`,15),F(22,`section`,16)(23,`div`,17)(24,`h2`,18),K(25,`Before and after`),I(),F(26,`div`,19)(27,`button`,13),H(`click`,function(){return C(e),w(W().mark(`before`))}),K(28,` Take baseline `),I(),F(29,`button`,13),H(`click`,function(){return C(e),w(W().mark(`after`))}),K(30,` Take after audit `),I(),A(31,$fe,2,1,`button`,20),I()(),F(32,`p`,3),K(33),I(),A(34,epe,2,1,`p`,15),A(35,tpe,1,1,`app-audit-diff`,21),I(),F(36,`section`,22)(37,`h2`,23),K(38,`Findings`),I(),A(39,npe,2,0,`p`,24)(40,rpe,5,0,`div`,24)(41,upe,3,0,`ol`,25),I(),F(42,`section`,26)(43,`h2`,27),K(44,`Key numbers`),I(),F(45,`dl`,28),M(46,dpe,5,2,`div`,null,Wfe),I()(),A(48,ppe,6,0,`section`,29)}if(e&2){let e,t,n,r=W();D(6),b_(`value`,r.filter),D(2),P(`options`,r.areaOptions())(`value`,r.area()),D(),P(`options`,r.severityOptions)(`value`,r.severity()),D(),j(r.pageOptions().length>1?10:-1),D(2),q(r.countText()),D(2),q(r.countStatus()),D(),P(`disabled`,r.axeRunning()),D(),J(` `,r.axeRunning()?`Running axe…`:`Run axe`,` `),D(),P(`disabled`,r.busy()),D(3),q(r.axeStatus()),D(),j((e=r.axeError())?21:-1,e),D(6),P(`disabled`,r.busy()),D(2),P(`disabled`,r.busy()||!r.before()),D(2),j(r.before()?31:-1),D(2),q(r.sessionText()),D(),j((t=r.sessionError())?34:-1,t),D(),j((n=r.diff())?35:-1,n),D(4),j(r.findings().length?r.shown().length?41:40:39),D(7),N(r.numbers()),D(2),j(r.coverage().length?48:-1)}}var hpe={error:`danger`,warning:`warn`,info:`accent`},S5={error:0,warning:1,info:2},gpe=[`errors`,`hydration`],_pe=class e{rpc=$(null);canShowComponent=$(!0);showComponent=Q_();destroyRef=S(vs);hostPageId=fT();unsubscribe;seq=0;highlighted=!1;queued;time=GE;toolCall=kfe;areaLabel=y5;tone=hpe;severityOptions=[{value:`all`,label:`All severities`},{value:`error`,label:`Errors`},{value:`warning`,label:`Warnings and errors`}];data=E(null);loaded=E(!1);failed=E(!1);busy=E(!1);axeRunning=E(!1);axeError=E(null);sessionError=E(null);filter=E(``);area=E(`all`);severity=E(`all`);pageId=Q({source:()=>this.data(),computation:(e,t)=>t?.value&&e?.pages.some(e=>e.pageId===t.value)?t.value:e?.report?.pageId??this.hostPageId??``});staticReport=X(()=>yT(this.rpc()));report=X(()=>this.data()?.report??null);findings=X(()=>this.report()?.findings??[]);before=X(()=>this.data()?.session?.before??null);after=X(()=>this.data()?.session?.after??null);diff=X(()=>this.data()?.session?.diff??null);pageOptions=X(()=>(this.data()?.pages??[]).map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,...e.url&&e.url!==(e.title||e.url)?{hint:e.url}:{}})));areaOptions=X(()=>[{value:`all`,label:`All areas`},...Ofe.map(e=>({value:e,label:y5[e],hint:String(this.findings().filter(t=>t.area===e).length)}))]);shown=X(()=>{let e=this.filter().trim().toLowerCase(),t=this.area(),n=this.severity()===`all`?2:S5[this.severity()];return this.findings().filter(r=>(t===`all`||r.area===t)&&S5[r.severity]<=n&&(!e||`${r.subject??``} ${r.rule} ${r.why}`.toLowerCase().includes(e)))});countText=X(()=>{let e=this.findings().length;return`${this.shown().length} of ${e} ${e===1?`finding`:`findings`}`});countStatus=f5(()=>[this.filter(),this.area(),this.severity(),this.pageId()],()=>this.countText());numbers=X(()=>{let e=this.report()?.metrics??{};return b5.filter(t=>e[t.key]!==void 0).map(t=>({label:t.unit===`%`?`${t.label} (%)`:t.label,value:`${e[t.key]}${t.unit===`ms`?` ms`:``}`}))});coverage=X(()=>(this.report()?.sources??[]).filter(e=>e.state!==`ok`));axeStatus=X(()=>{if(this.axeRunning())return`Running axe on the page…`;let e=this.data()?.axe;return e?`Last axe pass at ${GE(e.at)}: ${e.violations.length} ${e.violations.length===1?`rule`:`rules`} broken.`:`No axe pass on this page yet. Run axe to check accessibility.`});sessionText=X(()=>{let e=this.before(),t=this.after();if(!e)return`Take a baseline, make your change, then take an after audit. Run axe and record change detection the same way both times, so the numbers compare.`;let n=`Baseline at ${GE(e.at)} with ${e.findings.length} findings.`;return t?`${n} After audit at ${GE(t.at)} with ${t.findings.length} findings.`:`${n} Make your change, then take an after audit.`});constructor(){ac(()=>{let e=this.rpc();e&&!yT(e)&&Z(()=>void this.subscribe(e))}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),clearTimeout(this.queued),this.highlight(null)})}isComponentArea(e){return gpe.includes(e)}clearFilters(){this.filter.set(``),this.area.set(`all`),this.severity.set(`all`)}pickPage(e){e&&(this.pageId.set(e),this.refresh())}async refresh(){let e=this.rpc();if(!e)return;let t=++this.seq;this.failed.set(!1);try{let n=await _T(e,`get-audit`,{pageId:this.pageId()||void 0});if(t!==this.seq||this.destroyRef.destroyed)return;let r=Afe(n);if(!r.report&&r.pages.length&&this.pageId())return this.pageId.set(``),this.refresh();this.data.set(r)}catch{t===this.seq&&this.failed.set(!0)}finally{t===this.seq&&this.loaded.set(!0)}}async runAxe(){let e=this.rpc();if(e&&!this.axeRunning()){this.axeRunning.set(!0),this.axeError.set(null);try{let t=await _T(e,`request-axe-run`,{pageId:this.pageId()||void 0});t?.ok||this.axeError.set(t?.error??`The axe pass did not run.`)}catch{this.axeError.set(`Can't reach the devtools server to run axe.`)}finally{this.axeRunning.set(!1)}await this.refresh()}}async mark(e){let t=this.rpc();if(t){this.busy.set(!0),this.sessionError.set(null);try{let n=await _T(t,`audit-session`,{pageId:this.pageId()||void 0,action:e});n?.ok||this.sessionError.set(n?.error??`The session did not change.`)}catch{this.sessionError.set(`Can't reach the devtools server.`)}finally{this.busy.set(!1)}await this.refresh()}}highlight(e,t=!1){let n=this.rpc();if(!n||!this.canShowComponent())return;let r=this.pageId(),i=e?.elementId&&r?{pageId:r,id:e.elementId,...t?{reveal:!0}:{}}:null;(i||this.highlighted)&&(this.highlighted=!!i,_T(n,`request-page-highlight`,i).catch(()=>{}))}refreshSoon(){this.queued===void 0&&(this.queued=setTimeout(()=>{this.queued=void 0,!(this.destroyRef.destroyed||this.axeRunning()||this.busy())&&this.refresh()},150))}async subscribe(e){await this.refresh();try{let t=await e.scope(`pangular`).rpc.sharedState(`audit`);if(this.destroyRef.destroyed)return;this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,()=>this.refreshSoon())}catch{}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-audit-inspector`]],inputs:{rpc:[1,`rpc`],canShowComponent:[1,`canShowComponent`]},outputs:{showComponent:`showComponent`},decls:5,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[1,`muted`],[`type`,`button`,1,`small`,3,`click`],[1,`intro`],[1,`toolbar`],[`placeholder`,`Filter by component, rule or text`,`saveKey`,`audit`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Area`,1,`filter-select`,3,`valueChange`,`options`,`value`],[`ariaLabel`,`Severity`,1,`filter-select`,3,`valueChange`,`options`,`value`],[`ariaLabel`,`Page`,1,`filter-select`,3,`options`,`value`],[1,`count`],[`role`,`status`,1,`sr-only`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`role`,`status`,1,`axe-status`],[`role`,`alert`,1,`notice`,`error`],[`aria-labelledby`,`audit-session-title`,1,`session`],[1,`session-head`],[`id`,`audit-session-title`],[1,`actions`],[`type`,`button`,1,`small`,3,`disabled`],[3,`diff`],[`aria-labelledby`,`audit-findings-title`],[`id`,`audit-findings-title`,1,`section-title`],[1,`empty`],[`aria-label`,`Findings, most severe first`,1,`findings`],[`aria-labelledby`,`audit-numbers-title`],[`id`,`audit-numbers-title`,1,`section-title`],[1,`numbers`],[`aria-labelledby`,`audit-coverage-title`],[`ariaLabel`,`Page`,1,`filter-select`,3,`valueChange`,`options`,`value`],[1,`finding`],[1,`finding`,3,`mouseenter`,`mouseleave`],[1,`head`],[1,`chip`],[1,`chip`,`plain`],[1,`subject`],[1,`times`],[1,`why`],[1,`meta`],[`type`,`button`,1,`link`],[`type`,`button`,1,`link`,3,`focus`,`blur`,`click`],[`id`,`audit-coverage-title`,1,`section-title`],[1,`coverage`]],template:function(e,t){e&1&&A(0,qfe,5,0,`div`,1)(1,Jfe,2,0,`p`,1)(2,Yfe,5,0,`div`,2)(3,Xfe,5,0,`div`,1)(4,mpe,49,21),e&2&&j(t.staticReport()?0:t.loaded()?t.failed()?2:t.report()?4:3:1)},dependencies:[nP,OD,Ufe],styles:[`[_nghost-%COMP%] { +}`]})},Zfe=(e,t)=>t.label,Qfe=(e,t)=>t.key,$fe=(e,t)=>t.area;function epe(e,t){e&1&&(F(0,`div`,1)(1,`p`),K(2,`The audit reads a live page, and a static report has none.`),I(),F(3,`p`,3),K(4,`Open the panel from the server that runs the app to audit it.`),I()())}function tpe(e,t){e&1&&(F(0,`p`,1),K(1,`Loading the audit…`),I())}function npe(e,t){if(e&1){let e=B();F(0,`div`,2)(1,`p`),K(2,`Can't read the audit from the devtools server.`),I(),F(3,`button`,4),H(`click`,function(){return C(e),w(W().refresh())}),K(4,`Retry`),I()()}}function rpe(e,t){e&1&&(F(0,`div`,1)(1,`p`),K(2,`No page reports live data yet.`),I(),F(3,`p`,3),K(4,` Open the app with the overlay loaded. The audit reads what the other inspectors collect from it. `),I()())}function ipe(e,t){if(e&1){let e=B();F(0,`app-select`,30),H(`valueChange`,function(t){return C(e),w(W(2).pickPage(t))}),I()}if(e&2){let e=W(2);P(`options`,e.pageOptions())(`value`,e.pageId())}}function ape(e,t){e&1&&(F(0,`p`,15),K(1),I()),e&2&&(D(),q(t))}function ope(e,t){if(e&1){let e=B();F(0,`button`,13),H(`click`,function(){return C(e),w(W(2).mark(`clear`))}),K(1,` Clear `),I()}e&2&&P(`disabled`,W(2).busy())}function spe(e,t){e&1&&(F(0,`p`,15),K(1),I()),e&2&&(D(),q(t))}function cpe(e,t){e&1&&L(0,`app-audit-diff`,21),e&2&&P(`diff`,t)}function lpe(e,t){e&1&&(F(0,`p`,24),K(1,` No finding on this page. Run axe, or record change detection, to check more. `),I())}function upe(e,t){if(e&1){let e=B();F(0,`div`,24)(1,`p`),K(2,`No finding matches the filters.`),I(),F(3,`button`,4),H(`click`,function(){C(e),W();let t=Ag(7);return W().clearFilters(),w(t.focus())}),K(4,` Clear filters `),I()()}}function dpe(e,t){if(e&1&&(F(0,`code`,36),K(1),I()),e&2){let e=W().$implicit;D(),q(e.subject)}}function fpe(e,t){if(e&1&&(F(0,`span`,37),K(1),I()),e&2){let e=W().$implicit;k(`aria-label`,e.count+` times`),D(),J(``,e.count,`×`)}}function ppe(e,t){if(e&1){let e=B();F(0,`button`,41),H(`focus`,function(){C(e);let t=W(2).$implicit;return w(W(3).highlight(t))})(`blur`,function(){return C(e),w(W(5).highlight(null))})(`click`,function(){C(e);let t=W(2).$implicit,n=W(3);return w(n.showComponent.emit({id:t.elementId,pageId:n.pageId()}))}),K(1,` Show component `),I()}}function mpe(e,t){if(e&1){let e=B();F(0,`button`,41),H(`focus`,function(){C(e);let t=W(2).$implicit;return w(W(3).highlight(t))})(`blur`,function(){return C(e),w(W(5).highlight(null))})(`click`,function(){C(e);let t=W(2).$implicit;return w(W(3).highlight(t,!0))}),K(1,` Show in page `),I()}}function hpe(e,t){if(e&1&&A(0,ppe,2,0,`button`,40)(1,mpe,2,0,`button`,40),e&2){let e=W().$implicit;j(+!W(3).isComponentArea(e.area))}}function gpe(e,t){if(e&1){let e=B();F(0,`li`,32),H(`mouseenter`,function(){let t=C(e).$implicit;return w(W(3).highlight(t))})(`mouseleave`,function(){return C(e),w(W(3).highlight(null))}),F(1,`div`,33)(2,`span`,34),K(3),I(),F(4,`span`,35),K(5),I(),A(6,dpe,2,1,`code`,36),A(7,fpe,2,2,`span`,37),I(),F(8,`p`,38),K(9),I(),F(10,`div`,39)(11,`span`,3),K(12,`Rule `),F(13,`code`),K(14),I()(),F(15,`span`,3),K(16,`Agent tool `),F(17,`code`),K(18),I()(),A(19,hpe,2,1),I()()}if(e&2){let e=t.$implicit,n=W(3);D(2),k(`data-tone`,n.tone[e.severity]),D(),q(e.severity),D(2),q(n.areaLabel[e.area]),D(),j(e.subject?6:-1),D(),j((e.count??1)>1?7:-1),D(2),q(e.why),D(5),q(e.rule),D(4),q(n.toolCall(e)),D(),j(e.elementId&&n.canShowComponent()?19:-1)}}function _pe(e,t){if(e&1&&(F(0,`ol`,25),M(1,gpe,20,9,`li`,31,Qfe),I()),e&2){let e=W(2);D(),N(e.shown())}}function vpe(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2),I(),F(3,`dd`),K(4),I()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.value)}}function ype(e,t){if(e&1&&(F(0,`li`)(1,`strong`),K(2),I(),K(3),I()),e&2){let e=t.$implicit,n=W(3);D(2),q(n.areaLabel[e.area]),D(),J(` `,e.state===`off`?`Its inspector is turned off.`:e.note??`Nothing to read yet.`,` `)}}function bpe(e,t){if(e&1&&(F(0,`section`,29)(1,`h2`,42),K(2,`Not checked`),I(),F(3,`ul`,43),M(4,ype,4,2,`li`,null,$fe),I()()),e&2){let e=W(2);D(4),N(e.coverage())}}function xpe(e,t){if(e&1){let e=B();F(0,`p`,5),K(1,` One ranked list of what the inspectors found on the live page, with an axe pass over the app when you run one. Take a baseline before a change and an after audit to compare them. Agents get the same list from the `),F(2,`code`),K(3,`audit`),I(),K(4,` tool. `),I(),F(5,`div`,6)(6,`app-search-field`,7,0),w_(`valueChange`,function(t){C(e);let n=W();return C_(n.filter,t)||(n.filter=t),w(t)}),I(),F(8,`app-select`,8),H(`valueChange`,function(t){return C(e),w(W().area.set(t??`all`))}),I(),F(9,`app-select`,9),H(`valueChange`,function(t){return C(e),w(W().severity.set(t??`all`))}),I(),A(10,ipe,1,2,`app-select`,10),F(11,`span`,11),K(12),I(),F(13,`p`,12),K(14),I(),F(15,`button`,13),H(`click`,function(){return C(e),w(W().runAxe())}),K(16),I(),F(17,`button`,13),H(`click`,function(){return C(e),w(W().refresh())}),K(18,`Refresh`),I()(),F(19,`p`,14),K(20),I(),A(21,ape,2,1,`p`,15),F(22,`section`,16)(23,`div`,17)(24,`h2`,18),K(25,`Before and after`),I(),F(26,`div`,19)(27,`button`,13),H(`click`,function(){return C(e),w(W().mark(`before`))}),K(28,` Take baseline `),I(),F(29,`button`,13),H(`click`,function(){return C(e),w(W().mark(`after`))}),K(30,` Take after audit `),I(),A(31,ope,2,1,`button`,20),I()(),F(32,`p`,3),K(33),I(),A(34,spe,2,1,`p`,15),A(35,cpe,1,1,`app-audit-diff`,21),I(),F(36,`section`,22)(37,`h2`,23),K(38,`Findings`),I(),A(39,lpe,2,0,`p`,24)(40,upe,5,0,`div`,24)(41,_pe,3,0,`ol`,25),I(),F(42,`section`,26)(43,`h2`,27),K(44,`Key numbers`),I(),F(45,`dl`,28),M(46,vpe,5,2,`div`,null,Zfe),I()(),A(48,bpe,6,0,`section`,29)}if(e&2){let e,t,n,r=W();D(6),S_(`value`,r.filter),D(2),P(`options`,r.areaOptions())(`value`,r.area()),D(),P(`options`,r.severityOptions)(`value`,r.severity()),D(),j(r.pageOptions().length>1?10:-1),D(2),q(r.countText()),D(2),q(r.countStatus()),D(),P(`disabled`,r.axeRunning()),D(),J(` `,r.axeRunning()?`Running axe…`:`Run axe`,` `),D(),P(`disabled`,r.busy()),D(3),q(r.axeStatus()),D(),j((e=r.axeError())?21:-1,e),D(6),P(`disabled`,r.busy()),D(2),P(`disabled`,r.busy()||!r.before()),D(2),j(r.before()?31:-1),D(2),q(r.sessionText()),D(),j((t=r.sessionError())?34:-1,t),D(),j((n=r.diff())?35:-1,n),D(4),j(r.findings().length?r.shown().length?41:40:39),D(7),N(r.numbers()),D(2),j(r.coverage().length?48:-1)}}var Spe={error:`danger`,warning:`warn`,info:`accent`},S5={error:0,warning:1,info:2},Cpe=[`errors`,`hydration`],wpe=class e{rpc=$(null);canShowComponent=$(!0);showComponent=ev();destroyRef=S(vs);hostPageId=fT();unsubscribe;seq=0;highlighted=!1;queued;time=GE;toolCall=Ife;areaLabel=y5;tone=Spe;severityOptions=[{value:`all`,label:`All severities`},{value:`error`,label:`Errors`},{value:`warning`,label:`Warnings and errors`}];data=E(null);loaded=E(!1);failed=E(!1);busy=E(!1);axeRunning=E(!1);axeError=E(null);sessionError=E(null);filter=E(``);area=E(`all`);severity=E(`all`);pageId=Q({source:()=>this.data(),computation:(e,t)=>t?.value&&e?.pages.some(e=>e.pageId===t.value)?t.value:e?.report?.pageId??this.hostPageId??``});staticReport=X(()=>yT(this.rpc()));report=X(()=>this.data()?.report??null);findings=X(()=>this.report()?.findings??[]);before=X(()=>this.data()?.session?.before??null);after=X(()=>this.data()?.session?.after??null);diff=X(()=>this.data()?.session?.diff??null);pageOptions=X(()=>(this.data()?.pages??[]).map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,...e.url&&e.url!==(e.title||e.url)?{hint:e.url}:{}})));areaOptions=X(()=>[{value:`all`,label:`All areas`},...Ffe.map(e=>({value:e,label:y5[e],hint:String(this.findings().filter(t=>t.area===e).length)}))]);shown=X(()=>{let e=this.filter().trim().toLowerCase(),t=this.area(),n=this.severity()===`all`?2:S5[this.severity()];return this.findings().filter(r=>(t===`all`||r.area===t)&&S5[r.severity]<=n&&(!e||`${r.subject??``} ${r.rule} ${r.why}`.toLowerCase().includes(e)))});countText=X(()=>{let e=this.findings().length;return`${this.shown().length} of ${e} ${e===1?`finding`:`findings`}`});countStatus=f5(()=>[this.filter(),this.area(),this.severity(),this.pageId()],()=>this.countText());numbers=X(()=>{let e=this.report()?.metrics??{};return b5.filter(t=>e[t.key]!==void 0).map(t=>({label:t.unit===`%`?`${t.label} (%)`:t.label,value:`${e[t.key]}${t.unit===`ms`?` ms`:``}`}))});coverage=X(()=>(this.report()?.sources??[]).filter(e=>e.state!==`ok`));axeStatus=X(()=>{if(this.axeRunning())return`Running axe on the page…`;let e=this.data()?.axe;return e?`Last axe pass at ${GE(e.at)}: ${e.violations.length} ${e.violations.length===1?`rule`:`rules`} broken.`:`No axe pass on this page yet. Run axe to check accessibility.`});sessionText=X(()=>{let e=this.before(),t=this.after();if(!e)return`Take a baseline, make your change, then take an after audit. Run axe and record change detection the same way both times, so the numbers compare.`;let n=`Baseline at ${GE(e.at)} with ${e.findings.length} findings.`;return t?`${n} After audit at ${GE(t.at)} with ${t.findings.length} findings.`:`${n} Make your change, then take an after audit.`});constructor(){ac(()=>{let e=this.rpc();e&&!yT(e)&&Z(()=>void this.subscribe(e))}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),clearTimeout(this.queued),this.highlight(null)})}isComponentArea(e){return Cpe.includes(e)}clearFilters(){this.filter.set(``),this.area.set(`all`),this.severity.set(`all`)}pickPage(e){e&&(this.pageId.set(e),this.refresh())}async refresh(){let e=this.rpc();if(!e)return;let t=++this.seq;this.failed.set(!1);try{let n=await _T(e,`get-audit`,{pageId:this.pageId()||void 0});if(t!==this.seq||this.destroyRef.destroyed)return;let r=Lfe(n);if(!r.report&&r.pages.length&&this.pageId())return this.pageId.set(``),this.refresh();this.data.set(r)}catch{t===this.seq&&this.failed.set(!0)}finally{t===this.seq&&this.loaded.set(!0)}}async runAxe(){let e=this.rpc();if(e&&!this.axeRunning()){this.axeRunning.set(!0),this.axeError.set(null);try{let t=await _T(e,`request-axe-run`,{pageId:this.pageId()||void 0});t?.ok||this.axeError.set(t?.error??`The axe pass did not run.`)}catch{this.axeError.set(`Can't reach the devtools server to run axe.`)}finally{this.axeRunning.set(!1)}await this.refresh()}}async mark(e){let t=this.rpc();if(t){this.busy.set(!0),this.sessionError.set(null);try{let n=await _T(t,`audit-session`,{pageId:this.pageId()||void 0,action:e});n?.ok||this.sessionError.set(n?.error??`The session did not change.`)}catch{this.sessionError.set(`Can't reach the devtools server.`)}finally{this.busy.set(!1)}await this.refresh()}}highlight(e,t=!1){let n=this.rpc();if(!n||!this.canShowComponent())return;let r=this.pageId(),i=e?.elementId&&r?{pageId:r,id:e.elementId,...t?{reveal:!0}:{}}:null;(i||this.highlighted)&&(this.highlighted=!!i,_T(n,`request-page-highlight`,i).catch(()=>{}))}refreshSoon(){this.queued===void 0&&(this.queued=setTimeout(()=>{this.queued=void 0,!(this.destroyRef.destroyed||this.axeRunning()||this.busy())&&this.refresh()},150))}async subscribe(e){await this.refresh();try{let t=await e.scope(`pangular`).rpc.sharedState(`audit`);if(this.destroyRef.destroyed)return;this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,()=>this.refreshSoon())}catch{}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-audit-inspector`]],inputs:{rpc:[1,`rpc`],canShowComponent:[1,`canShowComponent`]},outputs:{showComponent:`showComponent`},decls:5,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[1,`muted`],[`type`,`button`,1,`small`,3,`click`],[1,`intro`],[1,`toolbar`],[`placeholder`,`Filter by component, rule or text`,`saveKey`,`audit`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Area`,1,`filter-select`,3,`valueChange`,`options`,`value`],[`ariaLabel`,`Severity`,1,`filter-select`,3,`valueChange`,`options`,`value`],[`ariaLabel`,`Page`,1,`filter-select`,3,`options`,`value`],[1,`count`],[`role`,`status`,1,`sr-only`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`role`,`status`,1,`axe-status`],[`role`,`alert`,1,`notice`,`error`],[`aria-labelledby`,`audit-session-title`,1,`session`],[1,`session-head`],[`id`,`audit-session-title`],[1,`actions`],[`type`,`button`,1,`small`,3,`disabled`],[3,`diff`],[`aria-labelledby`,`audit-findings-title`],[`id`,`audit-findings-title`,1,`section-title`],[1,`empty`],[`aria-label`,`Findings, most severe first`,1,`findings`],[`aria-labelledby`,`audit-numbers-title`],[`id`,`audit-numbers-title`,1,`section-title`],[1,`numbers`],[`aria-labelledby`,`audit-coverage-title`],[`ariaLabel`,`Page`,1,`filter-select`,3,`valueChange`,`options`,`value`],[1,`finding`],[1,`finding`,3,`mouseenter`,`mouseleave`],[1,`head`],[1,`chip`],[1,`chip`,`plain`],[1,`subject`],[1,`times`],[1,`why`],[1,`meta`],[`type`,`button`,1,`link`],[`type`,`button`,1,`link`,3,`focus`,`blur`,`click`],[`id`,`audit-coverage-title`,1,`section-title`],[1,`coverage`]],template:function(e,t){e&1&&A(0,epe,5,0,`div`,1)(1,tpe,2,0,`p`,1)(2,npe,5,0,`div`,2)(3,rpe,5,0,`div`,1)(4,xpe,49,21),e&2&&j(t.staticReport()?0:t.loaded()?t.failed()?2:t.report()?4:3:1)},dependencies:[nP,OD,Xfe],styles:[`[_nghost-%COMP%] { display: block; font-size: 13px; } @@ -25435,7 +25462,7 @@ h2[_ngcontent-%COMP%] { .empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .state[_ngcontent-%COMP%] p[_ngcontent-%COMP%] { margin: 0 0 8px; -}`]})},C5=[{id:`router`,label:`Router`,tab:`routes`,tabLabel:`Routes`,inspector:`router`,state:`router`},{id:`http`,label:`HTTP`,tab:`network`,tabLabel:`SSR & HTTP`,inspector:`http`,state:`http`},{id:`ngrx`,label:`NgRx`,tab:`store`,tabLabel:`Store`,inspector:`ngrx`,state:`ngrx-store`},{id:`cd`,label:`Change detection`,tab:`components`,tabLabel:`Components`,inspector:`components`,state:`change-detection`},{id:`forms`,label:`Forms`,tab:`forms`,tabLabel:`Forms`,inspector:`forms`,state:`forms`},{id:`signals`,label:`Signals`,tab:`signals`,tabLabel:`Signals`,inspector:`signals`,state:`signal-graph`}],w5=Object.fromEntries(C5.map(e=>[e.id,e]));function vpe(e){return C5.filter(t=>e.inspectors[t.inspector])}function T5(e){return Array.isArray(e)?e:[]}function E5(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function D5(e){let t=E5(e).pages;return Array.isArray(t)?t:Object.values(E5(t))}function O5(e){return typeof e==`number`&&Number.isFinite(e)}function ype(e){try{let t=new URL(e,`http://x`);return e.startsWith(`/`)||t.host===`x`?`${t.pathname}${t.search}`:e.replace(/^[a-z]+:\/\/[^/]+/i,``)||e}catch{return e}}function k5(e){return e<10?`${Math.round(e*10)/10} ms`:`${Math.round(e)} ms`}function bpe(e){let t;try{t=typeof e==`string`?JSON.stringify(e):JSON.stringify(e)??``}catch{t=String(e)}return t.length>80?`${t.slice(0,79)}…`:t}function xpe(e){let t=[];for(let n of D5(e)){let e=typeof n?.pageId==`string`?n.pageId:``;for(let r of T5(n?.navigations)){if(!O5(r?.startedAt)||r.probe||r.beforeConnect)continue;let n=O5(r.endedAt)?Math.max(0,r.endedAt-r.startedAt):void 0,i=r.finalUrl&&r.finalUrl!==r.url?` to ${r.finalUrl}`:``;t.push({key:`router:${e}:${r.id}`,layer:`router`,pageId:e,at:r.startedAt,...n===void 0?{}:{ms:n},title:`Navigation to ${r.url}`,detail:[`${r.outcome}${i}`,r.trigger,n===void 0?``:k5(n)].filter(Boolean).join(` · `),...r.outcome===`failed`?{tone:`danger`}:r.outcome===`cancelled`||r.outcome===`redirected`?{tone:`warn`}:{},link:{tab:`routes`,...e?{page:e}:{}}})}}return t}function Spe(e){let t=e.status??0;if(e.error||t>=500||t===0&&!e.cancelled)return`danger`;if(t>=400||e.faulted||e.cancelled)return`warn`}function A5(e,t){if(!O5(e?.at))return null;let n=e.side===`server`?`SSR`:`client`,r=e.status?String(e.status):e.cancelled?`cancelled`:`no response`,i=O5(e.durationMs)?e.durationMs:void 0,a=Spe(e);return{key:`http:${e.side===`server`?`server`:t}:${e.id??e.at}`,layer:`http`,pageId:t,at:e.at,...i===void 0?{}:{ms:i},title:`${e.method??`GET`} ${ype(e.url??``)}`,detail:[r,n,i===void 0?``:k5(i),e.cacheHit?`from cache`:``,e.mocked?`mocked`:e.faulted?`fault rule`:``].filter(Boolean).join(` · `),...a?{tone:a}:{},link:{tab:`network`,...t?{page:t}:{}}}}function Cpe(e){let t=[],n=D5(e);for(let e of n){let n=typeof e?.pageId==`string`?e.pageId:``;for(let r of T5(e?.calls)){let e=A5(r,n);e&&t.push(e)}}for(let r of T5(E5(e).serverCalls)){let e=r?.pageUrl?n.find(e=>e?.initialUrl&&e.initialUrl===r.pageUrl):void 0,i=A5({...r,side:`server`},e?.pageId??``);i&&t.push(i)}return t}function wpe(e){let t=[];for(let n of D5(e)){let e=typeof n?.pageId==`string`?n.pageId:``;for(let r of T5(n?.log)){if(!O5(r?.timestamp))continue;let n=T5(r.diff).length+(r.diffTruncated??0),i=O5(r.durationMs)?r.durationMs:void 0;t.push({key:`ngrx:${e}:${r.seq}`,layer:`ngrx`,pageId:e,at:r.timestamp,...i===void 0?{}:{ms:i},title:r.source===`event`?r.eventType??r.type:r.type,detail:[r.storeId,r.source===`event`?`event`:n?`${n} ${n===1?`change`:`changes`}`:`no change`,i===void 0?``:k5(i)].filter(Boolean).join(` · `),link:{tab:`store`,...e?{page:e}:{}}})}}return t}var Tpe=16;function Epe(e){let t=[];for(let n of D5(e)){let e=typeof n?.pageId==`string`?n.pageId:``;for(let r of T5(n?.cycles)){if(!O5(r?.at))continue;let n=O5(r.ms)?r.ms:0;t.push({key:`cd:${e}:${r.id}`,layer:`cd`,pageId:e,at:r.at,ms:n,title:`Change detection cycle ${r.id}`,detail:[k5(n),`${r.checks} ${r.checks===1?`check`:`checks`}`,r.trigger?`after ${r.trigger}`:``].filter(Boolean).join(` · `),...n>Tpe?{tone:`warn`}:{},link:{tab:`components`,...e?{page:e}:{}}})}}return t}function Dpe(e){return T5(E5(e).events).flatMap((e,t)=>{if(!O5(e?.timestamp)||typeof e.formId!=`string`)return[];let n=ST(e.formId),r=[e.detail,e.origin,e.outcome].filter(Boolean).join(` · `);return[{key:`forms:${e.formId}:${e.seq??`i${t}`}`,layer:`forms`,pageId:n,at:e.timestamp,...O5(e.ms)?{ms:e.ms}:{},title:`${e.type} ${e.path||`form`}`,detail:r,...e.type===`submit`&&e.outcome===`invalid`?{tone:`warn`}:{},link:{tab:`forms`,id:e.formId,...n?{page:n}:{}}}]})}var Ope={write:`set`,sample:`sampled`};function kpe(e){let t=[],n=E5(E5(e).pages),r=Object.keys(n).length?Object.entries(n):[[``,E5(e).graph]];for(let[e,n]of r){let r=E5(n),i=typeof r.pageId==`string`?r.pageId:String(e),a=new Map(T5(r.nodes).map(e=>[e?.id,e?.label||e?.kind||`signal`]));for(let[e,n]of Object.entries(E5(r.history)))for(let r of T5(n)){if(!O5(r?.at)||r.source===`initial`)continue;let n=a.get(e)??e;t.push({key:`signals:${i}:${e}:${r.epoch??r.at}`,layer:`signals`,pageId:i,at:r.at,title:`${n} ${Ope[r.source??``]??`changed`}`,detail:bpe(r.value),link:{tab:`signals`,...i?{page:i}:{}}})}}return t}var Ape={router:xpe,http:Cpe,ngrx:wpe,cd:Epe,forms:Dpe,signals:kpe};function jpe(e){let t=[];for(let n of C5){let r=e[n.id];r!=null&&t.push(...Ape[n.id](r))}let n=new Map(C5.map((e,t)=>[e.id,t]));t.sort((e,t)=>e.at-t.at||n.get(e.layer)-n.get(t.layer)||(e.key<t.key?-1:+(e.key>t.key)));let r=new Set;for(let e of t){let t=e.key;for(let n=2;r.has(t);n++)t=`${e.key}#${n}`;e.key=t,r.add(t)}return t}function Mpe(e,t){let n=new Map,r=(e,t)=>{typeof e==`string`&&e&&(typeof t==`string`&&t&&!n.get(e)?n.set(e,t):n.has(e)||n.set(e,``))};for(let t of D5(e.http))r(t?.pageId,t?.title||t?.url);for(let t of D5(e.router))r(t?.pageId,t?.snapshot?.url);for(let t of D5(e.ngrx))r(t?.pageId,t?.title||t?.url);for(let e of t)r(e.pageId,``);return[...n].map(([e,t])=>({pageId:e,label:t||e}))}function Npe(e,t){let n=t.query.trim().toLowerCase();return e.filter(e=>t.layers.has(e.layer)&&(t.pageId===`all`||e.pageId===t.pageId)&&(!n||e.title.toLowerCase().includes(n)||e.detail.toLowerCase().includes(n)))}function j5(e,t){return t?e.filter(e=>e.at>=t.start&&e.at<=t.end):e}function Ppe(e){if(!e.length)return null;let t=1/0,n=-1/0;for(let r of e)t=Math.min(t,r.at),n=Math.max(n,r.at+(r.ms??0));return n-t<20?{start:t-10,end:t+10}:{start:t,end:n}}function Fpe(e,t,n){let r=Math.max(20,(e.end-e.start)*t);if(r>=n.end-n.start)return null;let i=(e.start+e.end)/2;return M5({start:i-r/2,end:i+r/2},n)}function Ipe(e,t,n){let r=(e.end-e.start)*t;return M5({start:e.start+r,end:e.end+r},n)}function M5(e,t){let n=e.end-e.start;return e.start<t.start?{start:t.start,end:t.start+n}:e.end>t.end?{start:t.end-n,end:t.end}:e}function Lpe(e,t,n){let[r,i]=t<n?[t,n]:[n,t],a=e=>Math.min(1,Math.max(0,e)),o=e.end-e.start,s=e.start+a(r)*o,c=e.start+a(i)*o;return c-s<20?null:{start:s,end:c}}function Rpe(e,t,n){let r=Math.max(1,t.end-t.start),i=new Map;for(let a of e){if(a.at<t.start||a.at>t.end)continue;let e=Math.min(n-1,Math.floor((a.at-t.start)/r*n)),o=`${a.layer}:${e}`,s=i.get(o);s||(s={layer:a.layer,slot:e,count:0},i.set(o,s)),s.count++,(a.tone===`danger`||a.tone===`warn`&&s.tone!==`danger`)&&(s.tone=a.tone)}return[...i.values()]}function zpe(e,t,n){let r=null;for(let i of e)i.layer===t&&(!r||Math.abs(i.at-n)<Math.abs(r.at-n))&&(r=i);return r}var N5=`pangular-timeline-hidden-layers`;function Bpe(){try{let e=JSON.parse(localStorage.getItem(N5)??`[]`);return Array.isArray(e)?e.filter(e=>C5.some(t=>t.id===e)):[]}catch{return[]}}function P5(e){try{localStorage.setItem(N5,JSON.stringify(e))}catch{}}function F5(e){let t=new Date(e),n=(e,t=2)=>String(e).padStart(t,`0`);return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}.${n(t.getMilliseconds(),3)}`}function I5(e){if(e<1e3)return`${Math.round(e)} ms`;if(e<6e4)return`${Math.round(e/100)/10} s`;let t=Math.floor(e/6e4),n=Math.round(e%6e4/1e3);return n?`${t} min ${n} s`:`${t} min`}var Vpe=[`tracks`],L5=(e,t)=>t.id,Hpe=(e,t)=>t.layer+t.slot,Upe=(e,t)=>t.key;function Wpe(e,t){e&1&&(F(0,`p`,3),K(1,`Loading the timeline…`),I())}function Gpe(e,t){if(e&1){let e=B();F(0,`div`,4)(1,`p`),K(2,`Can't read the timeline from the devtools server.`),I(),F(3,`button`,5),H(`click`,function(){return C(e),w(W().retry())}),K(4,`Retry`),I()()}}function Kpe(e,t){if(e&1){let e=B();F(0,`app-select`,16),H(`valueChange`,function(t){C(e);let n=W(2);return w(n.pageId.set(t??n.allPages))}),I()}if(e&2){let e=W(2);P(`options`,e.pageOptions())(`value`,e.pageId())}}function qpe(e,t){if(e&1){let e=B();F(0,`button`,17),H(`click`,function(){let t=C(e).$implicit;return w(W(2).toggleLayer(t.id))}),L(1,`span`,18),K(2),F(3,`span`,19),K(4),I()()}if(e&2){let e=t.$implicit,n=W(2);k(`aria-pressed`,!n.hidden().includes(e.id)),D(2),J(` `,e.label,` `),D(2),q(n.layerCounts()[e.id])}}function Jpe(e,t){e&1&&(F(0,`div`,3)(1,`p`),K(2,`Nothing on the timeline yet.`),I(),F(3,`p`,20),K(4,` Use the app with the overlay loaded. Navigations, HTTP calls, NgRx actions and form events show up as they happen. Record change detection on the Components tab, and pick a component on the Signals tab to follow its signals. `),I()())}function Ype(e,t){if(e&1){let e=B();F(0,`div`,3)(1,`p`),K(2),I(),F(3,`button`,5),H(`click`,function(){C(e),W();let t=kg(2);return W().clearFilters(),w(t.focus())}),K(4,` Clear filters `),I()()}if(e&2){let e=W(2);D(2),J(`No event matches the filters`,e.range()?` in this range`:``,`.`)}}function Xpe(e,t){if(e&1&&(F(0,`li`),K(1),I()),e&2){let e=t.$implicit;D(),q(e.label)}}function Zpe(e,t){if(e&1&&(T(),L(0,`line`,28)),e&2){let e=t.$index,n=W(3);k(`x2`,n.chartWidth)(`y1`,e*n.laneHeight+n.laneHeight/2)(`y2`,e*n.laneHeight+n.laneHeight/2)}}function Qpe(e,t){if(e&1&&(T(),L(0,`rect`,29)),e&2){let e=t.$implicit,n=W(3);k(`data-tone`,e.tone??null)(`x`,e.slot*n.slotWidth)(`y`,n.laneIndex()[e.layer]*n.laneHeight+4)(`width`,n.slotWidth-1)(`height`,n.laneHeight-8)(`opacity`,n.binOpacity(e.count))}}function $pe(e,t){if(e&1&&(T(),L(0,`rect`,30)),e&2){let e=t,n=W(3);k(`x`,e.x-2)(`y`,e.y+1)(`width`,n.slotWidth+3)(`height`,n.laneHeight-2)}}function eme(e,t){if(e&1&&L(0,`div`,41),e&2){let e=t;Xg(`left`,e.left,`%`)(`width`,e.width,`%`)}}function tme(e,t){if(e&1&&(F(0,`p`,37),K(1),I()),e&2){let e=W(3);D(),Y(` Showing the newest `,e.listed().length,` of `,e.shown().length,` events. Zoom in or filter to see older ones. `)}}function nme(e,t){if(e&1&&(F(0,`span`,46),K(1),I()),e&2){let e=W().$implicit;D(),q(e.detail)}}function rme(e,t){if(e&1&&(F(0,`span`,47),K(1),I()),e&2){let e=W().$implicit,t=W(3);D(),q(t.pageLabel(e.pageId))}}function ime(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,42),H(`click`,function(){let t=C(e).$implicit;return w(W(3).select(t))})(`dblclick`,function(){let t=C(e).$implicit;return w(W(3).openEvent(t))}),F(2,`time`,43),K(3),I(),F(4,`span`,44),K(5),I(),F(6,`span`,45),K(7),I(),A(8,nme,2,1,`span`,46),A(9,rme,2,1,`span`,47),I()()}if(e&2){let e=t.$implicit,n=W(3);D(),G(`selected`,e.key===n.selectedKey()),k(`aria-current`,e.key===n.selectedKey()?`true`:null)(`data-key`,e.key),D(2),q(n.clock(e.at)),D(),k(`data-tone`,e.tone??null),D(),q(n.layerLabel(e.layer)),D(2),q(e.title),D(),j(e.detail?8:-1),D(),j(n.showPage()?9:-1)}}function ame(e,t){if(e&1&&(F(0,`dt`),K(1,`Took`),I(),F(2,`dd`),K(3),I()),e&2){let e=W(),t=W(3);D(3),q(t.span(e.ms))}}function ome(e,t){if(e&1&&(F(0,`dt`),K(1,`Detail`),I(),F(2,`dd`,50),K(3),I()),e&2){let e=W();D(3),q(e.detail)}}function sme(e,t){if(e&1){let e=B();F(0,`p`,48),K(1),I(),F(2,`dl`)(3,`dt`),K(4,`Layer`),I(),F(5,`dd`),K(6),I(),F(7,`dt`),K(8,`Time`),I(),F(9,`dd`),K(10),I(),A(11,ame,4,1),A(12,ome,4,1),F(13,`dt`),K(14,`Page`),I(),F(15,`dd`),K(16),I()(),F(17,`button`,49),H(`click`,function(){let t=C(e);return w(W(3).openEvent(t))}),K(18),I()}if(e&2){let e=t,n=W(3);D(),q(e.title),D(5),q(n.layerLabel(e.layer)),D(4),q(n.clock(e.at)),D(),j(e.ms===void 0?-1:11),D(),j(e.detail?12:-1),D(4),q(e.pageId?n.pageLabel(e.pageId):`Server, no page`),D(2),J(` Open in `,n.tabLabel(e.layer),` `)}}function cme(e,t){e&1&&(F(0,`p`,20),K(1,` Select an event in the list or on the chart to see it here. Double click a row to open it in its own tab. `),I())}function lme(e,t){if(e&1){let e=B();F(0,`section`,21)(1,`div`,22)(2,`h2`,23),K(3,`Time axis`),I(),F(4,`span`,20),K(5),I()(),F(6,`div`,24)(7,`ul`,25),M(8,Xpe,2,1,`li`,null,L5),I(),F(10,`div`,26,1),H(`pointerdown`,function(t){return C(e),w(W(2).onPointerDown(t))})(`pointermove`,function(t){return C(e),w(W(2).onPointerMove(t))})(`pointerup`,function(t){return C(e),w(W(2).onPointerUp(t))})(`pointercancel`,function(){return C(e),w(W(2).brush.set(null))}),T(),F(12,`svg`,27),M(13,Zpe,1,3,`:svg:line`,28,L5),M(15,Qpe,1,6,`:svg:rect`,29,Hpe),A(17,$pe,1,4,`:svg:rect`,30),I(),A(18,eme,1,4,`div`,31),I()(),cs(),F(19,`div`,32)(20,`span`),K(21),I(),F(22,`span`),K(23),I()(),F(24,`p`,33),K(25,` Drag across the chart to look at a range, and click a mark to select the nearest event. The list below holds the same events. `),I()(),F(26,`div`,34)(27,`section`,35)(28,`h2`,36),K(29,`Events`),I(),A(30,tme,2,2,`p`,37),F(31,`ol`,38),M(32,ime,10,10,`li`,null,Upe),I()(),F(34,`aside`,39)(35,`h2`,40),K(36,`Selected event`),I(),A(37,sme,19,7)(38,cme,2,0,`p`,20),I()()}if(e&2){let e,t,n,r=W(2);D(5),q(r.viewText()),D(3),N(r.lanes()),D(2),Xg(`height`,r.lanes().length*r.laneHeight,`px`),k(`aria-label`,r.chartLabel()),D(2),k(`viewBox`,`0 0 `+r.chartWidth+` `+r.lanes().length*r.laneHeight),D(),N(r.lanes()),D(2),N(r.bins()),D(2),j((e=r.selectedMark())?17:-1,e),D(),j((t=r.brushBox())?18:-1,t),D(3),q(r.clock(r.view().start)),D(2),q(r.clock(r.view().end)),D(7),j(r.shown().length>r.listed().length?30:-1),D(2),N(r.listed()),D(5),j((n=r.selected())?37:38,n)}}function ume(e,t){if(e&1){let e=B();F(0,`div`,6)(1,`app-search-field`,7,0),S_(`valueChange`,function(t){C(e);let n=W();return x_(n.query,t)||(n.query=t),w(t)}),I(),A(3,Kpe,1,2,`app-select`,8),F(4,`span`,9),K(5),I(),F(6,`p`,10),K(7),I()(),F(8,`div`,11)(9,`div`,12),M(10,qpe,5,3,`button`,13,L5),I(),F(12,`div`,14)(13,`button`,15),H(`click`,function(){return C(e),w(W().zoom(.5))}),K(14,` Zoom in `),I(),F(15,`button`,15),H(`click`,function(){return C(e),w(W().zoom(2))}),K(16,` Zoom out `),I(),F(17,`button`,15),H(`click`,function(){return C(e),w(W().pan(-1))}),K(18,` Earlier `),I(),F(19,`button`,15),H(`click`,function(){return C(e),w(W().pan(1))}),K(20,` Later `),I(),F(21,`button`,15),H(`click`,function(){return C(e),w(W().range.set(null))}),K(22,` Show all `),I()()(),A(23,Jpe,5,0,`div`,3)(24,Ype,5,1,`div`,3)(25,lme,39,11)}if(e&2){let e=W();D(),b_(`value`,e.query),D(2),j(e.pageOptions().length>2?3:-1),D(2),q(e.countText()),D(2),q(e.countStatus()),D(3),N(e.layers()),D(3),P(`disabled`,!e.canZoomIn()),D(2),P(`disabled`,!e.range()),D(2),P(`disabled`,!e.canPan(-1)),D(2),P(`disabled`,!e.canPan(1)),D(2),P(`disabled`,!e.range()),D(2),j(e.events().length?e.shown().length?25:24:23)}}var R5=240,z5=1e3,dme=4,fme=class e{rpc=$(null);open=Q_();destroyRef=S(vs);tracks=av(`tracks`);host=S(kl);hostPageId=fT();cleanups=[];loads=0;allPages=`all`;clock=F5;span=I5;laneHeight=24;chartWidth=z5;slotWidth=z5/R5;loading=E(!0);failed=E(!1);sources=E({});query=E(``);hidden=E(Bpe());range=E(null);selectedKey=E(null);brush=E(null);layers=X(()=>vpe(NT(this.rpc())));events=X(()=>{let e=new Set(this.layers().map(e=>e.id));return jpe(this.sources()).filter(t=>e.has(t.layer))});pages=X(()=>Mpe(this.sources(),this.events()));pageId=Q({source:()=>this.pages().map(e=>e.pageId),computation:(e,t)=>t&&(t.value===`all`||e.includes(t.value))?t.value:this.hostPageId&&e.includes(this.hostPageId)?this.hostPageId:`all`});pageOptions=X(()=>[{value:`all`,label:`All pages`},...this.pages().map(e=>({value:e.pageId,label:e.label,...e.label===e.pageId?{}:{hint:e.pageId}}))]);showPage=X(()=>this.pageId()===`all`&&this.pages().length>1);matching=X(()=>Npe(this.events(),{layers:new Set(C5.map(e=>e.id)),pageId:this.pageId(),query:this.query()}));layerCounts=X(()=>{let e=Object.fromEntries(C5.map(e=>[e.id,0]));for(let t of j5(this.matching(),this.range()))e[t.layer]++;return e});visible=X(()=>{let e=new Set(this.hidden());return this.matching().filter(t=>!e.has(t.layer))});lanes=X(()=>{let e=new Set(this.hidden());return this.layers().filter(t=>!e.has(t.id))});laneIndex=X(()=>Object.fromEntries(this.lanes().map((e,t)=>[e.id,t])));bounds=X(()=>Ppe(this.visible()));view=X(()=>this.range()??this.bounds());shown=X(()=>j5(this.visible(),this.range()));listed=X(()=>this.shown().slice(-200).reverse());bins=X(()=>{let e=this.view();return e?Rpe(this.shown(),e,R5):[]});maxBin=X(()=>this.bins().reduce((e,t)=>Math.max(e,t.count),1));selected=X(()=>this.events().find(e=>e.key===this.selectedKey())??null);selectedMark=X(()=>{let e=this.selected(),t=this.view(),n=e?this.laneIndex()[e.layer]:void 0;if(!e||!t||n===void 0||e.at<t.start||e.at>t.end)return null;let r=Math.max(1,t.end-t.start);return{x:Math.min(239,Math.floor((e.at-t.start)/r*R5))*this.slotWidth,y:n*this.laneHeight}});brushBox=X(()=>{let e=this.brush();if(!e)return null;let t=Math.min(e.from,e.to),n=Math.max(e.from,e.to);return{left:t*100,width:(n-t)*100}});countText=X(()=>{let e=this.events().length;return`${this.shown().length} of ${e} ${e===1?`event`:`events`}`});countStatus=f5(()=>[this.query(),this.hidden(),this.pageId(),this.range()],()=>this.countText());viewText=X(()=>{let e=this.view();if(!e)return``;let t=I5(e.end-e.start);return this.range()?`Range of ${t}`:`All ${t}`});chartLabel=X(()=>{let e=this.view();if(!e)return`Timeline`;let t=this.layerCounts(),n=this.lanes().map(e=>`${e.label} ${t[e.id]}`);return`Timeline from ${F5(e.start)} to ${F5(e.end)}: ${n.join(`, `)}. The Events list holds the same events.`});canZoomIn=X(()=>{let e=this.view();return!!e&&e.end-e.start>40});constructor(){ac(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.stop())}layerLabel(e){return w5[e].label}tabLabel(e){return w5[e].tabLabel}pageLabel(e){return e?this.pages().find(t=>t.pageId===e)?.label??e:`Server`}binOpacity(e){return Math.round((.55+.45*Math.min(1,Math.log2(e+1)/Math.log2(this.maxBin()+1)))*100)/100}toggleLayer(e){let t=this.hidden().includes(e)?this.hidden().filter(t=>t!==e):[...this.hidden(),e];this.hidden.set(t),P5(t)}clearFilters(){this.query.set(``),this.range.set(null),this.hidden.set([]),P5([]),this.pageId.set(`all`)}zoom(e){let t=this.view(),n=this.bounds();t&&n&&this.range.set(Fpe(t,e,n))}canPan(e){let t=this.range(),n=this.bounds();return!t||!n?!1:e<0?t.start>n.start:t.end<n.end}pan(e){let t=this.range(),n=this.bounds();t&&n&&this.range.set(Ipe(t,e*.5,n))}select(e){this.selectedKey.set(e.key)}openEvent(e){this.open.emit(e.link)}share(e){let t=this.tracks()?.nativeElement.getBoundingClientRect();return!t||t.width<=0?0:Math.min(1,Math.max(0,(e.clientX-t.left)/t.width))}onPointerDown(e){if(e.pointerType===`mouse`&&e.button!==0)return;let t=this.share(e);this.brush.set({from:t,to:t,id:e.pointerId}),this.downX=e.clientX;try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}e.preventDefault()}onPointerMove(e){let t=this.brush();t&&t.id===e.pointerId&&this.brush.set({...t,to:this.share(e)})}onPointerUp(e){let t=this.brush(),n=this.view();if(this.brush.set(null),!t||t.id!==e.pointerId||!n)return;if(Math.abs(e.clientX-this.downX)<dme){this.pick(e,n);return}let r=Lpe(n,t.from,this.share(e));r&&this.range.set(r)}downX=0;pick(e,t){let n=this.tracks()?.nativeElement.getBoundingClientRect(),r=this.lanes();if(!n||!r.length)return;let i=r[Math.min(r.length-1,Math.max(0,Math.floor((e.clientY-n.top)/this.laneHeight)))],a=t.start+this.share(e)*(t.end-t.start),o=zpe(this.shown(),i.id,a);o&&(this.selectedKey.set(o.key),queueMicrotask(()=>{this.host.nativeElement.querySelector(`button.row[data-key="${CSS.escape(o.key)}"]`)?.scrollIntoView?.({block:`nearest`})}))}retry(){let e=this.rpc();e&&this.load(e)}stop(){for(let e of this.cleanups.splice(0))e()}async load(e){this.stop();let t=++this.loads;this.loading.set(!0),this.failed.set(!1);let n=e.scope(`pangular`).rpc,r=await Promise.allSettled(C5.map(async e=>{let r=await n.sharedState(e.state);if(this.destroyRef.destroyed||t!==this.loads)return;let i=t=>this.sources.update(n=>({...n,[e.id]:t}));i(r.value()),this.cleanups.push(r.on(`updated`,i))}));this.destroyRef.destroyed||t!==this.loads||(this.failed.set(r.every(e=>e.status===`rejected`)),this.loading.set(!1))}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-timeline`]],viewQuery:function(e,t){e&1&&Dg(t.tracks,Vpe,5),e&2&&Og()},inputs:{rpc:[1,`rpc`]},outputs:{open:`open`},decls:5,vars:1,consts:[[`search`,``],[`tracks`,``],[1,`intro`],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`toolbar`],[`placeholder`,`Filter by name, URL or detail`,`saveKey`,`timeline`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`options`,`value`],[1,`count`],[`role`,`status`,1,`sr-only`],[1,`controls`],[`role`,`group`,`aria-label`,`Layers`,1,`layers`],[`type`,`button`,1,`layer`],[`role`,`group`,`aria-label`,`Time range`,1,`zoom`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`ariaLabel`,`Page`,1,`page-select`,3,`valueChange`,`options`,`value`],[`type`,`button`,1,`layer`,3,`click`],[`aria-hidden`,`true`,1,`check`],[1,`badge`],[1,`muted`],[`aria-labelledby`,`timeline-chart-heading`,1,`chart-card`],[1,`chart-head`],[`id`,`timeline-chart-heading`],[1,`chart`],[`aria-hidden`,`true`,1,`lane-labels`],[`role`,`img`,1,`tracks`,3,`pointerdown`,`pointermove`,`pointerup`,`pointercancel`],[`preserveAspectRatio`,`none`,`aria-hidden`,`true`],[`x1`,`0`,1,`lane-line`],[1,`mark`],[1,`selected-mark`],[1,`brush`,3,`left`,`width`],[`aria-hidden`,`true`,1,`axis`],[1,`hint`],[1,`split`],[`aria-labelledby`,`timeline-events-heading`,1,`events`],[`id`,`timeline-events-heading`],[1,`note`],[`appRovingList`,`button.row`,`aria-label`,`Events, newest first`,1,`rows`],[`aria-labelledby`,`timeline-detail-heading`,1,`detail-panel`],[`id`,`timeline-detail-heading`],[1,`brush`],[`type`,`button`,1,`row`,3,`click`,`dblclick`],[1,`when`],[1,`chip`],[1,`title`],[1,`detail`],[1,`page`],[1,`detail-title`],[`type`,`button`,1,`primary`,3,`click`],[1,`mono`]],template:function(e,t){e&1&&(F(0,`p`,2),K(1,` Navigations, HTTP calls, NgRx actions, change detection cycles, form events and signal changes from the live page on one time axis. Turn layers on and off, drag across the chart to look at a range, and open an event in its own tab. `),I(),A(2,Wpe,2,0,`p`,3)(3,Gpe,5,0,`div`,4)(4,ume,26,10)),e&2&&(D(2),j(t.loading()?2:t.failed()?3:4))},dependencies:[OD,iV,nP],styles:[`[_nghost-%COMP%] { +}`]})},C5=[{id:`router`,label:`Router`,tab:`routes`,tabLabel:`Routes`,inspector:`router`,state:`router`},{id:`http`,label:`HTTP`,tab:`network`,tabLabel:`SSR & HTTP`,inspector:`http`,state:`http`},{id:`ngrx`,label:`NgRx`,tab:`store`,tabLabel:`Store`,inspector:`ngrx`,state:`ngrx-store`},{id:`cd`,label:`Change detection`,tab:`components`,tabLabel:`Components`,inspector:`components`,state:`change-detection`},{id:`forms`,label:`Forms`,tab:`forms`,tabLabel:`Forms`,inspector:`forms`,state:`forms`},{id:`signals`,label:`Signals`,tab:`signals`,tabLabel:`Signals`,inspector:`signals`,state:`signal-graph`}],w5=Object.fromEntries(C5.map(e=>[e.id,e]));function Tpe(e){return C5.filter(t=>e.inspectors[t.inspector])}function T5(e){return Array.isArray(e)?e:[]}function E5(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function D5(e){let t=E5(e).pages;return Array.isArray(t)?t:Object.values(E5(t))}function O5(e){return typeof e==`number`&&Number.isFinite(e)}function Epe(e){try{let t=new URL(e,`http://x`);return e.startsWith(`/`)||t.host===`x`?`${t.pathname}${t.search}`:e.replace(/^[a-z]+:\/\/[^/]+/i,``)||e}catch{return e}}function k5(e){return e<10?`${Math.round(e*10)/10} ms`:`${Math.round(e)} ms`}function Dpe(e){let t;try{t=typeof e==`string`?JSON.stringify(e):JSON.stringify(e)??``}catch{t=String(e)}return t.length>80?`${t.slice(0,79)}…`:t}function Ope(e){let t=[];for(let n of D5(e)){let e=typeof n?.pageId==`string`?n.pageId:``;for(let r of T5(n?.navigations)){if(!O5(r?.startedAt)||r.probe||r.beforeConnect)continue;let n=O5(r.endedAt)?Math.max(0,r.endedAt-r.startedAt):void 0,i=r.finalUrl&&r.finalUrl!==r.url?` to ${r.finalUrl}`:``;t.push({key:`router:${e}:${r.id}`,layer:`router`,pageId:e,at:r.startedAt,...n===void 0?{}:{ms:n},title:`Navigation to ${r.url}`,detail:[`${r.outcome}${i}`,r.trigger,n===void 0?``:k5(n)].filter(Boolean).join(` · `),...r.outcome===`failed`?{tone:`danger`}:r.outcome===`cancelled`||r.outcome===`redirected`?{tone:`warn`}:{},link:{tab:`routes`,...e?{page:e}:{}}})}}return t}function kpe(e){let t=e.status??0;if(e.error||t>=500||t===0&&!e.cancelled)return`danger`;if(t>=400||e.faulted||e.cancelled)return`warn`}function A5(e,t){if(!O5(e?.at))return null;let n=e.side===`server`?`SSR`:`client`,r=e.status?String(e.status):e.cancelled?`cancelled`:`no response`,i=O5(e.durationMs)?e.durationMs:void 0,a=kpe(e);return{key:`http:${e.side===`server`?`server`:t}:${e.id??e.at}`,layer:`http`,pageId:t,at:e.at,...i===void 0?{}:{ms:i},title:`${e.method??`GET`} ${Epe(e.url??``)}`,detail:[r,n,i===void 0?``:k5(i),e.cacheHit?`from cache`:``,e.mocked?`mocked`:e.faulted?`fault rule`:``].filter(Boolean).join(` · `),...a?{tone:a}:{},link:{tab:`network`,...t?{page:t}:{}}}}function Ape(e){let t=[],n=D5(e);for(let e of n){let n=typeof e?.pageId==`string`?e.pageId:``;for(let r of T5(e?.calls)){let e=A5(r,n);e&&t.push(e)}}for(let r of T5(E5(e).serverCalls)){let e=r?.pageUrl?n.find(e=>e?.initialUrl&&e.initialUrl===r.pageUrl):void 0,i=A5({...r,side:`server`},e?.pageId??``);i&&t.push(i)}return t}function jpe(e){let t=[];for(let n of D5(e)){let e=typeof n?.pageId==`string`?n.pageId:``;for(let r of T5(n?.log)){if(!O5(r?.timestamp))continue;let n=T5(r.diff).length+(r.diffTruncated??0),i=O5(r.durationMs)?r.durationMs:void 0;t.push({key:`ngrx:${e}:${r.seq}`,layer:`ngrx`,pageId:e,at:r.timestamp,...i===void 0?{}:{ms:i},title:r.source===`event`?r.eventType??r.type:r.type,detail:[r.storeId,r.source===`event`?`event`:n?`${n} ${n===1?`change`:`changes`}`:`no change`,i===void 0?``:k5(i)].filter(Boolean).join(` · `),link:{tab:`store`,...e?{page:e}:{}}})}}return t}var Mpe=16;function Npe(e){let t=[];for(let n of D5(e)){let e=typeof n?.pageId==`string`?n.pageId:``;for(let r of T5(n?.cycles)){if(!O5(r?.at))continue;let n=O5(r.ms)?r.ms:0;t.push({key:`cd:${e}:${r.id}`,layer:`cd`,pageId:e,at:r.at,ms:n,title:`Change detection cycle ${r.id}`,detail:[k5(n),`${r.checks} ${r.checks===1?`check`:`checks`}`,r.trigger?`after ${r.trigger}`:``].filter(Boolean).join(` · `),...n>Mpe?{tone:`warn`}:{},link:{tab:`components`,...e?{page:e}:{}}})}}return t}function Ppe(e){return T5(E5(e).events).flatMap((e,t)=>{if(!O5(e?.timestamp)||typeof e.formId!=`string`)return[];let n=ST(e.formId),r=[e.detail,e.origin,e.outcome].filter(Boolean).join(` · `);return[{key:`forms:${e.formId}:${e.seq??`i${t}`}`,layer:`forms`,pageId:n,at:e.timestamp,...O5(e.ms)?{ms:e.ms}:{},title:`${e.type} ${e.path||`form`}`,detail:r,...e.type===`submit`&&e.outcome===`invalid`?{tone:`warn`}:{},link:{tab:`forms`,id:e.formId,...n?{page:n}:{}}}]})}var Fpe={write:`set`,sample:`sampled`};function Ipe(e){let t=[],n=E5(E5(e).pages),r=Object.keys(n).length?Object.entries(n):[[``,E5(e).graph]];for(let[e,n]of r){let r=E5(n),i=typeof r.pageId==`string`?r.pageId:String(e),a=new Map(T5(r.nodes).map(e=>[e?.id,e?.label||e?.kind||`signal`]));for(let[e,n]of Object.entries(E5(r.history)))for(let r of T5(n)){if(!O5(r?.at)||r.source===`initial`)continue;let n=a.get(e)??e;t.push({key:`signals:${i}:${e}:${r.epoch??r.at}`,layer:`signals`,pageId:i,at:r.at,title:`${n} ${Fpe[r.source??``]??`changed`}`,detail:Dpe(r.value),link:{tab:`signals`,...i?{page:i}:{}}})}}return t}var Lpe={router:Ope,http:Ape,ngrx:jpe,cd:Npe,forms:Ppe,signals:Ipe};function Rpe(e){let t=[];for(let n of C5){let r=e[n.id];r!=null&&t.push(...Lpe[n.id](r))}let n=new Map(C5.map((e,t)=>[e.id,t]));t.sort((e,t)=>e.at-t.at||n.get(e.layer)-n.get(t.layer)||(e.key<t.key?-1:+(e.key>t.key)));let r=new Set;for(let e of t){let t=e.key;for(let n=2;r.has(t);n++)t=`${e.key}#${n}`;e.key=t,r.add(t)}return t}function zpe(e,t){let n=new Map,r=(e,t)=>{typeof e==`string`&&e&&(typeof t==`string`&&t&&!n.get(e)?n.set(e,t):n.has(e)||n.set(e,``))};for(let t of D5(e.http))r(t?.pageId,t?.title||t?.url);for(let t of D5(e.router))r(t?.pageId,t?.snapshot?.url);for(let t of D5(e.ngrx))r(t?.pageId,t?.title||t?.url);for(let e of t)r(e.pageId,``);return[...n].map(([e,t])=>({pageId:e,label:t||e}))}function Bpe(e,t){let n=t.query.trim().toLowerCase();return e.filter(e=>t.layers.has(e.layer)&&(t.pageId===`all`||e.pageId===t.pageId)&&(!n||e.title.toLowerCase().includes(n)||e.detail.toLowerCase().includes(n)))}function j5(e,t){return t?e.filter(e=>e.at>=t.start&&e.at<=t.end):e}function Vpe(e){if(!e.length)return null;let t=1/0,n=-1/0;for(let r of e)t=Math.min(t,r.at),n=Math.max(n,r.at+(r.ms??0));return n-t<20?{start:t-10,end:t+10}:{start:t,end:n}}function Hpe(e,t,n){let r=Math.max(20,(e.end-e.start)*t);if(r>=n.end-n.start)return null;let i=(e.start+e.end)/2;return M5({start:i-r/2,end:i+r/2},n)}function Upe(e,t,n){let r=(e.end-e.start)*t;return M5({start:e.start+r,end:e.end+r},n)}function M5(e,t){let n=e.end-e.start;return e.start<t.start?{start:t.start,end:t.start+n}:e.end>t.end?{start:t.end-n,end:t.end}:e}function Wpe(e,t,n){let[r,i]=t<n?[t,n]:[n,t],a=e=>Math.min(1,Math.max(0,e)),o=e.end-e.start,s=e.start+a(r)*o,c=e.start+a(i)*o;return c-s<20?null:{start:s,end:c}}function Gpe(e,t,n){let r=Math.max(1,t.end-t.start),i=new Map;for(let a of e){if(a.at<t.start||a.at>t.end)continue;let e=Math.min(n-1,Math.floor((a.at-t.start)/r*n)),o=`${a.layer}:${e}`,s=i.get(o);s||(s={layer:a.layer,slot:e,count:0},i.set(o,s)),s.count++,(a.tone===`danger`||a.tone===`warn`&&s.tone!==`danger`)&&(s.tone=a.tone)}return[...i.values()]}function Kpe(e,t,n){let r=null;for(let i of e)i.layer===t&&(!r||Math.abs(i.at-n)<Math.abs(r.at-n))&&(r=i);return r}var N5=`pangular-timeline-hidden-layers`;function qpe(){try{let e=JSON.parse(localStorage.getItem(N5)??`[]`);return Array.isArray(e)?e.filter(e=>C5.some(t=>t.id===e)):[]}catch{return[]}}function P5(e){try{localStorage.setItem(N5,JSON.stringify(e))}catch{}}function F5(e){let t=new Date(e),n=(e,t=2)=>String(e).padStart(t,`0`);return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}.${n(t.getMilliseconds(),3)}`}function I5(e){if(e<1e3)return`${Math.round(e)} ms`;if(e<6e4)return`${Math.round(e/100)/10} s`;let t=Math.floor(e/6e4),n=Math.round(e%6e4/1e3);return n?`${t} min ${n} s`:`${t} min`}var Jpe=[`tracks`],L5=(e,t)=>t.id,Ype=(e,t)=>t.layer+t.slot,Xpe=(e,t)=>t.key;function Zpe(e,t){e&1&&(F(0,`p`,3),K(1,`Loading the timeline…`),I())}function Qpe(e,t){if(e&1){let e=B();F(0,`div`,4)(1,`p`),K(2,`Can't read the timeline from the devtools server.`),I(),F(3,`button`,5),H(`click`,function(){return C(e),w(W().retry())}),K(4,`Retry`),I()()}}function $pe(e,t){if(e&1){let e=B();F(0,`app-select`,16),H(`valueChange`,function(t){C(e);let n=W(2);return w(n.pageId.set(t??n.allPages))}),I()}if(e&2){let e=W(2);P(`options`,e.pageOptions())(`value`,e.pageId())}}function eme(e,t){if(e&1){let e=B();F(0,`button`,17),H(`click`,function(){let t=C(e).$implicit;return w(W(2).toggleLayer(t.id))}),L(1,`span`,18),K(2),F(3,`span`,19),K(4),I()()}if(e&2){let e=t.$implicit,n=W(2);k(`aria-pressed`,!n.hidden().includes(e.id)),D(2),J(` `,e.label,` `),D(2),q(n.layerCounts()[e.id])}}function tme(e,t){e&1&&(F(0,`div`,3)(1,`p`),K(2,`Nothing on the timeline yet.`),I(),F(3,`p`,20),K(4,` Use the app with the overlay loaded. Navigations, HTTP calls, NgRx actions and form events show up as they happen. Record change detection on the Components tab, and pick a component on the Signals tab to follow its signals. `),I()())}function nme(e,t){if(e&1){let e=B();F(0,`div`,3)(1,`p`),K(2),I(),F(3,`button`,5),H(`click`,function(){C(e),W();let t=Ag(2);return W().clearFilters(),w(t.focus())}),K(4,` Clear filters `),I()()}if(e&2){let e=W(2);D(2),J(`No event matches the filters`,e.range()?` in this range`:``,`.`)}}function rme(e,t){if(e&1&&(F(0,`li`),K(1),I()),e&2){let e=t.$implicit;D(),q(e.label)}}function ime(e,t){if(e&1&&(T(),L(0,`line`,28)),e&2){let e=t.$index,n=W(3);k(`x2`,n.chartWidth)(`y1`,e*n.laneHeight+n.laneHeight/2)(`y2`,e*n.laneHeight+n.laneHeight/2)}}function ame(e,t){if(e&1&&(T(),L(0,`rect`,29)),e&2){let e=t.$implicit,n=W(3);k(`data-tone`,e.tone??null)(`x`,e.slot*n.slotWidth)(`y`,n.laneIndex()[e.layer]*n.laneHeight+4)(`width`,n.slotWidth-1)(`height`,n.laneHeight-8)(`opacity`,n.binOpacity(e.count))}}function ome(e,t){if(e&1&&(T(),L(0,`rect`,30)),e&2){let e=t,n=W(3);k(`x`,e.x-2)(`y`,e.y+1)(`width`,n.slotWidth+3)(`height`,n.laneHeight-2)}}function sme(e,t){if(e&1&&L(0,`div`,41),e&2){let e=t;Zg(`left`,e.left,`%`)(`width`,e.width,`%`)}}function cme(e,t){if(e&1&&(F(0,`p`,37),K(1),I()),e&2){let e=W(3);D(),Y(` Showing the newest `,e.listed().length,` of `,e.shown().length,` events. Zoom in or filter to see older ones. `)}}function lme(e,t){if(e&1&&(F(0,`span`,46),K(1),I()),e&2){let e=W().$implicit;D(),q(e.detail)}}function ume(e,t){if(e&1&&(F(0,`span`,47),K(1),I()),e&2){let e=W().$implicit,t=W(3);D(),q(t.pageLabel(e.pageId))}}function dme(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,42),H(`click`,function(){let t=C(e).$implicit;return w(W(3).select(t))})(`dblclick`,function(){let t=C(e).$implicit;return w(W(3).openEvent(t))}),F(2,`time`,43),K(3),I(),F(4,`span`,44),K(5),I(),F(6,`span`,45),K(7),I(),A(8,lme,2,1,`span`,46),A(9,ume,2,1,`span`,47),I()()}if(e&2){let e=t.$implicit,n=W(3);D(),G(`selected`,e.key===n.selectedKey()),k(`aria-current`,e.key===n.selectedKey()?`true`:null)(`data-key`,e.key),D(2),q(n.clock(e.at)),D(),k(`data-tone`,e.tone??null),D(),q(n.layerLabel(e.layer)),D(2),q(e.title),D(),j(e.detail?8:-1),D(),j(n.showPage()?9:-1)}}function fme(e,t){if(e&1&&(F(0,`dt`),K(1,`Took`),I(),F(2,`dd`),K(3),I()),e&2){let e=W(),t=W(3);D(3),q(t.span(e.ms))}}function pme(e,t){if(e&1&&(F(0,`dt`),K(1,`Detail`),I(),F(2,`dd`,50),K(3),I()),e&2){let e=W();D(3),q(e.detail)}}function mme(e,t){if(e&1){let e=B();F(0,`p`,48),K(1),I(),F(2,`dl`)(3,`dt`),K(4,`Layer`),I(),F(5,`dd`),K(6),I(),F(7,`dt`),K(8,`Time`),I(),F(9,`dd`),K(10),I(),A(11,fme,4,1),A(12,pme,4,1),F(13,`dt`),K(14,`Page`),I(),F(15,`dd`),K(16),I()(),F(17,`button`,49),H(`click`,function(){let t=C(e);return w(W(3).openEvent(t))}),K(18),I()}if(e&2){let e=t,n=W(3);D(),q(e.title),D(5),q(n.layerLabel(e.layer)),D(4),q(n.clock(e.at)),D(),j(e.ms===void 0?-1:11),D(),j(e.detail?12:-1),D(4),q(e.pageId?n.pageLabel(e.pageId):`Server, no page`),D(2),J(` Open in `,n.tabLabel(e.layer),` `)}}function hme(e,t){e&1&&(F(0,`p`,20),K(1,` Select an event in the list or on the chart to see it here. Double click a row to open it in its own tab. `),I())}function gme(e,t){if(e&1){let e=B();F(0,`section`,21)(1,`div`,22)(2,`h2`,23),K(3,`Time axis`),I(),F(4,`span`,20),K(5),I()(),F(6,`div`,24)(7,`ul`,25),M(8,rme,2,1,`li`,null,L5),I(),F(10,`div`,26,1),H(`pointerdown`,function(t){return C(e),w(W(2).onPointerDown(t))})(`pointermove`,function(t){return C(e),w(W(2).onPointerMove(t))})(`pointerup`,function(t){return C(e),w(W(2).onPointerUp(t))})(`pointercancel`,function(){return C(e),w(W(2).brush.set(null))}),T(),F(12,`svg`,27),M(13,ime,1,3,`:svg:line`,28,L5),M(15,ame,1,6,`:svg:rect`,29,Ype),A(17,ome,1,4,`:svg:rect`,30),I(),A(18,sme,1,4,`div`,31),I()(),cs(),F(19,`div`,32)(20,`span`),K(21),I(),F(22,`span`),K(23),I()(),F(24,`p`,33),K(25,` Drag across the chart to look at a range, and click a mark to select the nearest event. The list below holds the same events. `),I()(),F(26,`div`,34)(27,`section`,35)(28,`h2`,36),K(29,`Events`),I(),A(30,cme,2,2,`p`,37),F(31,`ol`,38),M(32,dme,10,10,`li`,null,Xpe),I()(),F(34,`aside`,39)(35,`h2`,40),K(36,`Selected event`),I(),A(37,mme,19,7)(38,hme,2,0,`p`,20),I()()}if(e&2){let e,t,n,r=W(2);D(5),q(r.viewText()),D(3),N(r.lanes()),D(2),Zg(`height`,r.lanes().length*r.laneHeight,`px`),k(`aria-label`,r.chartLabel()),D(2),k(`viewBox`,`0 0 `+r.chartWidth+` `+r.lanes().length*r.laneHeight),D(),N(r.lanes()),D(2),N(r.bins()),D(2),j((e=r.selectedMark())?17:-1,e),D(),j((t=r.brushBox())?18:-1,t),D(3),q(r.clock(r.view().start)),D(2),q(r.clock(r.view().end)),D(7),j(r.shown().length>r.listed().length?30:-1),D(2),N(r.listed()),D(5),j((n=r.selected())?37:38,n)}}function _me(e,t){if(e&1){let e=B();F(0,`div`,6)(1,`app-search-field`,7,0),w_(`valueChange`,function(t){C(e);let n=W();return C_(n.query,t)||(n.query=t),w(t)}),I(),A(3,$pe,1,2,`app-select`,8),F(4,`span`,9),K(5),I(),F(6,`p`,10),K(7),I()(),F(8,`div`,11)(9,`div`,12),M(10,eme,5,3,`button`,13,L5),I(),F(12,`div`,14)(13,`button`,15),H(`click`,function(){return C(e),w(W().zoom(.5))}),K(14,` Zoom in `),I(),F(15,`button`,15),H(`click`,function(){return C(e),w(W().zoom(2))}),K(16,` Zoom out `),I(),F(17,`button`,15),H(`click`,function(){return C(e),w(W().pan(-1))}),K(18,` Earlier `),I(),F(19,`button`,15),H(`click`,function(){return C(e),w(W().pan(1))}),K(20,` Later `),I(),F(21,`button`,15),H(`click`,function(){return C(e),w(W().range.set(null))}),K(22,` Show all `),I()()(),A(23,tme,5,0,`div`,3)(24,nme,5,1,`div`,3)(25,gme,39,11)}if(e&2){let e=W();D(),S_(`value`,e.query),D(2),j(e.pageOptions().length>2?3:-1),D(2),q(e.countText()),D(2),q(e.countStatus()),D(3),N(e.layers()),D(3),P(`disabled`,!e.canZoomIn()),D(2),P(`disabled`,!e.range()),D(2),P(`disabled`,!e.canPan(-1)),D(2),P(`disabled`,!e.canPan(1)),D(2),P(`disabled`,!e.range()),D(2),j(e.events().length?e.shown().length?25:24:23)}}var R5=240,z5=1e3,vme=4,yme=class e{rpc=$(null);open=ev();destroyRef=S(vs);tracks=sv(`tracks`);host=S(kl);hostPageId=fT();cleanups=[];loads=0;allPages=`all`;clock=F5;span=I5;laneHeight=24;chartWidth=z5;slotWidth=z5/R5;loading=E(!0);failed=E(!1);sources=E({});query=E(``);hidden=E(qpe());range=E(null);selectedKey=E(null);brush=E(null);layers=X(()=>Tpe(NT(this.rpc())));events=X(()=>{let e=new Set(this.layers().map(e=>e.id));return Rpe(this.sources()).filter(t=>e.has(t.layer))});pages=X(()=>zpe(this.sources(),this.events()));pageId=Q({source:()=>this.pages().map(e=>e.pageId),computation:(e,t)=>t&&(t.value===`all`||e.includes(t.value))?t.value:this.hostPageId&&e.includes(this.hostPageId)?this.hostPageId:`all`});pageOptions=X(()=>[{value:`all`,label:`All pages`},...this.pages().map(e=>({value:e.pageId,label:e.label,...e.label===e.pageId?{}:{hint:e.pageId}}))]);showPage=X(()=>this.pageId()===`all`&&this.pages().length>1);matching=X(()=>Bpe(this.events(),{layers:new Set(C5.map(e=>e.id)),pageId:this.pageId(),query:this.query()}));layerCounts=X(()=>{let e=Object.fromEntries(C5.map(e=>[e.id,0]));for(let t of j5(this.matching(),this.range()))e[t.layer]++;return e});visible=X(()=>{let e=new Set(this.hidden());return this.matching().filter(t=>!e.has(t.layer))});lanes=X(()=>{let e=new Set(this.hidden());return this.layers().filter(t=>!e.has(t.id))});laneIndex=X(()=>Object.fromEntries(this.lanes().map((e,t)=>[e.id,t])));bounds=X(()=>Vpe(this.visible()));view=X(()=>this.range()??this.bounds());shown=X(()=>j5(this.visible(),this.range()));listed=X(()=>this.shown().slice(-200).reverse());bins=X(()=>{let e=this.view();return e?Gpe(this.shown(),e,R5):[]});maxBin=X(()=>this.bins().reduce((e,t)=>Math.max(e,t.count),1));selected=X(()=>this.events().find(e=>e.key===this.selectedKey())??null);selectedMark=X(()=>{let e=this.selected(),t=this.view(),n=e?this.laneIndex()[e.layer]:void 0;if(!e||!t||n===void 0||e.at<t.start||e.at>t.end)return null;let r=Math.max(1,t.end-t.start);return{x:Math.min(239,Math.floor((e.at-t.start)/r*R5))*this.slotWidth,y:n*this.laneHeight}});brushBox=X(()=>{let e=this.brush();if(!e)return null;let t=Math.min(e.from,e.to),n=Math.max(e.from,e.to);return{left:t*100,width:(n-t)*100}});countText=X(()=>{let e=this.events().length;return`${this.shown().length} of ${e} ${e===1?`event`:`events`}`});countStatus=f5(()=>[this.query(),this.hidden(),this.pageId(),this.range()],()=>this.countText());viewText=X(()=>{let e=this.view();if(!e)return``;let t=I5(e.end-e.start);return this.range()?`Range of ${t}`:`All ${t}`});chartLabel=X(()=>{let e=this.view();if(!e)return`Timeline`;let t=this.layerCounts(),n=this.lanes().map(e=>`${e.label} ${t[e.id]}`);return`Timeline from ${F5(e.start)} to ${F5(e.end)}: ${n.join(`, `)}. The Events list holds the same events.`});canZoomIn=X(()=>{let e=this.view();return!!e&&e.end-e.start>40});constructor(){ac(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.stop())}layerLabel(e){return w5[e].label}tabLabel(e){return w5[e].tabLabel}pageLabel(e){return e?this.pages().find(t=>t.pageId===e)?.label??e:`Server`}binOpacity(e){return Math.round((.55+.45*Math.min(1,Math.log2(e+1)/Math.log2(this.maxBin()+1)))*100)/100}toggleLayer(e){let t=this.hidden().includes(e)?this.hidden().filter(t=>t!==e):[...this.hidden(),e];this.hidden.set(t),P5(t)}clearFilters(){this.query.set(``),this.range.set(null),this.hidden.set([]),P5([]),this.pageId.set(`all`)}zoom(e){let t=this.view(),n=this.bounds();t&&n&&this.range.set(Hpe(t,e,n))}canPan(e){let t=this.range(),n=this.bounds();return!t||!n?!1:e<0?t.start>n.start:t.end<n.end}pan(e){let t=this.range(),n=this.bounds();t&&n&&this.range.set(Upe(t,e*.5,n))}select(e){this.selectedKey.set(e.key)}openEvent(e){this.open.emit(e.link)}share(e){let t=this.tracks()?.nativeElement.getBoundingClientRect();return!t||t.width<=0?0:Math.min(1,Math.max(0,(e.clientX-t.left)/t.width))}onPointerDown(e){if(e.pointerType===`mouse`&&e.button!==0)return;let t=this.share(e);this.brush.set({from:t,to:t,id:e.pointerId}),this.downX=e.clientX;try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}e.preventDefault()}onPointerMove(e){let t=this.brush();t&&t.id===e.pointerId&&this.brush.set({...t,to:this.share(e)})}onPointerUp(e){let t=this.brush(),n=this.view();if(this.brush.set(null),!t||t.id!==e.pointerId||!n)return;if(Math.abs(e.clientX-this.downX)<vme){this.pick(e,n);return}let r=Wpe(n,t.from,this.share(e));r&&this.range.set(r)}downX=0;pick(e,t){let n=this.tracks()?.nativeElement.getBoundingClientRect(),r=this.lanes();if(!n||!r.length)return;let i=r[Math.min(r.length-1,Math.max(0,Math.floor((e.clientY-n.top)/this.laneHeight)))],a=t.start+this.share(e)*(t.end-t.start),o=Kpe(this.shown(),i.id,a);o&&(this.selectedKey.set(o.key),queueMicrotask(()=>{this.host.nativeElement.querySelector(`button.row[data-key="${CSS.escape(o.key)}"]`)?.scrollIntoView?.({block:`nearest`})}))}retry(){let e=this.rpc();e&&this.load(e)}stop(){for(let e of this.cleanups.splice(0))e()}async load(e){this.stop();let t=++this.loads;this.loading.set(!0),this.failed.set(!1);let n=e.scope(`pangular`).rpc,r=await Promise.allSettled(C5.map(async e=>{let r=await n.sharedState(e.state);if(this.destroyRef.destroyed||t!==this.loads)return;let i=t=>this.sources.update(n=>({...n,[e.id]:t}));i(r.value()),this.cleanups.push(r.on(`updated`,i))}));this.destroyRef.destroyed||t!==this.loads||(this.failed.set(r.every(e=>e.status===`rejected`)),this.loading.set(!1))}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-timeline`]],viewQuery:function(e,t){e&1&&Og(t.tracks,Jpe,5),e&2&&kg()},inputs:{rpc:[1,`rpc`]},outputs:{open:`open`},decls:5,vars:1,consts:[[`search`,``],[`tracks`,``],[1,`intro`],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`toolbar`],[`placeholder`,`Filter by name, URL or detail`,`saveKey`,`timeline`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`options`,`value`],[1,`count`],[`role`,`status`,1,`sr-only`],[1,`controls`],[`role`,`group`,`aria-label`,`Layers`,1,`layers`],[`type`,`button`,1,`layer`],[`role`,`group`,`aria-label`,`Time range`,1,`zoom`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`ariaLabel`,`Page`,1,`page-select`,3,`valueChange`,`options`,`value`],[`type`,`button`,1,`layer`,3,`click`],[`aria-hidden`,`true`,1,`check`],[1,`badge`],[1,`muted`],[`aria-labelledby`,`timeline-chart-heading`,1,`chart-card`],[1,`chart-head`],[`id`,`timeline-chart-heading`],[1,`chart`],[`aria-hidden`,`true`,1,`lane-labels`],[`role`,`img`,1,`tracks`,3,`pointerdown`,`pointermove`,`pointerup`,`pointercancel`],[`preserveAspectRatio`,`none`,`aria-hidden`,`true`],[`x1`,`0`,1,`lane-line`],[1,`mark`],[1,`selected-mark`],[1,`brush`,3,`left`,`width`],[`aria-hidden`,`true`,1,`axis`],[1,`hint`],[1,`split`],[`aria-labelledby`,`timeline-events-heading`,1,`events`],[`id`,`timeline-events-heading`],[1,`note`],[`appRovingList`,`button.row`,`aria-label`,`Events, newest first`,1,`rows`],[`aria-labelledby`,`timeline-detail-heading`,1,`detail-panel`],[`id`,`timeline-detail-heading`],[1,`brush`],[`type`,`button`,1,`row`,3,`click`,`dblclick`],[1,`when`],[1,`chip`],[1,`title`],[1,`detail`],[1,`page`],[1,`detail-title`],[`type`,`button`,1,`primary`,3,`click`],[1,`mono`]],template:function(e,t){e&1&&(F(0,`p`,2),K(1,` Navigations, HTTP calls, NgRx actions, change detection cycles, form events and signal changes from the live page on one time axis. Turn layers on and off, drag across the chart to look at a range, and open an event in its own tab. `),I(),A(2,Zpe,2,0,`p`,3)(3,Qpe,5,0,`div`,4)(4,_me,26,10)),e&2&&(D(2),j(t.loading()?2:t.failed()?3:4))},dependencies:[OD,lV,nP],styles:[`[_nghost-%COMP%] { display: block; font-size: 13px; } @@ -25902,7 +25929,7 @@ dd[_ngcontent-%COMP%] { .layer[_ngcontent-%COMP%] { transition: none; } -}`]})};function pme(e){let t=e===`light`?`#ffffff`:`#0b0b0e`,n=e===`light`?`#92400e`:`#f5a524`;return` +}`]})};function bme(e){let t=e===`light`?`#ffffff`:`#0b0b0e`,n=e===`light`?`#92400e`:`#f5a524`;return` .devframes-dock-entry button { transition: background-color 0.2s, transform 0.3s; } @@ -25993,7 +26020,7 @@ dd[_ngcontent-%COMP%] { transition: none; } } -`}var B5=new Map;function V5(e,t=`dark`,n=50){let r=e?.querySelector(`devframes-dock-standalone`)?.shadowRoot;if(r){if(e){let t=B5.get(e);t!==void 0&&(clearTimeout(t),B5.delete(e))}let n=r.querySelector(`style[data-pangular]`);n||(n=e.createElement(`style`),n.dataset.pangular=``,r.append(n)),n.textContent=pme(t);return}if(n>0&&e){let r=B5.get(e);r!==void 0&&clearTimeout(r);let i=setTimeout(()=>{B5.delete(e),V5(e,t,n-1)},100);B5.set(e,i)}}var H5=`pangular-pref`,U5={order:[],hidden:[],pinned:[]};function W5(e){try{return localStorage.getItem(`${H5}:${e}`)}catch{return null}}function G5(e,t){try{t===null?localStorage.removeItem(`${H5}:${e}`):localStorage.setItem(`${H5}:${e}`,t)}catch{}}function mme(){let e=W5(`theme`);return e===`light`||e===`dark`?e:`system`}function hme(e){G5(`theme`,e===`system`?null:e)}function K5(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`&&e.length>0&&e.length<=40);return[...new Set(t)].slice(0,50)}function gme(){let e=W5(`tabs`);if(!e)return U5;try{let t=JSON.parse(e);if(!t||typeof t!=`object`||Array.isArray(t))return U5;let n=t;return{order:K5(n.order),hidden:K5(n.hidden),pinned:K5(n.pinned)}}catch{return U5}}function _me(e){G5(`tabs`,!e.order.length&&!e.hidden.length&&!e.pinned.length?null:JSON.stringify(e))}function vme(){return W5(`passive`)===`true`}function yme(e){G5(`passive`,e?`true`:null)}function bme(){return W5(`pill`)===`true`}function xme(e){G5(`pill`,e?`true`:null)}function q5(e,t){let n=n=>{let r=t.order.indexOf(n);return r<0?t.order.length+e.indexOf(n):r},r=[...e].sort((e,t)=>n(e)-n(t));return[...r.filter(e=>t.pinned.includes(e)),...r.filter(e=>!t.pinned.includes(e))]}function Sme(e,t,n){let r=new Map(e.map(e=>[e.id,e]));return q5(e.map(e=>e.id),t).filter(e=>e===n||t.pinned.includes(e)||!t.hidden.includes(e)).map(e=>r.get(e))}function J5(e,t,n,r){let i=q5(e,t),a=i.indexOf(n),o=a+r;if(a<0||o<0||o>=i.length)return t;let s=t.pinned.includes(n);if(t.pinned.includes(i[o])!==s)return t;let c=[...i];return[c[a],c[o]]=[c[o],c[a]],{...t,order:c}}function Cme(e,t,n){let r=e.hidden.filter(e=>e!==t);return{...e,hidden:n?[...r,t]:r,pinned:n?e.pinned.filter(e=>e!==t):e.pinned}}function wme(e,t,n,r){let i=t.pinned.filter(e=>e!==n);return{order:q5(e,t),pinned:r?[...i,n]:i,hidden:r?t.hidden.filter(e=>e!==n):t.hidden}}function Y5(){try{let e=navigator;return/mac|iphone|ipad|ipod/i.test(e.userAgentData?.platform??e.platform??``)}catch{return!1}}function Tme(e=window){try{for(let t=e;t!==t.parent;t=t.parent){let e=t.frameElement?.getRootNode();if(e&&`host`in e&&e.host?.id===`pangular-popup-root`)return!0}}catch{}return!1}var Eme=`pangular-inspector-`;function X5(e=window){try{let t=e.top??e;return t.name.startsWith(Eme)&&t.opener&&t.opener!==t?t.opener:null}catch{return null}}function Dme(e=window){let t=X5(e);if(!t)return!1;let n;try{n=t.location.origin}catch{try{n=new URL(e.document.referrer).origin}catch{n=void 0}}if(!n||n===`null`)return!1;try{return t.postMessage({type:`pangular:popup-return`},n),!0}catch{return!1}}var Ome=class e{current=E(`dark`);preference=E(mme());source=`dark`;sourceAttr=!1;constructor(){let e=S(vs),t=Ame(),n=document.documentElement.dataset.theme,r=n===`light`||n===`dark`;if(n===`light`||n===`dark`)this.fromSource(n,!0);else if(t)r=!0,this.fromSource(Z5(t),!0);else{let t=kme();if(t){this.fromSource(t.matches?`light`:`dark`,!1);let n=e=>{r||this.fromSource(e.matches?`light`:`dark`,!1)};t.addEventListener(`change`,n),e.onDestroy(()=>t.removeEventListener(`change`,n))}else this.resolve()}let i;try{i=new BroadcastChannel(`pangular:theme`)}catch{}ac(()=>{let e=this.current();try{i?.postMessage(e)}catch{}for(let{win:t,origin:n}of Q5())try{t.postMessage({type:`pangular:theme-change`,theme:e},n)}catch{}});let a=e=>{if(e.source!==window.parent)return;let t=e.data;t?.type===`pangular:theme-change`&&(r=!0,this.fromSource(t.theme===`dark`?`dark`:`light`,!0))};window.addEventListener(`message`,a);let o;t&&(o=new MutationObserver(()=>this.fromSource(Z5(t),!0)),o.observe(t,{attributes:!0,attributeFilter:[`class`]})),e.onDestroy(()=>{window.removeEventListener(`message`,a),o?.disconnect(),i?.close()})}setPreference(e){this.preference.set(e),hme(e),this.resolve()}fromSource(e,t){this.source=e,this.sourceAttr=t,this.resolve()}resolve(){let e=this.preference(),t=e===`system`?this.source:e;this.current.set(t);let n=document.documentElement;e!==`system`||this.sourceAttr?n.dataset.theme=t:delete n.dataset.theme}static ɵfac=function(t){return new(t||e)};static ɵprov=El({token:e,factory:e.ɵfac})};function kme(){try{return window.matchMedia?.(`(prefers-color-scheme: light)`)??null}catch{return null}}function Z5(e){return e.classList.contains(`dark`)?`dark`:`light`}function Ame(){try{return window.frameElement?.closest(`.devframes-color-root`)??null}catch{return null}}function Q5(e=window){let t=[],n;try{n=e.location.ancestorOrigins}catch{}let r=e;try{for(let i=0;r!==r.parent;i++){r=r.parent;let a=jme(e,r,i,n);a&&t.push({win:r,origin:a})}}catch{}return t}function jme(e,t,n,r){let i=e=>e&&e!==`null`?e:void 0,a=i(r?.item(n));if(a)return a;try{let e=i(t.location.origin);if(e)return e}catch{}if(!(n>0))try{return i(new URL(e.document.referrer).origin)}catch{return}}var Mme=`__DEVFRAME_HUB_CLIENT_CONTEXT__`;function $5(){try{return window.parent===window?void 0:window.parent[Mme]}catch{return}}function e7(e,t,n=50){let r=$5();if(!r){if(n<=0||window.parent===window)return()=>{};let r=()=>{},i=setTimeout(()=>r=e7(e,t,n-1),100);return()=>{clearTimeout(i),r()}}let i=e.map(e=>r.docks.getStateById(ZC(e))?.events.on(`entry:activated`,()=>t(e))??(()=>{})),a=r.docks.selectedId,o=e.find(e=>ZC(e)===a);return o&&t(o),()=>i.forEach(e=>e())}function t7(){return!!$5()}async function n7(e){let t=$5();if(!t)return!1;try{return await t.docks.switchEntry(ZC(e))}catch{return!1}}function Nme(){let e=$5()?.commands?.openPalette;if(typeof e!=`function`)return!1;try{return e(),!0}catch{return!1}}function Pme(e,t){let n=new URL(e);return n.searchParams.delete(`view`),n.hash=t?`tab=${t}`:``,n.pathname+n.search+n.hash}function Fme(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}var r7=`pangular-tab`;function i7(e,t,n){let r=new URLSearchParams(e.replace(/^#/,``)).get(`tab`)||t;return n.find(e=>e===r)}function a7(e){try{return sessionStorage.getItem(`${r7}:${e}`)}catch{return null}}function Ime(e,t){try{sessionStorage.setItem(`${r7}:${e}`,t)}catch{}}function Lme(e,t){try{return new URL(e,t.href).origin===t.origin}catch{return!1}}function Rme(e,t){if(t.protocol!==`chrome-extension:`)return!1;try{let{protocol:t}=new URL(e);return t===`http:`||t===`https:`}catch{return!1}}function zme(e=location){let t=new URLSearchParams(e.search).get(`baseURL`);if(t&&(Lme(t,e)||Rme(t,e)))return t;if(!(e.pathname.includes(`__pangular`)||e.pathname.includes(`__devframes/`)))return[`/__pangular/`,`./`]}var o7=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`,Bme=`pangular-auth-token:`,Vme=`devframe-auth`,Hme={token:void 0,remember:()=>{}};function Ume(e,t=location){if(typeof e!=`string`)return null;try{let n=new URL(e,t.href).origin;return n===t.origin||n===`null`?null:n}catch{return null}}function Wme(e,t=location,n=Kme(),r=globalThis){let i=Ume(e,t);if(!i||(Gme(r),!n))return Hme;let a=Bme+i;try{n.removeItem(o7)}catch{}delete globalThis[o7];let o;try{o=n.getItem(a)||void 0}catch{o=void 0}return{get token(){return o},remember(e){try{if(n.removeItem(o7),!e||e===o)return;o=e,n.setItem(a,e)}catch{}}}}var s7=new WeakSet;function Gme(e=globalThis){let t=e.BroadcastChannel;if(typeof t==`function`&&!s7.has(t)){let n=class extends t{constructor(e){if(String(e)===Vme)throw Error(`The devframe-auth channel is off in a panel on another origin.`);super(e)}};s7.add(n),e.BroadcastChannel=n}let n=e.Storage?.prototype;if(n&&!s7.has(n)){s7.add(n);let{getItem:e,setItem:t}=n;n.getItem=function(t){return String(t)===o7?null:e.call(this,t)},n.setItem=function(e,n){String(e)!==o7&&t.call(this,e,n)}}}function Kme(){try{return typeof localStorage>`u`?null:localStorage}catch{return null}}var c7=(()=>{class e{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,t){this._renderer=e,this._elementRef=t}setProperty(e,t){this._renderer.setProperty(this._elementRef.nativeElement,e,t)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty(`disabled`,e)}static ɵfac=function(t){return new(t||e)(Lp(np),Lp(kl))};static ɵdir=oh({type:e})}return e})(),qme=(()=>{class e extends c7{static ɵfac=(()=>{let t;return function(n){return(t||=Sl(e))(n||e)}})();static ɵdir=oh({type:e,features:[gh]})}return e})(),l7=new Ti(``),Jme={provide:l7,useExisting:hi(()=>u7),multi:!0};function Yme(){let e=mv()?mv().getUserAgent():``;return/android (\d+)/.test(e.toLowerCase())}var Xme=new Ti(``),u7=(()=>{class e extends c7{_compositionMode;_composing=!1;constructor(e,t,n){super(e,t),this._compositionMode=n,this._compositionMode??=!Yme()}writeValue(e){let t=e??``;this.setProperty(`value`,t)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static ɵfac=function(t){return new(t||e)(Lp(np),Lp(kl),Lp(Xme,8))};static ɵdir=oh({type:e,selectors:[[`input`,`formControlName`,``,3,`type`,`checkbox`,3,`ngNoCva`,``],[`textarea`,`formControlName`,``,3,`ngNoCva`,``],[`input`,`formControl`,``,3,`type`,`checkbox`,3,`ngNoCva`,``],[`textarea`,`formControl`,``,3,`ngNoCva`,``],[`input`,`ngModel`,``,3,`type`,`checkbox`,3,`ngNoCva`,``],[`textarea`,`ngModel`,``,3,`ngNoCva`,``],[``,`ngDefaultControl`,``]],hostBindings:function(e,t){e&1&&H(`input`,function(e){return t._handleInput(e.target.value)})(`blur`,function(){return t.onTouched()})(`compositionstart`,function(){return t._compositionStart()})(`compositionend`,function(e){return t._compositionEnd(e.target.value)})},standalone:!1,features:[P_([Jme]),gh]})}return e})();function d7(e){return e==null||f7(e)===0}function f7(e){return e==null?null:Array.isArray(e)||typeof e==`string`?e.length:e instanceof Set?e.size:null}var p7=new Ti(``),Zme=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,m7=class{static min(e){return Qme(e)}static max(e){return $me(e)}static required(e){return h7(e)}static requiredTrue(e){return ehe(e)}static email(e){return the(e)}static minLength(e){return nhe(e)}static maxLength(e){return rhe(e)}static pattern(e){return ihe(e)}static nullValidator(e){return g7()}static compose(e){return S7(e)}static composeAsync(e){return w7(e)}};function Qme(e){return t=>{if(t.value==null||e==null)return null;let n=parseFloat(t.value);return!isNaN(n)&&n<e?{min:{min:e,actual:t.value}}:null}}function $me(e){return t=>{if(t.value==null||e==null)return null;let n=parseFloat(t.value);return!isNaN(n)&&n>e?{max:{max:e,actual:t.value}}:null}}function h7(e){return d7(e.value)?{required:!0}:null}function ehe(e){return e.value===!0?null:{required:!0}}function the(e){return d7(e.value)||Zme.test(e.value)?null:{email:!0}}function nhe(e){return t=>{let n=t.value?.length??f7(t.value);return n===null||n===0?null:n<e?{minlength:{requiredLength:e,actualLength:n}}:null}}function rhe(e){return t=>{let n=t.value?.length??f7(t.value);return n!==null&&n>e?{maxlength:{requiredLength:e,actualLength:n}}:null}}function ihe(e){if(!e)return g7;let t,n;return typeof e==`string`?(n=``,e.charAt(0)!==`^`&&(n+=`^`),n+=e,e.charAt(e.length-1)!==`$`&&(n+=`$`),t=new RegExp(n)):(n=e.toString(),t=e),e=>{if(d7(e.value))return null;let r=e.value;return t.test(r)?null:{pattern:{requiredPattern:n,actualValue:r}}}}function g7(e){return null}function _7(e){return e!=null}function v7(e){return Zm(e)?Aee(e):e}function y7(e){let t={};return e.forEach(e=>{t=e==null?t:{...t,...e}}),Object.keys(t).length===0?null:t}function b7(e,t){return t.map(t=>t(e))}function ahe(e){return!e.validate}function x7(e){return e.map(e=>ahe(e)?e:t=>e.validate(t))}function S7(e){if(!e)return null;let t=e.filter(_7);return t.length==0?null:function(e){return y7(b7(e,t))}}function C7(e){return e==null?null:S7(x7(e))}function w7(e){if(!e)return null;let t=e.filter(_7);return t.length==0?null:function(e){return Vee(b7(e,t).map(v7)).pipe(ci(y7))}}function T7(e){return e==null?null:w7(x7(e))}function E7(e){return e?Array.isArray(e)?e:[e]:[]}function D7(e,t){return Array.isArray(e)?e.includes(t):e===t}function O7(e,t){let n=E7(t);return E7(e).forEach(e=>{D7(n,e)||n.push(e)}),n}function k7(e,t){return E7(t).filter(t=>!D7(e,t))}var ohe=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=C7(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=T7(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control?.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},A7=`VALID`,j7=`INVALID`,M7=`PENDING`,N7=`DISABLED`,P7=class{},F7=class extends P7{value;source;constructor(e,t){super(),this.value=e,this.source=t}},I7=class extends P7{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},L7=class extends P7{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},R7=class extends P7{status;source;constructor(e,t){super(),this.status=e,this.source=t}},z7=class extends P7{source;constructor(e){super(),this.source=e}};function she(e){return Array.isArray(e)?C7(e):e||null}function che(e){return Array.isArray(e)?T7(e):e||null}function lhe(e){return e!=null&&!Array.isArray(e)&&typeof e==`object`}var uhe=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_hasRequired=E(!1);_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e,this._updateHasRequiredValidator()}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return Z(this.statusReactive)}set status(e){Z(()=>this.statusReactive.set(e))}_status=X(()=>this.statusReactive());statusReactive=E(void 0);get valid(){return this.status===A7}get invalid(){return this.status===j7}get pending(){return this.status===M7}get disabled(){return this.status===N7}get enabled(){return this.status!==N7}errors;get pristine(){return Z(this.pristineReactive)}set pristine(e){Z(()=>this.pristineReactive.set(e))}_pristine=X(()=>this.pristineReactive());pristineReactive=E(!0);get dirty(){return!this.pristine}get touched(){return Z(this.touchedReactive)}set touched(e){Z(()=>this.touchedReactive.set(e))}_touched=X(()=>this.touchedReactive());touchedReactive=E(!1);get untouched(){return!this.touched}_events=new Vr;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:`change`}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(O7(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(O7(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(k7(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(k7(e,this._rawAsyncValidators))}hasValidator(e){return D7(this._rawValidators,e)}hasAsyncValidator(e){return D7(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsTouched({...e,sourceControl:n}),t&&e.emitEvent!==!1&&this._events.next(new L7(!0,n))}markAllAsDirty(e={}){this.markAsDirty({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(e))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=e.sourceControl??this;this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),e.onlySelf||this._parent?._updateTouched(e,n),t&&e.emitEvent!==!1&&this._events.next(new L7(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty({...e,sourceControl:n}),t&&e.emitEvent!==!1&&this._events.next(new I7(!1,n))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=e.sourceControl??this;this._forEachChild(t=>{t.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),e.onlySelf||this._parent?._updatePristine(e,n),t&&e.emitEvent!==!1&&this._events.next(new I7(!0,n))}markAsPending(e={}){this.status=M7;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new R7(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending({...e,sourceControl:t})}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=N7,this.errors=null,this._forEachChild(t=>{t.disable({...e,onlySelf:!0})}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new F7(this.value,n)),this._events.next(new R7(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...e,skipPristineCheck:t},this),this._onDisabledChange.forEach(e=>e(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=A7,this._forEachChild(t=>{t.enable({...e,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors({...e,skipPristineCheck:t},this),this._onDisabledChange.forEach(e=>e(!1))}_updateAncestors(e,t){e.onlySelf||(this._parent?.updateValueAndValidity(e),e.skipPristineCheck||this._parent?._updatePristine({},t),this._parent?._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let t=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===A7||this.status===M7)&&this._runAsyncValidator(t,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new F7(this.value,t)),this._events.next(new R7(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity({...e,sourceControl:t})}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?N7:A7}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=M7,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let n=v7(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(n=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(n,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(e){let t=e;return t==null||(Array.isArray(t)||(t=t.split(`.`)),t.length===0)?null:t.reduce((e,t)=>e&&e._find(t),this)}getError(e,t){let n=t?this.get(t):this;return n?.errors?n.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,t,n){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||n)&&this._events.next(new R7(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new Cs,this.statusChanges=new Cs}_calculateStatus(){return this._allControlsDisabled()?N7:this.errors?j7:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(M7)?M7:this._anyControlsHaveStatus(j7)?j7:A7}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,t){let n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,e.onlySelf||this._parent?._updatePristine(e,t),r&&this._events.next(new I7(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new L7(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){lhe(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=she(this._rawValidators),this._updateHasRequiredValidator()}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=che(this._rawAsyncValidators)}_updateHasRequiredValidator(){Z(()=>this._hasRequired.set(this.hasValidator(m7.required)))}};function B7(e){return e.tagName===`INPUT`||e.tagName===`SELECT`||e.tagName===`TEXTAREA`}function dhe(e){if(e.tagName!==`INPUT`)return!1;let t=e.type;return t===`number`||t===`range`||t===`date`||t===`month`}function fhe(e){return e.tagName===`INPUT`||e.tagName===`TEXTAREA`}function V7(e,t,n,r){switch(n){case`name`:e.setAttribute(t,n,r);break;case`disabled`:case`readonly`:case`required`:r?e.setAttribute(t,n,``):e.removeAttribute(t,n);break;case`max`:case`min`:case`minLength`:case`maxLength`:r===void 0?e.removeAttribute(t,n):e.setAttribute(t,n,r.toString())}}var phe=class{kind;context;control;message;constructor({kind:e,context:t,control:n}){this.kind=e,this.context=t,this.control=n}},mhe=(()=>{class e{_validator=g7;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let t=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(t),this._validator=this._enabled?this.createValidator(t):g7,this._onChange?.()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static ɵfac=function(t){return new(t||e)};static ɵdir=oh({type:e,features:[xc]})}return e})(),hhe={provide:p7,useExisting:hi(()=>H7),multi:!0},H7=(()=>{class e extends mhe{required;inputName=`required`;normalizeInput=lv;createValidator=e=>h7;enabled(e){return e}static ɵfac=(()=>{let t;return function(n){return(t||=Sl(e))(n||e)}})();static ɵdir=oh({type:e,selectors:[[``,`required`,``,`formControlName`,``,3,`type`,`checkbox`],[``,`required`,``,`formControl`,``,3,`type`,`checkbox`],[``,`required`,``,`ngModel`,``,3,`type`,`checkbox`]],hostVars:1,hostBindings:function(e,t){e&2&&k(`required`,t._enabled?``:null)},inputs:{required:`required`},standalone:!1,features:[P_([hhe]),gh]})}return e})(),ghe=new Ti(``);function _he(e){return Object.getPrototypeOf(e.constructor)===qme}function U7(e,t){if(!t)return null;let n,r,i;return t.forEach(e=>{e.constructor===u7?n=e:_he(e)?r=e:i=e}),i||r||n||null}var vhe=class extends ohe{_parent=null;name=null;valueAccessor=null;isCustomControlBased=!1;userOnReset;resetSubscription;set onReset(e){this.userOnReset=e,this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.control&&(this.resetSubscription=this.control.events.subscribe(e=>{e instanceof z7&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription?.add(this.resetSubscription))}isNativeFormElement=!1;rawValueAccessors;_selectedValueAccessor=null;get selectedValueAccessor(){return this._selectedValueAccessor??=U7(this,this.rawValueAccessors)}parseErrorsValidator=null;renderer;injector;requiredValidatorViaDi;subscription;customControlBindings=null;constructor(e,t,n){super(),this.injector=e,this.renderer=t,this.rawValueAccessors=n,this.injector?.get(vs)?.onDestroy(()=>{this.removeParseErrorsValidator(this.control),this.subscription?.unsubscribe()})}setupCustomControl(){this.subscription?.unsubscribe();let e=this.injector?.get(Tne);if(!this.control||!e)return;let t=e.markForCheck.bind(e);this.subscription=new ar,this.subscription.add(this.control.valueChanges.subscribe(t)),this.subscription.add(this.control.statusChanges.subscribe(t)),this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.userOnReset&&(this.resetSubscription=this.control.events.subscribe(e=>{e instanceof z7&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription.add(this.resetSubscription)),this.parseErrorsValidator&&this.control.addValidators(this.parseErrorsValidator)}ngControlCreate(e){!e.nativeElement.hasAttribute?.(`ngNoCva`)&&(this.rawValueAccessors&&this.rawValueAccessors.length>0||this.valueAccessor!==null)||!e.customControl||(this.isCustomControlBased=!0,e.listenToCustomControlModel(e=>{this.control?.markAsDirty(),this.control?.setValue(e,{emitModelToViewChange:!1}),this.viewToModelUpdate(e)}),e.listenToCustomControlOutput(`touch`,()=>{this.control?.markAsTouched()}),this.customControlBindings={},this.isNativeFormElement=B7(e.nativeElement),this.requiredValidatorViaDi=this._rawValidators.find(e=>e instanceof H7))}ngControlUpdate(e,t){if(!this.isCustomControlBased)return;let n=this.control,r=this.customControlBindings;Object.is(r.value,n.value)||(r.value=n.value,e.setCustomControlModelInput(n.value)),this.bindControlProperty(e,r,`touched`,n.touched),this.bindControlProperty(e,r,`dirty`,n.dirty),this.bindControlProperty(e,r,`valid`,n.valid),this.bindControlProperty(e,r,`invalid`,n.invalid),this.bindControlProperty(e,r,`pending`,n.pending),this.bindControlProperty(e,r,`disabled`,n.disabled),this.shouldBindRequired&&this.bindControlProperty(e,r,`required`,this.isRequired);let i=n.errors;if(r.errors!==i){r.errors=i;let t=this._convertErrors(i);e.setInputOnDirectives(`errors`,t)}}get isRequired(){return(this.requiredValidatorViaDi?._enabled||this.control?._hasRequired())??!1}get shouldBindRequired(){return!0}bindControlProperty(e,t,n,r){if(t[n]===r)return;t[n]=r;let i=e.setInputOnDirectives(n,r);this.isNativeFormElement&&!i&&(n===`disabled`||n===`required`)&&this.renderer&&V7(this.renderer,e.nativeElement,n,r)}_convertErrors(e){if(e===null)return[];let t=this.control;return Object.entries(e).map(([e,n])=>new phe({context:n,kind:e,control:t}))}setParseErrorSource(e){if(e===void 0)return;let t=null,n=X(()=>{let t=e();return t.length===0?null:t.reduce((e,t)=>(e[t.kind]=t,e),{})});this.parseErrorsValidator=(()=>t).bind(this),ac(()=>{t=n(),this.control?.updateValueAndValidity({emitEvent:!1})},{injector:this.injector})}removeParseErrorsValidator(e){this.parseErrorsValidator&&(e?.removeValidators(this.parseErrorsValidator),e?.updateValueAndValidity({emitEvent:!1}))}},yhe=Symbol(`FIELD_TREE`),W7=0;function bhe(){return W7}function G7(e,t){return(...n)=>{try{return W7=t,e(...n)}finally{W7=0}}}function xhe(e){return!e}function K7(e){return e}function q7(e){return Array.isArray(e)}function J7(e){return(typeof e==`object`||typeof e==`function`)&&e!=null}var Y7=Symbol(),X7=Symbol(),Z7=class{predicates;fns=[];constructor(e){this.predicates=e}push(e){this.fns.push(e9(this.predicates,e))}mergeIn(e){let t=this.predicates?e.fns.map(e=>e9(this.predicates,e)):e.fns;this.fns.push(...t)}hasRules(){return this.fns.length>0}},Q7=class extends Z7{get defaultValue(){return!1}compute(e){return this.fns.some(t=>{let n=t(e);return n&&n!==X7})}},$7=class e extends Z7{ignore;static ignoreNull(t){return new e(t,e=>e===null)}constructor(e,t){super(e),this.ignore=t}get defaultValue(){return[]}compute(e){return this.fns.reduce((t,n)=>{let r=n(e);return r===void 0||r===X7?t:q7(r)?[...t,...this.ignore?r.filter(e=>!this.ignore(e)):r]:this.ignore&&this.ignore(r)?t:[...t,r]},[])}},She=class extends $7{constructor(e){super(e,void 0)}},Che=class extends Z7{key;get defaultValue(){return this.key.reducer.getInitial()}constructor(e,t){super(e),this.key=t}compute(e){if(this.fns.length===0)return this.key.reducer.getInitial();let t=this.key.reducer.getInitial();for(let n=0;n<this.fns.length;n++){let r=this.fns[n](e);r!==X7&&(t=this.key.reducer.reduce(t,r))}return t}};function e9(e,t){return e.length===0?t:n=>{for(let t of e){let e=n.stateOf(t.path),r=Z(e.structure.pathKeys).length-t.depth;for(let t=0;t<r;t++)e=e.structure.parent;if(!t.fn(e.context))return X7}return t(n)}}var t9=class{predicates;hidden;disabledReasons;readonly;syncErrors;syncTreeErrors;asyncErrors;metadata=new Map;constructor(e){this.predicates=e,this.hidden=new Q7(e),this.disabledReasons=new She(e),this.readonly=new Q7(e),this.syncErrors=$7.ignoreNull(e),this.syncTreeErrors=$7.ignoreNull(e),this.asyncErrors=$7.ignoreNull(e)}hasAnyLogic(){return this.hidden.hasRules()||this.disabledReasons.hasRules()||this.readonly.hasRules()||this.syncErrors.hasRules()||this.syncTreeErrors.hasRules()||this.asyncErrors.hasRules()||this.metadata.size>0}hasMetadata(e){return this.metadata.has(e)}hasMetadataKeys(){return this.metadata.size>0}getMetadataKeys(){return this.metadata.keys()}getMetadata(e){return this.metadata.has(e)||this.metadata.set(e,new Che(this.predicates,e)),this.metadata.get(e)}mergeIn(e){this.hidden.mergeIn(e.hidden),this.disabledReasons.mergeIn(e.disabledReasons),this.readonly.mergeIn(e.readonly),this.syncErrors.mergeIn(e.syncErrors),this.syncTreeErrors.mergeIn(e.syncTreeErrors),this.asyncErrors.mergeIn(e.asyncErrors);for(let t of e.getMetadataKeys()){let n=e.metadata.get(t);this.getMetadata(t).mergeIn(n)}}},n9=class{depth;constructor(e){this.depth=e}build(){return new a9(this,[],0)}},r9=class e extends n9{constructor(e){super(e)}current;all=[];addHiddenRule(e){this.getCurrent().addHiddenRule(e)}addDisabledReasonRule(e){this.getCurrent().addDisabledReasonRule(e)}addReadonlyRule(e){this.getCurrent().addReadonlyRule(e)}addSyncErrorRule(e){this.getCurrent().addSyncErrorRule(e)}addSyncTreeErrorRule(e){this.getCurrent().addSyncTreeErrorRule(e)}addAsyncErrorRule(e){this.getCurrent().addAsyncErrorRule(e)}addMetadataRule(e,t){this.getCurrent().addMetadataRule(e,t)}getChild(e){if(e===Y7){let e=this.getCurrent().children;e.size>+!!e.has(Y7)&&(this.current=void 0)}return this.getCurrent().getChild(e)}hasLogic(e){return this===e||this.all.some(({builder:t})=>t.hasLogic(e))}hasRules(){return this.all.length>0}anyChildHasLogic(){return this.all.some(({builder:e})=>e.anyChildHasLogic())}mergeIn(e,t){t?this.all.push({builder:e,predicate:{fn:G7(t.fn,this.depth),path:t.path}}):this.all.push({builder:e}),this.current=void 0}getCurrent(){return this.current===void 0&&(this.current=new i9(this.depth),this.all.push({builder:this.current})),this.current}static newRoot(){return new e(0)}},i9=class extends n9{logic=new t9([]);children=new Map;constructor(e){super(e)}addHiddenRule(e){this.logic.hidden.push(G7(e,this.depth))}addDisabledReasonRule(e){this.logic.disabledReasons.push(G7(e,this.depth))}addReadonlyRule(e){this.logic.readonly.push(G7(e,this.depth))}addSyncErrorRule(e){this.logic.syncErrors.push(G7(e,this.depth))}addSyncTreeErrorRule(e){this.logic.syncTreeErrors.push(G7(e,this.depth))}addAsyncErrorRule(e){this.logic.asyncErrors.push(G7(e,this.depth))}addMetadataRule(e,t){this.logic.getMetadata(e).push(G7(t,this.depth))}getChild(e){return this.children.has(e)||this.children.set(e,new r9(this.depth+1)),this.children.get(e)}hasLogic(e){return this===e}hasRules(){return this.logic.hasAnyLogic()||this.children.size>0}anyChildHasLogic(){for(let e of this.children.values())if(e.hasRules())return!0;return!1}},a9=class e{builder;predicates;depth;logic;constructor(e,t,n){this.builder=e,this.predicates=t,this.depth=n,this.logic=e?The(e,t,n):new t9([])}getChild(t){let n=this.builder?o9(this.builder,t):[];if(n.length===0)return new e(void 0,[],this.depth+1);if(n.length===1){let{builder:t,predicates:r}=n[0];return new e(t,[...this.predicates,...r.map(e=>s9(e,this.depth))],this.depth+1)}return new whe(n.map(({builder:t,predicates:n})=>new e(t,[...this.predicates,...n.map(e=>s9(e,this.depth))],this.depth+1)))}hasLogic(e){return this.builder?this.builder.hasLogic(e):!1}hasRules(){return this.builder?this.builder.hasRules():!1}anyChildHasLogic(){return this.builder?this.builder.anyChildHasLogic():!1}},whe=class e{all;logic;constructor(e){this.all=e,this.logic=new t9([]);for(let t of e)this.logic.mergeIn(t.logic)}getChild(t){return new e(this.all.flatMap(e=>e.getChild(t)))}hasLogic(e){return this.all.some(t=>t.hasLogic(e))}hasRules(){return this.all.some(e=>e.hasRules())}anyChildHasLogic(){return this.all.some(e=>e.anyChildHasLogic())}};function o9(e,t){if(e instanceof r9)return e.all.flatMap(({builder:e,predicate:n})=>{let r=o9(e,t);return n?r.map(({builder:e,predicates:t})=>({builder:e,predicates:[...t,n]})):r});if(e instanceof i9)return[...t!==Y7&&e.children.has(Y7)?[{builder:e.getChild(Y7),predicates:[]}]:[],...e.children.has(t)?[{builder:e.getChild(t),predicates:[]}]:[]];throw new ui(1909,!1)}function The(e,t,n){let r=new t9(t);if(e instanceof r9){let i=e.all.map(({builder:e,predicate:r})=>new a9(e,r?[...t,s9(r,n)]:t,n));for(let e of i)r.mergeIn(e.logic)}else if(e instanceof i9)r.mergeIn(e.logic);else throw new ui(1909,!1);return r}function s9(e,t){return{...e,depth:t}}var c9=Symbol(`PATH`),l9=class e{keys;parent;keyInParent;root;children=new Map;fieldPathProxy=new Proxy(this,Ehe);logicBuilder;constructor(e,t,n,r){this.keys=e,this.parent=n,this.keyInParent=r,this.root=t??this,n||(this.logicBuilder=r9.newRoot())}get builder(){return this.logicBuilder?this.logicBuilder:this.parent.builder.getChild(this.keyInParent)}getChild(t){return this.children.has(t)||this.children.set(t,new e([...this.keys,t],this.root,this,t)),this.children.get(t)}mergeIn(e,t){let n=e.compile();this.builder.mergeIn(n.builder,t)}static unwrapFieldPath(e){return e[c9]}static newRoot(){return new e([],void 0,void 0,void 0)}},Ehe={get(e,t){return t===c9?e:e.getChild(t).fieldPathProxy}},u9=void 0,d9=new Map,f9=class e{schemaFn;constructor(e){this.schemaFn=e}compile(){if(d9.has(this))return d9.get(this);let e=l9.newRoot();d9.set(this,e);let t=u9;try{u9=e,this.schemaFn(e.fieldPathProxy)}finally{u9=t}return e}static create(t){return t instanceof e?t:new e(t)}static rootCompile(t){try{return d9.clear(),t===void 0?l9.newRoot():t instanceof e?t.compile():new e(t).compile()}finally{d9.clear()}}};function Dhe(e){return e instanceof f9||typeof e==`function`}function p9(e){if(u9!==l9.unwrapFieldPath(e).root)throw new ui(1908,!1)}function m9(e,t,n){return p9(e),l9.unwrapFieldPath(e).builder.addMetadataRule(t,n),t}var h9={list(){return{reduce:(e,t)=>t===void 0?e:[...e,t],getInitial:()=>[]}},min(){return{reduce:(e,t)=>e===void 0||t===void 0?e??t:t<e?t:e,getInitial:()=>void 0}},max(){return{reduce:(e,t)=>e===void 0||t===void 0?e??t:t>e?t:e,getInitial:()=>void 0}},or(){return{reduce:(e,t)=>e||t,getInitial:()=>!1}},and(){return{reduce:(e,t)=>e&&t,getInitial:()=>!0}},override:Ohe};function Ohe(e){return{reduce:(e,t)=>t,getInitial:()=>e?.()}}var g9=Symbol(`IS_ASYNC_VALIDATION_RESOURCE`),khe=class{reducer;create;brand;[g9];constructor(e,t){this.reducer=e,this.create=t}};function _9(e){return new khe(e??h9.override())}function v9(){return _9()}var y9=_9(h9.or()),Ahe=v9(),jhe=v9(),Mhe=_9(h9.max()),Nhe=_9(h9.min()),Phe=_9(h9.list());function b9(e,t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}function Fhe(e){return e.errors().length>0?`invalid`:e.pending()?`unknown`:`valid`}var Ihe=class{node;constructor(e){this.node=e}rawSyncTreeErrors=X(()=>this.shouldSkipValidation()?[]:[...this.node.logicNode.logic.syncTreeErrors.compute(this.node.context),...this.node.structure.parent?.validationState.rawSyncTreeErrors()??[]],{equal:b9});syncErrors=X(()=>this.shouldSkipValidation()?[]:[...this.node.logicNode.logic.syncErrors.compute(this.node.context),...this.syncTreeErrors(),...Lhe(this.node.submitState.submissionErrors())],{equal:b9});syncValid=X(()=>this.shouldSkipValidation()?!0:this.node.structure.reduceChildren(this.syncErrors().length===0,(e,t)=>t&&e.validationState.syncValid(),xhe));syncTreeErrors=X(()=>this.rawSyncTreeErrors().filter(e=>e.fieldTree===this.node.fieldTree),{equal:b9});rawAsyncErrors=X(()=>this.shouldSkipValidation()?[]:[...this.node.logicNode.logic.asyncErrors.compute(this.node.context),...this.node.structure.parent?.validationState.rawAsyncErrors()??[]],{equal:b9});asyncErrors=X(()=>this.shouldSkipValidation()?[]:this.rawAsyncErrors().filter(e=>e===`pending`||e.fieldTree===this.node.fieldTree),{equal:b9});parseErrors=X(()=>this.node.formFieldBindings().flatMap(e=>e.parseErrors()),{equal:b9});errors=X(()=>[...this.parseErrors(),...this.syncErrors(),...this.asyncErrors().filter(e=>e!==`pending`)],{equal:b9});errorSummary=X(()=>{let e=this.node.structure.reduceChildren(this.errors(),(e,t)=>[...t,...e.errorSummary()]);return Z(()=>e.sort(Rhe)),e},{equal:b9});pending=X(()=>this.node.structure.reduceChildren(this.asyncErrors().includes(`pending`),(e,t)=>t||e.validationState.pending()));status=X(()=>{if(this.shouldSkipValidation())return`valid`;let e=Fhe(this);return this.node.structure.reduceChildren(e,(e,t)=>t===`invalid`||e.validationState.status()===`invalid`?`invalid`:t===`unknown`||e.validationState.status()===`unknown`?`unknown`:`valid`,e=>e===`invalid`)});valid=X(()=>this.status()===`valid`);invalid=X(()=>this.status()===`invalid`);shouldSkipValidation=X(()=>this.node.hidden()||this.node.disabled()||this.node.readonly()||this.node.structure.isOrphaned())};function Lhe(e){return e===void 0?[]:q7(e)?e:[e]}function x9(e,t){if(q7(e))for(let n of e)n.fieldTree??=t;else e&&(e.fieldTree??=t);return e}function S9(e){return e.formField?e.formField.element:e.fieldTree().formFieldBindings().reduce((e,t)=>!e||!t.element?e??t.element:e.compareDocumentPosition(t.element)&Node.DOCUMENT_POSITION_PRECEDING?t.element:e,void 0)}function Rhe(e,t){let n=S9(e),r=S9(t);return n===r?0:n===void 0||r===void 0?n===void 0?1:-1:n.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_PRECEDING?1:-1}var C9=_9(),zhe=class{node;cache=new WeakMap;constructor(e){this.node=e,this.fieldTreeOf=this.fieldTreeOf.bind(this),this.stateOf=this.stateOf.bind(this)}resolve(e){if(!this.cache.has(e)){let t=X(()=>{let t=l9.unwrapFieldPath(e),n=this.node,r=bhe();for(;r>0||!n.structure.logic.hasLogic(t.root.builder);)if(r--,n=n.structure.parent,n===void 0)throw new ui(1900,!1);for(let e of t.keys)if(n=n.structure.getChild(e),n===void 0)throw new ui(1901,!1);return n.fieldTree});this.cache.set(e,t)}return this.cache.get(e)()}get fieldTree(){return this.node.fieldProxy}get state(){return this.node}get value(){return this.node.structure.value}get key(){return this.node.structure.keyInParent}get pathKeys(){return this.node.structure.pathKeys}index=X(()=>{let e=this.key();if(!q7(Z(this.node.structure.parent.value)))throw new ui(1906,!1);return Number(e)});fieldTreeOf(e){return this.resolve(e)}stateOf(e){return this.resolve(e)()}valueOf=e=>{let t=this.resolve(e)().value();if(t instanceof uhe)throw new ui(1907,!1);return t}},Bhe=class{node;metadata=new Map;constructor(e){this.node=e}runMetadataCreateLifecycle(){if(!this.node.logicNode.logic.hasMetadataKeys())return;let e=xne();e&&X_(!1);try{Z(()=>Za(this.node.structure.injector,()=>{for(let e of this.node.logicNode.logic.getMetadataKeys())if(e.create){let t=this.node.logicNode.logic.getMetadata(e),n=e.create(this.node,X(()=>t.compute(this.node.context)));this.metadata.set(e,n)}}))}finally{e&&X_(!0)}}get(e){if(this.has(e)&&!this.metadata.has(e)){if(e.create)throw new ui(1912,!1);let t=this.node.logicNode.logic.getMetadata(e);this.metadata.set(e,X(()=>t.compute(this.node.context)))}return this.metadata.get(e)}has(e){return this.node.logicNode.logic.hasMetadata(e)}},Vhe={get(e,t,n){if(t===yhe)return!0;let r=e(),i=r.structure.getChild(t);if(i!==void 0)return i.fieldTree;let a=Z(r.value);if(q7(a)){if(t===`length`)return r.value().length;if(t===Symbol.iterator)return()=>(r.value(),Array.prototype[Symbol.iterator].apply(r.fieldTree))}if(J7(a)&&t===Symbol.iterator)return function*(){for(let e in n)yield[e,n[e]]}},getOwnPropertyDescriptor(e,t){let n=Z(e().value),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&!r.configurable&&(r.configurable=!0),r},ownKeys(e){let t=Z(e().value);return typeof t==`object`&&t?Reflect.ownKeys(t):[]}};function Hhe(e,t){let n=X(()=>e()[t()]);return n[$t]=e[$t],n.set=r=>{Object.is(Z(n),r)||e.update(e=>Uhe(e,r,t()))},n.update=e=>{n.set(e(Z(n)))},n.asReadonly=()=>n,n}function Uhe(e,t,n){if(q7(e)){let r=[...e];return r[n]=t,r}return{...e,[n]:t}}var w9=Symbol(``),T9=X(()=>!1),E9=class{logic;node;createChildNode;identitySymbol=Symbol();_injector=void 0;_anyChildHasLogic;get injector(){return this._injector??=gs.create({providers:[],parent:this.fieldManager.injector}),this._injector}constructor(e,t,n){this.logic=e,this.node=t,this.createChildNode=n}children(){this.ensureChildrenMap();let e=this.childrenMap();return e===void 0?[]:Array.from(e.byPropertyKey.values()).map(e=>Z(e.reader))}materializedChildren(){let e=this.childrenMap();return e===void 0?[]:Array.from(e.byPropertyKey.values()).map(e=>e.node)}_areChildrenMaterialized(){return Z(this.childrenMap)!==void 0}ensureChildrenMap(){this._areChildrenMaterialized()||Z(()=>{this.childrenMap.update(e=>this.computeChildrenMap(this.value(),e,!0))})}getChild(e){this.ensureChildrenMap();let t=e.toString(),n=Z(this.childrenMap)?.byPropertyKey.get(t)?.reader;return n||=this.createReader(t),n()}reduceChildren(e,t,n){let r=this.childrenMap();if(!r)return e;let i=e;for(let e of r.byPropertyKey.values()){if(n?.(i))break;i=t(Z(e.reader),i)}return i}destroy(){this.injector.destroy()}createKeyOrOrphanSignals(e,t,n){if(e===`root`)return{keyInParent:D9,isOrphaned:T9};let r=this.parent,i=n,a=X(()=>{if(r.structure.isOrphaned())return w9;let e=r.structure.childrenMap();if(!e)return w9;let n=e.byPropertyKey.get(i);if(n&&n.node===this.node)return i;if(t===void 0)return w9;for(let[t,n]of e.byPropertyKey)if(n.node===this.node)return i=t;return w9}),o=X(()=>a()===w9);return{keyInParent:X(()=>{let e=a();if(e===w9)throw t===void 0?new ui(-1902,!1):new ui(1904,!1);return e}),isOrphaned:o}}createChildrenMap(){return Q({source:this.value,computation:(e,t)=>this.computeChildrenMap(e,t?.value,!1)})}computeChildrenMap(e,t,n){if(!J7(e)||!n&&t===void 0&&!(this._anyChildHasLogic??=this.logic.anyChildHasLogic()))return;t??={byPropertyKey:new Map};let r,i=q7(e);t!==void 0&&(r=i?qhe(t,e,this.identitySymbol):Jhe(t,e));for(let n of Object.keys(e)){let a,o=e[n];if(o===void 0){t.byPropertyKey.has(n)&&(r??={...t},r.byPropertyKey.delete(n));continue}i&&J7(o)&&!q7(o)&&(a=o[this.identitySymbol]??=Symbol(``));let s;a&&(t.byTrackingKey?.has(a)||(r??={...t},r.byTrackingKey??=new Map,r.byTrackingKey.set(a,this.createChildNode(n,a,i))),s=(r??t).byTrackingKey.get(a));let c=t.byPropertyKey.get(n);c===void 0?(r??={...t},r.byPropertyKey.set(n,{reader:this.createReader(n),node:s??this.createChildNode(n,a,i)})):s&&s!==c.node&&(r??={...t},c.node=s)}return r??t}createReader(e){return X(()=>this.childrenMap()?.byPropertyKey.get(e)?.node)}},Whe=class extends E9{fieldManager;value;get parent(){}get root(){return this.node}get pathKeys(){return Khe}get keyInParent(){return D9}isOrphaned=T9;childrenMap;constructor(e,t,n,r,i){super(t,e,i),this.fieldManager=n,this.value=r,this.childrenMap=this.createChildrenMap()}},Ghe=class extends E9{logic;parent;root;pathKeys;keyInParent;value;childrenMap;isOrphaned;get fieldManager(){return this.root.structure.fieldManager}constructor(e,t,n,r,i,a){super(t,e,a),this.logic=t,this.parent=n,this.root=this.parent.structure.root;let o=this.createKeyOrOrphanSignals(`child`,r,i);this.isOrphaned=o.isOrphaned,this.keyInParent=o.keyInParent,this.pathKeys=X(()=>[...n.structure.pathKeys(),this.keyInParent()]),this.value=Hhe(this.parent.structure.value,this.keyInParent),this.childrenMap=this.createChildrenMap(),this.fieldManager.structures.add(this)}},Khe=X(()=>[]),D9=X(()=>{throw new ui(1905,!1)});function qhe(e,t,n){let r,i=new Set(e.byPropertyKey.keys()),a=e.byTrackingKey&&new Set(e.byTrackingKey.keys());for(let e=0;e<t.length;e++){let r=t[e];i.delete(e.toString()),a&&J7(r)&&Object.hasOwn(r,n)&&a.delete(r[n])}if(i.size>0){r??={...e};for(let e of i)r.byPropertyKey.delete(e)}if(a&&a.size>0){r??={...e};for(let e of a)r.byTrackingKey.delete(e)}return r}function Jhe(e,t){let n;for(let r of e.byPropertyKey.keys())Object.hasOwn(t,r)||(n??={...e},n.byPropertyKey.delete(r));return n}var Yhe=class{node;selfSubmitting=E(!1);submissionErrors;constructor(e){this.node=e,this.submissionErrors=Q({source:this.node.structure.value,computation:()=>[]})}submitting=X(()=>this.selfSubmitting()||(this.node.structure.parent?.submitting()??!1))},O9=class{structure;validationState;metadataState;nodeState;submitState;fieldAdapter;controlValue;_context=void 0;get context(){return this._context??=new zhe(this)}fieldProxy=new Proxy(()=>this,Vhe);pathNode;constructor(e){this.pathNode=e.pathNode,this.fieldAdapter=e.fieldAdapter,this.structure=this.fieldAdapter.createStructure(this,e),this.validationState=this.fieldAdapter.createValidationState(this,e),this.nodeState=this.fieldAdapter.createNodeState(this,e),this.metadataState=new Bhe(this),this.submitState=new Yhe(this),this.controlValue=this.controlValueSignal(),this.metadataState.runMetadataCreateLifecycle()}focusBoundControl(e){this.getBindingForFocus()?.focus(e)}getBindingForFocus(){return this.formFieldBindings().filter(e=>e.focus!==void 0).reduce(k9,void 0)||this.structure.children().map(e=>e.getBindingForFocus()).reduce(k9,void 0)}pendingSync=Q({source:()=>this.value(),computation:(e,t)=>{t?.value?.abort()}});get fieldTree(){return this.fieldProxy}get logicNode(){return this.structure.logic}get value(){return this.structure.value}get keyInParent(){return this.structure.keyInParent}get errors(){return this.validationState.errors}get parseErrors(){return this.validationState.parseErrors}get errorSummary(){return this.validationState.errorSummary}get pending(){return this.validationState.pending}get valid(){return this.validationState.valid}get invalid(){return this.validationState.invalid}get dirty(){return this.nodeState.dirty}get touched(){return this.nodeState.touched}get disabled(){return this.nodeState.disabled}get disabledReasons(){return this.nodeState.disabledReasons}get hidden(){return this.nodeState.hidden}get readonly(){return this.nodeState.readonly}get formFieldBindings(){return this.nodeState.formFieldBindings}get submitting(){return this.submitState.submitting}get name(){return this.nodeState.name}get max(){let e=this.metadata(jhe)?.();return e?this.metadata(e):void 0}get maxLength(){return this.metadata(Nhe)}get min(){let e=this.metadata(Ahe)?.();return e?this.metadata(e):void 0}get minLength(){return this.metadata(Mhe)}get pattern(){return this.metadata(Phe)??Xhe}get required(){return this.metadata(y9)??Zhe}metadata(e){return this.metadataState.get(e)}getError(e){return this.errors().find(t=>t.kind===e)}hasMetadata(e){return this.metadataState.has(e)}markAsTouched(e){this.structure.isOrphaned()||Z(()=>{this.markAsTouchedInternal(e),this.flushSync()})}markAsTouchedInternal(e){if(!this.structure.isOrphaned()&&!this.validationState.shouldSkipValidation()&&(this.nodeState.markAsTouched(),!e?.skipDescendants))for(let e of this.structure.children())e.markAsTouchedInternal()}markAsDirty(){this.nodeState.markAsDirty()}markAsPristine(){this.nodeState.markAsPristine()}markAsUntouched(){this.nodeState.markAsUntouched()}reset(e){Z(()=>this._reset(e))}_reset(e){this.pendingSync()?.abort(),e!==void 0&&this.value.set(e),this.controlValue.rawSet(this.value()),this.nodeState.markAsUntouched(),this.nodeState.markAsPristine();for(let e of this.formFieldBindings())e.reset();for(let e of this.structure.materializedChildren())e._reset()}reloadValidation(){Z(()=>this._reloadValidation())}_reloadValidation(){let e=this.logicNode.logic.getMetadataKeys();for(let t of e)t[g9]&&this.metadata(t).reload?.();for(let e of this.structure.children())e._reloadValidation()}controlValueSignal(){let e=Q(this.value);e.rawSet=e.set,e.set=t=>{e.rawSet(t),this.markAsDirty(),this.debounceSync()};let t=e.update;return e.update=e=>{t(e),this.markAsDirty(),this.debounceSync()},e}sync(){this.value.set(this.controlValue())}flushSync(){let e=this.pendingSync();e&&!e.signal.aborted&&(e.abort(),this.sync())}async debounceSync(){let e=Z(()=>(this.pendingSync()?.abort(),this.nodeState.debouncer()));if(e){let t=new AbortController,n=e(t.signal);if(n&&(this.pendingSync.set(t),await n,t.signal.aborted))return}this.structure.isOrphaned()||this.sync()}static newRoot(e,t,n,r){return r.newRoot(e,t,n,r)}createStructure(e){return e.kind===`root`?new Whe(this,e.logic,e.fieldManager,e.value,this.newChild.bind(this)):new Ghe(this,e.logic,e.parent,e.identityInParent,e.initialKeyInParent,this.newChild.bind(this))}newChild(e,t,n){let r,i;return n?(r=this.pathNode.getChild(Y7),i=this.structure.logic.getChild(Y7)):(r=this.pathNode.getChild(e),i=this.structure.logic.getChild(e)),this.fieldAdapter.newChild({kind:`child`,parent:this,pathNode:r,logic:i,initialKeyInParent:e,identityInParent:t,fieldAdapter:this.fieldAdapter})}},Xhe=X(()=>[]),Zhe=X(()=>!1);function k9(e,t){return e?t&&e.element.compareDocumentPosition(t.element)&Node.DOCUMENT_POSITION_PRECEDING?t:e:t}var Qhe=class{node;selfTouched=E(!1);selfDirty=E(!1);markAsTouched(){this.selfTouched.set(!0)}markAsDirty(){this.selfDirty.set(!0)}markAsPristine(){this.selfDirty.set(!1)}markAsUntouched(){this.selfTouched.set(!1)}formFieldBindings=E([]);constructor(e){this.node=e}dirty=X(()=>{let e=this.selfDirty()&&!this.isNonInteractive();return this.node.structure.reduceChildren(e,(e,t)=>t||e.nodeState.dirty(),K7)});touched=X(()=>{let e=this.selfTouched()&&!this.isNonInteractive();return this.node.structure.reduceChildren(e,(e,t)=>t||e.nodeState.touched(),K7)});disabledReasons=X(()=>[...this.node.structure.parent?.nodeState.disabledReasons()??[],...this.node.logicNode.logic.disabledReasons.compute(this.node.context)],{equal:b9});disabled=X(()=>!!this.disabledReasons().length);readonly=X(()=>(this.node.structure.parent?.nodeState.readonly()||this.node.logicNode.logic.readonly.compute(this.node.context))??!1);hidden=X(()=>(this.node.structure.parent?.nodeState.hidden()||this.node.logicNode.logic.hidden.compute(this.node.context))??!1);name=X(()=>{let e=this.node.structure.parent;return e?`${e.name()}.${this.node.structure.keyInParent()}`:this.node.structure.fieldManager.rootName});debouncer=X(()=>{if(this.node.logicNode.logic.hasMetadata(C9)){let e=this.node.logicNode.logic.getMetadata(C9).compute(this.node.context);if(e)return t=>e(this.node.context,t)}return this.node.structure.parent?.nodeState.debouncer?.()});isNonInteractive=X(()=>this.hidden()||this.disabled()||this.readonly())},$he=class{newRoot(e,t,n,r){return new O9({kind:`root`,fieldManager:e,value:t,pathNode:n,logic:n.builder.build(),fieldAdapter:r})}newChild(e){return new O9(e)}createNodeState(e){return new Qhe(e)}createValidationState(e){return new Ihe(e)}createStructure(e,t){return e.createStructure(t)}},ege=class{injector;rootName;submitOptions;constructor(e,t,n){this.injector=e,this.rootName=t??`${this.injector.get(Ks)}.form${tge++}`,this.submitOptions=n}structures=new Set;createFieldManagementEffect(e){ac(()=>{let t=new Set;this.markStructuresLive(e,t);for(let e of this.structures)t.has(e)||(this.structures.delete(e),Z(()=>e.destroy()))},{injector:this.injector})}markStructuresLive(e,t){t.add(e);for(let n of e.children())this.markStructuresLive(n.structure,t)}},tge=0,nge=new Ti(``);function rge(e){let t,n,r;return e.length===3?[t,n,r]=e:e.length===2?Dhe(e[1])?[t,n]=e:[t,r]=e:[t]=e,[t,n,r]}function ige(...e){let[t,n,r]=rge(e),i=r?.injector??S(gs),a=Za(i,()=>f9.rootCompile(n)),o=new ege(i,r?.name,r?.submission),s=r?.adapter??new $he,c=O9.newRoot(o,t,a,s);o.createFieldManagementEffect(c.structure);let{experimentalWebMcpTool:l}=r??{};if(l){let e=Za(i,()=>S(nge,{optional:!0}));e&&Za(i,()=>e(c.fieldTree,{name:l.name,description:l.description}))}return c.fieldTree}async function age(e,t){let n=Z(e);if(Z(n.submitState.submitting))return!1;let r=t===void 0?n.structure.root.fieldProxy:e,i={root:n.structure.root.fieldProxy,submitted:e};t=typeof t==`function`?{action:t}:t??n.structure.fieldManager.submitOptions;let a=t?.action;if(!a)throw new ui(1915,!1);n.markAsTouched();let o=t?.onInvalid,s=oge(n,t?.ignoreValidators);try{if(s){n.submitState.selfSubmitting.set(!0);let e=await Z(()=>a?.(r,i));return e&&sge(n,e),!e||q7(e)&&e.length===0}return Z(()=>o?.(r,i)),!1}finally{n.submitState.selfSubmitting.set(!1)}}function oge(e,t){switch(t){case`all`:return!0;case`none`:return Z(e.valid);default:return!Z(e.invalid)}}function sge(e,t){q7(t)||(t=[t]);let n=new Map;for(let r of t){let t=x9(r,e.fieldTree),i=t.fieldTree(),a=n.get(i);a||(a=[],n.set(i,a)),a.push(t)}for(let[e,t]of n)e.submitState.submissionErrors.set(t)}var A9=class{kind=`compat`;control;fieldTree;context;message;constructor({context:e,kind:t,control:n}){this.context=e,this.kind=t,this.control=n}};function cge(e){if(e.length===0)return null;let t={};for(let n of e)t[n.kind]=n instanceof A9?n.context:n;return t}function lge(e,t){return e===null?[]:Object.entries(e).map(([e,n])=>new A9({context:n,kind:e,control:t}))}var uge=new Ti(``);function j9(e,t){return e instanceof Function?e(t):e}function dge(e){return typeof e==`number`?isNaN(e):e===``||e===!1||e==null}function M9(e){return e===void 0?[]:Array.isArray(e)?e:[e]}function fge(e,t){p9(e),l9.unwrapFieldPath(e).builder.addSyncErrorRule(e=>x9(t(e),e.fieldTree))}function pge(e){return new mge(e)}var N9=class{__brand=void 0;kind=``;fieldTree;message;constructor(e){e&&Object.assign(this,e)}},mge=class extends N9{kind=`required`},P9=class extends N9{kind=`parse`};function hge(e,t){let n=m9(e,_9(),e=>!t?.when||t.when(e));m9(e,y9,({state:e})=>e.metadata(n)()),fge(e,e=>{if(e.state.metadata(n)()&&dge(e.value()))return t?.error?j9(t.error,e):pge({message:j9(t?.message,e)})})}function gge(e,t,n){let r=Q({source:e,computation:()=>[],equal:b9});return{errors:r.asReadonly(),setRawValue:e=>{let i=n(e);r.set(M9(i.error)),i.value!==void 0&&t(i.value),r.set(M9(i.error))},reset:()=>{r.set([])}}}var _ge=class{field;constructor(e){this.field=e}control=this;get value(){return this.field().controlValue()}get valid(){return this.field().valid()}get invalid(){return this.field().invalid()}get pending(){return this.field().pending()}get disabled(){return this.field().disabled()}get enabled(){return!this.field().disabled()}get errors(){return cge(this.field().errors())}get pristine(){return!this.field().dirty()}get dirty(){return this.field().dirty()}get touched(){return this.field().touched()}get untouched(){return!this.field().touched()}get status(){if(this.field().disabled())return`DISABLED`;if(this.field().valid())return`VALID`;if(this.field().invalid())return`INVALID`;if(this.field().pending())return`PENDING`;throw new ui(1910,!1)}valueAccessor=null;hasValidator(e){return e===m7.required&&this.field().required()}updateValueAndValidity(){}},F9={disabled:`disabled`,disabledReasons:`disabledReasons`,dirty:`dirty`,errors:`errors`,hidden:`hidden`,invalid:`invalid`,max:`max`,maxLength:`maxLength`,min:`min`,minLength:`minLength`,name:`name`,pattern:`pattern`,pending:`pending`,readonly:`readonly`,required:`required`,touched:`touched`},vge=(()=>{let e={};for(let t of Object.keys(F9))e[F9[t]]=t;return e})();function I9(e,t){return e[vge[t]]?.()}var L9=Object.values(F9);function R9(){return{}}function z9(e,t,n){return e[t]!==n&&(e[t]=n,!0)}function yge(e,t,n){let r;if(H9(e)&&n.isBadInput(e))return{error:new P9};switch(e.type){case`checkbox`:return{value:e.checked};case`number`:case`range`:case`datetime-local`:if(r=Z(t),typeof r==`number`||r===null)return{value:e.value===``?null:e.valueAsNumber};break;case`date`:case`month`:case`time`:case`week`:if(r=Z(t),r===null||r instanceof Date)return{value:e.valueAsDate};if(typeof r==`number`)return{value:e.valueAsNumber}}if(e.tagName===`INPUT`&&e.type===`text`&&(r??=Z(t),typeof r==`number`||r===null)){if(e.value===``)return{value:null};let t=Number(e.value);return Number.isNaN(t)?{error:new P9}:{value:t}}return{value:e.value}}function B9(e,t){switch(e.type){case`checkbox`:e.checked=t;return;case`radio`:e.checked=t===e.value;return;case`number`:case`range`:case`datetime-local`:if(typeof t==`number`){V9(e,t);return}if(t===null){e.value=``;return}break;case`date`:case`month`:case`time`:case`week`:if(t===null||t instanceof Date){e.valueAsDate=t;return}if(typeof t==`number`){V9(e,t);return}}if(e.tagName===`INPUT`&&e.type===`text`){if(typeof t==`number`){e.value=isNaN(t)?``:String(t);return}if(t===null){e.value=``;return}}e.value=t}function V9(e,t){isNaN(t)?e.value=``:e.valueAsNumber=t}function H9(e){return e.tagName===`INPUT`}function bge(e){return e.type===`date`||e.type===`datetime-local`||e.type===`month`||e.type===`time`||e.type===`week`}function xge(e,t){let n=e.getUTCFullYear(),r=String(e.getUTCMonth()+1).padStart(2,`0`);return t===`month`?`${n}-${r}`:`${n}-${r}-${String(e.getUTCDate()).padStart(2,`0`)}`}function U9(e,t,n){return t instanceof Date&&(e===`min`||e===`max`)&&(n===`date`||n===`month`)?xge(t,n):t}function Sge(e,t){e.listenToCustomControlModel(e=>t.state().controlValue.set(e)),e.listenToCustomControlOutput(`touch`,()=>t.state().markAsTouched()),t.registerAsBinding(e.customControl);let n=R9();return()=>{let r=t.state(),i=r.controlValue();z9(n,`controlValue`,i)&&e.setCustomControlModelInput(i);for(let i of L9){let a;if(a=i===`errors`?t.errors():I9(r,i),z9(n,i,a)&&(e.setInputOnDirectives(i,a),t.elementAcceptsNativeProperty(i)&&!e.customControlHasInput(i))){let e=U9(i,a,t.nativeFormElement.type);V7(t.renderer,t.nativeFormElement,i,e)}}}}function Cge(e){return typeof e==`object`&&!!e}function wge(e,t){let n=R9();t.controlValueAccessor.registerOnChange(e=>{n.controlValue=e,t.state().controlValue.set(e)}),t.controlValueAccessor.registerOnTouched(()=>t.state().markAsTouched());let r=t.injector.get(p7,null,{optional:!0,self:!0});if(r){let e;for(let t of r)Cge(t)&&t.registerOnValidatorChange&&(e??=E(0),t.registerOnValidatorChange(()=>{e.update(e=>e+1)}));let n=r.map(e=>typeof e==`function`?e:e.validate.bind(e)),i=m7.compose(n),a=X(()=>(e?.(),lge(i?i(t.interopNgControl.control):null,t.interopNgControl.control)));t.parseErrorsSource.set(a)}return t.registerAsBinding({reset:()=>{let e=t.state().value();n.controlValue=e,Z(()=>t.controlValueAccessor.writeValue(e))}}),()=>{let r=t.state(),i=r.controlValue();z9(n,`controlValue`,i)&&Z(()=>t.controlValueAccessor.writeValue(i));for(let i of L9){let a=I9(r,i);if(z9(n,i,a)){let n=e.setInputOnDirectives(i,a,i===`name`?Tge:void 0);i===`disabled`&&t.controlValueAccessor.setDisabledState?Z(()=>t.controlValueAccessor.setDisabledState(a)):!n&&t.elementAcceptsNativeProperty(i)&&V7(t.renderer,t.nativeFormElement,i,a)}}}}function Tge(e){return e==null}function Ege(e,t,n){if(typeof MutationObserver!=`function`)return;let r=new MutationObserver(e=>{e.some(e=>Dge(e))&&t()});r.observe(e,{attributes:!0,attributeFilter:[`value`],characterData:!0,childList:!0,subtree:!0}),n.onDestroy(()=>r.disconnect())}function Dge(e){if(e.type===`childList`||e.type===`characterData`){if(e.target instanceof Comment)return!1;for(let t of e.addedNodes)if(!(t instanceof Comment))return!0;for(let t of e.removedNodes)if(!(t instanceof Comment))return!0;return!1}return e.type===`attributes`&&e.target instanceof HTMLOptionElement}function Oge(e,t,n,r){let i=!1,a=t.nativeFormElement,o=gge(()=>t.state().value(),e=>t.state().controlValue.set(e),e=>yge(a,t.state().value,r));n.set(o.errors),t.onReset=()=>{o.reset();let e=t.state().value();s.controlValue=e,B9(a,e)},e.listenToDom(`input`,()=>o.setRawValue(void 0)),e.listenToDom(`blur`,()=>t.state().markAsTouched()),H9(a)&&bge(a)&&r.watchValidity(t.destroyRef,a,()=>o.setRawValue(void 0)),t.registerAsBinding(),a.tagName===`SELECT`&&Ege(a,()=>{i&&(a.value=t.state().controlValue())},t.destroyRef);let s=R9();return()=>{let n=t.state();for(let r of L9){let i=I9(n,r);if(z9(s,r,i)&&(e.setInputOnDirectives(r,i),t.elementAcceptsNativeProperty(r))){let e=U9(r,i,a.type);V7(t.renderer,a,r,e)}}let r=n.controlValue(),o=z9(s,`controlValue`,r),c=a.type===`radio`&&z9(s,`radioValue`,a.value);(o||c)&&B9(a,r),i=!0}}var W9=(()=>{class e{static ɵfac=function(t){return new(t||e)};static ɵprov=vi({token:e,factory:e=>kge.ɵfac(e),providedIn:`root`})}return e})(),kge=(()=>{class e extends W9{document=S(_s);cspNonce=S(Xs,{optional:!0});injectedStyles=new WeakMap;watchValidity(e,t,n){let r=t.getRootNode();this.injectedStyles.has(r)||this.injectedStyles.set(r,this.createTransitionStyle(r));let i=e=>{let t=e;(t.animationName===`ng-valid`||t.animationName===`ng-invalid`)&&n()};t.addEventListener(`animationstart`,i),e.onDestroy(()=>{t.removeEventListener(`animationstart`,i)})}isBadInput(e){return e.validity?.badInput??!1}createTransitionStyle(e){let t=this.document.createElement(`style`);return this.cspNonce&&(t.nonce=this.cspNonce),t.textContent=` +`}var B5=new Map;function V5(e,t=`dark`,n=50){let r=e?.querySelector(`devframes-dock-standalone`)?.shadowRoot;if(r){if(e){let t=B5.get(e);t!==void 0&&(clearTimeout(t),B5.delete(e))}let n=r.querySelector(`style[data-pangular]`);n||(n=e.createElement(`style`),n.dataset.pangular=``,r.append(n)),n.textContent=bme(t);return}if(n>0&&e){let r=B5.get(e);r!==void 0&&clearTimeout(r);let i=setTimeout(()=>{B5.delete(e),V5(e,t,n-1)},100);B5.set(e,i)}}var H5=`pangular-pref`,U5={order:[],hidden:[],pinned:[]};function W5(e){try{return localStorage.getItem(`${H5}:${e}`)}catch{return null}}function G5(e,t){try{t===null?localStorage.removeItem(`${H5}:${e}`):localStorage.setItem(`${H5}:${e}`,t)}catch{}}function xme(){let e=W5(`theme`);return e===`light`||e===`dark`?e:`system`}function Sme(e){G5(`theme`,e===`system`?null:e)}function K5(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`&&e.length>0&&e.length<=40);return[...new Set(t)].slice(0,50)}function Cme(){let e=W5(`tabs`);if(!e)return U5;try{let t=JSON.parse(e);if(!t||typeof t!=`object`||Array.isArray(t))return U5;let n=t;return{order:K5(n.order),hidden:K5(n.hidden),pinned:K5(n.pinned)}}catch{return U5}}function wme(e){G5(`tabs`,!e.order.length&&!e.hidden.length&&!e.pinned.length?null:JSON.stringify(e))}function Tme(){return W5(`passive`)===`true`}function Eme(e){G5(`passive`,e?`true`:null)}function Dme(){return W5(`pill`)===`true`}function Ome(e){G5(`pill`,e?`true`:null)}function q5(e,t){let n=n=>{let r=t.order.indexOf(n);return r<0?t.order.length+e.indexOf(n):r},r=[...e].sort((e,t)=>n(e)-n(t));return[...r.filter(e=>t.pinned.includes(e)),...r.filter(e=>!t.pinned.includes(e))]}function kme(e,t,n){let r=new Map(e.map(e=>[e.id,e]));return q5(e.map(e=>e.id),t).filter(e=>e===n||t.pinned.includes(e)||!t.hidden.includes(e)).map(e=>r.get(e))}function J5(e,t,n,r){let i=q5(e,t),a=i.indexOf(n),o=a+r;if(a<0||o<0||o>=i.length)return t;let s=t.pinned.includes(n);if(t.pinned.includes(i[o])!==s)return t;let c=[...i];return[c[a],c[o]]=[c[o],c[a]],{...t,order:c}}function Ame(e,t,n){let r=e.hidden.filter(e=>e!==t);return{...e,hidden:n?[...r,t]:r,pinned:n?e.pinned.filter(e=>e!==t):e.pinned}}function jme(e,t,n,r){let i=t.pinned.filter(e=>e!==n);return{order:q5(e,t),pinned:r?[...i,n]:i,hidden:r?t.hidden.filter(e=>e!==n):t.hidden}}function Y5(){try{let e=navigator;return/mac|iphone|ipad|ipod/i.test(e.userAgentData?.platform??e.platform??``)}catch{return!1}}function Mme(e=window){try{for(let t=e;t!==t.parent;t=t.parent){let e=t.frameElement?.getRootNode();if(e&&`host`in e&&e.host?.id===`pangular-popup-root`)return!0}}catch{}return!1}var Nme=`pangular-inspector-`;function X5(e=window){try{let t=e.top??e;return t.name.startsWith(Nme)&&t.opener&&t.opener!==t?t.opener:null}catch{return null}}function Pme(e=window){let t=X5(e);if(!t)return!1;let n;try{n=t.location.origin}catch{try{n=new URL(e.document.referrer).origin}catch{n=void 0}}if(!n||n===`null`)return!1;try{return t.postMessage({type:`pangular:popup-return`},n),!0}catch{return!1}}var Fme=class e{current=E(`dark`);preference=E(xme());source=`dark`;sourceAttr=!1;constructor(){let e=S(vs),t=Lme(),n=document.documentElement.dataset.theme,r=n===`light`||n===`dark`;if(n===`light`||n===`dark`)this.fromSource(n,!0);else if(t)r=!0,this.fromSource(Z5(t),!0);else{let t=Ime();if(t){this.fromSource(t.matches?`light`:`dark`,!1);let n=e=>{r||this.fromSource(e.matches?`light`:`dark`,!1)};t.addEventListener(`change`,n),e.onDestroy(()=>t.removeEventListener(`change`,n))}else this.resolve()}let i;try{i=new BroadcastChannel(`pangular:theme`)}catch{}ac(()=>{let e=this.current();try{i?.postMessage(e)}catch{}for(let{win:t,origin:n}of Q5())try{t.postMessage({type:`pangular:theme-change`,theme:e},n)}catch{}});let a=e=>{if(e.source!==window.parent)return;let t=e.data;t?.type===`pangular:theme-change`&&(r=!0,this.fromSource(t.theme===`dark`?`dark`:`light`,!0))};window.addEventListener(`message`,a);let o;t&&(o=new MutationObserver(()=>this.fromSource(Z5(t),!0)),o.observe(t,{attributes:!0,attributeFilter:[`class`]})),e.onDestroy(()=>{window.removeEventListener(`message`,a),o?.disconnect(),i?.close()})}setPreference(e){this.preference.set(e),Sme(e),this.resolve()}fromSource(e,t){this.source=e,this.sourceAttr=t,this.resolve()}resolve(){let e=this.preference(),t=e===`system`?this.source:e;this.current.set(t);let n=document.documentElement;e!==`system`||this.sourceAttr?n.dataset.theme=t:delete n.dataset.theme}static ɵfac=function(t){return new(t||e)};static ɵprov=El({token:e,factory:e.ɵfac})};function Ime(){try{return window.matchMedia?.(`(prefers-color-scheme: light)`)??null}catch{return null}}function Z5(e){return e.classList.contains(`dark`)?`dark`:`light`}function Lme(){try{return window.frameElement?.closest(`.devframes-color-root`)??null}catch{return null}}function Q5(e=window){let t=[],n;try{n=e.location.ancestorOrigins}catch{}let r=e;try{for(let i=0;r!==r.parent;i++){r=r.parent;let a=Rme(e,r,i,n);a&&t.push({win:r,origin:a})}}catch{}return t}function Rme(e,t,n,r){let i=e=>e&&e!==`null`?e:void 0,a=i(r?.item(n));if(a)return a;try{let e=i(t.location.origin);if(e)return e}catch{}if(!(n>0))try{return i(new URL(e.document.referrer).origin)}catch{return}}var zme=`__DEVFRAME_HUB_CLIENT_CONTEXT__`;function $5(){try{return window.parent===window?void 0:window.parent[zme]}catch{return}}function e7(e,t,n=50){let r=$5();if(!r){if(n<=0||window.parent===window)return()=>{};let r=()=>{},i=setTimeout(()=>r=e7(e,t,n-1),100);return()=>{clearTimeout(i),r()}}let i=e.map(e=>r.docks.getStateById(ZC(e))?.events.on(`entry:activated`,()=>t(e))??(()=>{})),a=r.docks.selectedId,o=e.find(e=>ZC(e)===a);return o&&t(o),()=>i.forEach(e=>e())}function t7(){return!!$5()}async function n7(e){let t=$5();if(!t)return!1;try{return await t.docks.switchEntry(ZC(e))}catch{return!1}}function Bme(){let e=$5()?.commands?.openPalette;if(typeof e!=`function`)return!1;try{return e(),!0}catch{return!1}}function Vme(e,t){let n=new URL(e);return n.searchParams.delete(`view`),n.hash=t?`tab=${t}`:``,n.pathname+n.search+n.hash}function Hme(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}var r7=`pangular-tab`;function i7(e,t,n){let r=new URLSearchParams(e.replace(/^#/,``)).get(`tab`)||t;return n.find(e=>e===r)}function a7(e){try{return sessionStorage.getItem(`${r7}:${e}`)}catch{return null}}function Ume(e,t){try{sessionStorage.setItem(`${r7}:${e}`,t)}catch{}}function Wme(e,t){try{return new URL(e,t.href).origin===t.origin}catch{return!1}}function Gme(e,t){if(t.protocol!==`chrome-extension:`)return!1;try{let{protocol:t}=new URL(e);return t===`http:`||t===`https:`}catch{return!1}}function Kme(e=location){let t=new URLSearchParams(e.search).get(`baseURL`);if(t&&(Wme(t,e)||Gme(t,e)))return t;if(!(e.pathname.includes(`__pangular`)||e.pathname.includes(`__devframes/`)))return[`/__pangular/`,`./`]}var o7=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`,qme=`pangular-auth-token:`,Jme=`devframe-auth`,Yme={token:void 0,remember:()=>{}};function Xme(e,t=location){if(typeof e!=`string`)return null;try{let n=new URL(e,t.href).origin;return n===t.origin||n===`null`?null:n}catch{return null}}function Zme(e,t=location,n=$me(),r=globalThis){let i=Xme(e,t);if(!i||(Qme(r),!n))return Yme;let a=qme+i;try{n.removeItem(o7)}catch{}delete globalThis[o7];let o;try{o=n.getItem(a)||void 0}catch{o=void 0}return{get token(){return o},remember(e){try{if(n.removeItem(o7),!e||e===o)return;o=e,n.setItem(a,e)}catch{}}}}var s7=new WeakSet;function Qme(e=globalThis){let t=e.BroadcastChannel;if(typeof t==`function`&&!s7.has(t)){let n=class extends t{constructor(e){if(String(e)===Jme)throw Error(`The devframe-auth channel is off in a panel on another origin.`);super(e)}};s7.add(n),e.BroadcastChannel=n}let n=e.Storage?.prototype;if(n&&!s7.has(n)){s7.add(n);let{getItem:e,setItem:t}=n;n.getItem=function(t){return String(t)===o7?null:e.call(this,t)},n.setItem=function(e,n){String(e)!==o7&&t.call(this,e,n)}}}function $me(){try{return typeof localStorage>`u`?null:localStorage}catch{return null}}var c7=(()=>{class e{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,t){this._renderer=e,this._elementRef=t}setProperty(e,t){this._renderer.setProperty(this._elementRef.nativeElement,e,t)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty(`disabled`,e)}static ɵfac=function(t){return new(t||e)(Rp(rp),Rp(kl))};static ɵdir=sh({type:e})}return e})(),ehe=(()=>{class e extends c7{static ɵfac=(()=>{let t;return function(n){return(t||=Sl(e))(n||e)}})();static ɵdir=sh({type:e,features:[_h]})}return e})(),l7=new Ti(``),the={provide:l7,useExisting:hi(()=>u7),multi:!0};function nhe(){let e=gv()?gv().getUserAgent():``;return/android (\d+)/.test(e.toLowerCase())}var rhe=new Ti(``),u7=(()=>{class e extends c7{_compositionMode;_composing=!1;constructor(e,t,n){super(e,t),this._compositionMode=n,this._compositionMode??=!nhe()}writeValue(e){let t=e??``;this.setProperty(`value`,t)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static ɵfac=function(t){return new(t||e)(Rp(rp),Rp(kl),Rp(rhe,8))};static ɵdir=sh({type:e,selectors:[[`input`,`formControlName`,``,3,`type`,`checkbox`,3,`ngNoCva`,``],[`textarea`,`formControlName`,``,3,`ngNoCva`,``],[`input`,`formControl`,``,3,`type`,`checkbox`,3,`ngNoCva`,``],[`textarea`,`formControl`,``,3,`ngNoCva`,``],[`input`,`ngModel`,``,3,`type`,`checkbox`,3,`ngNoCva`,``],[`textarea`,`ngModel`,``,3,`ngNoCva`,``],[``,`ngDefaultControl`,``]],hostBindings:function(e,t){e&1&&H(`input`,function(e){return t._handleInput(e.target.value)})(`blur`,function(){return t.onTouched()})(`compositionstart`,function(){return t._compositionStart()})(`compositionend`,function(e){return t._compositionEnd(e.target.value)})},standalone:!1,features:[I_([the]),_h]})}return e})();function d7(e){return e==null||f7(e)===0}function f7(e){return e==null?null:Array.isArray(e)||typeof e==`string`?e.length:e instanceof Set?e.size:null}var p7=new Ti(``),ihe=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,m7=class{static min(e){return ahe(e)}static max(e){return ohe(e)}static required(e){return h7(e)}static requiredTrue(e){return she(e)}static email(e){return che(e)}static minLength(e){return lhe(e)}static maxLength(e){return uhe(e)}static pattern(e){return dhe(e)}static nullValidator(e){return g7()}static compose(e){return S7(e)}static composeAsync(e){return w7(e)}};function ahe(e){return t=>{if(t.value==null||e==null)return null;let n=parseFloat(t.value);return!isNaN(n)&&n<e?{min:{min:e,actual:t.value}}:null}}function ohe(e){return t=>{if(t.value==null||e==null)return null;let n=parseFloat(t.value);return!isNaN(n)&&n>e?{max:{max:e,actual:t.value}}:null}}function h7(e){return d7(e.value)?{required:!0}:null}function she(e){return e.value===!0?null:{required:!0}}function che(e){return d7(e.value)||ihe.test(e.value)?null:{email:!0}}function lhe(e){return t=>{let n=t.value?.length??f7(t.value);return n===null||n===0?null:n<e?{minlength:{requiredLength:e,actualLength:n}}:null}}function uhe(e){return t=>{let n=t.value?.length??f7(t.value);return n!==null&&n>e?{maxlength:{requiredLength:e,actualLength:n}}:null}}function dhe(e){if(!e)return g7;let t,n;return typeof e==`string`?(n=``,e.charAt(0)!==`^`&&(n+=`^`),n+=e,e.charAt(e.length-1)!==`$`&&(n+=`$`),t=new RegExp(n)):(n=e.toString(),t=e),e=>{if(d7(e.value))return null;let r=e.value;return t.test(r)?null:{pattern:{requiredPattern:n,actualValue:r}}}}function g7(e){return null}function _7(e){return e!=null}function v7(e){return Qm(e)?Aee(e):e}function y7(e){let t={};return e.forEach(e=>{t=e==null?t:{...t,...e}}),Object.keys(t).length===0?null:t}function b7(e,t){return t.map(t=>t(e))}function fhe(e){return!e.validate}function x7(e){return e.map(e=>fhe(e)?e:t=>e.validate(t))}function S7(e){if(!e)return null;let t=e.filter(_7);return t.length==0?null:function(e){return y7(b7(e,t))}}function C7(e){return e==null?null:S7(x7(e))}function w7(e){if(!e)return null;let t=e.filter(_7);return t.length==0?null:function(e){return Vee(b7(e,t).map(v7)).pipe(ci(y7))}}function T7(e){return e==null?null:w7(x7(e))}function E7(e){return e?Array.isArray(e)?e:[e]:[]}function D7(e,t){return Array.isArray(e)?e.includes(t):e===t}function O7(e,t){let n=E7(t);return E7(e).forEach(e=>{D7(n,e)||n.push(e)}),n}function k7(e,t){return E7(t).filter(t=>!D7(e,t))}var phe=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=C7(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=T7(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control?.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},A7=`VALID`,j7=`INVALID`,M7=`PENDING`,N7=`DISABLED`,P7=class{},F7=class extends P7{value;source;constructor(e,t){super(),this.value=e,this.source=t}},I7=class extends P7{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},L7=class extends P7{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},R7=class extends P7{status;source;constructor(e,t){super(),this.status=e,this.source=t}},z7=class extends P7{source;constructor(e){super(),this.source=e}};function mhe(e){return Array.isArray(e)?C7(e):e||null}function hhe(e){return Array.isArray(e)?T7(e):e||null}function ghe(e){return e!=null&&!Array.isArray(e)&&typeof e==`object`}var _he=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_hasRequired=E(!1);_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e,this._updateHasRequiredValidator()}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return Z(this.statusReactive)}set status(e){Z(()=>this.statusReactive.set(e))}_status=X(()=>this.statusReactive());statusReactive=E(void 0);get valid(){return this.status===A7}get invalid(){return this.status===j7}get pending(){return this.status===M7}get disabled(){return this.status===N7}get enabled(){return this.status!==N7}errors;get pristine(){return Z(this.pristineReactive)}set pristine(e){Z(()=>this.pristineReactive.set(e))}_pristine=X(()=>this.pristineReactive());pristineReactive=E(!0);get dirty(){return!this.pristine}get touched(){return Z(this.touchedReactive)}set touched(e){Z(()=>this.touchedReactive.set(e))}_touched=X(()=>this.touchedReactive());touchedReactive=E(!1);get untouched(){return!this.touched}_events=new Vr;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:`change`}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(O7(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(O7(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(k7(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(k7(e,this._rawAsyncValidators))}hasValidator(e){return D7(this._rawValidators,e)}hasAsyncValidator(e){return D7(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsTouched({...e,sourceControl:n}),t&&e.emitEvent!==!1&&this._events.next(new L7(!0,n))}markAllAsDirty(e={}){this.markAsDirty({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(e))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=e.sourceControl??this;this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),e.onlySelf||this._parent?._updateTouched(e,n),t&&e.emitEvent!==!1&&this._events.next(new L7(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty({...e,sourceControl:n}),t&&e.emitEvent!==!1&&this._events.next(new I7(!1,n))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=e.sourceControl??this;this._forEachChild(t=>{t.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),e.onlySelf||this._parent?._updatePristine(e,n),t&&e.emitEvent!==!1&&this._events.next(new I7(!0,n))}markAsPending(e={}){this.status=M7;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new R7(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending({...e,sourceControl:t})}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=N7,this.errors=null,this._forEachChild(t=>{t.disable({...e,onlySelf:!0})}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new F7(this.value,n)),this._events.next(new R7(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...e,skipPristineCheck:t},this),this._onDisabledChange.forEach(e=>e(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=A7,this._forEachChild(t=>{t.enable({...e,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors({...e,skipPristineCheck:t},this),this._onDisabledChange.forEach(e=>e(!1))}_updateAncestors(e,t){e.onlySelf||(this._parent?.updateValueAndValidity(e),e.skipPristineCheck||this._parent?._updatePristine({},t),this._parent?._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let t=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===A7||this.status===M7)&&this._runAsyncValidator(t,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new F7(this.value,t)),this._events.next(new R7(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity({...e,sourceControl:t})}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?N7:A7}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=M7,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let n=v7(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(n=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(n,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(e){let t=e;return t==null||(Array.isArray(t)||(t=t.split(`.`)),t.length===0)?null:t.reduce((e,t)=>e&&e._find(t),this)}getError(e,t){let n=t?this.get(t):this;return n?.errors?n.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,t,n){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||n)&&this._events.next(new R7(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new Cs,this.statusChanges=new Cs}_calculateStatus(){return this._allControlsDisabled()?N7:this.errors?j7:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(M7)?M7:this._anyControlsHaveStatus(j7)?j7:A7}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,t){let n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,e.onlySelf||this._parent?._updatePristine(e,t),r&&this._events.next(new I7(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new L7(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){ghe(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=mhe(this._rawValidators),this._updateHasRequiredValidator()}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=hhe(this._rawAsyncValidators)}_updateHasRequiredValidator(){Z(()=>this._hasRequired.set(this.hasValidator(m7.required)))}};function B7(e){return e.tagName===`INPUT`||e.tagName===`SELECT`||e.tagName===`TEXTAREA`}function vhe(e){if(e.tagName!==`INPUT`)return!1;let t=e.type;return t===`number`||t===`range`||t===`date`||t===`month`}function yhe(e){return e.tagName===`INPUT`||e.tagName===`TEXTAREA`}function V7(e,t,n,r){switch(n){case`name`:e.setAttribute(t,n,r);break;case`disabled`:case`readonly`:case`required`:r?e.setAttribute(t,n,``):e.removeAttribute(t,n);break;case`max`:case`min`:case`minLength`:case`maxLength`:r===void 0?e.removeAttribute(t,n):e.setAttribute(t,n,r.toString())}}var bhe=class{kind;context;control;message;constructor({kind:e,context:t,control:n}){this.kind=e,this.context=t,this.control=n}},xhe=(()=>{class e{_validator=g7;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let t=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(t),this._validator=this._enabled?this.createValidator(t):g7,this._onChange?.()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static ɵfac=function(t){return new(t||e)};static ɵdir=sh({type:e,features:[xc]})}return e})(),She={provide:p7,useExisting:hi(()=>H7),multi:!0},H7=(()=>{class e extends xhe{required;inputName=`required`;normalizeInput=dv;createValidator=e=>h7;enabled(e){return e}static ɵfac=(()=>{let t;return function(n){return(t||=Sl(e))(n||e)}})();static ɵdir=sh({type:e,selectors:[[``,`required`,``,`formControlName`,``,3,`type`,`checkbox`],[``,`required`,``,`formControl`,``,3,`type`,`checkbox`],[``,`required`,``,`ngModel`,``,3,`type`,`checkbox`]],hostVars:1,hostBindings:function(e,t){e&2&&k(`required`,t._enabled?``:null)},inputs:{required:`required`},standalone:!1,features:[I_([She]),_h]})}return e})(),Che=new Ti(``);function whe(e){return Object.getPrototypeOf(e.constructor)===ehe}function U7(e,t){if(!t)return null;let n,r,i;return t.forEach(e=>{e.constructor===u7?n=e:whe(e)?r=e:i=e}),i||r||n||null}var The=class extends phe{_parent=null;name=null;valueAccessor=null;isCustomControlBased=!1;userOnReset;resetSubscription;set onReset(e){this.userOnReset=e,this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.control&&(this.resetSubscription=this.control.events.subscribe(e=>{e instanceof z7&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription?.add(this.resetSubscription))}isNativeFormElement=!1;rawValueAccessors;_selectedValueAccessor=null;get selectedValueAccessor(){return this._selectedValueAccessor??=U7(this,this.rawValueAccessors)}parseErrorsValidator=null;renderer;injector;requiredValidatorViaDi;subscription;customControlBindings=null;constructor(e,t,n){super(),this.injector=e,this.renderer=t,this.rawValueAccessors=n,this.injector?.get(vs)?.onDestroy(()=>{this.removeParseErrorsValidator(this.control),this.subscription?.unsubscribe()})}setupCustomControl(){this.subscription?.unsubscribe();let e=this.injector?.get(Cne);if(!this.control||!e)return;let t=e.markForCheck.bind(e);this.subscription=new ar,this.subscription.add(this.control.valueChanges.subscribe(t)),this.subscription.add(this.control.statusChanges.subscribe(t)),this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.userOnReset&&(this.resetSubscription=this.control.events.subscribe(e=>{e instanceof z7&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription.add(this.resetSubscription)),this.parseErrorsValidator&&this.control.addValidators(this.parseErrorsValidator)}ngControlCreate(e){!e.nativeElement.hasAttribute?.(`ngNoCva`)&&(this.rawValueAccessors&&this.rawValueAccessors.length>0||this.valueAccessor!==null)||!e.customControl||(this.isCustomControlBased=!0,e.listenToCustomControlModel(e=>{this.control?.markAsDirty(),this.control?.setValue(e,{emitModelToViewChange:!1}),this.viewToModelUpdate(e)}),e.listenToCustomControlOutput(`touch`,()=>{this.control?.markAsTouched()}),this.customControlBindings={},this.isNativeFormElement=B7(e.nativeElement),this.requiredValidatorViaDi=this._rawValidators.find(e=>e instanceof H7))}ngControlUpdate(e,t){if(!this.isCustomControlBased)return;let n=this.control,r=this.customControlBindings;Object.is(r.value,n.value)||(r.value=n.value,e.setCustomControlModelInput(n.value)),this.bindControlProperty(e,r,`touched`,n.touched),this.bindControlProperty(e,r,`dirty`,n.dirty),this.bindControlProperty(e,r,`valid`,n.valid),this.bindControlProperty(e,r,`invalid`,n.invalid),this.bindControlProperty(e,r,`pending`,n.pending),this.bindControlProperty(e,r,`disabled`,n.disabled),this.shouldBindRequired&&this.bindControlProperty(e,r,`required`,this.isRequired);let i=n.errors;if(r.errors!==i){r.errors=i;let t=this._convertErrors(i);e.setInputOnDirectives(`errors`,t)}}get isRequired(){return(this.requiredValidatorViaDi?._enabled||this.control?._hasRequired())??!1}get shouldBindRequired(){return!0}bindControlProperty(e,t,n,r){if(t[n]===r)return;t[n]=r;let i=e.setInputOnDirectives(n,r);this.isNativeFormElement&&!i&&(n===`disabled`||n===`required`)&&this.renderer&&V7(this.renderer,e.nativeElement,n,r)}_convertErrors(e){if(e===null)return[];let t=this.control;return Object.entries(e).map(([e,n])=>new bhe({context:n,kind:e,control:t}))}setParseErrorSource(e){if(e===void 0)return;let t=null,n=X(()=>{let t=e();return t.length===0?null:t.reduce((e,t)=>(e[t.kind]=t,e),{})});this.parseErrorsValidator=(()=>t).bind(this),ac(()=>{t=n(),this.control?.updateValueAndValidity({emitEvent:!1})},{injector:this.injector})}removeParseErrorsValidator(e){this.parseErrorsValidator&&(e?.removeValidators(this.parseErrorsValidator),e?.updateValueAndValidity({emitEvent:!1}))}},Ehe=Symbol(`FIELD_TREE`),W7=0;function Dhe(){return W7}function G7(e,t){return(...n)=>{try{return W7=t,e(...n)}finally{W7=0}}}function Ohe(e){return!e}function K7(e){return e}function q7(e){return Array.isArray(e)}function J7(e){return(typeof e==`object`||typeof e==`function`)&&e!=null}var Y7=Symbol(),X7=Symbol(),Z7=class{predicates;fns=[];constructor(e){this.predicates=e}push(e){this.fns.push(e9(this.predicates,e))}mergeIn(e){let t=this.predicates?e.fns.map(e=>e9(this.predicates,e)):e.fns;this.fns.push(...t)}hasRules(){return this.fns.length>0}},Q7=class extends Z7{get defaultValue(){return!1}compute(e){return this.fns.some(t=>{let n=t(e);return n&&n!==X7})}},$7=class e extends Z7{ignore;static ignoreNull(t){return new e(t,e=>e===null)}constructor(e,t){super(e),this.ignore=t}get defaultValue(){return[]}compute(e){return this.fns.reduce((t,n)=>{let r=n(e);return r===void 0||r===X7?t:q7(r)?[...t,...this.ignore?r.filter(e=>!this.ignore(e)):r]:this.ignore&&this.ignore(r)?t:[...t,r]},[])}},khe=class extends $7{constructor(e){super(e,void 0)}},Ahe=class extends Z7{key;get defaultValue(){return this.key.reducer.getInitial()}constructor(e,t){super(e),this.key=t}compute(e){if(this.fns.length===0)return this.key.reducer.getInitial();let t=this.key.reducer.getInitial();for(let n=0;n<this.fns.length;n++){let r=this.fns[n](e);r!==X7&&(t=this.key.reducer.reduce(t,r))}return t}};function e9(e,t){return e.length===0?t:n=>{for(let t of e){let e=n.stateOf(t.path),r=Z(e.structure.pathKeys).length-t.depth;for(let t=0;t<r;t++)e=e.structure.parent;if(!t.fn(e.context))return X7}return t(n)}}var t9=class{predicates;hidden;disabledReasons;readonly;syncErrors;syncTreeErrors;asyncErrors;metadata=new Map;constructor(e){this.predicates=e,this.hidden=new Q7(e),this.disabledReasons=new khe(e),this.readonly=new Q7(e),this.syncErrors=$7.ignoreNull(e),this.syncTreeErrors=$7.ignoreNull(e),this.asyncErrors=$7.ignoreNull(e)}hasAnyLogic(){return this.hidden.hasRules()||this.disabledReasons.hasRules()||this.readonly.hasRules()||this.syncErrors.hasRules()||this.syncTreeErrors.hasRules()||this.asyncErrors.hasRules()||this.metadata.size>0}hasMetadata(e){return this.metadata.has(e)}hasMetadataKeys(){return this.metadata.size>0}getMetadataKeys(){return this.metadata.keys()}getMetadata(e){return this.metadata.has(e)||this.metadata.set(e,new Ahe(this.predicates,e)),this.metadata.get(e)}mergeIn(e){this.hidden.mergeIn(e.hidden),this.disabledReasons.mergeIn(e.disabledReasons),this.readonly.mergeIn(e.readonly),this.syncErrors.mergeIn(e.syncErrors),this.syncTreeErrors.mergeIn(e.syncTreeErrors),this.asyncErrors.mergeIn(e.asyncErrors);for(let t of e.getMetadataKeys()){let n=e.metadata.get(t);this.getMetadata(t).mergeIn(n)}}},n9=class{depth;constructor(e){this.depth=e}build(){return new a9(this,[],0)}},r9=class e extends n9{constructor(e){super(e)}current;all=[];addHiddenRule(e){this.getCurrent().addHiddenRule(e)}addDisabledReasonRule(e){this.getCurrent().addDisabledReasonRule(e)}addReadonlyRule(e){this.getCurrent().addReadonlyRule(e)}addSyncErrorRule(e){this.getCurrent().addSyncErrorRule(e)}addSyncTreeErrorRule(e){this.getCurrent().addSyncTreeErrorRule(e)}addAsyncErrorRule(e){this.getCurrent().addAsyncErrorRule(e)}addMetadataRule(e,t){this.getCurrent().addMetadataRule(e,t)}getChild(e){if(e===Y7){let e=this.getCurrent().children;e.size>+!!e.has(Y7)&&(this.current=void 0)}return this.getCurrent().getChild(e)}hasLogic(e){return this===e||this.all.some(({builder:t})=>t.hasLogic(e))}hasRules(){return this.all.length>0}anyChildHasLogic(){return this.all.some(({builder:e})=>e.anyChildHasLogic())}mergeIn(e,t){t?this.all.push({builder:e,predicate:{fn:G7(t.fn,this.depth),path:t.path}}):this.all.push({builder:e}),this.current=void 0}getCurrent(){return this.current===void 0&&(this.current=new i9(this.depth),this.all.push({builder:this.current})),this.current}static newRoot(){return new e(0)}},i9=class extends n9{logic=new t9([]);children=new Map;constructor(e){super(e)}addHiddenRule(e){this.logic.hidden.push(G7(e,this.depth))}addDisabledReasonRule(e){this.logic.disabledReasons.push(G7(e,this.depth))}addReadonlyRule(e){this.logic.readonly.push(G7(e,this.depth))}addSyncErrorRule(e){this.logic.syncErrors.push(G7(e,this.depth))}addSyncTreeErrorRule(e){this.logic.syncTreeErrors.push(G7(e,this.depth))}addAsyncErrorRule(e){this.logic.asyncErrors.push(G7(e,this.depth))}addMetadataRule(e,t){this.logic.getMetadata(e).push(G7(t,this.depth))}getChild(e){return this.children.has(e)||this.children.set(e,new r9(this.depth+1)),this.children.get(e)}hasLogic(e){return this===e}hasRules(){return this.logic.hasAnyLogic()||this.children.size>0}anyChildHasLogic(){for(let e of this.children.values())if(e.hasRules())return!0;return!1}},a9=class e{builder;predicates;depth;logic;constructor(e,t,n){this.builder=e,this.predicates=t,this.depth=n,this.logic=e?Mhe(e,t,n):new t9([])}getChild(t){let n=this.builder?o9(this.builder,t):[];if(n.length===0)return new e(void 0,[],this.depth+1);if(n.length===1){let{builder:t,predicates:r}=n[0];return new e(t,[...this.predicates,...r.map(e=>s9(e,this.depth))],this.depth+1)}return new jhe(n.map(({builder:t,predicates:n})=>new e(t,[...this.predicates,...n.map(e=>s9(e,this.depth))],this.depth+1)))}hasLogic(e){return this.builder?this.builder.hasLogic(e):!1}hasRules(){return this.builder?this.builder.hasRules():!1}anyChildHasLogic(){return this.builder?this.builder.anyChildHasLogic():!1}},jhe=class e{all;logic;constructor(e){this.all=e,this.logic=new t9([]);for(let t of e)this.logic.mergeIn(t.logic)}getChild(t){return new e(this.all.flatMap(e=>e.getChild(t)))}hasLogic(e){return this.all.some(t=>t.hasLogic(e))}hasRules(){return this.all.some(e=>e.hasRules())}anyChildHasLogic(){return this.all.some(e=>e.anyChildHasLogic())}};function o9(e,t){if(e instanceof r9)return e.all.flatMap(({builder:e,predicate:n})=>{let r=o9(e,t);return n?r.map(({builder:e,predicates:t})=>({builder:e,predicates:[...t,n]})):r});if(e instanceof i9)return[...t!==Y7&&e.children.has(Y7)?[{builder:e.getChild(Y7),predicates:[]}]:[],...e.children.has(t)?[{builder:e.getChild(t),predicates:[]}]:[]];throw new ui(1909,!1)}function Mhe(e,t,n){let r=new t9(t);if(e instanceof r9){let i=e.all.map(({builder:e,predicate:r})=>new a9(e,r?[...t,s9(r,n)]:t,n));for(let e of i)r.mergeIn(e.logic)}else if(e instanceof i9)r.mergeIn(e.logic);else throw new ui(1909,!1);return r}function s9(e,t){return{...e,depth:t}}var c9=Symbol(`PATH`),l9=class e{keys;parent;keyInParent;root;children=new Map;fieldPathProxy=new Proxy(this,Nhe);logicBuilder;constructor(e,t,n,r){this.keys=e,this.parent=n,this.keyInParent=r,this.root=t??this,n||(this.logicBuilder=r9.newRoot())}get builder(){return this.logicBuilder?this.logicBuilder:this.parent.builder.getChild(this.keyInParent)}getChild(t){return this.children.has(t)||this.children.set(t,new e([...this.keys,t],this.root,this,t)),this.children.get(t)}mergeIn(e,t){let n=e.compile();this.builder.mergeIn(n.builder,t)}static unwrapFieldPath(e){return e[c9]}static newRoot(){return new e([],void 0,void 0,void 0)}},Nhe={get(e,t){return t===c9?e:e.getChild(t).fieldPathProxy}},u9=void 0,d9=new Map,f9=class e{schemaFn;constructor(e){this.schemaFn=e}compile(){if(d9.has(this))return d9.get(this);let e=l9.newRoot();d9.set(this,e);let t=u9;try{u9=e,this.schemaFn(e.fieldPathProxy)}finally{u9=t}return e}static create(t){return t instanceof e?t:new e(t)}static rootCompile(t){try{return d9.clear(),t===void 0?l9.newRoot():t instanceof e?t.compile():new e(t).compile()}finally{d9.clear()}}};function Phe(e){return e instanceof f9||typeof e==`function`}function p9(e){if(u9!==l9.unwrapFieldPath(e).root)throw new ui(1908,!1)}function m9(e,t,n){return p9(e),l9.unwrapFieldPath(e).builder.addMetadataRule(t,n),t}var h9={list(){return{reduce:(e,t)=>t===void 0?e:[...e,t],getInitial:()=>[]}},min(){return{reduce:(e,t)=>e===void 0||t===void 0?e??t:t<e?t:e,getInitial:()=>void 0}},max(){return{reduce:(e,t)=>e===void 0||t===void 0?e??t:t>e?t:e,getInitial:()=>void 0}},or(){return{reduce:(e,t)=>e||t,getInitial:()=>!1}},and(){return{reduce:(e,t)=>e&&t,getInitial:()=>!0}},override:Fhe};function Fhe(e){return{reduce:(e,t)=>t,getInitial:()=>e?.()}}var g9=Symbol(`IS_ASYNC_VALIDATION_RESOURCE`),Ihe=class{reducer;create;brand;[g9];constructor(e,t){this.reducer=e,this.create=t}};function _9(e){return new Ihe(e??h9.override())}function v9(){return _9()}var y9=_9(h9.or()),Lhe=v9(),Rhe=v9(),zhe=_9(h9.max()),Bhe=_9(h9.min()),Vhe=_9(h9.list());function b9(e,t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}function Hhe(e){return e.errors().length>0?`invalid`:e.pending()?`unknown`:`valid`}var Uhe=class{node;constructor(e){this.node=e}rawSyncTreeErrors=X(()=>this.shouldSkipValidation()?[]:[...this.node.logicNode.logic.syncTreeErrors.compute(this.node.context),...this.node.structure.parent?.validationState.rawSyncTreeErrors()??[]],{equal:b9});syncErrors=X(()=>this.shouldSkipValidation()?[]:[...this.node.logicNode.logic.syncErrors.compute(this.node.context),...this.syncTreeErrors(),...Whe(this.node.submitState.submissionErrors())],{equal:b9});syncValid=X(()=>this.shouldSkipValidation()?!0:this.node.structure.reduceChildren(this.syncErrors().length===0,(e,t)=>t&&e.validationState.syncValid(),Ohe));syncTreeErrors=X(()=>this.rawSyncTreeErrors().filter(e=>e.fieldTree===this.node.fieldTree),{equal:b9});rawAsyncErrors=X(()=>this.shouldSkipValidation()?[]:[...this.node.logicNode.logic.asyncErrors.compute(this.node.context),...this.node.structure.parent?.validationState.rawAsyncErrors()??[]],{equal:b9});asyncErrors=X(()=>this.shouldSkipValidation()?[]:this.rawAsyncErrors().filter(e=>e===`pending`||e.fieldTree===this.node.fieldTree),{equal:b9});parseErrors=X(()=>this.node.formFieldBindings().flatMap(e=>e.parseErrors()),{equal:b9});errors=X(()=>[...this.parseErrors(),...this.syncErrors(),...this.asyncErrors().filter(e=>e!==`pending`)],{equal:b9});errorSummary=X(()=>{let e=this.node.structure.reduceChildren(this.errors(),(e,t)=>[...t,...e.errorSummary()]);return Z(()=>e.sort(Ghe)),e},{equal:b9});pending=X(()=>this.node.structure.reduceChildren(this.asyncErrors().includes(`pending`),(e,t)=>t||e.validationState.pending()));status=X(()=>{if(this.shouldSkipValidation())return`valid`;let e=Hhe(this);return this.node.structure.reduceChildren(e,(e,t)=>t===`invalid`||e.validationState.status()===`invalid`?`invalid`:t===`unknown`||e.validationState.status()===`unknown`?`unknown`:`valid`,e=>e===`invalid`)});valid=X(()=>this.status()===`valid`);invalid=X(()=>this.status()===`invalid`);shouldSkipValidation=X(()=>this.node.hidden()||this.node.disabled()||this.node.readonly()||this.node.structure.isOrphaned())};function Whe(e){return e===void 0?[]:q7(e)?e:[e]}function x9(e,t){if(q7(e))for(let n of e)n.fieldTree??=t;else e&&(e.fieldTree??=t);return e}function S9(e){return e.formField?e.formField.element:e.fieldTree().formFieldBindings().reduce((e,t)=>!e||!t.element?e??t.element:e.compareDocumentPosition(t.element)&Node.DOCUMENT_POSITION_PRECEDING?t.element:e,void 0)}function Ghe(e,t){let n=S9(e),r=S9(t);return n===r?0:n===void 0||r===void 0?n===void 0?1:-1:n.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_PRECEDING?1:-1}var C9=_9(),Khe=class{node;cache=new WeakMap;constructor(e){this.node=e,this.fieldTreeOf=this.fieldTreeOf.bind(this),this.stateOf=this.stateOf.bind(this)}resolve(e){if(!this.cache.has(e)){let t=X(()=>{let t=l9.unwrapFieldPath(e),n=this.node,r=Dhe();for(;r>0||!n.structure.logic.hasLogic(t.root.builder);)if(r--,n=n.structure.parent,n===void 0)throw new ui(1900,!1);for(let e of t.keys)if(n=n.structure.getChild(e),n===void 0)throw new ui(1901,!1);return n.fieldTree});this.cache.set(e,t)}return this.cache.get(e)()}get fieldTree(){return this.node.fieldProxy}get state(){return this.node}get value(){return this.node.structure.value}get key(){return this.node.structure.keyInParent}get pathKeys(){return this.node.structure.pathKeys}index=X(()=>{let e=this.key();if(!q7(Z(this.node.structure.parent.value)))throw new ui(1906,!1);return Number(e)});fieldTreeOf(e){return this.resolve(e)}stateOf(e){return this.resolve(e)()}valueOf=e=>{let t=this.resolve(e)().value();if(t instanceof _he)throw new ui(1907,!1);return t}},qhe=class{node;metadata=new Map;constructor(e){this.node=e}runMetadataCreateLifecycle(){if(!this.node.logicNode.logic.hasMetadataKeys())return;let e=yne();e&&Q_(!1);try{Z(()=>Za(this.node.structure.injector,()=>{for(let e of this.node.logicNode.logic.getMetadataKeys())if(e.create){let t=this.node.logicNode.logic.getMetadata(e),n=e.create(this.node,X(()=>t.compute(this.node.context)));this.metadata.set(e,n)}}))}finally{e&&Q_(!0)}}get(e){if(this.has(e)&&!this.metadata.has(e)){if(e.create)throw new ui(1912,!1);let t=this.node.logicNode.logic.getMetadata(e);this.metadata.set(e,X(()=>t.compute(this.node.context)))}return this.metadata.get(e)}has(e){return this.node.logicNode.logic.hasMetadata(e)}},Jhe={get(e,t,n){if(t===Ehe)return!0;let r=e(),i=r.structure.getChild(t);if(i!==void 0)return i.fieldTree;let a=Z(r.value);if(q7(a)){if(t===`length`)return r.value().length;if(t===Symbol.iterator)return()=>(r.value(),Array.prototype[Symbol.iterator].apply(r.fieldTree))}if(J7(a)&&t===Symbol.iterator)return function*(){for(let e in n)yield[e,n[e]]}},getOwnPropertyDescriptor(e,t){let n=Z(e().value),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&!r.configurable&&(r.configurable=!0),r},ownKeys(e){let t=Z(e().value);return typeof t==`object`&&t?Reflect.ownKeys(t):[]}};function Yhe(e,t){let n=X(()=>e()[t()]);return n[$t]=e[$t],n.set=r=>{Object.is(Z(n),r)||e.update(e=>Xhe(e,r,t()))},n.update=e=>{n.set(e(Z(n)))},n.asReadonly=()=>n,n}function Xhe(e,t,n){if(q7(e)){let r=[...e];return r[n]=t,r}return{...e,[n]:t}}var w9=Symbol(``),T9=X(()=>!1),E9=class{logic;node;createChildNode;identitySymbol=Symbol();_injector=void 0;_anyChildHasLogic;get injector(){return this._injector??=gs.create({providers:[],parent:this.fieldManager.injector}),this._injector}constructor(e,t,n){this.logic=e,this.node=t,this.createChildNode=n}children(){this.ensureChildrenMap();let e=this.childrenMap();return e===void 0?[]:Array.from(e.byPropertyKey.values()).map(e=>Z(e.reader))}materializedChildren(){let e=this.childrenMap();return e===void 0?[]:Array.from(e.byPropertyKey.values()).map(e=>e.node)}_areChildrenMaterialized(){return Z(this.childrenMap)!==void 0}ensureChildrenMap(){this._areChildrenMaterialized()||Z(()=>{this.childrenMap.update(e=>this.computeChildrenMap(this.value(),e,!0))})}getChild(e){this.ensureChildrenMap();let t=e.toString(),n=Z(this.childrenMap)?.byPropertyKey.get(t)?.reader;return n||=this.createReader(t),n()}reduceChildren(e,t,n){let r=this.childrenMap();if(!r)return e;let i=e;for(let e of r.byPropertyKey.values()){if(n?.(i))break;i=t(Z(e.reader),i)}return i}destroy(){this.injector.destroy()}createKeyOrOrphanSignals(e,t,n){if(e===`root`)return{keyInParent:D9,isOrphaned:T9};let r=this.parent,i=n,a=X(()=>{if(r.structure.isOrphaned())return w9;let e=r.structure.childrenMap();if(!e)return w9;let n=e.byPropertyKey.get(i);if(n&&n.node===this.node)return i;if(t===void 0)return w9;for(let[t,n]of e.byPropertyKey)if(n.node===this.node)return i=t;return w9}),o=X(()=>a()===w9);return{keyInParent:X(()=>{let e=a();if(e===w9)throw t===void 0?new ui(-1902,!1):new ui(1904,!1);return e}),isOrphaned:o}}createChildrenMap(){return Q({source:this.value,computation:(e,t)=>this.computeChildrenMap(e,t?.value,!1)})}computeChildrenMap(e,t,n){if(!J7(e)||!n&&t===void 0&&!(this._anyChildHasLogic??=this.logic.anyChildHasLogic()))return;t??={byPropertyKey:new Map};let r,i=q7(e);t!==void 0&&(r=i?ege(t,e,this.identitySymbol):tge(t,e));for(let n of Object.keys(e)){let a,o=e[n];if(o===void 0){t.byPropertyKey.has(n)&&(r??={...t},r.byPropertyKey.delete(n));continue}i&&J7(o)&&!q7(o)&&(a=o[this.identitySymbol]??=Symbol(``));let s;a&&(t.byTrackingKey?.has(a)||(r??={...t},r.byTrackingKey??=new Map,r.byTrackingKey.set(a,this.createChildNode(n,a,i))),s=(r??t).byTrackingKey.get(a));let c=t.byPropertyKey.get(n);c===void 0?(r??={...t},r.byPropertyKey.set(n,{reader:this.createReader(n),node:s??this.createChildNode(n,a,i)})):s&&s!==c.node&&(r??={...t},c.node=s)}return r??t}createReader(e){return X(()=>this.childrenMap()?.byPropertyKey.get(e)?.node)}},Zhe=class extends E9{fieldManager;value;get parent(){}get root(){return this.node}get pathKeys(){return $he}get keyInParent(){return D9}isOrphaned=T9;childrenMap;constructor(e,t,n,r,i){super(t,e,i),this.fieldManager=n,this.value=r,this.childrenMap=this.createChildrenMap()}},Qhe=class extends E9{logic;parent;root;pathKeys;keyInParent;value;childrenMap;isOrphaned;get fieldManager(){return this.root.structure.fieldManager}constructor(e,t,n,r,i,a){super(t,e,a),this.logic=t,this.parent=n,this.root=this.parent.structure.root;let o=this.createKeyOrOrphanSignals(`child`,r,i);this.isOrphaned=o.isOrphaned,this.keyInParent=o.keyInParent,this.pathKeys=X(()=>[...n.structure.pathKeys(),this.keyInParent()]),this.value=Yhe(this.parent.structure.value,this.keyInParent),this.childrenMap=this.createChildrenMap(),this.fieldManager.structures.add(this)}},$he=X(()=>[]),D9=X(()=>{throw new ui(1905,!1)});function ege(e,t,n){let r,i=new Set(e.byPropertyKey.keys()),a=e.byTrackingKey&&new Set(e.byTrackingKey.keys());for(let e=0;e<t.length;e++){let r=t[e];i.delete(e.toString()),a&&J7(r)&&Object.hasOwn(r,n)&&a.delete(r[n])}if(i.size>0){r??={...e};for(let e of i)r.byPropertyKey.delete(e)}if(a&&a.size>0){r??={...e};for(let e of a)r.byTrackingKey.delete(e)}return r}function tge(e,t){let n;for(let r of e.byPropertyKey.keys())Object.hasOwn(t,r)||(n??={...e},n.byPropertyKey.delete(r));return n}var nge=class{node;selfSubmitting=E(!1);submissionErrors;constructor(e){this.node=e,this.submissionErrors=Q({source:this.node.structure.value,computation:()=>[]})}submitting=X(()=>this.selfSubmitting()||(this.node.structure.parent?.submitting()??!1))},O9=class{structure;validationState;metadataState;nodeState;submitState;fieldAdapter;controlValue;_context=void 0;get context(){return this._context??=new Khe(this)}fieldProxy=new Proxy(()=>this,Jhe);pathNode;constructor(e){this.pathNode=e.pathNode,this.fieldAdapter=e.fieldAdapter,this.structure=this.fieldAdapter.createStructure(this,e),this.validationState=this.fieldAdapter.createValidationState(this,e),this.nodeState=this.fieldAdapter.createNodeState(this,e),this.metadataState=new qhe(this),this.submitState=new nge(this),this.controlValue=this.controlValueSignal(),this.metadataState.runMetadataCreateLifecycle()}focusBoundControl(e){this.getBindingForFocus()?.focus(e)}getBindingForFocus(){return this.formFieldBindings().filter(e=>e.focus!==void 0).reduce(k9,void 0)||this.structure.children().map(e=>e.getBindingForFocus()).reduce(k9,void 0)}pendingSync=Q({source:()=>this.value(),computation:(e,t)=>{t?.value?.abort()}});get fieldTree(){return this.fieldProxy}get logicNode(){return this.structure.logic}get value(){return this.structure.value}get keyInParent(){return this.structure.keyInParent}get errors(){return this.validationState.errors}get parseErrors(){return this.validationState.parseErrors}get errorSummary(){return this.validationState.errorSummary}get pending(){return this.validationState.pending}get valid(){return this.validationState.valid}get invalid(){return this.validationState.invalid}get dirty(){return this.nodeState.dirty}get touched(){return this.nodeState.touched}get disabled(){return this.nodeState.disabled}get disabledReasons(){return this.nodeState.disabledReasons}get hidden(){return this.nodeState.hidden}get readonly(){return this.nodeState.readonly}get formFieldBindings(){return this.nodeState.formFieldBindings}get submitting(){return this.submitState.submitting}get name(){return this.nodeState.name}get max(){let e=this.metadata(Rhe)?.();return e?this.metadata(e):void 0}get maxLength(){return this.metadata(Bhe)}get min(){let e=this.metadata(Lhe)?.();return e?this.metadata(e):void 0}get minLength(){return this.metadata(zhe)}get pattern(){return this.metadata(Vhe)??rge}get required(){return this.metadata(y9)??ige}metadata(e){return this.metadataState.get(e)}getError(e){return this.errors().find(t=>t.kind===e)}hasMetadata(e){return this.metadataState.has(e)}markAsTouched(e){this.structure.isOrphaned()||Z(()=>{this.markAsTouchedInternal(e),this.flushSync()})}markAsTouchedInternal(e){if(!this.structure.isOrphaned()&&!this.validationState.shouldSkipValidation()&&(this.nodeState.markAsTouched(),!e?.skipDescendants))for(let e of this.structure.children())e.markAsTouchedInternal()}markAsDirty(){this.nodeState.markAsDirty()}markAsPristine(){this.nodeState.markAsPristine()}markAsUntouched(){this.nodeState.markAsUntouched()}reset(e){Z(()=>this._reset(e))}_reset(e){this.pendingSync()?.abort(),e!==void 0&&this.value.set(e),this.controlValue.rawSet(this.value()),this.nodeState.markAsUntouched(),this.nodeState.markAsPristine();for(let e of this.formFieldBindings())e.reset();for(let e of this.structure.materializedChildren())e._reset()}reloadValidation(){Z(()=>this._reloadValidation())}_reloadValidation(){let e=this.logicNode.logic.getMetadataKeys();for(let t of e)t[g9]&&this.metadata(t).reload?.();for(let e of this.structure.children())e._reloadValidation()}controlValueSignal(){let e=Q(this.value);e.rawSet=e.set,e.set=t=>{e.rawSet(t),this.markAsDirty(),this.debounceSync()};let t=e.update;return e.update=e=>{t(e),this.markAsDirty(),this.debounceSync()},e}sync(){this.value.set(this.controlValue())}flushSync(){let e=this.pendingSync();e&&!e.signal.aborted&&(e.abort(),this.sync())}async debounceSync(){let e=Z(()=>(this.pendingSync()?.abort(),this.nodeState.debouncer()));if(e){let t=new AbortController,n=e(t.signal);if(n&&(this.pendingSync.set(t),await n,t.signal.aborted))return}this.structure.isOrphaned()||this.sync()}static newRoot(e,t,n,r){return r.newRoot(e,t,n,r)}createStructure(e){return e.kind===`root`?new Zhe(this,e.logic,e.fieldManager,e.value,this.newChild.bind(this)):new Qhe(this,e.logic,e.parent,e.identityInParent,e.initialKeyInParent,this.newChild.bind(this))}newChild(e,t,n){let r,i;return n?(r=this.pathNode.getChild(Y7),i=this.structure.logic.getChild(Y7)):(r=this.pathNode.getChild(e),i=this.structure.logic.getChild(e)),this.fieldAdapter.newChild({kind:`child`,parent:this,pathNode:r,logic:i,initialKeyInParent:e,identityInParent:t,fieldAdapter:this.fieldAdapter})}},rge=X(()=>[]),ige=X(()=>!1);function k9(e,t){return e?t&&e.element.compareDocumentPosition(t.element)&Node.DOCUMENT_POSITION_PRECEDING?t:e:t}var age=class{node;selfTouched=E(!1);selfDirty=E(!1);markAsTouched(){this.selfTouched.set(!0)}markAsDirty(){this.selfDirty.set(!0)}markAsPristine(){this.selfDirty.set(!1)}markAsUntouched(){this.selfTouched.set(!1)}formFieldBindings=E([]);constructor(e){this.node=e}dirty=X(()=>{let e=this.selfDirty()&&!this.isNonInteractive();return this.node.structure.reduceChildren(e,(e,t)=>t||e.nodeState.dirty(),K7)});touched=X(()=>{let e=this.selfTouched()&&!this.isNonInteractive();return this.node.structure.reduceChildren(e,(e,t)=>t||e.nodeState.touched(),K7)});disabledReasons=X(()=>[...this.node.structure.parent?.nodeState.disabledReasons()??[],...this.node.logicNode.logic.disabledReasons.compute(this.node.context)],{equal:b9});disabled=X(()=>!!this.disabledReasons().length);readonly=X(()=>(this.node.structure.parent?.nodeState.readonly()||this.node.logicNode.logic.readonly.compute(this.node.context))??!1);hidden=X(()=>(this.node.structure.parent?.nodeState.hidden()||this.node.logicNode.logic.hidden.compute(this.node.context))??!1);name=X(()=>{let e=this.node.structure.parent;return e?`${e.name()}.${this.node.structure.keyInParent()}`:this.node.structure.fieldManager.rootName});debouncer=X(()=>{if(this.node.logicNode.logic.hasMetadata(C9)){let e=this.node.logicNode.logic.getMetadata(C9).compute(this.node.context);if(e)return t=>e(this.node.context,t)}return this.node.structure.parent?.nodeState.debouncer?.()});isNonInteractive=X(()=>this.hidden()||this.disabled()||this.readonly())},oge=class{newRoot(e,t,n,r){return new O9({kind:`root`,fieldManager:e,value:t,pathNode:n,logic:n.builder.build(),fieldAdapter:r})}newChild(e){return new O9(e)}createNodeState(e){return new age(e)}createValidationState(e){return new Uhe(e)}createStructure(e,t){return e.createStructure(t)}},sge=class{injector;rootName;submitOptions;constructor(e,t,n){this.injector=e,this.rootName=t??`${this.injector.get(Ks)}.form${cge++}`,this.submitOptions=n}structures=new Set;createFieldManagementEffect(e){ac(()=>{let t=new Set;this.markStructuresLive(e,t);for(let e of this.structures)t.has(e)||(this.structures.delete(e),Z(()=>e.destroy()))},{injector:this.injector})}markStructuresLive(e,t){t.add(e);for(let n of e.children())this.markStructuresLive(n.structure,t)}},cge=0,lge=new Ti(``);function uge(e){let t,n,r;return e.length===3?[t,n,r]=e:e.length===2?Phe(e[1])?[t,n]=e:[t,r]=e:[t]=e,[t,n,r]}function dge(...e){let[t,n,r]=uge(e),i=r?.injector??S(gs),a=Za(i,()=>f9.rootCompile(n)),o=new sge(i,r?.name,r?.submission),s=r?.adapter??new oge,c=O9.newRoot(o,t,a,s);o.createFieldManagementEffect(c.structure);let{experimentalWebMcpTool:l}=r??{};if(l){let e=Za(i,()=>S(lge,{optional:!0}));e&&Za(i,()=>e(c.fieldTree,{name:l.name,description:l.description}))}return c.fieldTree}async function fge(e,t){let n=Z(e);if(Z(n.submitState.submitting))return!1;let r=t===void 0?n.structure.root.fieldProxy:e,i={root:n.structure.root.fieldProxy,submitted:e};t=typeof t==`function`?{action:t}:t??n.structure.fieldManager.submitOptions;let a=t?.action;if(!a)throw new ui(1915,!1);n.markAsTouched();let o=t?.onInvalid,s=pge(n,t?.ignoreValidators);try{if(s){n.submitState.selfSubmitting.set(!0);let e=await Z(()=>a?.(r,i));return e&&mge(n,e),!e||q7(e)&&e.length===0}return Z(()=>o?.(r,i)),!1}finally{n.submitState.selfSubmitting.set(!1)}}function pge(e,t){switch(t){case`all`:return!0;case`none`:return Z(e.valid);default:return!Z(e.invalid)}}function mge(e,t){q7(t)||(t=[t]);let n=new Map;for(let r of t){let t=x9(r,e.fieldTree),i=t.fieldTree(),a=n.get(i);a||(a=[],n.set(i,a)),a.push(t)}for(let[e,t]of n)e.submitState.submissionErrors.set(t)}var A9=class{kind=`compat`;control;fieldTree;context;message;constructor({context:e,kind:t,control:n}){this.context=e,this.kind=t,this.control=n}};function hge(e){if(e.length===0)return null;let t={};for(let n of e)t[n.kind]=n instanceof A9?n.context:n;return t}function gge(e,t){return e===null?[]:Object.entries(e).map(([e,n])=>new A9({context:n,kind:e,control:t}))}var _ge=new Ti(``);function j9(e,t){return e instanceof Function?e(t):e}function vge(e){return typeof e==`number`?isNaN(e):e===``||e===!1||e==null}function M9(e){return e===void 0?[]:Array.isArray(e)?e:[e]}function yge(e,t){p9(e),l9.unwrapFieldPath(e).builder.addSyncErrorRule(e=>x9(t(e),e.fieldTree))}function bge(e){return new xge(e)}var N9=class{__brand=void 0;kind=``;fieldTree;message;constructor(e){e&&Object.assign(this,e)}},xge=class extends N9{kind=`required`},P9=class extends N9{kind=`parse`};function Sge(e,t){let n=m9(e,_9(),e=>!t?.when||t.when(e));m9(e,y9,({state:e})=>e.metadata(n)()),yge(e,e=>{if(e.state.metadata(n)()&&vge(e.value()))return t?.error?j9(t.error,e):bge({message:j9(t?.message,e)})})}function Cge(e,t,n){let r=Q({source:e,computation:()=>[],equal:b9});return{errors:r.asReadonly(),setRawValue:e=>{let i=n(e);r.set(M9(i.error)),i.value!==void 0&&t(i.value),r.set(M9(i.error))},reset:()=>{r.set([])}}}var wge=class{field;constructor(e){this.field=e}control=this;get value(){return this.field().controlValue()}get valid(){return this.field().valid()}get invalid(){return this.field().invalid()}get pending(){return this.field().pending()}get disabled(){return this.field().disabled()}get enabled(){return!this.field().disabled()}get errors(){return hge(this.field().errors())}get pristine(){return!this.field().dirty()}get dirty(){return this.field().dirty()}get touched(){return this.field().touched()}get untouched(){return!this.field().touched()}get status(){if(this.field().disabled())return`DISABLED`;if(this.field().valid())return`VALID`;if(this.field().invalid())return`INVALID`;if(this.field().pending())return`PENDING`;throw new ui(1910,!1)}valueAccessor=null;hasValidator(e){return e===m7.required&&this.field().required()}updateValueAndValidity(){}},F9={disabled:`disabled`,disabledReasons:`disabledReasons`,dirty:`dirty`,errors:`errors`,hidden:`hidden`,invalid:`invalid`,max:`max`,maxLength:`maxLength`,min:`min`,minLength:`minLength`,name:`name`,pattern:`pattern`,pending:`pending`,readonly:`readonly`,required:`required`,touched:`touched`},Tge=(()=>{let e={};for(let t of Object.keys(F9))e[F9[t]]=t;return e})();function I9(e,t){return e[Tge[t]]?.()}var L9=Object.values(F9);function R9(){return{}}function z9(e,t,n){return e[t]!==n&&(e[t]=n,!0)}function Ege(e,t,n){let r;if(H9(e)&&n.isBadInput(e))return{error:new P9};switch(e.type){case`checkbox`:return{value:e.checked};case`number`:case`range`:case`datetime-local`:if(r=Z(t),typeof r==`number`||r===null)return{value:e.value===``?null:e.valueAsNumber};break;case`date`:case`month`:case`time`:case`week`:if(r=Z(t),r===null||r instanceof Date)return{value:e.valueAsDate};if(typeof r==`number`)return{value:e.valueAsNumber}}if(e.tagName===`INPUT`&&e.type===`text`&&(r??=Z(t),typeof r==`number`||r===null)){if(e.value===``)return{value:null};let t=Number(e.value);return Number.isNaN(t)?{error:new P9}:{value:t}}return{value:e.value}}function B9(e,t){switch(e.type){case`checkbox`:e.checked=t;return;case`radio`:e.checked=t===e.value;return;case`number`:case`range`:case`datetime-local`:if(typeof t==`number`){V9(e,t);return}if(t===null){e.value=``;return}break;case`date`:case`month`:case`time`:case`week`:if(t===null||t instanceof Date){e.valueAsDate=t;return}if(typeof t==`number`){V9(e,t);return}}if(e.tagName===`INPUT`&&e.type===`text`){if(typeof t==`number`){e.value=isNaN(t)?``:String(t);return}if(t===null){e.value=``;return}}e.value=t}function V9(e,t){isNaN(t)?e.value=``:e.valueAsNumber=t}function H9(e){return e.tagName===`INPUT`}function Dge(e){return e.type===`date`||e.type===`datetime-local`||e.type===`month`||e.type===`time`||e.type===`week`}function Oge(e,t){let n=e.getUTCFullYear(),r=String(e.getUTCMonth()+1).padStart(2,`0`);return t===`month`?`${n}-${r}`:`${n}-${r}-${String(e.getUTCDate()).padStart(2,`0`)}`}function U9(e,t,n){return t instanceof Date&&(e===`min`||e===`max`)&&(n===`date`||n===`month`)?Oge(t,n):t}function kge(e,t){e.listenToCustomControlModel(e=>t.state().controlValue.set(e)),e.listenToCustomControlOutput(`touch`,()=>t.state().markAsTouched()),t.registerAsBinding(e.customControl);let n=R9();return()=>{let r=t.state(),i=r.controlValue();z9(n,`controlValue`,i)&&e.setCustomControlModelInput(i);for(let i of L9){let a;if(a=i===`errors`?t.errors():I9(r,i),z9(n,i,a)&&(e.setInputOnDirectives(i,a),t.elementAcceptsNativeProperty(i)&&!e.customControlHasInput(i))){let e=U9(i,a,t.nativeFormElement.type);V7(t.renderer,t.nativeFormElement,i,e)}}}}function Age(e){return typeof e==`object`&&!!e}function jge(e,t){let n=R9();t.controlValueAccessor.registerOnChange(e=>{n.controlValue=e,t.state().controlValue.set(e)}),t.controlValueAccessor.registerOnTouched(()=>t.state().markAsTouched());let r=t.injector.get(p7,null,{optional:!0,self:!0});if(r){let e;for(let t of r)Age(t)&&t.registerOnValidatorChange&&(e??=E(0),t.registerOnValidatorChange(()=>{e.update(e=>e+1)}));let n=r.map(e=>typeof e==`function`?e:e.validate.bind(e)),i=m7.compose(n),a=X(()=>(e?.(),gge(i?i(t.interopNgControl.control):null,t.interopNgControl.control)));t.parseErrorsSource.set(a)}return t.registerAsBinding({reset:()=>{let e=t.state().value();n.controlValue=e,Z(()=>t.controlValueAccessor.writeValue(e))}}),()=>{let r=t.state(),i=r.controlValue();z9(n,`controlValue`,i)&&Z(()=>t.controlValueAccessor.writeValue(i));for(let i of L9){let a=I9(r,i);if(z9(n,i,a)){let n=e.setInputOnDirectives(i,a,i===`name`?Mge:void 0);i===`disabled`&&t.controlValueAccessor.setDisabledState?Z(()=>t.controlValueAccessor.setDisabledState(a)):!n&&t.elementAcceptsNativeProperty(i)&&V7(t.renderer,t.nativeFormElement,i,a)}}}}function Mge(e){return e==null}function Nge(e,t,n){if(typeof MutationObserver!=`function`)return;let r=new MutationObserver(e=>{e.some(e=>Pge(e))&&t()});r.observe(e,{attributes:!0,attributeFilter:[`value`],characterData:!0,childList:!0,subtree:!0}),n.onDestroy(()=>r.disconnect())}function Pge(e){if(e.type===`childList`||e.type===`characterData`){if(e.target instanceof Comment)return!1;for(let t of e.addedNodes)if(!(t instanceof Comment))return!0;for(let t of e.removedNodes)if(!(t instanceof Comment))return!0;return!1}return e.type===`attributes`&&e.target instanceof HTMLOptionElement}function Fge(e,t,n,r){let i=!1,a=t.nativeFormElement,o=Cge(()=>t.state().value(),e=>t.state().controlValue.set(e),e=>Ege(a,t.state().value,r));n.set(o.errors),t.onReset=()=>{o.reset();let e=t.state().value();s.controlValue=e,B9(a,e)},e.listenToDom(`input`,()=>o.setRawValue(void 0)),e.listenToDom(`blur`,()=>t.state().markAsTouched()),H9(a)&&Dge(a)&&r.watchValidity(t.destroyRef,a,()=>o.setRawValue(void 0)),t.registerAsBinding(),a.tagName===`SELECT`&&Nge(a,()=>{i&&(a.value=t.state().controlValue())},t.destroyRef);let s=R9();return()=>{let n=t.state();for(let r of L9){let i=I9(n,r);if(z9(s,r,i)&&(e.setInputOnDirectives(r,i),t.elementAcceptsNativeProperty(r))){let e=U9(r,i,a.type);V7(t.renderer,a,r,e)}}let r=n.controlValue(),o=z9(s,`controlValue`,r),c=a.type===`radio`&&z9(s,`radioValue`,a.value);(o||c)&&B9(a,r),i=!0}}var W9=(()=>{class e{static ɵfac=function(t){return new(t||e)};static ɵprov=vi({token:e,factory:e=>Ige.ɵfac(e),providedIn:`root`})}return e})(),Ige=(()=>{class e extends W9{document=S(_s);cspNonce=S(Xs,{optional:!0});injectedStyles=new WeakMap;watchValidity(e,t,n){let r=t.getRootNode();this.injectedStyles.has(r)||this.injectedStyles.set(r,this.createTransitionStyle(r));let i=e=>{let t=e;(t.animationName===`ng-valid`||t.animationName===`ng-invalid`)&&n()};t.addEventListener(`animationstart`,i),e.onDestroy(()=>{t.removeEventListener(`animationstart`,i)})}isBadInput(e){return e.validity?.badInput??!1}createTransitionStyle(e){let t=this.document.createElement(`style`);return this.cspNonce&&(t.nonce=this.cspNonce),t.textContent=` @keyframes ng-valid {} @keyframes ng-invalid {} input:valid, textarea:valid { @@ -26002,7 +26029,7 @@ dd[_ngcontent-%COMP%] { input:invalid, textarea:invalid { animation: ng-invalid 0.001s; } - `,e.nodeType===9?e.head?.appendChild(t):e.appendChild(t),t}ngOnDestroy(){this.injectedStyles.get(this.document)?.remove()}static ɵfac=(()=>{let t;return function(n){return(t||=Sl(e))(n||e)}})();static ɵprov=vi({token:e,factory:e.ɵfac})}return e})(),Age=Symbol(),G9=new Ti(``),jge=(()=>{class e{field=$.required({alias:`formField`});state=X(()=>this.field()());renderer=S(np);destroyRef=S(vs);injector=S(gs);element=S(kl).nativeElement;elementIsNativeFormElement=B7(this.element);elementAcceptsTextualValues=fhe(this.element);_elementAcceptsMinMax;nativeFormElement=this.elementIsNativeFormElement?this.element:void 0;focuser=e=>this.element.focus(e);controlValueAccessors=S(l7,{optional:!0,self:!0});config=S(uge,{optional:!0});validityMonitor=S(W9);parseErrorsSource=E(void 0);_interopNgControl;get interopNgControl(){return this._interopNgControl??=new _ge(this.state)}parseErrors=X(()=>this.parseErrorsSource()?.().map(e=>({...e,fieldTree:Z(this.state).fieldTree,formField:this}))??[],{equal:b9});errors=X(()=>this.state().errors().filter(e=>!e.formField||e.formField===this),{equal:b9});isFieldBinding=!1;resetter=()=>{};parseErrorsResetCallback;setParseErrors(e){this.parseErrorsSource.set(e)}set onReset(e){this.parseErrorsResetCallback=e}get onReset(){return this.parseErrorsResetCallback}get controlValueAccessor(){return!this.controlValueAccessors||this.controlValueAccessors.length===0?this.interopNgControl?.valueAccessor??void 0:U7(this.interopNgControl,this.controlValueAccessors)??void 0}installClassBindingEffect(){let e=Object.entries(this.config?.classes??{}).map(([e,t])=>[e,X(()=>t(this))]);if(e.length===0)return;let t=R9();fv({write:()=>{for(let[n,r]of e){let e=r();z9(t,n,e)&&(e?this.renderer.addClass(this.element,n):this.renderer.removeClass(this.element,n))}}},{injector:this.injector})}focus(e){this.focuser(e)}reset(){this.resetter(),this.parseErrorsResetCallback?.(this.state().value())}registerAsBinding(e){if(this.isFieldBinding)throw new ui(1913,!1);this.isFieldBinding=!0,this.installClassBindingEffect(),e?.focus&&(this.focuser=t=>e.focus(t)),e?.reset&&(this.resetter=()=>e.reset()),ac(e=>{let t=this.state();t.nodeState.formFieldBindings.update(e=>[...e,this]),e(()=>{t.nodeState.formFieldBindings.update(e=>e.filter(e=>e!==this))})},{injector:this.injector})}[Age];ɵngControlCreate(e){if(!e.hasPassThrough){if(this.controlValueAccessor)this.ɵngControlUpdate=wge(e,this);else if(e.customControl)this.ɵngControlUpdate=Sge(e,this);else if(this.elementIsNativeFormElement)this.ɵngControlUpdate=Oge(e,this,this.parseErrorsSource,this.validityMonitor);else throw new ui(1914,!1)}}ɵngControlUpdate;elementAcceptsNativeProperty(e){if(!this.elementIsNativeFormElement)return!1;switch(e){case`min`:case`max`:return this._elementAcceptsMinMax??=dhe(this.element);case`minLength`:case`maxLength`:return this.elementAcceptsTextualValues;case`disabled`:case`required`:case`readonly`:case`name`:return!0;default:return!1}}static ɵfac=function(t){return new(t||e)};static ɵdir=oh({type:e,selectors:[[``,`formField`,``]],inputs:{field:[1,`formField`,`field`]},exportAs:[`formField`],features:[P_([{provide:G9,useExisting:e},{provide:vhe,useFactory:()=>S(e).interopNgControl},{provide:ghe,useFactory:()=>S(G9,{self:!0})}]),mh(`formField`)]})}return e})(),Mge=(()=>{class e{fieldTree=$.required({alias:`formRoot`});onSubmit(e){e.preventDefault(),Z(()=>{let e=this.fieldTree();e().structure.fieldManager.submitOptions&&age(e)})}static ɵfac=function(t){return new(t||e)};static ɵdir=oh({type:e,selectors:[[`form`,`formRoot`,``]],hostAttrs:[`novalidate`,``],hostBindings:function(e,t){e&1&&H(`submit`,function(e){return t.onSubmit(e)})},inputs:{fieldTree:[1,`formRoot`,`fieldTree`]}})}return e})(),Nge=[`codeInput`],Pge=`https://pangular-inspector.dev/security/#one-time-code`,Fge=class e{client=$.required();docsUrl=Pge;busy=E(!1);error=E(``);notice=E(``);model=E({code:``});codeForm=ige(this.model,e=>hge(e.code),{submission:{action:async()=>{await this.send()},onInvalid:()=>this.fail(`Enter the code from the terminal.`)}});codeInput=av(`codeInput`);constructor(){ac(()=>{let e=this.client();Z(()=>void e.requestAuthCode().catch(()=>{}))}),ed(()=>this.codeInput()?.nativeElement.focus())}async send(){let e=this.model().code.replace(/\s+/g,``);if(!/^\d{6}$/.test(e)){this.fail(`Enter the 6-digit code from the terminal.`);return}this.busy.set(!0),this.notice.set(``);try{await this.client().requestTrustWithCode(e)?this.error.set(``):this.fail(`That code didn't match. Check the terminal and try again.`)}catch{this.fail(`Can't reach the devtools server. Check that the dev server is running.`)}finally{this.busy.set(!1)}}async newCode(){this.busy.set(!0);try{await this.client().requestAuthCode({reissue:!0}),this.error.set(``),this.model.set({code:``}),this.notice.set(`A new code was printed in the terminal.`)}catch{this.notice.set(`Couldn't ask for a new code. Try again.`)}finally{this.busy.set(!1),this.codeInput()?.nativeElement.focus()}}fail(e){this.error.update(t=>t===e?`${e} `:e),this.codeInput()?.nativeElement.focus()}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-auth-code`]],viewQuery:function(e,t){e&1&&Dg(t.codeInput,Nge,5),e&2&&Og()},inputs:{client:[1,`client`]},decls:24,vars:10,consts:[[`codeInput`,``],[`aria-labelledby`,`auth-code-title`,1,`pairing`],[`id`,`auth-code-title`],[3,`formRoot`],[`for`,`auth-code-input`],[1,`row`],[`id`,`auth-code-input`,`autocomplete`,`one-time-code`,`inputmode`,`numeric`,`spellcheck`,`false`,3,`formField`],[`type`,`submit`,1,`primary`,3,`disabled`],[`id`,`auth-code-error`,`role`,`alert`,1,`error`],[1,`more`],[`type`,`button`,3,`click`,`disabled`],[`role`,`status`,1,`notice`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`sr-only`]],template:function(e,t){e&1&&(F(0,`section`,1)(1,`h2`,2),K(2,`Enter the one-time code`),I(),F(3,`p`),K(4,` The devtools server asks for a one-time code before it shares data from your app. Find the 6-digit code in the terminal that runs the dev server. `),I(),F(5,`form`,3)(6,`label`,4),K(7,`One-time code`),I(),F(8,`div`,5),L(9,`input`,6,0),Sp(),F(11,`button`,7),K(12),I()()(),F(13,`p`,8),K(14),I(),F(15,`div`,9)(16,`button`,10),H(`click`,function(){return t.newCode()}),K(17,`Print a new code`),I(),F(18,`p`,11),K(19),I()(),F(20,`a`,12),K(21,`About the one-time code`),F(22,`span`,13),K(23,` (opens in a new tab)`),I()()()),e&2&&(D(5),P(`formRoot`,t.codeForm),D(4),P(`formField`,t.codeForm.code),k(`aria-invalid`,t.error()?!0:null)(`aria-describedby`,t.error()?`auth-code-error`:null),wp(),D(2),P(`disabled`,t.busy()),D(),J(` `,t.busy()?`Checking…`:`Connect`,` `),D(2),q(t.error()),D(2),P(`disabled`,t.busy()),D(3),q(t.notice()),D(),P(`href`,t.docsUrl,yu))},dependencies:[jge,Mge],styles:[`[_nghost-%COMP%] { + `,e.nodeType===9?e.head?.appendChild(t):e.appendChild(t),t}ngOnDestroy(){this.injectedStyles.get(this.document)?.remove()}static ɵfac=(()=>{let t;return function(n){return(t||=Sl(e))(n||e)}})();static ɵprov=vi({token:e,factory:e.ɵfac})}return e})(),Lge=Symbol(),G9=new Ti(``),Rge=(()=>{class e{field=$.required({alias:`formField`});state=X(()=>this.field()());renderer=S(rp);destroyRef=S(vs);injector=S(gs);element=S(kl).nativeElement;elementIsNativeFormElement=B7(this.element);elementAcceptsTextualValues=yhe(this.element);_elementAcceptsMinMax;nativeFormElement=this.elementIsNativeFormElement?this.element:void 0;focuser=e=>this.element.focus(e);controlValueAccessors=S(l7,{optional:!0,self:!0});config=S(_ge,{optional:!0});validityMonitor=S(W9);parseErrorsSource=E(void 0);_interopNgControl;get interopNgControl(){return this._interopNgControl??=new wge(this.state)}parseErrors=X(()=>this.parseErrorsSource()?.().map(e=>({...e,fieldTree:Z(this.state).fieldTree,formField:this}))??[],{equal:b9});errors=X(()=>this.state().errors().filter(e=>!e.formField||e.formField===this),{equal:b9});isFieldBinding=!1;resetter=()=>{};parseErrorsResetCallback;setParseErrors(e){this.parseErrorsSource.set(e)}set onReset(e){this.parseErrorsResetCallback=e}get onReset(){return this.parseErrorsResetCallback}get controlValueAccessor(){return!this.controlValueAccessors||this.controlValueAccessors.length===0?this.interopNgControl?.valueAccessor??void 0:U7(this.interopNgControl,this.controlValueAccessors)??void 0}installClassBindingEffect(){let e=Object.entries(this.config?.classes??{}).map(([e,t])=>[e,X(()=>t(this))]);if(e.length===0)return;let t=R9();mv({write:()=>{for(let[n,r]of e){let e=r();z9(t,n,e)&&(e?this.renderer.addClass(this.element,n):this.renderer.removeClass(this.element,n))}}},{injector:this.injector})}focus(e){this.focuser(e)}reset(){this.resetter(),this.parseErrorsResetCallback?.(this.state().value())}registerAsBinding(e){if(this.isFieldBinding)throw new ui(1913,!1);this.isFieldBinding=!0,this.installClassBindingEffect(),e?.focus&&(this.focuser=t=>e.focus(t)),e?.reset&&(this.resetter=()=>e.reset()),ac(e=>{let t=this.state();t.nodeState.formFieldBindings.update(e=>[...e,this]),e(()=>{t.nodeState.formFieldBindings.update(e=>e.filter(e=>e!==this))})},{injector:this.injector})}[Lge];ɵngControlCreate(e){if(!e.hasPassThrough){if(this.controlValueAccessor)this.ɵngControlUpdate=jge(e,this);else if(e.customControl)this.ɵngControlUpdate=kge(e,this);else if(this.elementIsNativeFormElement)this.ɵngControlUpdate=Fge(e,this,this.parseErrorsSource,this.validityMonitor);else throw new ui(1914,!1)}}ɵngControlUpdate;elementAcceptsNativeProperty(e){if(!this.elementIsNativeFormElement)return!1;switch(e){case`min`:case`max`:return this._elementAcceptsMinMax??=vhe(this.element);case`minLength`:case`maxLength`:return this.elementAcceptsTextualValues;case`disabled`:case`required`:case`readonly`:case`name`:return!0;default:return!1}}static ɵfac=function(t){return new(t||e)};static ɵdir=sh({type:e,selectors:[[``,`formField`,``]],inputs:{field:[1,`formField`,`field`]},exportAs:[`formField`],features:[I_([{provide:G9,useExisting:e},{provide:The,useFactory:()=>S(e).interopNgControl},{provide:Che,useFactory:()=>S(G9,{self:!0})}]),hh(`formField`)]})}return e})(),zge=(()=>{class e{fieldTree=$.required({alias:`formRoot`});onSubmit(e){e.preventDefault(),Z(()=>{let e=this.fieldTree();e().structure.fieldManager.submitOptions&&fge(e)})}static ɵfac=function(t){return new(t||e)};static ɵdir=sh({type:e,selectors:[[`form`,`formRoot`,``]],hostAttrs:[`novalidate`,``],hostBindings:function(e,t){e&1&&H(`submit`,function(e){return t.onSubmit(e)})},inputs:{fieldTree:[1,`formRoot`,`fieldTree`]}})}return e})(),Bge=[`codeInput`],Vge=`https://pangular-inspector.dev/security/#one-time-code`,Hge=class e{client=$.required();docsUrl=Vge;busy=E(!1);error=E(``);notice=E(``);model=E({code:``});codeForm=dge(this.model,e=>Sge(e.code),{submission:{action:async()=>{await this.send()},onInvalid:()=>this.fail(`Enter the code from the terminal.`)}});codeInput=sv(`codeInput`);constructor(){ac(()=>{let e=this.client();Z(()=>void e.requestAuthCode().catch(()=>{}))}),td(()=>this.codeInput()?.nativeElement.focus())}async send(){let e=this.model().code.replace(/\s+/g,``);if(!/^\d{6}$/.test(e)){this.fail(`Enter the 6-digit code from the terminal.`);return}this.busy.set(!0),this.notice.set(``);try{await this.client().requestTrustWithCode(e)?this.error.set(``):this.fail(`That code didn't match. Check the terminal and try again.`)}catch{this.fail(`Can't reach the devtools server. Check that the dev server is running.`)}finally{this.busy.set(!1)}}async newCode(){this.busy.set(!0);try{await this.client().requestAuthCode({reissue:!0}),this.error.set(``),this.model.set({code:``}),this.notice.set(`A new code was printed in the terminal.`)}catch{this.notice.set(`Couldn't ask for a new code. Try again.`)}finally{this.busy.set(!1),this.codeInput()?.nativeElement.focus()}}fail(e){this.error.update(t=>t===e?`${e} `:e),this.codeInput()?.nativeElement.focus()}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-auth-code`]],viewQuery:function(e,t){e&1&&Og(t.codeInput,Bge,5),e&2&&kg()},inputs:{client:[1,`client`]},decls:24,vars:10,consts:[[`codeInput`,``],[`aria-labelledby`,`auth-code-title`,1,`pairing`],[`id`,`auth-code-title`],[3,`formRoot`],[`for`,`auth-code-input`],[1,`row`],[`id`,`auth-code-input`,`autocomplete`,`one-time-code`,`inputmode`,`numeric`,`spellcheck`,`false`,3,`formField`],[`type`,`submit`,1,`primary`,3,`disabled`],[`id`,`auth-code-error`,`role`,`alert`,1,`error`],[1,`more`],[`type`,`button`,3,`click`,`disabled`],[`role`,`status`,1,`notice`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`sr-only`]],template:function(e,t){e&1&&(F(0,`section`,1)(1,`h2`,2),K(2,`Enter the one-time code`),I(),F(3,`p`),K(4,` The devtools server asks for a one-time code before it shares data from your app. Find the 6-digit code in the terminal that runs the dev server. `),I(),F(5,`form`,3)(6,`label`,4),K(7,`One-time code`),I(),F(8,`div`,5),L(9,`input`,6,0),Cp(),F(11,`button`,7),K(12),I()()(),F(13,`p`,8),K(14),I(),F(15,`div`,9)(16,`button`,10),H(`click`,function(){return t.newCode()}),K(17,`Print a new code`),I(),F(18,`p`,11),K(19),I()(),F(20,`a`,12),K(21,`About the one-time code`),F(22,`span`,13),K(23,` (opens in a new tab)`),I()()()),e&2&&(D(5),P(`formRoot`,t.codeForm),D(4),P(`formField`,t.codeForm.code),k(`aria-invalid`,t.error()?!0:null)(`aria-describedby`,t.error()?`auth-code-error`:null),Tp(),D(2),P(`disabled`,t.busy()),D(),J(` `,t.busy()?`Checking…`:`Connect`,` `),D(2),q(t.error()),D(2),P(`disabled`,t.busy()),D(3),q(t.notice()),D(),P(`href`,t.docsUrl,bu))},dependencies:[Rge,zge],styles:[`[_nghost-%COMP%] { display: block; } @@ -26128,7 +26155,7 @@ a[_ngcontent-%COMP%] { a[_ngcontent-%COMP%]:focus-visible { outline: 2px solid var(--%NS%accent); outline-offset: 2px; -}`]})},Ige={dark:{ngrx:{accent:`#d770e8`,text:`#f0abfc`},analog:{accent:`#ff5470`,text:`#fda4af`},"angular-native":{accent:`#ff4d6d`,text:`#fda4af`},nativescript:{accent:`#8196ff`,text:`#a5b4fc`},capacitor:{accent:`#53b9ff`,text:`#7dd3fc`}},light:{ngrx:{accent:`#a21caf`,text:`#701a75`},analog:{accent:`#be123c`,text:`#881337`},"angular-native":{accent:`#be123c`,text:`#881337`},nativescript:{accent:`#3448c5`,text:`#3730a3`},capacitor:{accent:`#0369a1`,text:`#0c4a6e`}}};function Lge(e,t){let n=Ige[t];return e&&n[e]||null}var Rge=[`toggle`];function zge(e,t){e&1&&K(0,` Waiting for the devtools server. `)}function Bge(e,t){e&1&&K(0,` Loading the current setting. `)}function Vge(e,t){e&1&&K(0,` This is a saved report, so there is no page to change. The switch works with a running dev server. `)}function Hge(e,t){e&1&&(K(0,` This devtools server can't change it from the panel. Set `),R(1,`code`),K(2),z(),K(3,` in the devtools config. `)),e&2&&(D(2),Y(`agent: `,`{`,` browserTools: true `,`}`))}function Uge(e,t){e&1&&A(0,Vge,1,0)(1,Hge,4,2),e&2&&j(+!W().staticReport())}function Wge(e,t){e&1&&K(0,` The devtools server didn't answer. `)}function Gge(e,t){if(e&1&&(K(0,` Applies right away to every page connected to this dev server, with no reload. It lasts until the server restarts, then `),R(1,`code`),K(2,`agent.browserTools`),z(),K(3)),e&2){let e=W();D(3),J(` in the devtools config decides again (`,e.configLabel(),`). `)}}function Kge(e,t){if(e&1){let e=B();R(0,`div`,8)(1,`span`),K(2),z(),R(3,`button`,10),U(`click`,function(){return C(e),w(W().retry())}),K(4,`Retry`),z()()}e&2&&(D(2),q(t))}function K9(e){if(!e||typeof e!=`object`)return null;let{enabled:t,config:n}=e;return typeof t==`boolean`?{enabled:t,config:n===!0}:null}var qge=class e{rpc=$(null);state=E(null);status=E(`connecting`);saving=E(!1);error=E(``);announcement=E(``);staticReport=X(()=>yT(this.rpc()));enabled=X(()=>this.state()?.enabled??!1);canChange=X(()=>this.status()===`ready`&&!this.staticReport());configLabel=X(()=>this.state()?.config?`on in this project`:`off in this project`);toggle=av(`toggle`);destroyRef=S(vs);unsubscribe=null;attached=null;pending=null;constructor(){ac(()=>{let e=this.rpc();e&&e!==this.attached&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async set(e){let t=this.rpc();if(!t||!this.canChange()||this.saving()){this.syncBox();return}this.saving.set(!0),this.error.set(``);try{let n=K9(await _T(t,`set-browser-tools`,{enabled:e}));if(!n)throw Error(`no answer`);this.pending=null,this.state.set(n),this.say(n.enabled?`Browser agent tools on. Connected pages register them.`:`Browser agent tools off. Connected pages unregister them.`)}catch{this.pending=e,this.error.set(`Couldn't turn the browser agent tools ${e?`on`:`off`}. Check that the dev server is running.`)}finally{this.saving.set(!1),this.syncBox()}}retry(){let e=this.rpc();if(e){if(this.status()===`ready`&&this.pending!==null){this.set(this.pending);return}this.error.set(``),this.load(e)}}async load(e){this.attached=e,this.pending=null,this.status.set(`loading`),this.error.set(``),this.unsubscribe?.(),this.unsubscribe=null;try{let t=await e.scope(`pangular`).rpc.sharedState(`browser-tools`);if(this.destroyRef.destroyed||this.attached!==e)return;let n=t=>{let n=K9(t);this.state.set(n),this.status.set(n&&!yT(e)?`ready`:`unsupported`)};n(t.value()),this.unsubscribe=t.on(`updated`,n)}catch{if(this.attached!==e)return;this.status.set(`failed`),this.error.set(`Couldn't read the browser agent tools setting.`)}}syncBox(){let e=this.toggle()?.nativeElement;e&&(e.checked=this.enabled())}say(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-browser-tools-setting`]],viewQuery:function(e,t){e&1&&Dg(t.toggle,Rge,5),e&2&&Og()},inputs:{rpc:[1,`rpc`]},decls:20,vars:7,consts:[[`toggle`,``],[`id`,`settings-browser-agents`],[`id`,`settings-browser-agents-hint`,1,`hint`],[1,`switch-row`],[`type`,`checkbox`,`role`,`switch`,`aria-describedby`,`settings-browser-agents-hint settings-browser-agents-status`,1,`switch`,3,`change`,`checked`,`disabled`],[1,`switch-label`],[`aria-hidden`,`true`,1,`state`],[`id`,`settings-browser-agents-status`,1,`hint`],[`role`,`alert`,1,`error`],[`role`,`status`,1,`sr-only`],[`type`,`button`,1,`action`,3,`click`]],template:function(e,t){if(e&1&&(R(0,`h2`,1),K(1,`Browser agents`),z(),R(2,`p`,2),K(3,` Registers the read-only agent tools on your app's page, so an agent that drives the browser finds them through WebMCP or Chrome DevTools for agents. Any script on the page can call them, so leave this off if the page loads scripts you don't trust. `),z(),R(4,`label`,3)(5,`input`,4,0),U(`change`,function(e){return t.set(e.target.checked)}),z(),R(7,`span`,5),K(8,`Browser agent tools`),z(),R(9,`span`,6),K(10),z()(),R(11,`p`,7),A(12,zge,1,0)(13,Bge,1,0)(14,Uge,2,1)(15,Wge,1,0)(16,Gge,4,1),z(),A(17,Kge,5,1,`div`,8),R(18,`p`,9),K(19),z()),e&2){let e,n;D(5),V(`checked`,t.enabled())(`disabled`,!t.canChange()),k(`aria-busy`,t.saving()?`true`:null),D(5),q(t.enabled()?`On`:`Off`),D(2),j((e=t.status())===`connecting`?12:e===`loading`?13:e===`unsupported`?14:e===`failed`?15:16),D(5),j((n=t.error())?17:-1,n),D(2),q(t.announcement())}},styles:[`[_nghost-%COMP%] { +}`]})},Uge={dark:{ngrx:{accent:`#d770e8`,text:`#f0abfc`},analog:{accent:`#ff5470`,text:`#fda4af`},"angular-native":{accent:`#ff4d6d`,text:`#fda4af`},nativescript:{accent:`#8196ff`,text:`#a5b4fc`},capacitor:{accent:`#53b9ff`,text:`#7dd3fc`}},light:{ngrx:{accent:`#a21caf`,text:`#701a75`},analog:{accent:`#be123c`,text:`#881337`},"angular-native":{accent:`#be123c`,text:`#881337`},nativescript:{accent:`#3448c5`,text:`#3730a3`},capacitor:{accent:`#0369a1`,text:`#0c4a6e`}}};function Wge(e,t){let n=Uge[t];return e&&n[e]||null}var Gge=[`toggle`];function Kge(e,t){e&1&&K(0,` Waiting for the devtools server. `)}function qge(e,t){e&1&&K(0,` Loading the current setting. `)}function Jge(e,t){e&1&&K(0,` This is a saved report, so there is no page to change. The switch works with a running dev server. `)}function Yge(e,t){e&1&&(K(0,` This devtools server can't change it from the panel. Set `),R(1,`code`),K(2),z(),K(3,` in the devtools config. `)),e&2&&(D(2),Y(`agent: `,`{`,` browserTools: true `,`}`))}function Xge(e,t){e&1&&A(0,Jge,1,0)(1,Yge,4,2),e&2&&j(+!W().staticReport())}function Zge(e,t){e&1&&K(0,` The devtools server didn't answer. `)}function Qge(e,t){if(e&1&&(K(0,` Applies right away to every page connected to this dev server, with no reload. It lasts until the server restarts, then `),R(1,`code`),K(2,`agent.browserTools`),z(),K(3)),e&2){let e=W();D(3),J(` in the devtools config decides again (`,e.configLabel(),`). `)}}function $ge(e,t){if(e&1){let e=B();R(0,`div`,8)(1,`span`),K(2),z(),R(3,`button`,10),U(`click`,function(){return C(e),w(W().retry())}),K(4,`Retry`),z()()}e&2&&(D(2),q(t))}function K9(e){if(!e||typeof e!=`object`)return null;let{enabled:t,config:n}=e;return typeof t==`boolean`?{enabled:t,config:n===!0}:null}var e_e=class e{rpc=$(null);state=E(null);status=E(`connecting`);saving=E(!1);error=E(``);announcement=E(``);staticReport=X(()=>yT(this.rpc()));enabled=X(()=>this.state()?.enabled??!1);canChange=X(()=>this.status()===`ready`&&!this.staticReport());configLabel=X(()=>this.state()?.config?`on in this project`:`off in this project`);toggle=sv(`toggle`);destroyRef=S(vs);unsubscribe=null;attached=null;pending=null;constructor(){ac(()=>{let e=this.rpc();e&&e!==this.attached&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async set(e){let t=this.rpc();if(!t||!this.canChange()||this.saving()){this.syncBox();return}this.saving.set(!0),this.error.set(``);try{let n=K9(await _T(t,`set-browser-tools`,{enabled:e}));if(!n)throw Error(`no answer`);this.pending=null,this.state.set(n),this.say(n.enabled?`Browser agent tools on. Connected pages register them.`:`Browser agent tools off. Connected pages unregister them.`)}catch{this.pending=e,this.error.set(`Couldn't turn the browser agent tools ${e?`on`:`off`}. Check that the dev server is running.`)}finally{this.saving.set(!1),this.syncBox()}}retry(){let e=this.rpc();if(e){if(this.status()===`ready`&&this.pending!==null){this.set(this.pending);return}this.error.set(``),this.load(e)}}async load(e){this.attached=e,this.pending=null,this.status.set(`loading`),this.error.set(``),this.unsubscribe?.(),this.unsubscribe=null;try{let t=await e.scope(`pangular`).rpc.sharedState(`browser-tools`);if(this.destroyRef.destroyed||this.attached!==e)return;let n=t=>{let n=K9(t);this.state.set(n),this.status.set(n&&!yT(e)?`ready`:`unsupported`)};n(t.value()),this.unsubscribe=t.on(`updated`,n)}catch{if(this.attached!==e)return;this.status.set(`failed`),this.error.set(`Couldn't read the browser agent tools setting.`)}}syncBox(){let e=this.toggle()?.nativeElement;e&&(e.checked=this.enabled())}say(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-browser-tools-setting`]],viewQuery:function(e,t){e&1&&Og(t.toggle,Gge,5),e&2&&kg()},inputs:{rpc:[1,`rpc`]},decls:20,vars:7,consts:[[`toggle`,``],[`id`,`settings-browser-agents`],[`id`,`settings-browser-agents-hint`,1,`hint`],[1,`switch-row`],[`type`,`checkbox`,`role`,`switch`,`aria-describedby`,`settings-browser-agents-hint settings-browser-agents-status`,1,`switch`,3,`change`,`checked`,`disabled`],[1,`switch-label`],[`aria-hidden`,`true`,1,`state`],[`id`,`settings-browser-agents-status`,1,`hint`],[`role`,`alert`,1,`error`],[`role`,`status`,1,`sr-only`],[`type`,`button`,1,`action`,3,`click`]],template:function(e,t){if(e&1&&(R(0,`h2`,1),K(1,`Browser agents`),z(),R(2,`p`,2),K(3,` Registers the read-only agent tools on your app's page, so an agent that drives the browser finds them through WebMCP or Chrome DevTools for agents. Any script on the page can call them, so leave this off if the page loads scripts you don't trust. `),z(),R(4,`label`,3)(5,`input`,4,0),U(`change`,function(e){return t.set(e.target.checked)}),z(),R(7,`span`,5),K(8,`Browser agent tools`),z(),R(9,`span`,6),K(10),z()(),R(11,`p`,7),A(12,Kge,1,0)(13,qge,1,0)(14,Xge,2,1)(15,Zge,1,0)(16,Qge,4,1),z(),A(17,$ge,5,1,`div`,8),R(18,`p`,9),K(19),z()),e&2){let e,n;D(5),V(`checked`,t.enabled())(`disabled`,!t.canChange()),k(`aria-busy`,t.saving()?`true`:null),D(5),q(t.enabled()?`On`:`Off`),D(2),j((e=t.status())===`connecting`?12:e===`loading`?13:e===`unsupported`?14:e===`failed`?15:16),D(5),j((n=t.error())?17:-1,n),D(2),q(t.announcement())}},styles:[`[_nghost-%COMP%] { display: block; } @@ -26252,7 +26279,7 @@ code[_ngcontent-%COMP%] { .action[_ngcontent-%COMP%]:focus-visible { outline: 2px solid var(--%NS%accent); outline-offset: 2px; -}`]})},Jge=(e,t)=>t.value,Yge=(e,t)=>t.id;function Xge(e,t){if(e&1){let e=B();F(0,`label`,27)(1,`input`,28),H(`change`,function(){let t=C(e).$implicit;return w(W().theme.set(t.value))}),I(),F(2,`span`,29),K(3),I(),F(4,`span`,30),K(5),I()()}if(e&2){let e=t.$implicit,n=W();G(`checked`,n.theme()===e.value),D(),P(`value`,e.value)(`checked`,n.theme()===e.value),D(2),q(e.label),D(2),q(e.hint)}}function Zge(e,t){e&1&&(F(0,`span`,34),K(1,`Pinned`),I())}function Qge(e,t){if(e&1){let e=B();F(0,`li`,31),H(`keydown`,function(t){let n=C(e).$implicit;return w(W().onRowKey(t,n.id))}),L(1,`app-tab-icon`,32),F(2,`span`,33),K(3),A(4,Zge,2,0,`span`,34),I(),F(5,`button`,35),H(`click`,function(){let t=C(e).$implicit;return w(W().togglePinned(t.id))}),K(6,` Pin `),I(),F(7,`label`,36)(8,`input`,37),H(`change`,function(t){let n=C(e).$implicit;return w(W().setShown(n.id,t.target.checked))}),I(),F(9,`span`),K(10,`Shown`),I()(),F(11,`span`,38)(12,`button`,39),H(`click`,function(){let t=C(e).$implicit;return w(W().move(t.id,-1))}),T(),F(13,`svg`,40),L(14,`path`,41),I()(),cs(),F(15,`button`,42),H(`click`,function(){let t=C(e).$implicit;return w(W().move(t.id,1))}),T(),F(16,`svg`,40),L(17,`path`,43),I()()()()}if(e&2){let e=t.$implicit,n=W();G(`hidden-tab`,n.isHidden(e.id)),k(`data-tab`,e.id),D(),P(`name`,e.id),D(2),J(` `,e.label,` `),D(),j(n.isPinned(e.id)?4:-1),D(),k(`aria-pressed`,n.isPinned(e.id))(`aria-label`,`Pin `+e.label),D(3),P(`checked`,!n.isHidden(e.id)),k(`aria-label`,e.label+` shown in the tab bar`),D(4),P(`disabled`,!n.canMove(e.id,-1)),k(`aria-label`,`Move `+e.label+` up`),D(3),P(`disabled`,!n.canMove(e.id,1)),k(`aria-label`,`Move `+e.label+` down`)}}function $ge(e,t){e&1&&(K(0,` Press `),F(1,`kbd`),K(2),I(),K(3,` on your app's page to open or close the panel. The button shows while the panel is open. The popup on the page saves this setting. `)),e&2&&(D(2),q(t))}function e_e(e,t){e&1&&(K(0,` The popup shortcut is turned off in the devtools config (`),F(1,`code`),K(2,`popup.hotkey`),I(),K(3,`), so the button always shows. `))}function t_e(e,t){e&1&&(F(0,`kbd`),K(1),I()),e&2&&(D(),q(t))}function n_e(e,t){e&1&&K(0,` Off `)}var r_e=[{value:`system`,label:`System`,hint:`Follows the hub, or your system without it`},{value:`light`,label:`Light`,hint:`Always light`},{value:`dark`,label:`Dark`,hint:`Always dark`}],i_e=class e{tabs=$([]);layout=rv(U5);theme=rv(`system`);passive=rv(!1);pill=rv(!1);hotkey=$(!1);paletteShortcut=$(`Ctrl+K`);rpc=$(null);themes=r_e;announcement=E(``);host=S(kl);injector=S(gs);ids=X(()=>this.tabs().map(e=>e.id));orderedTabs=X(()=>{let e=new Map(this.tabs().map(e=>[e.id,e]));return q5(this.ids(),this.layout()).map(t=>e.get(t))});isDefaultLayout=X(()=>{let{order:e,hidden:t,pinned:n}=this.layout(),r=q5(this.ids(),this.layout());return!t.length&&!n.length&&(!e.length||r.every((e,t)=>e===this.ids()[t]))});isPinned(e){return this.layout().pinned.includes(e)}isHidden(e){return this.layout().hidden.includes(e)&&!this.isPinned(e)}canMove(e,t){return J5(this.ids(),this.layout(),e,t)!==this.layout()}move(e,t){let n=J5(this.ids(),this.layout(),e,t);if(n===this.layout())return;this.layout.set(n);let r=q5(this.ids(),n),i=this.label(e);this.say(`${i} moved to position ${r.indexOf(e)+1} of ${r.length}.`),ed(()=>{let n=[...this.host.nativeElement.querySelectorAll(`.tab-row`)].find(t=>t.dataset.tab===e),r=n?.querySelector(`[data-move="${t<0?`up`:`down`}"]`),i=n?.querySelector(`[data-move="${t<0?`down`:`up`}"]`);(r&&!r.disabled?r:i)?.focus()},{injector:this.injector})}onRowKey(e,t){!e.altKey||e.key!==`ArrowUp`&&e.key!==`ArrowDown`||(e.preventDefault(),this.move(t,e.key===`ArrowUp`?-1:1))}togglePinned(e){let t=!this.isPinned(e);this.layout.set(wme(this.ids(),this.layout(),e,t)),this.say(t?`${this.label(e)} pinned.`:`${this.label(e)} unpinned.`)}setShown(e,t){this.layout.set(Cme(this.layout(),e,!t)),this.say(t?`${this.label(e)} shown.`:`${this.label(e)} hidden.`)}resetTabs(){this.layout.set(U5),this.say(`Tabs reset to the default order.`)}label(e){return this.tabs().find(t=>t.id===e)?.label??e}say(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-settings`]],inputs:{tabs:[1,`tabs`],layout:[1,`layout`],theme:[1,`theme`],passive:[1,`passive`],pill:[1,`pill`],hotkey:[1,`hotkey`],paletteShortcut:[1,`paletteShortcut`],rpc:[1,`rpc`]},outputs:{layout:`layoutChange`,theme:`themeChange`,passive:`passiveChange`,pill:`pillChange`},decls:73,vars:9,consts:[[1,`intro`],[`aria-labelledby`,`settings-theme`,1,`card`],[`id`,`settings-theme`],[`role`,`radiogroup`,`aria-labelledby`,`settings-theme`,1,`themes`],[1,`theme`,3,`checked`],[`aria-labelledby`,`settings-tabs`,1,`card`],[1,`card-head`],[`id`,`settings-tabs`],[`type`,`button`,1,`action`,3,`click`,`disabled`],[`id`,`settings-tabs-hint`,1,`hint`],[`aria-labelledby`,`settings-tabs`,`aria-describedby`,`settings-tabs-hint`,1,`tab-list`],[1,`tab-row`,3,`hidden-tab`],[`aria-labelledby`,`settings-popup`,1,`card`],[`id`,`settings-popup`],[1,`check`,`wide`],[`type`,`checkbox`,`aria-describedby`,`settings-passive-hint`,3,`change`,`checked`,`disabled`],[`id`,`settings-passive-hint`,1,`hint`],[`type`,`checkbox`,`aria-describedby`,`settings-pill-hint`,3,`change`,`checked`],[`id`,`settings-pill-hint`,1,`hint`],[`aria-labelledby`,`settings-browser-agents`,1,`card`],[3,`rpc`],[`aria-labelledby`,`settings-keys`,1,`card`],[`id`,`settings-keys`],[1,`keys`],[1,`sr-only`],[`scope`,`col`],[`role`,`status`,1,`sr-only`],[1,`theme`],[`type`,`radio`,`name`,`settings-theme`,3,`change`,`value`,`checked`],[1,`theme-label`],[1,`hint`],[1,`tab-row`,3,`keydown`],[3,`name`],[1,`tab-label`],[1,`tag`],[`type`,`button`,1,`action`,`small`,3,`click`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[1,`moves`],[`type`,`button`,`data-move`,`up`,1,`icon`,3,`click`,`disabled`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`m6 15 6-6 6 6`],[`type`,`button`,`data-move`,`down`,1,`icon`,3,`click`,`disabled`],[`d`,`m6 9 6 6 6-6`]],template:function(e,t){if(e&1&&(F(0,`p`,0),K(1,` Settings for this panel in this browser. They are saved in the browser's local storage, so every panel on this address uses them. Browser agents is the exception: the dev server keeps it for every page and panel. `),I(),F(2,`section`,1)(3,`h2`,2),K(4,`Theme`),I(),F(5,`div`,3),M(6,Xge,6,6,`label`,4,Jge),I()(),F(8,`section`,5)(9,`div`,6)(10,`h2`,7),K(11,`Tabs`),I(),F(12,`button`,8),H(`click`,function(){return t.resetTabs()}),K(13,` Reset tabs `),I()(),F(14,`p`,9),K(15,` Pinned tabs come first in the tab bar. Hidden tabs stay reachable from the command palette and from links. Use the arrow buttons, or `),F(16,`kbd`),K(17,`Alt`),I(),K(18,` with `),F(19,`kbd`),K(20,`↑`),I(),K(21,` and `),F(22,`kbd`),K(23,`↓`),I(),K(24,` on a row, to change the order. `),I(),F(25,`ol`,10),M(26,Qge,18,14,`li`,11,Yge),I()(),F(28,`section`,12)(29,`h2`,13),K(30,`Popup on the page`),I(),F(31,`label`,14)(32,`input`,15),H(`change`,function(e){return t.passive.set(e.target.checked)}),I(),F(33,`span`),K(34,`Passive mode: hide the floating button until the shortcut is pressed`),I()(),F(35,`p`,16),A(36,$ge,4,1)(37,e_e,4,0),I(),F(38,`label`,14)(39,`input`,17),H(`change`,function(e){return t.pill.set(e.target.checked)}),I(),F(40,`span`),K(41,`Counts launcher: show render and error counts on the floating button`),I()(),F(42,`p`,18),K(43,` While the panel is closed, the button becomes a pill with the number of component renders and errors on the page since it loaded. Off by default. The popup on the page saves this setting. `),I()(),F(44,`section`,19),L(45,`app-browser-tools-setting`,20),I(),F(46,`section`,21)(47,`h2`,22),K(48,`Keyboard shortcuts`),I(),F(49,`table`,23)(50,`caption`,24),K(51,` Keyboard shortcuts `),I(),F(52,`thead`)(53,`tr`)(54,`th`,25),K(55,`Shortcut`),I(),F(56,`th`,25),K(57,`Action`),I()()(),F(58,`tbody`)(59,`tr`)(60,`td`)(61,`kbd`),K(62),I()(),F(63,`td`),K(64,`Open the command palette in the panel`),I()(),F(65,`tr`)(66,`td`),A(67,t_e,2,1,`kbd`)(68,n_e,1,0),I(),F(69,`td`),K(70,`Open or close the popup on your app's page`),I()()()()(),F(71,`p`,26),K(72),I()),e&2){let e,n;D(6),N(t.themes),D(6),P(`disabled`,t.isDefaultLayout()),D(14),N(t.orderedTabs()),D(6),P(`checked`,t.passive())(`disabled`,t.hotkey()===!1),D(4),j((e=t.hotkey())?36:37,e),D(3),P(`checked`,t.pill()),D(6),P(`rpc`,t.rpc()),D(17),q(t.paletteShortcut()),D(5),j((n=t.hotkey())?67:68,n),D(5),q(t.announcement())}},dependencies:[qge,iE],styles:[`[_nghost-%COMP%] { +}`]})},t_e=(e,t)=>t.value,n_e=(e,t)=>t.id;function r_e(e,t){if(e&1){let e=B();F(0,`label`,27)(1,`input`,28),H(`change`,function(){let t=C(e).$implicit;return w(W().theme.set(t.value))}),I(),F(2,`span`,29),K(3),I(),F(4,`span`,30),K(5),I()()}if(e&2){let e=t.$implicit,n=W();G(`checked`,n.theme()===e.value),D(),P(`value`,e.value)(`checked`,n.theme()===e.value),D(2),q(e.label),D(2),q(e.hint)}}function i_e(e,t){e&1&&(F(0,`span`,34),K(1,`Pinned`),I())}function a_e(e,t){if(e&1){let e=B();F(0,`li`,31),H(`keydown`,function(t){let n=C(e).$implicit;return w(W().onRowKey(t,n.id))}),L(1,`app-tab-icon`,32),F(2,`span`,33),K(3),A(4,i_e,2,0,`span`,34),I(),F(5,`button`,35),H(`click`,function(){let t=C(e).$implicit;return w(W().togglePinned(t.id))}),K(6,` Pin `),I(),F(7,`label`,36)(8,`input`,37),H(`change`,function(t){let n=C(e).$implicit;return w(W().setShown(n.id,t.target.checked))}),I(),F(9,`span`),K(10,`Shown`),I()(),F(11,`span`,38)(12,`button`,39),H(`click`,function(){let t=C(e).$implicit;return w(W().move(t.id,-1))}),T(),F(13,`svg`,40),L(14,`path`,41),I()(),cs(),F(15,`button`,42),H(`click`,function(){let t=C(e).$implicit;return w(W().move(t.id,1))}),T(),F(16,`svg`,40),L(17,`path`,43),I()()()()}if(e&2){let e=t.$implicit,n=W();G(`hidden-tab`,n.isHidden(e.id)),k(`data-tab`,e.id),D(),P(`name`,e.id),D(2),J(` `,e.label,` `),D(),j(n.isPinned(e.id)?4:-1),D(),k(`aria-pressed`,n.isPinned(e.id))(`aria-label`,`Pin `+e.label),D(3),P(`checked`,!n.isHidden(e.id)),k(`aria-label`,e.label+` shown in the tab bar`),D(4),P(`disabled`,!n.canMove(e.id,-1)),k(`aria-label`,`Move `+e.label+` up`),D(3),P(`disabled`,!n.canMove(e.id,1)),k(`aria-label`,`Move `+e.label+` down`)}}function o_e(e,t){e&1&&(K(0,` Press `),F(1,`kbd`),K(2),I(),K(3,` on your app's page to open or close the panel. The button shows while the panel is open. The popup on the page saves this setting. `)),e&2&&(D(2),q(t))}function s_e(e,t){e&1&&(K(0,` The popup shortcut is turned off in the devtools config (`),F(1,`code`),K(2,`popup.hotkey`),I(),K(3,`), so the button always shows. `))}function c_e(e,t){e&1&&(F(0,`kbd`),K(1),I()),e&2&&(D(),q(t))}function l_e(e,t){e&1&&K(0,` Off `)}var u_e=[{value:`system`,label:`System`,hint:`Follows the hub, or your system without it`},{value:`light`,label:`Light`,hint:`Always light`},{value:`dark`,label:`Dark`,hint:`Always dark`}],d_e=class e{tabs=$([]);layout=av(U5);theme=av(`system`);passive=av(!1);pill=av(!1);hotkey=$(!1);paletteShortcut=$(`Ctrl+K`);rpc=$(null);themes=u_e;announcement=E(``);host=S(kl);injector=S(gs);ids=X(()=>this.tabs().map(e=>e.id));orderedTabs=X(()=>{let e=new Map(this.tabs().map(e=>[e.id,e]));return q5(this.ids(),this.layout()).map(t=>e.get(t))});isDefaultLayout=X(()=>{let{order:e,hidden:t,pinned:n}=this.layout(),r=q5(this.ids(),this.layout());return!t.length&&!n.length&&(!e.length||r.every((e,t)=>e===this.ids()[t]))});isPinned(e){return this.layout().pinned.includes(e)}isHidden(e){return this.layout().hidden.includes(e)&&!this.isPinned(e)}canMove(e,t){return J5(this.ids(),this.layout(),e,t)!==this.layout()}move(e,t){let n=J5(this.ids(),this.layout(),e,t);if(n===this.layout())return;this.layout.set(n);let r=q5(this.ids(),n),i=this.label(e);this.say(`${i} moved to position ${r.indexOf(e)+1} of ${r.length}.`),td(()=>{let n=[...this.host.nativeElement.querySelectorAll(`.tab-row`)].find(t=>t.dataset.tab===e),r=n?.querySelector(`[data-move="${t<0?`up`:`down`}"]`),i=n?.querySelector(`[data-move="${t<0?`down`:`up`}"]`);(r&&!r.disabled?r:i)?.focus()},{injector:this.injector})}onRowKey(e,t){!e.altKey||e.key!==`ArrowUp`&&e.key!==`ArrowDown`||(e.preventDefault(),this.move(t,e.key===`ArrowUp`?-1:1))}togglePinned(e){let t=!this.isPinned(e);this.layout.set(jme(this.ids(),this.layout(),e,t)),this.say(t?`${this.label(e)} pinned.`:`${this.label(e)} unpinned.`)}setShown(e,t){this.layout.set(Ame(this.layout(),e,!t)),this.say(t?`${this.label(e)} shown.`:`${this.label(e)} hidden.`)}resetTabs(){this.layout.set(U5),this.say(`Tabs reset to the default order.`)}label(e){return this.tabs().find(t=>t.id===e)?.label??e}say(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-settings`]],inputs:{tabs:[1,`tabs`],layout:[1,`layout`],theme:[1,`theme`],passive:[1,`passive`],pill:[1,`pill`],hotkey:[1,`hotkey`],paletteShortcut:[1,`paletteShortcut`],rpc:[1,`rpc`]},outputs:{layout:`layoutChange`,theme:`themeChange`,passive:`passiveChange`,pill:`pillChange`},decls:73,vars:9,consts:[[1,`intro`],[`aria-labelledby`,`settings-theme`,1,`card`],[`id`,`settings-theme`],[`role`,`radiogroup`,`aria-labelledby`,`settings-theme`,1,`themes`],[1,`theme`,3,`checked`],[`aria-labelledby`,`settings-tabs`,1,`card`],[1,`card-head`],[`id`,`settings-tabs`],[`type`,`button`,1,`action`,3,`click`,`disabled`],[`id`,`settings-tabs-hint`,1,`hint`],[`aria-labelledby`,`settings-tabs`,`aria-describedby`,`settings-tabs-hint`,1,`tab-list`],[1,`tab-row`,3,`hidden-tab`],[`aria-labelledby`,`settings-popup`,1,`card`],[`id`,`settings-popup`],[1,`check`,`wide`],[`type`,`checkbox`,`aria-describedby`,`settings-passive-hint`,3,`change`,`checked`,`disabled`],[`id`,`settings-passive-hint`,1,`hint`],[`type`,`checkbox`,`aria-describedby`,`settings-pill-hint`,3,`change`,`checked`],[`id`,`settings-pill-hint`,1,`hint`],[`aria-labelledby`,`settings-browser-agents`,1,`card`],[3,`rpc`],[`aria-labelledby`,`settings-keys`,1,`card`],[`id`,`settings-keys`],[1,`keys`],[1,`sr-only`],[`scope`,`col`],[`role`,`status`,1,`sr-only`],[1,`theme`],[`type`,`radio`,`name`,`settings-theme`,3,`change`,`value`,`checked`],[1,`theme-label`],[1,`hint`],[1,`tab-row`,3,`keydown`],[3,`name`],[1,`tab-label`],[1,`tag`],[`type`,`button`,1,`action`,`small`,3,`click`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[1,`moves`],[`type`,`button`,`data-move`,`up`,1,`icon`,3,`click`,`disabled`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`m6 15 6-6 6 6`],[`type`,`button`,`data-move`,`down`,1,`icon`,3,`click`,`disabled`],[`d`,`m6 9 6 6 6-6`]],template:function(e,t){if(e&1&&(F(0,`p`,0),K(1,` Settings for this panel in this browser. They are saved in the browser's local storage, so every panel on this address uses them. Browser agents is the exception: the dev server keeps it for every page and panel. `),I(),F(2,`section`,1)(3,`h2`,2),K(4,`Theme`),I(),F(5,`div`,3),M(6,r_e,6,6,`label`,4,t_e),I()(),F(8,`section`,5)(9,`div`,6)(10,`h2`,7),K(11,`Tabs`),I(),F(12,`button`,8),H(`click`,function(){return t.resetTabs()}),K(13,` Reset tabs `),I()(),F(14,`p`,9),K(15,` Pinned tabs come first in the tab bar. Hidden tabs stay reachable from the command palette and from links. Use the arrow buttons, or `),F(16,`kbd`),K(17,`Alt`),I(),K(18,` with `),F(19,`kbd`),K(20,`↑`),I(),K(21,` and `),F(22,`kbd`),K(23,`↓`),I(),K(24,` on a row, to change the order. `),I(),F(25,`ol`,10),M(26,a_e,18,14,`li`,11,n_e),I()(),F(28,`section`,12)(29,`h2`,13),K(30,`Popup on the page`),I(),F(31,`label`,14)(32,`input`,15),H(`change`,function(e){return t.passive.set(e.target.checked)}),I(),F(33,`span`),K(34,`Passive mode: hide the floating button until the shortcut is pressed`),I()(),F(35,`p`,16),A(36,o_e,4,1)(37,s_e,4,0),I(),F(38,`label`,14)(39,`input`,17),H(`change`,function(e){return t.pill.set(e.target.checked)}),I(),F(40,`span`),K(41,`Counts launcher: show render and error counts on the floating button`),I()(),F(42,`p`,18),K(43,` While the panel is closed, the button becomes a pill with the number of component renders and errors on the page since it loaded. Off by default. The popup on the page saves this setting. `),I()(),F(44,`section`,19),L(45,`app-browser-tools-setting`,20),I(),F(46,`section`,21)(47,`h2`,22),K(48,`Keyboard shortcuts`),I(),F(49,`table`,23)(50,`caption`,24),K(51,` Keyboard shortcuts `),I(),F(52,`thead`)(53,`tr`)(54,`th`,25),K(55,`Shortcut`),I(),F(56,`th`,25),K(57,`Action`),I()()(),F(58,`tbody`)(59,`tr`)(60,`td`)(61,`kbd`),K(62),I()(),F(63,`td`),K(64,`Open the command palette in the panel`),I()(),F(65,`tr`)(66,`td`),A(67,c_e,2,1,`kbd`)(68,l_e,1,0),I(),F(69,`td`),K(70,`Open or close the popup on your app's page`),I()()()()(),F(71,`p`,26),K(72),I()),e&2){let e,n;D(6),N(t.themes),D(6),P(`disabled`,t.isDefaultLayout()),D(14),N(t.orderedTabs()),D(6),P(`checked`,t.passive())(`disabled`,t.hotkey()===!1),D(4),j((e=t.hotkey())?36:37,e),D(3),P(`checked`,t.pill()),D(6),P(`rpc`,t.rpc()),D(17),q(t.paletteShortcut()),D(5),j((n=t.hotkey())?67:68,n),D(5),q(t.announcement())}},dependencies:[e_e,iE],styles:[`[_nghost-%COMP%] { display: block; max-width: 760px; } @@ -26512,7 +26539,7 @@ code[_ngcontent-%COMP%] { padding: 8px; border-top: 1px solid var(--%NS%border); color: var(--%NS%text); -}`]})};function q9(e,t){let n=e.toLowerCase(),r=t.toLowerCase().replace(/\s+/g,``);if(!r)return 0;let i=0,a=0,o=-2;for(let e of r){let t=n.indexOf(e,a);if(t<0)return-1;let r=t===0||/[\s:&/-]/.test(n[t-1]);i+=1,t===o+1&&(i+=3),r&&(i+=4),o=t,a=t+1}return i-n.length/100}function a_e(e,t){let n=t.trim();return n?e.map((e,t)=>{let r=q9(e.title,n),i=q9(`${e.group} ${e.keywords??``}`,n);return{command:e,index:t,score:Math.max(r>=0?r+10:-1,i)}}).filter(e=>e.score>=0).sort((e,t)=>t.score-e.score||e.index-t.index).map(e=>e.command):[...e]}var o_e=[`input`],s_e=(e,t)=>t.id;function c_e(e,t){if(e&1&&(R(0,`kbd`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.shortcut)}}function l_e(e,t){if(e&1){let e=B();R(0,`li`,14),U(`pointermove`,function(){let t=C(e).$index;return w(W(2).active.set(t))})(`click`,function(){let t=C(e).$implicit;return w(W(2).run(t))}),R(1,`span`,15),K(2),z(),A(3,c_e,2,1,`kbd`),R(4,`span`,16),K(5),z()()}if(e&2){let e=t.$implicit,n=t.$index,r=W(2);G(`active`,n===r.active()),k(`id`,r.uid+`-opt-`+n)(`aria-selected`,n===r.active()),D(2),q(e.title),D(),j(e.shortcut?3:-1),D(2),q(e.group)}}function u_e(e,t){if(e&1&&(R(0,`p`,11),K(1),z()),e&2){let e=W(2);D(),J(`No commands match “`,e.query().trim(),`”.`)}}function d_e(e,t){if(e&1){let e=B();R(0,`div`,1),U(`pointerdown`,function(){return C(e),w(W().close())}),z(),R(1,`div`,2),U(`keydown`,function(t){return C(e),w(W().onKey(t))}),R(2,`h2`,3),K(3,`Command palette`),z(),R(4,`div`,4),T(),R(5,`svg`,5),og(6,`circle`,6)(7,`path`,7),z(),cs(),R(8,`input`,8,0),U(`input`,function(t){return C(e),w(W().query.set(t.target.value))}),z()(),R(10,`ul`,9),U(`pointerdown`,function(e){return e.preventDefault()}),M(11,l_e,6,7,`li`,10,s_e),z(),A(13,u_e,2,1,`p`,11),R(14,`p`,12)(15,`kbd`),K(16,`↑`),z(),R(17,`kbd`),K(18,`↓`),z(),K(19,` to move, `),R(20,`kbd`),K(21,`Enter`),z(),K(22,` to run, `),R(23,`kbd`),K(24,`Esc`),z(),K(25,` to close `),z(),R(26,`p`,13),K(27),z()()}if(e&2){let e=W();D(),k(`aria-labelledby`,e.uid+`-title`),D(),k(`id`,e.uid+`-title`),D(6),V(`value`,e.query()),k(`aria-controls`,e.uid+`-list`)(`aria-activedescendant`,e.activeId())(`aria-describedby`,e.uid+`-help`),D(2),V(`hidden`,!e.results().length),k(`id`,e.uid+`-list`),D(),N(e.results()),D(2),j(e.results().length?-1:13),D(),k(`id`,e.uid+`-help`),D(13),q(e.status())}}var f_e=0,p_e=class e{commands=$([]);open=rv(!1);picked=Q_();uid=`cp${f_e++}`;query=E(``);results=X(()=>a_e(this.commands(),this.query()));active=Q(()=>this.results().length?0:-1);activeId=X(()=>this.active()>=0?`${this.uid}-opt-${this.active()}`:null);status=X(()=>{let e=this.results().length;return e?`${e} ${e===1?`command`:`commands`}.`:`No commands match.`});input=av(`input`);injector=S(gs);returnFocus=null;constructor(){ac(()=>{this.open()&&Z(()=>{let e=document.activeElement;this.returnFocus=e instanceof HTMLElement&&e!==document.body?e:null,this.query.set(``),ed(()=>this.input()?.nativeElement.focus(),{injector:this.injector})})})}close(e){if(!this.open())return;this.open.set(!1);let t=this.returnFocus;this.returnFocus=null,ed(()=>{t?.isConnected&&t.focus(),e?.()},{injector:this.injector})}run(e){this.close(()=>this.picked.emit(e.id))}onKey(e){let t=this.results().length;switch(e.key){case`ArrowDown`:case`ArrowUp`:{if(e.preventDefault(),!t)return;let n=e.key===`ArrowDown`?1:-1;this.active.set((this.active()+n+t)%t),this.reveal();return}case`PageDown`:case`PageUp`:if(e.preventDefault(),!t)return;this.active.set(e.key===`PageDown`?t-1:0),this.reveal();return;case`Enter`:{e.preventDefault();let t=this.results()[this.active()];t&&this.run(t);return}case`Escape`:e.preventDefault(),e.stopPropagation(),this.close();return;case`Tab`:e.preventDefault();return}}reveal(){ed(()=>{let e=this.activeId();e&&document.getElementById(e)?.scrollIntoView?.({block:`nearest`})},{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-command-palette`]],viewQuery:function(e,t){e&1&&Dg(t.input,o_e,5),e&2&&Og()},inputs:{commands:[1,`commands`],open:[1,`open`]},outputs:{open:`openChange`,picked:`picked`},decls:1,vars:1,consts:[[`input`,``],[`aria-hidden`,`true`,1,`backdrop`,3,`pointerdown`],[`role`,`dialog`,`aria-modal`,`true`,1,`palette`,3,`keydown`],[1,`sr-only`],[1,`field`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`text`,`role`,`combobox`,`aria-autocomplete`,`list`,`aria-expanded`,`true`,`autocomplete`,`off`,`spellcheck`,`false`,`placeholder`,`Type a command or a tab…`,`aria-label`,`Command`,3,`input`,`value`],[`role`,`listbox`,`aria-label`,`Commands`,1,`list`,3,`pointerdown`,`hidden`],[`role`,`option`,3,`active`],[1,`empty`],[1,`help`],[`role`,`status`,1,`sr-only`],[`role`,`option`,3,`pointermove`,`click`],[1,`title`],[1,`group`]],template:function(e,t){e&1&&A(0,d_e,28,11),e&2&&j(t.open()?0:-1)},styles:[`.backdrop[_ngcontent-%COMP%] { +}`]})};function q9(e,t){let n=e.toLowerCase(),r=t.toLowerCase().replace(/\s+/g,``);if(!r)return 0;let i=0,a=0,o=-2;for(let e of r){let t=n.indexOf(e,a);if(t<0)return-1;let r=t===0||/[\s:&/-]/.test(n[t-1]);i+=1,t===o+1&&(i+=3),r&&(i+=4),o=t,a=t+1}return i-n.length/100}function f_e(e,t){let n=t.trim();return n?e.map((e,t)=>{let r=q9(e.title,n),i=q9(`${e.group} ${e.keywords??``}`,n);return{command:e,index:t,score:Math.max(r>=0?r+10:-1,i)}}).filter(e=>e.score>=0).sort((e,t)=>t.score-e.score||e.index-t.index).map(e=>e.command):[...e]}var p_e=[`input`],m_e=(e,t)=>t.id;function h_e(e,t){if(e&1&&(R(0,`kbd`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.shortcut)}}function g_e(e,t){if(e&1){let e=B();R(0,`li`,14),U(`pointermove`,function(){let t=C(e).$index;return w(W(2).active.set(t))})(`click`,function(){let t=C(e).$implicit;return w(W(2).run(t))}),R(1,`span`,15),K(2),z(),A(3,h_e,2,1,`kbd`),R(4,`span`,16),K(5),z()()}if(e&2){let e=t.$implicit,n=t.$index,r=W(2);G(`active`,n===r.active()),k(`id`,r.uid+`-opt-`+n)(`aria-selected`,n===r.active()),D(2),q(e.title),D(),j(e.shortcut?3:-1),D(2),q(e.group)}}function __e(e,t){if(e&1&&(R(0,`p`,11),K(1),z()),e&2){let e=W(2);D(),J(`No commands match “`,e.query().trim(),`”.`)}}function v_e(e,t){if(e&1){let e=B();R(0,`div`,1),U(`pointerdown`,function(){return C(e),w(W().close())}),z(),R(1,`div`,2),U(`keydown`,function(t){return C(e),w(W().onKey(t))}),R(2,`h2`,3),K(3,`Command palette`),z(),R(4,`div`,4),T(),R(5,`svg`,5),sg(6,`circle`,6)(7,`path`,7),z(),cs(),R(8,`input`,8,0),U(`input`,function(t){return C(e),w(W().query.set(t.target.value))}),z()(),R(10,`ul`,9),U(`pointerdown`,function(e){return e.preventDefault()}),M(11,g_e,6,7,`li`,10,m_e),z(),A(13,__e,2,1,`p`,11),R(14,`p`,12)(15,`kbd`),K(16,`↑`),z(),R(17,`kbd`),K(18,`↓`),z(),K(19,` to move, `),R(20,`kbd`),K(21,`Enter`),z(),K(22,` to run, `),R(23,`kbd`),K(24,`Esc`),z(),K(25,` to close `),z(),R(26,`p`,13),K(27),z()()}if(e&2){let e=W();D(),k(`aria-labelledby`,e.uid+`-title`),D(),k(`id`,e.uid+`-title`),D(6),V(`value`,e.query()),k(`aria-controls`,e.uid+`-list`)(`aria-activedescendant`,e.activeId())(`aria-describedby`,e.uid+`-help`),D(2),V(`hidden`,!e.results().length),k(`id`,e.uid+`-list`),D(),N(e.results()),D(2),j(e.results().length?-1:13),D(),k(`id`,e.uid+`-help`),D(13),q(e.status())}}var y_e=0,b_e=class e{commands=$([]);open=av(!1);picked=ev();uid=`cp${y_e++}`;query=E(``);results=X(()=>f_e(this.commands(),this.query()));active=Q(()=>this.results().length?0:-1);activeId=X(()=>this.active()>=0?`${this.uid}-opt-${this.active()}`:null);status=X(()=>{let e=this.results().length;return e?`${e} ${e===1?`command`:`commands`}.`:`No commands match.`});input=sv(`input`);injector=S(gs);returnFocus=null;constructor(){ac(()=>{this.open()&&Z(()=>{let e=document.activeElement;this.returnFocus=e instanceof HTMLElement&&e!==document.body?e:null,this.query.set(``),td(()=>this.input()?.nativeElement.focus(),{injector:this.injector})})})}close(e){if(!this.open())return;this.open.set(!1);let t=this.returnFocus;this.returnFocus=null,td(()=>{t?.isConnected&&t.focus(),e?.()},{injector:this.injector})}run(e){this.close(()=>this.picked.emit(e.id))}onKey(e){let t=this.results().length;switch(e.key){case`ArrowDown`:case`ArrowUp`:{if(e.preventDefault(),!t)return;let n=e.key===`ArrowDown`?1:-1;this.active.set((this.active()+n+t)%t),this.reveal();return}case`PageDown`:case`PageUp`:if(e.preventDefault(),!t)return;this.active.set(e.key===`PageDown`?t-1:0),this.reveal();return;case`Enter`:{e.preventDefault();let t=this.results()[this.active()];t&&this.run(t);return}case`Escape`:e.preventDefault(),e.stopPropagation(),this.close();return;case`Tab`:e.preventDefault();return}}reveal(){td(()=>{let e=this.activeId();e&&document.getElementById(e)?.scrollIntoView?.({block:`nearest`})},{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-command-palette`]],viewQuery:function(e,t){e&1&&Og(t.input,p_e,5),e&2&&kg()},inputs:{commands:[1,`commands`],open:[1,`open`]},outputs:{open:`openChange`,picked:`picked`},decls:1,vars:1,consts:[[`input`,``],[`aria-hidden`,`true`,1,`backdrop`,3,`pointerdown`],[`role`,`dialog`,`aria-modal`,`true`,1,`palette`,3,`keydown`],[1,`sr-only`],[1,`field`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`text`,`role`,`combobox`,`aria-autocomplete`,`list`,`aria-expanded`,`true`,`autocomplete`,`off`,`spellcheck`,`false`,`placeholder`,`Type a command or a tab…`,`aria-label`,`Command`,3,`input`,`value`],[`role`,`listbox`,`aria-label`,`Commands`,1,`list`,3,`pointerdown`,`hidden`],[`role`,`option`,3,`active`],[1,`empty`],[1,`help`],[`role`,`status`,1,`sr-only`],[`role`,`option`,3,`pointermove`,`click`],[1,`title`],[1,`group`]],template:function(e,t){e&1&&A(0,v_e,28,11),e&2&&j(t.open()?0:-1)},styles:[`.backdrop[_ngcontent-%COMP%] { position: fixed; inset: 0; z-index: 100; @@ -26653,7 +26680,7 @@ kbd[_ngcontent-%COMP%] { .help[_ngcontent-%COMP%] { display: none; } -}`]})},m_e=[`nav`],h_e=[`main`],g_e=e=>[e],__e=(e,t)=>t.id;function v_e(e,t){e&1&&(T(),F(0,`svg`,4),L(1,`path`,32),I())}function y_e(e,t){e&1&&(T(),F(0,`svg`,4),L(1,`path`,33)(2,`path`,34)(3,`path`,35)(4,`path`,36)(5,`path`,37)(6,`path`,38),I())}function b_e(e,t){e&1&&(T(),F(0,`svg`,5)(1,`defs`)(2,`linearGradient`,39),L(3,`stop`,40)(4,`stop`,41),I()(),L(5,`path`,42),F(6,`g`,43),L(7,`path`,44)(8,`path`,45)(9,`path`,46)(10,`path`,47),I()())}function x_e(e,t){e&1&&(T(),F(0,`svg`,6),L(1,`path`,48)(2,`path`,49)(3,`path`,50)(4,`path`,51),I())}function S_e(e,t){e&1&&(T(),F(0,`svg`,7),L(1,`path`,52),I())}function C_e(e,t){e&1&&(T(),F(0,`svg`,8)(1,`defs`)(2,`linearGradient`,53),L(3,`stop`,54)(4,`stop`,55)(5,`stop`,56)(6,`stop`,57)(7,`stop`,58)(8,`stop`,59),I()(),L(9,`path`,60),I())}function w_e(e,t){e&1&&(T(),F(0,`svg`,9),L(1,`rect`,61),F(2,`g`,62)(3,`defs`)(4,`mask`,63),L(5,`rect`,64),F(6,`g`,65),L(7,`path`,66)(8,`path`,67),I()(),F(9,`clipPath`,68),L(10,`rect`,69),I()(),F(11,`g`,70),L(12,`ellipse`,71),I(),F(13,`g`,72),L(14,`path`,73)(15,`path`,74),I(),F(16,`g`,70),L(17,`ellipse`,75)(18,`ellipse`,76),F(19,`g`,77),L(20,`line`,78)(21,`circle`,79)(22,`line`,80)(23,`circle`,81),I()()()())}function T_e(e,t){if(e&1){let e=B();F(0,`button`,83),H(`click`,function(){let t=C(e).$implicit;return w(W(2).switchTab(t.id))}),L(1,`app-tab-icon`,84),F(2,`span`),K(3),I()()}if(e&2){let e=t.$implicit,n=W(2);G(`active`,n.tab()===e.id),k(`aria-current`,n.tab()===e.id?`page`:null)(`tabindex`,n.rovingTab()===e.id?0:-1),D(),P(`name`,e.id),D(2),q(e.label)}}function E_e(e,t){if(e&1&&(F(0,`div`,12),M(1,T_e,4,6,`button`,82,__e),I()),e&2){let e=W();D(),N(e.tabs())}}function J9(e,t){if(e&1){let e=B();F(0,`a`,85),H(`click`,function(t){let n=C(e);return w(W().openFullPanel(t,n.tab))}),T(),F(1,`svg`,86),L(2,`rect`,87)(3,`rect`,88)(4,`rect`,89)(5,`rect`,90),I(),K(6,` Open full panel `),I()}e&2&&P(`href`,t.href,yu)}function D_e(e,t){if(e&1){let e=B();F(0,`app-settings`,91),H(`layoutChange`,function(t){return C(e),w(W().setTabLayout(t))})(`themeChange`,function(t){return C(e),w(W().setTheme(t))})(`passiveChange`,function(t){return C(e),w(W().setPassive(t))})(`pillChange`,function(t){return C(e),w(W().setPill(t))}),I()}if(e&2){let e=W();P(`tabs`,e.settingsTabs())(`layout`,e.tabLayout())(`theme`,e.themePreference())(`passive`,e.passive())(`pill`,e.pill())(`hotkey`,e.popupHotkey())(`paletteShortcut`,e.paletteShortcut)(`rpc`,e.rpc())}}function O_e(e,t){e&1&&L(0,`app-auth-code`,26),e&2&&P(`client`,t)}function k_e(e,t){if(e&1){let e=B();F(0,`div`,27)(1,`p`),K(2,` Can't reach the devtools server. Check that the dev server is running. The panel keeps trying to connect. `),I(),F(3,`button`,83),H(`click`,function(){return C(e),w(W().retryConnection())}),K(4,`Retry now`),I()()}}function A_e(e,t){e&1&&(F(0,`p`,28),K(1,`Connecting to the devtools server…`),I())}function j_e(e,t){e&1&&L(0,`app-coming-soon`,29),e&2&&P(`info`,t)}function M_e(e,t){e&1&&(F(0,`p`,28),K(1,`Looking for an Angular Native app…`),I())}function N_e(e,t){e&1&&(K(0,` To turn it on, set `),F(1,`code`),K(2),I(),K(3,` in the devtools options. `)),e&2&&(D(2),q(t))}function P_e(e,t){if(e&1&&(F(0,`p`,30),K(1,` This inspector is turned off in the devtools config (`),F(2,`code`),K(3,`inspectors`),I(),K(4,`). `),A(5,N_e,4,1),F(6,`a`,92),K(7,`About inspectors`),F(8,`span`,93),K(9,` (opens in a new tab)`),I()()()),e&2){let e,t=W();D(5),j((e=t.turnOnSnippet())?5:-1,e),D(),P(`href`,t.inspectorsDocsUrl,yu)}}function F_e(e,t){if(e&1){let e=B();F(0,`app-dashboard`,100),H(`navigate`,function(t){return C(e),w(W(3).switchTab(t))}),I()}e&2&&P(`rpc`,W(3).rpc())}function I_e(e,t){if(e&1){let e=B();F(0,`app-timeline`,101),H(`open`,function(t){return C(e),w(W(3).openLink(t))}),I()}e&2&&P(`rpc`,W(3).rpc())}function L_e(e,t){if(e&1){let e=B();F(0,`app-audit-inspector`,102),H(`showComponent`,function(t){return C(e),w(W(3).showComponent(t))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`canShowComponent`,e.config().inspectors.components)}}function R_e(e,t){if(e&1){let e=B();F(0,`app-component-tree`,103),H(`focusHandled`,function(){return C(e),w(W(3).componentFocus.set(null))})(`commandHandled`,function(){return C(e),w(W(3).componentCommand.set(null))})(`showForm`,function(t){return C(e),w(W(3).showForm(t))})(`showInjector`,function(t){return C(e),w(W(3).showInjector(t))})(`showSignals`,function(t){return C(e),w(W(3).showSignals(t))})(`showPipe`,function(t){return C(e),w(W(3).showPipe(t))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`focus`,e.componentFocus())(`command`,e.componentCommand())(`canShowInjector`,e.config().inspectors.injectors)(`canShowSignals`,e.config().inspectors.signals)(`canShowPipes`,e.config().inspectors.pipes)}}function z_e(e,t){if(e&1){let e=B();F(0,`app-route-inspector`,104),H(`showComponent`,function(t){return C(e),w(W(3).showComponent(t))}),I()}e&2&&P(`rpc`,W(3).rpc())}function B_e(e,t){if(e&1&&L(0,`app-signal-inspector`,97),e&2){let e=W(3);P(`rpc`,e.rpc())(`focus`,e.signalFocus())}}function V_e(e,t){if(e&1){let e=B();F(0,`app-di-inspector`,105),H(`focusHandled`,function(){return C(e),w(W(3).injectorFocus.set(null))})(`showComponent`,function(t){return C(e),w(W(3).showComponent(t))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`focus`,e.injectorFocus())(`canShowComponent`,e.config().inspectors.components)}}function H_e(e,t){e&1&&L(0,`app-store-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function U_e(e,t){e&1&&L(0,`app-query-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function W_e(e,t){e&1&&L(0,`app-network-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function G_e(e,t){if(e&1){let e=B();F(0,`app-forms-inspector`,106),H(`focusHandled`,function(){return C(e),w(W(3).formFocus.set(null))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`focus`,e.formFocus())}}function K_e(e,t){if(e&1){let e=B();F(0,`app-pipes-inspector`,106),H(`focusHandled`,function(){return C(e),w(W(3).pipeFocus.set(null))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`focus`,e.pipeFocus())}}function q_e(e,t){e&1&&L(0,`app-analog-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function J_e(e,t){e&1&&L(0,`app-capacitor-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function Y_e(e,t){e&1&&L(0,`app-plugins-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function X_e(e,t){if(e&1){let e=B();F(0,`app-errors-inspector`,107),H(`showComponent`,function(t){return C(e),w(W(3).showComponent(t))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`canShowComponent`,e.config().inspectors.components)(`canExplainInjection`,e.config().inspectors.injectors)}}function Z_e(e,t){if(e&1&&A(0,F_e,1,1,`app-dashboard`,94)(1,I_e,1,1,`app-timeline`,94)(2,L_e,1,2,`app-audit-inspector`,95)(3,R_e,1,6,`app-component-tree`,96)(4,z_e,1,1,`app-route-inspector`,94)(5,B_e,1,2,`app-signal-inspector`,97)(6,V_e,1,3,`app-di-inspector`,98)(7,H_e,1,1,`app-store-inspector`,94)(8,U_e,1,1,`app-query-inspector`,94)(9,W_e,1,1,`app-network-inspector`,94)(10,G_e,1,2,`app-forms-inspector`,97)(11,K_e,1,2,`app-pipes-inspector`,97)(12,q_e,1,1,`app-analog-inspector`,94)(13,J_e,1,1,`app-capacitor-inspector`,94)(14,Y_e,1,1,`app-plugins-inspector`,94)(15,X_e,1,3,`app-errors-inspector`,99),e&2){let e;j((e=W(2).tab())===`dashboard`?0:e===`timeline`?1:e===`audit`?2:e===`components`?3:e===`routes`?4:e===`signals`?5:e===`injectors`?6:e===`store`?7:e===`queries`?8:e===`network`?9:e===`forms`?10:e===`pipes`?11:e===`analog`?12:e===`capacitor`?13:e===`plugins`?14:e===`errors`?15:-1)}}function Q_e(e,t){e&1&&M(0,Z_e,16,1,null,null,Yh),e&2&&N(I_(0,g_e,W().scopeKey()))}var Y9=`all`,$_e=[Y9,...XC],eve={angular:`Angular`,ngrx:`NgRx Store`,analog:`Analog`,"angular-native":`Angular Native`,nativescript:`NativeScript`,capacitor:`Capacitor`},X9={ngrx:`store`,analog:`analog`,capacitor:`capacitor`},Z9={store:`ngrx`,analog:`analog`,capacitor:`capacitor`},Q9={"angular-native":[`components`,`signals`,`injectors`,`store`,`queries`,`pipes`,`errors`]},tve={id:`nativescript`,name:`NativeScript`,badge:`Available`,heading:`Inspect NativeScript apps`,summary:`A NativeScript Angular app reports from the simulator or device to this server, and its components, signals, injectors and NgRx stores show up in the Angular dock.`,color:`#3c5afd`,plansTitle:`Set up an app`,plans:[`Install @pangular-inspector/devtools and @valor/nativescript-websockets`,`Call initNativeScriptOverlay() in main.ts, before the app bootstraps`,`Run npx pangular dev --no-auth in the app, then open the Angular dock`],link:{label:`NativeScript setup guide`,href:`https://pangular-inspector.dev/guides/nativescript/`}},nve={id:`capacitor`,name:`Capacitor`,badge:`Available`,heading:`Inspect Capacitor apps`,summary:`An Ionic or Capacitor app runs the browser overlay in its WebView and reports to this server, so it shows up in the Angular dock like a browser tab.`,color:`#119eff`,plansTitle:`Set up an app`,plans:[`With live reload on localhost, load @pangular-inspector/devtools/overlay as in a browser`,`In a bundled build, call initOverlay() from @pangular-inspector/devtools/overlay-manual with this server’s address and connectionMeta`,`Run the app, then come back here for its plugin calls, or open the Angular dock`],link:{label:`Capacitor setup guide`,href:`https://pangular-inspector.dev/guides/capacitor/`}},rve={id:`analog`,name:`Analog`,badge:`Not in this app`,heading:`This app doesn’t use Analog`,summary:`In an Analog app this dock shows your file routes, server load() and API calls, render modes and route lint.`,color:`#dd0330`,plans:[`Which page, layout and .server.ts files render a URL`,`Every load(), server function and API call with timing`,`SSR, prerendered or client only, per page`],link:{label:`Get started with Analog`,href:`https://analogjs.org/docs/getting-started`}},ive={id:`angular-native`,name:`Angular Native`,badge:`Not connected`,heading:`No Angular Native app is connected`,summary:`Start the overlay in your Angular Native app and run this server with --no-auth. The tabs fill as soon as the app reports.`,color:`#e11d48`,plans:[`The component tree, with the view outlined on the device`,`Signals and injectors of the running app`,`Live @ngrx/signals and @ngrx/store state`],link:{label:`Set up Angular Native`,href:`https://pangular-inspector.dev/guides/angular-native/`}},$9=[1e3,2e3,5e3,1e4];function ave(){let e=new URLSearchParams(location.search).get(`view`);return XC.find(t=>t===e)??null}Ore(class e{analog=E(!1);allTabs=dw.map(({id:e,label:t})=>({id:e,label:t}));view=E(ave());viewAccent=X(()=>Lge(this.view(),this.themeService.current()));title=X(()=>{let e=this.view();return e?eve[e]:`Pangular Inspector`});mainLabel=X(()=>this.tab()===`settings`?`Settings`:this.availableTabs().find(e=>e.id===this.tab())?.label??this.title());analogKnown=E(!1);capacitorReporting=E(!1);pluginsReporting=E(!1);capacitorKnown=E(!1);nativePageId=E(null);nativeKnown=E(!1);scopeKey=X(()=>this.view()===`angular-native`?this.nativePageId()??``:``);comingSoon=X(()=>{let e=this.view();if(e===`analog`)return this.analogKnown()&&!this.analog()?rve:void 0;if(e===`nativescript`)return tve;if(e===`capacitor`)return this.config().inspectors.capacitor&&this.capacitorKnown()&&!this.capacitorReporting()?nve:void 0;if(e===`angular-native`)return this.nativeKnown()&&!this.nativePageId()?ive:void 0});config=X(()=>NT(this.rpc()));tabEnabled=BT;inspectorsDocsUrl=zT;turnOnSnippet=X(()=>{let e=RT(this.tab());return e?`inspectors: {${e}: true}`:null});availableTabs=X(()=>{if(this.comingSoon())return[];let e=this.view(),t=e?X9[e]:void 0,n=this.allTabs.filter(e=>BT(e.id,this.config()));if(t)return n.filter(e=>e.id===t);let r=e?Q9[e]:void 0;return r?n.filter(e=>r.includes(e.id)):n.filter(t=>(t.id!==`analog`||this.analog())&&(t.id!==`capacitor`||this.capacitorReporting())&&(t.id!==`plugins`||this.pluginsReporting())&&!(e===`angular`&&Z9[t.id]))});tabLayout=E(gme());tabs=X(()=>{let e=this.tab(),t=Sme(this.availableTabs(),this.tabLayout(),e);return this.rpc()?t:t.filter(t=>t.id===`dashboard`||t.id===e)});settingsTabs=X(()=>this.availableTabs());rovingTab=X(()=>{let e=this.tabs(),t=this.tab();return e.some(e=>e.id===t)?t:e[0]?.id});onNavKey(e){let t=this.nav()?.nativeElement;if(!t||e.altKey||e.ctrlKey||e.metaKey)return;let n=[...t.querySelectorAll(`button`)],r=n.indexOf(document.activeElement);if(r<0)return;let i=n.length-1,a={ArrowRight:r===i?0:r+1,ArrowLeft:r===0?i:r-1,Home:0,End:i},o=Object.hasOwn(a,e.key)?a[e.key]:-1;o<0||(e.preventDefault(),n[o].focus())}fullPanelLink=X(()=>{let e=this.view();if(!e||location.protocol===`chrome-extension:`)return null;let t=this.comingSoon()?`dashboard`:X9[e]??this.tab();return{tab:t,href:Pme(location.href,t)}});tab=Q(()=>{let e=this.view();return e&&(X9[e]??Q9[e]?.[0])||`dashboard`});rpc=E(null);openedDock=E(null);connected=E(!1);connectionFailed=E(!1);pairing=E(null);connectedNote=E(``);hiddenPages=E([]);pageId=fT();backgroundNote=X(()=>{let e=this.hiddenPages();return this.pageId?e.includes(this.pageId)?`Page in background, showing the last data.`:``:e.length?e.length===1?`A page is in the background, showing its last data.`:`${e.length} pages are in the background, showing their last data.`:``});stopVisibility=()=>{};stopNative=()=>{};stopCapacitor=()=>{};stopPlugins=()=>{};stopFollowing=()=>{};stopHighlights=()=>{};nav=av(`nav`);main=av(`main`);injector=S(gs);themeService=S(Ome);navObserver;navFade=E({start:!1,end:!1});constructor(){S(xj).use(this.rpc),ed(()=>{let e=this.nav()?.nativeElement;e&&typeof ResizeObserver<`u`&&(this.navObserver=new ResizeObserver(()=>this.measureNav()),this.navObserver.observe(e))}),fv(()=>{this.tab(),this.tabs(),Z(()=>{this.revealActiveTab(),this.measureNav()})}),ac(()=>{this.connected()&&Z(()=>this.postToPopup({type:`pangular:popup-pill`,pill:this.pill()}))}),ac(()=>{let e=this.openedDock(),t=this.rpc();e&&t&&Z(()=>void vT(t,`hub-dock-seen`,ZC(e.dock)))}),ac(()=>{let e=this.themeService.current();Z(()=>{try{window.parent!==window&&V5(window.parent.document,e)}catch{}})})}measureNav(){let e=this.nav()?.nativeElement;if(!e)return;let t=e.scrollWidth-e.clientWidth,n=e.scrollLeft>1,r=t>1&&e.scrollLeft<t-1,i=this.navFade();(i.start!==n||i.end!==r)&&this.navFade.set({start:n,end:r})}revealActiveTab(){let e=this.nav()?.nativeElement,t=e?.querySelector(`button.active`);if(!e||!t||e.scrollWidth<=e.clientWidth)return;let n=t.offsetLeft-24,r=t.offsetLeft+t.offsetWidth+24-e.clientWidth;e.scrollLeft>n?e.scrollLeft=Math.max(0,n):e.scrollLeft<r&&(e.scrollLeft=r)}ngOnInit(){this.stopFollowing=e7($_e,e=>{this.openedDock.set({dock:e}),e===Y9?this.showFullPanel():this.showView(e)});let e=i7(location.hash,a7(this.tabScope()),[...this.availableTabs().map(e=>e.id),`settings`]);e?(this.tab.set(e),this.restoreLinkItem()):!this.view()&&i7(location.hash,a7(this.tabScope()),[`capacitor`])===`capacitor`?this.restoreCapacitor=!0:!this.view()&&i7(location.hash,a7(this.tabScope()),[`analog`])===`analog`&&(this.restoreAnalog=!0),this.stopHighlights=bT(()=>this.rpc()),this.connect()}connecting=!1;pendingClient=null;retries=0;retryTimer;connect(){if(this.connecting||this.pendingClient||this.rpc()||this.pairing())return;this.connecting=!0,clearTimeout(this.retryTimer);let e=zme();this.dropped&&xT();let t=Wme(e);JC({...e?{baseURL:e}:{},...t.token?{authToken:t.token}:{},cacheOptions:gT(),simpleAuth:!1}).then(e=>{if(this.connecting=!1,this.destroyed){e.close?.();return}this.pendingClient=e;let n=n=>{if(e===this.pendingClient||e===this.rpc()||e===this.pairing()){if(this.pendingClient===e&&n!==`connecting`&&(this.pendingClient=null),n===`connected`){let n=this.pairing()===e;this.pairing.set(null),setTimeout(()=>t.remember(e.connection?.authToken)),this.ready(e),this.connected.set(this.rpc()===e),n&&(this.connectedNote.update(e=>e===`Connected.`?`Connected.\xA0`:`Connected.`),this.focusCurrentTab())}else n===`unauthorized`?(this.connected.set(!1),this.rpc()===e&&this.rpc.set(null),this.pairing.set(e)):(n===`disconnected`||n===`error`)&&(this.connected.set(!1),this.rpc()===e&&this.rpc.set(null),this.pairing()===e&&this.pairing.set(null),e.close?.(),this.retryLater())}};e.events.on(`connection:status`,n),e.status!==`connecting`&&n(e.status)},()=>{this.connecting=!1,!this.destroyed&&(this.analogKnown.set(!0),this.nativeKnown.set(!0),this.retryLater())})}ready(e){this.rpc()===e||this.destroyed||(this.retries=0,this.connectionFailed.set(!1),this.refocusOnConnect&&this.focusCurrentTab(),this.refocusOnConnect=!1,this.rpc.set(e),this.listenForServer(e),this.watchVisibility(e),this.watchAngularNative(e),this.watchCapacitor(e),this.watchPlugins(e),e.scope(`pangular`).rpc.call(`analog-project`).then(e=>{let t=!!e?.analog;this.analog.set(t),this.analogKnown.set(!0),t&&this.restoreAnalog&&BT(`analog`,this.config())&&this.tab.set(`analog`),this.restoreAnalog=!1,!t&&this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)},()=>{this.analogKnown.set(!0),this.restoreAnalog=!1,this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)}))}dropped=!1;retryLater(){if(this.destroyed)return;this.dropped=!0,this.connectionFailed.set(!0);let e=$9[Math.min(this.retries++,$9.length-1)];clearTimeout(this.retryTimer),this.retryTimer=setTimeout(()=>this.connect(),e)}retryConnection(){this.retries=0,this.refocusOnConnect=!0,this.connect()}refocusOnConnect=!1;destroyed=!1;ngOnDestroy(){this.destroyed=!0,clearTimeout(this.retryTimer),this.stopNative(),this.stopCapacitor(),this.stopPlugins(),this.stopFollowing(),this.stopVisibility(),this.stopHighlights(),this.navObserver?.disconnect()}showView(e){if(e===this.view())return;dT(e===`angular-native`?this.nativePageId():null),this.view.set(e);let t=new URL(location.href);t.searchParams.set(`view`,e),t.hash=``,history.replaceState(history.state,``,t)}showFullPanel(e){if(!this.view())return;dT(null),this.view.set(null);let t=new URL(location.href);t.searchParams.delete(`view`),t.hash=e?`tab=${e}`:``,history.replaceState(history.state,``,t);let n=e??a7(this.tabScope()),r=this.availableTabs().map(e=>e.id),i=i7(t.hash,n,r);i?this.setTab(i):n===`capacitor`&&(this.restoreCapacitor=!0)}openFullPanel(e,t){Fme(e)&&t7()&&(e.preventDefault(),this.showFullPanel(t),this.focusCurrentTab(),n7(Y9))}paletteOpen=E(!1);paletteShortcut=Y5()?`⌘K`:`Ctrl+K`;themePreference=X(()=>this.themeService.preference());passive=E(vme());pill=E(bme());popupHotkey=X(()=>{let e=this.config().popup.hotkey;return e!==!1&&uw(e,Y5())});popup=Tme();poppedOut=!!X5();tabBeforeSettings=null;componentCommand=Q({source:this.tab,computation:()=>null});paletteCommands=X(()=>{let e=new Set(this.availableTabs().map(e=>e.id)),t=e.has(`components`)&&!!this.rpc();return yw(this.config()).filter(n=>n.id.startsWith(`tab:`)?e.has(n.id.slice(4)):n.id===`popout:return`?this.poppedOut:n.popupOnly?this.popup:n.id===`pick-component`||n.id.startsWith(`cd-`)?t:!0)});onGlobalKey(e){if(e.defaultPrevented)return;let t=Y5(),n=this.config().popup.hotkey;if(this.popup&&n&&!e.repeat&&lw(e,n,t)){e.preventDefault(),this.postToPopup({type:`pangular:popup-close`});return}!(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)||e.altKey||e.shiftKey||e.key.toLowerCase()!==`k`||e.repeat||(e.preventDefault(),!this.paletteOpen()&&this.openPalette())}openPalette(){t7()&&Nme()||this.paletteOpen.set(!0)}runCommand(e){if(e.startsWith(`tab:`)){let t=e.slice(4);this.availableTabs().some(e=>e.id===t)&&this.switchTab(t);return}if(e.startsWith(`theme:`)){let t=e.slice(6);(t===`system`||t===`light`||t===`dark`)&&this.setTheme(t);return}if(e===`dock:reset-size`){this.postToPopup({type:`pangular:popup-dock-size`});return}if(e.startsWith(`dock:`)){this.postToPopup({type:`pangular:popup-dock`,mode:e.slice(5)});return}if(e===`popout`){this.postToPopup({type:`pangular:popup-popout`});return}if(e===`popout:return`){Dme();return}let t={"pick-component":`pick`,"cd-record-start":`cd-start`,"cd-record-stop":`cd-stop`,"cd-clear":`cd-clear`};e===`settings`?this.tab()!==`settings`&&this.toggleSettings():t[e]&&this.availableTabs().some(e=>e.id===`components`)&&(this.tab()!==`components`&&this.switchTab(`components`),this.componentCommand.set({kind:t[e]}))}toggleSettings(){if(this.tab()===`settings`){let e=this.tabBeforeSettings,t=this.availableTabs().map(e=>e.id);this.switchTab(e&&t.includes(e)?e:t[0]??`dashboard`);return}this.tabBeforeSettings=this.tab(),this.switchTab(`settings`)}setTabLayout(e){this.tabLayout.set(e),_me(e)}setTheme(e){this.themeService.setPreference(e)}setPassive(e){this.passive.set(e),yme(e),this.postToPopup({type:`pangular:popup-passive`,passive:e})}setPill(e){this.pill.set(e),xme(e),this.postToPopup({type:`pangular:popup-pill`,pill:e})}postToPopup(e){for(let{win:t,origin:n}of Q5())try{t.postMessage(e,n)}catch{}}openLink(e){let t=e.tab;if(!this.availableTabs().some(e=>e.id===t))return!1;if(this.tab()!==t&&this.switchTab(t),e.id&&Object.hasOwn(mw,t)){let n=e.page;t===`components`?this.componentFocus.set({id:e.id,pageId:n}):t===`injectors`?this.injectorFocus.set({componentId:e.id,pageId:n}):t===`signals`?this.signalFocus.set({componentId:e.id,pageId:n}):t===`forms`&&this.formFocus.set({id:e.id})}return history.replaceState(history.state,``,gw(e)),!0}followHash(){let e=_w(location.hash);if(e){if(e.tab===`settings`){this.tab()!==`settings`&&this.toggleSettings();return}this.openLink(e)}}listenForServer(e){let t=e.scope(`pangular`).rpc,n=()=>typeof document>`u`||document.visibilityState!==`hidden`;try{t.register({name:`panel-command`,type:`event`,jsonSerializable:!0,handler:e=>{let t=e?.command;typeof t==`string`&&n()&&this.runCommand(t)}}),t.register({name:`open-in-panel`,type:`event`,jsonSerializable:!0,handler:e=>{let t=e;n()&&typeof t?.tab==`string`&&this.openLink({tab:t.tab,...typeof t.id==`string`?{id:t.id}:{},...typeof t.page==`string`?{page:t.page}:{}})}})}catch{}}restoreLinkItem(){let e=_w(location.hash);if(!e?.id||e.tab!==this.tab())return;let t=e.tab;t===`components`?this.componentFocus.set({id:e.id,pageId:e.page}):t===`injectors`?this.injectorFocus.set({componentId:e.id,pageId:e.page}):t===`signals`?this.signalFocus.set({componentId:e.id,pageId:e.page}):t===`forms`&&this.formFocus.set({id:e.id})}formFocus=E(null);componentFocus=Q({source:this.tab,computation:()=>null});pipeFocus=Q({source:this.tab,computation:()=>null});showPipe(e){this.config().inspectors.pipes&&(this.switchTab(`pipes`),this.pipeFocus.set(e))}showForm(e){this.formFocus.set({id:e}),this.switchTab(`forms`)}injectorFocus=Q({source:this.tab,computation:()=>null});signalFocus=Q({source:this.tab,computation:()=>null});showSignals(e){if(!this.config().inspectors.signals)return;let t=e.pageId?{page:e.pageId}:{};this.openLink({tab:`signals`,id:e.componentId,...t})&&this.signalFocus.set(e)}showInjector(e){this.config().inspectors.injectors&&(this.switchTab(`injectors`),this.injectorFocus.set(e))}showComponent(e){this.config().inspectors.components&&(this.switchTab(`components`),this.componentFocus.set(e))}inspectFromPanel({source:e,origin:t,data:n}){if(e!==window.parent||t!==location.origin)return;let r=n;r?.type===`pangular:inspect-component`&&typeof r.id==`string`&&this.tab()===`components`&&this.config().inspectors.components&&this.componentFocus.set({id:r.id})}switchTab(e){let t=Z9[e];if(this.view()===`angular`&&t){this.activateDock(t,e);return}this.setTab(e),history.replaceState(history.state,``,`#tab=${e}`)}restoreAnalog=!1;restoreCapacitor=!1;setTab(e){this.restoreAnalog=!1,this.restoreCapacitor=!1,this.keepFocus(),this.tab.set(e),Ime(this.tabScope(),e)}tabScope(){return this.view()??`panel`}async watchAngularNative(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`component-tree`),n=e=>{let t=e?.pages,n=vD(t,this.nativePageId());this.view()===`angular-native`&&dT(n),this.nativePageId.set(n),this.nativeKnown.set(!0)};n(t.value()),this.stopNative(),this.stopNative=t.on(`updated`,n)}catch{this.nativeKnown.set(!0)}}async watchPlugins(e){let t=!this.view()&&i7(location.hash,a7(this.tabScope()),[`plugins`])===`plugins`;try{let n=await e.scope(`pangular`).rpc.sharedState(`plugins`),r=e=>{if(e===void 0)return;let n=wfe(e);this.pluginsReporting.set(n),n&&t&&BT(`plugins`,this.config())&&this.tab.set(`plugins`),n&&(t=!1),!n&&this.tab()===`plugins`&&!this.view()&&this.tab.set(`dashboard`)};r(n.value()),this.stopPlugins(),this.stopPlugins=n.on(`updated`,r)}catch{this.pluginsReporting.set(!1)}}async watchCapacitor(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`capacitor`),n=e=>{if(e===void 0)return;let t=Q8(e).length>0;this.capacitorReporting.set(t),this.capacitorKnown.set(!0),t&&this.restoreCapacitor&&BT(`capacitor`,this.config())&&(this.restoreCapacitor=!1,this.tab.set(`capacitor`)),!t&&this.tab()===`capacitor`&&!this.view()&&this.tab.set(`dashboard`)};n(t.value()),this.stopCapacitor(),this.stopCapacitor=t.on(`updated`,n)}catch{this.capacitorReporting.set(!1),this.capacitorKnown.set(!0)}}async watchVisibility(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`page-visibility`),n=e=>{let t=e?.hidden;this.hiddenPages.set(Array.isArray(t)?t.filter(e=>typeof e==`string`):[])};n(t.value()),this.stopVisibility(),this.stopVisibility=t.on(`updated`,n)}catch{}}keepFocus(){let e=document.activeElement,t=this.main()?.nativeElement;(!e||e===document.body||t?.contains(e))&&this.focusCurrentTab()}focusCurrentTab(){ed(()=>{let e=document.activeElement;e&&e!==document.body||(this.nav()?.nativeElement.querySelector(`button.active`)??this.main()?.nativeElement)?.focus()},{injector:this.injector})}async activateDock(e,t){if(await n7(e))return;if(window.parent===window){this.keepFocus(),this.showView(e);return}let n=this.rpc();if(!n?.call){this.setTab(t);return}try{await n.call(`hub:docks:activate`,{dockId:ZC(e)}),this.keepFocus(),this.showView(e)}catch{this.setTab(t)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-root`]],viewQuery:function(e,t){e&1&&Dg(t.nav,m_e,5)(t.main,h_e,5),e&2&&Og(2)},hostVars:4,hostBindings:function(e,t){e&1&&H(`message`,function(e){return t.inspectFromPanel(e)},bu)(`hashchange`,function(){return t.followHash()},bu)(`keydown`,function(e){return t.onGlobalKey(e)},xu),e&2&&Xg(`--%NS%accent`,t.viewAccent()?.accent??null)(`--%NS%accent-text`,t.viewAccent()?.text??null)},decls:41,vars:30,consts:[[`nav`,``],[`main`,``],[1,`brand`],[1,`mark`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 256 256`,`aria-hidden`,`true`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 32 32`,`aria-hidden`,`true`],[`width`,`24`,`height`,`17`,`viewBox`,`0 0 256 182`,`aria-hidden`,`true`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 24 24`,`fill`,`currentColor`,`aria-hidden`,`true`],[`width`,`20`,`height`,`22`,`viewBox`,`0 0 223 236`,`aria-hidden`,`true`],[`width`,`30`,`height`,`30`,`viewBox`,`0 0 500 500`,`aria-hidden`,`true`],[1,`title`],[`aria-label`,`Inspectors`,3,`scroll`,`keydown`],[`role`,`toolbar`,`aria-label`,`Inspectors`,`aria-orientation`,`horizontal`,1,`tab-bar`],[1,`full-panel`,3,`href`],[1,`shell-actions`],[`type`,`button`,`aria-haspopup`,`dialog`,1,`shell-btn`,3,`click`],[`width`,`16`,`height`,`16`,`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z`],[`type`,`button`,`aria-label`,`Settings`,`title`,`Settings`,1,`shell-btn`,3,`click`],[`name`,`settings`],[`role`,`status`,1,`status`],[`aria-hidden`,`true`,1,`dot`],[`tabindex`,`0`],[`role`,`status`,1,`background-note`],[`role`,`status`,1,`sr-only`],[3,`tabs`,`layout`,`theme`,`passive`,`pill`,`hotkey`,`paletteShortcut`,`rpc`],[3,`client`],[`role`,`alert`,1,`connection-error`],[`role`,`status`,1,`turned-off`],[3,`info`],[1,`turned-off`],[3,`openChange`,`picked`,`commands`,`open`],[`fill`,`#3c5afd`,`d`,`M237.248 18.752q18.061 18.06 18.748 45.247V192c-.457 18.12-6.707 33.207-18.748 45.247c-12.04 12.04-27.127 18.291-45.251 18.752H63.999q-27.187-.69-45.247-18.752C6.712 225.208.46 210.121 0 192.001V64q.69-27.187 18.752-45.247Q36.812.692 63.999 0h127.998c18.124.46 33.211 6.711 45.251 18.752m-17.655 103q-6.033-6.003-6.28-15.066V64q-.192-9.063-6.221-15.091c-4.02-4.023-9.054-6.093-15.095-6.22h-21.312v106.626L85.315 42.687H63.999c-6.042.128-11.072 2.198-15.091 6.221c-4.023 4.02-6.093 9.05-6.22 15.09v42.688q-.249 9.063-6.281 15.066q-6.03 5.996-15.091 6.246q9.062.255 15.09 6.25c4.024 4.002 6.115 9.024 6.281 15.066V192c.128 6.037 2.198 11.072 6.221 15.091q6.03 6.03 15.09 6.22h21.317V106.687l85.37 106.627h21.312c6.041-.128 11.076-2.202 15.095-6.221s6.093-9.054 6.22-15.09v-42.688q.249-9.063 6.281-15.066q6.03-5.995 15.091-6.25q-9.062-.25-15.09-6.246`],[`fill`,`#53b9ff`,`d`,`M39.863 54.115L.311 93.716l60.995 61.179L0 216.385l39.428 39.619l61.43-61.507l61.097 61.068l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m140.517 154.896l-39.658 39.601l61.097 61.069l39.552-39.602z`],[`fill-opacity`,`.2`,`d`,`m140.517 154.896l-39.658 39.601l15.267 15.182z`],[`fill`,`#53b9ff`,`d`,`M194.57 100.985L256 39.478L216.431 0l-61.412 61.384L93.917.311L54.365 39.913L216.01 201.761l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m115.36 100.987l39.659-39.602L93.917.313L54.365 39.914z`],[`fill-opacity`,`.2`,`d`,`m115.359 100.985l39.659-39.601l-15.271-15.186z`],[`id`,`an-mark-grad`,`x1`,`0`,`y1`,`0`,`x2`,`1`,`y2`,`1`],[`offset`,`0`,`stop-color`,`#f0224f`],[`offset`,`1`,`stop-color`,`#c4002d`],[`d`,`M16 0C27.2 0 32 4.8 32 16S27.2 32 16 32 0 27.2 0 16 4.8 0 16 0Z`,`fill`,`url(#an-mark-grad)`],[`transform`,`translate(6.4 6.4) scale(0.8)`,`fill`,`#fff`],[`d`,`M14.8486 0L23.138 16.8551L23.9996 3.99892L14.8486 0Z`],[`d`,`M16.9875 17.7114H7.01272L5.73926 20.627L12.0001 24L18.261 20.627L16.9875 17.7114Z`],[`d`,`M8.72168 13.9298H15.2812L11.9997 6.39575L8.72168 13.9298Z`],[`d`,`M9.15103 0L0 3.99892L0.861556 16.8551L9.15103 0Z`],[`fill`,`#c30f2e`,`d`,`M152.228.001L48.455 181.046H256L152.228 0z`],[`fill`,`#dd0330`,`d`,`M88.314 26.967L0 181.52h176.628L88.315 26.967z`],[`fill`,`#fff`,`d`,`M18.167 135.294h220.236v-2.419H18.167z`],[`fill`,`#fff`,`d`,`M204.38 170.667c-.861 0-1.67-.358-2.348-1.034c-4.045-4.063-4.221-20.586-4.026-45.33c.11-13.521.257-32.043-1.9-33.504c-2.104.873-2.315 16.172-2.451 26.301c-.162 11.785-.327 23.98-2.242 30.189c-.57 1.84-1.306 3.525-2.786 3.39c-2.086-.185-2.76-3.48-4.317-16.478c-.647-5.4-1.317-10.98-2.101-13.14a11 11 0 0 0-.269-.66c-.835 1.889-1.8 7.079-2.47 10.682c-.927 4.976-1.803 9.676-2.9 11.726c-.847 1.575-2.19 3.63-4.067 3.231c-2.558-.537-3.323-5.693-3.552-8.719c0-25.455-3.33-28.417-3.997-28.753l-.107.081l-.162-.036c-2.377 1.038-2.506 9.294-2.627 17.276c-.096 5.856-.198 12.492-1.053 18.701c-1.108 8.05-2.448 9.603-4.115 9.507c-3.838-.262-3.95-13.482-3.95-14.987c0-.472.012-1.028.027-1.642c.074-3.076.205-8.8-1.687-10.604c-.25-.239-.603-.515-.879-.437c-1.347.339-2.745 4.714-3.209 6.153c-.147.457-.265.833-.364 1.09c-.078.214-.177.515-.294.88c-1.02 3.095-2.18 6.183-4.16 6.944c-.732.284-1.498.222-2.216-.183c-.953-.541-1.73-1.646-2.455-3.482c-.397-1.016-.735-2.046-1.082-3.081c-.419-1.263-.85-2.569-1.384-3.808c-.419-.965-1.464-1.4-2.796-1.164c-2.768.494-3.232 3.29-3.622 7.5c-.07.733-.137 1.452-.228 2.128c-.011.198-.501 6.38-.814 8.344c-.865 5.39-2.002 7.512-3.89 7.358c-4.66-.398-6.798-20.836-6.684-29.47c.088-6.592-1.104-9-1.818-9.382c-.074-.034-.189-.096-.46.095c-.843.571-1.594 2.348-1.363 4.215c2.566 20.32.674 43.592-3.96 48.833c-1.46 1.649-3.448 1.627-4.832.236c-4.049-4.064-4.218-20.586-4.026-45.33c.11-13.521.254-32.043-1.9-33.504c-2.105.873-2.311 16.172-2.45 26.301c-.163 11.785-.329 23.98-2.246 30.189c-.57 1.84-1.307 3.525-2.782 3.39c-2.091-.186-2.761-3.48-4.321-16.478c-.649-5.4-1.319-10.98-2.101-13.14c-.1-.273-.189-.49-.27-.66c-.832 1.889-1.796 7.079-2.466 10.682c-.927 4.976-1.803 9.676-2.904 11.726c-.846 1.575-2.19 3.63-4.063 3.231c-2.558-.537-3.324-5.693-3.552-8.719c-.003-25.455-3.33-28.417-3.997-28.753l-.106.081l-.166-.036c-2.374 1.038-2.503 9.293-2.629 17.276c-.091 5.856-.194 12.492-1.048 18.701c-1.107 8.05-2.437 9.618-4.111 9.507c-3.846-.262-3.958-13.482-3.958-14.987c0-.472.016-1.028.03-1.642c.074-3.076.207-8.8-1.685-10.604c-.25-.239-.603-.515-.88-.438c-1.347.34-2.75 4.715-3.206 6.155a47 47 0 0 1-.364 1.09q-.16.432-.298.875c-1.02 3.096-2.18 6.187-4.155 6.95c-.736.282-1.506.22-2.22-.185c-.953-.541-1.734-1.646-2.454-3.482c-.398-1.016-.74-2.046-1.083-3.081c-.42-1.263-.854-2.569-1.387-3.808c-.416-.965-1.465-1.4-2.797-1.164c-3.188.567-3.943 4.52-4.55 9.238l-.106.839l-2.411-.32l.114-.824c.527-4.137 1.328-10.39 6.53-11.31c2.446-.435 4.585.581 5.446 2.583c.578 1.34 1.031 2.695 1.466 4.008c.324.99.654 1.98 1.037 2.959c.674 1.708 1.197 2.15 1.392 2.257c1.218-.38 2.462-4.167 2.873-5.414c.13-.402.24-.732.328-.968c.085-.233.195-.571.328-.98c1.097-3.43 2.474-7.144 4.918-7.762c.747-.191 1.903-.166 3.157 1.035c2.665 2.544 2.525 8.48 2.433 12.41c-.014.59-.028 1.126-.028 1.583c0 6.272.93 10.655 1.64 12.16c.367-.77.998-2.63 1.598-7.007c.831-6.066.938-12.624 1.027-18.41c.161-10.24.275-17.663 3.982-19.408c.552-.339 1.469-.522 2.436-.033c3.586 1.803 5.326 11.885 5.326 30.817c.225 2.926 1.013 6.006 1.66 6.448c.004-.066.53-.39 1.394-2.01c.925-1.718 1.845-6.665 2.655-11.026c1.792-9.614 2.606-12.989 4.726-13.166c1.615-.158 2.362 1.896 2.676 2.76c.883 2.422 1.537 7.888 2.23 13.678c.54 4.49 1.31 10.902 2.094 13.497c.084-.228.18-.5.283-.836c1.815-5.878 1.98-17.887 2.14-29.507c.22-16.14.503-26.139 3.448-28.226a2.44 2.44 0 0 1 2.233-.316c3.448 1.144 3.714 11.254 3.519 35.8c-.14 17.799-.313 39.952 3.323 43.603c.317.32.542.32.622.32c.17 0 .413-.161.67-.452c3.681-4.162 6.01-26.022 3.372-46.927c-.328-2.602.677-5.337 2.392-6.514c.946-.652 2.036-.736 2.978-.232c2.145 1.14 3.187 5.024 3.102 11.546c-.15 11.387 2.584 24.714 4.37 26.842c.282-.471.842-1.763 1.379-5.145c.301-1.87.799-8.153.806-8.216c.09-.71.155-1.398.217-2.097c.369-3.924.82-8.804 5.613-9.654c2.444-.435 4.583.577 5.448 2.583c.577 1.34 1.027 2.695 1.46 4.008c.332.99.664 1.98 1.046 2.959c.67 1.708 1.197 2.15 1.387 2.257c1.218-.38 2.467-4.167 2.875-5.41c.132-.402.243-.737.328-.973c.088-.228.195-.57.324-.979c1.1-3.43 2.477-7.144 4.924-7.762c.74-.191 1.9-.166 3.154 1.035c2.665 2.543 2.526 8.48 2.437 12.41q-.029.792-.033 1.583c0 6.272.931 10.655 1.641 12.16c.365-.77.994-2.63 1.601-7.007c.832-6.066.931-12.624 1.027-18.41c.159-10.24.273-17.663 3.98-19.408c.55-.339 1.467-.522 2.44-.033c3.58 1.803 5.325 11.884 5.325 30.817c.224 2.926 1.012 6.006 1.656 6.448c.008-.066.526-.39 1.399-2.01c.923-1.718 1.84-6.665 2.653-11.026c1.786-9.614 2.602-12.989 4.722-13.166c1.62-.158 2.367 1.896 2.68 2.76c.88 2.422 1.535 7.888 2.233 13.678c.534 4.49 1.304 10.902 2.092 13.497c.08-.228.176-.5.28-.836c1.813-5.878 1.976-17.887 2.138-29.507c.216-16.14.504-26.139 3.448-28.226a2.45 2.45 0 0 1 2.234-.316c3.452 1.144 3.718 11.254 3.52 35.8c-.141 17.799-.314 39.952 3.319 43.603c.324.32.544.32.63.32c.165 0 .408-.161.662-.452c3.687-4.162 6.014-26.022 3.375-46.927c-.342-2.723.43-5.47 1.84-6.526c.71-.537 1.575-.647 2.37-.313c2.054.877 3.445 4.63 4.255 11.484c.339 2.87.641 5.974.931 9.036c.641 6.683 1.509 15.69 2.684 17.67c.36-.46 1.096-1.704 2.19-5.038l2.307.753c-1.696 5.157-3.026 7.1-4.755 6.902c-2.69-.299-3.468-5.734-4.84-20.055c-.29-3.048-.59-6.132-.928-8.989c-1.03-8.74-2.782-9.532-2.801-9.54c-.342.174-1.137 1.992-.842 4.31c2.558 20.32.673 43.597-3.964 48.834c-.747.842-1.587 1.27-2.485 1.27`],[`d`,`M12.024.017V0L12 .008L11.976 0v.017L.812 3.892l1.605 14.875l9.559 5.207V24l.024-.013l.024.013v-.026l9.559-5.207l1.605-14.875zm6.868 14.244q-1.64 3.948-6.031 4.166c-2.829 0-4.661-1.7-4.66-1.7q-1.745-1.359-2.398-3.417c-.695-.76-.702-.841-.774-1.145c-.072-.303.045-.388.249-.685q.204-.298.098-.85q-.26-.36-.3-1.128q0-.37.496-.783q.495-.413.607-.632q.083-.119.065-1.031q-.006-.897.995-.975c1-.08 1.565-.832 1.879-1.174c.21-.228.52-.339.91-.341c.551-.026 1.052.185 1.484.62c1.075-.055 2.176.235 3.292.863q2.379 1.414 2.596 3.055q-.257 2.158-5.788-.113q-2.895.819-2.846 3.552q0 2.508 2.422 3.643c-.787-.772-1.122-1.422-1.01-1.959q2.456 2.906 5.588 2.173c-.92.032-1.65-.264-2.198-.893q2.116-.05 3.998-1.972c-.724.576-1.482.794-2.284.657q3.26-2.563 2.307-5.98l-.002-.006a3.02 3.02 0 0 1 .788 2.03q.023 1.175-.795 2.477q.613-.478 1.413-2.047c.23 2.117-.625 3.724-2.574 4.825q.934-.085 2.473-1.23m-5.567-6.63a.319.319 0 1 1 .638 0a.319.319 0 0 1-.638 0`],[`id`,`ng-grad`,`x1`,`49`,`x2`,`226`,`y1`,`214`,`y2`,`130`,`gradientUnits`,`userSpaceOnUse`],[`stop-color`,`#E40035`],[`offset`,`.24`,`stop-color`,`#F60A48`],[`offset`,`.352`,`stop-color`,`#F20755`],[`offset`,`.494`,`stop-color`,`#DC087D`],[`offset`,`.745`,`stop-color`,`#9717E7`],[`offset`,`1`,`stop-color`,`#6C00F5`],[`fill`,`url(#ng-grad)`,`d`,`m222.077 39.192-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z`],[`width`,`500`,`height`,`500`,`rx`,`112`,`fill`,`#1c1a17`],[`transform`,`translate(250 252) scale(1.38) translate(-120 -129)`],[`id`,`pi-mark-mask`],[`x`,`-60`,`y`,`-60`,`width`,`360`,`height`,`380`,`fill`,`#fff`],[`fill`,`none`,`stroke`,`#000`,`stroke-width`,`30`,`stroke-linejoin`,`miter`],[`d`,`M88 66 V196`],[`d`,`M88 66 H143 L170 98 L143 130 H88 Z`],[`id`,`pi-mark-clip`],[`x`,`-40`,`y`,`129`,`width`,`320`,`height`,`200`],[`transform`,`rotate(-10 120 129)`],[`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#78350f`,`stroke-width`,`10`],[`mask`,`url(#pi-mark-mask)`],[`fill`,`#fbbf24`,`d`,`M120 5 L2 46 L22 198 L120 253 Z`],[`fill`,`#f59e0b`,`d`,`M120 5 L238 46 L218 198 L120 253 Z`],[`clip-path`,`url(#pi-mark-clip)`,`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#1c1a17`,`stroke-width`,`22`],[`clip-path`,`url(#pi-mark-clip)`,`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#fde68a`,`stroke-width`,`10`],[`transform`,`translate(230.9 146.0) rotate(10) scale(1.5) translate(-4 -4)`],[`x1`,`9`,`y1`,`9`,`x2`,`21`,`y2`,`21`,`stroke`,`#1c1a17`,`stroke-width`,`14`,`stroke-linecap`,`round`],[`r`,`16`,`fill`,`#1c1a17`],[`x1`,`9`,`y1`,`9`,`x2`,`21`,`y2`,`21`,`stroke`,`#fde68a`,`stroke-width`,`7`,`stroke-linecap`,`round`],[`r`,`12`,`fill`,`#1c1a17`,`stroke`,`#fde68a`,`stroke-width`,`5`],[`type`,`button`,3,`active`],[`type`,`button`,3,`click`],[3,`name`],[1,`full-panel`,3,`click`,`href`],[`width`,`14`,`height`,`14`,`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`3`,`y`,`14`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`14`,`y`,`14`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[3,`layoutChange`,`themeChange`,`passiveChange`,`pillChange`,`tabs`,`layout`,`theme`,`passive`,`pill`,`hotkey`,`paletteShortcut`,`rpc`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`sr-only`],[3,`rpc`],[3,`rpc`,`canShowComponent`],[3,`rpc`,`focus`,`command`,`canShowInjector`,`canShowSignals`,`canShowPipes`],[3,`rpc`,`focus`],[3,`rpc`,`focus`,`canShowComponent`],[3,`rpc`,`canShowComponent`,`canExplainInjection`],[3,`navigate`,`rpc`],[3,`open`,`rpc`],[3,`showComponent`,`rpc`,`canShowComponent`],[3,`focusHandled`,`commandHandled`,`showForm`,`showInjector`,`showSignals`,`showPipe`,`rpc`,`focus`,`command`,`canShowInjector`,`canShowSignals`,`canShowPipes`],[3,`showComponent`,`rpc`],[3,`focusHandled`,`showComponent`,`rpc`,`focus`,`canShowComponent`],[3,`focusHandled`,`rpc`,`focus`],[3,`showComponent`,`rpc`,`canShowComponent`,`canExplainInjection`]],template:function(e,t){if(e&1){let e=B();F(0,`header`)(1,`h1`,2)(2,`span`,3),A(3,v_e,2,0,`:svg:svg`,4)(4,y_e,7,0,`:svg:svg`,4)(5,b_e,11,0,`:svg:svg`,5)(6,x_e,5,0,`:svg:svg`,6)(7,S_e,2,0,`:svg:svg`,7)(8,C_e,10,0,`:svg:svg`,8)(9,w_e,24,0,`:svg:svg`,9),I(),F(10,`span`,10),K(11),I()(),F(12,`nav`,11,0),H(`scroll`,function(){return t.measureNav()})(`keydown`,function(e){return t.onNavKey(e)}),A(14,E_e,3,0,`div`,12),I(),A(15,J9,7,1,`a`,13),F(16,`span`,14)(17,`button`,15),H(`click`,function(){return t.openPalette()}),T(),F(18,`svg`,16),L(19,`path`,17),I()(),cs(),F(20,`button`,18),H(`click`,function(){return t.toggleSettings()}),L(21,`app-tab-icon`,19),I()(),F(22,`span`,20)(23,`span`,21),L(24,`span`),I(),K(25),I()(),F(26,`main`,22,1)(28,`p`,23),K(29),I(),F(30,`p`,24),K(31),I(),A(32,D_e,1,8,`app-settings`,25)(33,O_e,1,1,`app-auth-code`,26)(34,k_e,5,0,`div`,27)(35,A_e,2,0,`p`,28)(36,j_e,1,1,`app-coming-soon`,29)(37,M_e,2,0,`p`,28)(38,P_e,10,2,`p`,30)(39,Q_e,2,2),I(),F(40,`app-command-palette`,31),S_(`openChange`,function(n){return C(e),x_(t.paletteOpen,n)||(t.paletteOpen=n),w(n)}),H(`picked`,function(e){return t.runCommand(e)}),I()}if(e&2){let e,n;D(2),G(`ng-mark`,t.view()===`angular`)(`pi-mark`,!t.view()),D(),j(t.view()===`nativescript`?3:t.view()===`capacitor`?4:t.view()===`angular-native`?5:t.view()===`analog`?6:t.view()===`ngrx`?7:t.view()===`angular`?8:9),D(7),G(`ng-text`,t.view()===`angular`),D(),q(t.title()),D(),G(`fade-start`,t.navFade().start)(`fade-end`,t.navFade().end),D(2),j(t.availableTabs().length>1?14:-1),D(),j((e=t.fullPanelLink())?15:-1,e),D(2),k(`aria-label`,`Command palette (`+t.paletteShortcut+`)`)(`title`,`Command palette (`+t.paletteShortcut+`)`),D(3),G(`active`,t.tab()===`settings`),k(`aria-pressed`,t.tab()===`settings`),D(2),G(`connected`,t.connected())(`failed`,t.connectionFailed()),D(3),J(` `,t.connected()?`Live`:t.connectionFailed()?`Disconnected`:t.pairing()?`Code needed`:`Connecting…`,` `),D(),k(`aria-label`,t.mainLabel()),D(3),q(t.backgroundNote()),D(2),q(t.connectedNote()),D(),j(t.tab()===`settings`?32:(n=t.pairing())?33:t.connectionFailed()?34:t.rpc()?(n=t.comingSoon())?36:t.view()===`angular-native`&&!t.nativePageId()?37:t.tabEnabled(t.tab(),t.config())?39:38:35,n),D(8),P(`commands`,t.paletteCommands()),b_(`open`,t.paletteOpen)}},dependencies:[RE,xI,tV,MU,pK,yX,pZ,v1,K0,Uie,Zse,Dle,mde,Dfe,_pe,fme,ice,iE,i_e,p_e,Fge],styles:[`[_nghost-%COMP%] { +}`]})},x_e=[`nav`],S_e=[`main`],C_e=e=>[e],w_e=(e,t)=>t.id;function T_e(e,t){e&1&&(T(),F(0,`svg`,4),L(1,`path`,32),I())}function E_e(e,t){e&1&&(T(),F(0,`svg`,4),L(1,`path`,33)(2,`path`,34)(3,`path`,35)(4,`path`,36)(5,`path`,37)(6,`path`,38),I())}function D_e(e,t){e&1&&(T(),F(0,`svg`,5)(1,`defs`)(2,`linearGradient`,39),L(3,`stop`,40)(4,`stop`,41),I()(),L(5,`path`,42),F(6,`g`,43),L(7,`path`,44)(8,`path`,45)(9,`path`,46)(10,`path`,47),I()())}function O_e(e,t){e&1&&(T(),F(0,`svg`,6),L(1,`path`,48)(2,`path`,49)(3,`path`,50)(4,`path`,51),I())}function k_e(e,t){e&1&&(T(),F(0,`svg`,7),L(1,`path`,52),I())}function A_e(e,t){e&1&&(T(),F(0,`svg`,8)(1,`defs`)(2,`linearGradient`,53),L(3,`stop`,54)(4,`stop`,55)(5,`stop`,56)(6,`stop`,57)(7,`stop`,58)(8,`stop`,59),I()(),L(9,`path`,60),I())}function j_e(e,t){e&1&&(T(),F(0,`svg`,9),L(1,`rect`,61),F(2,`g`,62)(3,`defs`)(4,`mask`,63),L(5,`rect`,64),F(6,`g`,65),L(7,`path`,66)(8,`path`,67),I()(),F(9,`clipPath`,68),L(10,`rect`,69),I()(),F(11,`g`,70),L(12,`ellipse`,71),I(),F(13,`g`,72),L(14,`path`,73)(15,`path`,74),I(),F(16,`g`,70),L(17,`ellipse`,75)(18,`ellipse`,76),F(19,`g`,77),L(20,`line`,78)(21,`circle`,79)(22,`line`,80)(23,`circle`,81),I()()()())}function M_e(e,t){if(e&1){let e=B();F(0,`button`,83),H(`click`,function(){let t=C(e).$implicit;return w(W(2).switchTab(t.id))}),L(1,`app-tab-icon`,84),F(2,`span`),K(3),I()()}if(e&2){let e=t.$implicit,n=W(2);G(`active`,n.tab()===e.id),k(`aria-current`,n.tab()===e.id?`page`:null)(`tabindex`,n.rovingTab()===e.id?0:-1),D(),P(`name`,e.id),D(2),q(e.label)}}function N_e(e,t){if(e&1&&(F(0,`div`,12),M(1,M_e,4,6,`button`,82,w_e),I()),e&2){let e=W();D(),N(e.tabs())}}function J9(e,t){if(e&1){let e=B();F(0,`a`,85),H(`click`,function(t){let n=C(e);return w(W().openFullPanel(t,n.tab))}),T(),F(1,`svg`,86),L(2,`rect`,87)(3,`rect`,88)(4,`rect`,89)(5,`rect`,90),I(),K(6,` Open full panel `),I()}e&2&&P(`href`,t.href,bu)}function P_e(e,t){if(e&1){let e=B();F(0,`app-settings`,91),H(`layoutChange`,function(t){return C(e),w(W().setTabLayout(t))})(`themeChange`,function(t){return C(e),w(W().setTheme(t))})(`passiveChange`,function(t){return C(e),w(W().setPassive(t))})(`pillChange`,function(t){return C(e),w(W().setPill(t))}),I()}if(e&2){let e=W();P(`tabs`,e.settingsTabs())(`layout`,e.tabLayout())(`theme`,e.themePreference())(`passive`,e.passive())(`pill`,e.pill())(`hotkey`,e.popupHotkey())(`paletteShortcut`,e.paletteShortcut)(`rpc`,e.rpc())}}function F_e(e,t){e&1&&L(0,`app-auth-code`,26),e&2&&P(`client`,t)}function I_e(e,t){if(e&1){let e=B();F(0,`div`,27)(1,`p`),K(2,` Can't reach the devtools server. Check that the dev server is running. The panel keeps trying to connect. `),I(),F(3,`button`,83),H(`click`,function(){return C(e),w(W().retryConnection())}),K(4,`Retry now`),I()()}}function L_e(e,t){e&1&&(F(0,`p`,28),K(1,`Connecting to the devtools server…`),I())}function R_e(e,t){e&1&&L(0,`app-coming-soon`,29),e&2&&P(`info`,t)}function z_e(e,t){e&1&&(F(0,`p`,28),K(1,`Looking for an Angular Native app…`),I())}function B_e(e,t){e&1&&(K(0,` To turn it on, set `),F(1,`code`),K(2),I(),K(3,` in the devtools options. `)),e&2&&(D(2),q(t))}function V_e(e,t){if(e&1&&(F(0,`p`,30),K(1,` This inspector is turned off in the devtools config (`),F(2,`code`),K(3,`inspectors`),I(),K(4,`). `),A(5,B_e,4,1),F(6,`a`,92),K(7,`About inspectors`),F(8,`span`,93),K(9,` (opens in a new tab)`),I()()()),e&2){let e,t=W();D(5),j((e=t.turnOnSnippet())?5:-1,e),D(),P(`href`,t.inspectorsDocsUrl,bu)}}function H_e(e,t){if(e&1){let e=B();F(0,`app-dashboard`,100),H(`navigate`,function(t){return C(e),w(W(3).switchTab(t))}),I()}e&2&&P(`rpc`,W(3).rpc())}function U_e(e,t){if(e&1){let e=B();F(0,`app-timeline`,101),H(`open`,function(t){return C(e),w(W(3).openLink(t))}),I()}e&2&&P(`rpc`,W(3).rpc())}function W_e(e,t){if(e&1){let e=B();F(0,`app-audit-inspector`,102),H(`showComponent`,function(t){return C(e),w(W(3).showComponent(t))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`canShowComponent`,e.config().inspectors.components)}}function G_e(e,t){if(e&1){let e=B();F(0,`app-component-tree`,103),H(`focusHandled`,function(){return C(e),w(W(3).componentFocus.set(null))})(`commandHandled`,function(){return C(e),w(W(3).componentCommand.set(null))})(`showForm`,function(t){return C(e),w(W(3).showForm(t))})(`showInjector`,function(t){return C(e),w(W(3).showInjector(t))})(`showSignals`,function(t){return C(e),w(W(3).showSignals(t))})(`showPipe`,function(t){return C(e),w(W(3).showPipe(t))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`focus`,e.componentFocus())(`command`,e.componentCommand())(`canShowInjector`,e.config().inspectors.injectors)(`canShowSignals`,e.config().inspectors.signals)(`canShowPipes`,e.config().inspectors.pipes)}}function K_e(e,t){if(e&1){let e=B();F(0,`app-route-inspector`,104),H(`showComponent`,function(t){return C(e),w(W(3).showComponent(t))}),I()}e&2&&P(`rpc`,W(3).rpc())}function q_e(e,t){if(e&1&&L(0,`app-signal-inspector`,97),e&2){let e=W(3);P(`rpc`,e.rpc())(`focus`,e.signalFocus())}}function J_e(e,t){if(e&1){let e=B();F(0,`app-di-inspector`,105),H(`focusHandled`,function(){return C(e),w(W(3).injectorFocus.set(null))})(`showComponent`,function(t){return C(e),w(W(3).showComponent(t))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`focus`,e.injectorFocus())(`canShowComponent`,e.config().inspectors.components)}}function Y_e(e,t){e&1&&L(0,`app-store-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function X_e(e,t){e&1&&L(0,`app-query-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function Z_e(e,t){e&1&&L(0,`app-network-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function Q_e(e,t){if(e&1){let e=B();F(0,`app-forms-inspector`,106),H(`focusHandled`,function(){return C(e),w(W(3).formFocus.set(null))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`focus`,e.formFocus())}}function $_e(e,t){if(e&1){let e=B();F(0,`app-pipes-inspector`,106),H(`focusHandled`,function(){return C(e),w(W(3).pipeFocus.set(null))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`focus`,e.pipeFocus())}}function eve(e,t){e&1&&L(0,`app-analog-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function tve(e,t){e&1&&L(0,`app-capacitor-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function nve(e,t){e&1&&L(0,`app-plugins-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function rve(e,t){if(e&1){let e=B();F(0,`app-errors-inspector`,107),H(`showComponent`,function(t){return C(e),w(W(3).showComponent(t))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`canShowComponent`,e.config().inspectors.components)(`canExplainInjection`,e.config().inspectors.injectors)}}function ive(e,t){if(e&1&&A(0,H_e,1,1,`app-dashboard`,94)(1,U_e,1,1,`app-timeline`,94)(2,W_e,1,2,`app-audit-inspector`,95)(3,G_e,1,6,`app-component-tree`,96)(4,K_e,1,1,`app-route-inspector`,94)(5,q_e,1,2,`app-signal-inspector`,97)(6,J_e,1,3,`app-di-inspector`,98)(7,Y_e,1,1,`app-store-inspector`,94)(8,X_e,1,1,`app-query-inspector`,94)(9,Z_e,1,1,`app-network-inspector`,94)(10,Q_e,1,2,`app-forms-inspector`,97)(11,$_e,1,2,`app-pipes-inspector`,97)(12,eve,1,1,`app-analog-inspector`,94)(13,tve,1,1,`app-capacitor-inspector`,94)(14,nve,1,1,`app-plugins-inspector`,94)(15,rve,1,3,`app-errors-inspector`,99),e&2){let e;j((e=W(2).tab())===`dashboard`?0:e===`timeline`?1:e===`audit`?2:e===`components`?3:e===`routes`?4:e===`signals`?5:e===`injectors`?6:e===`store`?7:e===`queries`?8:e===`network`?9:e===`forms`?10:e===`pipes`?11:e===`analog`?12:e===`capacitor`?13:e===`plugins`?14:e===`errors`?15:-1)}}function ave(e,t){e&1&&M(0,ive,16,1,null,null,Xh),e&2&&N(R_(0,C_e,W().scopeKey()))}var Y9=`all`,ove=[Y9,...XC],sve={angular:`Angular`,ngrx:`NgRx Store`,analog:`Analog`,"angular-native":`Angular Native`,nativescript:`NativeScript`,capacitor:`Capacitor`},X9={ngrx:`store`,analog:`analog`,capacitor:`capacitor`},Z9={store:`ngrx`,analog:`analog`,capacitor:`capacitor`},Q9={"angular-native":[`components`,`signals`,`injectors`,`store`,`queries`,`pipes`,`errors`]},cve={id:`nativescript`,name:`NativeScript`,badge:`Available`,heading:`Inspect NativeScript apps`,summary:`A NativeScript Angular app reports from the simulator or device to this server, and its components, signals, injectors and NgRx stores show up in the Angular dock.`,color:`#3c5afd`,plansTitle:`Set up an app`,plans:[`Install @pangular-inspector/devtools and @valor/nativescript-websockets`,`Call initNativeScriptOverlay() in main.ts, before the app bootstraps`,`Run npx pangular dev --no-auth in the app, then open the Angular dock`],link:{label:`NativeScript setup guide`,href:`https://pangular-inspector.dev/guides/nativescript/`}},lve={id:`capacitor`,name:`Capacitor`,badge:`Available`,heading:`Inspect Capacitor apps`,summary:`An Ionic or Capacitor app runs the browser overlay in its WebView and reports to this server, so it shows up in the Angular dock like a browser tab.`,color:`#119eff`,plansTitle:`Set up an app`,plans:[`With live reload on localhost, load @pangular-inspector/devtools/overlay as in a browser`,`In a bundled build, call initOverlay() from @pangular-inspector/devtools/overlay-manual with this server’s address and connectionMeta`,`Run the app, then come back here for its plugin calls, or open the Angular dock`],link:{label:`Capacitor setup guide`,href:`https://pangular-inspector.dev/guides/capacitor/`}},uve={id:`analog`,name:`Analog`,badge:`Not in this app`,heading:`This app doesn’t use Analog`,summary:`In an Analog app this dock shows your file routes, server load() and API calls, render modes and route lint.`,color:`#dd0330`,plans:[`Which page, layout and .server.ts files render a URL`,`Every load(), server function and API call with timing`,`SSR, prerendered or client only, per page`],link:{label:`Get started with Analog`,href:`https://analogjs.org/docs/getting-started`}},dve={id:`angular-native`,name:`Angular Native`,badge:`Not connected`,heading:`No Angular Native app is connected`,summary:`Start the overlay in your Angular Native app and run this server with --no-auth. The tabs fill as soon as the app reports.`,color:`#e11d48`,plans:[`The component tree, with the view outlined on the device`,`Signals and injectors of the running app`,`Live @ngrx/signals and @ngrx/store state`],link:{label:`Set up Angular Native`,href:`https://pangular-inspector.dev/guides/angular-native/`}},$9=[1e3,2e3,5e3,1e4];function fve(){let e=new URLSearchParams(location.search).get(`view`);return XC.find(t=>t===e)??null}Ere(class e{analog=E(!1);allTabs=dw.map(({id:e,label:t})=>({id:e,label:t}));view=E(fve());viewAccent=X(()=>Wge(this.view(),this.themeService.current()));title=X(()=>{let e=this.view();return e?sve[e]:`Pangular Inspector`});mainLabel=X(()=>this.tab()===`settings`?`Settings`:this.availableTabs().find(e=>e.id===this.tab())?.label??this.title());analogKnown=E(!1);capacitorReporting=E(!1);pluginsReporting=E(!1);capacitorKnown=E(!1);nativePageId=E(null);nativeKnown=E(!1);scopeKey=X(()=>this.view()===`angular-native`?this.nativePageId()??``:``);comingSoon=X(()=>{let e=this.view();if(e===`analog`)return this.analogKnown()&&!this.analog()?uve:void 0;if(e===`nativescript`)return cve;if(e===`capacitor`)return this.config().inspectors.capacitor&&this.capacitorKnown()&&!this.capacitorReporting()?lve:void 0;if(e===`angular-native`)return this.nativeKnown()&&!this.nativePageId()?dve:void 0});config=X(()=>NT(this.rpc()));tabEnabled=BT;inspectorsDocsUrl=zT;turnOnSnippet=X(()=>{let e=RT(this.tab());return e?`inspectors: {${e}: true}`:null});availableTabs=X(()=>{if(this.comingSoon())return[];let e=this.view(),t=e?X9[e]:void 0,n=this.allTabs.filter(e=>BT(e.id,this.config()));if(t)return n.filter(e=>e.id===t);let r=e?Q9[e]:void 0;return r?n.filter(e=>r.includes(e.id)):n.filter(t=>(t.id!==`analog`||this.analog())&&(t.id!==`capacitor`||this.capacitorReporting())&&(t.id!==`plugins`||this.pluginsReporting())&&!(e===`angular`&&Z9[t.id]))});tabLayout=E(Cme());tabs=X(()=>{let e=this.tab(),t=kme(this.availableTabs(),this.tabLayout(),e);return this.rpc()?t:t.filter(t=>t.id===`dashboard`||t.id===e)});settingsTabs=X(()=>this.availableTabs());rovingTab=X(()=>{let e=this.tabs(),t=this.tab();return e.some(e=>e.id===t)?t:e[0]?.id});onNavKey(e){let t=this.nav()?.nativeElement;if(!t||e.altKey||e.ctrlKey||e.metaKey)return;let n=[...t.querySelectorAll(`button`)],r=n.indexOf(document.activeElement);if(r<0)return;let i=n.length-1,a={ArrowRight:r===i?0:r+1,ArrowLeft:r===0?i:r-1,Home:0,End:i},o=Object.hasOwn(a,e.key)?a[e.key]:-1;o<0||(e.preventDefault(),n[o].focus())}fullPanelLink=X(()=>{let e=this.view();if(!e||location.protocol===`chrome-extension:`)return null;let t=this.comingSoon()?`dashboard`:X9[e]??this.tab();return{tab:t,href:Vme(location.href,t)}});tab=Q(()=>{let e=this.view();return e&&(X9[e]??Q9[e]?.[0])||`dashboard`});rpc=E(null);openedDock=E(null);connected=E(!1);connectionFailed=E(!1);pairing=E(null);connectedNote=E(``);hiddenPages=E([]);pageId=fT();backgroundNote=X(()=>{let e=this.hiddenPages();return this.pageId?e.includes(this.pageId)?`Page in background, showing the last data.`:``:e.length?e.length===1?`A page is in the background, showing its last data.`:`${e.length} pages are in the background, showing their last data.`:``});stopVisibility=()=>{};stopNative=()=>{};stopCapacitor=()=>{};stopPlugins=()=>{};stopFollowing=()=>{};stopHighlights=()=>{};nav=sv(`nav`);main=sv(`main`);injector=S(gs);themeService=S(Fme);navObserver;navFade=E({start:!1,end:!1});constructor(){S(xj).use(this.rpc),td(()=>{let e=this.nav()?.nativeElement;e&&typeof ResizeObserver<`u`&&(this.navObserver=new ResizeObserver(()=>this.measureNav()),this.navObserver.observe(e))}),mv(()=>{this.tab(),this.tabs(),Z(()=>{this.revealActiveTab(),this.measureNav()})}),ac(()=>{this.connected()&&Z(()=>this.postToPopup({type:`pangular:popup-pill`,pill:this.pill()}))}),ac(()=>{let e=this.openedDock(),t=this.rpc();e&&t&&Z(()=>void vT(t,`hub-dock-seen`,ZC(e.dock)))}),ac(()=>{let e=this.themeService.current();Z(()=>{try{window.parent!==window&&V5(window.parent.document,e)}catch{}})})}measureNav(){let e=this.nav()?.nativeElement;if(!e)return;let t=e.scrollWidth-e.clientWidth,n=e.scrollLeft>1,r=t>1&&e.scrollLeft<t-1,i=this.navFade();(i.start!==n||i.end!==r)&&this.navFade.set({start:n,end:r})}revealActiveTab(){let e=this.nav()?.nativeElement,t=e?.querySelector(`button.active`);if(!e||!t||e.scrollWidth<=e.clientWidth)return;let n=t.offsetLeft-24,r=t.offsetLeft+t.offsetWidth+24-e.clientWidth;e.scrollLeft>n?e.scrollLeft=Math.max(0,n):e.scrollLeft<r&&(e.scrollLeft=r)}ngOnInit(){this.stopFollowing=e7(ove,e=>{this.openedDock.set({dock:e}),e===Y9?this.showFullPanel():this.showView(e)});let e=i7(location.hash,a7(this.tabScope()),[...this.availableTabs().map(e=>e.id),`settings`]);e?(this.tab.set(e),this.restoreLinkItem()):!this.view()&&i7(location.hash,a7(this.tabScope()),[`capacitor`])===`capacitor`?this.restoreCapacitor=!0:!this.view()&&i7(location.hash,a7(this.tabScope()),[`analog`])===`analog`&&(this.restoreAnalog=!0),this.stopHighlights=bT(()=>this.rpc()),this.connect()}connecting=!1;pendingClient=null;retries=0;retryTimer;connect(){if(this.connecting||this.pendingClient||this.rpc()||this.pairing())return;this.connecting=!0,clearTimeout(this.retryTimer);let e=Kme();this.dropped&&xT();let t=Zme(e);JC({...e?{baseURL:e}:{},...t.token?{authToken:t.token}:{},cacheOptions:gT(),simpleAuth:!1}).then(e=>{if(this.connecting=!1,this.destroyed){e.close?.();return}this.pendingClient=e;let n=n=>{if(e===this.pendingClient||e===this.rpc()||e===this.pairing()){if(this.pendingClient===e&&n!==`connecting`&&(this.pendingClient=null),n===`connected`){let n=this.pairing()===e;this.pairing.set(null),setTimeout(()=>t.remember(e.connection?.authToken)),this.ready(e),this.connected.set(this.rpc()===e),n&&(this.connectedNote.update(e=>e===`Connected.`?`Connected.\xA0`:`Connected.`),this.focusCurrentTab())}else n===`unauthorized`?(this.connected.set(!1),this.rpc()===e&&this.rpc.set(null),this.pairing.set(e)):(n===`disconnected`||n===`error`)&&(this.connected.set(!1),this.rpc()===e&&this.rpc.set(null),this.pairing()===e&&this.pairing.set(null),e.close?.(),this.retryLater())}};e.events.on(`connection:status`,n),e.status!==`connecting`&&n(e.status)},()=>{this.connecting=!1,!this.destroyed&&(this.analogKnown.set(!0),this.nativeKnown.set(!0),this.retryLater())})}ready(e){this.rpc()===e||this.destroyed||(this.retries=0,this.connectionFailed.set(!1),this.refocusOnConnect&&this.focusCurrentTab(),this.refocusOnConnect=!1,this.rpc.set(e),this.listenForServer(e),this.watchVisibility(e),this.watchAngularNative(e),this.watchCapacitor(e),this.watchPlugins(e),e.scope(`pangular`).rpc.call(`analog-project`).then(e=>{let t=!!e?.analog;this.analog.set(t),this.analogKnown.set(!0),t&&this.restoreAnalog&&BT(`analog`,this.config())&&this.tab.set(`analog`),this.restoreAnalog=!1,!t&&this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)},()=>{this.analogKnown.set(!0),this.restoreAnalog=!1,this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)}))}dropped=!1;retryLater(){if(this.destroyed)return;this.dropped=!0,this.connectionFailed.set(!0);let e=$9[Math.min(this.retries++,$9.length-1)];clearTimeout(this.retryTimer),this.retryTimer=setTimeout(()=>this.connect(),e)}retryConnection(){this.retries=0,this.refocusOnConnect=!0,this.connect()}refocusOnConnect=!1;destroyed=!1;ngOnDestroy(){this.destroyed=!0,clearTimeout(this.retryTimer),this.stopNative(),this.stopCapacitor(),this.stopPlugins(),this.stopFollowing(),this.stopVisibility(),this.stopHighlights(),this.navObserver?.disconnect()}showView(e){if(e===this.view())return;dT(e===`angular-native`?this.nativePageId():null),this.view.set(e);let t=new URL(location.href);t.searchParams.set(`view`,e),t.hash=``,history.replaceState(history.state,``,t)}showFullPanel(e){if(!this.view())return;dT(null),this.view.set(null);let t=new URL(location.href);t.searchParams.delete(`view`),t.hash=e?`tab=${e}`:``,history.replaceState(history.state,``,t);let n=e??a7(this.tabScope()),r=this.availableTabs().map(e=>e.id),i=i7(t.hash,n,r);i?this.setTab(i):n===`capacitor`&&(this.restoreCapacitor=!0)}openFullPanel(e,t){Hme(e)&&t7()&&(e.preventDefault(),this.showFullPanel(t),this.focusCurrentTab(),n7(Y9))}paletteOpen=E(!1);paletteShortcut=Y5()?`⌘K`:`Ctrl+K`;themePreference=X(()=>this.themeService.preference());passive=E(Tme());pill=E(Dme());popupHotkey=X(()=>{let e=this.config().popup.hotkey;return e!==!1&&uw(e,Y5())});popup=Mme();poppedOut=!!X5();tabBeforeSettings=null;componentCommand=Q({source:this.tab,computation:()=>null});paletteCommands=X(()=>{let e=new Set(this.availableTabs().map(e=>e.id)),t=e.has(`components`)&&!!this.rpc();return yw(this.config()).filter(n=>n.id.startsWith(`tab:`)?e.has(n.id.slice(4)):n.id===`popout:return`?this.poppedOut:n.popupOnly?this.popup:n.id===`pick-component`||n.id.startsWith(`cd-`)?t:!0)});onGlobalKey(e){if(e.defaultPrevented)return;let t=Y5(),n=this.config().popup.hotkey;if(this.popup&&n&&!e.repeat&&lw(e,n,t)){e.preventDefault(),this.postToPopup({type:`pangular:popup-close`});return}!(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)||e.altKey||e.shiftKey||e.key.toLowerCase()!==`k`||e.repeat||(e.preventDefault(),!this.paletteOpen()&&this.openPalette())}openPalette(){t7()&&Bme()||this.paletteOpen.set(!0)}runCommand(e){if(e.startsWith(`tab:`)){let t=e.slice(4);this.availableTabs().some(e=>e.id===t)&&this.switchTab(t);return}if(e.startsWith(`theme:`)){let t=e.slice(6);(t===`system`||t===`light`||t===`dark`)&&this.setTheme(t);return}if(e===`dock:reset-size`){this.postToPopup({type:`pangular:popup-dock-size`});return}if(e.startsWith(`dock:`)){this.postToPopup({type:`pangular:popup-dock`,mode:e.slice(5)});return}if(e===`popout`){this.postToPopup({type:`pangular:popup-popout`});return}if(e===`popout:return`){Pme();return}let t={"pick-component":`pick`,"cd-record-start":`cd-start`,"cd-record-stop":`cd-stop`,"cd-clear":`cd-clear`};e===`settings`?this.tab()!==`settings`&&this.toggleSettings():t[e]&&this.availableTabs().some(e=>e.id===`components`)&&(this.tab()!==`components`&&this.switchTab(`components`),this.componentCommand.set({kind:t[e]}))}toggleSettings(){if(this.tab()===`settings`){let e=this.tabBeforeSettings,t=this.availableTabs().map(e=>e.id);this.switchTab(e&&t.includes(e)?e:t[0]??`dashboard`);return}this.tabBeforeSettings=this.tab(),this.switchTab(`settings`)}setTabLayout(e){this.tabLayout.set(e),wme(e)}setTheme(e){this.themeService.setPreference(e)}setPassive(e){this.passive.set(e),Eme(e),this.postToPopup({type:`pangular:popup-passive`,passive:e})}setPill(e){this.pill.set(e),Ome(e),this.postToPopup({type:`pangular:popup-pill`,pill:e})}postToPopup(e){for(let{win:t,origin:n}of Q5())try{t.postMessage(e,n)}catch{}}openLink(e){let t=e.tab;if(!this.availableTabs().some(e=>e.id===t))return!1;if(this.tab()!==t&&this.switchTab(t),e.id&&Object.hasOwn(mw,t)){let n=e.page;t===`components`?this.componentFocus.set({id:e.id,pageId:n}):t===`injectors`?this.injectorFocus.set({componentId:e.id,pageId:n}):t===`signals`?this.signalFocus.set({componentId:e.id,pageId:n}):t===`forms`&&this.formFocus.set({id:e.id})}return history.replaceState(history.state,``,gw(e)),!0}followHash(){let e=_w(location.hash);if(e){if(e.tab===`settings`){this.tab()!==`settings`&&this.toggleSettings();return}this.openLink(e)}}listenForServer(e){let t=e.scope(`pangular`).rpc,n=()=>typeof document>`u`||document.visibilityState!==`hidden`;try{t.register({name:`panel-command`,type:`event`,jsonSerializable:!0,handler:e=>{let t=e?.command;typeof t==`string`&&n()&&this.runCommand(t)}}),t.register({name:`open-in-panel`,type:`event`,jsonSerializable:!0,handler:e=>{let t=e;n()&&typeof t?.tab==`string`&&this.openLink({tab:t.tab,...typeof t.id==`string`?{id:t.id}:{},...typeof t.page==`string`?{page:t.page}:{}})}})}catch{}}restoreLinkItem(){let e=_w(location.hash);if(!e?.id||e.tab!==this.tab())return;let t=e.tab;t===`components`?this.componentFocus.set({id:e.id,pageId:e.page}):t===`injectors`?this.injectorFocus.set({componentId:e.id,pageId:e.page}):t===`signals`?this.signalFocus.set({componentId:e.id,pageId:e.page}):t===`forms`&&this.formFocus.set({id:e.id})}formFocus=E(null);componentFocus=Q({source:this.tab,computation:()=>null});pipeFocus=Q({source:this.tab,computation:()=>null});showPipe(e){this.config().inspectors.pipes&&(this.switchTab(`pipes`),this.pipeFocus.set(e))}showForm(e){this.formFocus.set({id:e}),this.switchTab(`forms`)}injectorFocus=Q({source:this.tab,computation:()=>null});signalFocus=Q({source:this.tab,computation:()=>null});showSignals(e){if(!this.config().inspectors.signals)return;let t=e.pageId?{page:e.pageId}:{};this.openLink({tab:`signals`,id:e.componentId,...t})&&this.signalFocus.set(e)}showInjector(e){this.config().inspectors.injectors&&(this.switchTab(`injectors`),this.injectorFocus.set(e))}showComponent(e){this.config().inspectors.components&&(this.switchTab(`components`),this.componentFocus.set(e))}inspectFromPanel({source:e,origin:t,data:n}){if(e!==window.parent||t!==location.origin)return;let r=n;r?.type===`pangular:inspect-component`&&typeof r.id==`string`&&this.tab()===`components`&&this.config().inspectors.components&&this.componentFocus.set({id:r.id})}switchTab(e){let t=Z9[e];if(this.view()===`angular`&&t){this.activateDock(t,e);return}this.setTab(e),history.replaceState(history.state,``,`#tab=${e}`)}restoreAnalog=!1;restoreCapacitor=!1;setTab(e){this.restoreAnalog=!1,this.restoreCapacitor=!1,this.keepFocus(),this.tab.set(e),Ume(this.tabScope(),e)}tabScope(){return this.view()??`panel`}async watchAngularNative(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`component-tree`),n=e=>{let t=e?.pages,n=vD(t,this.nativePageId());this.view()===`angular-native`&&dT(n),this.nativePageId.set(n),this.nativeKnown.set(!0)};n(t.value()),this.stopNative(),this.stopNative=t.on(`updated`,n)}catch{this.nativeKnown.set(!0)}}async watchPlugins(e){let t=!this.view()&&i7(location.hash,a7(this.tabScope()),[`plugins`])===`plugins`;try{let n=await e.scope(`pangular`).rpc.sharedState(`plugins`),r=e=>{if(e===void 0)return;let n=jfe(e);this.pluginsReporting.set(n),n&&t&&BT(`plugins`,this.config())&&this.tab.set(`plugins`),n&&(t=!1),!n&&this.tab()===`plugins`&&!this.view()&&this.tab.set(`dashboard`)};r(n.value()),this.stopPlugins(),this.stopPlugins=n.on(`updated`,r)}catch{this.pluginsReporting.set(!1)}}async watchCapacitor(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`capacitor`),n=e=>{if(e===void 0)return;let t=Q8(e).length>0;this.capacitorReporting.set(t),this.capacitorKnown.set(!0),t&&this.restoreCapacitor&&BT(`capacitor`,this.config())&&(this.restoreCapacitor=!1,this.tab.set(`capacitor`)),!t&&this.tab()===`capacitor`&&!this.view()&&this.tab.set(`dashboard`)};n(t.value()),this.stopCapacitor(),this.stopCapacitor=t.on(`updated`,n)}catch{this.capacitorReporting.set(!1),this.capacitorKnown.set(!0)}}async watchVisibility(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`page-visibility`),n=e=>{let t=e?.hidden;this.hiddenPages.set(Array.isArray(t)?t.filter(e=>typeof e==`string`):[])};n(t.value()),this.stopVisibility(),this.stopVisibility=t.on(`updated`,n)}catch{}}keepFocus(){let e=document.activeElement,t=this.main()?.nativeElement;(!e||e===document.body||t?.contains(e))&&this.focusCurrentTab()}focusCurrentTab(){td(()=>{let e=document.activeElement;e&&e!==document.body||(this.nav()?.nativeElement.querySelector(`button.active`)??this.main()?.nativeElement)?.focus()},{injector:this.injector})}async activateDock(e,t){if(await n7(e))return;if(window.parent===window){this.keepFocus(),this.showView(e);return}let n=this.rpc();if(!n?.call){this.setTab(t);return}try{await n.call(`hub:docks:activate`,{dockId:ZC(e)}),this.keepFocus(),this.showView(e)}catch{this.setTab(t)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-root`]],viewQuery:function(e,t){e&1&&Og(t.nav,x_e,5)(t.main,S_e,5),e&2&&kg(2)},hostVars:4,hostBindings:function(e,t){e&1&&H(`message`,function(e){return t.inspectFromPanel(e)},xu)(`hashchange`,function(){return t.followHash()},xu)(`keydown`,function(e){return t.onGlobalKey(e)},Su),e&2&&Zg(`--%NS%accent`,t.viewAccent()?.accent??null)(`--%NS%accent-text`,t.viewAccent()?.text??null)},decls:41,vars:30,consts:[[`nav`,``],[`main`,``],[1,`brand`],[1,`mark`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 256 256`,`aria-hidden`,`true`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 32 32`,`aria-hidden`,`true`],[`width`,`24`,`height`,`17`,`viewBox`,`0 0 256 182`,`aria-hidden`,`true`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 24 24`,`fill`,`currentColor`,`aria-hidden`,`true`],[`width`,`20`,`height`,`22`,`viewBox`,`0 0 223 236`,`aria-hidden`,`true`],[`width`,`30`,`height`,`30`,`viewBox`,`0 0 500 500`,`aria-hidden`,`true`],[1,`title`],[`aria-label`,`Inspectors`,3,`scroll`,`keydown`],[`role`,`toolbar`,`aria-label`,`Inspectors`,`aria-orientation`,`horizontal`,1,`tab-bar`],[1,`full-panel`,3,`href`],[1,`shell-actions`],[`type`,`button`,`aria-haspopup`,`dialog`,1,`shell-btn`,3,`click`],[`width`,`16`,`height`,`16`,`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z`],[`type`,`button`,`aria-label`,`Settings`,`title`,`Settings`,1,`shell-btn`,3,`click`],[`name`,`settings`],[`role`,`status`,1,`status`],[`aria-hidden`,`true`,1,`dot`],[`tabindex`,`0`],[`role`,`status`,1,`background-note`],[`role`,`status`,1,`sr-only`],[3,`tabs`,`layout`,`theme`,`passive`,`pill`,`hotkey`,`paletteShortcut`,`rpc`],[3,`client`],[`role`,`alert`,1,`connection-error`],[`role`,`status`,1,`turned-off`],[3,`info`],[1,`turned-off`],[3,`openChange`,`picked`,`commands`,`open`],[`fill`,`#3c5afd`,`d`,`M237.248 18.752q18.061 18.06 18.748 45.247V192c-.457 18.12-6.707 33.207-18.748 45.247c-12.04 12.04-27.127 18.291-45.251 18.752H63.999q-27.187-.69-45.247-18.752C6.712 225.208.46 210.121 0 192.001V64q.69-27.187 18.752-45.247Q36.812.692 63.999 0h127.998c18.124.46 33.211 6.711 45.251 18.752m-17.655 103q-6.033-6.003-6.28-15.066V64q-.192-9.063-6.221-15.091c-4.02-4.023-9.054-6.093-15.095-6.22h-21.312v106.626L85.315 42.687H63.999c-6.042.128-11.072 2.198-15.091 6.221c-4.023 4.02-6.093 9.05-6.22 15.09v42.688q-.249 9.063-6.281 15.066q-6.03 5.996-15.091 6.246q9.062.255 15.09 6.25c4.024 4.002 6.115 9.024 6.281 15.066V192c.128 6.037 2.198 11.072 6.221 15.091q6.03 6.03 15.09 6.22h21.317V106.687l85.37 106.627h21.312c6.041-.128 11.076-2.202 15.095-6.221s6.093-9.054 6.22-15.09v-42.688q.249-9.063 6.281-15.066q6.03-5.995 15.091-6.25q-9.062-.25-15.09-6.246`],[`fill`,`#53b9ff`,`d`,`M39.863 54.115L.311 93.716l60.995 61.179L0 216.385l39.428 39.619l61.43-61.507l61.097 61.068l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m140.517 154.896l-39.658 39.601l61.097 61.069l39.552-39.602z`],[`fill-opacity`,`.2`,`d`,`m140.517 154.896l-39.658 39.601l15.267 15.182z`],[`fill`,`#53b9ff`,`d`,`M194.57 100.985L256 39.478L216.431 0l-61.412 61.384L93.917.311L54.365 39.913L216.01 201.761l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m115.36 100.987l39.659-39.602L93.917.313L54.365 39.914z`],[`fill-opacity`,`.2`,`d`,`m115.359 100.985l39.659-39.601l-15.271-15.186z`],[`id`,`an-mark-grad`,`x1`,`0`,`y1`,`0`,`x2`,`1`,`y2`,`1`],[`offset`,`0`,`stop-color`,`#f0224f`],[`offset`,`1`,`stop-color`,`#c4002d`],[`d`,`M16 0C27.2 0 32 4.8 32 16S27.2 32 16 32 0 27.2 0 16 4.8 0 16 0Z`,`fill`,`url(#an-mark-grad)`],[`transform`,`translate(6.4 6.4) scale(0.8)`,`fill`,`#fff`],[`d`,`M14.8486 0L23.138 16.8551L23.9996 3.99892L14.8486 0Z`],[`d`,`M16.9875 17.7114H7.01272L5.73926 20.627L12.0001 24L18.261 20.627L16.9875 17.7114Z`],[`d`,`M8.72168 13.9298H15.2812L11.9997 6.39575L8.72168 13.9298Z`],[`d`,`M9.15103 0L0 3.99892L0.861556 16.8551L9.15103 0Z`],[`fill`,`#c30f2e`,`d`,`M152.228.001L48.455 181.046H256L152.228 0z`],[`fill`,`#dd0330`,`d`,`M88.314 26.967L0 181.52h176.628L88.315 26.967z`],[`fill`,`#fff`,`d`,`M18.167 135.294h220.236v-2.419H18.167z`],[`fill`,`#fff`,`d`,`M204.38 170.667c-.861 0-1.67-.358-2.348-1.034c-4.045-4.063-4.221-20.586-4.026-45.33c.11-13.521.257-32.043-1.9-33.504c-2.104.873-2.315 16.172-2.451 26.301c-.162 11.785-.327 23.98-2.242 30.189c-.57 1.84-1.306 3.525-2.786 3.39c-2.086-.185-2.76-3.48-4.317-16.478c-.647-5.4-1.317-10.98-2.101-13.14a11 11 0 0 0-.269-.66c-.835 1.889-1.8 7.079-2.47 10.682c-.927 4.976-1.803 9.676-2.9 11.726c-.847 1.575-2.19 3.63-4.067 3.231c-2.558-.537-3.323-5.693-3.552-8.719c0-25.455-3.33-28.417-3.997-28.753l-.107.081l-.162-.036c-2.377 1.038-2.506 9.294-2.627 17.276c-.096 5.856-.198 12.492-1.053 18.701c-1.108 8.05-2.448 9.603-4.115 9.507c-3.838-.262-3.95-13.482-3.95-14.987c0-.472.012-1.028.027-1.642c.074-3.076.205-8.8-1.687-10.604c-.25-.239-.603-.515-.879-.437c-1.347.339-2.745 4.714-3.209 6.153c-.147.457-.265.833-.364 1.09c-.078.214-.177.515-.294.88c-1.02 3.095-2.18 6.183-4.16 6.944c-.732.284-1.498.222-2.216-.183c-.953-.541-1.73-1.646-2.455-3.482c-.397-1.016-.735-2.046-1.082-3.081c-.419-1.263-.85-2.569-1.384-3.808c-.419-.965-1.464-1.4-2.796-1.164c-2.768.494-3.232 3.29-3.622 7.5c-.07.733-.137 1.452-.228 2.128c-.011.198-.501 6.38-.814 8.344c-.865 5.39-2.002 7.512-3.89 7.358c-4.66-.398-6.798-20.836-6.684-29.47c.088-6.592-1.104-9-1.818-9.382c-.074-.034-.189-.096-.46.095c-.843.571-1.594 2.348-1.363 4.215c2.566 20.32.674 43.592-3.96 48.833c-1.46 1.649-3.448 1.627-4.832.236c-4.049-4.064-4.218-20.586-4.026-45.33c.11-13.521.254-32.043-1.9-33.504c-2.105.873-2.311 16.172-2.45 26.301c-.163 11.785-.329 23.98-2.246 30.189c-.57 1.84-1.307 3.525-2.782 3.39c-2.091-.186-2.761-3.48-4.321-16.478c-.649-5.4-1.319-10.98-2.101-13.14c-.1-.273-.189-.49-.27-.66c-.832 1.889-1.796 7.079-2.466 10.682c-.927 4.976-1.803 9.676-2.904 11.726c-.846 1.575-2.19 3.63-4.063 3.231c-2.558-.537-3.324-5.693-3.552-8.719c-.003-25.455-3.33-28.417-3.997-28.753l-.106.081l-.166-.036c-2.374 1.038-2.503 9.293-2.629 17.276c-.091 5.856-.194 12.492-1.048 18.701c-1.107 8.05-2.437 9.618-4.111 9.507c-3.846-.262-3.958-13.482-3.958-14.987c0-.472.016-1.028.03-1.642c.074-3.076.207-8.8-1.685-10.604c-.25-.239-.603-.515-.88-.438c-1.347.34-2.75 4.715-3.206 6.155a47 47 0 0 1-.364 1.09q-.16.432-.298.875c-1.02 3.096-2.18 6.187-4.155 6.95c-.736.282-1.506.22-2.22-.185c-.953-.541-1.734-1.646-2.454-3.482c-.398-1.016-.74-2.046-1.083-3.081c-.42-1.263-.854-2.569-1.387-3.808c-.416-.965-1.465-1.4-2.797-1.164c-3.188.567-3.943 4.52-4.55 9.238l-.106.839l-2.411-.32l.114-.824c.527-4.137 1.328-10.39 6.53-11.31c2.446-.435 4.585.581 5.446 2.583c.578 1.34 1.031 2.695 1.466 4.008c.324.99.654 1.98 1.037 2.959c.674 1.708 1.197 2.15 1.392 2.257c1.218-.38 2.462-4.167 2.873-5.414c.13-.402.24-.732.328-.968c.085-.233.195-.571.328-.98c1.097-3.43 2.474-7.144 4.918-7.762c.747-.191 1.903-.166 3.157 1.035c2.665 2.544 2.525 8.48 2.433 12.41c-.014.59-.028 1.126-.028 1.583c0 6.272.93 10.655 1.64 12.16c.367-.77.998-2.63 1.598-7.007c.831-6.066.938-12.624 1.027-18.41c.161-10.24.275-17.663 3.982-19.408c.552-.339 1.469-.522 2.436-.033c3.586 1.803 5.326 11.885 5.326 30.817c.225 2.926 1.013 6.006 1.66 6.448c.004-.066.53-.39 1.394-2.01c.925-1.718 1.845-6.665 2.655-11.026c1.792-9.614 2.606-12.989 4.726-13.166c1.615-.158 2.362 1.896 2.676 2.76c.883 2.422 1.537 7.888 2.23 13.678c.54 4.49 1.31 10.902 2.094 13.497c.084-.228.18-.5.283-.836c1.815-5.878 1.98-17.887 2.14-29.507c.22-16.14.503-26.139 3.448-28.226a2.44 2.44 0 0 1 2.233-.316c3.448 1.144 3.714 11.254 3.519 35.8c-.14 17.799-.313 39.952 3.323 43.603c.317.32.542.32.622.32c.17 0 .413-.161.67-.452c3.681-4.162 6.01-26.022 3.372-46.927c-.328-2.602.677-5.337 2.392-6.514c.946-.652 2.036-.736 2.978-.232c2.145 1.14 3.187 5.024 3.102 11.546c-.15 11.387 2.584 24.714 4.37 26.842c.282-.471.842-1.763 1.379-5.145c.301-1.87.799-8.153.806-8.216c.09-.71.155-1.398.217-2.097c.369-3.924.82-8.804 5.613-9.654c2.444-.435 4.583.577 5.448 2.583c.577 1.34 1.027 2.695 1.46 4.008c.332.99.664 1.98 1.046 2.959c.67 1.708 1.197 2.15 1.387 2.257c1.218-.38 2.467-4.167 2.875-5.41c.132-.402.243-.737.328-.973c.088-.228.195-.57.324-.979c1.1-3.43 2.477-7.144 4.924-7.762c.74-.191 1.9-.166 3.154 1.035c2.665 2.543 2.526 8.48 2.437 12.41q-.029.792-.033 1.583c0 6.272.931 10.655 1.641 12.16c.365-.77.994-2.63 1.601-7.007c.832-6.066.931-12.624 1.027-18.41c.159-10.24.273-17.663 3.98-19.408c.55-.339 1.467-.522 2.44-.033c3.58 1.803 5.325 11.884 5.325 30.817c.224 2.926 1.012 6.006 1.656 6.448c.008-.066.526-.39 1.399-2.01c.923-1.718 1.84-6.665 2.653-11.026c1.786-9.614 2.602-12.989 4.722-13.166c1.62-.158 2.367 1.896 2.68 2.76c.88 2.422 1.535 7.888 2.233 13.678c.534 4.49 1.304 10.902 2.092 13.497c.08-.228.176-.5.28-.836c1.813-5.878 1.976-17.887 2.138-29.507c.216-16.14.504-26.139 3.448-28.226a2.45 2.45 0 0 1 2.234-.316c3.452 1.144 3.718 11.254 3.52 35.8c-.141 17.799-.314 39.952 3.319 43.603c.324.32.544.32.63.32c.165 0 .408-.161.662-.452c3.687-4.162 6.014-26.022 3.375-46.927c-.342-2.723.43-5.47 1.84-6.526c.71-.537 1.575-.647 2.37-.313c2.054.877 3.445 4.63 4.255 11.484c.339 2.87.641 5.974.931 9.036c.641 6.683 1.509 15.69 2.684 17.67c.36-.46 1.096-1.704 2.19-5.038l2.307.753c-1.696 5.157-3.026 7.1-4.755 6.902c-2.69-.299-3.468-5.734-4.84-20.055c-.29-3.048-.59-6.132-.928-8.989c-1.03-8.74-2.782-9.532-2.801-9.54c-.342.174-1.137 1.992-.842 4.31c2.558 20.32.673 43.597-3.964 48.834c-.747.842-1.587 1.27-2.485 1.27`],[`d`,`M12.024.017V0L12 .008L11.976 0v.017L.812 3.892l1.605 14.875l9.559 5.207V24l.024-.013l.024.013v-.026l9.559-5.207l1.605-14.875zm6.868 14.244q-1.64 3.948-6.031 4.166c-2.829 0-4.661-1.7-4.66-1.7q-1.745-1.359-2.398-3.417c-.695-.76-.702-.841-.774-1.145c-.072-.303.045-.388.249-.685q.204-.298.098-.85q-.26-.36-.3-1.128q0-.37.496-.783q.495-.413.607-.632q.083-.119.065-1.031q-.006-.897.995-.975c1-.08 1.565-.832 1.879-1.174c.21-.228.52-.339.91-.341c.551-.026 1.052.185 1.484.62c1.075-.055 2.176.235 3.292.863q2.379 1.414 2.596 3.055q-.257 2.158-5.788-.113q-2.895.819-2.846 3.552q0 2.508 2.422 3.643c-.787-.772-1.122-1.422-1.01-1.959q2.456 2.906 5.588 2.173c-.92.032-1.65-.264-2.198-.893q2.116-.05 3.998-1.972c-.724.576-1.482.794-2.284.657q3.26-2.563 2.307-5.98l-.002-.006a3.02 3.02 0 0 1 .788 2.03q.023 1.175-.795 2.477q.613-.478 1.413-2.047c.23 2.117-.625 3.724-2.574 4.825q.934-.085 2.473-1.23m-5.567-6.63a.319.319 0 1 1 .638 0a.319.319 0 0 1-.638 0`],[`id`,`ng-grad`,`x1`,`49`,`x2`,`226`,`y1`,`214`,`y2`,`130`,`gradientUnits`,`userSpaceOnUse`],[`stop-color`,`#E40035`],[`offset`,`.24`,`stop-color`,`#F60A48`],[`offset`,`.352`,`stop-color`,`#F20755`],[`offset`,`.494`,`stop-color`,`#DC087D`],[`offset`,`.745`,`stop-color`,`#9717E7`],[`offset`,`1`,`stop-color`,`#6C00F5`],[`fill`,`url(#ng-grad)`,`d`,`m222.077 39.192-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z`],[`width`,`500`,`height`,`500`,`rx`,`112`,`fill`,`#1c1a17`],[`transform`,`translate(250 252) scale(1.38) translate(-120 -129)`],[`id`,`pi-mark-mask`],[`x`,`-60`,`y`,`-60`,`width`,`360`,`height`,`380`,`fill`,`#fff`],[`fill`,`none`,`stroke`,`#000`,`stroke-width`,`30`,`stroke-linejoin`,`miter`],[`d`,`M88 66 V196`],[`d`,`M88 66 H143 L170 98 L143 130 H88 Z`],[`id`,`pi-mark-clip`],[`x`,`-40`,`y`,`129`,`width`,`320`,`height`,`200`],[`transform`,`rotate(-10 120 129)`],[`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#78350f`,`stroke-width`,`10`],[`mask`,`url(#pi-mark-mask)`],[`fill`,`#fbbf24`,`d`,`M120 5 L2 46 L22 198 L120 253 Z`],[`fill`,`#f59e0b`,`d`,`M120 5 L238 46 L218 198 L120 253 Z`],[`clip-path`,`url(#pi-mark-clip)`,`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#1c1a17`,`stroke-width`,`22`],[`clip-path`,`url(#pi-mark-clip)`,`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#fde68a`,`stroke-width`,`10`],[`transform`,`translate(230.9 146.0) rotate(10) scale(1.5) translate(-4 -4)`],[`x1`,`9`,`y1`,`9`,`x2`,`21`,`y2`,`21`,`stroke`,`#1c1a17`,`stroke-width`,`14`,`stroke-linecap`,`round`],[`r`,`16`,`fill`,`#1c1a17`],[`x1`,`9`,`y1`,`9`,`x2`,`21`,`y2`,`21`,`stroke`,`#fde68a`,`stroke-width`,`7`,`stroke-linecap`,`round`],[`r`,`12`,`fill`,`#1c1a17`,`stroke`,`#fde68a`,`stroke-width`,`5`],[`type`,`button`,3,`active`],[`type`,`button`,3,`click`],[3,`name`],[1,`full-panel`,3,`click`,`href`],[`width`,`14`,`height`,`14`,`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`3`,`y`,`14`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`14`,`y`,`14`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[3,`layoutChange`,`themeChange`,`passiveChange`,`pillChange`,`tabs`,`layout`,`theme`,`passive`,`pill`,`hotkey`,`paletteShortcut`,`rpc`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`sr-only`],[3,`rpc`],[3,`rpc`,`canShowComponent`],[3,`rpc`,`focus`,`command`,`canShowInjector`,`canShowSignals`,`canShowPipes`],[3,`rpc`,`focus`],[3,`rpc`,`focus`,`canShowComponent`],[3,`rpc`,`canShowComponent`,`canExplainInjection`],[3,`navigate`,`rpc`],[3,`open`,`rpc`],[3,`showComponent`,`rpc`,`canShowComponent`],[3,`focusHandled`,`commandHandled`,`showForm`,`showInjector`,`showSignals`,`showPipe`,`rpc`,`focus`,`command`,`canShowInjector`,`canShowSignals`,`canShowPipes`],[3,`showComponent`,`rpc`],[3,`focusHandled`,`showComponent`,`rpc`,`focus`,`canShowComponent`],[3,`focusHandled`,`rpc`,`focus`],[3,`showComponent`,`rpc`,`canShowComponent`,`canExplainInjection`]],template:function(e,t){if(e&1){let e=B();F(0,`header`)(1,`h1`,2)(2,`span`,3),A(3,T_e,2,0,`:svg:svg`,4)(4,E_e,7,0,`:svg:svg`,4)(5,D_e,11,0,`:svg:svg`,5)(6,O_e,5,0,`:svg:svg`,6)(7,k_e,2,0,`:svg:svg`,7)(8,A_e,10,0,`:svg:svg`,8)(9,j_e,24,0,`:svg:svg`,9),I(),F(10,`span`,10),K(11),I()(),F(12,`nav`,11,0),H(`scroll`,function(){return t.measureNav()})(`keydown`,function(e){return t.onNavKey(e)}),A(14,N_e,3,0,`div`,12),I(),A(15,J9,7,1,`a`,13),F(16,`span`,14)(17,`button`,15),H(`click`,function(){return t.openPalette()}),T(),F(18,`svg`,16),L(19,`path`,17),I()(),cs(),F(20,`button`,18),H(`click`,function(){return t.toggleSettings()}),L(21,`app-tab-icon`,19),I()(),F(22,`span`,20)(23,`span`,21),L(24,`span`),I(),K(25),I()(),F(26,`main`,22,1)(28,`p`,23),K(29),I(),F(30,`p`,24),K(31),I(),A(32,P_e,1,8,`app-settings`,25)(33,F_e,1,1,`app-auth-code`,26)(34,I_e,5,0,`div`,27)(35,L_e,2,0,`p`,28)(36,R_e,1,1,`app-coming-soon`,29)(37,z_e,2,0,`p`,28)(38,V_e,10,2,`p`,30)(39,ave,2,2),I(),F(40,`app-command-palette`,31),w_(`openChange`,function(n){return C(e),C_(t.paletteOpen,n)||(t.paletteOpen=n),w(n)}),H(`picked`,function(e){return t.runCommand(e)}),I()}if(e&2){let e,n;D(2),G(`ng-mark`,t.view()===`angular`)(`pi-mark`,!t.view()),D(),j(t.view()===`nativescript`?3:t.view()===`capacitor`?4:t.view()===`angular-native`?5:t.view()===`analog`?6:t.view()===`ngrx`?7:t.view()===`angular`?8:9),D(7),G(`ng-text`,t.view()===`angular`),D(),q(t.title()),D(),G(`fade-start`,t.navFade().start)(`fade-end`,t.navFade().end),D(2),j(t.availableTabs().length>1?14:-1),D(),j((e=t.fullPanelLink())?15:-1,e),D(2),k(`aria-label`,`Command palette (`+t.paletteShortcut+`)`)(`title`,`Command palette (`+t.paletteShortcut+`)`),D(3),G(`active`,t.tab()===`settings`),k(`aria-pressed`,t.tab()===`settings`),D(2),G(`connected`,t.connected())(`failed`,t.connectionFailed()),D(3),J(` `,t.connected()?`Live`:t.connectionFailed()?`Disconnected`:t.pairing()?`Code needed`:`Connecting…`,` `),D(),k(`aria-label`,t.mainLabel()),D(3),q(t.backgroundNote()),D(2),q(t.connectedNote()),D(),j(t.tab()===`settings`?32:(n=t.pairing())?33:t.connectionFailed()?34:t.rpc()?(n=t.comingSoon())?36:t.view()===`angular-native`&&!t.nativePageId()?37:t.tabEnabled(t.tab(),t.config())?39:38:35,n),D(8),P(`commands`,t.paletteCommands()),S_(`open`,t.paletteOpen)}},dependencies:[RE,EI,oV,LU,vK,wX,vZ,C1,Z0,Jie,ice,Ple,xde,Pfe,wpe,yme,dce,iE,d_e,b_e,Hge],styles:[`[_nghost-%COMP%] { --%NS%accent-soft: color-mix(in srgb, var(--%NS%accent) 12%, transparent); --%NS%accent-line: color-mix(in srgb, var(--%NS%accent) var(--%NS%accent-line-amount), transparent); display: flex; diff --git a/extension/ui/index.html b/extension/ui/index.html index 05ed6cfd..6031512b 100644 --- a/extension/ui/index.html +++ b/extension/ui/index.html @@ -9,7 +9,7 @@ <script src="./theme-init.js"></script> <title>Pangular Inspector - + From e38bdf535d4e0c54317c0551fba9e4a3bacb0b3b Mon Sep 17 00:00:00 2001 From: erKam Date: Sat, 7 Nov 2026 21:29:05 +0000 Subject: [PATCH 09/15] build(extension): rebuild extension/ui Rebuild the committed panel bundle after merging main, for the panel changes on this branch: payload Refetch, redaction counts and the device picker. --- ...=> browser-agent-rpc-KH4HHvHf-DjXYovS-.js} | 2 +- .../{index-LBnCVphy.js => index-WM6jjOIX.js} | 237 ++++++++++-------- extension/ui/index.html | 2 +- 3 files changed, 134 insertions(+), 107 deletions(-) rename extension/ui/assets/{browser-agent-rpc-KH4HHvHf-Cxjx-Meu.js => browser-agent-rpc-KH4HHvHf-DjXYovS-.js} (95%) rename extension/ui/assets/{index-LBnCVphy.js => index-WM6jjOIX.js} (75%) diff --git a/extension/ui/assets/browser-agent-rpc-KH4HHvHf-Cxjx-Meu.js b/extension/ui/assets/browser-agent-rpc-KH4HHvHf-DjXYovS-.js similarity index 95% rename from extension/ui/assets/browser-agent-rpc-KH4HHvHf-Cxjx-Meu.js rename to extension/ui/assets/browser-agent-rpc-KH4HHvHf-DjXYovS-.js index 9306a9fc..c74c5e15 100644 --- a/extension/ui/assets/browser-agent-rpc-KH4HHvHf-Cxjx-Meu.js +++ b/extension/ui/assets/browser-agent-rpc-KH4HHvHf-DjXYovS-.js @@ -1 +1 @@ -import{t as e}from"./index-LBnCVphy.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-WM6jjOIX.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-LBnCVphy.js b/extension/ui/assets/index-WM6jjOIX.js similarity index 75% rename from extension/ui/assets/index-LBnCVphy.js rename to extension/ui/assets/index-WM6jjOIX.js index 536b8613..9e03a60a 100644 --- a/extension/ui/assets/index-LBnCVphy.js +++ b/extension/ui/assets/index-WM6jjOIX.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,jt.StyleMap,jt.ClassMap,jt.StyleProp,jt.ClassProp,jt.Attribute,jt.Property,jt.Attribute,jt.Control,jt.DomProperty,jt.DomProperty,jt.Attribute,jt.StyleMap,jt.ClassMap,jt.StyleProp,jt.ClassProp,jt.Listener,jt.TwoWayListener,jt.AnimationListener,jt.StyleMap,jt.ClassMap,jt.StyleProp,jt.ClassProp,jt.Property,jt.TwoWayProperty,jt.DomProperty,jt.Attribute,jt.Animation,jt.Control,Bt.Idle,y.deferOnIdle,y.deferPrefetchOnIdle,y.deferHydrateOnIdle,Bt.Immediate,y.deferOnImmediate,y.deferPrefetchOnImmediate,y.deferHydrateOnImmediate,Bt.Timer,y.deferOnTimer,y.deferPrefetchOnTimer,y.deferHydrateOnTimer,Bt.Hover,y.deferOnHover,y.deferPrefetchOnHover,y.deferHydrateOnHover,Bt.Interaction,y.deferOnInteraction,y.deferPrefetchOnInteraction,y.deferHydrateOnInteraction,Bt.Viewport,y.deferOnViewport,y.deferPrefetchOnViewport,y.deferHydrateOnViewport,Bt.Never,y.deferHydrateNever,y.deferHydrateNever,y.deferHydrateNever,y.pipeBind1,y.pipeBind2,y.pipeBind3,y.pipeBind4,y.textInterpolate,y.textInterpolate1,y.textInterpolate2,y.textInterpolate3,y.textInterpolate4,y.textInterpolate5,y.textInterpolate6,y.textInterpolate7,y.textInterpolate8,y.textInterpolateV,y.interpolate,y.interpolate1,y.interpolate2,y.interpolate3,y.interpolate4,y.interpolate5,y.interpolate6,y.interpolate7,y.interpolate8,y.interpolateV,y.pureFunction0,y.pureFunction1,y.pureFunction2,y.pureFunction3,y.pureFunction4,y.pureFunction5,y.pureFunction6,y.pureFunction7,y.pureFunction8,y.pureFunctionV,y.resolveWindow,y.resolveDocument,y.resolveBody,nt.HTML,y.sanitizeHtml,nt.RESOURCE_URL,y.sanitizeResourceUrl,nt.SCRIPT,y.sanitizeScript,nt.STYLE,y.sanitizeStyle,nt.URL,y.sanitizeUrl,nt.ATTRIBUTE_NO_BINDING,y.validateAttribute,nt.HTML,y.trustConstantHtml,nt.RESOURCE_URL,y.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||{});b.Tmpl,b.Tmpl,b.Both,b.Host,b.Tmpl,b.Tmpl,b.Tmpl,b.Both,b.Both,b.Both,b.Tmpl,b.Both,b.Both,b.Tmpl,b.Both,b.Tmpl,b.Both,b.Both,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Both,b.Both,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Both,b.Both,b.Both,b.Tmpl,b.Tmpl,b.Both,b.Tmpl,b.Tmpl,b.Tmpl,b.Both,b.Both,b.Tmpl,b.Both,b.Both,b.Both,b.Both,b.Both,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Both,b.Tmpl,b.Both,b.Tmpl,b.Both,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Tmpl,b.Both,b.Both,b.Both,Ct.Property,Ft.Property,Ct.TwoWay,Ft.TwoWayProperty,Ct.Attribute,Ft.Attribute,Ct.Class,Ft.ClassName,Ct.Style,Ft.StyleProperty,Ct.LegacyAnimation,Ft.LegacyAnimation,Ct.Animation,Ft.Animation;var Yt=`%COMP%`;`${Yt}`,`${Yt}`,class e{static SINGLETON=new e;static veWillInferAnyFor(t){let n=e.SINGLETON;return t instanceof St?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(pee);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`),pee={...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 mee(){throw Error()}var Dn=mee;function On(e){Dn(e)}function hee(e){Dn=e}var gee=null;function _ee(e,t){let n=Object.create(Mn);n.value=e,t!==void 0&&(n.equal=t);let r=()=>kn(n);return r[en]=n,xn(n),[r,e=>An(n,e),e=>jn(n,e)]}function kn(e){return an(e),e.value}function An(e,t){ln()||On(e),e.equal(e.value,t)||(e.value=t,Nn(e))}function jn(e,t){ln()||On(e),An(e,t(e.value))}var Mn={...rn,equal:Sn,value:void 0,kind:`signal`};function Nn(e){e.version++,on(),cn(e),gee?.(e)}var Pn={...rn,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:`effect`};function Fn(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 In=void 0;function Ln(){return In}function Rn(e){let t=In;return In=e,t}var zn=Symbol(`NotFound`);function Bn(e){return e===zn||e?.name===`ɵNotFound`}function Vn(e,t,n){let r=Object.create(Wn);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 Hn(e,t){sn(e),An(e,t),dn(e)}function Un(e,t){if(sn(e),e.value===En)throw e.error;jn(e,t),dn(e)}var Wn={...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 Gn(e){let t=tn(null);try{return e()}finally{tn(t)}}var Kn=function(e,t){return Kn=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])},Kn(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`);Kn(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function Jn(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 Yn(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 Zn(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 Qn(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 $n?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 tr(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Xn==`function`?Xn(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 nr(e){return typeof e==`function`}function rr(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 ir=rr(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 ar(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var or=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=Xn(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(nr(c))try{c()}catch(e){i=e instanceof ir?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=Xn(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{lr(f)}catch(e){i??=[],e instanceof ir?i=Qn(Qn([],Zn(i)),Zn(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 ir(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)lr(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)&&ar(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&ar(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),sr=or.EMPTY;function cr(e){return e instanceof or||e&&`closed`in e&&nr(e.remove)&&nr(e.add)&&nr(e.unsubscribe)}function lr(e){nr(e)?e():e.unsubscribe()}var ur={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},dr={setTimeout:function(e,t){var n=[...arguments].slice(2),r=dr.delegate;return r?.setTimeout?r.setTimeout.apply(r,Qn([e,t],Zn(n))):setTimeout.apply(void 0,Qn([e,t],Zn(n)))},clearTimeout:function(e){return(dr.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function fr(e){dr.setTimeout(function(){var t=ur.onUnhandledError;if(t)t(e);else throw e})}function pr(){}var mr=(function(){return _r(`C`,void 0,void 0)})();function hr(e){return _r(`E`,void 0,e)}function gr(e){return _r(`N`,e,void 0)}function _r(e,t,n){return{kind:e,value:t,error:n}}var vr=null;function yr(e){if(ur.useDeprecatedSynchronousErrorHandling){var t=!vr;if(t&&(vr={errorThrown:!1,error:null}),e(),t){var n=vr,r=n.errorThrown,i=n.error;if(vr=null,r)throw i}}else e()}function br(e){ur.useDeprecatedSynchronousErrorHandling&&vr&&(vr.errorThrown=!0,vr.error=e)}var xr=function(e){qn(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,cr(t)&&t.add(n)):n.destination=kr,n}return t.create=function(e,t,n){return new Tr(e,t,n)},t.prototype.next=function(e){this.isStopped?Or(gr(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?Or(hr(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?Or(mr,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}(or),Sr=Function.prototype.bind;function Cr(e,t){return Sr.call(e,t)}var wr=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){Er(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Er(e)}else Er(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Er(e)}},e}(),Tr=function(e){qn(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(nr(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&ur.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&Cr(t.next,o),error:t.error&&Cr(t.error,o),complete:t.complete&&Cr(t.complete,o)}):a=t}return i.destination=new wr(a),i}return t}(xr);function Er(e){ur.useDeprecatedSynchronousErrorHandling?br(e):fr(e)}function Dr(e){throw e}function Or(e,t){var n=ur.onStoppedNotification;n&&dr.setTimeout(function(){return n(e,t)})}var kr={closed:!0,next:pr,error:Dr,complete:pr},Ar=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function jr(e){return e}function Mr(e){return e.length===0?jr:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var Nr=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=Ir(e)?e:new Tr(e,t,n);return yr(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=Pr(t),new t(function(t,r){var i=new Tr({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[Ar]=function(){return this},e.prototype.pipe=function(){return Mr([...arguments])(this)},e.prototype.toPromise=function(e){var t=this;return e=Pr(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 Pr(e){return e??ur.Promise??Promise}function Fr(e){return e&&nr(e.next)&&nr(e.error)&&nr(e.complete)}function Ir(e){return e&&e instanceof xr||Fr(e)&&cr(e)}function Lr(e){return nr(e?.lift)}function Rr(e){return function(t){if(Lr(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 zr(e,t,n,r,i){return new Br(e,t,n,r,i)}var Br=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}(xr),Vr=rr(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),Hr=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 Ur(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Vr},t.prototype.next=function(e){var t=this;yr(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=Xn(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;yr(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;yr(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?sr:(this.currentObservers=null,a.push(e),new or(function(){t.currentObservers=null,ar(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 Nr;return e.source=this,e},t.create=function(e,t){return new Ur(e,t)},t}(Nr),Ur=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)??sr},t}(Hr),Wr=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}(Hr);function Gr(e){return e[e.length-1]}function Kr(e){return nr(Gr(e))?e.pop():void 0}var qr=(function(e){return e&&typeof e.length==`number`&&typeof e!=`function`});function Jr(e){return nr(e?.then)}function Yr(e){return nr(e[Ar])}function Xr(e){return Symbol.asyncIterator&&nr(e?.[Symbol.asyncIterator])}function Zr(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 Qr(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}var $r=Qr();function ei(e){return nr(e?.[$r])}function ti(e){return er(this,arguments,function(){var t,n,r,i;return Yn(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,$n(t.read())];case 3:return n=a.sent(),r=n.value,i=n.done,i?[4,$n(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,$n(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 ni(e){return nr(e?.getReader)}function ri(e){if(e instanceof Nr)return e;if(e!=null){if(Yr(e))return vee(e);if(qr(e))return yee(e);if(Jr(e))return bee(e);if(Xr(e))return ii(e);if(ei(e))return xee(e);if(ni(e))return See(e)}throw Zr(e)}function vee(e){return new Nr(function(t){var n=e[Ar]();if(nr(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}function yee(e){return new Nr(function(t){for(var n=0;n=0?n.slice(0,r):n}function hi(e,t){return e?t?`${e} ${t}`:e:t||``}var Wee=pi({__forward_ref__:pi});function gi(e){return e.__forward_ref__=gi,e}function _i(e){return vi(e)?e():e}function vi(e){return typeof e==`function`&&Object.hasOwn(e,Wee)&&e.__forward_ref__===gi}function yi(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function bi(e){return xi(e,wi)}function xi(e,t){return Object.hasOwn(e,t)&&e[t]||null}function Si(e){return(e?.[wi]??null)||null}function Ci(e){return e&&Object.hasOwn(e,Ti)?e[Ti]:null}var wi=pi({ɵprov:pi}),Ti=pi({ɵinj:pi}),Ei=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=yi({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Di(e){return e&&!!e.ɵproviders}var Oi=pi({ɵcmp:pi}),ki=pi({ɵdir:pi}),Ai=pi({ɵpipe:pi}),ji=pi({ɵfac:pi}),Mi=pi({__NG_ELEMENT_ID__:pi}),Ni=pi({__NG_ENV_ID__:pi});function Pi(e){return Li(e,`@Component`),e[Oi]||null}function Fi(e){return Li(e,`@Directive`),e[ki]||null}function Ii(e){return Li(e,`@Pipe`),e[Ai]||null}function Li(e,t){if(e==null)throw new di(-919,!1)}function Ri(e){return typeof e==`string`?e:e==null?``:String(e)}var zi=pi({ngErrorCode:pi}),Bi=pi({ngErrorMessage:pi}),Vi=pi({ngTokenPath:pi});function Hi(e,t){return Wi(``,-200,t)}function Ui(e,t){throw new di(-201,!1)}function Wi(e,t,n){let r=new di(t,e);return r[zi]=t,r[Bi]=e,n&&(r[Vi]=n),r}function Gi(e){return e[zi]}var Ki;function qi(){return Ki}function Ji(e){let t=Ki;return Ki=e,t}function Yi(e,t,n){let r=bi(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;Ui(e,``)}var Xi=globalThis,Zi={},Qi=`__NG_DI_FLAG__`,$i=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=na(t)||0;try{return this.injector.get(e,n&8?null:Zi,n)}catch(e){if(Bn(e))return e;throw e}}};function ea(e,t=0){let n=Ln();if(n===void 0)throw new di(-203,!1);if(n===null)return Yi(e,void 0,t);{let r=ra(t),i=n.retrieve(e,r);if(Bn(i)){if(r.optional)return null;throw i}return i}}function ta(e,t=0){return(qi()||ea)(_i(e),t)}function x(e,t){return ta(e,na(t))}function na(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function ra(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function ia(e){let t=[];for(let n=0;nArray.isArray(e)?la(e,t):t(e))}function ua(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function da(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function fa(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 ma(e,t,n){let r=ga(e,t);return r>=0?e[r|1]=n:(r=~r,pa(e,r,t,n)),r}function ha(e,t){let n=ga(e,t);if(n>=0)return e[n|1]}function ga(e,t){return _a(e,t,1)}function _a(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 la(t,e=>{let t=e;Da(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&Ea(i,a),n}function Ea(e,t){for(let n=0;n{t(e,r)})}}function Da(e,t,n,r){if(e=_i(e),!e)return!1;let i=null,a=Ci(e),o=!a&&Pi(e);if(!a&&!o){let t=e.ngModule;if(a=Ci(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)Da(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{la(a.imports,i=>{Da(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&Ea(e,t)}if(!s){let e=oa(i)||(()=>new i);t({provide:i,useFactory:e,deps:ya},i),t({provide:Sa,useValue:i,multi:!0},i),t({provide:ba,useValue:()=>ta(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;Oa(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function Oa(e,t){for(let n of e)Di(n)&&(n=n.ɵproviders),Array.isArray(n)?Oa(n,t):t(n)}var ka=pi({provide:String,useValue:pi});function Aa(e){return typeof e==`object`&&!!e&&ka in e}function ja(e){return!!(e&&e.useExisting)}function Ma(e){return!!(e&&e.useFactory)}function Na(e){return typeof e==`function`}function Pa(e){return!!e.useClass}var Fa=new Ei(``),Ia={},La={},Ra=void 0;function za(){return Ra===void 0&&(Ra=new Ca),Ra}var Ba=class{},Va=class extends Ba{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,Za(e,e=>this.processProvider(e)),this.records.set(xa,qa(void 0,this)),r.has(`environment`)&&this.records.set(Ba,qa(void 0,this));let i=this.records.get(Fa);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Sa,ya,{self:!0}))}retrieve(e,t){let n=na(t)||0;try{return this.get(e,Zi,n)}catch(e){if(Bn(e))return e;throw e}}destroy(){Ka(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 Ka(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Ka(this);let t=Rn(this),n=Ji(void 0);try{return e()}finally{Rn(t),Ji(n)}}get(e,t=Zi,n){if(Ka(this),Object.hasOwn(e,Ni))return e[Ni](this);let r=na(n),i=Rn(this),a=Ji(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=Xa(e)&&bi(e);t=n&&this.injectableDefInScope(n)?qa(Ha(e),Ia):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?za():this.parent;return t=r&8&&t===Zi?null:t,n.get(e,t)}catch(e){let t=Gi(e);throw t===-200||t===-201?new di(t,null):e}finally{Ji(a),Rn(i)}}resolveInjectorInitializers(){let e=tn(null),t=Rn(this),n=Ji(void 0);try{let e=this.get(ba,ya,{self:!0});for(let t of e)t()}finally{Rn(t),Ji(n),tn(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=_i(e);let t=Na(e)?e:_i(e&&e.provide),n=Wa(e);if(!Na(e)&&e.multi===!0){let n=this.records.get(t);n||(n=qa(void 0,Ia,!0),n.factory=()=>ia(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===La)throw Hi(``);return t.value===Ia&&(t.value=La,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&Ya(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{tn(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=_i(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 Ha(e){let t=bi(e),n=t===null?oa(e):t.factory;if(n!==null)return n;if(e instanceof Ei)throw new di(-204,!1);if(e instanceof Function)return Ua(e);throw new di(-204,!1)}function Ua(e){if(e.length>0)throw new di(-204,!1);let t=Si(e);return t===null?()=>new e:()=>t.factory(e)}function Wa(e){return Aa(e)?qa(void 0,e.useValue):qa(Ga(e),Ia)}function Ga(e,t,n){let r;if(Na(e)){let t=_i(e);return oa(t)||Ha(t)}if(Aa(e))r=()=>_i(e.useValue);else if(Ma(e))r=()=>e.useFactory(...ia(e.deps||[]));else if(ja(e))r=(t,n)=>ta(_i(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=_i(e&&(e.useClass||e.provide));if(Ja(e))r=()=>new t(...ia(e.deps));else return oa(t)||Ha(t)}return r}function Ka(e){if(e.destroyed)throw new di(-205,!1)}function qa(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function Ja(e){return!!e.deps}function Ya(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function Xa(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function Za(e,t){for(let n of e)Array.isArray(n)?Za(n,t):n&&Di(n)?Za(n.ɵproviders,t):t(n)}function Qa(e,t){let n;e instanceof Va?(Ka(e),n=e):n=new $i(e);let r=Rn(n),i=Ji(void 0);try{return t()}finally{Rn(r),Ji(i)}}function $a(){return qi()!==void 0||Ln()!=null}var eo=1;function to(e){return Array.isArray(e)&&typeof e[eo]==`object`}function no(e){return Array.isArray(e)&&e[eo]===!0}function ro(e){return!!(e.flags&4)}function io(e){return e.componentOffset>-1}function ao(e){return(e.flags&1)==1}function oo(e){return!!e.template}function so(e){return!!(e[2]&512)}function co(e){return(e[2]&256)==256}var lo=(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})(lo||{}),uo=`math`;function fo(e){for(;Array.isArray(e);)e=e[0];return e}function po(e,t){return fo(t[e])}function mo(e,t){return fo(t[e.index])}function ho(e,t){return e.data[t]}function go(e,t){return e[t]}function _o(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function vo(e,t){let n=t[e];return to(n)?n:n[0]}function yo(e){return(e[2]&128)==128}function Gee(e){return no(e[3])}function bo(e,t){return t==null?null:e[t]}function xo(e){e[17]=0}function So(e){e[2]&1024||(e[2]|=1024,yo(e)&&To(e))}function Kee(e,t){for(;e>0;)t=t[14],e--;return t}function Co(e){return!!(e[2]&9216||e[24]?.dirty)}function wo(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),Co(e)&&To(e)}function To(e){e[10].changeDetectionScheduler?.notify(0);let t=Do(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!yo(t)));)t=Do(t)}function Eo(e,t){if(co(e))throw new di(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function qee(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function Do(e){let t=e[3];return no(t)?t[3]:t}function Oo(e){return e[7]??=[]}function ko(e){return e.cleanup??=[]}function Jee(e,t,n,r){let i=Oo(t);i.push(n),e.firstCreatePass&&ko(e).push(r,i.length-1)}var Ao={lFrame:ns(null),bindingsEnabled:!0,skipHydrationRootTNode:null},jo=!1;function Yee(){return Ao.lFrame.elementDepthCount}function Xee(){Ao.lFrame.elementDepthCount++}function Mo(){Ao.lFrame.elementDepthCount--}function No(){return Ao.bindingsEnabled}function Po(){return Ao.skipHydrationRootTNode!==null}function Fo(e){return Ao.skipHydrationRootTNode===e}function Io(){Ao.skipHydrationRootTNode=null}function Lo(){return Ao.lFrame.lView}function Ro(){return Ao.lFrame.tView}function S(e){return Ao.lFrame.contextLView=e,e[8]}function C(e){return Ao.lFrame.contextLView=null,e}function zo(){let e=Bo();for(;e!==null&&e.type===64;)e=e.parent;return e}function Bo(){return Ao.lFrame.currentTNode}function Zee(){let e=Ao.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Vo(e,t){let n=Ao.lFrame;n.currentTNode=e,n.isParent=t}function Ho(){return Ao.lFrame.isParent}function Uo(){Ao.lFrame.isParent=!1}function Wo(){return Ao.lFrame.contextLView}function Go(){return jo}function Ko(e){let t=jo;return jo=e,t}function qo(){let e=Ao.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Jo(){return Ao.lFrame.bindingIndex}function Qee(e){return Ao.lFrame.bindingIndex=e}function Yo(){return Ao.lFrame.bindingIndex++}function Xo(e){let t=Ao.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function $ee(){return Ao.lFrame.inI18n}function ete(e,t){let n=Ao.lFrame;n.bindingIndex=n.bindingRootIndex=e,Zo(t)}function tte(){return Ao.lFrame.currentDirectiveIndex}function Zo(e){Ao.lFrame.currentDirectiveIndex=e}function nte(e){let t=Ao.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function rte(){return Ao.lFrame.currentQueryIndex}function Qo(e){Ao.lFrame.currentQueryIndex=e}function ite(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function $o(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=ite(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=Ao.lFrame=ts();return r.currentTNode=t,r.lView=e,!0}function es(e){let t=ts(),n=e[1];Ao.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function ts(){let e=Ao.lFrame,t=e===null?null:e.child;return t===null?ns(e):t}function ns(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 rs(){let e=Ao.lFrame;return Ao.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var is=rs;function as(){let e=rs();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 ate(e){return(Ao.lFrame.contextLView=Kee(e,Ao.lFrame.contextLView))[8]}function os(){return Ao.lFrame.selectedIndex}function ss(e){Ao.lFrame.selectedIndex=e}function cs(){let e=Ao.lFrame;return ho(e.tView,e.selectedIndex)}function w(){Ao.lFrame.currentNamespace=`svg`}function ls(){us()}function us(){Ao.lFrame.currentNamespace=null}function ds(){return Ao.lFrame.currentNamespace}var fs=!0;function ps(){return fs}function ms(e){fs=e}function hs(e,t=null,n=null,r){let i=gs(e,t,n,r);return i.resolveInjectorInitializers(),i}function gs(e,t=null,n=null,r,i=new Set){return new Va([n||ya,wa(e)],t||za(),null,i)}var _s=class e{static THROW_IF_NOT_FOUND=Zi;static NULL=new Ca;static create(e,t){if(Array.isArray(e))return hs({name:``},t,e,``);{let t=e.name??``;return hs({name:t},e.parent,e.providers,t)}}static ɵprov=yi({token:e,providedIn:`any`,factory:()=>ta(xa)});static __NG_ELEMENT_ID__=-1},vs=new Ei(``),ys=class{static __NG_ELEMENT_ID__=xs;static __NG_ENV_ID__=e=>e},bs=class extends ys{_lView;constructor(e){super(),this._lView=e}get destroyed(){return co(this._lView)}onDestroy(e){let t=this._lView;return Eo(t,e),()=>qee(t,e)}};function xs(){return new bs(Lo())}var Ss=new Ei(``),Cs=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Wr(!1);debugTaskTracker=x(Ss,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Nr(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=yi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),ws=class extends Hr{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,$a()&&(this.destroyRef=x(ys,{optional:!0})??void 0,this.pendingTasks=x(Cs,{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 or&&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 Ts(...e){}function Es(e){let t,n;function r(){e=Ts;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 Ds(e){return queueMicrotask(()=>e()),()=>{e=Ts}}var Os=`isAngularZone`,ks=`isAngularZone_ID`,As=0,js=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new ws(!1);onMicrotaskEmpty=new ws(!1);onStable=new ws(!1);onError=new ws(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new di(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,Fs(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(Os)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new di(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new di(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,Ms,Ts,Ts);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)}},Ms={};function Ns(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 Ps(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Es(()=>{e.callbackScheduled=!1,Is(e),e.isCheckStableRunning=!0,Ns(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Is(e)}function Fs(e){let t=()=>{Ps(e)},n=As++;e._inner=e._inner.fork({name:`angular`,properties:{[Os]:!0,[ks]:n,[ks+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(Bs(s))return n.invokeTask(i,a,o,s);try{return Ls(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),Rs(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return Ls(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!Vs(s)&&t(),Rs(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,Is(e),Ns(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 Is(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function Ls(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Rs(e){e._nesting--,Ns(e)}var zs=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new ws;onMicrotaskEmpty=new ws;onStable=new ws;onError=new ws;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 Bs(e){return Hs(e,`__ignore_ng_zone__`)}function Vs(e){return Hs(e,`__scheduler_tick__`)}function Hs(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Us=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},Ws=new Ei(``,{factory:()=>{let e=x(js),t=x(Ba),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Us),n.handleError(r))})}}}),Gs={provide:ba,useValue:()=>{x(Us,{optional:!0})},multi:!0};function T(e,t){let[n,r,i]=_ee(e,t?.equal),a=n;return a[en],a.set=r,a.update=i,a.asReadonly=Ks.bind(a),a}function Ks(){let e=this[en];if(e.readonlyFn===void 0){let t=()=>this();t[en]=e,e.readonlyFn=t}return e.readonlyFn}var qs=new Ei(``,{factory:()=>Js}),Js=`ng`,Ys=new Ei(``),Xs=new Ei(``,{providedIn:`platform`,factory:()=>`unknown`}),Zs=new Ei(``,{factory:()=>x(vs).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),Qs=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=$s}return e})();function $s(){return new Qs(Lo(),zo())}var ec=class{},tc=new Ei(``,{factory:()=>!0}),nc=new Ei(``),rc=(()=>{class e{static ɵprov=yi({token:e,providedIn:`root`,factory:()=>new ic})}return e})(),ic=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}},ac=class{[en];constructor(e){this[en]=e}destroy(){this[en].destroy()}};function E(e,t){let n=t?.injector??x(_s),r=t?.manualCleanup===!0?null:n.get(ys),i,a=n.get(Qs,null,{optional:!0}),o=n.get(ec);return a===null?i=uc(e,n.get(rc),o):(i=lc(a.view,o,e),r instanceof bs&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new ac(i)}var oc={...Pn,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=Ko(!1);try{Fn(this)}finally{Ko(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=tn(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],tn(e)}}},sc={...oc,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)}},cc={...oc,consumerMarkedDirty(){this.view[2]|=8192,To(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 lc(e,t,n){let r=Object.create(cc);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=dc(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function uc(e,t,n){let r=Object.create(sc);return r.fn=dc(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 dc(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}function fc(e){return typeof e==`function`&&e[en]!==void 0}function pc(e){return fc(e)&&typeof e.set==`function`}var mc=Symbol(`InputSignalNode#UNSET`),hc={...Mn,transformFn:void 0,applyValueToInputSignal(e,t){An(e,t)}};function gc(e){return{toString:e}.toString()}var _c=(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})(_c||{}),vc=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function yc(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var bc=null,xc=(()=>{bc=Cc;let e=()=>Cc;return e.ngInherit=!0,e})();function Sc(){return bc}function Cc(e){return e.type.prototype.ngOnChanges&&(e.setInput=Tc),wc}function wc(){let e=Dc(this),t=e?.current;if(t){let n=e.previous;if(n===va)e.previous=t;else for(let e in t)n[e]=t[e];e.current=null,this.ngOnChanges(t)}}function Tc(e,t,n,r,i){let a=this.declaredInputs[r],o=Dc(e)||Oc(e,{previous:va,current:null}),s=o.current||={},c=o.previous,l=c[a];s[a]=new vc(l&&l.currentValue,n,c===va),yc(e,t,i,n)}var Ec=`__ngSimpleChanges__`;function Dc(e){return Object.hasOwn(e,Ec)&&e[Ec]||null}function Oc(e,t){return e[Ec]=t}var kc=[],Ac=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,Lc(o,a)):Lc(o,a)}var zc=-1,Bc=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 Vc(e){return!!(e.flags&8)}function Hc(e){return!!(e.flags&16)}function Uc(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function Zc(e,t){let n=Xc(e),r=t;for(;n>0;)r=r[14],n--;return r}var Qc=!0;function $c(e){let t=Qc;return Qc=e,t}var el=255,tl=5,nl=0,rl={};function il(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,Mi)&&(r=n[Mi]),r??=n[Mi]=nl++;let i=r&el,a=1<>tl)]|=a}function al(e,t){let n=sl(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,ol(r.data,e),ol(t,null),ol(r.blueprint,null));let i=cl(e,t),a=e.injectorIndex;if(Jc(i)){let e=Yc(i),n=Zc(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 ol(e,t){e.push(0,0,0,0,0,0,0,0,t)}function sl(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function cl(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=Tl(i),r===null)return zc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return zc}function ll(e,t,n){il(e,t,n)}function ul(e,t,n){if(n&8||e!==void 0)return e;Ui(t,`NodeInjector`)}function dl(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=Ji(void 0);try{return i?i.get(t,r,n&8):Yi(t,r,n&8)}finally{Ji(a)}}return ul(r,t,n)}function fl(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=wl(e,t,n,r,rl);if(i!==rl)return i}let i=pl(e,t,n,r,rl);if(i!==rl)return i}return dl(t,n,r,i)}function pl(e,t,n,r,i){let a=_l(n);if(typeof a==`function`){if(!$o(t,e,r))return r&1?ul(i,n,r):dl(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))Ui(n);else return e}finally{is()}}else if(typeof a==`number`){let i=null,o=sl(e,t),s=zc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?cl(e,t):t[o+8],s===zc||!yl(r,!1)?o=-1:(i=t[1],o=Yc(s),t=Zc(s,t)));o!==-1;){let e=t[1];if(vl(a,o,e.data)){let e=ml(o,t,n,i,r,c);if(e!==rl)return e}s=t[o+8],s!==zc&&yl(r,t[1].data[o+8]===c)&&vl(a,o,t)?(i=e,o=Yc(s),t=Zc(s,t)):o=-1}}return i}function ml(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=hl(s,o,n,r==null?io(s)&&Qc:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?rl:gl(t,o,c,s,i)}function hl(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&&oo(e)&&e.type===n)return c}return null}function gl(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof Bc){let s=a;if(s.resolving)throw Hi(``);let c=$c(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?Ji(s.injectImpl):null;$o(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&jc(n,o[n],t)}finally{l!==null&&Ji(l),$c(c),s.resolving=!1,is()}}return a}function _l(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,Mi)?e[Mi]:void 0;return typeof t==`number`?t>=0?t&el:xl:t}function vl(e,t,n){let r=1<>tl)]&r)}function yl(e,t){return!(e&2)&&!(e&1&&t)}var bl=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return fl(this._tNode,this._lView,e,na(n),t)}};function xl(){return new bl(zo(),Lo())}function Sl(e){return gc(()=>{let t=e.prototype.constructor,n=t[ji]||Cl(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let e=i[ji]||Cl(i);if(e&&e!==n)return e;i=Object.getPrototypeOf(i)}return e=>new e})}function Cl(e){return vi(e)?()=>{let t=Cl(_i(e));return t&&t()}:oa(e)}function wl(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!so(o);){let e=pl(a,o,n,r|2,rl);if(e!==rl)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,rl,r);if(t!==rl)return t}t=Tl(o),o=o[14]}a=t}return i}function Tl(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}function El(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function Dl(){return Ol(zo(),Lo())}function Ol(e,t){return new kl(mo(e,t))}var kl=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=Dl}return e})();function Al(e){return e instanceof kl?e.nativeElement:e}function jl(){return this._results[Symbol.iterator]()}var Ml=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 Hr}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=ca(e);(this._changesDetected=!sa(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]=jl};function Nl(e){return(e.flags&128)==128}var Pl=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Pl||{}),Fl=new Map,Il=0;function Ll(){return Il++}function Rl(e){Fl.set(e[19],e)}function zl(e){Fl.delete(e[19])}var Bl=`__ngContext__`;function Vl(e,t){to(t)?(e[Bl]=t[19],Rl(t)):e[Bl]=t}function Hl(e){return Wl(e[12])}function Ul(e){return Wl(e[4])}function Wl(e){for(;e!==null&&!no(e);)e=e[4];return e}var Gl=void 0;function Kl(e){Gl=e}function ql(){if(Gl!==void 0)return Gl;if(typeof document<`u`)return document;throw new di(210,!1)}var Jl=!1,Yl=new Ei(``,{factory:()=>Jl}),Xl=new WeakMap;function Zl(e,t){if(typeof e!=`object`||!e)return;let n=Xl.get(e);n||(n=new WeakSet,Xl.set(e,n)),n.add(t)}function Ql(e){return(e.flags&32)==32}var $l=()=>null;function eu(e,t,n=!1){return $l(e,t,n)}function tu(e,t){let n=e.contentQueries;if(n!==null){let r=tn(null);try{for(let r=0;r|^->||--!>|)/g,pu=`​$1​`;function ote(e){return e.replace(du,e=>e.replace(fu,pu))}function ste(e,t){return e.createText(t)}function cte(e,t,n){e.setValue(t,n)}function lte(e,t){return e.createComment(ote(t))}function mu(e,t,n){return e.createElement(t,n)}function hu(e,t,n,r,i){e.insertBefore(t,n,r,i)}function gu(e,t,n){e.appendChild(t,n)}function _u(e,t,n,r,i){r===null?gu(e,t,n):hu(e,t,n,r,i)}function vu(e,t,n,r){e.removeChild(null,t,n,r)}function ute(e,t,n){e.setAttribute(t,`style`,n)}function dte(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function yu(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&Uc(e,t,r),i!==null&&dte(e,t,i),a!==null&&ute(e,t,a)}function bu(e){let t=fte();return t?t.sanitize(lo.URL,e)||``:su(e,`URL`)?ou(e):uu(Ri(e))}function fte(){let e=Lo();return e&&e[10].sanitizer}function xu(e){return e.ownerDocument.defaultView}function Su(e){return e.ownerDocument}function pte(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 Cu=`ng-template`;function mte(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(Tu(r))return!1;o=!0}}}}}return Tu(r)||o}function Tu(e){return!(e&1)}function _te(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!==``&&!Tu(o)&&(t+=Du(a,i),i=``),r=o,a||=!Tu(r);n++}return i!==``&&(t+=Du(a,i)),t}function Cte(e){return e.map(Ste).join(`,`)}function wte(e){let t=[],n=[],r=1,i=2;for(;r!1});function ju(e){if(!e)return 0;let t=e.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(e)*t}function Mu(e,t){return e.getPropertyValue(t).split(`,`).map(e=>e.trim())}function Dte(e){let t=Mu(e,`transition-property`),n=Mu(e,`transition-duration`),r=Mu(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 Ote(e){let t=Mu(e,`animation-name`),n=Mu(e,`animation-delay`),r=Mu(e,`animation-duration`),i=Mu(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 Nu(e,t){return e!==void 0&&e.duration>t.duration}function Pu(e){return(e.animationName!=null||e.propertyName!=null)&&e.duration>0}function Fu(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 kte(e,t){let n=getComputedStyle(e),r=Ote(n),i=Dte(n),a=r.duration>i.duration?r:i;Nu(t.get(e),a)||Pu(a)&&t.set(e,a)}function Ate(e,t,n){if(!n)return;let r=e.getAnimations();return r.length===0?kte(e,t):jte(e,t,r)}function jte(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=Fu(e)??0,n,i;e.animationName?i=e.animationName:n=e.transitionProperty,t>=r.duration&&(r={animationName:i,propertyName:n,duration:t})}Nu(t.get(e),r)||Pu(r)&&t.set(e,r)}var Iu=new Set,Mte=!1,Nte=1,Lu=typeof document<`u`&&typeof document?.documentElement?.getAnimations==`function`;function Pte(e){return e[9].get(Ete,Mte)}function Fte(e,t,n){let r=zu.get(e);if(r){for(let e of t)r.classList.push(e);for(let e of n)r.cleanupFns.push(e)}else zu.set(e,{classList:t,cleanupFns:n})}function Ru(e){let t=zu.get(e);if(t){for(let e of t.cleanupFns)e();zu.delete(e)}Bu.delete(e)}var zu=new WeakMap,Bu=new WeakMap,Vu=new WeakMap;function Hu(e){return e?e[14]??e:null}var Uu=new WeakSet;function Ite(e,t,n){let r=Vu.get(e);if(!r||r.length===0)return;let i=t.parentNode,a=t.previousSibling,o=Hu(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),Uu.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 Lte(e,t,n){let r=Hu(n),i=Vu.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):Vu.set(e,[{el:t,declarationView:r}])}function Wu(e){let t=e[26]??={};return t.enter??=new Map}function Rte(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 Gu(e){return e.composedPath?e.composedPath()[0]:e.target}function Ku(e,t){let n=Bu.get(t);if(n===void 0)return!0;if(t!==Gu(e))return!1;let r=e.animation;if(r){let e=Fu(r);if(e!==void 0&&e+Nte{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=yi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Qu=[0,1,2,3],$u=(()=>{class e{ngZone=x(js);scheduler=x(ec);errorHandler=x(Us,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){x(Ju,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Ac(_c.AfterRenderHooksStart),this.executing=!0;for(let e of Qu)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&&Ac(_c.AfterRenderHooksEnd)}register(e){let{view:t}=e;t===void 0?this.executing?this.deferredRegistrations.add(e):this.addSequence(e):((t[25]??=[]).push(e),To(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(qu.AFTER_NEXT_RENDER,e):e()}static ɵprov=yi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),ed=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 td(e,t){let n=t?.injector??x(_s);return Xu(`NgAfterNextRender`),Vte(e,n,t,!0)}function Bte(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function Vte(e,t,n,r){let i=t.get(Zu);i.impl??=t.get($u);let a=t.get(Ju,null,{optional:!0}),o=n?.manualCleanup===!0?null:t.get(ys),s=t.get(Qs,null,{optional:!0}),c=new ed(i.impl,Bte(e),s?.view,r,o,a?.snapshot(null));return i.impl.register(c),c}var nd=new Ei(``,{factory:()=>{let e=x(Ba),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function rd(e,t,n){let r=e.get(nd);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 Hte(e,t){let n=e.get(nd);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Ute(e,t){let n=e.get(nd);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function Wte(e){let t=e.get(nd);t.isScheduled||=(td(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:t.injector}),!0)}function Gte(e){let t=e.get(nd);t.scheduler=Wte,t.scheduler(e)}function id(e,t){for(let[n,r]of t)rd(e,r.animateFns)}function ad(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&id(r,i)}function od(e,t,n,r){try{n.get(xa)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&Hte(n,i.enter.get(t.index).animateFns);let a=Kte(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];sd(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&Iu.add(e[19]),rd(n,()=>qte(e,t,i||void 0,a,r),i||void 0)}function Kte(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 qte(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&&sd(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),Yte(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&Iu.delete(e[19]),i(!0)})}else e&&Iu.delete(e[19]),i(!1)}function sd(e,t,n){if(t.type&12){let r=e[t.index];if(no(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,Iu.delete(e[19])),n(!0)})}function cd(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;no(i)?c=i:to(i)&&(l=!0,i=i[0]);let u=fo(i);e===0&&r!==null?(ad(s,r,a,n),o==null?gu(t,r,u):hu(t,r,u,o||null,!0)):e===1&&r!==null?(ad(s,r,a,n),hu(t,r,u,o||null,!0),Ite(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&Lte(a,u,s),Uu.delete(u),od(s,a,n,e=>{if(Uu.has(u)){Uu.delete(u);return}vu(t,u,l,e)})):e===3&&(Uu.delete(u),od(s,a,n,()=>{t.destroyNode(u)})),c!=null&&wd(t,e,n,c,a,r,o)}}function Xte(e,t){ld(e,t),t[0]=null,t[5]=null}function Zte(e,t,n,r,i,a){r[0]=i,r[5]=t,bd(e,r,n,1,i,a)}function ld(e,t){t[10].changeDetectionScheduler?.notify(9),bd(e,t,t[11],2,null,null)}function Qte(e){let t=e[12];if(!t)return fd(e[1],e);for(;t;){let n=null;if(to(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)to(t)&&fd(t[1],t),t=t[3];t===null&&(t=e),to(t)&&fd(t[1],t),n=t&&t[4]}t=n}}function ud(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function dd(e,t){if(co(t))return;let n=t[11];n.destroyNode&&bd(e,t,n,3,null,null),Qte(t)}function fd(e,t){if(co(t))return;let n=tn(null);try{t[2]&=-129,t[2]|=256,t[24]&&_n(t[24]),ene(e,t),$te(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&no(t[3])){n!==t[3]&&ud(n,t);let r=t[18];r!==null&&r.detachView(e)}zl(t)}finally{tn(n)}}function $te(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&&Pd(e,t,27,!1),Ac(o?_c.TemplateUpdateStart:_c.TemplateCreateStart,i,n),n(r,i)}finally{ss(a),Ac(o?_c.TemplateUpdateEnd:_c.TemplateCreateEnd,i,n)}}function Rd(e,t,n){Gd(e,t,n),(n.flags&64)==64&&Kd(e,t,n)}function zd(e,t,n=mo){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];Id(o,n[i],s,a),l=!0}else if(i>c)break}}return o!==null&&Object.hasOwn(r.inputs,i)&&(Id(r,n[o],i,a),l=!0),l}function rf(e,t){let n=vo(t,e),r=n[1];af(r,n);let i=n[0];i!==null&&n[6]===null&&(n[6]=eu(i,n[9])),Ac(_c.ComponentStart);try{of(r,n,n[8])}finally{Ac(_c.ComponentEnd,n[8])}}function af(e,t){for(let n=t.length;n{To(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function vf(e){let t=e[24]??Object.create(yf);return t.lView=e,t}var yf={...rn,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=Do(e.lView);for(;t&&!bf(t[1]);)t=Do(t);t&&So(t)},consumerOnSignalRead(){this.lView[24]=this}};function bf(e){return e.type!==2}function xf(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 Sf=100;function Cf(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{wf(e,t)}finally{n.end?.()}}function wf(e,t){let n=Go();try{Ko(!0),Af(e,t);let n=0;for(;Co(e);){if(n===Sf)throw new di(103,!1);n++,Af(e,1)}}finally{Ko(n)}}function Tf(e,t,n,r){if(co(t))return;let i=t[2];es(t);let a=!0,o=null,s=null;bf(e)?(s=mf(t),o=fn(s)):nn()===null?(a=!1,s=vf(t),o=fn(s)):t[24]&&=(_n(t[24]),null);try{xo(t),Qee(e.bindingStartIndex),n!==null&&Ld(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&Nc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&Pc(t,n,0,null),Fc(t,0)}if(Df(t),xf(t),Ef(t,0),e.contentQueries!==null&&tu(e,t),a){let n=e.contentCheckHooks;n!==null&&Nc(t,n)}else{let n=e.contentHooks;n!==null&&Pc(t,n,1),Fc(t,1)}Mf(e,t);let o=e.components;o!==null&&jf(t,o,0);let s=e.viewQuery;if(s!==null&&nu(2,s,r),a){let n=e.viewCheckHooks;n!==null&&Nc(t,n)}else{let n=e.viewHooks;n!==null&&Pc(t,n,2),Fc(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}ff(t),t[2]&=-73}catch(e){throw To(t),e}finally{s!==null&&(mn(s,o),a&&gf(s)),as()}}function Ef(e,t){for(let n=Hl(e);n!==null;n=Ul(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=da(e,10+t);Xte(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 zf(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(Rf(e,n),da(t,n))}this._attachedToViewContainer=!1}dd(this._lView[1],this._lView)}onDestroy(e){Eo(this._lView,e)}markForCheck(){Nf(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){wo(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,Cf(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new di(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=so(this._lView),t=this._lView[16];t!==null&&!e&&ud(t,this._lView),ld(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new di(902,!1);this._appRef=e;let t=so(this._lView),n=this._lView[16];n!==null&&!t&&Bf(n,this._lView),wo(this._lView)}},Hf=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=Uf;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 Vf(cf(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n}))}}return e})();function Uf(){return Wf(zo(),Lo())}function Wf(e,t){return e.type&4?new Hf(t,e,Ol(e,t)):null}function Gf(e,t,n,r,i){let a=e.data[t];if(a===null)a=Kf(e,t,n,r,i),$ee()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Zee();a.injectorIndex=e===null?-1:e.injectorIndex}return Vo(a,!0),a}function Kf(e,t,n,r,i){let a=Bo(),o=Ho(),s=o?a:a&&a.parent,c=e.data[t]=Jf(e,s,n,t,r,i);return qf(e,c,a,o),c}function qf(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 Jf(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return Po()&&(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:ds(),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 Yf(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?Xf(e,n):r.push(e);e[6]=r}function Xf(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,Qf=()=>null;function $f(e,t){return Zf(e,t)}function ep(e,t,n){return Qf(e,t,n)}var tp=class{},np=class{},rp=class{destroyNode=null;static __NG_ELEMENT_ID__=()=>ip()};function ip(){let e=Lo(),t=vo(zo().index,e);return(to(t)?t:e)[11]}var ap=(()=>{class e{static ɵprov=yi({token:e,providedIn:`root`,factory:()=>null})}return e})();function op(e){return e.debugInfo?.className||e.type.name||null}var sp={},cp=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,sp,n);return r!==sp||t===sp?r:this.parentInjector.get(e,t,n)}};function lp(e,t,n){return e[t]=n}function up(e,t){return e[t]}function dp(e,t,n){if(n===Ou)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function fp(e,t,n,r){let i=dp(e,t,n);return dp(e,t+1,r)||i}function pp(e,t,n,r,i){let a=fp(e,t,n,r);return dp(e,t+2,i)||a}function mp(e,t,n,r,i,a){let o=fp(e,t,n,r);return fp(e,t+2,i,a)||o}function hp(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&Zl(i,a),Nf(io(e)?vo(e.index,t):t,5);let o=t[8],s=gp(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=gp(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function gp(e,t,n,r){let i=tn(null);try{return Ac(_c.OutputStart,t,n),n(r)!==!1}catch(t){return ef(e,t),!1}finally{Ac(_c.OutputEnd,t,n),tn(i)}}function _p(e,t,n,r,i,a,o,s){let c=ao(e),l=!1,u=null;if(!r&&c&&(u=yp(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=mo(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);vp(a)||bp(r?t=>r(fo(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function vp(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function yp(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?ko(t):null,c=Oo(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function xp(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,Sp(e,t,l,n[a+1],r,i);else if(l>s)break}}return Object.hasOwn(n.outputs,r)&&(c=!0,Sp(e,t,a,r,r,i)),c}function Sp(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 Cp(){wp()}function wp(){let e=Lo(),t=Ro(),n=zo();if(t.firstCreatePass&&Ap(t,n),n.controlDirectiveIndex===-1)return;Xu(`NgSignalForms`);let r=e[n.controlDirectiveIndex];t.data[n.controlDirectiveIndex].controlDef.create(r,new Dp(e,t,n))}function Tp(){Ep()}function Ep(){let e=Lo(),t=Ro(),n=cs();if(n.controlDirectiveIndex===-1)return;let r=t.data[n.controlDirectiveIndex].controlDef,i=e[n.controlDirectiveIndex];r.update(i,new Dp(e,t,n))}var Dp=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 mo(this.tNode,this.lView)}get descriptor(){return`<${this.tNode.value}>`}listenToCustomControlOutput(e,t){let n=this.tView.data[this.tNode.customControlIndex];xp(this.tNode,this.lView,n,e,hp(this.tNode,this.lView,t))}listenToCustomControlModel(e){let t=this.tNode.flags&1024?`valueChange`:`checkedChange`,n=this.tView.data[this.tNode.customControlIndex];xp(this.tNode,this.lView,n,t,hp(this.tNode,this.lView,e))}listenToDom(e,t){_p(this.tNode,this.tView,this.lView,void 0,this.lView[11],e,t,hp(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(kp(r,o,e)))&&(Id(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=Op(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}jp(e,t)}function jp(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 Mp(e,t){return Np(e,t)&&Pp(e,t+`Change`)}function Np(e,t){return t in e.inputs}function Pp(e,t){return t in e.outputs}var Fp=Symbol(`BINDING`),Ip=new Ei(``);function Lp(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 Zp(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&Fd.SignalBased)!==0};return i&&(a.transform=i),a})}function am(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function om(e,t,n){let r=t instanceof Ba?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new cp(n,r):n}function sm(e){let t=e.get(np,null);if(t===null)throw new di(407,!1);return{rendererFactory:t,sanitizer:e.get(ap,null),changeDetectionScheduler:e.get(ec,null),ngReflect:!1,tracingService:e.get(Ju,null,{optional:!0})}}function cm(e,t,n){let r=um(e);return mu(t,r,r===`svg`?`svg`:r===`math`?uo:n)}function lm(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new di(905,!1)}function um(e){return(e.selectors[0][0]||`div`).toLowerCase()}var dm=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=im(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=am(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=Cte(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){Ac(_c.DynamicComponentStart);let s=tn(null);try{let s=this.componentDef,c=om(s,r||this.ngModule,e),l=sm(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(op(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=fm(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?Bd(l,r,s.encapsulation,t):cm(s,l,o??null);lm(u);let d=t.get(Ip,null),f=pm(u,()=>t.get(vs,null)??ql());d&&d.addHost(f);let p=a?.some(hm)||i?.some(e=>typeof e!=`function`&&e.bindings.some(hm)),m=kd(null,c,null,512|jd(s),null,null,e,l,t,null,eu(u,t,!0));d&&nm&&f instanceof ShadowRoot&&Eo(m,()=>{d.removeHost(f)}),m[27]=u,es(m);let ee=null;try{let e=$p(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);yu(l,u,e),Vl(u,m),Rd(c,m,e),ru(c,e,m),em(c,e),n!==void 0&&_m(e,this.ngContentSelectors,n),ee=vo(e.index,m),m[8]=ee[8],of(c,m,null)}catch(e){throw ee!==null&&zl(ee),zl(m),e}finally{Ac(_c.DynamicComponentEnd),as()}return new gm(this.componentType,m,!!p)}};function fm(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:wte(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[Fp].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 hm(e){let t=e[Fp].kind;return t===`input`||t===`twoWay`}var gm=class extends tp{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=ho(t[1],27),this.location=Ol(this._tNode,t),this.instance=vo(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new Vf(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;tf(n,r[1],r,e,t),this.previousInputValues.set(e,t),Nf(vo(n.index,r),1)}get injector(){return new bl(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function _m(e,t,n){let r=e.projection=[];for(let e=0;e{class e{static __NG_ELEMENT_ID__=ym}return e})();function ym(){return Cm(zo(),Lo())}var bm=class e extends vm{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Ol(this._hostTNode,this._hostLView)}get injector(){return new bl(this._hostTNode,this._hostLView)}get parentInjector(){let e=cl(this._hostTNode,this._hostLView);if(Jc(e)){let t=Zc(e,this._hostLView),n=Yc(e),r=t[1].data[n+8];return new bl(r,t)}return new bl(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=xm(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=$f(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,lf(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 dm(Pi(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(Ba,null);e&&(i=e)}let d=Pi(l.componentType??{}),f=$f(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,lf(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(Gee(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 If(o,i,a,r),t.attachToViewContainerRef(),ua(Sm(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=xm(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=Rf(this._lContainer,t);n&&(da(Sm(this._lContainer),t),dd(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=Rf(this._lContainer,t);return n&&da(Sm(this._lContainer),t)!=null?new Vf(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function xm(e){return e[8]}function Sm(e){return e[8]||=[]}function Cm(e,t){let n,r=t[e.index];return no(r)?n=r:(n=Pf(r,t,null,e),t[e.index]=n,Nd(t,n)),Tm(n,t,e,r),new bm(n,e,t)}function wm(e,t){let n=e[11],r=n.createComment(``),i=mo(t,e);return hu(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var Tm=Om,Em=()=>!1;function Dm(e,t,n){return Em(e,t,n)}function Om(e,t,n,r){if(e[7])return;let i;i=n.type&8?fo(r):wm(t,n),e[7]=i}var km=class e{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},Am=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 Wm(e,t,n){e.queries===null&&(e.queries=new Mm),e.queries.track(new Nm(t,n))}function Gm(e,t){return e.queries.getByIndex(t)}function Km(e,t){let n=e[1],r=Gm(n,t);return r.crossesNgTemplate?zm(n,e,t,[]):Rm(n,e,r,t)}function qm(e,t,n){let r,i=Cn(()=>{r._dirtyCounter();let n=Zm(r,e);if(t&&n===void 0)throw new di(-951,!1);return n});return r=i[en],r._dirtyCounter=T(0),r._flatValue=void 0,i}function Jm(e){return qm(!0,!1,e)}function Ym(e){return qm(!0,!0,e)}function Xm(e,t){let n=e[en];n._lView=Lo(),n._queryIndex=t,n._queryList=Bm(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(e=>e+1))}function Zm(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[2]&4)return t?void 0:ya;let i=Bm(n,r),a=Km(n,r);return i.reset(a,Al),t?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}function Qm(e){return!!e&&typeof e.then==`function`}function $m(e){return!!e&&typeof e.subscribe==`function`}var eh=class{},th=class extends eh{injector;instance=null;constructor(e){super();let t=new Va([...e.providers,{provide:eh,useValue:this}],e.parent||za(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function nh(e,t,n=null){return new th({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var rh=(()=>{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=Ta(!1,e.type),n=t.length>0?nh([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=yi({token:e,providedIn:`environment`,factory:()=>new e(ta(Ba))})}return e})();function O(e){return gc(()=>{let t=lh(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Pl.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(rh).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||iu.Emulated,styles:e.styles||ya,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&Xu(`NgStandalone`),uh(n);let r=e.dependencies;return n.directiveDefs=dh(r,ih),n.pipeDefs=dh(r,Ii),n.id=fh(n),n})}function ih(e){return Pi(e)||Fi(e)}function ah(e,t){if(e==null)return va;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=Fd.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function oh(e){if(e==null)return va;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function sh(e){return gc(()=>{let t=lh(e);return uh(t),t})}function ch(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 lh(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||va,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||ya,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:ah(e.inputs,t),outputs:oh(e.outputs),debugInfo:null}}function uh(e){e.features?.forEach(t=>t(e))}function dh(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 fh(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 Ei(``),mh=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=x(ph,{optional:!0})??[];injector=x(_s);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=Qa(this.injector,t);if(Qm(n))e.push(n);else if($m(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=El({token:e,factory:e.ɵfac})}return e})();function hh(e){return t=>{t.controlDef={create:(e,t)=>{e?.ɵngControlCreate(t)},update:(e,t)=>{e?.ɵngControlUpdate?.(t)},passThroughInput:e}}}function gh(e){return Object.getPrototypeOf(e.prototype).constructor}function _h(e){let t=gh(e.type),n=!0,r=[e];for(;t&&t!==Function.prototype&&t!==Object.prototype;){let i,a=Object.hasOwn(t,Oi)?t[Oi]:void 0,o=Object.hasOwn(t,ki)?t[ki]:void 0;if(oo(e))i=a??o;else{if(a)throw new di(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&&Ch(e,n);let a=i.viewQuery,o=i.contentQueries;if(a&&xh(e,a),o&&Sh(e,o),vh(e,i),Uee(e.outputs,i.outputs),oo(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=Kc(i.hostAttrs,n=Kc(n,i.hostAttrs))}}function bh(e){return e===va?{}:e===ya?[]:e}function xh(e,t){let n=e.viewQuery;e.viewQuery=n?(e,r)=>{t(e,r),n(e,r)}:t}function Sh(e,t){let n=e.contentQueries;e.contentQueries=n?(e,r,i)=>{t(e,r,i),n(e,r,i)}:t}function Ch(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=Kc(e.mergedAttrs,e.attrs);let t=e.tView=Ed(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),Vo(e,!1);let c=Oh(n,t,e,r);ps()&&hd(n,t,c,e),Vl(c,t);let l=Pf(c,t,c,e);t[r+27]=l,Nd(t,l),Dm(l,e,t)}function Th(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;return t.firstCreatePass?(f=Gf(t,d,4,o||null,s||null),No()&&zp(t,e,f,bo(t.consts,l),Jd),Mc(t,f)):f=t.data[d],wh(f,e,t,n,r,i,a,c),ao(f)&&Rd(t,e,f),l!=null&&zd(e,f,u),f}function Eh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=Gf(t,d,4,o||null,s||null),l!=null){let e=bo(t.consts,l);f.localNames=[];for(let t=0;t{throw new di(600,``)})}var Nh=10,Ph=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=x(Ws);afterRenderManager=x(Zu);zonelessEnabled=x(tc);rootEffectScheduler=x(rc);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Hr;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=x(Cs);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(li(e=>!e))}constructor(){x(Ju,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=x(Ba);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=_s.NULL){return this._injector.get(js).run(()=>{if(Ac(_c.BootstrapComponentStart),!this._injector.get(mh).done)throw new di(405,``);let r=Pi(e),i=this._injector.get(eh),a=new dm(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=Fh(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(Ah,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),Ih(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),Ac(_c.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Ac(_c.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(qu.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw Ac(_c.ChangeDetectionEnd),new di(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(),Ac(_c.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(np,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++Co(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;Ih(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(jh,[]).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),()=>Ih(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new di(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=El({token:e,factory:e.ɵfac})}return e})();function Fh(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function Ih(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function k(e,t,n,r){let i=Lo();return dp(i,Yo(),t)&&(Ro(),Yd(cs(),i,e,t,n,r)),k}function Lh(e){if(Xu(`NgAnimateEnter`),!Lu)return Lh;let t=Lo();if(Pte(t))return Lh;let n=zo(),r=t[9].get(js);return zte(Wu(t),n,()=>Rh(t,n,e,r)),Gte(t[9]),id(t[9],Wu(t)),Lh}function Rh(e,t,n,r){let i=mo(t,e),a=e[11],o=Rte(n),s=[],c=!1,l=e=>{if(Gu(e)!==i)return;let t=e instanceof AnimationEvent?`animationend`:`transitionend`;r.runOutsideAngular(()=>{a.listen(i,t,u)})},u=e=>{Gu(e)===i&&(Ku(e,i)&&(c=!0),zh(e,i,a))};if(o&&o.length>0){r.runOutsideAngular(()=>{s.push(a.listen(i,`animationstart`,l)),s.push(a.listen(i,`transitionstart`,l))}),Fte(i,o,s);for(let e of o)a.addClass(i,e);r.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(!c&&(Ate(i,Bu,Lu),!Bu.has(i))){for(let e of o)a.removeClass(i,e);Ru(i)}})})}}function zh(e,t,n){let r=zu.get(t);if(Gu(e)===t&&r&&Ku(e,t)){e.stopPropagation();for(let e of r.classList)n.removeClass(t,e);Ru(t)}}var Bh=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 Vh(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function Hh(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=Vh(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=Vh(s,d,c,f,n);if(p!==0){p<0&&e.updateValue(s,f),s--,c--;continue}let m=n(o,r),ee=n(s,d),h=n(o,l);if(Object.is(h,ee)){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 Kh,a??=Gh(e,o,s,n),Uh(e,i,o,h))e.updateValue(o,l),o++,s++;else if(a.has(h))i.set(m,e.detach(o)),s--;else{let n=e.create(o,t[o]);e.attach(o,n),o++,s++}}for(;o<=c;)Wh(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=Vh(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new Kh,a??=Gh(e,o,s,n);let u=n(o,r);if(Uh(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;)Wh(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 Uh(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Wh(e,t,n,r,i){if(Uh(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function Gh(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 Kh=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 A(e,t,n,r,i,a,o,s){Xu(`NgControlFlow`);let c=Lo(),l=Ro();return Eh(c,l,e,t,n,r,i,bo(l.consts,a),256,o,s),qh}function qh(e,t,n,r,i,a,o,s){Xu(`NgControlFlow`);let c=Lo(),l=Ro();return Eh(c,l,e,t,n,r,i,bo(l.consts,a),512,o,s),qh}function j(e,t){Xu(`NgControlFlow`);let n=Lo(),r=Yo(),i=n[r]===Ou?-1:n[r],a=i===-1?void 0:$h(n,27+i);if(dp(n,r,e)){let r=tn(null);try{if(a!==void 0&&Lf(a,0),e!==-1){let r=27+e,i=$h(n,r),a=ig(n[1],r),o=ep(i,a,n);If(i,cf(n,a,t,{dehydratedView:o}),0,lf(a,o))}}finally{tn(r)}}else if(a!==void 0){let e=Ff(a,0);e!==void 0&&(e[8]=t)}}var Jh=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 Yh(e){return e}function Xh(e,t){return t}var Zh=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function M(e,t,n,r,i,a,o,s,c,l,u,d,f){Xu(`NgControlFlow`);let p=Lo(),m=Ro(),ee=c!==void 0,h=Lo(),g=new Zh(ee,s?o.bind(h[15][8]):o);h[27+e]=g,Eh(p,m,e+1,t,n,r,i,bo(m.consts,a),256),ee&&Eh(p,m,e+2,c,l,u,d,bo(m.consts,f),512)}var Qh=class extends Bh{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,If(this.lContainer,t,e,lf(this.templateTNode,n)),eg(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,tg(this.lContainer,e),ng(this.lContainer,e)}create(e,t){let n=$f(this.lContainer,this.templateTNode.tView.ssrId);return cf(this.hostLView,this.templateTNode,new Jh(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];Ute(e,r),Iu.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function tg(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 ng(e,t){return Rf(e,t)}function rg(e,t){return Ff(e,t)}function ig(e,t){return ho(e,t)}function P(e,t,n){let r=Lo();return dp(r,Yo(),t)&&(Ro(),Hd(cs(),r,e,t,r[11],n)),P}function ag(e,t,n,r,i){tf(t,e,n,i?`class`:`style`,r)}function F(e,t,n,r){let i=Lo(),a=i[1],o=e+27,s=a.firstCreatePass?$p(o,i,2,t,Jd,No(),n,r):a.data[o];if(io(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(op(o),()=>(og(e,t,i,s,r),F))}}return og(e,t,i,s,r),F}function og(e,t,n,r,i){if(Qd(r,n,e,t,cg),ao(r)){let e=n[1];Rd(e,n,r),ru(e,r,n)}i!=null&&zd(n,r)}function I(){let e=Ro(),t=$d(zo());return e.firstCreatePass&&em(e,t),Fo(t)&&Io(),Mo(),t.classesWithoutHost!=null&&Vc(t)&&ag(e,t,Lo(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&Hc(t)&&ag(e,t,Lo(),t.stylesWithoutHost,!1),I}function L(e,t,n,r){return F(e,t,n,r),I(),L}function R(e,t,n,r){let i=Lo(),a=i[1],o=e+27,s=a.firstCreatePass?tm(o,a,2,t,n,r):a.data[o];return Qd(s,i,e,t,cg),r!=null&&zd(i,s),R}function z(){return Fo($d(zo()))&&Io(),Mo(),z}function sg(e,t,n,r){return R(e,t,n,r),z(),sg}var cg=(e,t,n,r,i)=>(ms(!0),mu(t[11],r,ds()));function lg(e,t,n){let r=Lo(),i=r[1],a=e+27,o=i.firstCreatePass?$p(a,r,8,`ng-container`,Jd,No(),t,n):i.data[a];if(Qd(o,r,e,`ng-container`,fg),ao(o)){let e=r[1];Rd(e,r,o),ru(e,o,r)}return n!=null&&zd(r,o),lg}function ug(){let e=Ro(),t=$d(zo());return e.firstCreatePass&&em(e,t),ug}function dg(e,t,n){return lg(e,t,n),ug(),dg}var fg=(e,t,n,r,i)=>(ms(!0),lte(t[11],``));function B(){return Lo()}function V(e,t,n){let r=Lo();return dp(r,Yo(),t)&&(Ro(),Ud(cs(),r,e,t,r[11],n)),V}var pg=void 0;function mg(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var hg=[`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`,mg],gg=Object.create(null);function _g(e){let t=bg(e),n=vg(t);if(n)return n;let r=t.split(`-`)[0];if(n=vg(r),n)return n;if(r===`en`)return hg;throw new di(701,!1)}function vg(e){if(!(e in gg)){let t=Xi.ng&&Xi.ng.common&&Xi.ng.common.locales&&Xi.ng.common.locales[e];return t!==void 0&&(gg[e]=t),t}return gg[e]}var yg={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 bg(e){return e.toLowerCase().replace(/_/g,`-`)}var xg=`en-US`;function Sg(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function H(e,t,n){let r=Lo(),i=Ro(),a=zo();return Cg(i,r,r[11],a,e,t,n),H}function U(e,t,n){let r=Lo(),i=Ro(),a=zo();return(a.type&3||n)&&_p(a,i,r,n,r[11],e,t,hp(a,r,t)),U}function Cg(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=hp(r,t,a),_p(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 Ng(e){return(e&2)==2}function Pg(e,t){return e&131071|t<<17}function Fg(e){return e|2}function Ig(e){return(e&131068)>>2}function Lg(e,t){return e&-131069|t<<2}function Rg(e){return(e&1)==1}function zg(e){return e|1}function Bg(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=Mg(o),c=Ig(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||ga(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=Mg(e[s+1]);e[r+1]=jg(t,s),t!==0&&(e[t+1]=Lg(e[t+1],r)),e[s+1]=Pg(e[s+1],r)}else e[r+1]=jg(s,0),s!==0&&(e[s+1]=Lg(e[s+1],r)),s=r}else e[r+1]=jg(c,0),s===0?s=r:e[c+1]=Lg(e[c+1],r),c=r;l&&(e[r+1]=Fg(e[r+1])),Hg(e,u,r,!0),Hg(e,u,r,!1),Vg(t,u,e,r,a),o=jg(s,c),a?t.classBindings=o:t.styleBindings=o}function Vg(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&ga(a,t)>=0&&(n[r+1]=zg(n[r+1]))}function Hg(e,t,n,r){let i=e[n+1],a=t===null,o=r?Mg(i):Ig(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];Ug(n,t)&&(s=!0,e[o+1]=r?zg(i):Fg(i)),o=r?Mg(i):Ig(i)}s&&(e[n+1]=r?Fg(i):zg(i))}function Ug(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?ga(e,t)>=0:!1}var Wg={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Gg(e){return e.substring(Wg.key,Wg.keyEnd)}function Kg(e){return Jg(e),qg(e,Yg(e,0,Wg.textEnd))}function qg(e,t){let n=Wg.textEnd;return n===t?-1:(t=Wg.keyEnd=Xg(e,Wg.key=t,n),Yg(e,t,n))}function Jg(e){Wg.key=0,Wg.keyEnd=0,Wg.value=0,Wg.valueEnd=0,Wg.textEnd=e.length}function Yg(e,t,n){for(;t32;)t++;return t}function Zg(e,t,n){return e_(e,t,n,!1),Zg}function G(e,t){return e_(e,t,null,!0),G}function Qg(e){t_(d_,$g,e,!0)}function $g(e,t){for(let n=Kg(t);n>=0;n=qg(t,n))ma(e,Gg(t),!0)}function e_(e,t,n,r){let i=Lo(),a=Ro(),o=Xo(2);if(a.firstUpdatePass&&r_(a,e,o,r),t!==Ou&&dp(i,o,t)){let s=a.data[os()];p_(a,s,i,i[11],e,i[o+1]=g_(t,n),r,o)}}function t_(e,t,n,r){let i=Ro(),a=Xo(2);i.firstUpdatePass&&r_(i,null,a,r);let o=Lo();if(n!==Ou&&dp(o,a,n)){let s=i.data[os()];if(__(s,r)&&!n_(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=hi(e,n||``)),ag(i,s,o,n,r)}else f_(i,s,o,o[11],o[a+1],o[a+1]=u_(e,t,n),r,a)}}function n_(e,t){return t>=e.expandoStartIndex}function r_(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[os()],o=n_(e,n);__(a,r)&&t===null&&!o&&(t=!1),t=i_(i,a,t,r),Bg(i,a,t,n,o,r)}}function i_(e,t,n,r){let i=nte(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=c_(null,e,t,n,r),n=l_(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=c_(i,e,t,n,r),a===null){let n=a_(e,t,r);n!==void 0&&Array.isArray(n)&&(n=c_(null,e,t,n[1],r),n=l_(n,t.attrs,r),o_(e,t,r,n))}else a=s_(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function a_(e,t,n){let r=n?t.classBindings:t.styleBindings;if(Ig(r)!==0)return e[Mg(r)]}function o_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[Mg(i)]=r}function s_(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===Ou&&(u=l?ya:void 0);let d=l?ha(u,r):c===r?u:void 0;if(a&&!h_(d)&&(d=ha(t,r)),h_(d)&&(s=d,o))return s;let f=e[i+1];i=o?Mg(f):Ig(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=ha(e,r))}return s}function h_(e){return e!==void 0}function g_(e,t){return e==null||e===``||(typeof t==`string`?e=ou(e)+t:typeof e==`object`&&(e=mi(ou(e)))),e}function __(e,t){return!!(e.flags&(t?8:16))}function K(e,t=``){let n=Lo(),r=Ro(),i=e+27,a=r.firstCreatePass?Gf(r,i,1,t,null):r.data[i],o=ine(r,n,a,t);n[i]=o,ps()&&hd(r,n,o,a),Vo(a,!1)}var ine=(e,t,n,r)=>(ms(!0),ste(t[11],r));function v_(e,t,n,r=``){return dp(e,Yo(),n)?t+Ri(n)+r:Ou}function ane(e,t,n,r,i,a=``){let o=fp(e,Jo(),n,i);return Xo(2),o?t+Ri(n)+r+Ri(i)+a:Ou}function one(e,t,n,r,i,a,o,s=``){let c=pp(e,Jo(),n,i,o);return Xo(3),c?t+Ri(n)+r+Ri(i)+a+Ri(o)+s:Ou}function sne(e,t,n,r,i,a,o,s,c,l=``){let u=mp(e,Jo(),n,i,o,c);return Xo(4),u?t+Ri(n)+r+Ri(i)+a+Ri(o)+s+Ri(c)+l:Ou}function q(e){return J(``,e),q}function J(e,t,n){let r=Lo(),i=v_(r,e,t,n);return i!==Ou&&x_(r,os(),i),J}function Y(e,t,n,r,i){let a=Lo(),o=ane(a,e,t,n,r,i);return o!==Ou&&x_(a,os(),o),Y}function y_(e,t,n,r,i,a,o){let s=Lo(),c=one(s,e,t,n,r,i,a,o);return c!==Ou&&x_(s,os(),c),y_}function b_(e,t,n,r,i,a,o,s,c){let l=Lo(),u=sne(l,e,t,n,r,i,a,o,s,c);return u!==Ou&&x_(l,os(),u),b_}function x_(e,t,n){let r=po(t,e);cte(e[11],r,n)}function S_(e,t,n){pc(t)&&(t=t());let r=Lo();return dp(r,Yo(),t)&&(Ro(),Hd(cs(),r,e,t,r[11],n)),S_}function C_(e,t){let n=pc(e);return n&&e.set(t),n}function w_(e,t){let n=Lo(),r=Ro(),i=zo();return Cg(r,n,n[11],i,e,t),w_}var T_={};function E_(e){Xu(`NgLet`);let t=Ro(),n=Lo(),r=e+27;return Vo(Gf(t,r,128,null,null),!1),_o(t,n,r,T_),E_}function D_(e){return _o(Ro(),Lo(),os(),e),e}function O_(e){let t=go(Wo(),27+e);if(t===T_)throw new di(314,!1);return t}function k_(e,t,n=``){return v_(Lo(),e,t,n)}function A_(e,t,n){let r=Ro();r.firstCreatePass&&j_(t,r.data,r.blueprint,oo(e),n)}function j_(e,t,n,r,i){if(e=_i(e),Array.isArray(e))for(let a=0;a>20;if(Na(e)||!e.multi){let r=new Bc(l,i,Rp,null),p=P_(c,t,i?u:u+f,d);p===-1?(ll(al(s,o),a,c),M_(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=P_(c,t,u+f,d),m=P_(c,t,u,u+f),ee=p>=0&&n[p],h=m>=0&&n[m];if(i&&!h||!i&&!ee){ll(al(s,o),a,c);let u=une(i?lne:cne,n.length,i,r,l,e);!i&&h&&(n[m].providerFactory=u),M_(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=N_(n[i?m:p],l,!i&&r);M_(a,e,p>-1?p:m,t)}!i&&r&&h&&n[m].componentProviders++}}}function M_(e,t,n,r){let i=Na(t),a=Pa(t);if(i||a){let o=(a?_i(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 N_(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function P_(e,t,n,r){for(let i=n;i{n.providersResolver=(t,n)=>A_(t,n?n(e):e,!1),t&&(n.viewProvidersResolver=(e,n)=>A_(e,n?n(t):t,!0))}}function L_(e,t){let n=qo()+e,r=Lo();return r[n]===Ou?lp(r,n,t()):up(r,n)}function R_(e,t,n){return V_(Lo(),qo(),e,t,n)}function z_(e,t,n,r){return H_(Lo(),qo(),e,t,n,r)}function dne(e,t,n,r,i,a,o){return fne(Lo(),qo(),e,t,n,r,i,a)}function B_(e,t){let n=e[t];return n===Ou?void 0:n}function V_(e,t,n,r,i,a){let o=t+n;return dp(e,o,i)?lp(e,o+1,a?r.call(a,i):r(i)):B_(e,o+1)}function H_(e,t,n,r,i,a,o){let s=t+n;return fp(e,s,i,a)?lp(e,s+2,o?r.call(o,i,a):r(i,a)):B_(e,s+2)}function fne(e,t,n,r,i,a,o,s,c){let l=t+n;return mp(e,l,i,a,o,s)?lp(e,l+4,c?r.call(c,i,a,o,s):r(i,a,o,s)):B_(e,l+4)}function U_(e,t){let n=Ro(),r,i=e+27;n.firstCreatePass?(r=pne(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=oa(r.type,!0)),o=Ji(Rp);try{let e=$c(!1),t=a();return $c(e),_o(n,Lo(),i,t),t}finally{Ji(o)}}function pne(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function W_(e,t,n){let r=e+27,i=Lo(),a=go(i,r);return K_(i,r)?V_(i,qo(),t,a.transform,n,a):a.transform(n)}function G_(e,t,n,r){let i=e+27,a=Lo(),o=go(a,i);return K_(a,i)?H_(a,qo(),t,o.transform,n,r,o):o.transform(n,r)}function K_(e,t){return e[1].data[t].pure}function q_(e,t){return Wf(e,t)}var mne=(()=>{class e{applicationErrorHandler=x(Ws);appRef=x(Ph);taskService=x(Cs);ngZone=x(js);zonelessEnabled=x(tc);tracing=x(Ju,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new or;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(ks):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(x(nc,{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?Ds:Es;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=El({token:e,factory:e.ɵfac})}return e})();function hne(){return[{provide:ec,useExisting:mne},{provide:js,useClass:zs},{provide:tc,useValue:!0}]}function gne(){return typeof $localize<`u`&&$localize.locale||`en-US`}var J_=new Ei(``,{factory:()=>x(J_,{optional:!0,skipSelf:!0})||gne()}),Y_=class{destroyed=!1;listeners=null;errorHandler=x(Us,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=x(ys);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new di(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(fi(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&&_ne(this.listeners)),tn(t),this.isEmitting=!1}}};function _ne(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 Gn(e)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var vne=e=>e;function Q(e,t){return typeof e==`function`?X_(Vn(e,vne,t?.equal),t?.debugName,t?.set):X_(Vn(e.source,e.computation,e.equal),e.debugName,e.set)}function X_(e,t,n){let r=e[en],i=e;if(n!==void 0){let t=e=>Hn(r,e);i.set=e=>n(e,t),i.update=r=>n(r(Z(e)),t)}else i.set=e=>Hn(r,e),i.update=e=>Un(r,e);return i.asReadonly=Ks.bind(e),i}var Z_=!1;function yne(){return Z_}function Q_(e){Z_=e}function $_(e,t){let n=Object.create(hc);n.value=e,n.transformFn=t?.transform;function r(){if(an(n),n.value===mc)throw new di(-950,null);return n.value}return r[en]=n,r}function ev(e){return new Y_}function tv(e,t){return $_(e,t)}function bne(e){return $_(mc,e)}var $=(tv.required=bne,tv);function nv(e,t){let n=Object.create(hc),r=new Y_;n.value=e;function i(){return an(n),rv(n.value),n.value}return i[en]=n,i.asReadonly=Ks.bind(i),i.set=e=>{n.equal(n.value,e)||(An(n,e),r.emit(e))},i.update=e=>{rv(n.value),i.set(e(n.value))},i.subscribe=r.subscribe.bind(r),i.destroyRef=r.destroyRef,i}function rv(e){if(e===mc)throw new di(952,!1)}function iv(e,t){return nv(e,t)}function xne(e){return nv(mc,e)}var av=(iv.required=xne,iv);function ov(e,t){return Jm(t)}function Sne(e,t){return Ym(t)}var sv=(ov.required=Sne,ov),Cne=(()=>{class e{static __NG_ELEMENT_ID__=wne}return e})();function wne(e){return Tne(zo(),Lo(),(e&16)==16)}function Tne(e,t,n){if(io(e)&&!n){let n=vo(e.index,t);return new Vf(n,n)}if(e.type&175){let e=t[15];return new Vf(e,t)}return null}var cv=new Ei(``),Ene=new Ei(``);function lv(e){return!e.moduleRef}function Dne(e){let t=lv(e)?e.r3Injector:e.moduleRef.injector,n=t.get(js);return n.run(()=>{lv(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Ws),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),lv(e)){let n=()=>t.destroy(),r=e.platformInjector.get(cv);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(cv);n.add(t),e.moduleRef.onDestroy(()=>{Ih(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return kne(r,n,()=>{let n=t.get(Cs),r=n.add(),i=t.get(mh);return i.runInitializers(),i.donePromise.then(()=>{if(Sg(t.get(J_,xg)||`en-US`),!t.get(Ene,!0))return lv(e)?t.get(Ph):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(lv(e)){let n=t.get(Ph);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return One?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var One;function kne(e,t,n){try{let r=n();return Qm(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var uv=null;function Ane(e=[],t){return _s.create({name:t,providers:[{provide:Fa,useValue:`platform`},{provide:cv,useValue:new Set([()=>uv=null])},...e]})}function jne(e=[]){if(uv)return uv;let t=Ane(e);return uv=t,Mh(),Mne(t),t}function Mne(e){let t=e.get(Ys,null);Qa(e,()=>{t?.forEach(e=>e())})}function Nne(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;Ac(_c.BootstrapApplicationStart);try{let e=i?.injector??jne(r);return Dne({r3Injector:new th({providers:[hne(),Gs,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{Ac(_c.BootstrapApplicationEnd)}}function dv(e){return typeof e==`boolean`?e:e!=null&&e!==`false`}var fv=Symbol(`NOT_SET`),pv=new Set,Pne={...Mn,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??pv)t()}finally{_n(e)}}};function mv(e,t){let n=t?.injector??x(_s),r=n.get(ec),i=n.get(Zu),a=n.get(Ju,null,{optional:!0});i.impl??=n.get($u);let o=e;typeof o==`function`&&(o={mixedReadWrite:e});let s=n.get(Qs,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 hv=null;function gv(){return hv}function Ine(e){hv??=e}var Lne=class{},_v=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(_v||{}),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||{}),yv=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(yv||{}),bv={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 Rne(e){return _g(e)[yg.LocaleId]}function zne(e,t,n){let r=_g(e);return Ev(Ev([r[yg.DayPeriodsFormat],r[yg.DayPeriodsStandalone]],t),n)}function Bne(e,t,n){let r=_g(e);return Ev(Ev([r[yg.DaysFormat],r[yg.DaysStandalone]],t),n)}function Vne(e,t,n){let r=_g(e);return Ev(Ev([r[yg.MonthsFormat],r[yg.MonthsStandalone]],t),n)}function Hne(e,t){let n=_g(e)[yg.Eras];return Ev(n,t)}function xv(e,t){return Ev(_g(e)[yg.DateFormat],t)}function Sv(e,t){return Ev(_g(e)[yg.TimeFormat],t)}function Cv(e,t){let n=_g(e)[yg.DateTimeFormat];return Ev(n,t)}function wv(e,t){let n=_g(e),r=n[yg.NumberSymbols][t];if(r===void 0){if(t===bv.CurrencyDecimal)return n[yg.NumberSymbols][bv.Decimal];if(t===bv.CurrencyGroup)return n[yg.NumberSymbols][bv.Group]}return r}function Tv(e){if(!e[yg.ExtraData])throw new di(2303,!1)}function Une(e){let t=_g(e);return Tv(t),(t[yg.ExtraData][2]||[]).map(e=>typeof e==`string`?Dv(e):[Dv(e[0]),Dv(e[1])])}function Wne(e,t,n){let r=_g(e);return Tv(r),Ev(Ev([r[yg.ExtraData][0],r[yg.ExtraData][1]],t)||[],n)||[]}function Ev(e,t){for(let n=t;n>-1;n--)if(e[n]!==void 0)return e[n];throw new di(2304,!1)}function Dv(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var Gne=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Ov=Object.create(null),Kne=/((?:[^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]*)/,qne=256;function Jne(e,t,n,r){let i=ire(e);Yne(t),t=Av(n,t)||t;let a=[],o;for(;t;)if(o=Kne.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=Vv(r,s),i=rre(i,r));let c=``;return a.forEach(e=>{let t=tre(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function Yne(e){if(e.length>qne)throw new di(2300,!1)}function kv(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function Av(e,t){let n=Rne(e);if(Ov[n]??=Object.create(null),Ov[n][t])return Ov[n][t];let r=``;switch(t){case`shortDate`:r=xv(e,yv.Short);break;case`mediumDate`:r=xv(e,yv.Medium);break;case`longDate`:r=xv(e,yv.Long);break;case`fullDate`:r=xv(e,yv.Full);break;case`shortTime`:r=Sv(e,yv.Short);break;case`mediumTime`:r=Sv(e,yv.Medium);break;case`longTime`:r=Sv(e,yv.Long);break;case`fullTime`:r=Sv(e,yv.Full);break;case`short`:let t=Av(e,`shortTime`),n=Av(e,`shortDate`);r=jv(Cv(e,yv.Short),[t,n]);break;case`medium`:let i=Av(e,`mediumTime`),a=Av(e,`mediumDate`);r=jv(Cv(e,yv.Medium),[i,a]);break;case`long`:let o=Av(e,`longTime`),s=Av(e,`longDate`);r=jv(Cv(e,yv.Long),[o,s]);break;case`full`:let c=Av(e,`fullTime`),l=Av(e,`fullDate`);r=jv(Cv(e,yv.Full),[c,l])}return r&&(Ov[n][t]=r),r}function jv(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return Object.hasOwn(t,n)?t[n]:e})),e}function Mv(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 Xne(s,t);let c=wv(o,bv.MinusSign);return Mv(s,t,c,r,i)}}function Zne(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 di(2301,!1)}}function Pv(e,t,n=_v.Format,r=!1){return function(i,a){return Qne(i,a,e,t,n,r)}}function Qne(e,t,n,r,i,a){switch(n){case 2:return Vne(t,i,r)[e.getMonth()];case 1:return Bne(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=Une(t),a=Wne(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?`+`:``)+Mv(o,2,a)+Mv(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+Mv(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+Mv(o,2,a)+`:`+Mv(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+Mv(o,2,a)+`:`+Mv(Math.abs(i%60),2,a);default:throw new di(2310,!1)}}}var $ne=0,Iv=4;function ere(e){let t=kv(e,$ne,1).getDay();return kv(e,0,1+(t<=Iv?Iv:11)-t)}function Lv(e){let t=e.getDay(),n=t===0?-3:Iv-t;return kv(e.getFullYear(),e.getMonth(),e.getDate()+n)}function Rv(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=Lv(n),t=ere(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return Mv(i,e,wv(r,bv.MinusSign))}}function zv(e,t=!1){return function(n,r){return Mv(Lv(n).getFullYear(),e,wv(r,bv.MinusSign),t)}}var Bv=Object.create(null);function tre(e){if(Bv[e])return Bv[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=Pv(3,vv.Abbreviated);break;case`GGGG`:t=Pv(3,vv.Wide);break;case`GGGGG`:t=Pv(3,vv.Narrow);break;case`y`:t=Nv(0,1,0,!1,!0);break;case`yy`:t=Nv(0,2,0,!0,!0);break;case`yyy`:t=Nv(0,3,0,!1,!0);break;case`yyyy`:t=Nv(0,4,0,!1,!0);break;case`Y`:t=zv(1);break;case`YY`:t=zv(2,!0);break;case`YYY`:t=zv(3);break;case`YYYY`:t=zv(4);break;case`M`:case`L`:t=Nv(1,1,1);break;case`MM`:case`LL`:t=Nv(1,2,1);break;case`MMM`:t=Pv(2,vv.Abbreviated);break;case`MMMM`:t=Pv(2,vv.Wide);break;case`MMMMM`:t=Pv(2,vv.Narrow);break;case`LLL`:t=Pv(2,vv.Abbreviated,_v.Standalone);break;case`LLLL`:t=Pv(2,vv.Wide,_v.Standalone);break;case`LLLLL`:t=Pv(2,vv.Narrow,_v.Standalone);break;case`w`:t=Rv(1);break;case`ww`:t=Rv(2);break;case`W`:t=Rv(1,!0);break;case`d`:t=Nv(2,1);break;case`dd`:t=Nv(2,2);break;case`c`:case`cc`:t=Nv(7,1);break;case`ccc`:t=Pv(1,vv.Abbreviated,_v.Standalone);break;case`cccc`:t=Pv(1,vv.Wide,_v.Standalone);break;case`ccccc`:t=Pv(1,vv.Narrow,_v.Standalone);break;case`cccccc`:t=Pv(1,vv.Short,_v.Standalone);break;case`E`:case`EE`:case`EEE`:t=Pv(1,vv.Abbreviated);break;case`EEEE`:t=Pv(1,vv.Wide);break;case`EEEEE`:t=Pv(1,vv.Narrow);break;case`EEEEEE`:t=Pv(1,vv.Short);break;case`a`:case`aa`:case`aaa`:t=Pv(0,vv.Abbreviated);break;case`aaaa`:t=Pv(0,vv.Wide);break;case`aaaaa`:t=Pv(0,vv.Narrow);break;case`b`:case`bb`:case`bbb`:t=Pv(0,vv.Abbreviated,_v.Standalone,!0);break;case`bbbb`:t=Pv(0,vv.Wide,_v.Standalone,!0);break;case`bbbbb`:t=Pv(0,vv.Narrow,_v.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=Pv(0,vv.Abbreviated,_v.Format,!0);break;case`BBBB`:t=Pv(0,vv.Wide,_v.Format,!0);break;case`BBBBB`:t=Pv(0,vv.Narrow,_v.Format,!0);break;case`h`:t=Nv(3,1,-12);break;case`hh`:t=Nv(3,2,-12);break;case`H`:t=Nv(3,1);break;case`HH`:t=Nv(3,2);break;case`m`:t=Nv(4,1);break;case`mm`:t=Nv(4,2);break;case`s`:t=Nv(5,1);break;case`ss`:t=Nv(5,2);break;case`S`:t=Nv(6,1);break;case`SS`:t=Nv(6,2);break;case`SSS`:t=Nv(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=Fv(0);break;case`ZZZZZ`:t=Fv(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=Fv(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=Fv(2);break;default:return null}return Bv[e]=t,t}function Vv(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function nre(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function rre(e,t,n){let r=e.getTimezoneOffset();return nre(e,-1*(Vv(t,r)-r))}function ire(e){if(Hv(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 kv(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(Gne))return are(n)}let t=new Date(e);if(!Hv(t))throw new di(2311,!1);return t}function are(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 Hv(e){return e instanceof Date&&!isNaN(e.valueOf())}var Uv=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=x(_s);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)(Rp(vm))};static ɵdir=sh({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[xc]})}return e})();function ore(e,t){return new di(2100,!1)}var sre=`mediumDate`,cre=new Ei(``),lre=new Ei(``),Wv=(()=>{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??sre,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Jne(t,e,i||this.locale,a)}catch(t){throw ore(e,t.message)}}static ɵfac=function(t){return new(t||e)(Rp(J_,16),Rp(cre,24),Rp(lre,24))};static ɵpipe=ch({name:`date`,type:e,pure:!0})}return e})(),Gv=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=ch({name:`json`,type:e,pure:!1})}return e})();function ure(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 dre=`browser`,Kv=class{_doc;constructor(e){this._doc=e}manager},qv=(()=>{class e extends Kv{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)(ta(vs))};static ɵprov=yi({token:e,factory:e.ɵfac})}return e})(),Jv=new Ei(``),Yv=(()=>{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 qv));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof qv);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 di(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(ta(Jv),ta(js))};static ɵprov=yi({token:e,factory:e.ɵfac})}return e})(),Xv=`ng-app-id`;function Zv(e){for(let t of e)t.remove()}function Qv(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function fre(e,t,n,r){let i=e.head?.querySelectorAll(`style[${Xv}="${t}"],link[${Xv}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(Xv),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 $v(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var ey=(()=>{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,fre(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,Qv);t?.forEach(e=>this.addUsage(e,this.external,$v))}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&&(Zv(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Zv(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,Qv(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,$v(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)(ta(vs),ta(qs),ta(Zs,8),ta(Xs))};static ɵprov=yi({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`},ny=/%COMP%/g,ry=`%COMP%`,pre=`_nghost-${ry}`,mre=`_ngcontent-${ry}`,hre=!0,gre=new Ei(``,{factory:()=>hre}),_re=new Ei(``);function vre(e){return mre.replace(ny,e)}function yre(e){return pre.replace(ny,e)}function iy(e,t){return t.map(t=>t.replace(ny,e))}var ay=(()=>{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 oy(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 uy?n.applyToHost(e):n instanceof ly&&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 iu.Emulated:r=new uy(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case iu.ShadowDom:return new cy(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case iu.ExperimentalIsolatedShadowDom:return new cy(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new ly(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)(ta(Yv),ta(Ip),ta(qs),ta(gre),ta(vs),ta(js),ta(Zs),ta(Ju,8),ta(_re,8))};static ɵprov=yi({token:e,factory:e.ɵfac})}return e})(),oy=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){(sy(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=sy(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new di(-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 di(-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&(ku.DashCase|ku.Important)?e.style.setProperty(t,n,r&ku.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&ku.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=gv().getGlobalEventTarget(this.doc,e),!e))throw new di(-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 sy(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var cy=class extends oy{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=iy(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=$v(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)}},ly=class extends oy{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?iy(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&&Iu.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},uy=class extends ly{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=vre(l),this.hostAttr=yre(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}},bre=class e extends Lne{supportsDOMEvents=!0;static makeCurrent(){Ine(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=xre();return t==null?null:Sre(t)}resetBaseElement(){dy=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return ure(document.cookie,e)}},dy=null;function xre(){return dy||=document.head.querySelector(`base`),dy?dy.getAttribute(`href`):null}function Sre(e){return new URL(e,document.baseURI).pathname}var fy=[`alt`,`control`,`meta`,`shift`],Cre={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},wre={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},Tre=(()=>{class e extends Kv{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(()=>gv().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.`),fy.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=Cre[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`),fy.forEach(t=>{if(t!==n){let n=wre[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)(ta(vs))};static ɵprov=yi({token:e,factory:e.ɵfac})}return e})();async function Ere(e,t,n){return Nne({rootComponent:e,...Dre(t,n)})}function Dre(e,t){return{platformRef:t?.platformRef,appProviders:[...my,...e?.providers??[]],platformProviders:py}}function Ore(){bre.makeCurrent()}function kre(){return new Us}function Are(){return Kl(document),document}var py=[{provide:Xs,useValue:dre},{provide:Ys,useValue:Ore,multi:!0},{provide:vs,useFactory:Are}],my=[{provide:Fa,useValue:`root`},{provide:Us,useFactory:kre},{provide:Jv,useClass:qv,multi:!0},{provide:Jv,useClass:Tre,multi:!0},ay,{provide:Ip,useClass:ey},{provide:ey,useExisting:Ip},Yv,{provide:np,useExisting:ay},[]];function hy(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 yy({code:i,why:_y(a.why,e),fix:_y(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:_y(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function Sy(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 hi(e,t){return e?t?`${e} ${t}`:e:t||``}var Wee=pi({__forward_ref__:pi});function gi(e){return e.__forward_ref__=gi,e}function _i(e){return vi(e)?e():e}function vi(e){return typeof e==`function`&&Object.hasOwn(e,Wee)&&e.__forward_ref__===gi}function yi(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function bi(e){return xi(e,wi)}function xi(e,t){return Object.hasOwn(e,t)&&e[t]||null}function Si(e){return(e?.[wi]??null)||null}function Ci(e){return e&&Object.hasOwn(e,Ti)?e[Ti]:null}var wi=pi({ɵprov:pi}),Ti=pi({ɵinj:pi}),Ei=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=yi({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Di(e){return e&&!!e.ɵproviders}var Oi=pi({ɵcmp:pi}),ki=pi({ɵdir:pi}),Ai=pi({ɵpipe:pi}),ji=pi({ɵfac:pi}),Mi=pi({__NG_ELEMENT_ID__:pi}),Ni=pi({__NG_ENV_ID__:pi});function Pi(e){return Li(e,`@Component`),e[Oi]||null}function Fi(e){return Li(e,`@Directive`),e[ki]||null}function Ii(e){return Li(e,`@Pipe`),e[Ai]||null}function Li(e,t){if(e==null)throw new di(-919,!1)}function Ri(e){return typeof e==`string`?e:e==null?``:String(e)}var zi=pi({ngErrorCode:pi}),Bi=pi({ngErrorMessage:pi}),Vi=pi({ngTokenPath:pi});function Hi(e,t){return Wi(``,-200,t)}function Ui(e,t){throw new di(-201,!1)}function Wi(e,t,n){let r=new di(t,e);return r[zi]=t,r[Bi]=e,n&&(r[Vi]=n),r}function Gi(e){return e[zi]}var Ki;function qi(){return Ki}function Ji(e){let t=Ki;return Ki=e,t}function Yi(e,t,n){let r=bi(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;Ui(e,``)}var Xi=globalThis,Zi={},Qi=`__NG_DI_FLAG__`,$i=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=na(t)||0;try{return this.injector.get(e,n&8?null:Zi,n)}catch(e){if(Bn(e))return e;throw e}}};function ea(e,t=0){let n=Ln();if(n===void 0)throw new di(-203,!1);if(n===null)return Yi(e,void 0,t);{let r=ra(t),i=n.retrieve(e,r);if(Bn(i)){if(r.optional)return null;throw i}return i}}function ta(e,t=0){return(qi()||ea)(_i(e),t)}function x(e,t){return ta(e,na(t))}function na(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function ra(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function ia(e){let t=[];for(let n=0;nArray.isArray(e)?la(e,t):t(e))}function ua(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function da(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function fa(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 ma(e,t,n){let r=ga(e,t);return r>=0?e[r|1]=n:(r=~r,pa(e,r,t,n)),r}function ha(e,t){let n=ga(e,t);if(n>=0)return e[n|1]}function ga(e,t){return _a(e,t,1)}function _a(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 la(t,e=>{let t=e;Da(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&Ea(i,a),n}function Ea(e,t){for(let n=0;n{t(e,r)})}}function Da(e,t,n,r){if(e=_i(e),!e)return!1;let i=null,a=Ci(e),o=!a&&Pi(e);if(!a&&!o){let t=e.ngModule;if(a=Ci(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)Da(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{la(a.imports,i=>{Da(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&Ea(e,t)}if(!s){let e=oa(i)||(()=>new i);t({provide:i,useFactory:e,deps:ya},i),t({provide:Sa,useValue:i,multi:!0},i),t({provide:ba,useValue:()=>ta(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;Oa(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function Oa(e,t){for(let n of e)Di(n)&&(n=n.ɵproviders),Array.isArray(n)?Oa(n,t):t(n)}var ka=pi({provide:String,useValue:pi});function Aa(e){return typeof e==`object`&&!!e&&ka in e}function ja(e){return!!(e&&e.useExisting)}function Ma(e){return!!(e&&e.useFactory)}function Na(e){return typeof e==`function`}function Pa(e){return!!e.useClass}var Fa=new Ei(``),Ia={},La={},Ra=void 0;function za(){return Ra===void 0&&(Ra=new Ca),Ra}var Ba=class{},Va=class extends Ba{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,Za(e,e=>this.processProvider(e)),this.records.set(xa,qa(void 0,this)),r.has(`environment`)&&this.records.set(Ba,qa(void 0,this));let i=this.records.get(Fa);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Sa,ya,{self:!0}))}retrieve(e,t){let n=na(t)||0;try{return this.get(e,Zi,n)}catch(e){if(Bn(e))return e;throw e}}destroy(){Ka(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 Ka(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Ka(this);let t=Rn(this),n=Ji(void 0);try{return e()}finally{Rn(t),Ji(n)}}get(e,t=Zi,n){if(Ka(this),Object.hasOwn(e,Ni))return e[Ni](this);let r=na(n),i=Rn(this),a=Ji(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=Xa(e)&&bi(e);t=n&&this.injectableDefInScope(n)?qa(Ha(e),Ia):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?za():this.parent;return t=r&8&&t===Zi?null:t,n.get(e,t)}catch(e){let t=Gi(e);throw t===-200||t===-201?new di(t,null):e}finally{Ji(a),Rn(i)}}resolveInjectorInitializers(){let e=tn(null),t=Rn(this),n=Ji(void 0);try{let e=this.get(ba,ya,{self:!0});for(let t of e)t()}finally{Rn(t),Ji(n),tn(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=_i(e);let t=Na(e)?e:_i(e&&e.provide),n=Wa(e);if(!Na(e)&&e.multi===!0){let n=this.records.get(t);n||(n=qa(void 0,Ia,!0),n.factory=()=>ia(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===La)throw Hi(``);return t.value===Ia&&(t.value=La,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&Ya(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{tn(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=_i(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 Ha(e){let t=bi(e),n=t===null?oa(e):t.factory;if(n!==null)return n;if(e instanceof Ei)throw new di(-204,!1);if(e instanceof Function)return Ua(e);throw new di(-204,!1)}function Ua(e){if(e.length>0)throw new di(-204,!1);let t=Si(e);return t===null?()=>new e:()=>t.factory(e)}function Wa(e){return Aa(e)?qa(void 0,e.useValue):qa(Ga(e),Ia)}function Ga(e,t,n){let r;if(Na(e)){let t=_i(e);return oa(t)||Ha(t)}if(Aa(e))r=()=>_i(e.useValue);else if(Ma(e))r=()=>e.useFactory(...ia(e.deps||[]));else if(ja(e))r=(t,n)=>ta(_i(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=_i(e&&(e.useClass||e.provide));if(Ja(e))r=()=>new t(...ia(e.deps));else return oa(t)||Ha(t)}return r}function Ka(e){if(e.destroyed)throw new di(-205,!1)}function qa(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function Ja(e){return!!e.deps}function Ya(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function Xa(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function Za(e,t){for(let n of e)Array.isArray(n)?Za(n,t):n&&Di(n)?Za(n.ɵproviders,t):t(n)}function Qa(e,t){let n;e instanceof Va?(Ka(e),n=e):n=new $i(e);let r=Rn(n),i=Ji(void 0);try{return t()}finally{Rn(r),Ji(i)}}function $a(){return qi()!==void 0||Ln()!=null}var eo=1;function to(e){return Array.isArray(e)&&typeof e[eo]==`object`}function no(e){return Array.isArray(e)&&e[eo]===!0}function ro(e){return!!(e.flags&4)}function io(e){return e.componentOffset>-1}function ao(e){return(e.flags&1)==1}function oo(e){return!!e.template}function so(e){return!!(e[2]&512)}function co(e){return(e[2]&256)==256}var lo=(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})(lo||{}),uo=`math`;function fo(e){for(;Array.isArray(e);)e=e[0];return e}function po(e,t){return fo(t[e])}function mo(e,t){return fo(t[e.index])}function ho(e,t){return e.data[t]}function go(e,t){return e[t]}function _o(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function vo(e,t){let n=t[e];return to(n)?n:n[0]}function yo(e){return(e[2]&128)==128}function Gee(e){return no(e[3])}function bo(e,t){return t==null?null:e[t]}function xo(e){e[17]=0}function So(e){e[2]&1024||(e[2]|=1024,yo(e)&&To(e))}function Kee(e,t){for(;e>0;)t=t[14],e--;return t}function Co(e){return!!(e[2]&9216||e[24]?.dirty)}function wo(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),Co(e)&&To(e)}function To(e){e[10].changeDetectionScheduler?.notify(0);let t=Do(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!yo(t)));)t=Do(t)}function Eo(e,t){if(co(e))throw new di(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function qee(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function Do(e){let t=e[3];return no(t)?t[3]:t}function Oo(e){return e[7]??=[]}function ko(e){return e.cleanup??=[]}function Jee(e,t,n,r){let i=Oo(t);i.push(n),e.firstCreatePass&&ko(e).push(r,i.length-1)}var Ao={lFrame:ns(null),bindingsEnabled:!0,skipHydrationRootTNode:null},jo=!1;function Yee(){return Ao.lFrame.elementDepthCount}function Xee(){Ao.lFrame.elementDepthCount++}function Mo(){Ao.lFrame.elementDepthCount--}function No(){return Ao.bindingsEnabled}function Po(){return Ao.skipHydrationRootTNode!==null}function Fo(e){return Ao.skipHydrationRootTNode===e}function Io(){Ao.skipHydrationRootTNode=null}function Lo(){return Ao.lFrame.lView}function Ro(){return Ao.lFrame.tView}function S(e){return Ao.lFrame.contextLView=e,e[8]}function C(e){return Ao.lFrame.contextLView=null,e}function zo(){let e=Bo();for(;e!==null&&e.type===64;)e=e.parent;return e}function Bo(){return Ao.lFrame.currentTNode}function Zee(){let e=Ao.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Vo(e,t){let n=Ao.lFrame;n.currentTNode=e,n.isParent=t}function Ho(){return Ao.lFrame.isParent}function Uo(){Ao.lFrame.isParent=!1}function Wo(){return Ao.lFrame.contextLView}function Go(){return jo}function Ko(e){let t=jo;return jo=e,t}function qo(){let e=Ao.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Jo(){return Ao.lFrame.bindingIndex}function Qee(e){return Ao.lFrame.bindingIndex=e}function Yo(){return Ao.lFrame.bindingIndex++}function Xo(e){let t=Ao.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function $ee(){return Ao.lFrame.inI18n}function ete(e,t){let n=Ao.lFrame;n.bindingIndex=n.bindingRootIndex=e,Zo(t)}function tte(){return Ao.lFrame.currentDirectiveIndex}function Zo(e){Ao.lFrame.currentDirectiveIndex=e}function nte(e){let t=Ao.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function rte(){return Ao.lFrame.currentQueryIndex}function Qo(e){Ao.lFrame.currentQueryIndex=e}function ite(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function $o(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=ite(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=Ao.lFrame=ts();return r.currentTNode=t,r.lView=e,!0}function es(e){let t=ts(),n=e[1];Ao.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function ts(){let e=Ao.lFrame,t=e===null?null:e.child;return t===null?ns(e):t}function ns(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 rs(){let e=Ao.lFrame;return Ao.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var is=rs;function as(){let e=rs();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 ate(e){return(Ao.lFrame.contextLView=Kee(e,Ao.lFrame.contextLView))[8]}function os(){return Ao.lFrame.selectedIndex}function ss(e){Ao.lFrame.selectedIndex=e}function cs(){let e=Ao.lFrame;return ho(e.tView,e.selectedIndex)}function w(){Ao.lFrame.currentNamespace=`svg`}function ls(){us()}function us(){Ao.lFrame.currentNamespace=null}function ds(){return Ao.lFrame.currentNamespace}var fs=!0;function ps(){return fs}function ms(e){fs=e}function hs(e,t=null,n=null,r){let i=gs(e,t,n,r);return i.resolveInjectorInitializers(),i}function gs(e,t=null,n=null,r,i=new Set){return new Va([n||ya,wa(e)],t||za(),null,i)}var _s=class e{static THROW_IF_NOT_FOUND=Zi;static NULL=new Ca;static create(e,t){if(Array.isArray(e))return hs({name:``},t,e,``);{let t=e.name??``;return hs({name:t},e.parent,e.providers,t)}}static ɵprov=yi({token:e,providedIn:`any`,factory:()=>ta(xa)});static __NG_ELEMENT_ID__=-1},vs=new Ei(``),ys=class{static __NG_ELEMENT_ID__=xs;static __NG_ENV_ID__=e=>e},bs=class extends ys{_lView;constructor(e){super(),this._lView=e}get destroyed(){return co(this._lView)}onDestroy(e){let t=this._lView;return Eo(t,e),()=>qee(t,e)}};function xs(){return new bs(Lo())}var Ss=new Ei(``),Cs=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Wr(!1);debugTaskTracker=x(Ss,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Nr(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=yi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),ws=class extends Hr{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,$a()&&(this.destroyRef=x(ys,{optional:!0})??void 0,this.pendingTasks=x(Cs,{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 or&&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 Ts(...e){}function Es(e){let t,n;function r(){e=Ts;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 Ds(e){return queueMicrotask(()=>e()),()=>{e=Ts}}var Os=`isAngularZone`,ks=`isAngularZone_ID`,As=0,js=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new ws(!1);onMicrotaskEmpty=new ws(!1);onStable=new ws(!1);onError=new ws(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new di(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,Fs(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(Os)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new di(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new di(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,Ms,Ts,Ts);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)}},Ms={};function Ns(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 Ps(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Es(()=>{e.callbackScheduled=!1,Is(e),e.isCheckStableRunning=!0,Ns(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Is(e)}function Fs(e){let t=()=>{Ps(e)},n=As++;e._inner=e._inner.fork({name:`angular`,properties:{[Os]:!0,[ks]:n,[ks+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(Bs(s))return n.invokeTask(i,a,o,s);try{return Ls(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),Rs(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return Ls(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!Vs(s)&&t(),Rs(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,Is(e),Ns(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 Is(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function Ls(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Rs(e){e._nesting--,Ns(e)}var zs=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new ws;onMicrotaskEmpty=new ws;onStable=new ws;onError=new ws;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 Bs(e){return Hs(e,`__ignore_ng_zone__`)}function Vs(e){return Hs(e,`__scheduler_tick__`)}function Hs(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Us=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},Ws=new Ei(``,{factory:()=>{let e=x(js),t=x(Ba),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Us),n.handleError(r))})}}}),Gs={provide:ba,useValue:()=>{x(Us,{optional:!0})},multi:!0};function T(e,t){let[n,r,i]=_ee(e,t?.equal),a=n;return a[en],a.set=r,a.update=i,a.asReadonly=Ks.bind(a),a}function Ks(){let e=this[en];if(e.readonlyFn===void 0){let t=()=>this();t[en]=e,e.readonlyFn=t}return e.readonlyFn}var qs=new Ei(``,{factory:()=>Js}),Js=`ng`,Ys=new Ei(``),Xs=new Ei(``,{providedIn:`platform`,factory:()=>`unknown`}),Zs=new Ei(``,{factory:()=>x(vs).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),Qs=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=$s}return e})();function $s(){return new Qs(Lo(),zo())}var ec=class{},tc=new Ei(``,{factory:()=>!0}),nc=new Ei(``),rc=(()=>{class e{static ɵprov=yi({token:e,providedIn:`root`,factory:()=>new ic})}return e})(),ic=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}},ac=class{[en];constructor(e){this[en]=e}destroy(){this[en].destroy()}};function E(e,t){let n=t?.injector??x(_s),r=t?.manualCleanup===!0?null:n.get(ys),i,a=n.get(Qs,null,{optional:!0}),o=n.get(ec);return a===null?i=uc(e,n.get(rc),o):(i=lc(a.view,o,e),r instanceof bs&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new ac(i)}var oc={...Pn,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=Ko(!1);try{Fn(this)}finally{Ko(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=tn(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],tn(e)}}},sc={...oc,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)}},cc={...oc,consumerMarkedDirty(){this.view[2]|=8192,To(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 lc(e,t,n){let r=Object.create(cc);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=dc(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function uc(e,t,n){let r=Object.create(sc);return r.fn=dc(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 dc(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}function fc(e){return typeof e==`function`&&e[en]!==void 0}function pc(e){return fc(e)&&typeof e.set==`function`}var mc=Symbol(`InputSignalNode#UNSET`),hc={...Mn,transformFn:void 0,applyValueToInputSignal(e,t){An(e,t)}};function gc(e){return{toString:e}.toString()}var _c=(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})(_c||{}),vc=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function yc(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var bc=null,xc=(()=>{bc=Cc;let e=()=>Cc;return e.ngInherit=!0,e})();function Sc(){return bc}function Cc(e){return e.type.prototype.ngOnChanges&&(e.setInput=Tc),wc}function wc(){let e=Dc(this),t=e?.current;if(t){let n=e.previous;if(n===va)e.previous=t;else for(let e in t)n[e]=t[e];e.current=null,this.ngOnChanges(t)}}function Tc(e,t,n,r,i){let a=this.declaredInputs[r],o=Dc(e)||Oc(e,{previous:va,current:null}),s=o.current||={},c=o.previous,l=c[a];s[a]=new vc(l&&l.currentValue,n,c===va),yc(e,t,i,n)}var Ec=`__ngSimpleChanges__`;function Dc(e){return Object.hasOwn(e,Ec)&&e[Ec]||null}function Oc(e,t){return e[Ec]=t}var kc=[],Ac=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,Lc(o,a)):Lc(o,a)}var zc=-1,Bc=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 Vc(e){return!!(e.flags&8)}function Hc(e){return!!(e.flags&16)}function Uc(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function Zc(e,t){let n=Xc(e),r=t;for(;n>0;)r=r[14],n--;return r}var Qc=!0;function $c(e){let t=Qc;return Qc=e,t}var el=255,tl=5,nl=0,rl={};function il(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,Mi)&&(r=n[Mi]),r??=n[Mi]=nl++;let i=r&el,a=1<>tl)]|=a}function al(e,t){let n=sl(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,ol(r.data,e),ol(t,null),ol(r.blueprint,null));let i=cl(e,t),a=e.injectorIndex;if(Jc(i)){let e=Yc(i),n=Zc(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 ol(e,t){e.push(0,0,0,0,0,0,0,0,t)}function sl(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function cl(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=Tl(i),r===null)return zc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return zc}function ll(e,t,n){il(e,t,n)}function ul(e,t,n){if(n&8||e!==void 0)return e;Ui(t,`NodeInjector`)}function dl(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=Ji(void 0);try{return i?i.get(t,r,n&8):Yi(t,r,n&8)}finally{Ji(a)}}return ul(r,t,n)}function fl(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=wl(e,t,n,r,rl);if(i!==rl)return i}let i=pl(e,t,n,r,rl);if(i!==rl)return i}return dl(t,n,r,i)}function pl(e,t,n,r,i){let a=_l(n);if(typeof a==`function`){if(!$o(t,e,r))return r&1?ul(i,n,r):dl(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))Ui(n);else return e}finally{is()}}else if(typeof a==`number`){let i=null,o=sl(e,t),s=zc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?cl(e,t):t[o+8],s===zc||!yl(r,!1)?o=-1:(i=t[1],o=Yc(s),t=Zc(s,t)));o!==-1;){let e=t[1];if(vl(a,o,e.data)){let e=ml(o,t,n,i,r,c);if(e!==rl)return e}s=t[o+8],s!==zc&&yl(r,t[1].data[o+8]===c)&&vl(a,o,t)?(i=e,o=Yc(s),t=Zc(s,t)):o=-1}}return i}function ml(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=hl(s,o,n,r==null?io(s)&&Qc:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?rl:gl(t,o,c,s,i)}function hl(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&&oo(e)&&e.type===n)return c}return null}function gl(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof Bc){let s=a;if(s.resolving)throw Hi(``);let c=$c(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?Ji(s.injectImpl):null;$o(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&jc(n,o[n],t)}finally{l!==null&&Ji(l),$c(c),s.resolving=!1,is()}}return a}function _l(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,Mi)?e[Mi]:void 0;return typeof t==`number`?t>=0?t&el:xl:t}function vl(e,t,n){let r=1<>tl)]&r)}function yl(e,t){return!(e&2)&&!(e&1&&t)}var bl=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return fl(this._tNode,this._lView,e,na(n),t)}};function xl(){return new bl(zo(),Lo())}function Sl(e){return gc(()=>{let t=e.prototype.constructor,n=t[ji]||Cl(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let e=i[ji]||Cl(i);if(e&&e!==n)return e;i=Object.getPrototypeOf(i)}return e=>new e})}function Cl(e){return vi(e)?()=>{let t=Cl(_i(e));return t&&t()}:oa(e)}function wl(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!so(o);){let e=pl(a,o,n,r|2,rl);if(e!==rl)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,rl,r);if(t!==rl)return t}t=Tl(o),o=o[14]}a=t}return i}function Tl(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}function El(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function Dl(){return Ol(zo(),Lo())}function Ol(e,t){return new kl(mo(e,t))}var kl=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=Dl}return e})();function Al(e){return e instanceof kl?e.nativeElement:e}function jl(){return this._results[Symbol.iterator]()}var Ml=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 Hr}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=ca(e);(this._changesDetected=!sa(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]=jl};function Nl(e){return(e.flags&128)==128}var Pl=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Pl||{}),Fl=new Map,Il=0;function Ll(){return Il++}function Rl(e){Fl.set(e[19],e)}function zl(e){Fl.delete(e[19])}var Bl=`__ngContext__`;function Vl(e,t){to(t)?(e[Bl]=t[19],Rl(t)):e[Bl]=t}function Hl(e){return Wl(e[12])}function Ul(e){return Wl(e[4])}function Wl(e){for(;e!==null&&!no(e);)e=e[4];return e}var Gl=void 0;function Kl(e){Gl=e}function ql(){if(Gl!==void 0)return Gl;if(typeof document<`u`)return document;throw new di(210,!1)}var Jl=!1,Yl=new Ei(``,{factory:()=>Jl}),Xl=new WeakMap;function Zl(e,t){if(typeof e!=`object`||!e)return;let n=Xl.get(e);n||(n=new WeakSet,Xl.set(e,n)),n.add(t)}function Ql(e){return(e.flags&32)==32}var $l=()=>null;function eu(e,t,n=!1){return $l(e,t,n)}function tu(e,t){let n=e.contentQueries;if(n!==null){let r=tn(null);try{for(let r=0;r|^->||--!>|)/g,pu=`​$1​`;function mu(e){return e.replace(du,e=>e.replace(fu,pu))}function hu(e,t){return e.createText(t)}function ote(e,t,n){e.setValue(t,n)}function ste(e,t){return e.createComment(mu(t))}function gu(e,t,n){return e.createElement(t,n)}function _u(e,t,n,r,i){e.insertBefore(t,n,r,i)}function vu(e,t,n){e.appendChild(t,n)}function yu(e,t,n,r,i){r===null?vu(e,t,n):_u(e,t,n,r,i)}function bu(e,t,n,r){e.removeChild(null,t,n,r)}function cte(e,t,n){e.setAttribute(t,`style`,n)}function lte(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function xu(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&Uc(e,t,r),i!==null&<e(e,t,i),a!==null&&cte(e,t,a)}function Su(e){let t=ute();return t?t.sanitize(lo.URL,e)||``:su(e,`URL`)?ou(e):uu(Ri(e))}function ute(){let e=Lo();return e&&e[10].sanitizer}function Cu(e){return e.ownerDocument.defaultView}function wu(e){return e.ownerDocument}function dte(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 Tu=`ng-template`;function fte(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(Du(r))return!1;o=!0}}}}}return Du(r)||o}function Du(e){return!(e&1)}function hte(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!==``&&!Du(o)&&(t+=ku(a,i),i=``),r=o,a||=!Du(r);n++}return i!==``&&(t+=ku(a,i)),t}function xte(e){return e.map(bte).join(`,`)}function Ste(e){let t=[],n=[],r=1,i=2;for(;r!1});function Nu(e){if(!e)return 0;let t=e.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(e)*t}function Pu(e,t){return e.getPropertyValue(t).split(`,`).map(e=>e.trim())}function Tte(e){let t=Pu(e,`transition-property`),n=Pu(e,`transition-duration`),r=Pu(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 Ete(e){let t=Pu(e,`animation-name`),n=Pu(e,`animation-delay`),r=Pu(e,`animation-duration`),i=Pu(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 Fu(e,t){return e!==void 0&&e.duration>t.duration}function Iu(e){return(e.animationName!=null||e.propertyName!=null)&&e.duration>0}function Lu(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 Dte(e,t){let n=getComputedStyle(e),r=Ete(n),i=Tte(n),a=r.duration>i.duration?r:i;Fu(t.get(e),a)||Iu(a)&&t.set(e,a)}function Ote(e,t,n){if(!n)return;let r=e.getAnimations();return r.length===0?Dte(e,t):kte(e,t,r)}function kte(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=Lu(e)??0,n,i;e.animationName?i=e.animationName:n=e.transitionProperty,t>=r.duration&&(r={animationName:i,propertyName:n,duration:t})}Fu(t.get(e),r)||Iu(r)&&t.set(e,r)}var Ru=new Set,Ate=!1,jte=1,zu=typeof document<`u`&&typeof document?.documentElement?.getAnimations==`function`;function Mte(e){return e[9].get(wte,Ate)}function Nte(e,t,n){let r=Vu.get(e);if(r){for(let e of t)r.classList.push(e);for(let e of n)r.cleanupFns.push(e)}else Vu.set(e,{classList:t,cleanupFns:n})}function Bu(e){let t=Vu.get(e);if(t){for(let e of t.cleanupFns)e();Vu.delete(e)}Hu.delete(e)}var Vu=new WeakMap,Hu=new WeakMap,Uu=new WeakMap;function Wu(e){return e?e[14]??e:null}var Gu=new WeakSet;function Pte(e,t,n){let r=Uu.get(e);if(!r||r.length===0)return;let i=t.parentNode,a=t.previousSibling,o=Wu(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),Gu.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 Fte(e,t,n){let r=Wu(n),i=Uu.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):Uu.set(e,[{el:t,declarationView:r}])}function Ku(e){let t=e[26]??={};return t.enter??=new Map}function Ite(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 qu(e){return e.composedPath?e.composedPath()[0]:e.target}function Ju(e,t){let n=Hu.get(t);if(n===void 0)return!0;if(t!==qu(e))return!1;let r=e.animation;if(r){let e=Lu(r);if(e!==void 0&&e+jte{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=yi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),ed=[0,1,2,3],td=(()=>{class e{ngZone=x(js);scheduler=x(ec);errorHandler=x(Us,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){x(Xu,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Ac(_c.AfterRenderHooksStart),this.executing=!0;for(let e of ed)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&&Ac(_c.AfterRenderHooksEnd)}register(e){let{view:t}=e;t===void 0?this.executing?this.deferredRegistrations.add(e):this.addSequence(e):((t[25]??=[]).push(e),To(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(Yu.AFTER_NEXT_RENDER,e):e()}static ɵprov=yi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),nd=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 rd(e,t){let n=t?.injector??x(_s);return Qu(`NgAfterNextRender`),zte(e,n,t,!0)}function Rte(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function zte(e,t,n,r){let i=t.get($u);i.impl??=t.get(td);let a=t.get(Xu,null,{optional:!0}),o=n?.manualCleanup===!0?null:t.get(ys),s=t.get(Qs,null,{optional:!0}),c=new nd(i.impl,Rte(e),s?.view,r,o,a?.snapshot(null));return i.impl.register(c),c}var id=new Ei(``,{factory:()=>{let e=x(Ba),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function ad(e,t,n){let r=e.get(id);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 Bte(e,t){let n=e.get(id);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Vte(e,t){let n=e.get(id);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function Hte(e){let t=e.get(id);t.isScheduled||=(rd(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:t.injector}),!0)}function Ute(e){let t=e.get(id);t.scheduler=Hte,t.scheduler(e)}function od(e,t){for(let[n,r]of t)ad(e,r.animateFns)}function sd(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&od(r,i)}function cd(e,t,n,r){try{n.get(xa)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&Bte(n,i.enter.get(t.index).animateFns);let a=Wte(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];ld(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&Ru.add(e[19]),ad(n,()=>Gte(e,t,i||void 0,a,r),i||void 0)}function Wte(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 Gte(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&&ld(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),qte(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&Ru.delete(e[19]),i(!0)})}else e&&Ru.delete(e[19]),i(!1)}function ld(e,t,n){if(t.type&12){let r=e[t.index];if(no(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,Ru.delete(e[19])),n(!0)})}function ud(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;no(i)?c=i:to(i)&&(l=!0,i=i[0]);let u=fo(i);e===0&&r!==null?(sd(s,r,a,n),o==null?vu(t,r,u):_u(t,r,u,o||null,!0)):e===1&&r!==null?(sd(s,r,a,n),_u(t,r,u,o||null,!0),Pte(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&Fte(a,u,s),Gu.delete(u),cd(s,a,n,e=>{if(Gu.has(u)){Gu.delete(u);return}bu(t,u,l,e)})):e===3&&(Gu.delete(u),cd(s,a,n,()=>{t.destroyNode(u)})),c!=null&&Ed(t,e,n,c,a,r,o)}}function Jte(e,t){dd(e,t),t[0]=null,t[5]=null}function Yte(e,t,n,r,i,a){r[0]=i,r[5]=t,Sd(e,r,n,1,i,a)}function dd(e,t){t[10].changeDetectionScheduler?.notify(9),Sd(e,t,t[11],2,null,null)}function Xte(e){let t=e[12];if(!t)return md(e[1],e);for(;t;){let n=null;if(to(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)to(t)&&md(t[1],t),t=t[3];t===null&&(t=e),to(t)&&md(t[1],t),n=t&&t[4]}t=n}}function fd(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function pd(e,t){if(co(t))return;let n=t[11];n.destroyNode&&Sd(e,t,n,3,null,null),Xte(t)}function md(e,t){if(co(t))return;let n=tn(null);try{t[2]&=-129,t[2]|=256,t[24]&&_n(t[24]),Qte(e,t),Zte(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&no(t[3])){n!==t[3]&&fd(n,t);let r=t[18];r!==null&&r.detachView(e)}zl(t)}finally{tn(n)}}function Zte(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&&Id(e,t,27,!1),Ac(o?_c.TemplateUpdateStart:_c.TemplateCreateStart,i,n),n(r,i)}finally{ss(a),Ac(o?_c.TemplateUpdateEnd:_c.TemplateCreateEnd,i,n)}}function Bd(e,t,n){qd(e,t,n),(n.flags&64)==64&&Jd(e,t,n)}function Vd(e,t,n=mo){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];Rd(o,n[i],s,a),l=!0}else if(i>c)break}}return o!==null&&Object.hasOwn(r.inputs,i)&&(Rd(r,n[o],i,a),l=!0),l}function of(e,t){let n=vo(t,e),r=n[1];sf(r,n);let i=n[0];i!==null&&n[6]===null&&(n[6]=eu(i,n[9])),Ac(_c.ComponentStart);try{cf(r,n,n[8])}finally{Ac(_c.ComponentEnd,n[8])}}function sf(e,t){for(let n=t.length;n{To(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function bf(e){let t=e[24]??Object.create(xf);return t.lView=e,t}var xf={...rn,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=Do(e.lView);for(;t&&!Sf(t[1]);)t=Do(t);t&&So(t)},consumerOnSignalRead(){this.lView[24]=this}};function Sf(e){return e.type!==2}function Cf(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 wf=100;function Tf(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{Ef(e,t)}finally{n.end?.()}}function Ef(e,t){let n=Go();try{Ko(!0),Mf(e,t);let n=0;for(;Co(e);){if(n===wf)throw new di(103,!1);n++,Mf(e,1)}}finally{Ko(n)}}function Df(e,t,n,r){if(co(t))return;let i=t[2];es(t);let a=!0,o=null,s=null;Sf(e)?(s=gf(t),o=fn(s)):nn()===null?(a=!1,s=bf(t),o=fn(s)):t[24]&&=(_n(t[24]),null);try{xo(t),Qee(e.bindingStartIndex),n!==null&&zd(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&Nc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&Pc(t,n,0,null),Fc(t,0)}if(kf(t),Cf(t),Of(t,0),e.contentQueries!==null&&tu(e,t),a){let n=e.contentCheckHooks;n!==null&&Nc(t,n)}else{let n=e.contentHooks;n!==null&&Pc(t,n,1),Fc(t,1)}Pf(e,t);let o=e.components;o!==null&&Nf(t,o,0);let s=e.viewQuery;if(s!==null&&nu(2,s,r),a){let n=e.viewCheckHooks;n!==null&&Nc(t,n)}else{let n=e.viewHooks;n!==null&&Pc(t,n,2),Fc(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 To(t),e}finally{s!==null&&(mn(s,o),a&&vf(s)),as()}}function Of(e,t){for(let n=Hl(e);n!==null;n=Ul(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=da(e,10+t);Jte(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 Vf(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(Bf(e,n),da(t,n))}this._attachedToViewContainer=!1}pd(this._lView[1],this._lView)}onDestroy(e){Eo(this._lView,e)}markForCheck(){Ff(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){wo(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,Tf(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new di(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=so(this._lView),t=this._lView[16];t!==null&&!e&&fd(t,this._lView),dd(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new di(902,!1);this._appRef=e;let t=so(this._lView),n=this._lView[16];n!==null&&!t&&Hf(n,this._lView),wo(this._lView)}},Wf=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=Gf;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 Uf(uf(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n}))}}return e})();function Gf(){return Kf(zo(),Lo())}function Kf(e,t){return e.type&4?new Wf(t,e,Ol(e,t)):null}function qf(e,t,n,r,i){let a=e.data[t];if(a===null)a=Jf(e,t,n,r,i),$ee()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Zee();a.injectorIndex=e===null?-1:e.injectorIndex}return Vo(a,!0),a}function Jf(e,t,n,r,i){let a=Bo(),o=Ho(),s=o?a:a&&a.parent,c=e.data[t]=Xf(e,s,n,t,r,i);return Yf(e,c,a,o),c}function Yf(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 Xf(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return Po()&&(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:ds(),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 Zf(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?Qf(e,n):r.push(e);e[6]=r}function Qf(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,ep=()=>null;function tp(e,t){return $f(e,t)}function np(e,t,n){return ep(e,t,n)}var rp=class{},ip=class{},ap=class{destroyNode=null;static __NG_ELEMENT_ID__=()=>op()};function op(){let e=Lo(),t=vo(zo().index,e);return(to(t)?t:e)[11]}var sp=(()=>{class e{static ɵprov=yi({token:e,providedIn:`root`,factory:()=>null})}return e})();function cp(e){return e.debugInfo?.className||e.type.name||null}var lp={},up=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,lp,n);return r!==lp||t===lp?r:this.parentInjector.get(e,t,n)}};function dp(e,t,n){return e[t]=n}function fp(e,t){return e[t]}function pp(e,t,n){if(n===Au)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function mp(e,t,n,r){let i=pp(e,t,n);return pp(e,t+1,r)||i}function hp(e,t,n,r,i){let a=mp(e,t,n,r);return pp(e,t+2,i)||a}function gp(e,t,n,r,i,a){let o=mp(e,t,n,r);return mp(e,t+2,i,a)||o}function _p(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&Zl(i,a),Ff(io(e)?vo(e.index,t):t,5);let o=t[8],s=vp(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=vp(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function vp(e,t,n,r){let i=tn(null);try{return Ac(_c.OutputStart,t,n),n(r)!==!1}catch(t){return nf(e,t),!1}finally{Ac(_c.OutputEnd,t,n),tn(i)}}function yp(e,t,n,r,i,a,o,s){let c=ao(e),l=!1,u=null;if(!r&&c&&(u=xp(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=mo(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);bp(a)||Sp(r?t=>r(fo(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function bp(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function xp(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 Sp(e,t,n,r,i,a,o){let s=t.firstCreatePass?ko(t):null,c=Oo(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function Cp(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,wp(e,t,l,n[a+1],r,i);else if(l>s)break}}return Object.hasOwn(n.outputs,r)&&(c=!0,wp(e,t,a,r,r,i)),c}function wp(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);Sp(e.index,s,t,i,a,c,!0)}function Tp(){Ep()}function Ep(){let e=Lo(),t=Ro(),n=zo();if(t.firstCreatePass&&Mp(t,n),n.controlDirectiveIndex===-1)return;Qu(`NgSignalForms`);let r=e[n.controlDirectiveIndex];t.data[n.controlDirectiveIndex].controlDef.create(r,new kp(e,t,n))}function Dp(){Op()}function Op(){let e=Lo(),t=Ro(),n=cs();if(n.controlDirectiveIndex===-1)return;let r=t.data[n.controlDirectiveIndex].controlDef,i=e[n.controlDirectiveIndex];r.update(i,new kp(e,t,n))}var kp=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 mo(this.tNode,this.lView)}get descriptor(){return`<${this.tNode.value}>`}listenToCustomControlOutput(e,t){let n=this.tView.data[this.tNode.customControlIndex];Cp(this.tNode,this.lView,n,e,_p(this.tNode,this.lView,t))}listenToCustomControlModel(e){let t=this.tNode.flags&1024?`valueChange`:`checkedChange`,n=this.tView.data[this.tNode.customControlIndex];Cp(this.tNode,this.lView,n,t,_p(this.tNode,this.lView,e))}listenToDom(e,t){yp(this.tNode,this.tView,this.lView,void 0,this.lView[11],e,t,_p(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(jp(r,o,e)))&&(Rd(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=Ap(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}Np(e,t)}function Np(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 Pp(e,t){return Fp(e,t)&&Ip(e,t+`Change`)}function Fp(e,t){return t in e.inputs}function Ip(e,t){return t in e.outputs}var Lp=Symbol(`BINDING`),Rp=new Ei(``);function zp(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 $p(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&Ld.SignalBased)!==0};return i&&(a.transform=i),a})}function sm(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function cm(e,t,n){let r=t instanceof Ba?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new up(n,r):n}function lm(e){let t=e.get(ip,null);if(t===null)throw new di(407,!1);return{rendererFactory:t,sanitizer:e.get(sp,null),changeDetectionScheduler:e.get(ec,null),ngReflect:!1,tracingService:e.get(Xu,null,{optional:!0})}}function um(e,t,n){let r=fm(e);return gu(t,r,r===`svg`?`svg`:r===`math`?uo:n)}function dm(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new di(905,!1)}function fm(e){return(e.selectors[0][0]||`div`).toLowerCase()}var pm=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=om(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=sm(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=xte(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){Ac(_c.DynamicComponentStart);let s=tn(null);try{let s=this.componentDef,c=cm(s,r||this.ngModule,e),l=lm(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(cp(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?Hd(l,r,s.encapsulation,t):um(s,l,o??null);dm(u);let d=t.get(Rp,null),f=hm(u,()=>t.get(vs,null)??ql());d&&d.addHost(f);let p=a?.some(_m)||i?.some(e=>typeof e!=`function`&&e.bindings.some(_m)),m=jd(null,c,null,512|Nd(s),null,null,e,l,t,null,eu(u,t,!0));d&&im&&f instanceof ShadowRoot&&Eo(m,()=>{d.removeHost(f)}),m[27]=u,es(m);let ee=null;try{let e=tm(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);xu(l,u,e),Vl(u,m),Bd(c,m,e),ru(c,e,m),nm(c,e),n!==void 0&&ym(e,this.ngContentSelectors,n),ee=vo(e.index,m),m[8]=ee[8],cf(c,m,null)}catch(e){throw ee!==null&&zl(ee),zl(m),e}finally{Ac(_c.DynamicComponentEnd),as()}return new vm(this.componentType,m,!!p)}};function mm(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:Ste(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[Lp].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 _m(e){let t=e[Lp].kind;return t===`input`||t===`twoWay`}var vm=class extends rp{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=ho(t[1],27),this.location=Ol(this._tNode,t),this.instance=vo(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new Uf(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;rf(n,r[1],r,e,t),this.previousInputValues.set(e,t),Ff(vo(n.index,r),1)}get injector(){return new bl(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function ym(e,t,n){let r=e.projection=[];for(let e=0;e{class e{static __NG_ELEMENT_ID__=xm}return e})();function xm(){return Tm(zo(),Lo())}var Sm=class e extends bm{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Ol(this._hostTNode,this._hostLView)}get injector(){return new bl(this._hostTNode,this._hostLView)}get parentInjector(){let e=cl(this._hostTNode,this._hostLView);if(Jc(e)){let t=Zc(e,this._hostLView),n=Yc(e),r=t[1].data[n+8];return new bl(r,t)}return new bl(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=Cm(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=tp(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,df(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 pm(Pi(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(Ba,null);e&&(i=e)}let d=Pi(l.componentType??{}),f=tp(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,df(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(Gee(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 Rf(o,i,a,r),t.attachToViewContainerRef(),ua(wm(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=Cm(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=Bf(this._lContainer,t);n&&(da(wm(this._lContainer),t),pd(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=Bf(this._lContainer,t);return n&&da(wm(this._lContainer),t)!=null?new Uf(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function Cm(e){return e[8]}function wm(e){return e[8]||=[]}function Tm(e,t){let n,r=t[e.index];return no(r)?n=r:(n=If(r,t,null,e),t[e.index]=n,Fd(t,n)),Dm(n,t,e,r),new Sm(n,e,t)}function Em(e,t){let n=e[11],r=n.createComment(``),i=mo(t,e);return _u(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var Dm=Am,Om=()=>!1;function km(e,t,n){return Om(e,t,n)}function Am(e,t,n,r){if(e[7])return;let i;i=n.type&8?fo(r):Em(t,n),e[7]=i}var jm=class e{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},Mm=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 Km(e,t,n){e.queries===null&&(e.queries=new Pm),e.queries.track(new Fm(t,n))}function qm(e,t){return e.queries.getByIndex(t)}function Jm(e,t){let n=e[1],r=qm(n,t);return r.crossesNgTemplate?Vm(n,e,t,[]):Bm(n,e,r,t)}function Ym(e,t,n){let r,i=Cn(()=>{r._dirtyCounter();let n=$m(r,e);if(t&&n===void 0)throw new di(-951,!1);return n});return r=i[en],r._dirtyCounter=T(0),r._flatValue=void 0,i}function Xm(e){return Ym(!0,!1,e)}function Zm(e){return Ym(!0,!0,e)}function Qm(e,t){let n=e[en];n._lView=Lo(),n._queryIndex=t,n._queryList=Hm(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(e=>e+1))}function $m(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[2]&4)return t?void 0:ya;let i=Hm(n,r),a=Jm(n,r);return i.reset(a,Al),t?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}function eh(e){return!!e&&typeof e.then==`function`}function th(e){return!!e&&typeof e.subscribe==`function`}var nh=class{},rh=class extends nh{injector;instance=null;constructor(e){super();let t=new Va([...e.providers,{provide:nh,useValue:this}],e.parent||za(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function ih(e,t,n=null){return new rh({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var ah=(()=>{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=Ta(!1,e.type),n=t.length>0?ih([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=yi({token:e,providedIn:`environment`,factory:()=>new e(ta(Ba))})}return e})();function O(e){return gc(()=>{let t=dh(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Pl.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(ah).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||iu.Emulated,styles:e.styles||ya,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&Qu(`NgStandalone`),fh(n);let r=e.dependencies;return n.directiveDefs=ph(r,oh),n.pipeDefs=ph(r,Ii),n.id=mh(n),n})}function oh(e){return Pi(e)||Fi(e)}function sh(e,t){if(e==null)return va;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=Ld.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function ch(e){if(e==null)return va;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function lh(e){return gc(()=>{let t=dh(e);return fh(t),t})}function uh(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 dh(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||va,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||ya,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:sh(e.inputs,t),outputs:ch(e.outputs),debugInfo:null}}function fh(e){e.features?.forEach(t=>t(e))}function ph(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 hh=new Ei(``),gh=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=x(hh,{optional:!0})??[];injector=x(_s);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=Qa(this.injector,t);if(eh(n))e.push(n);else if(th(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=El({token:e,factory:e.ɵfac})}return e})();function _h(e){return t=>{t.controlDef={create:(e,t)=>{e?.ɵngControlCreate(t)},update:(e,t)=>{e?.ɵngControlUpdate?.(t)},passThroughInput:e}}}function vh(e){return Object.getPrototypeOf(e.prototype).constructor}function yh(e){let t=vh(e.type),n=!0,r=[e];for(;t&&t!==Function.prototype&&t!==Object.prototype;){let i,a=Object.hasOwn(t,Oi)?t[Oi]:void 0,o=Object.hasOwn(t,ki)?t[ki]:void 0;if(oo(e))i=a??o;else{if(a)throw new di(903,!1);i=o}if(i){if(n){r.push(i);let t=e;t.inputs=Sh(e.inputs),t.declaredInputs=Sh(e.declaredInputs),t.outputs=Sh(e.outputs);let n=i.hostBindings;n&&Th(e,n);let a=i.viewQuery,o=i.contentQueries;if(a&&Ch(e,a),o&&wh(e,o),bh(e,i),Uee(e.outputs,i.outputs),oo(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=Kc(i.hostAttrs,n=Kc(n,i.hostAttrs))}}function Sh(e){return e===va?{}:e===ya?[]:e}function Ch(e,t){let n=e.viewQuery;e.viewQuery=n?(e,r)=>{t(e,r),n(e,r)}:t}function wh(e,t){let n=e.contentQueries;e.contentQueries=n?(e,r,i)=>{t(e,r,i),n(e,r,i)}:t}function Th(e,t){let n=e.hostBindings;e.hostBindings=n?(e,r)=>{t(e,r),n(e,r)}:t}function Eh(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=Kc(e.mergedAttrs,e.attrs);let t=e.tView=Od(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),Vo(e,!1);let c=Ah(n,t,e,r);ps()&&_d(n,t,c,e),Vl(c,t);let l=If(c,t,c,e);t[r+27]=l,Fd(t,l),km(l,e,t)}function Dh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;return t.firstCreatePass?(f=qf(t,d,4,o||null,s||null),No()&&Vp(t,e,f,bo(t.consts,l),Xd),Mc(t,f)):f=t.data[d],Eh(f,e,t,n,r,i,a,c),ao(f)&&Bd(t,e,f),l!=null&&Vd(e,f,u),f}function Oh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=qf(t,d,4,o||null,s||null),l!=null){let e=bo(t.consts,l);f.localNames=[];for(let t=0;t{throw new di(600,``)})}var Fh=10,Ih=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=x(Ws);afterRenderManager=x($u);zonelessEnabled=x(tc);rootEffectScheduler=x(rc);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Hr;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=x(Cs);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(li(e=>!e))}constructor(){x(Xu,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=x(Ba);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=_s.NULL){return this._injector.get(js).run(()=>{if(Ac(_c.BootstrapComponentStart),!this._injector.get(gh).done)throw new di(405,``);let r=Pi(e),i=this._injector.get(nh),a=new pm(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=Lh(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(Mh,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),Rh(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),Ac(_c.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Ac(_c.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(Yu.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw Ac(_c.ChangeDetectionEnd),new di(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(),Ac(_c.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(ip,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++Co(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;Rh(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(Nh,[]).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),()=>Rh(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new di(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=El({token:e,factory:e.ɵfac})}return e})();function Lh(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function Rh(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function k(e,t,n,r){let i=Lo();return pp(i,Yo(),t)&&(Ro(),Zd(cs(),i,e,t,n,r)),k}function zh(e){if(Qu(`NgAnimateEnter`),!zu)return zh;let t=Lo();if(Mte(t))return zh;let n=zo(),r=t[9].get(js);return Lte(Ku(t),n,()=>Bh(t,n,e,r)),Ute(t[9]),od(t[9],Ku(t)),zh}function Bh(e,t,n,r){let i=mo(t,e),a=e[11],o=Ite(n),s=[],c=!1,l=e=>{if(qu(e)!==i)return;let t=e instanceof AnimationEvent?`animationend`:`transitionend`;r.runOutsideAngular(()=>{a.listen(i,t,u)})},u=e=>{qu(e)===i&&(Ju(e,i)&&(c=!0),Vh(e,i,a))};if(o&&o.length>0){r.runOutsideAngular(()=>{s.push(a.listen(i,`animationstart`,l)),s.push(a.listen(i,`transitionstart`,l))}),Nte(i,o,s);for(let e of o)a.addClass(i,e);r.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(!c&&(Ote(i,Hu,zu),!Hu.has(i))){for(let e of o)a.removeClass(i,e);Bu(i)}})})}}function Vh(e,t,n){let r=Vu.get(t);if(qu(e)===t&&r&&Ju(e,t)){e.stopPropagation();for(let e of r.classList)n.removeClass(t,e);Bu(t)}}var Hh=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 Uh(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function Wh(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=Uh(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=Uh(s,d,c,f,n);if(p!==0){p<0&&e.updateValue(s,f),s--,c--;continue}let m=n(o,r),ee=n(s,d),h=n(o,l);if(Object.is(h,ee)){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 Jh,a??=qh(e,o,s,n),Gh(e,i,o,h))e.updateValue(o,l),o++,s++;else if(a.has(h))i.set(m,e.detach(o)),s--;else{let n=e.create(o,t[o]);e.attach(o,n),o++,s++}}for(;o<=c;)Kh(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=Uh(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new Jh,a??=qh(e,o,s,n);let u=n(o,r);if(Gh(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;)Kh(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 Gh(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Kh(e,t,n,r,i){if(Gh(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function qh(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 Jh=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 A(e,t,n,r,i,a,o,s){Qu(`NgControlFlow`);let c=Lo(),l=Ro();return Oh(c,l,e,t,n,r,i,bo(l.consts,a),256,o,s),Yh}function Yh(e,t,n,r,i,a,o,s){Qu(`NgControlFlow`);let c=Lo(),l=Ro();return Oh(c,l,e,t,n,r,i,bo(l.consts,a),512,o,s),Yh}function j(e,t){Qu(`NgControlFlow`);let n=Lo(),r=Yo(),i=n[r]===Au?-1:n[r],a=i===-1?void 0:tg(n,27+i);if(pp(n,r,e)){let r=tn(null);try{if(a!==void 0&&zf(a,0),e!==-1){let r=27+e,i=tg(n,r),a=og(n[1],r),o=np(i,a,n);Rf(i,uf(n,a,t,{dehydratedView:o}),0,df(a,o))}}finally{tn(r)}}else if(a!==void 0){let e=Lf(a,0);e!==void 0&&(e[8]=t)}}var Xh=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 Zh(e){return e}function Qh(e,t){return t}var $h=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function M(e,t,n,r,i,a,o,s,c,l,u,d,f){Qu(`NgControlFlow`);let p=Lo(),m=Ro(),ee=c!==void 0,h=Lo(),g=new $h(ee,s?o.bind(h[15][8]):o);h[27+e]=g,Oh(p,m,e+1,t,n,r,i,bo(m.consts,a),256),ee&&Oh(p,m,e+2,c,l,u,d,bo(m.consts,f),512)}var eg=class extends Hh{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,Rf(this.lContainer,t,e,df(this.templateTNode,n)),ng(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,rg(this.lContainer,e),ig(this.lContainer,e)}create(e,t){let n=tp(this.lContainer,this.templateTNode.tView.ssrId);return uf(this.hostLView,this.templateTNode,new Xh(this.lContainer,t,e),{dehydratedView:n})}destroy(e){pd(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];Vte(e,r),Ru.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function rg(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 ig(e,t){return Bf(e,t)}function ag(e,t){return Lf(e,t)}function og(e,t){return ho(e,t)}function P(e,t,n){let r=Lo();return pp(r,Yo(),t)&&(Ro(),Wd(cs(),r,e,t,r[11],n)),P}function sg(e,t,n,r,i){rf(t,e,n,i?`class`:`style`,r)}function F(e,t,n,r){let i=Lo(),a=i[1],o=e+27,s=a.firstCreatePass?tm(o,i,2,t,Xd,No(),n,r):a.data[o];if(io(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(cp(o),()=>(cg(e,t,i,s,r),F))}}return cg(e,t,i,s,r),F}function cg(e,t,n,r,i){if(ef(r,n,e,t,ug),ao(r)){let e=n[1];Bd(e,n,r),ru(e,r,n)}i!=null&&Vd(n,r)}function I(){let e=Ro(),t=tf(zo());return e.firstCreatePass&&nm(e,t),Fo(t)&&Io(),Mo(),t.classesWithoutHost!=null&&Vc(t)&&sg(e,t,Lo(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&Hc(t)&&sg(e,t,Lo(),t.stylesWithoutHost,!1),I}function L(e,t,n,r){return F(e,t,n,r),I(),L}function R(e,t,n,r){let i=Lo(),a=i[1],o=e+27,s=a.firstCreatePass?rm(o,a,2,t,n,r):a.data[o];return ef(s,i,e,t,ug),r!=null&&Vd(i,s),R}function z(){return Fo(tf(zo()))&&Io(),Mo(),z}function lg(e,t,n,r){return R(e,t,n,r),z(),lg}var ug=(e,t,n,r,i)=>(ms(!0),gu(t[11],r,ds()));function dg(e,t,n){let r=Lo(),i=r[1],a=e+27,o=i.firstCreatePass?tm(a,r,8,`ng-container`,Xd,No(),t,n):i.data[a];if(ef(o,r,e,`ng-container`,mg),ao(o)){let e=r[1];Bd(e,r,o),ru(e,o,r)}return n!=null&&Vd(r,o),dg}function fg(){let e=Ro(),t=tf(zo());return e.firstCreatePass&&nm(e,t),fg}function pg(e,t,n){return dg(e,t,n),fg(),pg}var mg=(e,t,n,r,i)=>(ms(!0),ste(t[11],``));function B(){return Lo()}function V(e,t,n){let r=Lo();return pp(r,Yo(),t)&&(Ro(),Gd(cs(),r,e,t,r[11],n)),V}var hg=void 0;function gg(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var _g=[`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`]],hg,[[`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`]],hg,[[`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}`,hg,hg,hg],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`×`,`‰`,`∞`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,gg],vg=Object.create(null);function yg(e){let t=Sg(e),n=bg(t);if(n)return n;let r=t.split(`-`)[0];if(n=bg(r),n)return n;if(r===`en`)return _g;throw new di(701,!1)}function bg(e){if(!(e in vg)){let t=Xi.ng&&Xi.ng.common&&Xi.ng.common.locales&&Xi.ng.common.locales[e];return t!==void 0&&(vg[e]=t),t}return vg[e]}var xg={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 Sg(e){return e.toLowerCase().replace(/_/g,`-`)}var Cg=`en-US`;function wg(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function H(e,t,n){let r=Lo(),i=Ro(),a=zo();return Tg(i,r,r[11],a,e,t,n),H}function U(e,t,n){let r=Lo(),i=Ro(),a=zo();return(a.type&3||n)&&yp(a,i,r,n,r[11],e,t,_p(a,r,t)),U}function Tg(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=_p(r,t,a),yp(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 Fg(e){return(e&2)==2}function Ig(e,t){return e&131071|t<<17}function Lg(e){return e|2}function Rg(e){return(e&131068)>>2}function zg(e,t){return e&-131069|t<<2}function Bg(e){return(e&1)==1}function Vg(e){return e|1}function Hg(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=Pg(o),c=Rg(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||ga(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=Pg(e[s+1]);e[r+1]=Ng(t,s),t!==0&&(e[t+1]=zg(e[t+1],r)),e[s+1]=Ig(e[s+1],r)}else e[r+1]=Ng(s,0),s!==0&&(e[s+1]=zg(e[s+1],r)),s=r}else e[r+1]=Ng(c,0),s===0?s=r:e[c+1]=zg(e[c+1],r),c=r;l&&(e[r+1]=Lg(e[r+1])),Wg(e,u,r,!0),Wg(e,u,r,!1),Ug(t,u,e,r,a),o=Ng(s,c),a?t.classBindings=o:t.styleBindings=o}function Ug(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&ga(a,t)>=0&&(n[r+1]=Vg(n[r+1]))}function Wg(e,t,n,r){let i=e[n+1],a=t===null,o=r?Pg(i):Rg(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];Gg(n,t)&&(s=!0,e[o+1]=r?Vg(i):Lg(i)),o=r?Pg(i):Rg(i)}s&&(e[n+1]=r?Lg(i):Vg(i))}function Gg(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?ga(e,t)>=0:!1}var Kg={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function qg(e){return e.substring(Kg.key,Kg.keyEnd)}function Jg(e){return Xg(e),Yg(e,Zg(e,0,Kg.textEnd))}function Yg(e,t){let n=Kg.textEnd;return n===t?-1:(t=Kg.keyEnd=Qg(e,Kg.key=t,n),Zg(e,t,n))}function Xg(e){Kg.key=0,Kg.keyEnd=0,Kg.value=0,Kg.valueEnd=0,Kg.textEnd=e.length}function Zg(e,t,n){for(;t32;)t++;return t}function $g(e,t,n){return n_(e,t,n,!1),$g}function G(e,t){return n_(e,t,null,!0),G}function e_(e){r_(p_,t_,e,!0)}function t_(e,t){for(let n=Jg(t);n>=0;n=Yg(t,n))ma(e,qg(t),!0)}function n_(e,t,n,r){let i=Lo(),a=Ro(),o=Xo(2);if(a.firstUpdatePass&&a_(a,e,o,r),t!==Au&&pp(i,o,t)){let s=a.data[os()];h_(a,s,i,i[11],e,i[o+1]=v_(t,n),r,o)}}function r_(e,t,n,r){let i=Ro(),a=Xo(2);i.firstUpdatePass&&a_(i,null,a,r);let o=Lo();if(n!==Au&&pp(o,a,n)){let s=i.data[os()];if(y_(s,r)&&!i_(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=hi(e,n||``)),sg(i,s,o,n,r)}else m_(i,s,o,o[11],o[a+1],o[a+1]=f_(e,t,n),r,a)}}function i_(e,t){return t>=e.expandoStartIndex}function a_(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[os()],o=i_(e,n);y_(a,r)&&t===null&&!o&&(t=!1),t=o_(i,a,t,r),Hg(i,a,t,n,o,r)}}function o_(e,t,n,r){let i=nte(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=u_(null,e,t,n,r),n=d_(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=u_(i,e,t,n,r),a===null){let n=s_(e,t,r);n!==void 0&&Array.isArray(n)&&(n=u_(null,e,t,n[1],r),n=d_(n,t.attrs,r),c_(e,t,r,n))}else a=l_(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function s_(e,t,n){let r=n?t.classBindings:t.styleBindings;if(Rg(r)!==0)return e[Pg(r)]}function c_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[Pg(i)]=r}function l_(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===Au&&(u=l?ya:void 0);let d=l?ha(u,r):c===r?u:void 0;if(a&&!__(d)&&(d=ha(t,r)),__(d)&&(s=d,o))return s;let f=e[i+1];i=o?Pg(f):Rg(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=ha(e,r))}return s}function __(e){return e!==void 0}function v_(e,t){return e==null||e===``||(typeof t==`string`?e=ou(e)+t:typeof e==`object`&&(e=mi(ou(e)))),e}function y_(e,t){return!!(e.flags&(t?8:16))}function K(e,t=``){let n=Lo(),r=Ro(),i=e+27,a=r.firstCreatePass?qf(r,i,1,t,null):r.data[i],o=nne(r,n,a,t);n[i]=o,ps()&&_d(r,n,o,a),Vo(a,!1)}var nne=(e,t,n,r)=>(ms(!0),hu(t[11],r));function b_(e,t,n,r=``){return pp(e,Yo(),n)?t+Ri(n)+r:Au}function rne(e,t,n,r,i,a=``){let o=mp(e,Jo(),n,i);return Xo(2),o?t+Ri(n)+r+Ri(i)+a:Au}function ine(e,t,n,r,i,a,o,s=``){let c=hp(e,Jo(),n,i,o);return Xo(3),c?t+Ri(n)+r+Ri(i)+a+Ri(o)+s:Au}function ane(e,t,n,r,i,a,o,s,c,l=``){let u=gp(e,Jo(),n,i,o,c);return Xo(4),u?t+Ri(n)+r+Ri(i)+a+Ri(o)+s+Ri(c)+l:Au}function q(e){return J(``,e),q}function J(e,t,n){let r=Lo(),i=b_(r,e,t,n);return i!==Au&&C_(r,os(),i),J}function Y(e,t,n,r,i){let a=Lo(),o=rne(a,e,t,n,r,i);return o!==Au&&C_(a,os(),o),Y}function x_(e,t,n,r,i,a,o){let s=Lo(),c=ine(s,e,t,n,r,i,a,o);return c!==Au&&C_(s,os(),c),x_}function S_(e,t,n,r,i,a,o,s,c){let l=Lo(),u=ane(l,e,t,n,r,i,a,o,s,c);return u!==Au&&C_(l,os(),u),S_}function C_(e,t,n){let r=po(t,e);ote(e[11],r,n)}function w_(e,t,n){pc(t)&&(t=t());let r=Lo();return pp(r,Yo(),t)&&(Ro(),Wd(cs(),r,e,t,r[11],n)),w_}function T_(e,t){let n=pc(e);return n&&e.set(t),n}function E_(e,t){let n=Lo(),r=Ro(),i=zo();return Tg(r,n,n[11],i,e,t),E_}var D_={};function O_(e){Qu(`NgLet`);let t=Ro(),n=Lo(),r=e+27;return Vo(qf(t,r,128,null,null),!1),_o(t,n,r,D_),O_}function k_(e){return _o(Ro(),Lo(),os(),e),e}function A_(e){let t=go(Wo(),27+e);if(t===D_)throw new di(314,!1);return t}function j_(e,t,n=``){return b_(Lo(),e,t,n)}function M_(e,t,n){let r=Ro();r.firstCreatePass&&N_(t,r.data,r.blueprint,oo(e),n)}function N_(e,t,n,r,i){if(e=_i(e),Array.isArray(e))for(let a=0;a>20;if(Na(e)||!e.multi){let r=new Bc(l,i,Bp,null),p=I_(c,t,i?u:u+f,d);p===-1?(ll(al(s,o),a,c),P_(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=I_(c,t,u+f,d),m=I_(c,t,u,u+f),ee=p>=0&&n[p],h=m>=0&&n[m];if(i&&!h||!i&&!ee){ll(al(s,o),a,c);let u=cne(i?sne:one,n.length,i,r,l,e);!i&&h&&(n[m].providerFactory=u),P_(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=F_(n[i?m:p],l,!i&&r);P_(a,e,p>-1?p:m,t)}!i&&r&&h&&n[m].componentProviders++}}}function P_(e,t,n,r){let i=Na(t),a=Pa(t);if(i||a){let o=(a?_i(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 F_(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function I_(e,t,n,r){for(let i=n;i{n.providersResolver=(t,n)=>M_(t,n?n(e):e,!1),t&&(n.viewProvidersResolver=(e,n)=>M_(e,n?n(t):t,!0))}}function z_(e,t){let n=qo()+e,r=Lo();return r[n]===Au?dp(r,n,t()):fp(r,n)}function B_(e,t,n){return U_(Lo(),qo(),e,t,n)}function V_(e,t,n,r){return W_(Lo(),qo(),e,t,n,r)}function lne(e,t,n,r,i,a,o){return une(Lo(),qo(),e,t,n,r,i,a)}function H_(e,t){let n=e[t];return n===Au?void 0:n}function U_(e,t,n,r,i,a){let o=t+n;return pp(e,o,i)?dp(e,o+1,a?r.call(a,i):r(i)):H_(e,o+1)}function W_(e,t,n,r,i,a,o){let s=t+n;return mp(e,s,i,a)?dp(e,s+2,o?r.call(o,i,a):r(i,a)):H_(e,s+2)}function une(e,t,n,r,i,a,o,s,c){let l=t+n;return gp(e,l,i,a,o,s)?dp(e,l+4,c?r.call(c,i,a,o,s):r(i,a,o,s)):H_(e,l+4)}function G_(e,t){let n=Ro(),r,i=e+27;n.firstCreatePass?(r=dne(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=oa(r.type,!0)),o=Ji(Bp);try{let e=$c(!1),t=a();return $c(e),_o(n,Lo(),i,t),t}finally{Ji(o)}}function dne(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function K_(e,t,n){let r=e+27,i=Lo(),a=go(i,r);return J_(i,r)?U_(i,qo(),t,a.transform,n,a):a.transform(n)}function q_(e,t,n,r){let i=e+27,a=Lo(),o=go(a,i);return J_(a,i)?W_(a,qo(),t,o.transform,n,r,o):o.transform(n,r)}function J_(e,t){return e[1].data[t].pure}function Y_(e,t){return Kf(e,t)}var fne=(()=>{class e{applicationErrorHandler=x(Ws);appRef=x(Ih);taskService=x(Cs);ngZone=x(js);zonelessEnabled=x(tc);tracing=x(Xu,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new or;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(ks):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(x(nc,{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?Ds:Es;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=El({token:e,factory:e.ɵfac})}return e})();function pne(){return[{provide:ec,useExisting:fne},{provide:js,useClass:zs},{provide:tc,useValue:!0}]}function mne(){return typeof $localize<`u`&&$localize.locale||`en-US`}var X_=new Ei(``,{factory:()=>x(X_,{optional:!0,skipSelf:!0})||mne()}),Z_=class{destroyed=!1;listeners=null;errorHandler=x(Us,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=x(ys);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new di(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(fi(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&&hne(this.listeners)),tn(t),this.isEmitting=!1}}};function hne(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 Gn(e)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var gne=e=>e;function Q(e,t){return typeof e==`function`?Q_(Vn(e,gne,t?.equal),t?.debugName,t?.set):Q_(Vn(e.source,e.computation,e.equal),e.debugName,e.set)}function Q_(e,t,n){let r=e[en],i=e;if(n!==void 0){let t=e=>Hn(r,e);i.set=e=>n(e,t),i.update=r=>n(r(Z(e)),t)}else i.set=e=>Hn(r,e),i.update=e=>Un(r,e);return i.asReadonly=Ks.bind(e),i}var $_=!1;function _ne(){return $_}function ev(e){$_=e}function tv(e,t){let n=Object.create(hc);n.value=e,n.transformFn=t?.transform;function r(){if(an(n),n.value===mc)throw new di(-950,null);return n.value}return r[en]=n,r}function nv(e){return new Z_}function rv(e,t){return tv(e,t)}function vne(e){return tv(mc,e)}var $=(rv.required=vne,rv);function iv(e,t){let n=Object.create(hc),r=new Z_;n.value=e;function i(){return an(n),av(n.value),n.value}return i[en]=n,i.asReadonly=Ks.bind(i),i.set=e=>{n.equal(n.value,e)||(An(n,e),r.emit(e))},i.update=e=>{av(n.value),i.set(e(n.value))},i.subscribe=r.subscribe.bind(r),i.destroyRef=r.destroyRef,i}function av(e){if(e===mc)throw new di(952,!1)}function ov(e,t){return iv(e,t)}function yne(e){return iv(mc,e)}var sv=(ov.required=yne,ov);function cv(e,t){return Xm(t)}function bne(e,t){return Zm(t)}var lv=(cv.required=bne,cv),xne=(()=>{class e{static __NG_ELEMENT_ID__=Sne}return e})();function Sne(e){return Cne(zo(),Lo(),(e&16)==16)}function Cne(e,t,n){if(io(e)&&!n){let n=vo(e.index,t);return new Uf(n,n)}if(e.type&175){let e=t[15];return new Uf(e,t)}return null}var uv=new Ei(``),wne=new Ei(``);function dv(e){return!e.moduleRef}function Tne(e){let t=dv(e)?e.r3Injector:e.moduleRef.injector,n=t.get(js);return n.run(()=>{dv(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Ws),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),dv(e)){let n=()=>t.destroy(),r=e.platformInjector.get(uv);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(uv);n.add(t),e.moduleRef.onDestroy(()=>{Rh(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return Dne(r,n,()=>{let n=t.get(Cs),r=n.add(),i=t.get(gh);return i.runInitializers(),i.donePromise.then(()=>{if(wg(t.get(X_,Cg)||`en-US`),!t.get(wne,!0))return dv(e)?t.get(Ih):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(dv(e)){let n=t.get(Ih);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return Ene?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var Ene;function Dne(e,t,n){try{let r=n();return eh(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var fv=null;function One(e=[],t){return _s.create({name:t,providers:[{provide:Fa,useValue:`platform`},{provide:uv,useValue:new Set([()=>fv=null])},...e]})}function kne(e=[]){if(fv)return fv;let t=One(e);return fv=t,Ph(),Ane(t),t}function Ane(e){let t=e.get(Ys,null);Qa(e,()=>{t?.forEach(e=>e())})}function jne(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;Ac(_c.BootstrapApplicationStart);try{let e=i?.injector??kne(r);return Tne({r3Injector:new rh({providers:[pne(),Gs,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{Ac(_c.BootstrapApplicationEnd)}}function pv(e){return typeof e==`boolean`?e:e!=null&&e!==`false`}var mv=Symbol(`NOT_SET`),hv=new Set,Mne={...Mn,kind:`afterRenderEffectPhase`,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:mv,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??hv)t()}finally{_n(e)}}};function gv(e,t){let n=t?.injector??x(_s),r=n.get(ec),i=n.get($u),a=n.get(Xu,null,{optional:!0});i.impl??=n.get(td);let o=e;typeof o==`function`&&(o={mixedReadWrite:e});let s=n.get(Qs,null,{optional:!0}),c=new Nne(i.impl,[o.earlyRead,o.write,o.mixedReadWrite,o.read],s?.view,r,n,a?.snapshot(null));return i.impl.register(c),c}var _v=null;function vv(){return _v}function Pne(e){_v??=e}var Fne=class{},yv=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(yv||{}),bv=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(bv||{}),xv=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(xv||{}),Sv={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 Ine(e){return yg(e)[xg.LocaleId]}function Lne(e,t,n){let r=yg(e);return Ov(Ov([r[xg.DayPeriodsFormat],r[xg.DayPeriodsStandalone]],t),n)}function Rne(e,t,n){let r=yg(e);return Ov(Ov([r[xg.DaysFormat],r[xg.DaysStandalone]],t),n)}function zne(e,t,n){let r=yg(e);return Ov(Ov([r[xg.MonthsFormat],r[xg.MonthsStandalone]],t),n)}function Bne(e,t){let n=yg(e)[xg.Eras];return Ov(n,t)}function Cv(e,t){return Ov(yg(e)[xg.DateFormat],t)}function wv(e,t){return Ov(yg(e)[xg.TimeFormat],t)}function Tv(e,t){let n=yg(e)[xg.DateTimeFormat];return Ov(n,t)}function Ev(e,t){let n=yg(e),r=n[xg.NumberSymbols][t];if(r===void 0){if(t===Sv.CurrencyDecimal)return n[xg.NumberSymbols][Sv.Decimal];if(t===Sv.CurrencyGroup)return n[xg.NumberSymbols][Sv.Group]}return r}function Dv(e){if(!e[xg.ExtraData])throw new di(2303,!1)}function Vne(e){let t=yg(e);return Dv(t),(t[xg.ExtraData][2]||[]).map(e=>typeof e==`string`?kv(e):[kv(e[0]),kv(e[1])])}function Hne(e,t,n){let r=yg(e);return Dv(r),Ov(Ov([r[xg.ExtraData][0],r[xg.ExtraData][1]],t)||[],n)||[]}function Ov(e,t){for(let n=t;n>-1;n--)if(e[n]!==void 0)return e[n];throw new di(2304,!1)}function kv(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var Une=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Av=Object.create(null),Wne=/((?:[^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]*)/,Gne=256;function Kne(e,t,n,r){let i=nre(e);qne(t),t=Mv(n,t)||t;let a=[],o;for(;t;)if(o=Wne.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=Uv(r,s),i=tre(i,r));let c=``;return a.forEach(e=>{let t=$ne(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function qne(e){if(e.length>Gne)throw new di(2300,!1)}function jv(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function Mv(e,t){let n=Ine(e);if(Av[n]??=Object.create(null),Av[n][t])return Av[n][t];let r=``;switch(t){case`shortDate`:r=Cv(e,xv.Short);break;case`mediumDate`:r=Cv(e,xv.Medium);break;case`longDate`:r=Cv(e,xv.Long);break;case`fullDate`:r=Cv(e,xv.Full);break;case`shortTime`:r=wv(e,xv.Short);break;case`mediumTime`:r=wv(e,xv.Medium);break;case`longTime`:r=wv(e,xv.Long);break;case`fullTime`:r=wv(e,xv.Full);break;case`short`:let t=Mv(e,`shortTime`),n=Mv(e,`shortDate`);r=Nv(Tv(e,xv.Short),[t,n]);break;case`medium`:let i=Mv(e,`mediumTime`),a=Mv(e,`mediumDate`);r=Nv(Tv(e,xv.Medium),[i,a]);break;case`long`:let o=Mv(e,`longTime`),s=Mv(e,`longDate`);r=Nv(Tv(e,xv.Long),[o,s]);break;case`full`:let c=Mv(e,`fullTime`),l=Mv(e,`fullDate`);r=Nv(Tv(e,xv.Full),[c,l])}return r&&(Av[n][t]=r),r}function Nv(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return Object.hasOwn(t,n)?t[n]:e})),e}function Pv(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 Jne(s,t);let c=Ev(o,Sv.MinusSign);return Pv(s,t,c,r,i)}}function Yne(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 di(2301,!1)}}function Iv(e,t,n=yv.Format,r=!1){return function(i,a){return Xne(i,a,e,t,n,r)}}function Xne(e,t,n,r,i,a){switch(n){case 2:return zne(t,i,r)[e.getMonth()];case 1:return Rne(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=Vne(t),a=Hne(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?`+`:``)+Pv(o,2,a)+Pv(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+Pv(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+Pv(o,2,a)+`:`+Pv(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+Pv(o,2,a)+`:`+Pv(Math.abs(i%60),2,a);default:throw new di(2310,!1)}}}var Zne=0,Rv=4;function Qne(e){let t=jv(e,Zne,1).getDay();return jv(e,0,1+(t<=Rv?Rv:11)-t)}function zv(e){let t=e.getDay(),n=t===0?-3:Rv-t;return jv(e.getFullYear(),e.getMonth(),e.getDate()+n)}function Bv(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=zv(n),t=Qne(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return Pv(i,e,Ev(r,Sv.MinusSign))}}function Vv(e,t=!1){return function(n,r){return Pv(zv(n).getFullYear(),e,Ev(r,Sv.MinusSign),t)}}var Hv=Object.create(null);function $ne(e){if(Hv[e])return Hv[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=Iv(3,bv.Abbreviated);break;case`GGGG`:t=Iv(3,bv.Wide);break;case`GGGGG`:t=Iv(3,bv.Narrow);break;case`y`:t=Fv(0,1,0,!1,!0);break;case`yy`:t=Fv(0,2,0,!0,!0);break;case`yyy`:t=Fv(0,3,0,!1,!0);break;case`yyyy`:t=Fv(0,4,0,!1,!0);break;case`Y`:t=Vv(1);break;case`YY`:t=Vv(2,!0);break;case`YYY`:t=Vv(3);break;case`YYYY`:t=Vv(4);break;case`M`:case`L`:t=Fv(1,1,1);break;case`MM`:case`LL`:t=Fv(1,2,1);break;case`MMM`:t=Iv(2,bv.Abbreviated);break;case`MMMM`:t=Iv(2,bv.Wide);break;case`MMMMM`:t=Iv(2,bv.Narrow);break;case`LLL`:t=Iv(2,bv.Abbreviated,yv.Standalone);break;case`LLLL`:t=Iv(2,bv.Wide,yv.Standalone);break;case`LLLLL`:t=Iv(2,bv.Narrow,yv.Standalone);break;case`w`:t=Bv(1);break;case`ww`:t=Bv(2);break;case`W`:t=Bv(1,!0);break;case`d`:t=Fv(2,1);break;case`dd`:t=Fv(2,2);break;case`c`:case`cc`:t=Fv(7,1);break;case`ccc`:t=Iv(1,bv.Abbreviated,yv.Standalone);break;case`cccc`:t=Iv(1,bv.Wide,yv.Standalone);break;case`ccccc`:t=Iv(1,bv.Narrow,yv.Standalone);break;case`cccccc`:t=Iv(1,bv.Short,yv.Standalone);break;case`E`:case`EE`:case`EEE`:t=Iv(1,bv.Abbreviated);break;case`EEEE`:t=Iv(1,bv.Wide);break;case`EEEEE`:t=Iv(1,bv.Narrow);break;case`EEEEEE`:t=Iv(1,bv.Short);break;case`a`:case`aa`:case`aaa`:t=Iv(0,bv.Abbreviated);break;case`aaaa`:t=Iv(0,bv.Wide);break;case`aaaaa`:t=Iv(0,bv.Narrow);break;case`b`:case`bb`:case`bbb`:t=Iv(0,bv.Abbreviated,yv.Standalone,!0);break;case`bbbb`:t=Iv(0,bv.Wide,yv.Standalone,!0);break;case`bbbbb`:t=Iv(0,bv.Narrow,yv.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=Iv(0,bv.Abbreviated,yv.Format,!0);break;case`BBBB`:t=Iv(0,bv.Wide,yv.Format,!0);break;case`BBBBB`:t=Iv(0,bv.Narrow,yv.Format,!0);break;case`h`:t=Fv(3,1,-12);break;case`hh`:t=Fv(3,2,-12);break;case`H`:t=Fv(3,1);break;case`HH`:t=Fv(3,2);break;case`m`:t=Fv(4,1);break;case`mm`:t=Fv(4,2);break;case`s`:t=Fv(5,1);break;case`ss`:t=Fv(5,2);break;case`S`:t=Fv(6,1);break;case`SS`:t=Fv(6,2);break;case`SSS`:t=Fv(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=Lv(0);break;case`ZZZZZ`:t=Lv(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=Lv(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=Lv(2);break;default:return null}return Hv[e]=t,t}function Uv(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function ere(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function tre(e,t,n){let r=e.getTimezoneOffset();return ere(e,-1*(Uv(t,r)-r))}function nre(e){if(Wv(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 jv(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(Une))return rre(n)}let t=new Date(e);if(!Wv(t))throw new di(2311,!1);return t}function rre(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 Wv(e){return e instanceof Date&&!isNaN(e.valueOf())}var Gv=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=x(_s);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)(Bp(bm))};static ɵdir=lh({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[xc]})}return e})();function ire(e,t){return new di(2100,!1)}var are=`mediumDate`,ore=new Ei(``),sre=new Ei(``),Kv=(()=>{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??are,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Kne(t,e,i||this.locale,a)}catch(t){throw ire(e,t.message)}}static ɵfac=function(t){return new(t||e)(Bp(X_,16),Bp(ore,24),Bp(sre,24))};static ɵpipe=uh({name:`date`,type:e,pure:!0})}return e})(),qv=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=uh({name:`json`,type:e,pure:!1})}return e})();function cre(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 lre=`browser`,Jv=class{_doc;constructor(e){this._doc=e}manager},Yv=(()=>{class e extends Jv{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)(ta(vs))};static ɵprov=yi({token:e,factory:e.ɵfac})}return e})(),Xv=new Ei(``),Zv=(()=>{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 Yv));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof Yv);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 di(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(ta(Xv),ta(js))};static ɵprov=yi({token:e,factory:e.ɵfac})}return e})(),Qv=`ng-app-id`;function $v(e){for(let t of e)t.remove()}function ey(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function ure(e,t,n,r){let i=e.head?.querySelectorAll(`style[${Qv}="${t}"],link[${Qv}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(Qv),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 ty(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var ny=(()=>{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,ure(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,ey);t?.forEach(e=>this.addUsage(e,this.external,ty))}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&&($v(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])$v(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,ey(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,ty(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)(ta(vs),ta(qs),ta(Zs,8),ta(Xs))};static ɵprov=yi({token:e,factory:e.ɵfac})}return e})(),ry={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`},iy=/%COMP%/g,ay=`%COMP%`,dre=`_nghost-${ay}`,fre=`_ngcontent-${ay}`,pre=!0,mre=new Ei(``,{factory:()=>pre}),hre=new Ei(``);function gre(e){return fre.replace(iy,e)}function _re(e){return dre.replace(iy,e)}function oy(e,t){return t.map(t=>t.replace(iy,e))}var sy=(()=>{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 cy(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 fy?n.applyToHost(e):n instanceof dy&&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 iu.Emulated:r=new fy(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case iu.ShadowDom:return new uy(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case iu.ExperimentalIsolatedShadowDom:return new uy(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new dy(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)(ta(Zv),ta(Rp),ta(qs),ta(mre),ta(vs),ta(js),ta(Zs),ta(Xu,8),ta(hre,8))};static ɵprov=yi({token:e,factory:e.ɵfac})}return e})(),cy=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(ry[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(ly(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=ly(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new di(-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 di(-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=ry[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=ry[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&(ju.DashCase|ju.Important)?e.style.setProperty(t,n,r&ju.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&ju.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=vv().getGlobalEventTarget(this.doc,e),!e))throw new di(-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 ly(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var uy=class extends cy{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=oy(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=ty(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)}},dy=class extends cy{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?oy(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&&Ru.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},fy=class extends dy{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=gre(l),this.hostAttr=_re(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}},vre=class e extends Fne{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=yre();return t==null?null:bre(t)}resetBaseElement(){py=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return cre(document.cookie,e)}},py=null;function yre(){return py||=document.head.querySelector(`base`),py?py.getAttribute(`href`):null}function bre(e){return new URL(e,document.baseURI).pathname}var my=[`alt`,`control`,`meta`,`shift`],xre={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},Sre={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},Cre=(()=>{class e extends Jv{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(()=>vv().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.`),my.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=xre[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`),my.forEach(t=>{if(t!==n){let n=Sre[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)(ta(vs))};static ɵprov=yi({token:e,factory:e.ɵfac})}return e})();async function wre(e,t,n){return jne({rootComponent:e,...Tre(t,n)})}function Tre(e,t){return{platformRef:t?.platformRef,appProviders:[...Are,...e?.providers??[]],platformProviders:kre}}function Ere(){vre.makeCurrent()}function Dre(){return new Us}function Ore(){return Kl(document),document}var kre=[{provide:Xs,useValue:lre},{provide:Ys,useValue:Ere,multi:!0},{provide:vs,useFactory:Ore}],Are=[{provide:Fa,useValue:`root`},{provide:Us,useFactory:Dre},{provide:Xv,useClass:Yv,multi:!0},{provide:Xv,useClass:Cre,multi:!0},sy,{provide:Rp,useClass:ny},{provide:ny,useExisting:Rp},Zv,{provide:ip,useExisting:sy},[]];function hy(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 yy({code:i,why:_y(a.why,e),fix:_y(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:_y(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function Sy(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 Oy=Math.random.bind(Math),ky=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Ay(e=21){let t=``,n=e;for(;n--;)t+=ky[Oy()*64|0];return t}var jy=6e4,My=e=>e,Ny=My,{clearTimeout:Py,setTimeout:Fy}=globalThis;function Iy(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=My,deserialize:s=Ny,resolver:c,bind:l=`rpc`,timeout:u=jy,proxify:d=!0}=t,f=!1,p=new Map,m,ee;async function h(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:h}=Dy(),g=Ay();s.i=g;let te;async function ne(n=s){return u>=0&&(te=Fy(()=>{try{if(t.onTimeoutError?.call(ee,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){h(e)}p.delete(g)},u),typeof te==`object`&&(te=te.unref?.())),p.set(g,{resolve:d,reject:h,timeoutId:te,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(ee,s,ne,d):await ne()}catch(e){if(t.onGeneralError?.call(ee,e)!==!0)throw e;return}finally{Py(te),p.delete(g)}return l}let g={$call:(e,...t)=>h(e,t,!1),$callOptional:(e,...t)=>h(e,t,!1,!0),$callEvent:(e,...t)=>h(e,t,!0),$callRaw:e=>h(e.method,e.args,e.event,e.optional),$rejectPendingCalls:ne,get $closed(){return f},get $meta(){return t.meta},$close:te,$functions:e};ee=d?new Proxy({},{get(t,n){if(Object.hasOwn(g,n))return g[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>h(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>h(n,e,!1);return i.asEvent=r,i}}):g;function te(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(re)}function ne(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 re(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(ee,e)!==!0)throw e;return}if(a.t===`q`){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(ee,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`?ee:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(ee,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(ee,e,r,s)!==!0)throw e}try{await n(o({t:`s`,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(ee,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(Py(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(re),ee}function Ly(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var Ry=Object.freeze({type:`object`,additionalProperties:!0});function zy(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return Ry}return Ry}function By(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 Hy(e,t){return Vy(e,t)??[e]}function Uy(e){return typeof e==`string`?`'${e}'`:new qy().serialize(e)}var Wy=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Gy=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Wy.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Ky(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})(),Jy=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Yy=[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],Xy=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,Zy=[],Qy=class{_data=new $y;_hash=new $y([...Jy]);_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)Zy[n]=e[t+n]|0;else{let e=Zy[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=Zy[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;Zy[n]=t+Zy[n-7]+i+Zy[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),ee=u+m+d+Yy[n]+Zy[n],h=p+f;u=l,l=c,c=s,s=o+ee|0,o=a,a=i,i=r,r=ee+h|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=$y.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 eb(e){return new Qy().finalize(e).toBase64()}function tb(e){return eb(Uy(e))}function nb(e){return tb(e)}function rb(){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 ib=/^[\w+.-]{2,}:\/\//;function ab(e){return e.endsWith(`/`)?e:`${e}/`}function ob(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function sb(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?ab(n)+e.replace(/^\.?\//,``):e);return n}function cb(e,t){if(!t||t===`/`||ib.test(e))return e;let n=ob(t);return e.startsWith(n)?e:sb(n,e)}function lb(e,t){let n=e.match(ib);return t+(n?e.slice(n[0].length):e)}var ub=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function db(e=21){let t=``,n=e;for(;n--;)t+=ub[Math.random()*64|0];return t}var fb=Symbol.for(`immer-nothing`),pb=Symbol.for(`immer-draftable`),mb=Symbol.for(`immer-state`),hb=[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 gb(e,...t){{let n=hb[e],r=Bb(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var _b=Object,vb=_b.getPrototypeOf,yb=`constructor`,bb=`prototype`,xb=`configurable`,Sb=`enumerable`,Cb=`writable`,wb=`value`,Tb=e=>!!e&&!!e[mb];function Eb(e){return e?kb(e)||Ib(e)||!!e[pb]||!!e[yb]?.[pb]||Lb(e)||Rb(e):!1}var Db=_b[bb][yb].toString(),Ob=new WeakMap;function kb(e){if(!e||!zb(e))return!1;let t=vb(e);if(t===null||t===_b[bb])return!0;let n=_b.hasOwnProperty.call(t,yb)&&t[yb];if(n===Object)return!0;if(!Bb(n))return!1;let r=Ob.get(n);return r===void 0&&(r=Function.toString.call(n),Ob.set(n,r)),r===Db}function Ab(e,t,n=!0){jb(e)===0?(n?Reflect.ownKeys(e):_b.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function jb(e){let t=e[mb];return t?t.type_:Ib(e)?1:Lb(e)?2:Rb(e)?3:0}var Mb=(e,t,n=jb(e))=>n===2?e.has(t):_b[bb].hasOwnProperty.call(e,t),Nb=(e,t,n=jb(e))=>n===2?e.get(t):e[t],Pb=(e,t,n,r=jb(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Fb(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var Ib=Array.isArray,Lb=e=>e instanceof Map,Rb=e=>e instanceof Set,zb=e=>typeof e==`object`,Bb=e=>typeof e==`function`,Vb=e=>typeof e==`boolean`;function Hb(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Ub=e=>zb(e)?e?.[mb]:null,Wb=e=>e.copy_||e.base_,Gb=e=>e.modified_?e.copy_:e.base_;function Kb(e,t){if(Lb(e))return new Map(e);if(Rb(e))return new Set(e);if(Ib(e))return Array[bb].slice.call(e);let n=kb(e);if(t===!0||t===`class_only`&&!n){let t=_b.getOwnPropertyDescriptors(e);delete t[mb];let n=Reflect.ownKeys(t);for(let r=0;r1&&_b.defineProperties(e,{set:Yb,add:Yb,clear:Yb,delete:Yb}),_b.freeze(e),t&&Ab(e,(e,t)=>{qb(t,!0)},!1),e)}function Jb(){gb(2)}var Yb={[wb]:Jb};function Xb(e){return e===null||!zb(e)||_b.isFrozen(e)}var Zb=`MapSet`,Qb=`Patches`,$b=`ArrayMethods`,ex={};function tx(e){let t=ex[e];return t||gb(0,e),t}var nx=e=>!!ex[e];function rx(e,t){ex[e]||(ex[e]=t)}var ix,ax=()=>ix,ox=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:nx(Zb)?tx(Zb):void 0,arrayMethodsPlugin_:nx($b)?tx($b):void 0});function sx(e,t){t&&(e.patchPlugin_=tx(Qb),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function cx(e){lx(e),e.drafts_.forEach(dx),e.drafts_=null}function lx(e){e===ix&&(ix=e.parent_)}var ux=e=>ix=ox(ix,e);function dx(e){let t=e[mb];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function fx(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[mb].modified_&&(cx(t),gb(4)),Eb(e)&&(e=px(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[mb].base_,e,t)}else e=px(t,n);return mx(t,e,!0),cx(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===fb?void 0:e}function px(e,t){if(Xb(t))return t;let n=t[mb];if(!n)return Sx(t,e.handledSet_,e);if(!gx(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);bx(n,e)}return n.copy_}function mx(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&qb(t,n)}function hx(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var gx=(e,t)=>e.scope_===t,_x=[];function vx(e,t,n,r){let i=Wb(e),a=e.type_;if(r!==void 0&&Nb(i,r,a)===t){Pb(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Ab(i,(e,n)=>{if(Tb(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??_x;for(let e of o)Pb(i,e,n,a)}function yx(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!gx(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Gb(i);vx(e,i.draft_??i,a,n),bx(i,r)})}function bx(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)}hx(e)}}function xx(e,t,n){let{scope_:r}=e;if(Tb(n)){let i=n[mb];gx(i,r)&&i.callbacks_.push(function(){jx(e),vx(e,n,Gb(i),t)})}else Eb(n)&&e.callbacks_.push(function(){let i=Wb(e);e.type_===3?i.has(n)&&Sx(n,r.handledSet_,r):Nb(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Sx(Nb(e.copy_,t,e.type_),r.handledSet_,r)})}function Sx(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Tb(e)||t.has(e)||!Eb(e)||Xb(e)?e:(t.add(e),Ab(e,(r,i)=>{if(Tb(i)){let t=i[mb];gx(t,n)&&(Pb(e,r,Gb(t),e.type_),hx(t))}else Eb(i)&&Sx(i,t,n)}),e)}function Cx(e,t){let n=Ib(e),r={type_:+!!n,scope_:t?t.scope_:ax(),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=wx;n&&(i=[r],a=Tx);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var wx={get(e,t){if(t===mb)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=Wb(e);if(!Mb(i,t,e.type_))return Ox(e,i,t);let a=i[t];if(e.finalized_||!Eb(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Hb(t))return a;if(a===Ex(e.base_,t)||Dx(e,t,a)){jx(e);let n=e.type_===1?+t:t,r=Nx(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in Wb(e)},ownKeys(e){return Reflect.ownKeys(Wb(e))},set(e,t,n){let r=kx(Wb(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Ex(Wb(e),t),i=r?.[mb];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(Fb(n,r)&&(n!==void 0||Mb(e.base_,t,e.type_)))return!0;jx(e),Ax(e)}return e.copy_[t]===n&&(n!==void 0||Mb(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),xx(e,t,n),!0)},deleteProperty(e,t){return jx(e),Ex(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Ax(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Wb(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Cb]:!0,[xb]:e.type_!==1||t!==`length`,[Sb]:r[Sb],[wb]:n[t]}},defineProperty(){gb(11)},getPrototypeOf(e){return vb(e.base_)},setPrototypeOf(){gb(12)}},Tx={};for(let e in wx){let t=wx[e];Tx[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}Tx.deleteProperty=function(e,t){return isNaN(parseInt(t))&&gb(13),Tx.set.call(this,e,t,void 0)},Tx.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&gb(14),wx.set.call(this,e[0],t,n,e[0])};function Ex(e,t){let n=e[mb];return(n?Wb(n):e)[t]}function Dx(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Eb(n)||n[mb]?!1:e.baseRefs_.has(n)}function Ox(e,t,n){let r=kx(t,n);return r?wb in r?r[wb]:r.get?.call(e.draft_):void 0}function kx(e,t){if(!(t in e))return;let n=vb(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=vb(n)}}function Ax(e){e.modified_||(e.modified_=!0,e.parent_&&Ax(e.parent_))}function jx(e){e.copy_||=(e.assigned_=new Map,Kb(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Mx=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Bb(e)&&!Bb(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Bb(t)||gb(6),n!==void 0&&!Bb(n)&&gb(7);let r;if(Eb(e)){let i=ux(this),a=Nx(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?cx(i):lx(i)}return sx(i,n),fx(r,i)}if(!e||!zb(e)){if(r=t(e),r===void 0&&(r=e),r===fb&&(r=void 0),this.autoFreeze_&&qb(r,!0),n){let t=[],i=[];tx(Qb).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}gb(1,e)},this.produceWithPatches=(e,t)=>{if(Bb(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]},Vb(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Vb(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Vb(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Eb(e)||gb(8),Tb(e)&&(e=Px(e));let t=ux(this),n=Nx(t,e,void 0);return n[mb].isManual_=!0,lx(t),n}finishDraft(e,t){let n=e&&e[mb];(!n||!n.isManual_)&&gb(9);let{scope_:r}=n;return sx(r,t),fx(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=tx(Qb).applyPatches_;return Tb(e)?r(e,t):this.produce(e,e=>r(e,t))}};function Nx(e,t,n,r){let[i,a]=Lb(t)?tx(Zb).proxyMap_(t,n):Rb(t)?tx(Zb).proxySet_(t,n):Cx(t,n);return(n?.scope_??ax()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?yx(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 Px(e){return Tb(e)||gb(10,e),Fx(e)}function Fx(e){if(!Eb(e)||Xb(e))return e;let t=e[mb],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Kb(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Kb(e,!0);let i=n;return Rb(n)&&(n=new Set),Ab(i,(e,t)=>{Pb(n,e,Fx(t))},r),t&&(t.finalized_=!1),n}function Ix(){hb.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=Ub(Nb(e,n.key_)),i=Nb(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||Mb(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=Nb(o,e,c),f=Nb(s,e,c),p=l?Mb(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===fb?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(Rb(e))return new Set(Array.from(e).map(u));let t=Object.create(vb(e));for(let n in e)t[n]=u(e[n]);return Mb(e,pb)&&(t[pb]=e[pb]),t}function d(e){return Tb(e)?u(e):e}rx(Qb,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var Lx=new Mx,Rx=Lx.produce,zx=Lx.produceWithPatches.bind(Lx),Bx=Lx.applyPatches.bind(Lx),Vx=1e3;function Hx(e,t){if(e.add(t),e.size>Vx){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function Ux(e){let{enablePatches:t=!1}=e;t&&Ix();let n=rb(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=db())=>{i.has(t)||(Ix(),r=Bx(r,e),Hx(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=db())=>{if(!i.has(a)){if(Hx(i,a),t){let[t,i]=zx(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=Rx(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var Wx=typeof self==`object`?self:globalThis,Gx=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),Kx=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function qx(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=Gx.has(e)?Wx[e]:void 0;return n(new(r??Wx.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`&&Kx.has(a))return n(new Wx[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function Jx(e){return qx(new Map,e)(0)}var Yx=``,{toString:Xx}={},{keys:Zx}=Object;function Qx(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Xx.call(e).slice(8,-1);switch(n){case`Array`:return[1,Yx];case`Object`:return[2,Yx];case`Date`:return[3,Yx];case`RegExp`:return[4,Yx];case`Map`:return[5,Yx];case`Set`:return[6,Yx];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function $x([e,t]){return e===0&&(t===`function`||t===`symbol`)}function eS(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]=Qx(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 Zx(r))(e||!$x(Qx(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||!($x(Qx(n))||$x(Qx(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!$x(Qx(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function tS(e,t={}){let n=[];return eS(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:nS,stringify:rS}=JSON,iS={json:!0,lossy:!0};function aS(e){return Jx(nS(e))}function oS(e){return rS(tS(e,iS))}function sS(e){return Jx(e)}function cS(e){return oS(e)}function lS(e){return aS(e)}var uS=256,dS=class extends Error{name=`StreamClosedError`};function fS(e={}){let t=e.id??db(),n=Math.max(0,e.replayWindow??0),r=rb(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new dS(`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=mS(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 pS(e={}){let t=e.id??db(),n=Math.max(1,e.highWaterMark??uS),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 ee(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function h(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){ee()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return h()},cancel:ee,_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 ee(),Promise.resolve({value:void 0,done:!0})}}}}}function mS(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 hS=128;function gS(e){return e.replace(/[^\w-]+/g,`_`).slice(0,hS)}var _S=`modulepreload`,vS=function(e,t){return new URL(e,t).href},yS={},bS=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=vS(t,n),t=s(t),t in yS)return;yS[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`:_S,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)})},xS=`__connection.json`,SS=`__DEVFRAME_CONNECTION__`,CS=`x-birpc-session`,wS=`__rpc-dump/index.json`,TS=`devframe:services`,ES=`devframe_otp`,DS=`devframe_auth_token`;Cy.postMessage.remoteAssetsError;var OS=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>nb(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()}},kS=Ey({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 AS(e){if(e.agent&&e.jsonSerializable===!1)throw kS.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function jS(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function MS(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 NS(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 IS(e,t){let n=e.handler;if(!n){let r=await FS(e,t);if(!r.handler)throw kS.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 NS(e.name,r,t),o=await a(...n);return await PS(e.name,i,o)}}var LS=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 IS(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 kS.DF0021({name:e.name});AS(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 kS.DF0022({name:e.name});AS(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 IS(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw kS.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 RS(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 BS(t,`undefined`,r,e);return n}return i!==null&&zS(i,r,e,t),n})}function zS(e,t,n,r){if(typeof e==`bigint`)throw BS(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw BS(r,`Map`,t,n);if(e instanceof Set)throw BS(r,`Set`,t,n);if(e instanceof Date)throw BS(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw BS(r,e.constructor?.name??`class instance`,t,n)}function BS(e,t,n,r){let i=VS(n,r);return kS.DF0020({name:e||``,type:t,path:i})}function VS(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var HS=`__DEVFRAME_CONNECTION_META__`,US=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function WS(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 GS(){return WS(SS)}function KS(){return WS(HS)}function qS(e){if(e)return e;try{let e=localStorage.getItem(US);if(e)return e}catch{}return WS(US)}function JS(e){globalThis[SS]=e,globalThis[HS]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&YS(e.authToken)}function YS(e){try{localStorage.setItem(US,e)}catch{}globalThis[US]=e;let t=GS();t&&(globalThis[SS]={...t,authToken:e})}function XS(e){let t=cb(xS,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function ZS(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function QS(){let e=GS();if(e)return ZS(e,qS()??e.authToken??e.connectionMeta.authToken);let t=KS();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??XS(`./`),authToken:qS(t.authToken)}}async function $S(e={}){if(e.connection){let t=ZS(e.connection,qS(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return JS(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:XS(t[0]??`./`),authToken:qS(e.authToken??e.connectionMeta.authToken)};return JS(n),n}let n=QS();if(n){let t=ZS(n,qS(e.authToken??n.authToken??n.connectionMeta.authToken));return JS(t),t}let r=[];for(let n of t){let t=cb(xS,n),i=XS(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:qS(e.authToken??r.authToken)};return JS(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var eC=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function tC(e=ES){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function nC(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 rC(e=ES){let t=tC(e);return t&&nC(e),t}async function iC(e,t={}){let n=rC(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function aC(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(TS,{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 oC(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:Cy.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:Cy.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=Ux({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(Cy.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var sC=new Map;function cC(e=sC){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?RS(n,r??``):`s:${cS(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?lS(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function lC(){}function uC(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 dC(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 fC(e){let{onConnected:t=lC,onError:n=lC,onDisconnected:r=lC,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${DS}=${encodeURIComponent(e.authToken)}`);let s=cC(i),c=new AbortController,l=!1,u,d,f,p,m=new Promise((e,t)=>{f=e,p=t});m.catch(()=>{});function ee(e){l||(l=!0,p(e),n(e),r())}function h(){l||(l=!0,p(Error(`Devframe SSE stream closed`)),r())}function g(e,n){if(e===`session`){f(n),t();return}u?.(n)}async function te(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=uC(r);if(!e)break;r=e.rest;let{event:t,data:n}=dC(e.frame);n.length>0&&g(t,n.join(` -`))}}h()}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 te(e.body)}catch(e){if(c.signal.aborted){h();return}ee(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`,[CS]: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 pC(e,t){let{channel:n,rpcOptions:r={}}=t;return Iy(e,{...n,timeout:-1,...r,proxify:!1})}function mC(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(Cy.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function ee(){return l===`disconnected`||l===`error`?new eC(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new eC(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function h(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(Cy.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 eC(`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(Cy.client.error,n,t),r(n)})})}let g=new Map;for(let e of r.jsonSerializableMethods??[])g.set(e,{jsonSerializable:!0});let te=e.createChannel({definitions:g,onError(e){f(`error`,e),i.emit(Cy.client.connectionError,e),m(new eC(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new eC(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),ne=pC(a.functions,{channel:te,rpcOptions:o});a.register({name:Cy.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new eC(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(Cy.client.connectionError,e),m(e),i.emit(Cy.client.isTrustedUpdated,!1)}});let re=n;async function ie(e){re=e;let t=await ne.$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 eC(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(Cy.client.connectionError,e)}return i.emit(Cy.client.isTrustedUpdated,c),t.isTrusted}async function ae(e){let t=(await ne.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(re=t,c=!0,d.resolve(!0),f(`connected`),i.emit(Cy.client.isTrustedUpdated,!0)),t}async function oe(e={}){await ne.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function se(){return c?!0:ie(re??``)}async function ce(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:se,requestTrustWithToken:ie,requestTrustWithCode:ae,requestAuthCode:oe,ensureTrusted:ce,call:(...e)=>{let t=String(e[0]),n=ee();return n?(i.emit(Cy.client.error,n,t),Promise.reject(n)):h(ne.$call(...e),t)},callEvent:(...e)=>{let t=ee();if(t){i.emit(Cy.client.error,t,String(e[0]));return}return ne.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=ee();return n?(i.emit(Cy.client.error,n,t),Promise.reject(n)):h(ne.$callOptional(...e),t)},close:()=>{te.close()}}}function hC(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 gC(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=hC(n.sse,r??`./`,location);return mC({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>fC({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 _C(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:vC(r)?_C(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function vC(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function yC(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function bC(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function xC(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function SC(e){if(e.error)throw _C(e.error);return e.output}function CC(e){return e.some(e=>e!=null)}function wC(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function TC(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?sS(e):e}function a(e,t){return i(wC(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 xC(r)?SC(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(yC(r)){if(CC(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(bC(r)){let e=nb(n),i=r.records[e];if(i)return SC(await s(i,r.serialization));if(r.fallback)return SC(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!CC(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 EC(e){let t=TC(await e.fetchJsonFromBases(wS),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 DC=``;function OC(e,t){return`${e}${DC}${t}`}function kC(e){let t=new Map,n=new Map;e.client.register({name:Cy.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(OC(e,n))?._push(r,i)}}),e.client.register({name:Cy.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=OC(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:Cy.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=OC(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(Cy.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(DC);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=OC(n,r),o=t.get(a);if(o)return o;let s=pS({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(Cy.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=OC(t,r),a=n.get(i);if(a)return a;let o=fS({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 AC(){}var jC=new Map;function MC(e){let t=e.url;e.authToken&&(t=`${t}?${DS}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=AC,onError:i=AC,onDisconnected:a=AC,definitions:o=jC}=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=cC(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 NC(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 lb(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function PC(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=NC(n.websocket,r??`./`,location);return mC({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>MC({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 FC(e){return e.includes(`:`)}function IC(e,t){return FC(t)?t:`${e}:${t}`}function LC(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 RC(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 LC(a)}function zC(e,t){return{global:RC(e,t,`global`),project:RC(e,t,`project`)}}function BC(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(FC(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(IC(t,n),...r)),callEvent:((n,...r)=>e.callEvent(IC(t,n),...r)),callOptional:((n,...r)=>e.callOptional(IC(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(IC(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(IC(t,n),r,i),upload:(n,r)=>e.streaming.upload(IC(t,n),r)}},settings:zC(e,t),scope:e.scope}}function VC(){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 HC(e,t={}){let n=t.modelContext??VC();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=gS(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=Ly(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:By(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>UC(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 UC(e,t,n){try{let r=Hy(n,e.args?.length);return{content:[{type:`text`,text:WC(await(await IS(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:GC(e)}]}}}function WC(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function GC(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 KC(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 qC(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=rb(),a=Array.isArray(t)?t:[t],o=await $S(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new OS({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new LS(f),m=e.webmcp===!1?void 0:HC(p),ee,h=!1,g=0,te;function ne(){g++,te=void 0,d.clear(),r===!0&&d.updateOptions({functions:[]})}r&&(p.register({name:Cy.broadcast.cacheInvalidate,type:`event`,handler:ne}),i.on(Cy.client.connectionStatus,ne),i.on(Cy.client.isTrustedUpdated,ne));async function re(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(cb(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 ie=e.callTimeout??0,ae=ie>0?ie:1/0,oe,se={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){let a=performance.now()+ae;if(await n.onRequest?.call(this,e,t,i),r===!0&&e.i&&oe.isTrusted&&!e.m.startsWith(`anonymous:`)&&e.m!==`devframe:rpc:cacheable-functions`){function t(){if(performance.now()>=a)throw new eC(`timeout`,`[devframe] RPC call "${e.m}" timed out after ${ie}ms`)}for(;!te&&(t(),!(h||oe.status!==`connected`));){let e=g;te=oe.callOptional(`devframe:rpc:cacheable-functions`).then(t=>{e===g&&d.updateOptions({functions:t??[]})}).catch(t=>{throw e===g&&(te=void 0),t}),await te}await te,t()}let o=g;if(r&&e.i&&!h&&oe.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&&!h&&d.apply(e,n)}else await t(e)}}},ce=KC(e.transport??`auto`,s);oe=ce===`static`?await EC({fetchJsonFromBases:re}):ce===`sse`?gC({...se,sseOptions:e.sseOptions}):PC({...se,wsOptions:e.wsOptions});let le;try{le=new BroadcastChannel(`devframe-auth`)}catch{}let ue,de=!1;function fe(e){return((...t)=>de||!ue?e(...t):ue.then(()=>e(...t)))}function pe(){h=!0,ne();try{ee?.(),m?.()}finally{try{le?.close()}finally{oe.close?.()}}}let me={events:i,get isTrusted(){return oe.isTrusted},get status(){return oe.status},get connectionError(){return oe.connectionError},get transport(){return oe.transport??ce},get connection(){return o},connectionMeta:s,ensureTrusted:oe.ensureTrusted,requestTrust:oe.requestTrust,requestTrustWithToken:async e=>(YS(e),o={...o,authToken:e},oe.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await oe.requestTrustWithCode(e);if(!t)return!1;YS(t),o={...o,authToken:t};try{le?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>oe.requestAuthCode(e),call:fe(oe.call),callEvent:fe(oe.callEvent),callOptional:fe(oe.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:pe};me.sharedState=oC(me),me.streaming=kC(me),me.services=aC(me);let he=new Map;me.scope=(e=>{if(!e)return me;let t=he.get(e);return t||(t=BC(me,e),he.set(e,t)),t}),f.rpc=me;function ge(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function _e(){if(e.simpleAuth!==!1&&ge()&&typeof globalThis.prompt==`function`)for(await me.requestAuthCode().catch(()=>{});!me.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 me.requestTrustWithCode(t))return}}async function ve(){let t=await oe.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await iC(me,{param:n}):!1;t||r||me.isTrusted||await _e()}return ue=ve().then(()=>{de=!0},()=>{de=!0}),s.mcp&&bS(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-KH4HHvHf-Cxjx-Meu.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{h||(ee=e(me))}).catch(()=>{}),le&&(le.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&me.requestTrustWithToken(e.data.authToken)}),me}var JC=qC,YC=[`components`,`injectors`,`signals`,`ngrx`,`tanstackQuery`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`,`errors`,`plugins`],XC=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function ZC(e){return`pangular:${e}`}var QC=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`,`tanstackQuery`,`plugins`],$C={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},cdSlowMs:{default:16,min:1,max:1e3},capacitorCalls:{default:200,min:10,max:2e3},idleAfterMs:{default:6e4,min:0,max:6e5}},ew={"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`,filter:`the transferCache filter passed to withPangular() left it out`,"cache-off-or-filter":`the transfer cache is off, or its filter (or another withHttpTransferCacheOptions setting) left it out`},tw=[[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 nw(e){return tw.some(([t])=>t===e)}var rw=/^[a-z][a-z0-9-]{0,39}$/;function iw(e,t){let n=t.plugins?.[e],r=t.inspectors.plugins&&rw.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 aw=`pangular`,ow={mod:`Mod`,ctrl:`Ctrl`,control:`Ctrl`,meta:`Meta`,cmd:`Meta`,command:`Meta`,alt:`Alt`,option:`Alt`,opt:`Alt`,shift:`Shift`},sw=[`Mod`,`Ctrl`,`Meta`,`Alt`,`Shift`];function cw(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=ow[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[...sw.filter(e=>n.has(e)),r].join(`+`)}function lw(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 uw(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 dw=[{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`}],fw=1e4;function pw(e){return dw.filter(t=>!(`inspector`in t)||e.inspectors[t.inspector])}var mw={components:`a component instance, by its id in the component tree`,injectors:`a component's element injector, by the component's id`,signals:`a component's signal graph, by the component's id`,forms:`a form, by its id`},hw=200;function gw(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 _w(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=e=>{let n=t.get(e)?.trim();return n&&n.length<=hw?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 vw=[{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 yw(e){let t=pw(e).map(e=>({id:`tab:${e.id}`,title:`Go to ${e.label}`,group:`Go to`,keywords:`tab open`})),n=vw.filter(t=>!t.inspector||e.inspectors[t.inspector]).map(({inspector:e,...t})=>t);return[...t,...n]}function bw(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}var xw=Object.freeze({minLength:24,threshold:4.5}),Sw={min:16,max:512},Cw={min:2,max:6};function ww(e){return typeof e==`number`&&Number.isInteger(e)&&e>=Sw.min&&e<=Sw.max}function Tw(e){return typeof e==`number`&&Number.isFinite(e)&&e>=Cw.min&&e<=Cw.max}function Ew(e){if(e===!0)return{...xw};if(!e||typeof e!=`object`||Array.isArray(e))return;let{minLength:t,threshold:n}=e;return{minLength:ww(t)?t:xw.minLength,threshold:Tw(n)?n:xw.threshold}}function Dw(e){let t=Ew(e);return t?{entropy:t}:{}}function Ow(e,t){return typeof e==`boolean`?e:t}var kw=100,Aw=100;function jw(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=Aw);return[...new Set(t)].slice(0,kw)}function Mw(e,t){let{default:n,min:r,max:i}=$C[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function Nw(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function Pw(e){let t=bw(e),n=bw(t.agent),r=bw(t.inspectors),i=bw(n.tools),a=bw(t.actions),o=Ow(t.actions,!0),s=bw(t.redaction),c=bw(t.limits),l=Nw(YC,e=>Ow(r[e],!0));return{inspectors:l,agent:{readOnly:Ow(n.readOnly,!1),tools:Nw(YC,e=>l[e]&&Ow(i[e],!0)),browserTools:Ow(n.browserTools,!1)},actions:Nw(QC,e=>l[e]&&Ow(a[e],o)),redaction:{secretNames:jw(s.secretNames),unmask:jw(s.unmask),...Dw(s.entropy)},limits:Object.fromEntries(Object.keys($C).map(e=>[e,Mw(c[e],e)])),popup:{hotkey:Vw(bw(t.popup).hotkey)},plugins:Bw(t.plugins),lint:{rules:Rw(t.lint)},analog:Iw(t.analog),ngrx:{trace:Ow(bw(t.ngrx).trace,!1)}}}var Fw=500;function Iw(e){let t=bw(e).contentSchema;return typeof t==`string`&&t.trim()&&t.length<=Fw?{contentSchema:t.trim()}:{}}var Lw=200;function Rw(e){let t=bw(bw(e).rules),n={};for(let[e,r]of Object.entries(t).slice(0,Lw))typeof r==`boolean`&&(n[e]=r);return n}var zw=100;function Bw(e){let t={};for(let[n,r]of Object.entries(bw(e)).slice(0,zw)){if(!rw.test(n))continue;if(typeof r==`boolean`){t[n]={enabled:r,tools:!0,actions:!0};continue}let e=bw(r);r!==void 0&&Object.keys(e).length&&(t[n]={enabled:Ow(e.enabled,!0),tools:Ow(e.tools,!0),actions:Ow(e.actions,!0)})}return t}function Vw(e){return e===!1?!1:cw(e)??`Alt+Shift+P`}function Hw(e){let t=e?.configs;return Pw(t?.[aw])}function Uw(e){return`${{forms:`Writing to forms`,router:`Navigating and clearing navigations`,ngrx:`Restoring NgRx state, dispatching actions and changing the Store DevTools history`,http:`Changing HTTP mock rules and SSR overrides, and clearing HTTP calls`,analog:`Calling API routes, clearing server calls, running Nitro tasks and purging the Nitro cache`,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 Ww=[`pangular:build-meta`],Gw={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`},Kw={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore, dispatch and Store DevTools`,http:`HTTP mocking`,analog:`Analog API calls`,components:`Component edits`,tanstackQuery:`TanStack Query invalidate and refetch`,plugins:`Plugin actions`},qw={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`,cdSlowMs:e=>`slow cycles over ${e} ms`,capacitorCalls:e=>`${e} Capacitor plugin calls`,idleAfterMs:e=>e?`idle ${e/1e3} s after the last agent call`:`never idle`};function Jw(e){if(!e)return[];let t=[`On`];return e.minLength!==xw.minLength&&t.push(`${e.minLength} characters or more`),e.threshold!==xw.threshold&&t.push(`up to ${e.threshold} bits per character`),t}function Yw(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=YC.filter(t=>e.inspectors[t]);n(`Inspectors off`,YC.filter(t=>!e.inspectors[t]).map(e=>Gw[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>Gw[e])),n(`Blocked actions`,QC.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>Kw[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Entropy masking`,Jw(e.redaction.entropy)),n(`Limits`,Object.keys($C).filter(t=>e.limits[t]!==$C[t].default).map(t=>qw[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 Xw(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 Zw(e){return!e.tags.length&&!e.directives.length&&!e.text}function Qw(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 $w={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 eT(e){let t=/^(\d+)\.(\d+)/.exec(e.trim());return t?`${t[1]}.${t[2]}`:e.trim()}function tT(e){let t=/^(\d+)(?:\.(\d+))?/.exec(e.trim());return t?[Number(t[1]),Number(t[2]??0)]:null}function nT(e,t){let n=tT(e),r=tT(t);return!n||!r?!1:n[0]===r[0]?n[1]>=r[1]:n[0]>r[0]}function rT(e,t){return e?.capabilities?.[t]===!1}function iT(e,t){let n=$w[e],r=`${n.subject} needs Angular ${n.since} or later`;if(!t)return`${r}; this page's Angular version is unknown.`;let i=eT(t);return nT(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}.`}function aT(e){return e.hydration===`hydrated`&&e.hydratedAt===void 0?`hydrated before inspection`:e.hydration}var oT=/^on (viewport|interaction|hover)\b/;function sT(e){let t=e.filter(e=>!/^(prefetch|hydrate) /.test(e));return t.length>0&&t.every(e=>oT.test(e))}function cT(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(sT(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 lT=`pangular-page-id`,uT=null;function dT(e){uT=e}function fT(){if(uT)return uT;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(lT)||null)}catch{return null}}function pT(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 mT(e,t){return e?t?e.pages?.[t]??null:e:null}function hT(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function gT(){return{functions:[...Ww]}}function _T(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function vT(e,t,n){return _T(e,t,n).then(e=>e,()=>null)}function yT(e){return e?.connectionMeta.backend===`static`}function bT(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 xT(e=globalThis){delete e.__DEVFRAME_CONNECTION__,delete e.__DEVFRAME_CONNECTION_META__}function ST(e){return e.split(`@`)[1]??``}var CT={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},wT={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},TT=vT,ET={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 DT(e){return ET[e]??e}var OT=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function kT(e,t){return await TT(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function AT(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 jT=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function MT(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(jT,(e,t)=>t??(e===`**`?``:e))}function NT(e,t){let n=Math.max(0,e-t),r=Math.ceil(n/6e4);if(r<60)return`in ${r} min`;let i=Math.round(r/60);return i<48?`in ${i} ${i===1?`hour`:`hours`}`:`in ${Math.round(i/24)} days`}function PT(e,t){return e.length?e.join(`, `):t}function FT(e,t){let n=[];if(n.push({label:`One-time code`,value:e.auth?e.oneTimeCode.state===`locked`?`Locked after too many wrong codes: run pangular token --rotate or restart the server for a new code`:e.oneTimeCode.expiresAt?`On, current code expires ${NT(e.oneTimeCode.expiresAt,t)}`:`On`:`Off: every client is trusted`}),e.auth){let{count:r,nextExpiresAt:i,lastExpiresAt:a}=e.tokens;n.push({label:`Trusted clients`,value:r?r===1||i===a?`${r} ${r===1?`token`:`tokens`}, expires ${NT(i??t,t)}`:`${r} tokens, the first expires ${NT(i??t,t)}, the last ${NT(a??t,t)}`:`None`}),e.pairingTokens&&n.push({label:`Pairing tokens`,value:`${e.pairingTokens} accepted instead of the code`})}return e.reported?(n.push({label:`Reach`,value:e.network?`This machine and other machines`:`This machine only`}),n.push({label:`Allowed origins`,value:e.originCheck?`${PT(e.allowedOrigins,`This machine and the Chrome extension`)}${e.customOrigins?`, plus a custom origin check`:``}`:`Any: the origin check is off`}),(e.allowedHosts===`any`||e.allowedHosts.length)&&n.push({label:`Allowed hosts`,value:e.allowedHosts===`any`?`Any`:e.allowedHosts.join(`, `)}),n):n}function IT(e){return Hw(e?.connectionMeta)}function LT(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)?[...e]:void 0}function RT(e,t){if(!t||typeof t!=`object`)return e;let n=LT(t.secretNames),r=LT(t.unmask);if(!n||!r)return e;let i=Ew(t.entropy);return{...e,redaction:i?{secretNames:n,unmask:r,entropy:i}:{secretNames:n,unmask:r}}}function zT(e,t){return IT(e).actions[t]}var BT={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 VT(e){return BT[e]}var HT=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function UT(e,t){let n=BT[e];return!n||t.inspectors[n]}function WT(e,t){e&1&&(w(),sg(0,`rect`,5)(1,`rect`,6)(2,`rect`,7)(3,`rect`,8))}function GT(e,t){e&1&&(w(),sg(0,`path`,9)(1,`circle`,10)(2,`circle`,11)(3,`path`,12))}function KT(e,t){e&1&&(w(),sg(0,`path`,13)(1,`path`,14))}function qT(e,t){e&1&&(w(),sg(0,`path`,15)(1,`path`,16)(2,`path`,17))}function JT(e,t){e&1&&(w(),sg(0,`circle`,18)(1,`path`,19)(2,`circle`,20))}function YT(e,t){e&1&&(w(),sg(0,`path`,1))}function XT(e,t){e&1&&(w(),sg(0,`path`,21)(1,`path`,22)(2,`path`,23)(3,`path`,24))}function ZT(e,t){e&1&&(w(),sg(0,`ellipse`,25)(1,`path`,26)(2,`path`,27))}function QT(e,t){e&1&&(w(),sg(0,`rect`,28)(1,`path`,29)(2,`path`,30)(3,`path`,31))}function $T(e,t){e&1&&(w(),sg(0,`circle`,32)(1,`path`,9)(2,`path`,33))}function eE(e,t){e&1&&(w(),sg(0,`path`,34)(1,`path`,35)(2,`path`,36)(3,`path`,37)(4,`circle`,38))}function tE(e,t){e&1&&(w(),sg(0,`circle`,39)(1,`path`,40))}function nE(e,t){e&1&&(w(),sg(0,`ellipse`,41)(1,`path`,42)(2,`path`,43)(3,`path`,44)(4,`path`,45))}function rE(e,t){e&1&&(w(),sg(0,`circle`,32)(1,`path`,46)(2,`path`,47))}function iE(e,t){e&1&&(w(),sg(0,`path`,2))}function aE(e,t){e&1&&(w(),sg(0,`path`,3))}function oE(e,t){e&1&&(w(),sg(0,`path`,4))}var sE=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&(w(),R(0,`svg`,0),A(1,WT,4,0)(2,GT,4,0)(3,KT,2,0)(4,qT,3,0)(5,JT,3,0)(6,YT,1,0,`:svg:path`,1)(7,XT,4,0)(8,ZT,3,0)(9,QT,4,0)(10,$T,3,0)(11,eE,5,0)(12,tE,2,0)(13,nE,5,0)(14,rE,3,0)(15,iE,1,0,`:svg:path`,2)(16,aE,1,0,`:svg:path`,3)(17,oE,1,0,`:svg:path`,4),z()),e&2){let e;D(),j((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%] { +`))}}h()}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 te(e.body)}catch(e){if(c.signal.aborted){h();return}ee(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`,[CS]: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 pC(e,t){let{channel:n,rpcOptions:r={}}=t;return Iy(e,{...n,timeout:-1,...r,proxify:!1})}function mC(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(Cy.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function ee(){return l===`disconnected`||l===`error`?new eC(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new eC(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function h(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(Cy.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 eC(`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(Cy.client.error,n,t),r(n)})})}let g=new Map;for(let e of r.jsonSerializableMethods??[])g.set(e,{jsonSerializable:!0});let te=e.createChannel({definitions:g,onError(e){f(`error`,e),i.emit(Cy.client.connectionError,e),m(new eC(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new eC(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),ne=pC(a.functions,{channel:te,rpcOptions:o});a.register({name:Cy.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new eC(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(Cy.client.connectionError,e),m(e),i.emit(Cy.client.isTrustedUpdated,!1)}});let re=n;async function ie(e){re=e;let t=await ne.$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 eC(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(Cy.client.connectionError,e)}return i.emit(Cy.client.isTrustedUpdated,c),t.isTrusted}async function ae(e){let t=(await ne.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(re=t,c=!0,d.resolve(!0),f(`connected`),i.emit(Cy.client.isTrustedUpdated,!0)),t}async function oe(e={}){await ne.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function se(){return c?!0:ie(re??``)}async function ce(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:se,requestTrustWithToken:ie,requestTrustWithCode:ae,requestAuthCode:oe,ensureTrusted:ce,call:(...e)=>{let t=String(e[0]),n=ee();return n?(i.emit(Cy.client.error,n,t),Promise.reject(n)):h(ne.$call(...e),t)},callEvent:(...e)=>{let t=ee();if(t){i.emit(Cy.client.error,t,String(e[0]));return}return ne.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=ee();return n?(i.emit(Cy.client.error,n,t),Promise.reject(n)):h(ne.$callOptional(...e),t)},close:()=>{te.close()}}}function hC(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 gC(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=hC(n.sse,r??`./`,location);return mC({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>fC({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 _C(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:vC(r)?_C(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function vC(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function yC(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function bC(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function xC(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function SC(e){if(e.error)throw _C(e.error);return e.output}function CC(e){return e.some(e=>e!=null)}function wC(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function TC(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?sS(e):e}function a(e,t){return i(wC(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 xC(r)?SC(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(yC(r)){if(CC(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(bC(r)){let e=nb(n),i=r.records[e];if(i)return SC(await s(i,r.serialization));if(r.fallback)return SC(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!CC(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 EC(e){let t=TC(await e.fetchJsonFromBases(wS),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 DC=``;function OC(e,t){return`${e}${DC}${t}`}function kC(e){let t=new Map,n=new Map;e.client.register({name:Cy.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(OC(e,n))?._push(r,i)}}),e.client.register({name:Cy.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=OC(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:Cy.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=OC(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(Cy.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(DC);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=OC(n,r),o=t.get(a);if(o)return o;let s=pS({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(Cy.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=OC(t,r),a=n.get(i);if(a)return a;let o=fS({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 AC(){}var jC=new Map;function MC(e){let t=e.url;e.authToken&&(t=`${t}?${DS}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=AC,onError:i=AC,onDisconnected:a=AC,definitions:o=jC}=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=cC(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 NC(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 lb(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function PC(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=NC(n.websocket,r??`./`,location);return mC({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>MC({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 FC(e){return e.includes(`:`)}function IC(e,t){return FC(t)?t:`${e}:${t}`}function LC(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 RC(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 LC(a)}function zC(e,t){return{global:RC(e,t,`global`),project:RC(e,t,`project`)}}function BC(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(FC(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(IC(t,n),...r)),callEvent:((n,...r)=>e.callEvent(IC(t,n),...r)),callOptional:((n,...r)=>e.callOptional(IC(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(IC(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(IC(t,n),r,i),upload:(n,r)=>e.streaming.upload(IC(t,n),r)}},settings:zC(e,t),scope:e.scope}}function VC(){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 HC(e,t={}){let n=t.modelContext??VC();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=gS(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=Ly(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:By(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>UC(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 UC(e,t,n){try{let r=Hy(n,e.args?.length);return{content:[{type:`text`,text:WC(await(await IS(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:GC(e)}]}}}function WC(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function GC(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 KC(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 qC(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=rb(),a=Array.isArray(t)?t:[t],o=await $S(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new OS({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new LS(f),m=e.webmcp===!1?void 0:HC(p),ee,h=!1,g=0,te;function ne(){g++,te=void 0,d.clear(),r===!0&&d.updateOptions({functions:[]})}r&&(p.register({name:Cy.broadcast.cacheInvalidate,type:`event`,handler:ne}),i.on(Cy.client.connectionStatus,ne),i.on(Cy.client.isTrustedUpdated,ne));async function re(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(cb(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 ie=e.callTimeout??0,ae=ie>0?ie:1/0,oe,se={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){let a=performance.now()+ae;if(await n.onRequest?.call(this,e,t,i),r===!0&&e.i&&oe.isTrusted&&!e.m.startsWith(`anonymous:`)&&e.m!==`devframe:rpc:cacheable-functions`){function t(){if(performance.now()>=a)throw new eC(`timeout`,`[devframe] RPC call "${e.m}" timed out after ${ie}ms`)}for(;!te&&(t(),!(h||oe.status!==`connected`));){let e=g;te=oe.callOptional(`devframe:rpc:cacheable-functions`).then(t=>{e===g&&d.updateOptions({functions:t??[]})}).catch(t=>{throw e===g&&(te=void 0),t}),await te}await te,t()}let o=g;if(r&&e.i&&!h&&oe.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&&!h&&d.apply(e,n)}else await t(e)}}},ce=KC(e.transport??`auto`,s);oe=ce===`static`?await EC({fetchJsonFromBases:re}):ce===`sse`?gC({...se,sseOptions:e.sseOptions}):PC({...se,wsOptions:e.wsOptions});let le;try{le=new BroadcastChannel(`devframe-auth`)}catch{}let ue,de=!1;function fe(e){return((...t)=>de||!ue?e(...t):ue.then(()=>e(...t)))}function pe(){h=!0,ne();try{ee?.(),m?.()}finally{try{le?.close()}finally{oe.close?.()}}}let me={events:i,get isTrusted(){return oe.isTrusted},get status(){return oe.status},get connectionError(){return oe.connectionError},get transport(){return oe.transport??ce},get connection(){return o},connectionMeta:s,ensureTrusted:oe.ensureTrusted,requestTrust:oe.requestTrust,requestTrustWithToken:async e=>(YS(e),o={...o,authToken:e},oe.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await oe.requestTrustWithCode(e);if(!t)return!1;YS(t),o={...o,authToken:t};try{le?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>oe.requestAuthCode(e),call:fe(oe.call),callEvent:fe(oe.callEvent),callOptional:fe(oe.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:pe};me.sharedState=oC(me),me.streaming=kC(me),me.services=aC(me);let he=new Map;me.scope=(e=>{if(!e)return me;let t=he.get(e);return t||(t=BC(me,e),he.set(e,t)),t}),f.rpc=me;function ge(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function _e(){if(e.simpleAuth!==!1&&ge()&&typeof globalThis.prompt==`function`)for(await me.requestAuthCode().catch(()=>{});!me.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 me.requestTrustWithCode(t))return}}async function ve(){let t=await oe.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await iC(me,{param:n}):!1;t||r||me.isTrusted||await _e()}return ue=ve().then(()=>{de=!0},()=>{de=!0}),s.mcp&&bS(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-KH4HHvHf-DjXYovS-.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{h||(ee=e(me))}).catch(()=>{}),le&&(le.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&me.requestTrustWithToken(e.data.authToken)}),me}var JC=qC,YC=[`components`,`injectors`,`signals`,`ngrx`,`tanstackQuery`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`,`errors`,`plugins`],XC=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function ZC(e){return`pangular:${e}`}var QC=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`,`tanstackQuery`,`plugins`],$C={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},cdSlowMs:{default:16,min:1,max:1e3},capacitorCalls:{default:200,min:10,max:2e3},idleAfterMs:{default:6e4,min:0,max:6e5}},ew={"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`,filter:`the transferCache filter passed to withPangular() left it out`,"cache-off-or-filter":`the transfer cache is off, or its filter (or another withHttpTransferCacheOptions setting) left it out`},tw=[[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 nw(e){return tw.some(([t])=>t===e)}var rw=/^[a-z][a-z0-9-]{0,39}$/;function iw(e,t){let n=t.plugins?.[e],r=t.inspectors.plugins&&rw.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 aw=`pangular`,ow={mod:`Mod`,ctrl:`Ctrl`,control:`Ctrl`,meta:`Meta`,cmd:`Meta`,command:`Meta`,alt:`Alt`,option:`Alt`,opt:`Alt`,shift:`Shift`},sw=[`Mod`,`Ctrl`,`Meta`,`Alt`,`Shift`];function cw(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=ow[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[...sw.filter(e=>n.has(e)),r].join(`+`)}function lw(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 uw(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 dw=[{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`}],fw=1e4;function pw(e){return dw.filter(t=>!(`inspector`in t)||e.inspectors[t.inspector])}var mw={components:`a component instance, by its id in the component tree`,injectors:`a component's element injector, by the component's id`,signals:`a component's signal graph, by the component's id`,forms:`a form, by its id`},hw=200;function gw(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 _w(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=e=>{let n=t.get(e)?.trim();return n&&n.length<=hw?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 vw=[{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 yw(e){let t=pw(e).map(e=>({id:`tab:${e.id}`,title:`Go to ${e.label}`,group:`Go to`,keywords:`tab open`})),n=vw.filter(t=>!t.inspector||e.inspectors[t.inspector]).map(({inspector:e,...t})=>t);return[...t,...n]}function bw(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}var xw=Object.freeze({minLength:24,threshold:4.5}),Sw={min:16,max:512},Cw={min:2,max:6};function ww(e){return typeof e==`number`&&Number.isInteger(e)&&e>=Sw.min&&e<=Sw.max}function Tw(e){return typeof e==`number`&&Number.isFinite(e)&&e>=Cw.min&&e<=Cw.max}function Ew(e){if(e===!0)return{...xw};if(!e||typeof e!=`object`||Array.isArray(e))return;let{minLength:t,threshold:n}=e;return{minLength:ww(t)?t:xw.minLength,threshold:Tw(n)?n:xw.threshold}}function Dw(e){let t=Ew(e);return t?{entropy:t}:{}}function Ow(e,t){return typeof e==`boolean`?e:t}var kw=100,Aw=100;function jw(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=Aw);return[...new Set(t)].slice(0,kw)}function Mw(e,t){let{default:n,min:r,max:i}=$C[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function Nw(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function Pw(e){let t=bw(e),n=bw(t.agent),r=bw(t.inspectors),i=bw(n.tools),a=bw(t.actions),o=Ow(t.actions,!0),s=bw(t.redaction),c=bw(t.limits),l=Nw(YC,e=>Ow(r[e],!0));return{inspectors:l,agent:{readOnly:Ow(n.readOnly,!1),tools:Nw(YC,e=>l[e]&&Ow(i[e],!0)),browserTools:Ow(n.browserTools,!1)},actions:Nw(QC,e=>l[e]&&Ow(a[e],o)),redaction:{secretNames:jw(s.secretNames),unmask:jw(s.unmask),...Dw(s.entropy)},limits:Object.fromEntries(Object.keys($C).map(e=>[e,Mw(c[e],e)])),popup:{hotkey:Vw(bw(t.popup).hotkey)},plugins:Bw(t.plugins),lint:{rules:Rw(t.lint)},analog:Iw(t.analog),ngrx:{trace:Ow(bw(t.ngrx).trace,!1)}}}var Fw=500;function Iw(e){let t=bw(e).contentSchema;return typeof t==`string`&&t.trim()&&t.length<=Fw?{contentSchema:t.trim()}:{}}var Lw=200;function Rw(e){let t=bw(bw(e).rules),n={};for(let[e,r]of Object.entries(t).slice(0,Lw))typeof r==`boolean`&&(n[e]=r);return n}var zw=100;function Bw(e){let t={};for(let[n,r]of Object.entries(bw(e)).slice(0,zw)){if(!rw.test(n))continue;if(typeof r==`boolean`){t[n]={enabled:r,tools:!0,actions:!0};continue}let e=bw(r);r!==void 0&&Object.keys(e).length&&(t[n]={enabled:Ow(e.enabled,!0),tools:Ow(e.tools,!0),actions:Ow(e.actions,!0)})}return t}function Vw(e){return e===!1?!1:cw(e)??`Alt+Shift+P`}function Hw(e){let t=e?.configs;return Pw(t?.[aw])}function Uw(e){return`${{forms:`Writing to forms`,router:`Navigating and clearing navigations`,ngrx:`Restoring NgRx state, dispatching actions and changing the Store DevTools history`,http:`Changing HTTP mock rules and SSR overrides, refetching the TransferState payload, and clearing HTTP calls`,analog:`Calling API routes, clearing server calls, running Nitro tasks and purging the Nitro cache`,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 Ww=[`pangular:build-meta`],Gw={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`},Kw={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore, dispatch and Store DevTools`,http:`HTTP mocking`,analog:`Analog API calls`,components:`Component edits`,tanstackQuery:`TanStack Query invalidate and refetch`,plugins:`Plugin actions`},qw={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`,cdSlowMs:e=>`slow cycles over ${e} ms`,capacitorCalls:e=>`${e} Capacitor plugin calls`,idleAfterMs:e=>e?`idle ${e/1e3} s after the last agent call`:`never idle`};function Jw(e){if(!e)return[];let t=[`On`];return e.minLength!==xw.minLength&&t.push(`${e.minLength} characters or more`),e.threshold!==xw.threshold&&t.push(`up to ${e.threshold} bits per character`),t}function Yw(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=YC.filter(t=>e.inspectors[t]);n(`Inspectors off`,YC.filter(t=>!e.inspectors[t]).map(e=>Gw[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>Gw[e])),n(`Blocked actions`,QC.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>Kw[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Entropy masking`,Jw(e.redaction.entropy)),n(`Limits`,Object.keys($C).filter(t=>e.limits[t]!==$C[t].default).map(t=>qw[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 Xw(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 Zw(e){return!e.tags.length&&!e.directives.length&&!e.text}function Qw(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 $w={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 eT(e){let t=/^(\d+)\.(\d+)/.exec(e.trim());return t?`${t[1]}.${t[2]}`:e.trim()}function tT(e){let t=/^(\d+)(?:\.(\d+))?/.exec(e.trim());return t?[Number(t[1]),Number(t[2]??0)]:null}function nT(e,t){let n=tT(e),r=tT(t);return!n||!r?!1:n[0]===r[0]?n[1]>=r[1]:n[0]>r[0]}function rT(e,t){return e?.capabilities?.[t]===!1}function iT(e,t){let n=$w[e],r=`${n.subject} needs Angular ${n.since} or later`;if(!t)return`${r}; this page's Angular version is unknown.`;let i=eT(t);return nT(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}.`}function aT(e){return e.hydration===`hydrated`&&e.hydratedAt===void 0?`hydrated before inspection`:e.hydration}var oT=/^on (viewport|interaction|hover)\b/;function sT(e){let t=e.filter(e=>!/^(prefetch|hydrate) /.test(e));return t.length>0&&t.every(e=>oT.test(e))}function cT(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(sT(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 lT=`pangular-page-id`,uT=null;function dT(e){uT=e}function fT(){if(uT)return uT;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(lT)||null)}catch{return null}}function pT(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 mT(e,t){return e?t?e.pages?.[t]??null:e:null}function hT(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function gT(){return{functions:[...Ww]}}function _T(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function vT(e,t,n){return _T(e,t,n).then(e=>e,()=>null)}function yT(e){return e?.connectionMeta.backend===`static`}function bT(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 xT(e=globalThis){delete e.__DEVFRAME_CONNECTION__,delete e.__DEVFRAME_CONNECTION_META__}function ST(e){return e.split(`@`)[1]??``}var CT={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},wT={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},TT=vT,ET={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 DT(e){return ET[e]??e}var OT=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function kT(e,t){return await TT(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function AT(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 jT=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function MT(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(jT,(e,t)=>t??(e===`**`?``:e))}function NT(e,t){let n=Math.max(0,e-t),r=Math.ceil(n/6e4);if(r<60)return`in ${r} min`;let i=Math.round(r/60);return i<48?`in ${i} ${i===1?`hour`:`hours`}`:`in ${Math.round(i/24)} days`}function PT(e,t){return e.length?e.join(`, `):t}function FT(e,t){let n=[];if(n.push({label:`One-time code`,value:e.auth?e.oneTimeCode.state===`locked`?`Locked after too many wrong codes: run pangular token --rotate or restart the server for a new code`:e.oneTimeCode.expiresAt?`On, current code expires ${NT(e.oneTimeCode.expiresAt,t)}`:`On`:`Off: every client is trusted`}),e.auth){let{count:r,nextExpiresAt:i,lastExpiresAt:a}=e.tokens;n.push({label:`Trusted clients`,value:r?r===1||i===a?`${r} ${r===1?`token`:`tokens`}, expires ${NT(i??t,t)}`:`${r} tokens, the first expires ${NT(i??t,t)}, the last ${NT(a??t,t)}`:`None`}),e.pairingTokens&&n.push({label:`Pairing tokens`,value:`${e.pairingTokens} accepted instead of the code`})}return e.reported?(n.push({label:`Reach`,value:e.network?`This machine and other machines`:`This machine only`}),n.push({label:`Allowed origins`,value:e.originCheck?`${PT(e.allowedOrigins,`This machine and the Chrome extension`)}${e.customOrigins?`, plus a custom origin check`:``}`:`Any: the origin check is off`}),(e.allowedHosts===`any`||e.allowedHosts.length)&&n.push({label:`Allowed hosts`,value:e.allowedHosts===`any`?`Any`:e.allowedHosts.join(`, `)}),n):n}function IT(e){return Hw(e?.connectionMeta)}function LT(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)?[...e]:void 0}function RT(e,t){if(!t||typeof t!=`object`)return e;let n=LT(t.secretNames),r=LT(t.unmask);if(!n||!r)return e;let i=Ew(t.entropy);return{...e,redaction:i?{secretNames:n,unmask:r,entropy:i}:{secretNames:n,unmask:r}}}function zT(e,t){return IT(e).actions[t]}var BT={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 VT(e){return BT[e]}var HT=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function UT(e,t){let n=BT[e];return!n||t.inspectors[n]}function WT(e,t){e&1&&(w(),lg(0,`rect`,5)(1,`rect`,6)(2,`rect`,7)(3,`rect`,8))}function GT(e,t){e&1&&(w(),lg(0,`path`,9)(1,`circle`,10)(2,`circle`,11)(3,`path`,12))}function KT(e,t){e&1&&(w(),lg(0,`path`,13)(1,`path`,14))}function qT(e,t){e&1&&(w(),lg(0,`path`,15)(1,`path`,16)(2,`path`,17))}function JT(e,t){e&1&&(w(),lg(0,`circle`,18)(1,`path`,19)(2,`circle`,20))}function YT(e,t){e&1&&(w(),lg(0,`path`,1))}function XT(e,t){e&1&&(w(),lg(0,`path`,21)(1,`path`,22)(2,`path`,23)(3,`path`,24))}function ZT(e,t){e&1&&(w(),lg(0,`ellipse`,25)(1,`path`,26)(2,`path`,27))}function QT(e,t){e&1&&(w(),lg(0,`rect`,28)(1,`path`,29)(2,`path`,30)(3,`path`,31))}function $T(e,t){e&1&&(w(),lg(0,`circle`,32)(1,`path`,9)(2,`path`,33))}function eE(e,t){e&1&&(w(),lg(0,`path`,34)(1,`path`,35)(2,`path`,36)(3,`path`,37)(4,`circle`,38))}function tE(e,t){e&1&&(w(),lg(0,`circle`,39)(1,`path`,40))}function nE(e,t){e&1&&(w(),lg(0,`ellipse`,41)(1,`path`,42)(2,`path`,43)(3,`path`,44)(4,`path`,45))}function rE(e,t){e&1&&(w(),lg(0,`circle`,32)(1,`path`,46)(2,`path`,47))}function iE(e,t){e&1&&(w(),lg(0,`path`,2))}function aE(e,t){e&1&&(w(),lg(0,`path`,3))}function oE(e,t){e&1&&(w(),lg(0,`path`,4))}var sE=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&(w(),R(0,`svg`,0),A(1,WT,4,0)(2,GT,4,0)(3,KT,2,0)(4,qT,3,0)(5,JT,3,0)(6,YT,1,0,`:svg:path`,1)(7,XT,4,0)(8,ZT,3,0)(9,QT,4,0)(10,$T,3,0)(11,eE,5,0)(12,tE,2,0)(13,nE,5,0)(14,rE,3,0)(15,iE,1,0,`:svg:path`,2)(16,aE,1,0,`:svg:path`,3)(17,oE,1,0,`:svg:path`,4),z()),e&2){let e;D(),j((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; -}`]})},cE=(e,t)=>t.tab,lE=(e,t)=>t.label;function uE(e,t){e&1&&K(0),e&2&&J(` `,W().meta()?.projectName,` `)}function dE(e,t){e&1&&K(0,` Project details unavailable `)}function fE(e,t){e&1&&K(0,` Loading… `)}function pE(e,t){e&1&&(K(0,` Run `),F(1,`code`),K(2,`pangular build`),I(),K(3,` again to rebuild the report. `))}function mE(e,t){e&1&&K(0,` Check that the dev server is running. `)}function hE(e,t){if(e&1){let e=B();F(0,`button`,13),H(`click`,function(){return S(e),C(W(2).loadMeta())}),K(1,`Try again`),I()}}function gE(e,t){if(e&1&&(F(0,`p`,11),A(1,pE,4,0)(2,mE,1,0),I(),A(3,hE,2,0,`button`,12)),e&2){let e=W();D(),j(e.staticReport()?1:2),D(2),j(e.staticReport()?-1:3)}}function _E(e,t){e&1&&(F(0,`li`,5)(1,`span`),K(2,`Analog`),I(),K(3),I()),e&2&&(D(3),q(t))}function vE(e,t){e&1&&(F(0,`li`)(1,`span`),K(2,`Change detection`),I(),K(3),I()),e&2&&(D(3),q(t))}function yE(e,t){if(e&1&&(F(0,`span`,20),K(1),I(),F(2,`span`,21),K(3),I()),e&2){let e=W().$implicit,t=W();D(),q(t.cards()[e.tab]?.value),D(2),q(t.cards()[e.tab]?.sub)}}function bE(e,t){e&1&&(F(0,`span`,22),K(1,`–`),I(),F(2,`span`,21),K(3,`Count unavailable`),I())}function xE(e,t){e&1&&(L(0,`span`,23),F(1,`span`,21),K(2,`Counting…`),I())}function SE(e,t){if(e&1){let e=B();F(0,`button`,14),H(`click`,function(){let t=S(e).$implicit;return C(W().navigate.emit(t.tab))}),F(1,`span`,15)(2,`span`,16),L(3,`app-tab-icon`,17),I(),F(4,`span`,18),K(5,`→`),I()(),F(6,`span`,19),K(7),I(),A(8,yE,4,2)(9,bE,4,0)(10,xE,3,0),I()}if(e&2){let e,n=t.$implicit,r=t.$index,i=W().stateOf(n.tab);Zg(`animation-delay`,60*r,`ms`),k(`aria-busy`,i===`loading`),D(3),P(`name`,n.tab),D(4),q(n.label),D(),j((e=i)===`ready`?8:e===`error`?9:10)}}function CE(e,t){e&1&&(F(0,`p`),K(1,`Loading…`),I())}function wE(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2),I(),F(3,`dd`),K(4),I()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.value)}}function TE(e,t){if(e&1&&(F(0,`dl`),M(1,wE,5,2,`div`,null,lE),I()),e&2){let e=W();D(),N(e.configItems())}}function EE(e,t){e&1&&(F(0,`p`),K(1,`Defaults`),I())}function DE(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2),I(),F(3,`dd`),K(4),I()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.value)}}function OE(e,t){e&1&&(F(0,`section`,10)(1,`h2`,24),K(2,`Security`),I(),F(3,`dl`),M(4,DE,5,2,`div`,null,lE),I()()),e&2&&(D(4),N(t))}var kE=[{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 AE(e){return kE.filter(t=>UT(t.tab,e))}var jE={zoneless:`Zoneless`,zone:`zone.js`,"zone-unused":`Zoneless, zone.js loaded`};function ME(e){return e&&Object.hasOwn(jE,e)?jE[e]:null}var NE=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),PE={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 FE(e,t,n){return`${e} ${e===1?t:n}`}function IE(e,t){for(let n of e??[])t(n),IE(n.children,t)}function LE(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 · ${FE(t,`directive`,`directives`)}`}}function RE(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 · ${FE(t,`redirect`,`redirects`)}`}}function zE(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]=PE[e]??[e,e];return FE(t,n,r)});return{value:e.length,sub:n.join(` · `)}}function BE(e,t){let n=e?.forms??[],r=t?n.filter(e=>ST(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 VE(e){return e.cancelled||e.status===void 0?!1:e.status===0||e.status>=400}function HE(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(VE).length;return{value:o.length,sub:`${o.length===1?`call`:`calls`} · ${s} failed`}}var UE=class e{rpc=$(null);navigate=ev();staticReport=X(()=>yT(this.rpc()));meta=T(null);security=T(null);redaction=T(null);config=X(()=>RT(IT(this.rpc()),this.redaction()));stats=X(()=>this.rpc()?AE(this.config()):[]);configItems=X(()=>Yw(this.config()));metaState=T(`loading`);states=T({});rows=T({});injectorTree=T(null);signalGraph=T(null);formsState=T(null);httpState=T(null);pageId=fT();destroyRef=x(ys);stopLive=[];zone=X(()=>ME(mT(this.injectorTree(),this.pageId)?.zone));liveInjectors=X(()=>{let e=mT(this.injectorTree(),this.pageId);if(!e?.roots?.length)return null;let t=0,n=0,r=e=>{t++,n+=e.providers?.length??0};return IE(e.roots,r),IE(e.environment,r),{injectors:t,providers:n}});liveSignals=X(()=>{let e=hT(this.signalGraph(),this.pageId);return e?.nodes?.length?e.nodes.filter(e=>NE.has(e.kind??``)).length:null});cards=X(()=>{let e=this.rows(),t={};if(e.components&&(t.components=LE(e.components)),e.routes&&(t.routes=RE(e.routes)),e.store&&(t.store=zE(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 · ${FE(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=BE(i,this.pageId));let a=this.httpState();return a&&(t.network=HE(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),!yT(e)&&_T(e,`redaction-config`).then(t=>{this.rpc()===e&&this.redaction.set(t)}).catch(()=>{})}loadSecurity(e){this.security.set(null),!yT(e)&&vT(e,`security-status`).then(t=>{this.rpc()===e&&t&&this.security.set(FT(t,Date.now()))})}constructor(){E(()=>{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),this.loadSecurity(e);let n=IT(e),r=e=>UT(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)),UT(`forms`,t)&&r(`forms`,e=>this.formsState.set(e??{}),`forms`),UT(`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=O({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:34,vars:15,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`],[`aria-labelledby`,`security-title`,1,`config`],[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`],[`id`,`security-title`]],template:function(e,t){if(e&1&&(F(0,`section`,0)(1,`div`,1)(2,`p`,2),K(3,`Project`),I(),F(4,`h2`,3),A(5,uE,1,1)(6,dE,1,0)(7,fE,1,0),I(),A(8,gE,4,2),I(),F(9,`ul`,4)(10,`li`)(11,`span`),K(12,`Angular`),I(),K(13),I(),F(14,`li`)(15,`span`),K(16,`TypeScript`),I(),K(17),I(),F(18,`li`)(19,`span`),K(20,`SSR`),I(),K(21),I(),A(22,_E,4,1,`li`,5),A(23,vE,4,1,`li`),I()(),F(24,`div`,6),M(25,SE,11,6,`button`,7,cE),I(),F(27,`section`,8)(28,`h2`,9),K(29,`Configuration`),I(),A(30,CE,2,0,`p`)(31,TE,3,0,`dl`)(32,EE,2,0,`p`),I(),A(33,OE,6,0,`section`,10)),e&2){let e,n,r,i;k(`aria-busy`,t.metaState()===`loading`),D(4),G(`muted`,t.metaState()!==`ready`),D(),j((e=t.metaState())===`ready`?5:e===`error`?6:7),D(3),j(t.metaState()===`error`?8:-1),D(),G(`pending`,t.metaState()===`loading`),D(4),q(t.meta()?.angularVersion??`…`),D(4),q(t.meta()?.typescript??`…`),D(4),q(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),D(),j((n=t.meta()?.analog)?22:-1,n),D(),j((r=t.zone())?23:-1,r),D(2),N(t.stats()),D(2),k(`aria-busy`,!t.rpc()),D(3),j(t.rpc()?t.configItems().length?31:32:30),D(3),j((i=t.security())?33:-1,i)}},dependencies:[sE],styles:[`[_nghost-%COMP%] { +}`]})},cE=(e,t)=>t.tab,lE=(e,t)=>t.label;function uE(e,t){e&1&&K(0),e&2&&J(` `,W().meta()?.projectName,` `)}function dE(e,t){e&1&&K(0,` Project details unavailable `)}function fE(e,t){e&1&&K(0,` Loading… `)}function pE(e,t){e&1&&(K(0,` Run `),F(1,`code`),K(2,`pangular build`),I(),K(3,` again to rebuild the report. `))}function mE(e,t){e&1&&K(0,` Check that the dev server is running. `)}function hE(e,t){if(e&1){let e=B();F(0,`button`,13),H(`click`,function(){return S(e),C(W(2).loadMeta())}),K(1,`Try again`),I()}}function gE(e,t){if(e&1&&(F(0,`p`,11),A(1,pE,4,0)(2,mE,1,0),I(),A(3,hE,2,0,`button`,12)),e&2){let e=W();D(),j(e.staticReport()?1:2),D(2),j(e.staticReport()?-1:3)}}function _E(e,t){e&1&&(F(0,`li`,5)(1,`span`),K(2,`Analog`),I(),K(3),I()),e&2&&(D(3),q(t))}function vE(e,t){e&1&&(F(0,`li`)(1,`span`),K(2,`Change detection`),I(),K(3),I()),e&2&&(D(3),q(t))}function yE(e,t){if(e&1&&(F(0,`span`,20),K(1),I(),F(2,`span`,21),K(3),I()),e&2){let e=W().$implicit,t=W();D(),q(t.cards()[e.tab]?.value),D(2),q(t.cards()[e.tab]?.sub)}}function bE(e,t){e&1&&(F(0,`span`,22),K(1,`–`),I(),F(2,`span`,21),K(3,`Count unavailable`),I())}function xE(e,t){e&1&&(L(0,`span`,23),F(1,`span`,21),K(2,`Counting…`),I())}function SE(e,t){if(e&1){let e=B();F(0,`button`,14),H(`click`,function(){let t=S(e).$implicit;return C(W().navigate.emit(t.tab))}),F(1,`span`,15)(2,`span`,16),L(3,`app-tab-icon`,17),I(),F(4,`span`,18),K(5,`→`),I()(),F(6,`span`,19),K(7),I(),A(8,yE,4,2)(9,bE,4,0)(10,xE,3,0),I()}if(e&2){let e,n=t.$implicit,r=t.$index,i=W().stateOf(n.tab);$g(`animation-delay`,60*r,`ms`),k(`aria-busy`,i===`loading`),D(3),P(`name`,n.tab),D(4),q(n.label),D(),j((e=i)===`ready`?8:e===`error`?9:10)}}function CE(e,t){e&1&&(F(0,`p`),K(1,`Loading…`),I())}function wE(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2),I(),F(3,`dd`),K(4),I()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.value)}}function TE(e,t){if(e&1&&(F(0,`dl`),M(1,wE,5,2,`div`,null,lE),I()),e&2){let e=W();D(),N(e.configItems())}}function EE(e,t){e&1&&(F(0,`p`),K(1,`Defaults`),I())}function DE(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2),I(),F(3,`dd`),K(4),I()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.value)}}function OE(e,t){e&1&&(F(0,`section`,10)(1,`h2`,24),K(2,`Security`),I(),F(3,`dl`),M(4,DE,5,2,`div`,null,lE),I()()),e&2&&(D(4),N(t))}var kE=[{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 AE(e){return kE.filter(t=>UT(t.tab,e))}var jE={zoneless:`Zoneless`,zone:`zone.js`,"zone-unused":`Zoneless, zone.js loaded`};function ME(e){return e&&Object.hasOwn(jE,e)?jE[e]:null}var NE=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),PE={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 FE(e,t,n){return`${e} ${e===1?t:n}`}function IE(e,t){for(let n of e??[])t(n),IE(n.children,t)}function LE(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 · ${FE(t,`directive`,`directives`)}`}}function RE(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 · ${FE(t,`redirect`,`redirects`)}`}}function zE(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]=PE[e]??[e,e];return FE(t,n,r)});return{value:e.length,sub:n.join(` · `)}}function BE(e,t){let n=e?.forms??[],r=t?n.filter(e=>ST(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 VE(e){return e.cancelled||e.status===void 0?!1:e.status===0||e.status>=400}function HE(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(VE).length;return{value:o.length,sub:`${o.length===1?`call`:`calls`} · ${s} failed`}}var UE=class e{rpc=$(null);navigate=nv();staticReport=X(()=>yT(this.rpc()));meta=T(null);security=T(null);redaction=T(null);config=X(()=>RT(IT(this.rpc()),this.redaction()));stats=X(()=>this.rpc()?AE(this.config()):[]);configItems=X(()=>Yw(this.config()));metaState=T(`loading`);states=T({});rows=T({});injectorTree=T(null);signalGraph=T(null);formsState=T(null);httpState=T(null);pageId=fT();destroyRef=x(ys);stopLive=[];zone=X(()=>ME(mT(this.injectorTree(),this.pageId)?.zone));liveInjectors=X(()=>{let e=mT(this.injectorTree(),this.pageId);if(!e?.roots?.length)return null;let t=0,n=0,r=e=>{t++,n+=e.providers?.length??0};return IE(e.roots,r),IE(e.environment,r),{injectors:t,providers:n}});liveSignals=X(()=>{let e=hT(this.signalGraph(),this.pageId);return e?.nodes?.length?e.nodes.filter(e=>NE.has(e.kind??``)).length:null});cards=X(()=>{let e=this.rows(),t={};if(e.components&&(t.components=LE(e.components)),e.routes&&(t.routes=RE(e.routes)),e.store&&(t.store=zE(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 · ${FE(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=BE(i,this.pageId));let a=this.httpState();return a&&(t.network=HE(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),!yT(e)&&_T(e,`redaction-config`).then(t=>{this.rpc()===e&&this.redaction.set(t)}).catch(()=>{})}loadSecurity(e){this.security.set(null),!yT(e)&&vT(e,`security-status`).then(t=>{this.rpc()===e&&t&&this.security.set(FT(t,Date.now()))})}constructor(){E(()=>{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),this.loadSecurity(e);let n=IT(e),r=e=>UT(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)),UT(`forms`,t)&&r(`forms`,e=>this.formsState.set(e??{}),`forms`),UT(`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=O({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:34,vars:15,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`],[`aria-labelledby`,`security-title`,1,`config`],[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`],[`id`,`security-title`]],template:function(e,t){if(e&1&&(F(0,`section`,0)(1,`div`,1)(2,`p`,2),K(3,`Project`),I(),F(4,`h2`,3),A(5,uE,1,1)(6,dE,1,0)(7,fE,1,0),I(),A(8,gE,4,2),I(),F(9,`ul`,4)(10,`li`)(11,`span`),K(12,`Angular`),I(),K(13),I(),F(14,`li`)(15,`span`),K(16,`TypeScript`),I(),K(17),I(),F(18,`li`)(19,`span`),K(20,`SSR`),I(),K(21),I(),A(22,_E,4,1,`li`,5),A(23,vE,4,1,`li`),I()(),F(24,`div`,6),M(25,SE,11,6,`button`,7,cE),I(),F(27,`section`,8)(28,`h2`,9),K(29,`Configuration`),I(),A(30,CE,2,0,`p`)(31,TE,3,0,`dl`)(32,EE,2,0,`p`),I(),A(33,OE,6,0,`section`,10)),e&2){let e,n,r,i;k(`aria-busy`,t.metaState()===`loading`),D(4),G(`muted`,t.metaState()!==`ready`),D(),j((e=t.metaState())===`ready`?5:e===`error`?6:7),D(3),j(t.metaState()===`error`?8:-1),D(),G(`pending`,t.metaState()===`loading`),D(4),q(t.meta()?.angularVersion??`…`),D(4),q(t.meta()?.typescript??`…`),D(4),q(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),D(),j((n=t.meta()?.analog)?22:-1,n),D(),j((r=t.zone())?23:-1,r),D(2),N(t.stats()),D(2),k(`aria-busy`,!t.rpc()),D(3),j(t.rpc()?t.configItems().length?31:32:30),D(3),j((i=t.security())?33:-1,i)}},dependencies:[sE],styles:[`[_nghost-%COMP%] { display: block; max-width: 1200px; } @@ -325,7 +325,7 @@ h2.muted[_ngcontent-%COMP%] { .skeleton[_ngcontent-%COMP%] { animation: none; } -}`]})},WE=`pangular:panel-action-result`,GE=6e3,KE=0;function qE(e=window){return e.location.protocol===`chrome-extension:`&&e.parent!==e}function JE(e,t=window){let n=`pa-${Date.now().toString(36)}-${++KE}`;return new Promise(r=>{let i=e=>{t.clearTimeout(o),t.removeEventListener(`message`,a),r(e)},a=({source:e,origin:r,data:a})=>{if(e!==t.parent||r!==t.location.origin)return;let o=a;if(o?.type!==WE||o.requestId!==n)return;let{opened:s,error:c}=a;i({ok:o.ok===!0,...s===`file`||s===`class`?{opened:s}:{},...typeof c==`string`?{error:c}:{}})},o=t.setTimeout(()=>i({ok:!1,error:`timeout`}),GE);t.addEventListener(`message`,a),t.parent.postMessage({...e,requestId:n},t.location.origin)})}var YE=class e{available=qE();reveal(e,t){return JE({type:`pangular:reveal-element`,pageId:e,id:t})}openSource(e,t,n){return JE({type:`pangular:open-source`,pageId:e,id:t,...n?{file:n.file,line:n.line}:{}})}static ɵfac=function(t){return new(t||e)};static ɵprov=El({token:e,factory:e.ɵfac})};function XE(e){return new Date(e).toLocaleTimeString()}var ZE=/[ \t\n\r]/;function QE(e){let t=e.trim(),n;try{n=JSON.parse(t)}catch{return null}if(typeof n!=`object`||!n)return null;let r=``,i=0,a=()=>`\n${` `.repeat(i)}`;for(let e=0;et.name;function tD(e,t){e&1&&(R(0,`span`,11),K(1,`impure`),z())}function nD(e,t){e&1&&(R(0,`span`,11),K(1,`churning`),z())}function rD(e,t){e&1&&(R(0,`span`,11),K(1,`stale?`),z())}function iD(e,t){if(e&1&&(R(0,`span`,10),K(1),z()),e&2){let e=W(2).$implicit,t=W(3);D(),q(t.plural(e.calls,`call`))}}function aD(e,t){if(e&1){let e=B();R(0,`button`,7),U(`click`,function(){S(e);let t=W().$implicit;return C(W(3).showPipe.emit(t.name))}),R(1,`span`,8),K(2,`Show in Pipes:`),z(),R(3,`span`,9),K(4),z(),R(5,`span`,10),K(6),z(),A(7,tD,2,0,`span`,11),A(8,nD,2,0,`span`,11),A(9,rD,2,0,`span`,11),A(10,iD,2,1,`span`,10),z()}if(e&2){let e=W().$implicit;D(4),q(e.name),D(2),J(``,e.uses,`×`),D(),j(e.isPure?-1:7),D(),j(e.churn?8:-1),D(),j(e.stale?9:-1),D(),j(e.calls===void 0?-1:10)}}function oD(e,t){e&1&&(R(0,`span`,11),K(1,`impure`),z())}function sD(e,t){if(e&1&&(R(0,`span`,6)(1,`span`,9),K(2),z(),R(3,`span`,10),K(4),z(),A(5,oD,2,0,`span`,11),z()),e&2){let e=W().$implicit;D(2),q(e.name),D(2),J(``,e.uses,`×`),D(),j(e.isPure?-1:5)}}function cD(e,t){if(e&1&&(R(0,`li`),A(1,aD,11,6,`button`,5)(2,sD,6,3,`span`,6),z()),e&2){let e=W(3);D(),j(e.canShowPipes()?1:2)}}function lD(e,t){if(e&1&&(R(0,`ul`,3),M(1,cD,3,1,`li`,null,eD),z(),R(3,`p`,4),K(4,` Call counts cover every component that uses the pipe. Record calls in the Pipes tab to see them. `),z()),e&2){let e=W(2);D(),N(e.rows())}}function uD(e,t){e&1&&(R(0,`p`,2),K(1,`No pipe is in use in the rendered part of its template.`),z())}function dD(e,t){if(e&1&&(R(0,`div`,0)(1,`h3`),K(2,` Pipes in template `),R(3,`span`,1),K(4),z()(),A(5,lD,5,0)(6,uD,2,0,`p`,2),z()),e&2){let e=W();D(4),q(e.rows().length),D(),j(e.rows().length?5:6)}}function fD(e,t,n){let r=(t?e?.pages?.find(e=>e.pageId===t):void 0)?.pipes??e?.pipes??[],i=[];for(let e of r){let t=e.components.find(e=>e.name===n);t&&i.push({name:e.name,isPure:e.isPure,uses:t.count,...e.call?{calls:e.call.callCount}:{},churn:!!e.churn,stale:!!e.stale})}return i.sort((e,t)=>e.name.localeCompare(t.name))}var pD=class e{plural=$E;destroyRef=x(ys);rpc=$(null);pageId=$(void 0);component=$.required();canShowPipes=$(!1);showPipe=ev();snapshot=T(void 0);loaded=T(!1);rows=X(()=>fD(this.snapshot(),this.pageId(),this.component()));unsubscribe;constructor(){E(()=>{let e=this.rpc();e&&this.subscribe(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async subscribe(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`pipe-usage`);if(this.destroyRef.destroyed)return;let n=e=>{this.snapshot.set(e),this.loaded.set(!0)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-component-pipes`]],inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`],component:[1,`component`],canShowPipes:[1,`canShowPipes`]},outputs:{showPipe:`showPipe`},decls:1,vars:1,consts:[[1,`block`],[1,`pill`],[1,`empty-line`],[1,`chips`],[1,`hint`],[`type`,`button`,1,`pipe`],[1,`pipe`],[`type`,`button`,1,`pipe`,3,`click`],[1,`sr-only`],[1,`mono`],[1,`note`],[1,`flag`,`warn`]],template:function(e,t){e&1&&A(0,dD,7,2,`div`,0),e&2&&j(t.loaded()?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})},WE=`pangular:panel-action-result`,GE=6e3,KE=0;function qE(e=window){return e.location.protocol===`chrome-extension:`&&e.parent!==e}function JE(e,t=window){let n=`pa-${Date.now().toString(36)}-${++KE}`;return new Promise(r=>{let i=e=>{t.clearTimeout(o),t.removeEventListener(`message`,a),r(e)},a=({source:e,origin:r,data:a})=>{if(e!==t.parent||r!==t.location.origin)return;let o=a;if(o?.type!==WE||o.requestId!==n)return;let{opened:s,error:c}=a;i({ok:o.ok===!0,...s===`file`||s===`class`?{opened:s}:{},...typeof c==`string`?{error:c}:{}})},o=t.setTimeout(()=>i({ok:!1,error:`timeout`}),GE);t.addEventListener(`message`,a),t.parent.postMessage({...e,requestId:n},t.location.origin)})}var YE=class e{available=qE();reveal(e,t){return JE({type:`pangular:reveal-element`,pageId:e,id:t})}openSource(e,t,n){return JE({type:`pangular:open-source`,pageId:e,id:t,...n?{file:n.file,line:n.line}:{}})}static ɵfac=function(t){return new(t||e)};static ɵprov=El({token:e,factory:e.ɵfac})};function XE(e){return new Date(e).toLocaleTimeString()}var ZE=/[ \t\n\r]/;function QE(e){let t=e.trim(),n;try{n=JSON.parse(t)}catch{return null}if(typeof n!=`object`||!n)return null;let r=``,i=0,a=()=>`\n${` `.repeat(i)}`;for(let e=0;et.name;function tD(e,t){e&1&&(R(0,`span`,11),K(1,`impure`),z())}function nD(e,t){e&1&&(R(0,`span`,11),K(1,`churning`),z())}function rD(e,t){e&1&&(R(0,`span`,11),K(1,`stale?`),z())}function iD(e,t){if(e&1&&(R(0,`span`,10),K(1),z()),e&2){let e=W(2).$implicit,t=W(3);D(),q(t.plural(e.calls,`call`))}}function aD(e,t){if(e&1){let e=B();R(0,`button`,7),U(`click`,function(){S(e);let t=W().$implicit;return C(W(3).showPipe.emit(t.name))}),R(1,`span`,8),K(2,`Show in Pipes:`),z(),R(3,`span`,9),K(4),z(),R(5,`span`,10),K(6),z(),A(7,tD,2,0,`span`,11),A(8,nD,2,0,`span`,11),A(9,rD,2,0,`span`,11),A(10,iD,2,1,`span`,10),z()}if(e&2){let e=W().$implicit;D(4),q(e.name),D(2),J(``,e.uses,`×`),D(),j(e.isPure?-1:7),D(),j(e.churn?8:-1),D(),j(e.stale?9:-1),D(),j(e.calls===void 0?-1:10)}}function oD(e,t){e&1&&(R(0,`span`,11),K(1,`impure`),z())}function sD(e,t){if(e&1&&(R(0,`span`,6)(1,`span`,9),K(2),z(),R(3,`span`,10),K(4),z(),A(5,oD,2,0,`span`,11),z()),e&2){let e=W().$implicit;D(2),q(e.name),D(2),J(``,e.uses,`×`),D(),j(e.isPure?-1:5)}}function cD(e,t){if(e&1&&(R(0,`li`),A(1,aD,11,6,`button`,5)(2,sD,6,3,`span`,6),z()),e&2){let e=W(3);D(),j(e.canShowPipes()?1:2)}}function lD(e,t){if(e&1&&(R(0,`ul`,3),M(1,cD,3,1,`li`,null,eD),z(),R(3,`p`,4),K(4,` Call counts cover every component that uses the pipe. Record calls in the Pipes tab to see them. `),z()),e&2){let e=W(2);D(),N(e.rows())}}function uD(e,t){e&1&&(R(0,`p`,2),K(1,`No pipe is in use in the rendered part of its template.`),z())}function dD(e,t){if(e&1&&(R(0,`div`,0)(1,`h3`),K(2,` Pipes in template `),R(3,`span`,1),K(4),z()(),A(5,lD,5,0)(6,uD,2,0,`p`,2),z()),e&2){let e=W();D(4),q(e.rows().length),D(),j(e.rows().length?5:6)}}function fD(e,t,n){let r=(t?e?.pages?.find(e=>e.pageId===t):void 0)?.pipes??e?.pipes??[],i=[];for(let e of r){let t=e.components.find(e=>e.name===n);t&&i.push({name:e.name,isPure:e.isPure,uses:t.count,...e.call?{calls:e.call.callCount}:{},churn:!!e.churn,stale:!!e.stale})}return i.sort((e,t)=>e.name.localeCompare(t.name))}var pD=class e{plural=$E;destroyRef=x(ys);rpc=$(null);pageId=$(void 0);component=$.required();canShowPipes=$(!1);showPipe=nv();snapshot=T(void 0);loaded=T(!1);rows=X(()=>fD(this.snapshot(),this.pageId(),this.component()));unsubscribe;constructor(){E(()=>{let e=this.rpc();e&&this.subscribe(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async subscribe(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`pipe-usage`);if(this.destroyRef.destroyed)return;let n=e=>{this.snapshot.set(e),this.loaded.set(!0)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-component-pipes`]],inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`],component:[1,`component`],canShowPipes:[1,`canShowPipes`]},outputs:{showPipe:`showPipe`},decls:1,vars:1,consts:[[1,`block`],[1,`pill`],[1,`empty-line`],[1,`chips`],[1,`hint`],[`type`,`button`,1,`pipe`],[1,`pipe`],[`type`,`button`,1,`pipe`,3,`click`],[1,`sr-only`],[1,`mono`],[1,`note`],[1,`flag`,`warn`]],template:function(e,t){e&1&&A(0,dD,7,2,`div`,0),e&2&&j(t.loaded()?0:-1)},styles:[`[_nghost-%COMP%] { display: block; } @@ -436,7 +436,7 @@ button.pipe[_ngcontent-%COMP%]:focus-visible { button.pipe[_ngcontent-%COMP%] { transition: none; } -}`]})};function mD(e){let t=e?.pages;return t&&typeof t==`object`?t:{}}function hD(e){let t=x(ys),n=T({}),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(mD(e));o(a.value()),i=a.on(`updated`,o)}catch{r===e&&n.set({})}};return E(()=>{let t=e();t&&t!==r&&Z(()=>void a(t))}),t.onDestroy(()=>i?.()),n.asReadonly()}function gD(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 _D=[`*`];function vD(e,t){if(e&1&&(R(0,`div`,1)(1,`p`,2),K(2),z(),R(3,`p`,3),K(4),Eg(5),R(6,`a`,4),K(7,`Supported versions`),z()()()),e&2){let e=W();G(`compact`,e.compact()),D(2),q(e.title()),D(2),J(` `,t,` `),D(2),V(`href`,e.docsUrl,bu)}}var yD=`https://pangular-inspector.dev/getting-started/installation/#supported-angular-versions`,bD=class e{page=$(null);capability=$.required();missing=$(!1,{transform:dv});compact=$(!1,{transform:dv});docsUrl=yD;text=X(()=>{let e=this.page();return!this.missing()&&!rT(e,this.capability())?null:iT(this.capability(),e?.version)});title=X(()=>{let e=this.page()?.version;return e?`Not available on Angular ${eT(e)}`:`Not available on this page`});static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-angular-unavailable`]],inputs:{page:[1,`page`],capability:[1,`capability`],missing:[1,`missing`],compact:[1,`compact`]},ngContentSelectors:_D,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&&(Tg(),A(0,vD,8,5,`div`,0)),e&2){let e;j((e=t.text())?0:-1,e)}},styles:[`[_nghost-%COMP%] { +}`]})};function mD(e){let t=e?.pages;return t&&typeof t==`object`?t:{}}function hD(e){let t=x(ys),n=T({}),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(mD(e));o(a.value()),i=a.on(`updated`,o)}catch{r===e&&n.set({})}};return E(()=>{let t=e();t&&t!==r&&Z(()=>void a(t))}),t.onDestroy(()=>i?.()),n.asReadonly()}function gD(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 _D=[`*`];function vD(e,t){if(e&1&&(R(0,`div`,1)(1,`p`,2),K(2),z(),R(3,`p`,3),K(4),Og(5),R(6,`a`,4),K(7,`Supported versions`),z()()()),e&2){let e=W();G(`compact`,e.compact()),D(2),q(e.title()),D(2),J(` `,t,` `),D(2),V(`href`,e.docsUrl,Su)}}var yD=`https://pangular-inspector.dev/getting-started/installation/#supported-angular-versions`,bD=class e{page=$(null);capability=$.required();missing=$(!1,{transform:pv});compact=$(!1,{transform:pv});docsUrl=yD;text=X(()=>{let e=this.page();return!this.missing()&&!rT(e,this.capability())?null:iT(this.capability(),e?.version)});title=X(()=>{let e=this.page()?.version;return e?`Not available on Angular ${eT(e)}`:`Not available on this page`});static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-angular-unavailable`]],inputs:{page:[1,`page`],capability:[1,`capability`],missing:[1,`missing`],compact:[1,`compact`]},ngContentSelectors:_D,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&&(Dg(),A(0,vD,8,5,`div`,0)),e&2){let e;j((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 xD(e){return e?.platform===`angular-native`}function SD(e){return xD(e)||e?.platform===`nativescript`}function CD(e,t){let n=Object.values(e??{}).filter(xD);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 wD=[`trigger`],TD=[`list`],ED=(e,t)=>t.value;function DD(e,t){if(e&1&&(R(0,`span`,4),K(1),z()),e&2){let e=W();D(),q(e.current().hint)}}function OD(e,t){if(e&1&&(R(0,`span`,15),K(1),z()),e&2){let e=W().$implicit;D(),q(e.hint)}}function kD(e,t){if(e&1){let e=B();R(0,`li`,11),U(`pointerenter`,function(){let t=S(e).$index;return C(W(2).active.set(t))})(`pointerdown`,function(e){return e.preventDefault()})(`click`,function(){let t=S(e).$index;return C(W(2).choose(t))}),w(),R(1,`svg`,12),sg(2,`path`,13),z(),ls(),R(3,`span`,14),K(4),z(),A(5,OD,2,1,`span`,15),z()}if(e&2){let e=t.$implicit,n=t.$index,r=W(2);G(`active`,n===r.active())(`selected`,e.value===r.value()),k(`id`,r.uid+`-opt-`+n)(`aria-selected`,e.value===r.value())(`aria-disabled`,e.disabled||null),D(4),q(e.label),D(),j(e.hint?5:-1)}}function AD(e,t){if(e&1&&(R(0,`li`,10),K(1),z()),e&2){let e=W(2);D(),q(e.emptyText())}}function jD(e,t){if(e&1&&(R(0,`ul`,8,1),Lh(`list-in`),U(`pointerdown`,function(e){return e.preventDefault()}),M(2,kD,6,9,`li`,9,ED,!1,AD,2,1,`li`,10),z()),e&2){let e=W();G(`up`,e.dropUp()),k(`id`,e.uid+`-list`)(`aria-labelledby`,e.labelledBy()||e.uid+`-trigger`),D(2),N(e.options())}}var MD=0,ND=class e{options=$.required();value=av(null);placeholder=$(`Select…`);ariaLabel=$(``);labelledBy=$(``);describedBy=$(``);disabled=$(!1);emptyText=$(`Nothing to choose`);uid=`app-select-${++MD}`;open=T(!1);active=T(-1);dropUp=T(!1);current=X(()=>this.options().find(e=>e.value===this.value())??null);host=x(kl);injector=x(_s);trigger=sv.required(`trigger`);list=sv(`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=O({type:e,selectors:[[`app-select`]],viewQuery:function(e,t){e&1&&Og(t.trigger,wD,5)(t.list,TD,5),e&2&&kg(2)},hostAttrs:[1,`app-select`],hostVars:2,hostBindings:function(e,t){e&1&&H(`pointerdown`,function(e){return t.onOutside(e)},Su),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&&(R(0,`button`,2,0),U(`click`,function(){return t.toggle()})(`keydown`,function(e){return t.onKey(e)})(`blur`,function(e){return t.onBlur(e)}),R(2,`span`,3),K(3),z(),A(4,DD,2,1,`span`,4),w(),R(5,`svg`,5),sg(6,`path`,6),z()(),A(7,jD,5,5,`ul`,7)),e&2&&(V(`disabled`,t.disabled()),k(`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),D(2),G(`placeholder`,!t.current()),D(),J(` `,t.current()?.label??t.placeholder(),` `),D(),j(t.current()?.hint?4:-1),D(3),j(t.open()?7:-1))},styles:[`[_nghost-%COMP%] { +}`]})};function xD(e){return e?.platform===`angular-native`}function SD(e){return xD(e)||e?.platform===`nativescript`}function CD(e,t){let n=Object.values(e??{}).filter(xD);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 wD=[`trigger`],TD=[`list`],ED=(e,t)=>t.value;function DD(e,t){if(e&1&&(R(0,`span`,4),K(1),z()),e&2){let e=W();D(),q(e.current().hint)}}function OD(e,t){if(e&1&&(R(0,`span`,15),K(1),z()),e&2){let e=W().$implicit;D(),q(e.hint)}}function kD(e,t){if(e&1){let e=B();R(0,`li`,11),U(`pointerenter`,function(){let t=S(e).$index;return C(W(2).active.set(t))})(`pointerdown`,function(e){return e.preventDefault()})(`click`,function(){let t=S(e).$index;return C(W(2).choose(t))}),w(),R(1,`svg`,12),lg(2,`path`,13),z(),ls(),R(3,`span`,14),K(4),z(),A(5,OD,2,1,`span`,15),z()}if(e&2){let e=t.$implicit,n=t.$index,r=W(2);G(`active`,n===r.active())(`selected`,e.value===r.value()),k(`id`,r.uid+`-opt-`+n)(`aria-selected`,e.value===r.value())(`aria-disabled`,e.disabled||null),D(4),q(e.label),D(),j(e.hint?5:-1)}}function AD(e,t){if(e&1&&(R(0,`li`,10),K(1),z()),e&2){let e=W(2);D(),q(e.emptyText())}}function jD(e,t){if(e&1&&(R(0,`ul`,8,1),zh(`list-in`),U(`pointerdown`,function(e){return e.preventDefault()}),M(2,kD,6,9,`li`,9,ED,!1,AD,2,1,`li`,10),z()),e&2){let e=W();G(`up`,e.dropUp()),k(`id`,e.uid+`-list`)(`aria-labelledby`,e.labelledBy()||e.uid+`-trigger`),D(2),N(e.options())}}var MD=0,ND=class e{options=$.required();value=sv(null);placeholder=$(`Select…`);ariaLabel=$(``);labelledBy=$(``);describedBy=$(``);disabled=$(!1);emptyText=$(`Nothing to choose`);uid=`app-select-${++MD}`;open=T(!1);active=T(-1);dropUp=T(!1);current=X(()=>this.options().find(e=>e.value===this.value())??null);host=x(kl);injector=x(_s);trigger=lv.required(`trigger`);list=lv(`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=O({type:e,selectors:[[`app-select`]],viewQuery:function(e,t){e&1&&Ag(t.trigger,wD,5)(t.list,TD,5),e&2&&jg(2)},hostAttrs:[1,`app-select`],hostVars:2,hostBindings:function(e,t){e&1&&H(`pointerdown`,function(e){return t.onOutside(e)},wu),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&&(R(0,`button`,2,0),U(`click`,function(){return t.toggle()})(`keydown`,function(e){return t.onKey(e)})(`blur`,function(e){return t.onBlur(e)}),R(2,`span`,3),K(3),z(),A(4,DD,2,1,`span`,4),w(),R(5,`svg`,5),lg(6,`path`,6),z()(),A(7,jD,5,5,`ul`,7)),e&2&&(V(`disabled`,t.disabled()),k(`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),D(2),G(`placeholder`,!t.current()),D(),J(` `,t.current()?.label??t.placeholder(),` `),D(),j(t.current()?.hint?4:-1),D(3),j(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 PD(e,t){let n=Xw(t);if(Zw(n))return{nodes:e,matches:0};let r=0,i=e=>e.flatMap(e=>{let t=Qw(e,n);t&&r++;let a=i(e.children);return t||a.length?[{...e,children:a}]:[]});return{nodes:i(e),matches:r}}function FD(e){return e.flatMap(e=>e.kind===`directive`?FD(e.children):[{...e,children:FD(e.children)}])}function ID(e){return(e.attributes?.length?e.attributes:e.directives??[e.name]).map(e=>`[${e}]`).join(` `)}var LD={hydrated:`Hydrated`,skipped:`Skipped`,mismatched:`Mismatch`,client:`Client`};function RD(e){return LD[e]}function zD(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 BD(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 VD(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 HD(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&&!UD(t.roots,i)?{pageId:r,selectedId:null,detailId:n,destroyed:i}:{pageId:r,selectedId:i,detailId:n,destroyed:null}}function UD(e,t){return e.some(e=>e.id===t||UD(e.children,t))}function WD(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 GD=(e,t)=>t.key,KD=(e,t)=>t.id;function qD(e,t){e&1&&(R(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 `),R(2,`code`),K(3,`provideClientHydration()`),z(),K(4,` and use a development build to see each component's status. `),z())}function JD(e,t){if(e&1&&(R(0,`li`)(1,`span`,9),K(2),z(),K(3),z()),e&2){let e=t.$implicit;Qg(`count count-`+e.key),D(2),q(e.value),D(),J(` `,e.label,` `)}}function YD(e,t){if(e&1&&(R(0,`span`,15),K(1,`Expected `),R(2,`code`),K(3),z()()),e&2){let e=W().$implicit;D(3),q(e.expected)}}function XD(e,t){if(e&1&&(R(0,`span`,15),K(1,`Found `),R(2,`code`),K(3),z()()),e&2){let e=W().$implicit;D(3),q(e.actual)}}function ZD(e,t){if(e&1){let e=B();R(0,`li`)(1,`button`,12),U(`click`,function(){let t=S(e).$implicit;return C(W(4).showNode.emit(t.id))})(`focus`,function(){let t=S(e).$implicit;return C(W(4).highlight.emit(t.id))})(`blur`,function(){return S(e),C(W(4).highlight.emit(null))})(`mouseenter`,function(){let t=S(e).$implicit;return C(W(4).highlight.emit(t.id))})(`mouseleave`,function(){return S(e),C(W(4).highlight.emit(null))}),R(2,`span`,13),K(3),z(),R(4,`span`,14),K(5),z(),A(6,YD,4,1,`span`,15),A(7,XD,4,1,`span`,15),z()()}if(e&2){let e=t.$implicit;D(3),q(e.name),D(2),J(`<`,e.tag,`>`),D(),j(e.expected?6:-1),D(),j(e.actual?7:-1)}}function QD(e,t){if(e&1&&(R(0,`h3`,10),K(1,`Mismatches`),z(),R(2,`ul`,11),M(3,ZD,8,4,`li`,null,KD),z()),e&2){let e=W(2);D(3),N(e.mismatches)}}function $D(e,t){if(e&1){let e=B();R(0,`div`,3)(1,`ul`,4),M(2,JD,4,4,`li`,5,GD),z(),R(4,`button`,6),U(`click`,function(){return S(e),C(W(2).toggleOverlay())}),w(),R(5,`svg`,7),sg(6,`rect`,8),z(),K(7,` Outline on page `),z()(),A(8,QD,5,0)}if(e&2){let e=W(),t=W();D(2),N(t.counts()),D(2),k(`aria-pressed`,t.overlayOn()),D(4),j(e.mismatches.length?8:-1)}}function eO(e,t){e&1&&A(0,qD,5,0,`p`,2)(1,$D,9,2),e&2&&j(+!!t.hydrated)}function tO(e,t){e&1&&(R(0,`p`,2),K(1,` This page was not rendered on the server, so there is nothing to hydrate. With server-side rendering and `),R(2,`code`),K(3,`provideClientHydration()`),z(),K(4,`, each component shows whether it was hydrated, skipped or mismatched. `),z())}var nO=class e{report=$(void 0);overlay=ev();showNode=ev();highlight=ev();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=O({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&&(R(0,`section`,0)(1,`h2`,1),K(2,`Hydration`),z(),A(3,eO,2,1)(4,tO,5,0,`p`,2),z()),e&2){let e;D(3),j((e=t.report())?3:4,e)}},styles:[`.hydration[_ngcontent-%COMP%] { +}`]})};function PD(e,t){let n=Xw(t);if(Zw(n))return{nodes:e,matches:0};let r=0,i=e=>e.flatMap(e=>{let t=Qw(e,n);t&&r++;let a=i(e.children);return t||a.length?[{...e,children:a}]:[]});return{nodes:i(e),matches:r}}function FD(e){return e.flatMap(e=>e.kind===`directive`?FD(e.children):[{...e,children:FD(e.children)}])}function ID(e){return(e.attributes?.length?e.attributes:e.directives??[e.name]).map(e=>`[${e}]`).join(` `)}var LD={hydrated:`Hydrated`,skipped:`Skipped`,mismatched:`Mismatch`,client:`Client`};function RD(e){return LD[e]}function zD(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 BD(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 VD(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 HD(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&&!UD(t.roots,i)?{pageId:r,selectedId:null,detailId:n,destroyed:i}:{pageId:r,selectedId:i,detailId:n,destroyed:null}}function UD(e,t){return e.some(e=>e.id===t||UD(e.children,t))}function WD(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 GD=(e,t)=>t.key,KD=(e,t)=>t.id;function qD(e,t){e&1&&(R(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 `),R(2,`code`),K(3,`provideClientHydration()`),z(),K(4,` and use a development build to see each component's status. `),z())}function JD(e,t){if(e&1&&(R(0,`li`)(1,`span`,9),K(2),z(),K(3),z()),e&2){let e=t.$implicit;e_(`count count-`+e.key),D(2),q(e.value),D(),J(` `,e.label,` `)}}function YD(e,t){if(e&1&&(R(0,`span`,15),K(1,`Expected `),R(2,`code`),K(3),z()()),e&2){let e=W().$implicit;D(3),q(e.expected)}}function XD(e,t){if(e&1&&(R(0,`span`,15),K(1,`Found `),R(2,`code`),K(3),z()()),e&2){let e=W().$implicit;D(3),q(e.actual)}}function ZD(e,t){if(e&1){let e=B();R(0,`li`)(1,`button`,12),U(`click`,function(){let t=S(e).$implicit;return C(W(4).showNode.emit(t.id))})(`focus`,function(){let t=S(e).$implicit;return C(W(4).highlight.emit(t.id))})(`blur`,function(){return S(e),C(W(4).highlight.emit(null))})(`mouseenter`,function(){let t=S(e).$implicit;return C(W(4).highlight.emit(t.id))})(`mouseleave`,function(){return S(e),C(W(4).highlight.emit(null))}),R(2,`span`,13),K(3),z(),R(4,`span`,14),K(5),z(),A(6,YD,4,1,`span`,15),A(7,XD,4,1,`span`,15),z()()}if(e&2){let e=t.$implicit;D(3),q(e.name),D(2),J(`<`,e.tag,`>`),D(),j(e.expected?6:-1),D(),j(e.actual?7:-1)}}function QD(e,t){if(e&1&&(R(0,`h3`,10),K(1,`Mismatches`),z(),R(2,`ul`,11),M(3,ZD,8,4,`li`,null,KD),z()),e&2){let e=W(2);D(3),N(e.mismatches)}}function $D(e,t){if(e&1){let e=B();R(0,`div`,3)(1,`ul`,4),M(2,JD,4,4,`li`,5,GD),z(),R(4,`button`,6),U(`click`,function(){return S(e),C(W(2).toggleOverlay())}),w(),R(5,`svg`,7),lg(6,`rect`,8),z(),K(7,` Outline on page `),z()(),A(8,QD,5,0)}if(e&2){let e=W(),t=W();D(2),N(t.counts()),D(2),k(`aria-pressed`,t.overlayOn()),D(4),j(e.mismatches.length?8:-1)}}function eO(e,t){e&1&&A(0,qD,5,0,`p`,2)(1,$D,9,2),e&2&&j(+!!t.hydrated)}function tO(e,t){e&1&&(R(0,`p`,2),K(1,` This page was not rendered on the server, so there is nothing to hydrate. With server-side rendering and `),R(2,`code`),K(3,`provideClientHydration()`),z(),K(4,`, each component shows whether it was hydrated, skipped or mismatched. `),z())}var nO=class e{report=$(void 0);overlay=nv();showNode=nv();highlight=nv();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=O({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&&(R(0,`section`,0)(1,`h2`,1),K(2,`Hydration`),z(),A(3,eO,2,1)(4,tO,5,0,`p`,2),z()),e&2){let e;D(3),j((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 rO(e,t){if(e&1&&(R(0,`p`,0),K(1),R(2,`code`),K(3),z(),K(4,` to keep more. `),R(5,`a`,1),K(6,`About limits`),z()()),e&2){let e=W();D(),b_(` Showing the latest `,e.max(),` `,e.what(),`. `,e.dropped(),` older `,e.dropped()===1?`entry was`:`entries were`,` dropped. Raise `),D(2),J(`limits.`,e.limit()),D(2),V(`href`,e.docsUrl,bu)}}var iO=`https://pangular-inspector.dev/getting-started/configuration/#limits`,aO=class e{dropped=$(0);max=$.required();what=$.required();limit=$.required();docsUrl=iO;static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&A(0,rO,7,6,`p`,0),e&2&&j(t.dropped()>0?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})};function rO(e,t){if(e&1&&(R(0,`p`,0),K(1),R(2,`code`),K(3),z(),K(4,` to keep more. `),R(5,`a`,1),K(6,`About limits`),z()()),e&2){let e=W();D(),S_(` Showing the latest `,e.max(),` `,e.what(),`. `,e.dropped(),` older `,e.dropped()===1?`entry was`:`entries were`,` dropped. Raise `),D(2),J(`limits.`,e.limit()),D(2),V(`href`,e.docsUrl,Su)}}var iO=`https://pangular-inspector.dev/getting-started/configuration/#limits`,aO=class e{dropped=$(0);max=$.required();what=$.required();limit=$.required();docsUrl=iO;static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&A(0,rO,7,6,`p`,0),e&2&&j(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; -}`]})},oO=1e3;function sO(e){return typeof e==`number`&&Number.isFinite(e)&&e>0&&e<=oO?e:16}var cO=864e13,lO=200,uO=300,dO=100,fO=10,pO=100,mO=2e3,hO=2e3,gO=4e3,_O=1e3,vO=100,yO=3,bO=50,xO={component:`c`,hook:`h`,afterRender:`r`,output:`o`},SO=Object.values(xO),CO=e=>!!e&&typeof e==`object`&&!Array.isArray(e),wO=e=>typeof e==`number`&&Number.isFinite(e)&&e>=0?e:0,TO=(e,t)=>typeof e==`string`?e.slice(0,t):``,EO=e=>wO(e)>0?wO(e):void 0,DO=(e,t)=>Array.isArray(e)?e.slice(0,t):[];function OO(e){if(!CO(e))return null;let t=TO(e.name,lO);return t?{name:t,checks:wO(e.checks),ms:wO(e.ms)}:null}function kO(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>_O||typeof o!=`string`||!SO.includes(o)?null:[n,r,wO(i),a,o]}function AO(e,t,n){if(!CO(e)||typeof e.id!=`number`)return null;let r=DO(e.components,fO).map(OO).filter(e=>!!e),i=TO(e.trigger,uO),a=DO(e.spans,40).map(e=>kO(e,t)).filter(e=>!!e),o=Array.isArray(e.spans)?e.spans.length-40:0,s=Math.floor(wO(e.droppedSpans))+Math.max(0,o),c={t:typeof e.t==`number`?wO(e.t):void 0,hookMs:EO(e.hookMs),afterRenderMs:EO(e.afterRenderMs),outputMs:EO(e.outputMs)},l=PO(e.cause),u=EO(e.refreshed),d=EO(e.unchanged);return{id:wO(e.id),at:wO(e.at),ms:wO(e.ms),passes:wO(e.passes),...i?{trigger:i}:{},checks:wO(e.checks),components:r,...Object.fromEntries(Object.entries(c).filter(([,e])=>e!==void 0)),...a.length?{spans:a}:{},...s?{droppedSpans:s}:{},...l?{cause:l}:{},...u?{refreshed:u}:{},...d?{unchanged:d}:{},...wO(e.ms)>n?{slow:!0}:{}}}var jO=[`event`,`http`,`timer`,`signal`,`effect`,`markForCheck`,`input`,`view`,`tick`,`zone`,`unknown`],MO={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`},NO=e=>typeof e==`string`&&jO.includes(e);function PO(e){if(!CO(e)||!NO(e.kind))return;let t=[`component`,`listener`,`event`,`target`,`signal`,`task`],n={kind:e.kind};NO(e.via)&&(n.via=e.via);for(let r of t){let t=TO(e[r],lO);t&&(n[r]=t)}e.zone===!0&&(n.zone=!0);let r=DO(e.stack,yO).map(e=>TO(e,uO)).filter(Boolean);r.length&&(n.stack=r);let i=Math.floor(wO(e.more));return i&&(n.more=i),n}function FO(e){if(!CO(e))return null;let t=TO(e.name,lO);if(!t)return null;let n=e.strategy;return{name:t,refreshed:Math.floor(wO(e.refreshed)),unchanged:Math.floor(wO(e.unchanged)),...n===`OnPush`||n===`Eager`?{strategy:n}:{}}}function IO(e){if(!CO(e))return null;let t=TO(e.name,lO),n=TO(e.input,lO);if(!t||!n)return null;let r=TO(e.parent,lO);return{name:t,input:n,...r?{parent:r}:{},inPlace:Math.floor(wO(e.inPlace)),sameContents:Math.floor(wO(e.sameContents))}}function LO(e){if(!CO(e))return null;let t=TO(e.name,lO);if(!t)return null;let n=DO(e.tasks,3).map(e=>TO(e,lO)).filter(Boolean);return{name:t,ticks:Math.floor(wO(e.ticks)),...n.length?{tasks:n}:{}}}function RO(e){if(!CO(e))return;let t={};if(CO(e.causes))for(let n of jO){let r=Math.floor(wO(e.causes[n]));r&&(t[n]=r)}let n=DO(e.components,pO).map(FO).filter(e=>!!e),r=DO(e.inputs,bO).map(IO).filter(e=>!!e),i=DO(e.zone,bO).map(LO).filter(e=>!!e),a=Math.floor(wO(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 zO(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(`${MO[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 ${MO[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 BO(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 VO(e){let t=OO(e);return!t||!CO(e)?null:{...t,maxMs:wO(e.maxMs),cycles:wO(e.cycles)}}function HO(e){if(!CO(e))return null;let t=TO(e.name,lO),n=TO(e.hook,dO);if(!t||!n)return null;let{calls:r,ms:i,maxMs:a}=e;return{name:t,hook:n,calls:wO(r),ms:wO(i),maxMs:wO(a)}}function UO(e){if(!CO(e))return null;let t=TO(e.name,lO);if(!t)return null;let n=TO(e.listener,lO);return{name:t,...n?{listener:n}:{},calls:wO(e.calls),ms:wO(e.ms),maxMs:wO(e.maxMs)}}function WO(e){if(CO(e)&&wO(e.runs))return{runs:wO(e.runs),ms:wO(e.ms),maxMs:wO(e.maxMs)}}function GO(e,t){if(!CO(e))return null;let n=DO(e.spanNames,gO).map(e=>TO(e,uO)),r=sO(e.slowMs),i=Array.isArray(e.cycles)?e.cycles.slice(-Math.min(t,hO)).map(e=>AO(e,n.length,r)).filter(e=>!!e):[],a={},o=0;if(CO(e.hosts)){let t=Object.entries(e.hosts);o=Math.max(0,t.length-mO);for(let[e,n]of t.slice(0,mO))e.length<50&&wO(n)&&(a[e]=wO(n))}let s=Array.isArray(e.components)?e.components:[],c=Math.floor(wO(e.droppedClasses))+Math.max(0,s.length-pO),l=Math.floor(wO(e.droppedHosts))+o,u=DO(e.hooks,vO).map(HO).filter(e=>!!e),d=DO(e.outputs,vO).map(UO).filter(e=>!!e),f=Math.max(0,DO(e.hooks,1/0).length-vO)+Math.max(0,DO(e.outputs,1/0).length-vO),p=Math.floor(wO(e.droppedTimings))+f,m=WO(e.afterRender),ee=i.some(e=>e.spans?.length),h=RO(e.diagnosis);return{recording:e.recording===!0,startedAt:typeof e.startedAt==`number`&&e.startedAt<=cO?wO(e.startedAt):null,dropped:wO(e.dropped),slowMs:r,cycles:i,components:s.slice(0,pO).map(VO).filter(e=>!!e),...c?{droppedClasses:c}:{},hosts:a,...l?{droppedHosts:l}:{},...u.length?{hooks:u}:{},...d.length?{outputs:d}:{},...p?{droppedTimings:p}:{},...m?{afterRender:m}:{},...ee?{spanNames:n}:{},...h?{diagnosis:h}:{}}}var KO=`pangular-inspector/change-detection`;function qO(e,t,n=Date.now()){return{format:KO,version:1,exportedAt:n,pageId:t,recording:{...GO(e,hO)??e,recording:!1,hosts:{}}}}function JO(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(!CO(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=CO(n.recording)?n.recording:n;if(!Array.isArray(r.cycles))return{ok:!1,error:`The file has no change detection cycles.`};let i=GO(r,t);if(!i)return{ok:!1,error:`The file is not a recording.`};let a=TO(n.pageId??r.pageId,49)||`imported`,o=EO(n.exportedAt);return{ok:!0,pageId:a,...o?{exportedAt:o}:{},recording:{...i,recording:!1}}}var YO=1,XO=1,ZO=2,QO={c:`component`,h:`lifecycle-hook`,r:`after-render`,o:`output`},$O=e=>Math.round(e*1e6)/1e3;function ek(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:YO,tid:XO,ts:$O(e),dur:$O(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:zO(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===xO.output){let n=e+i;a.push({name:l,cat:QO[d],ph:`X`,pid:YO,tid:ZO,ts:$O(n),dur:$O(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=$O((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:YO,tid:e,args:{name:n}});return{traceEvents:[l(0,`process_name`,`Angular change detection (page ${t})`),l(XO,`thread_name`,`Change detection`),l(ZO,`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<=cO?{startedAt:new Date(e.startedAt).toISOString()}:{}}}}function tk(e,t=16){return e.ms>t}function nk(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}function rk(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 ik(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,t=16){let n=e.reduce((e,t)=>Math.max(e,t.ms),0);return Math.max(n,t*1.25)}function ok(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 sk={c:`component`,h:`hook`,r:`afterRender`,o:`output`};function ck(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 lk(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],ee=f>0&&m!==void 0&&ot.kind,dk=(e,t)=>t.name,fk=(e,t)=>t.name+`.`+t.input;function pk(e,t){e&1&&(R(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. `),z())}function mk(e,t){if(e&1&&(R(0,`tr`)(1,`td`),K(2),z(),R(3,`td`,6),K(4),z()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.count)}}function hk(e,t){if(e&1&&(R(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Trigger`),z(),R(5,`th`,5),K(6,`Cycles`),z()()(),R(7,`tbody`),M(8,mk,5,2,`tr`,null,uk),z()()),e&2){let e=W(2);D(8),N(e.causes())}}function gk(e,t){e&1&&(R(0,`p`,3),K(1,`No cycle has a cause yet.`),z())}function _k(e,t){if(e&1&&(R(0,`tr`)(1,`td`,7),K(2),z(),R(3,`td`,6),K(4),z(),R(5,`td`,7),K(6),z()()),e&2){let e=t.$implicit;D(2),q(e.name),D(2),q(e.ticks),D(2),q(e.tasks?.join(`, `))}}function vk(e,t){if(e&1&&(R(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Component`),z(),R(5,`th`,5),K(6,`Zone-only ticks`),z(),R(7,`th`,4),K(8,`After`),z()()(),R(9,`tbody`),M(10,_k,7,3,`tr`,null,dk),z()()),e&2){let e=W(3);D(10),N(e.zone())}}function yk(e,t){if(e&1&&(R(0,`p`,3),K(1),z()),e&2){let e=W(3);D(),q(e.zoneNote())}}function bk(e,t){if(e&1&&(R(0,`div`)(1,`h4`),K(2,`Depends on zone.js`),z(),A(3,vk,12,0,`table`)(4,yk,2,1,`p`,3),z()),e&2){let e=W(),t=W();D(3),j(t.zone().length?3:e.triggers?4:-1)}}function xk(e,t){e&1&&(R(0,`p`,3),K(1,`The page can't watch DOM updates, so wasted checks are not counted.`),z())}function Sk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,7),K(2),z(),R(3,`td`,6),K(4),z(),R(5,`td`,6),K(6),z(),R(7,`td`),K(8),z()()),e&2){let e=t.$implicit,n=W(3);D(2),q(e.name),D(2),q(e.refreshed),D(2),Y(``,e.unchanged,` (`,n.share(e.unchanged,e.refreshed),`)`),D(2),q(e.strategy??`Unknown`)}}function Ck(e,t){if(e&1&&(R(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Component`),z(),R(5,`th`,5),K(6,`Refreshed`),z(),R(7,`th`,5),K(8,`Changed nothing`),z(),R(9,`th`,4),K(10,`Strategy`),z()()(),R(11,`tbody`),M(12,Sk,9,5,`tr`,null,dk),z()()),e&2){let e=W(2);D(12),N(e.wasted())}}function wk(e,t){e&1&&(R(0,`p`,3),K(1,`Every refreshed check changed something.`),z())}function Tk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,7),K(2),z(),R(3,`td`,7),K(4),z(),R(5,`td`,6),K(6),z(),R(7,`td`,6),K(8),z()()),e&2){let e=t.$implicit;D(2),Y(``,e.name,`.`,e.input),D(2),q(e.parent??`Unknown`),D(2),q(e.inPlace),D(2),q(e.sameContents)}}function Ek(e,t){if(e&1&&(R(0,`h4`),K(1,`Inputs that break OnPush`),z(),R(2,`table`)(3,`thead`)(4,`tr`)(5,`th`,4),K(6,`Input`),z(),R(7,`th`,4),K(8,`Set by`),z(),R(9,`th`,5),K(10,`Changed in place`),z(),R(11,`th`,5),K(12,`Same contents, new reference`),z()()(),R(13,`tbody`),M(14,Tk,9,5,`tr`,null,fk),z()()),e&2){let e=W(2);D(14),N(e.inputs())}}function Dk(e,t){if(e&1&&(R(0,`li`),K(1),z()),e&2){let e=t.$implicit;D(),q(e.text)}}function Ok(e,t){if(e&1&&(R(0,`h4`),K(1,`Hints`),z(),R(2,`ul`,8),M(3,Dk,2,1,`li`,null,Yh),z()),e&2){let e=W(2);D(3),N(e.hints())}}function kk(e,t){if(e&1&&(R(0,`section`,0)(1,`h3`,1),K(2,`Why it ran and what it wasted`),z(),R(3,`div`,2)(4,`div`)(5,`h4`),K(6,`What started the cycles`),z(),A(7,pk,2,0,`p`,3)(8,hk,10,0,`table`)(9,gk,2,0,`p`,3),z(),A(10,bk,5,1,`div`),z(),R(11,`h4`),K(12,`Wasted checks`),z(),A(13,xk,2,0,`p`,3)(14,Ck,14,0,`table`)(15,wk,2,0,`p`,3),A(16,Ek,16,0),A(17,Ok,5,0),z()),e&2){let e=t,n=W();D(7),j(e.triggers?n.causes().length?8:9:7),D(3),j(n.hasZone()?10:-1),D(3),j(e.waste?n.wasted().length?14:15:13),D(3),j(n.inputs().length?16:-1),D(),j(n.hints().length?17:-1)}}var Ak=10,jk=class e{page=$(null);diagnosis=X(()=>this.page()?.diagnosis??null);causes=X(()=>{let e=this.diagnosis()?.causes??{};return jO.filter(t=>e[t]).map(t=>({kind:t,label:MO[t],count:e[t]}))});zone=X(()=>(this.diagnosis()?.zone??[]).slice(0,Ak));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,Ak));inputs=X(()=>(this.diagnosis()?.inputs??[]).slice(0,Ak));hints=X(()=>BO(this.diagnosis()??void 0).slice(0,Ak));share(e,t){return t?`${Math.round(e/t*100)}%`:`0%`}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&A(0,kk,18,5,`section`,0),e&2){let e;j((e=t.diagnosis())?0:-1,e)}},styles:[`[_nghost-%COMP%] { +}`]})},oO=1e3;function sO(e){return typeof e==`number`&&Number.isFinite(e)&&e>0&&e<=oO?e:16}var cO=864e13,lO=200,uO=300,dO=100,fO=10,pO=100,mO=2e3,hO=2e3,gO=4e3,_O=1e3,vO=100,yO=3,bO=50,xO={component:`c`,hook:`h`,afterRender:`r`,output:`o`},SO=Object.values(xO),CO=e=>!!e&&typeof e==`object`&&!Array.isArray(e),wO=e=>typeof e==`number`&&Number.isFinite(e)&&e>=0?e:0,TO=(e,t)=>typeof e==`string`?e.slice(0,t):``,EO=e=>wO(e)>0?wO(e):void 0,DO=(e,t)=>Array.isArray(e)?e.slice(0,t):[];function OO(e){if(!CO(e))return null;let t=TO(e.name,lO);return t?{name:t,checks:wO(e.checks),ms:wO(e.ms)}:null}function kO(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>_O||typeof o!=`string`||!SO.includes(o)?null:[n,r,wO(i),a,o]}function AO(e,t,n){if(!CO(e)||typeof e.id!=`number`)return null;let r=DO(e.components,fO).map(OO).filter(e=>!!e),i=TO(e.trigger,uO),a=DO(e.spans,40).map(e=>kO(e,t)).filter(e=>!!e),o=Array.isArray(e.spans)?e.spans.length-40:0,s=Math.floor(wO(e.droppedSpans))+Math.max(0,o),c={t:typeof e.t==`number`?wO(e.t):void 0,hookMs:EO(e.hookMs),afterRenderMs:EO(e.afterRenderMs),outputMs:EO(e.outputMs)},l=PO(e.cause),u=EO(e.refreshed),d=EO(e.unchanged);return{id:wO(e.id),at:wO(e.at),ms:wO(e.ms),passes:wO(e.passes),...i?{trigger:i}:{},checks:wO(e.checks),components:r,...Object.fromEntries(Object.entries(c).filter(([,e])=>e!==void 0)),...a.length?{spans:a}:{},...s?{droppedSpans:s}:{},...l?{cause:l}:{},...u?{refreshed:u}:{},...d?{unchanged:d}:{},...wO(e.ms)>n?{slow:!0}:{}}}var jO=[`event`,`http`,`timer`,`signal`,`effect`,`markForCheck`,`input`,`view`,`tick`,`zone`,`unknown`],MO={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`},NO=e=>typeof e==`string`&&jO.includes(e);function PO(e){if(!CO(e)||!NO(e.kind))return;let t=[`component`,`listener`,`event`,`target`,`signal`,`task`],n={kind:e.kind};NO(e.via)&&(n.via=e.via);for(let r of t){let t=TO(e[r],lO);t&&(n[r]=t)}e.zone===!0&&(n.zone=!0);let r=DO(e.stack,yO).map(e=>TO(e,uO)).filter(Boolean);r.length&&(n.stack=r);let i=Math.floor(wO(e.more));return i&&(n.more=i),n}function FO(e){if(!CO(e))return null;let t=TO(e.name,lO);if(!t)return null;let n=e.strategy;return{name:t,refreshed:Math.floor(wO(e.refreshed)),unchanged:Math.floor(wO(e.unchanged)),...n===`OnPush`||n===`Eager`?{strategy:n}:{}}}function IO(e){if(!CO(e))return null;let t=TO(e.name,lO),n=TO(e.input,lO);if(!t||!n)return null;let r=TO(e.parent,lO);return{name:t,input:n,...r?{parent:r}:{},inPlace:Math.floor(wO(e.inPlace)),sameContents:Math.floor(wO(e.sameContents))}}function LO(e){if(!CO(e))return null;let t=TO(e.name,lO);if(!t)return null;let n=DO(e.tasks,3).map(e=>TO(e,lO)).filter(Boolean);return{name:t,ticks:Math.floor(wO(e.ticks)),...n.length?{tasks:n}:{}}}function RO(e){if(!CO(e))return;let t={};if(CO(e.causes))for(let n of jO){let r=Math.floor(wO(e.causes[n]));r&&(t[n]=r)}let n=DO(e.components,pO).map(FO).filter(e=>!!e),r=DO(e.inputs,bO).map(IO).filter(e=>!!e),i=DO(e.zone,bO).map(LO).filter(e=>!!e),a=Math.floor(wO(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 zO(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(`${MO[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 ${MO[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 BO(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 VO(e){let t=OO(e);return!t||!CO(e)?null:{...t,maxMs:wO(e.maxMs),cycles:wO(e.cycles)}}function HO(e){if(!CO(e))return null;let t=TO(e.name,lO),n=TO(e.hook,dO);if(!t||!n)return null;let{calls:r,ms:i,maxMs:a}=e;return{name:t,hook:n,calls:wO(r),ms:wO(i),maxMs:wO(a)}}function UO(e){if(!CO(e))return null;let t=TO(e.name,lO);if(!t)return null;let n=TO(e.listener,lO);return{name:t,...n?{listener:n}:{},calls:wO(e.calls),ms:wO(e.ms),maxMs:wO(e.maxMs)}}function WO(e){if(CO(e)&&wO(e.runs))return{runs:wO(e.runs),ms:wO(e.ms),maxMs:wO(e.maxMs)}}function GO(e,t){if(!CO(e))return null;let n=DO(e.spanNames,gO).map(e=>TO(e,uO)),r=sO(e.slowMs),i=Array.isArray(e.cycles)?e.cycles.slice(-Math.min(t,hO)).map(e=>AO(e,n.length,r)).filter(e=>!!e):[],a={},o=0;if(CO(e.hosts)){let t=Object.entries(e.hosts);o=Math.max(0,t.length-mO);for(let[e,n]of t.slice(0,mO))e.length<50&&wO(n)&&(a[e]=wO(n))}let s=Array.isArray(e.components)?e.components:[],c=Math.floor(wO(e.droppedClasses))+Math.max(0,s.length-pO),l=Math.floor(wO(e.droppedHosts))+o,u=DO(e.hooks,vO).map(HO).filter(e=>!!e),d=DO(e.outputs,vO).map(UO).filter(e=>!!e),f=Math.max(0,DO(e.hooks,1/0).length-vO)+Math.max(0,DO(e.outputs,1/0).length-vO),p=Math.floor(wO(e.droppedTimings))+f,m=WO(e.afterRender),ee=i.some(e=>e.spans?.length),h=RO(e.diagnosis);return{recording:e.recording===!0,startedAt:typeof e.startedAt==`number`&&e.startedAt<=cO?wO(e.startedAt):null,dropped:wO(e.dropped),slowMs:r,cycles:i,components:s.slice(0,pO).map(VO).filter(e=>!!e),...c?{droppedClasses:c}:{},hosts:a,...l?{droppedHosts:l}:{},...u.length?{hooks:u}:{},...d.length?{outputs:d}:{},...p?{droppedTimings:p}:{},...m?{afterRender:m}:{},...ee?{spanNames:n}:{},...h?{diagnosis:h}:{}}}var KO=`pangular-inspector/change-detection`;function qO(e,t,n=Date.now()){return{format:KO,version:1,exportedAt:n,pageId:t,recording:{...GO(e,hO)??e,recording:!1,hosts:{}}}}function JO(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(!CO(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=CO(n.recording)?n.recording:n;if(!Array.isArray(r.cycles))return{ok:!1,error:`The file has no change detection cycles.`};let i=GO(r,t);if(!i)return{ok:!1,error:`The file is not a recording.`};let a=TO(n.pageId??r.pageId,49)||`imported`,o=EO(n.exportedAt);return{ok:!0,pageId:a,...o?{exportedAt:o}:{},recording:{...i,recording:!1}}}var YO=1,XO=1,ZO=2,QO={c:`component`,h:`lifecycle-hook`,r:`after-render`,o:`output`},$O=e=>Math.round(e*1e6)/1e3;function ek(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:YO,tid:XO,ts:$O(e),dur:$O(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:zO(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===xO.output){let n=e+i;a.push({name:l,cat:QO[d],ph:`X`,pid:YO,tid:ZO,ts:$O(n),dur:$O(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=$O((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:YO,tid:e,args:{name:n}});return{traceEvents:[l(0,`process_name`,`Angular change detection (page ${t})`),l(XO,`thread_name`,`Change detection`),l(ZO,`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<=cO?{startedAt:new Date(e.startedAt).toISOString()}:{}}}}function tk(e,t=16){return e.ms>t}function nk(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}function rk(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 ik(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,t=16){let n=e.reduce((e,t)=>Math.max(e,t.ms),0);return Math.max(n,t*1.25)}function ok(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 sk={c:`component`,h:`hook`,r:`afterRender`,o:`output`};function ck(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 lk(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],ee=f>0&&m!==void 0&&ot.kind,dk=(e,t)=>t.name,fk=(e,t)=>t.name+`.`+t.input;function pk(e,t){e&1&&(R(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. `),z())}function mk(e,t){if(e&1&&(R(0,`tr`)(1,`td`),K(2),z(),R(3,`td`,6),K(4),z()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.count)}}function hk(e,t){if(e&1&&(R(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Trigger`),z(),R(5,`th`,5),K(6,`Cycles`),z()()(),R(7,`tbody`),M(8,mk,5,2,`tr`,null,uk),z()()),e&2){let e=W(2);D(8),N(e.causes())}}function gk(e,t){e&1&&(R(0,`p`,3),K(1,`No cycle has a cause yet.`),z())}function _k(e,t){if(e&1&&(R(0,`tr`)(1,`td`,7),K(2),z(),R(3,`td`,6),K(4),z(),R(5,`td`,7),K(6),z()()),e&2){let e=t.$implicit;D(2),q(e.name),D(2),q(e.ticks),D(2),q(e.tasks?.join(`, `))}}function vk(e,t){if(e&1&&(R(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Component`),z(),R(5,`th`,5),K(6,`Zone-only ticks`),z(),R(7,`th`,4),K(8,`After`),z()()(),R(9,`tbody`),M(10,_k,7,3,`tr`,null,dk),z()()),e&2){let e=W(3);D(10),N(e.zone())}}function yk(e,t){if(e&1&&(R(0,`p`,3),K(1),z()),e&2){let e=W(3);D(),q(e.zoneNote())}}function bk(e,t){if(e&1&&(R(0,`div`)(1,`h4`),K(2,`Depends on zone.js`),z(),A(3,vk,12,0,`table`)(4,yk,2,1,`p`,3),z()),e&2){let e=W(),t=W();D(3),j(t.zone().length?3:e.triggers?4:-1)}}function xk(e,t){e&1&&(R(0,`p`,3),K(1,`The page can't watch DOM updates, so wasted checks are not counted.`),z())}function Sk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,7),K(2),z(),R(3,`td`,6),K(4),z(),R(5,`td`,6),K(6),z(),R(7,`td`),K(8),z()()),e&2){let e=t.$implicit,n=W(3);D(2),q(e.name),D(2),q(e.refreshed),D(2),Y(``,e.unchanged,` (`,n.share(e.unchanged,e.refreshed),`)`),D(2),q(e.strategy??`Unknown`)}}function Ck(e,t){if(e&1&&(R(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Component`),z(),R(5,`th`,5),K(6,`Refreshed`),z(),R(7,`th`,5),K(8,`Changed nothing`),z(),R(9,`th`,4),K(10,`Strategy`),z()()(),R(11,`tbody`),M(12,Sk,9,5,`tr`,null,dk),z()()),e&2){let e=W(2);D(12),N(e.wasted())}}function wk(e,t){e&1&&(R(0,`p`,3),K(1,`Every refreshed check changed something.`),z())}function Tk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,7),K(2),z(),R(3,`td`,7),K(4),z(),R(5,`td`,6),K(6),z(),R(7,`td`,6),K(8),z()()),e&2){let e=t.$implicit;D(2),Y(``,e.name,`.`,e.input),D(2),q(e.parent??`Unknown`),D(2),q(e.inPlace),D(2),q(e.sameContents)}}function Ek(e,t){if(e&1&&(R(0,`h4`),K(1,`Inputs that break OnPush`),z(),R(2,`table`)(3,`thead`)(4,`tr`)(5,`th`,4),K(6,`Input`),z(),R(7,`th`,4),K(8,`Set by`),z(),R(9,`th`,5),K(10,`Changed in place`),z(),R(11,`th`,5),K(12,`Same contents, new reference`),z()()(),R(13,`tbody`),M(14,Tk,9,5,`tr`,null,fk),z()()),e&2){let e=W(2);D(14),N(e.inputs())}}function Dk(e,t){if(e&1&&(R(0,`li`),K(1),z()),e&2){let e=t.$implicit;D(),q(e.text)}}function Ok(e,t){if(e&1&&(R(0,`h4`),K(1,`Hints`),z(),R(2,`ul`,8),M(3,Dk,2,1,`li`,null,Zh),z()),e&2){let e=W(2);D(3),N(e.hints())}}function kk(e,t){if(e&1&&(R(0,`section`,0)(1,`h3`,1),K(2,`Why it ran and what it wasted`),z(),R(3,`div`,2)(4,`div`)(5,`h4`),K(6,`What started the cycles`),z(),A(7,pk,2,0,`p`,3)(8,hk,10,0,`table`)(9,gk,2,0,`p`,3),z(),A(10,bk,5,1,`div`),z(),R(11,`h4`),K(12,`Wasted checks`),z(),A(13,xk,2,0,`p`,3)(14,Ck,14,0,`table`)(15,wk,2,0,`p`,3),A(16,Ek,16,0),A(17,Ok,5,0),z()),e&2){let e=t,n=W();D(7),j(e.triggers?n.causes().length?8:9:7),D(3),j(n.hasZone()?10:-1),D(3),j(e.waste?n.wasted().length?14:15:13),D(3),j(n.inputs().length?16:-1),D(),j(n.hints().length?17:-1)}}var Ak=10,jk=class e{page=$(null);diagnosis=X(()=>this.page()?.diagnosis??null);causes=X(()=>{let e=this.diagnosis()?.causes??{};return jO.filter(t=>e[t]).map(t=>({kind:t,label:MO[t],count:e[t]}))});zone=X(()=>(this.diagnosis()?.zone??[]).slice(0,Ak));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,Ak));inputs=X(()=>(this.diagnosis()?.inputs??[]).slice(0,Ak));hints=X(()=>BO(this.diagnosis()??void 0).slice(0,Ak));share(e,t){return t?`${Math.round(e/t*100)}%`:`0%`}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&A(0,kk,18,5,`section`,0),e&2){let e;j((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; -}`]})},Mk=(e,t)=>t.cycle.id,Nk=(e,t)=>t.id;function Pk(e,t){if(e&1){let e=B();R(0,`button`,27),U(`click`,function(){return S(e),C(W().showAll())}),K(1,`Show all cycles`),z()}}function Fk(e,t){if(e&1&&sg(0,`div`,28),e&2){let e=t;Zg(`left`,e.left,`%`)(`width`,e.width,`%`)}}function Ik(e,t){if(e&1&&(R(0,`div`,29),sg(1,`span`,30),z()),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),V(`id`,n.optionId(e.index)),k(`data-index`,e.index)(`aria-selected`,n.inRange(e.index))(`aria-label`,e.label),D(),Zg(`height`,e.height,`%`)}}function Lk(e,t){e&1&&(R(0,`span`,33),K(1,`over budget`),z())}function Rk(e,t){if(e&1&&(R(0,`p`),K(1,` after `),R(2,`span`,35),K(3),z()()),e&2){let e=W();D(3),q(e.cycle.trigger)}}function zk(e,t){if(e&1&&(R(0,`p`,34)(1,`span`,36),K(2),z(),R(3,`span`),K(4),z()()),e&2){let e=t.$implicit,n=W(2);D(2),q(e.name),D(2),q(n.fmt(e.ms))}}function Bk(e,t){if(e&1&&(R(0,`div`,31)(1,`p`,32)(2,`strong`),K(3),z(),R(4,`span`),K(5),z(),A(6,Lk,2,0,`span`,33),z(),A(7,Rk,4,1,`p`),R(8,`p`),K(9),z(),M(10,zk,5,2,`p`,34,Yh),z()),e&2){let e=t,n=W();Zg(`left`,e.left)(`right`,e.right),D(3),q(n.fmt(e.cycle.ms)),D(2),J(`cycle `,e.cycle.id),D(),j(e.over?6:-1),D(),j(e.cycle.trigger?7:-1),D(2),b_(` `,e.cycle.checks,` `,e.cycle.checks===1?`check`:`checks`,`, `,e.cycle.passes,` `,e.cycle.passes===1?`pass`:`passes`,` `),D(),N(e.top)}}function Vk(e,t){if(e&1&&sg(0,`span`),e&2){let e=t.$implicit;G(`over`,e.over)}}function Hk(e,t){if(e&1&&K(0),e&2){let e=t,n=W(2);Y(` `,e.name,` (`,n.fmt(e.ms),`) `)}}function Uk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,37),K(2),z(),R(3,`td`,37),K(4),z(),R(5,`td`),K(6),z(),R(7,`td`,37),K(8),z(),R(9,`td`,37),K(10),z(),R(11,`td`,35),K(12),z(),R(13,`td`,35),A(14,Hk,1,2),z()()),e&2){let e,n=t.$implicit,r=W();D(2),q(n.id),D(2),q(r.fmt(n.ms)),D(2),q(r.isOver(n)?`Over`:`Within`),D(2),q(n.checks),D(2),q(n.passes),D(2),q(n.trigger??``),D(2),j((e=n.components[0])?14:-1,e)}}var Wk=0,Gk=80,Kk=10,qk=class e{cycles=$([]);range=av(null);slowMs=$(16);gapUntil=Gk;budgetLabel=X(()=>`${this.slowMs()} ms budget`);uid=`cd-chart-${Wk++}`;hintId=`${this.uid}-hint`;active=T(null);anchor=null;dragging=!1;hover=T(null);focused=T(!1);max=X(()=>ak(this.cycles(),this.slowMs()));budgetAt=X(()=>this.slowMs()/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:tk(t,this.slowMs()),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||ark(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=this.slowMs(),n=e.filter(e=>tk(e,t)).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`}`}. ${n} over the ${t} 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:tk(t,this.slowMs()),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}`,nk(e.ms)];tk(e,this.slowMs())&&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} ${nk(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+Kk;break;case`PageUp`:r=n-Kk;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=O({type:e,selectors:[[`app-cd-cycle-chart`]],hostBindings:function(e,t){e&1&&H(`pointerup`,function(){return t.endDrag()},xu)(`pointercancel`,function(){return t.endDrag()},xu)},inputs:{cycles:[1,`cycles`],range:[1,`range`],slowMs:[1,`slowMs`]},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&&(R(0,`div`,0)(1,`label`)(2,`span`),K(3,`Start`),z(),R(4,`input`,1),U(`change`,function(e){return t.setEnd(`from`,e)}),z()(),R(5,`label`)(6,`span`),K(7,`End`),z(),R(8,`input`,1),U(`change`,function(e){return t.setEnd(`to`,e)}),z()(),A(9,Pk,2,0,`button`,2),R(10,`p`,3),K(11),z()(),R(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. `),z(),R(14,`div`,5)(15,`div`,6)(16,`span`,7),K(17),z(),R(18,`span`,8),K(19,`0 ms`),z()(),R(20,`div`,9),A(21,Fk,1,4,`div`,10),R(22,`div`,11)(23,`span`),K(24),z()(),R(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)}),M(26,Ik,2,12,`div`,13,Mk),z(),A(28,Bk,12,12,`div`,14),z()(),R(29,`div`,15),M(30,Vk,1,2,`span`,16,Mk),z(),R(32,`ul`,17)(33,`li`),sg(34,`span`,18),K(35,`Within budget`),z(),R(36,`li`),sg(37,`span`,19)(38,`span`,20),K(39,`Over budget `),z(),R(40,`li`),sg(41,`span`,21),K(42),z()(),R(43,`details`,22)(44,`summary`),K(45,`Show the cycles as a table`),z(),R(46,`div`,23)(47,`table`)(48,`caption`,24),K(49),z(),R(50,`thead`)(51,`tr`)(52,`th`,25),K(53,`Cycle`),z(),R(54,`th`,25),K(55,`Duration`),z(),R(56,`th`,26),K(57,`Budget`),z(),R(58,`th`,25),K(59,`Checks`),z(),R(60,`th`,25),K(61,`Passes`),z(),R(62,`th`,26),K(63,`After`),z(),R(64,`th`,26),K(65,`Slowest component`),z()()(),R(66,`tbody`),M(67,Uk,15,7,`tr`,null,Nk),z()()()()),e&2){let e,n;D(4),V(`min`,t.firstId())(`max`,t.lastId())(`value`,t.startId()),D(4),V(`min`,t.firstId())(`max`,t.lastId())(`value`,t.endId()),D(),j(t.range()?9:-1),D(2),q(t.summary()),D(),V(`id`,t.hintId),D(2),G(`flush`,t.bars().length>t.gapUntil),D(3),q(t.fmt(t.max())),D(4),j((e=t.band())?21:-1,e),D(),Zg(`bottom`,t.budgetAt(),`%`),D(2),q(t.budgetLabel()),D(),k(`aria-label`,`Change detection cycles, `+t.summary())(`aria-describedby`,t.hintId)(`aria-activedescendant`,t.activeOptionId()),D(),N(t.bars()),D(2),j((n=t.tip())?28:-1,n),D(),G(`flush`,t.bars().length>t.gapUntil),D(),N(t.bars()),D(12),q(t.budgetLabel()),D(4),k(`aria-label`,t.tableLabel()),D(3),J(` `,t.tableLabel(),` `),D(18),N(t.selected())}},styles:[`[_nghost-%COMP%] { +}`]})},Mk=(e,t)=>t.cycle.id,Nk=(e,t)=>t.id;function Pk(e,t){if(e&1){let e=B();R(0,`button`,27),U(`click`,function(){return S(e),C(W().showAll())}),K(1,`Show all cycles`),z()}}function Fk(e,t){if(e&1&&lg(0,`div`,28),e&2){let e=t;$g(`left`,e.left,`%`)(`width`,e.width,`%`)}}function Ik(e,t){if(e&1&&(R(0,`div`,29),lg(1,`span`,30),z()),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),V(`id`,n.optionId(e.index)),k(`data-index`,e.index)(`aria-selected`,n.inRange(e.index))(`aria-label`,e.label),D(),$g(`height`,e.height,`%`)}}function Lk(e,t){e&1&&(R(0,`span`,33),K(1,`over budget`),z())}function Rk(e,t){if(e&1&&(R(0,`p`),K(1,` after `),R(2,`span`,35),K(3),z()()),e&2){let e=W();D(3),q(e.cycle.trigger)}}function zk(e,t){if(e&1&&(R(0,`p`,34)(1,`span`,36),K(2),z(),R(3,`span`),K(4),z()()),e&2){let e=t.$implicit,n=W(2);D(2),q(e.name),D(2),q(n.fmt(e.ms))}}function Bk(e,t){if(e&1&&(R(0,`div`,31)(1,`p`,32)(2,`strong`),K(3),z(),R(4,`span`),K(5),z(),A(6,Lk,2,0,`span`,33),z(),A(7,Rk,4,1,`p`),R(8,`p`),K(9),z(),M(10,zk,5,2,`p`,34,Zh),z()),e&2){let e=t,n=W();$g(`left`,e.left)(`right`,e.right),D(3),q(n.fmt(e.cycle.ms)),D(2),J(`cycle `,e.cycle.id),D(),j(e.over?6:-1),D(),j(e.cycle.trigger?7:-1),D(2),S_(` `,e.cycle.checks,` `,e.cycle.checks===1?`check`:`checks`,`, `,e.cycle.passes,` `,e.cycle.passes===1?`pass`:`passes`,` `),D(),N(e.top)}}function Vk(e,t){if(e&1&&lg(0,`span`),e&2){let e=t.$implicit;G(`over`,e.over)}}function Hk(e,t){if(e&1&&K(0),e&2){let e=t,n=W(2);Y(` `,e.name,` (`,n.fmt(e.ms),`) `)}}function Uk(e,t){if(e&1&&(R(0,`tr`)(1,`td`,37),K(2),z(),R(3,`td`,37),K(4),z(),R(5,`td`),K(6),z(),R(7,`td`,37),K(8),z(),R(9,`td`,37),K(10),z(),R(11,`td`,35),K(12),z(),R(13,`td`,35),A(14,Hk,1,2),z()()),e&2){let e,n=t.$implicit,r=W();D(2),q(n.id),D(2),q(r.fmt(n.ms)),D(2),q(r.isOver(n)?`Over`:`Within`),D(2),q(n.checks),D(2),q(n.passes),D(2),q(n.trigger??``),D(2),j((e=n.components[0])?14:-1,e)}}var Wk=0,Gk=80,Kk=10,qk=class e{cycles=$([]);range=sv(null);slowMs=$(16);gapUntil=Gk;budgetLabel=X(()=>`${this.slowMs()} ms budget`);uid=`cd-chart-${Wk++}`;hintId=`${this.uid}-hint`;active=T(null);anchor=null;dragging=!1;hover=T(null);focused=T(!1);max=X(()=>ak(this.cycles(),this.slowMs()));budgetAt=X(()=>this.slowMs()/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:tk(t,this.slowMs()),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||ark(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=this.slowMs(),n=e.filter(e=>tk(e,t)).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`}`}. ${n} over the ${t} 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:tk(t,this.slowMs()),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}`,nk(e.ms)];tk(e,this.slowMs())&&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} ${nk(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+Kk;break;case`PageUp`:r=n-Kk;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=O({type:e,selectors:[[`app-cd-cycle-chart`]],hostBindings:function(e,t){e&1&&H(`pointerup`,function(){return t.endDrag()},Cu)(`pointercancel`,function(){return t.endDrag()},Cu)},inputs:{cycles:[1,`cycles`],range:[1,`range`],slowMs:[1,`slowMs`]},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&&(R(0,`div`,0)(1,`label`)(2,`span`),K(3,`Start`),z(),R(4,`input`,1),U(`change`,function(e){return t.setEnd(`from`,e)}),z()(),R(5,`label`)(6,`span`),K(7,`End`),z(),R(8,`input`,1),U(`change`,function(e){return t.setEnd(`to`,e)}),z()(),A(9,Pk,2,0,`button`,2),R(10,`p`,3),K(11),z()(),R(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. `),z(),R(14,`div`,5)(15,`div`,6)(16,`span`,7),K(17),z(),R(18,`span`,8),K(19,`0 ms`),z()(),R(20,`div`,9),A(21,Fk,1,4,`div`,10),R(22,`div`,11)(23,`span`),K(24),z()(),R(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)}),M(26,Ik,2,12,`div`,13,Mk),z(),A(28,Bk,12,12,`div`,14),z()(),R(29,`div`,15),M(30,Vk,1,2,`span`,16,Mk),z(),R(32,`ul`,17)(33,`li`),lg(34,`span`,18),K(35,`Within budget`),z(),R(36,`li`),lg(37,`span`,19)(38,`span`,20),K(39,`Over budget `),z(),R(40,`li`),lg(41,`span`,21),K(42),z()(),R(43,`details`,22)(44,`summary`),K(45,`Show the cycles as a table`),z(),R(46,`div`,23)(47,`table`)(48,`caption`,24),K(49),z(),R(50,`thead`)(51,`tr`)(52,`th`,25),K(53,`Cycle`),z(),R(54,`th`,25),K(55,`Duration`),z(),R(56,`th`,26),K(57,`Budget`),z(),R(58,`th`,25),K(59,`Checks`),z(),R(60,`th`,25),K(61,`Passes`),z(),R(62,`th`,26),K(63,`After`),z(),R(64,`th`,26),K(65,`Slowest component`),z()()(),R(66,`tbody`),M(67,Uk,15,7,`tr`,null,Nk),z()()()()),e&2){let e,n;D(4),V(`min`,t.firstId())(`max`,t.lastId())(`value`,t.startId()),D(4),V(`min`,t.firstId())(`max`,t.lastId())(`value`,t.endId()),D(),j(t.range()?9:-1),D(2),q(t.summary()),D(),V(`id`,t.hintId),D(2),G(`flush`,t.bars().length>t.gapUntil),D(3),q(t.fmt(t.max())),D(4),j((e=t.band())?21:-1,e),D(),$g(`bottom`,t.budgetAt(),`%`),D(2),q(t.budgetLabel()),D(),k(`aria-label`,`Change detection cycles, `+t.summary())(`aria-describedby`,t.hintId)(`aria-activedescendant`,t.activeOptionId()),D(),N(t.bars()),D(2),j((n=t.tip())?28:-1,n),D(),G(`flush`,t.bars().length>t.gapUntil),D(),N(t.bars()),D(12),q(t.budgetLabel()),D(4),k(`aria-label`,t.tableLabel()),D(3),J(` `,t.tableLabel(),` `),D(18),N(t.selected())}},styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1335,7 +1335,7 @@ td.mono[_ngcontent-%COMP%] { .bar[_ngcontent-%COMP%] { transition: none; } -}`]})},Jk=(e,t)=>t.id,Yk=(e,t)=>t.index,Xk=(e,t)=>t.kind;function Zk(e,t){if(e&1&&(R(0,`p`,0),K(1),z()),e&2){let e=W(2);D(),Y(` Pick `,e.max,` cycles or fewer to see their spans. `,e.count(),` are picked. `)}}function Qk(e,t){if(e&1&&(R(0,`span`),K(1),z()),e&2){let e=t.$implicit;Zg(`left`,e.x,`%`)(`width`,e.w,`%`),D(),J(`cycle `,e.id)}}function $k(e,t){if(e&1){let e=B();R(0,`button`,11),U(`focus`,function(){let t=S(e).$implicit;return C(W(3).current.set(t.index))})(`mouseenter`,function(){let t=S(e).$implicit;return C(W(3).hover.set(t.index))})(`mouseleave`,function(){return S(e),C(W(3).hover.set(null))})(`click`,function(){let t=S(e).$implicit;return C(W(3).choose(t))}),R(1,`span`,12),K(2),z()()}if(e&2){let e=t.$implicit,n=W(3);Qg(k_(`block kind-`,e.kind)),Zg(`left`,e.x,`%`)(`width`,e.w,`%`)(`top`,e.depth*n.row,`px`),G(`narrow`,e.w<4),k(`tabindex`,e.index===n.tabStop()?0:-1)(`data-index`,e.index)(`aria-label`,n.describe(e))(`aria-disabled`,e.component?null:`true`),D(2),q(e.name)}}function eA(e,t){if(e&1&&(R(0,`li`),sg(1,`span`,13),K(2),z()),e&2){let e=t.$implicit;D(),Qg(k_(`key kind-`,e.kind)),D(),q(e.label)}}function tA(e,t){if(e&1&&(R(0,`p`,0),K(1),z()),e&2){let e=W(3);D(),Y(` Each cycle keeps its longest spans. `,e.dropped(),` shorter `,e.dropped()===1?`span was`:`spans were`,` left out. `)}}function nA(e,t){if(e&1&&(R(0,`tr`)(1,`td`,17),K(2),z(),R(3,`td`,18),K(4),z(),R(5,`td`),K(6),z(),R(7,`td`,17),K(8),z(),R(9,`td`,17),K(10),z(),R(11,`td`,17),K(12),z(),R(13,`td`,17),K(14),z()()),e&2){let e=t.$implicit,n=W(4);D(2),q(e.cycleId),D(),Zg(`padding-left`,6+e.depth*8,`px`),D(),q(e.name),D(2),q(n.kindLabel(e)),D(2),q(e.depth),D(2),q(n.fmt(e.start)),D(2),q(n.fmt(e.ms)),D(2),q(n.fmt(e.selfMs))}}function rA(e,t){if(e&1&&(R(0,`div`,10)(1,`table`)(2,`caption`,14),K(3),z(),R(4,`thead`)(5,`tr`)(6,`th`,15),K(7,`Cycle`),z(),R(8,`th`,16),K(9,`Span`),z(),R(10,`th`,16),K(11,`Kind`),z(),R(12,`th`,15),K(13,`Depth`),z(),R(14,`th`,15),K(15,`Start`),z(),R(16,`th`,15),K(17,`Total`),z(),R(18,`th`,15),K(19,`Self`),z()()(),R(20,`tbody`),M(21,nA,15,9,`tr`,null,Yk),z()()()),e&2){let e=W(),t=W(2);k(`aria-label`,t.tableLabel()),D(3),J(` `,t.tableLabel(),` `),D(18),N(e.blocks)}}function iA(e,t){if(e&1){let e=B();R(0,`div`,1),U(`keydown`,function(t){return S(e),C(W(2).onKey(t))}),R(1,`div`,2),M(2,Qk,2,5,`span`,3,Jk),z(),R(4,`div`,4),M(5,$k,3,16,`button`,5,Yk),z()(),R(7,`p`,6),K(8),z(),R(9,`ul`,7),M(10,eA,3,4,`li`,null,Xk),z(),R(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. `),z(),A(14,tA,2,2,`p`,0),R(15,`details`,9),U(`toggle`,function(t){return S(e),C(W(2).onToggle(t))}),R(16,`summary`),K(17,`Show the spans as a table`),z(),A(18,rA,23,2,`div`,10),z()}if(e&2){let e=t,n=W(2);k(`aria-label`,n.label()),D(2),N(e.cycles),D(2),Zg(`height`,e.depth*n.row,`px`),D(),N(e.blocks),D(3),q(n.readout()),D(2),N(n.kinds),D(4),j(n.dropped()?14:-1),D(4),j(n.tableOpen()?18:-1)}}function aA(e,t){if(e&1&&(R(0,`h3`),K(1,`Spans in the picked cycles`),z(),A(2,Zk,2,2,`p`,0)(3,iA,19,6)),e&2){let e,t=W();D(2),j(t.tooMany()?2:(e=t.graph())?3:-1,e)}}var oA=22;function sA(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return e[n]}var cA=class e{cycles=$([]);names=$([]);scope=$(`the recording`);pick=ev();row=oA;max=30;kinds=[`c`,`h`,`r`,`o`].map(e=>({kind:e,label:sk[e]}));current=T(0);tableOpen=T(!1);hover=T(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:lk(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 nk(e)}kindLabel(e){return sk[e.kind]}onToggle(e){this.tableOpen.set(e.target.open)}describe(e){let t=[e.name,sk[e.kind],`${nk(e.ms)} total`];return e.selfMs!==e.ms&&t.push(`${nk(e.selfMs)} self`),t.push(e.start<0?`cycle ${e.cycleId}, ${nk(-e.start)} before it started`:`cycle ${e.cycleId} at ${nk(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=sA(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=O({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&&A(0,aA,4,1),e&2&&j(t.hasSpans()?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})},Jk=(e,t)=>t.id,Yk=(e,t)=>t.index,Xk=(e,t)=>t.kind;function Zk(e,t){if(e&1&&(R(0,`p`,0),K(1),z()),e&2){let e=W(2);D(),Y(` Pick `,e.max,` cycles or fewer to see their spans. `,e.count(),` are picked. `)}}function Qk(e,t){if(e&1&&(R(0,`span`),K(1),z()),e&2){let e=t.$implicit;$g(`left`,e.x,`%`)(`width`,e.w,`%`),D(),J(`cycle `,e.id)}}function $k(e,t){if(e&1){let e=B();R(0,`button`,11),U(`focus`,function(){let t=S(e).$implicit;return C(W(3).current.set(t.index))})(`mouseenter`,function(){let t=S(e).$implicit;return C(W(3).hover.set(t.index))})(`mouseleave`,function(){return S(e),C(W(3).hover.set(null))})(`click`,function(){let t=S(e).$implicit;return C(W(3).choose(t))}),R(1,`span`,12),K(2),z()()}if(e&2){let e=t.$implicit,n=W(3);e_(j_(`block kind-`,e.kind)),$g(`left`,e.x,`%`)(`width`,e.w,`%`)(`top`,e.depth*n.row,`px`),G(`narrow`,e.w<4),k(`tabindex`,e.index===n.tabStop()?0:-1)(`data-index`,e.index)(`aria-label`,n.describe(e))(`aria-disabled`,e.component?null:`true`),D(2),q(e.name)}}function eA(e,t){if(e&1&&(R(0,`li`),lg(1,`span`,13),K(2),z()),e&2){let e=t.$implicit;D(),e_(j_(`key kind-`,e.kind)),D(),q(e.label)}}function tA(e,t){if(e&1&&(R(0,`p`,0),K(1),z()),e&2){let e=W(3);D(),Y(` Each cycle keeps its longest spans. `,e.dropped(),` shorter `,e.dropped()===1?`span was`:`spans were`,` left out. `)}}function nA(e,t){if(e&1&&(R(0,`tr`)(1,`td`,17),K(2),z(),R(3,`td`,18),K(4),z(),R(5,`td`),K(6),z(),R(7,`td`,17),K(8),z(),R(9,`td`,17),K(10),z(),R(11,`td`,17),K(12),z(),R(13,`td`,17),K(14),z()()),e&2){let e=t.$implicit,n=W(4);D(2),q(e.cycleId),D(),$g(`padding-left`,6+e.depth*8,`px`),D(),q(e.name),D(2),q(n.kindLabel(e)),D(2),q(e.depth),D(2),q(n.fmt(e.start)),D(2),q(n.fmt(e.ms)),D(2),q(n.fmt(e.selfMs))}}function rA(e,t){if(e&1&&(R(0,`div`,10)(1,`table`)(2,`caption`,14),K(3),z(),R(4,`thead`)(5,`tr`)(6,`th`,15),K(7,`Cycle`),z(),R(8,`th`,16),K(9,`Span`),z(),R(10,`th`,16),K(11,`Kind`),z(),R(12,`th`,15),K(13,`Depth`),z(),R(14,`th`,15),K(15,`Start`),z(),R(16,`th`,15),K(17,`Total`),z(),R(18,`th`,15),K(19,`Self`),z()()(),R(20,`tbody`),M(21,nA,15,9,`tr`,null,Yk),z()()()),e&2){let e=W(),t=W(2);k(`aria-label`,t.tableLabel()),D(3),J(` `,t.tableLabel(),` `),D(18),N(e.blocks)}}function iA(e,t){if(e&1){let e=B();R(0,`div`,1),U(`keydown`,function(t){return S(e),C(W(2).onKey(t))}),R(1,`div`,2),M(2,Qk,2,5,`span`,3,Jk),z(),R(4,`div`,4),M(5,$k,3,16,`button`,5,Yk),z()(),R(7,`p`,6),K(8),z(),R(9,`ul`,7),M(10,eA,3,4,`li`,null,Xk),z(),R(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. `),z(),A(14,tA,2,2,`p`,0),R(15,`details`,9),U(`toggle`,function(t){return S(e),C(W(2).onToggle(t))}),R(16,`summary`),K(17,`Show the spans as a table`),z(),A(18,rA,23,2,`div`,10),z()}if(e&2){let e=t,n=W(2);k(`aria-label`,n.label()),D(2),N(e.cycles),D(2),$g(`height`,e.depth*n.row,`px`),D(),N(e.blocks),D(3),q(n.readout()),D(2),N(n.kinds),D(4),j(n.dropped()?14:-1),D(4),j(n.tableOpen()?18:-1)}}function aA(e,t){if(e&1&&(R(0,`h3`),K(1,`Spans in the picked cycles`),z(),A(2,Zk,2,2,`p`,0)(3,iA,19,6)),e&2){let e,t=W();D(2),j(t.tooMany()?2:(e=t.graph())?3:-1,e)}}var oA=22;function sA(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return e[n]}var cA=class e{cycles=$([]);names=$([]);scope=$(`the recording`);pick=nv();row=oA;max=30;kinds=[`c`,`h`,`r`,`o`].map(e=>({kind:e,label:sk[e]}));current=T(0);tableOpen=T(!1);hover=T(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:lk(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 nk(e)}kindLabel(e){return sk[e.kind]}onToggle(e){this.tableOpen.set(e.target.open)}describe(e){let t=[e.name,sk[e.kind],`${nk(e.ms)} total`];return e.selfMs!==e.ms&&t.push(`${nk(e.selfMs)} self`),t.push(e.start<0?`cycle ${e.cycleId}, ${nk(-e.start)} before it started`:`cycle ${e.cycleId} at ${nk(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=sA(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=O({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&&A(0,aA,4,1),e&2&&j(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 lA(e,t){if(e&1&&(R(0,`tr`)(1,`td`,5),K(2),z(),R(3,`td`,6),K(4),z(),R(5,`td`,6),K(6),z(),R(7,`td`,6),K(8),z()()),e&2){let e=t.$implicit,n=W(3);D(2),Y(``,e.name,`.`,e.hook),D(2),q(e.calls),D(2),q(n.ms(e.ms)),D(2),q(n.ms(e.maxMs))}}function uA(e,t){if(e&1&&(R(0,`div`)(1,`h3`),K(2,`Lifecycle hooks`),z(),R(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),K(7,`Hook`),z(),R(8,`th`,4),K(9,`Calls`),z(),R(10,`th`,4),K(11,`Time`),z(),R(12,`th`,4),K(13,`Slowest`),z()()(),R(14,`tbody`),M(15,lA,9,5,`tr`,null,Yh),z()()()),e&2){let e=W(2);D(15),N(e.hooks())}}function dA(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` (`,e.listener,`) `)}}function fA(e,t){if(e&1&&(R(0,`tr`)(1,`td`,5),K(2),A(3,dA,1,1),z(),R(4,`td`,6),K(5),z(),R(6,`td`,6),K(7),z(),R(8,`td`,6),K(9),z()()),e&2){let e=t.$implicit,n=W(3);D(2),J(` `,e.name,` `),D(),j(e.listener?3:-1),D(2),q(e.calls),D(2),q(n.ms(e.ms)),D(2),q(n.ms(e.maxMs))}}function pA(e,t){if(e&1&&(R(0,`div`)(1,`h3`),K(2,`Output listeners`),z(),R(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),K(7,`Listener`),z(),R(8,`th`,4),K(9,`Calls`),z(),R(10,`th`,4),K(11,`Time`),z(),R(12,`th`,4),K(13,`Slowest`),z()()(),R(14,`tbody`),M(15,fA,10,5,`tr`,null,Yh),z()()()),e&2){let e=W(2);D(15),N(e.outputs())}}function mA(e,t){if(e&1&&(R(0,`p`,1),K(1),z()),e&2){let e=t,n=W(2);D(),b_(` afterRender callbacks ran `,e.runs,` `,e.runs===1?`time`:`times`,`, `,n.ms(e.ms),` in total, slowest `,n.ms(e.maxMs),`. `)}}function hA(e,t){if(e&1&&(R(0,`p`,2),K(1),z()),e&2){let e=W(2);D(),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 gA(e,t){if(e&1&&(R(0,`div`,0),A(1,uA,17,0,`div`),A(2,pA,17,0,`div`),z(),A(3,mA,2,4,`p`,1),A(4,hA,2,2,`p`,2)),e&2){let e,t=W();D(),j(t.hooks().length?1:-1),D(),j(t.outputs().length?2:-1),D(),j((e=t.afterRender())?3:-1,e),D(),j(t.dropped()?4:-1)}}var _A=10;function vA(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}var yA=class e{page=$(null);hooks=X(()=>(this.page()?.hooks??[]).slice(0,_A));outputs=X(()=>(this.page()?.outputs??[]).slice(0,_A));afterRender=X(()=>{let e=this.page()?.afterRender;return e?.runs?e:null});dropped=X(()=>this.page()?.droppedTimings??0);ms(e){return vA(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&A(0,gA,5,4),e&2&&j(t.hooks().length||t.outputs().length||t.afterRender()?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})};function lA(e,t){if(e&1&&(R(0,`tr`)(1,`td`,5),K(2),z(),R(3,`td`,6),K(4),z(),R(5,`td`,6),K(6),z(),R(7,`td`,6),K(8),z()()),e&2){let e=t.$implicit,n=W(3);D(2),Y(``,e.name,`.`,e.hook),D(2),q(e.calls),D(2),q(n.ms(e.ms)),D(2),q(n.ms(e.maxMs))}}function uA(e,t){if(e&1&&(R(0,`div`)(1,`h3`),K(2,`Lifecycle hooks`),z(),R(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),K(7,`Hook`),z(),R(8,`th`,4),K(9,`Calls`),z(),R(10,`th`,4),K(11,`Time`),z(),R(12,`th`,4),K(13,`Slowest`),z()()(),R(14,`tbody`),M(15,lA,9,5,`tr`,null,Zh),z()()()),e&2){let e=W(2);D(15),N(e.hooks())}}function dA(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` (`,e.listener,`) `)}}function fA(e,t){if(e&1&&(R(0,`tr`)(1,`td`,5),K(2),A(3,dA,1,1),z(),R(4,`td`,6),K(5),z(),R(6,`td`,6),K(7),z(),R(8,`td`,6),K(9),z()()),e&2){let e=t.$implicit,n=W(3);D(2),J(` `,e.name,` `),D(),j(e.listener?3:-1),D(2),q(e.calls),D(2),q(n.ms(e.ms)),D(2),q(n.ms(e.maxMs))}}function pA(e,t){if(e&1&&(R(0,`div`)(1,`h3`),K(2,`Output listeners`),z(),R(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),K(7,`Listener`),z(),R(8,`th`,4),K(9,`Calls`),z(),R(10,`th`,4),K(11,`Time`),z(),R(12,`th`,4),K(13,`Slowest`),z()()(),R(14,`tbody`),M(15,fA,10,5,`tr`,null,Zh),z()()()),e&2){let e=W(2);D(15),N(e.outputs())}}function mA(e,t){if(e&1&&(R(0,`p`,1),K(1),z()),e&2){let e=t,n=W(2);D(),S_(` afterRender callbacks ran `,e.runs,` `,e.runs===1?`time`:`times`,`, `,n.ms(e.ms),` in total, slowest `,n.ms(e.maxMs),`. `)}}function hA(e,t){if(e&1&&(R(0,`p`,2),K(1),z()),e&2){let e=W(2);D(),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 gA(e,t){if(e&1&&(R(0,`div`,0),A(1,uA,17,0,`div`),A(2,pA,17,0,`div`),z(),A(3,mA,2,4,`p`,1),A(4,hA,2,2,`p`,2)),e&2){let e,t=W();D(),j(t.hooks().length?1:-1),D(),j(t.outputs().length?2:-1),D(),j((e=t.afterRender())?3:-1,e),D(),j(t.dropped()?4:-1)}}var _A=10;function vA(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}var yA=class e{page=$(null);hooks=X(()=>(this.page()?.hooks??[]).slice(0,_A));outputs=X(()=>(this.page()?.outputs??[]).slice(0,_A));afterRender=X(()=>{let e=this.page()?.afterRender;return e?.runs?e:null});dropped=X(()=>this.page()?.droppedTimings??0);ms(e){return vA(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({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&&A(0,gA,5,4),e&2&&j(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 bA(e,t){if(e&1&&(R(0,`p`,5),K(1),z()),e&2){let e=W();D(),q(e.error())}}function xA(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 SA=class e{page=$(null);maxCycles=$(200);imported=ev();error=T(``);hasCycles(){return(this.page()?.cycles.length??0)>0}exportJson(){let e=this.page();e&&xA(qO(e,e.pageId),`change-detection-${e.pageId}.json`)}exportTrace(){let e=this.page();e&&xA(ek(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=JO(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=O({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=B();R(0,`div`,1)(1,`button`,2),U(`click`,function(){return t.exportJson()}),K(2,`Export JSON`),z(),R(3,`button`,2),U(`click`,function(){return t.exportTrace()}),K(4,` Export trace (Perfetto) `),z(),R(5,`button`,3),U(`click`,function(){return S(e),C(Ag(8).click())}),K(6,`Import`),z(),R(7,`input`,4,0),U(`change`,function(){S(e);let n=Ag(8);return C(t.read(n))}),z()(),A(9,bA,2,1,`p`,5)}e&2&&(D(),V(`disabled`,!t.hasCycles()),D(2),V(`disabled`,!t.hasCycles()),D(6),j(t.error()?9:-1))},styles:[`[_nghost-%COMP%] { +}`]})};function bA(e,t){if(e&1&&(R(0,`p`,5),K(1),z()),e&2){let e=W();D(),q(e.error())}}function xA(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 SA=class e{page=$(null);maxCycles=$(200);imported=nv();error=T(``);hasCycles(){return(this.page()?.cycles.length??0)>0}exportJson(){let e=this.page();e&&xA(qO(e,e.pageId),`change-detection-${e.pageId}.json`)}exportTrace(){let e=this.page();e&&xA(ek(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=JO(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=O({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=B();R(0,`div`,1)(1,`button`,2),U(`click`,function(){return t.exportJson()}),K(2,`Export JSON`),z(),R(3,`button`,2),U(`click`,function(){return t.exportTrace()}),K(4,` Export trace (Perfetto) `),z(),R(5,`button`,3),U(`click`,function(){return S(e),C(Mg(8).click())}),K(6,`Import`),z(),R(7,`input`,4,0),U(`change`,function(){S(e);let n=Mg(8);return C(t.read(n))}),z()(),A(9,bA,2,1,`p`,5)}e&2&&(D(),V(`disabled`,!t.hasCycles()),D(2),V(`disabled`,!t.hasCycles()),D(6),j(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; -}`]})},CA=(e,t)=>t.stat.name;function wA(e,t){if(e&1&&(R(0,`span`,8),K(1),z()),e&2){let e=W(2).$implicit;D(),J(``,e.other,` more`)}}function TA(e,t){if(e&1&&(R(0,`div`,6)(1,`span`,7),K(2),z(),A(3,wA,2,1,`span`,8),z()),e&2){let e=W().$implicit;Zg(`--%NS%tone`,e.tone+`%`),D(2),q(e.label),D(),j(e.roomy?3:-1)}}function EA(e,t){if(e&1&&(R(0,`span`,10),K(1),z(),R(2,`span`,11),K(3),z()),e&2){let e=W(2).$implicit,t=W(2);D(),q(e.stat.name),D(2),q(t.fmt(e.stat.ms))}}function DA(e,t){if(e&1){let e=B();R(0,`button`,9),U(`focus`,function(){S(e);let t=W().$index;return C(W(2).current.set(t))})(`click`,function(){S(e);let t=W().$implicit;return C(W(2).pick.emit(t.stat.name))}),A(1,EA,4,2),z()}if(e&2){let e=W(),t=e.$implicit,n=e.$index,r=W(2);Zg(`--%NS%tone`,t.tone+`%`),k(`tabindex`,n===r.tabStop()?0:-1)(`aria-label`,t.label)(`data-index`,n),D(),j(t.roomy?1:-1)}}function OA(e,t){if(e&1&&(R(0,`li`),A(1,TA,4,4,`div`,4)(2,DA,2,6,`button`,5),z()),e&2){let e=t.$implicit;Zg(`left`,e.x,`%`)(`top`,e.y,`%`)(`width`,e.w,`%`)(`height`,e.h,`%`),D(),j(e.other?1:2)}}function kA(e,t){if(e&1){let e=B();R(0,`ul`,2),U(`keydown`,function(t){return S(e),C(W().onKey(t))}),M(1,OA,3,9,`li`,3,CA),z()}if(e&2){let e=W();k(`aria-label`,e.label()),D(),N(e.cells())}}function AA(e,t){e&1&&(R(0,`p`,1),K(1,`No component time in these cycles.`),z())}var jA=24,MA=3,NA=class e{stats=$([]);scope=$(`the recording`);pick=ev();current=T(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,jA),n=e.slice(jA),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=ok(i,e=>e.stat.ms,MA);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, ${nk(t.ms)}, ${r}% of self time`:`${t.name}, ${nk(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 nk(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=O({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&&A(0,kA,3,1,`ul`,0)(1,AA,2,0,`p`,1),e&2&&j(+!t.cells().length)},styles:[`[_nghost-%COMP%] { +}`]})},CA=(e,t)=>t.stat.name;function wA(e,t){if(e&1&&(R(0,`span`,8),K(1),z()),e&2){let e=W(2).$implicit;D(),J(``,e.other,` more`)}}function TA(e,t){if(e&1&&(R(0,`div`,6)(1,`span`,7),K(2),z(),A(3,wA,2,1,`span`,8),z()),e&2){let e=W().$implicit;$g(`--%NS%tone`,e.tone+`%`),D(2),q(e.label),D(),j(e.roomy?3:-1)}}function EA(e,t){if(e&1&&(R(0,`span`,10),K(1),z(),R(2,`span`,11),K(3),z()),e&2){let e=W(2).$implicit,t=W(2);D(),q(e.stat.name),D(2),q(t.fmt(e.stat.ms))}}function DA(e,t){if(e&1){let e=B();R(0,`button`,9),U(`focus`,function(){S(e);let t=W().$index;return C(W(2).current.set(t))})(`click`,function(){S(e);let t=W().$implicit;return C(W(2).pick.emit(t.stat.name))}),A(1,EA,4,2),z()}if(e&2){let e=W(),t=e.$implicit,n=e.$index,r=W(2);$g(`--%NS%tone`,t.tone+`%`),k(`tabindex`,n===r.tabStop()?0:-1)(`aria-label`,t.label)(`data-index`,n),D(),j(t.roomy?1:-1)}}function OA(e,t){if(e&1&&(R(0,`li`),A(1,TA,4,4,`div`,4)(2,DA,2,6,`button`,5),z()),e&2){let e=t.$implicit;$g(`left`,e.x,`%`)(`top`,e.y,`%`)(`width`,e.w,`%`)(`height`,e.h,`%`),D(),j(e.other?1:2)}}function kA(e,t){if(e&1){let e=B();R(0,`ul`,2),U(`keydown`,function(t){return S(e),C(W().onKey(t))}),M(1,OA,3,9,`li`,3,CA),z()}if(e&2){let e=W();k(`aria-label`,e.label()),D(),N(e.cells())}}function AA(e,t){e&1&&(R(0,`p`,1),K(1,`No component time in these cycles.`),z())}var jA=24,MA=3,NA=class e{stats=$([]);scope=$(`the recording`);pick=nv();current=T(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,jA),n=e.slice(jA),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=ok(i,e=>e.stat.ms,MA);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, ${nk(t.ms)}, ${r}% of self time`:`${t.name}, ${nk(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 nk(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=O({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&&A(0,kA,3,1,`ul`,0)(1,AA,2,0,`p`,1),e&2&&j(+!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); -}`]})},PA=(e,t)=>t.id;function FA(e,t){if(e&1){let e=B();F(0,`button`,14),H(`click`,function(){return S(e),C(W(2).clear())}),K(1,`Clear`),I()}}function IA(e,t){if(e&1){let e=B();F(0,`button`,11),H(`click`,function(){return S(e),C(W().toggle())}),L(1,`span`,12),K(2),I(),A(3,FA,2,0,`button`,13)}if(e&2){let e=W();G(`on`,e.recording()),P(`disabled`,!e.pageId()),D(2),J(` `,e.recording()?`Stop recording`:`Record`,` `),D(),j(e.cycles().length?3:-1)}}function LA(e,t){if(e&1){let e=B();F(0,`p`,6)(1,`span`,15),K(2,`Imported recording`),I(),F(3,`span`,16),K(4),I(),F(5,`button`,14),H(`click`,function(){return S(e),C(W().closeImport())}),K(6,`Back to live recording`),I()()}e&2&&(D(4),q(t.fileName))}function RA(e,t){e&1&&K(0,` An app on a device has no DOM, so checks that changed nothing are not counted there. `)}function zA(e,t){e&1&&K(0,` A recording keeps running when the tab reloads, so it catches the next start of the app. The cycles from before the reload are gone with the old page. `)}function BA(e,t){e&1&&(F(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. `),I())}function VA(e,t){e&1&&L(0,`app-angular-unavailable`,17),e&2&&P(`page`,W(2).angularPage())}function HA(e,t){e&1&&A(0,BA,2,0,`p`,9)(1,VA,1,1,`app-angular-unavailable`,17),e&2&&j(+!W().attachPending())}function UA(e,t){e&1&&(F(0,`p`,9),K(1,`Angular profiling stays on until the page reloads.`),I())}function WA(e,t){e&1&&L(0,`app-angular-unavailable`,21),e&2&&P(`page`,W(2).angularPage())}function GA(e,t){if(e&1){let e=B();F(0,`div`,18)(1,`span`,19),K(2,`Live views`),I(),F(3,`button`,20),H(`click`,function(){S(e);let t=W();return C(t.setView(`flash`,!t.views().flash))}),L(4,`span`,12),K(5,` Flash checks `),I(),F(6,`button`,20),H(`click`,function(){S(e);let t=W();return C(t.setView(`track`,!t.views().track))}),L(7,`span`,12),K(8,` Performance track `),I(),F(9,`button`,20),H(`click`,function(){return S(e),C(W().setView(`angularProfiling`,!0))}),L(10,`span`,12),K(11,` Angular profiling `),I()(),F(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. `),I(),A(14,UA,2,0,`p`,9)(15,WA,1,1,`app-angular-unavailable`,21)}if(e&2){let e=W();D(3),P(`disabled`,!e.canShowViews()),k(`aria-pressed`,e.views().flash),D(3),P(`disabled`,!e.canShowViews()),k(`aria-pressed`,e.views().track),D(3),P(`disabled`,!e.canShowViews()||e.views().angularProfiling||!e.views().angularProfilingAvailable),k(`aria-pressed`,e.views().angularProfiling),D(5),j(e.views().angularProfiling?14:e.views().angularProfilingAvailable?-1:15)}}function KA(e,t){if(e&1&&(F(0,`p`,9),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function qA(e,t){if(e&1&&(F(0,`p`,24),K(1),I()),e&2){let e=W(2);D(),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 JA(e,t){e&1&&(F(0,`p`,9),K(1,` For picked cycles, totals come from the 10 slowest components each cycle lists. `),I())}function YA(e,t){if(e&1){let e=B();F(0,`h3`),K(1,`Cycles`),I(),F(2,`app-cd-cycle-chart`,22),w_(`rangeChange`,function(t){S(e);let n=W();return C_(n.range,t)||(n.range=t),C(t)}),I(),F(3,`app-cd-flame-graph`,23),H(`pick`,function(t){return S(e),C(W().showComponent.emit(t))}),I(),A(4,qA,2,1,`p`,24),F(5,`h3`),K(6,`Self time by component`),I(),A(7,JA,2,0,`p`,9),F(8,`app-cd-treemap`,25),H(`pick`,function(t){return S(e),C(W().showComponent.emit(t))}),I()}if(e&2){let e=W();D(2),P(`cycles`,e.cycles())(`slowMs`,e.slowMs()),S_(`range`,e.range),D(),P(`cycles`,e.picked())(`names`,e.spanNames())(`scope`,e.scope()),D(),j(e.hasSpans()?-1:4),D(3),j(e.range()?7:-1),D(),P(`stats`,e.stats())(`scope`,e.scope())}}function XA(e,t){if(e&1){let e=B();F(0,`tr`)(1,`td`,16)(2,`button`,31),H(`click`,function(){let t=S(e).$implicit;return C(W(2).showComponent.emit(t.name))}),K(3),I()(),F(4,`td`,32),K(5),I(),F(6,`td`,32),K(7),I(),F(8,`td`,32),K(9),I()()}if(e&2){let e=t.$implicit,n=W(2);D(3),J(` `,e.name,` `),D(2),q(e.checks),D(2),q(n.ms(e.ms)),D(2),q(n.ms(e.maxMs))}}function ZA(e,t){e&1&&(F(0,`tr`)(1,`td`,33),K(2,`No component time in the picked cycles.`),I()())}function QA(e,t){if(e&1){let e=B();F(0,`tr`)(1,`td`,16)(2,`button`,31),H(`click`,function(){let t=S(e).$implicit;return C(W(2).showComponent.emit(t.name))}),K(3),I()(),F(4,`td`,32),K(5),I(),F(6,`td`,32),K(7),I(),F(8,`td`,32),K(9),I()()}if(e&2){let e=t.$implicit,n=W(2);D(3),J(` `,e.name,` `),D(2),q(e.checks),D(2),q(e.cycles),D(2),q(n.ms(e.ms))}}function $A(e,t){e&1&&(F(0,`tr`)(1,`td`,33),K(2,`No component checks in the picked cycles.`),I()())}function ej(e,t){if(e&1&&(F(0,`span`,35),K(1,`from `),F(2,`span`,16),K(3),I()()),e&2){let e=W(3);D(3),q(e.causeText(t))}}function tj(e,t){if(e&1&&(F(0,`span`,35),K(1,`after `),F(2,`span`,16),K(3),I()()),e&2){let e=W().$implicit;D(3),q(e.trigger)}}function nj(e,t){if(e&1&&(F(0,`span`,36),K(1),I()),e&2){let e=W().$implicit;D(),J(``,e.unchanged,` changed nothing`)}}function rj(e,t){if(e&1&&(F(0,`span`,36),K(1),I()),e&2){let e=W().$implicit,t=W(2);D(),J(`hooks `,t.ms(e.hookMs))}}function ij(e,t){if(e&1&&(F(0,`span`,36),K(1),I()),e&2){let e=W().$implicit,t=W(2);D(),J(`afterRender `,t.ms(e.afterRenderMs))}}function aj(e,t){if(e&1&&(F(0,`span`,37),K(1,` slowest `),F(2,`span`,16),K(3),I(),K(4),I()),e&2){let e=t,n=W(3);D(3),q(e.name),D(),J(` `,n.ms(e.ms),` `)}}function oj(e,t){if(e&1&&(F(0,`li`)(1,`span`,34),K(2),I(),F(3,`span`,16),K(4),I(),F(5,`span`),K(6),I(),A(7,ej,4,1,`span`,35)(8,tj,4,1,`span`,35),A(9,nj,2,1,`span`,36),A(10,rj,2,1,`span`,36),A(11,ij,2,1,`span`,36),A(12,aj,5,2,`span`,37),I()),e&2){let e,n,r=t.$implicit,i=W(2);D(2),q(i.clock(r.at)),D(2),q(i.ms(r.ms)),D(2),b_(` `,r.checks,` `,r.checks===1?`check`:`checks`,`, `,r.passes,` `,r.passes===1?`pass`:`passes`,` `),D(),j((e=r.cause)?7:r.trigger?8:-1,e),D(2),j(r.unchanged?9:-1),D(),j(r.hookMs?10:-1),D(),j(r.afterRenderMs?11:-1),D(),j((n=r.components[0])?12:-1,n)}}function sj(e,t){if(e&1&&(F(0,`div`,26)(1,`div`)(2,`h3`),K(3),I(),F(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,27),K(8,`Component`),I(),F(9,`th`,28),K(10,`Checks`),I(),F(11,`th`,28),K(12,`Self time`),I(),F(13,`th`,28),K(14,`Slowest`),I()()(),F(15,`tbody`),M(16,XA,10,4,`tr`,null,Yh,!1,ZA,3,0,`tr`),I()(),F(19,`h3`),K(20),I(),F(21,`table`)(22,`thead`)(23,`tr`)(24,`th`,27),K(25,`Component`),I(),F(26,`th`,28),K(27,`Checks`),I(),F(28,`th`,28),K(29,`Cycles`),I(),F(30,`th`,28),K(31,`Self time`),I()()(),F(32,`tbody`),M(33,QA,10,4,`tr`,null,Yh,!1,$A,3,0,`tr`),I()(),F(36,`p`,7),K(37,` Select a component name to show its most checked instance in the tree. `),I()(),F(38,`div`)(39,`h3`),K(40,`Latest cycles`),I(),F(41,`ol`,29),M(42,oj,13,11,`li`,null,PA),I()()(),L(44,`app-cd-timing`,30)(45,`app-cd-diagnosis`,30)),e&2){let e=W();D(3),J(` `,e.range()?`Slowest components in the picked cycles`:`Slowest components`,` `),D(13),N(e.slowest()),D(4),J(` `,e.range()?`Most often checked in the picked cycles`:`Most often checked`,` `),D(13),N(e.busiest()),D(9),N(e.latest()),D(2),P(`page`,e.page()),D(),P(`page`,e.page())}}function cj(e,t){e&1&&(F(0,`p`,10),K(1,`Use the app. Cycles show up here as Angular runs change detection.`),I())}var lj=3e3,uj=10,dj=class e{livePage=$(null,{alias:`page`});pageId=$(null);rpc=$(null);native=$(!1);angularPages=hD(()=>this.rpc());angularPage=X(()=>gD(this.angularPages(),this.pageId()));attachPending=X(()=>this.angularPage()?.capabilities.profiler===!0);showComponent=ev();range=T(null);imported=T(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=T(``);announcement=T(``);recording=X(()=>this.page()?.recording===!0);cycles=X(()=>this.page()?.cycles??[]);slowMs=X(()=>this.page()?.slowMs??16);maxCycles=X(()=>IT(this.rpc()).limits.cdCycles);picked=X(()=>rk(this.cycles(),this.range()));hasSpans=X(()=>this.picked().some(e=>e.spans?.length));spanNames=X(()=>this.page()?.spanNames??[]);stats=X(()=>this.range()?ik(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,uj));busiest=X(()=>[...this.stats()].sort((e,t)=>t.checks-e.checks).slice(0,uj));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 XE(e)}causeText(e){return zO(e)}confirming=T(null);confirmTimer;constructor(){E(()=>{let e=this.confirming();e!==null&&this.livePage()?.recording===!0===e&&Z(()=>this.confirmed(e))}),x(ys).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)},lj))}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 _T(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=O({type:e,selectors:[[`app-cd-recording`]],inputs:{livePage:[1,`page`,`livePage`],pageId:[1,`pageId`],rpc:[1,`rpc`],native:[1,`native`]},outputs:{showComponent:`showComponent`},decls:23,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`,`slowMs`,`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`],[`type`,`button`,1,`name-link`,3,`click`],[1,`num`],[`colspan`,`4`],[1,`when`],[1,`trigger`],[1,`timing`],[1,`top`]],template:function(e,t){if(e&1&&(F(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Change detection`),I(),A(4,IA,4,5),F(5,`app-cd-transfer`,3),H(`imported`,function(e){return t.showImport(e)}),I(),F(6,`p`,4),K(7),I(),F(8,`p`,5),K(9),I()(),A(10,LA,7,1,`p`,6),F(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. `),A(13,RA,1,0)(14,zA,1,0),I(),A(15,HA,2,1),A(16,GA,16,7),L(17,`app-limit-note`,8),M(18,KA,2,1,`p`,9,Xh),A(20,YA,9,10),A(21,sj,46,6)(22,cj,2,0,`p`,10),I()),e&2){let e;D(4),j(t.imported()?-1:4),D(),P(`page`,t.page())(`maxCycles`,t.maxCycles()),D(2),q(t.status()),D(2),q(t.announcement()),D(),j((e=t.imported())?10:-1,e),D(3),j(t.native()?13:14),D(2),j(t.page()?.supported===!1?15:-1),D(),j(!t.imported()&&!t.native()?16:-1),D(),P(`dropped`,t.page()?.dropped??0)(`max`,t.maxCycles()),D(),N(t.capNotes()),D(2),j(t.cycles().length?20:-1),D(),j(t.page()?.components?.length?21:t.recording()?22:-1)}},dependencies:[bD,aO,yA,jk,SA,qk,cA,NA],styles:[`[_nghost-%COMP%] { +}`]})},PA=(e,t)=>t.id;function FA(e,t){if(e&1){let e=B();F(0,`button`,14),H(`click`,function(){return S(e),C(W(2).clear())}),K(1,`Clear`),I()}}function IA(e,t){if(e&1){let e=B();F(0,`button`,11),H(`click`,function(){return S(e),C(W().toggle())}),L(1,`span`,12),K(2),I(),A(3,FA,2,0,`button`,13)}if(e&2){let e=W();G(`on`,e.recording()),P(`disabled`,!e.pageId()),D(2),J(` `,e.recording()?`Stop recording`:`Record`,` `),D(),j(e.cycles().length?3:-1)}}function LA(e,t){if(e&1){let e=B();F(0,`p`,6)(1,`span`,15),K(2,`Imported recording`),I(),F(3,`span`,16),K(4),I(),F(5,`button`,14),H(`click`,function(){return S(e),C(W().closeImport())}),K(6,`Back to live recording`),I()()}e&2&&(D(4),q(t.fileName))}function RA(e,t){e&1&&K(0,` An app on a device has no DOM, so checks that changed nothing are not counted there. `)}function zA(e,t){e&1&&K(0,` A recording keeps running when the tab reloads, so it catches the next start of the app. The cycles from before the reload are gone with the old page. `)}function BA(e,t){e&1&&(F(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. `),I())}function VA(e,t){e&1&&L(0,`app-angular-unavailable`,17),e&2&&P(`page`,W(2).angularPage())}function HA(e,t){e&1&&A(0,BA,2,0,`p`,9)(1,VA,1,1,`app-angular-unavailable`,17),e&2&&j(+!W().attachPending())}function UA(e,t){e&1&&(F(0,`p`,9),K(1,`Angular profiling stays on until the page reloads.`),I())}function WA(e,t){e&1&&L(0,`app-angular-unavailable`,21),e&2&&P(`page`,W(2).angularPage())}function GA(e,t){if(e&1){let e=B();F(0,`div`,18)(1,`span`,19),K(2,`Live views`),I(),F(3,`button`,20),H(`click`,function(){S(e);let t=W();return C(t.setView(`flash`,!t.views().flash))}),L(4,`span`,12),K(5,` Flash checks `),I(),F(6,`button`,20),H(`click`,function(){S(e);let t=W();return C(t.setView(`track`,!t.views().track))}),L(7,`span`,12),K(8,` Performance track `),I(),F(9,`button`,20),H(`click`,function(){return S(e),C(W().setView(`angularProfiling`,!0))}),L(10,`span`,12),K(11,` Angular profiling `),I()(),F(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. `),I(),A(14,UA,2,0,`p`,9)(15,WA,1,1,`app-angular-unavailable`,21)}if(e&2){let e=W();D(3),P(`disabled`,!e.canShowViews()),k(`aria-pressed`,e.views().flash),D(3),P(`disabled`,!e.canShowViews()),k(`aria-pressed`,e.views().track),D(3),P(`disabled`,!e.canShowViews()||e.views().angularProfiling||!e.views().angularProfilingAvailable),k(`aria-pressed`,e.views().angularProfiling),D(5),j(e.views().angularProfiling?14:e.views().angularProfilingAvailable?-1:15)}}function KA(e,t){if(e&1&&(F(0,`p`,9),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function qA(e,t){if(e&1&&(F(0,`p`,24),K(1),I()),e&2){let e=W(2);D(),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 JA(e,t){e&1&&(F(0,`p`,9),K(1,` For picked cycles, totals come from the 10 slowest components each cycle lists. `),I())}function YA(e,t){if(e&1){let e=B();F(0,`h3`),K(1,`Cycles`),I(),F(2,`app-cd-cycle-chart`,22),E_(`rangeChange`,function(t){S(e);let n=W();return T_(n.range,t)||(n.range=t),C(t)}),I(),F(3,`app-cd-flame-graph`,23),H(`pick`,function(t){return S(e),C(W().showComponent.emit(t))}),I(),A(4,qA,2,1,`p`,24),F(5,`h3`),K(6,`Self time by component`),I(),A(7,JA,2,0,`p`,9),F(8,`app-cd-treemap`,25),H(`pick`,function(t){return S(e),C(W().showComponent.emit(t))}),I()}if(e&2){let e=W();D(2),P(`cycles`,e.cycles())(`slowMs`,e.slowMs()),w_(`range`,e.range),D(),P(`cycles`,e.picked())(`names`,e.spanNames())(`scope`,e.scope()),D(),j(e.hasSpans()?-1:4),D(3),j(e.range()?7:-1),D(),P(`stats`,e.stats())(`scope`,e.scope())}}function XA(e,t){if(e&1){let e=B();F(0,`tr`)(1,`td`,16)(2,`button`,31),H(`click`,function(){let t=S(e).$implicit;return C(W(2).showComponent.emit(t.name))}),K(3),I()(),F(4,`td`,32),K(5),I(),F(6,`td`,32),K(7),I(),F(8,`td`,32),K(9),I()()}if(e&2){let e=t.$implicit,n=W(2);D(3),J(` `,e.name,` `),D(2),q(e.checks),D(2),q(n.ms(e.ms)),D(2),q(n.ms(e.maxMs))}}function ZA(e,t){e&1&&(F(0,`tr`)(1,`td`,33),K(2,`No component time in the picked cycles.`),I()())}function QA(e,t){if(e&1){let e=B();F(0,`tr`)(1,`td`,16)(2,`button`,31),H(`click`,function(){let t=S(e).$implicit;return C(W(2).showComponent.emit(t.name))}),K(3),I()(),F(4,`td`,32),K(5),I(),F(6,`td`,32),K(7),I(),F(8,`td`,32),K(9),I()()}if(e&2){let e=t.$implicit,n=W(2);D(3),J(` `,e.name,` `),D(2),q(e.checks),D(2),q(e.cycles),D(2),q(n.ms(e.ms))}}function $A(e,t){e&1&&(F(0,`tr`)(1,`td`,33),K(2,`No component checks in the picked cycles.`),I()())}function ej(e,t){if(e&1&&(F(0,`span`,35),K(1,`from `),F(2,`span`,16),K(3),I()()),e&2){let e=W(3);D(3),q(e.causeText(t))}}function tj(e,t){if(e&1&&(F(0,`span`,35),K(1,`after `),F(2,`span`,16),K(3),I()()),e&2){let e=W().$implicit;D(3),q(e.trigger)}}function nj(e,t){if(e&1&&(F(0,`span`,36),K(1),I()),e&2){let e=W().$implicit;D(),J(``,e.unchanged,` changed nothing`)}}function rj(e,t){if(e&1&&(F(0,`span`,36),K(1),I()),e&2){let e=W().$implicit,t=W(2);D(),J(`hooks `,t.ms(e.hookMs))}}function ij(e,t){if(e&1&&(F(0,`span`,36),K(1),I()),e&2){let e=W().$implicit,t=W(2);D(),J(`afterRender `,t.ms(e.afterRenderMs))}}function aj(e,t){if(e&1&&(F(0,`span`,37),K(1,` slowest `),F(2,`span`,16),K(3),I(),K(4),I()),e&2){let e=t,n=W(3);D(3),q(e.name),D(),J(` `,n.ms(e.ms),` `)}}function oj(e,t){if(e&1&&(F(0,`li`)(1,`span`,34),K(2),I(),F(3,`span`,16),K(4),I(),F(5,`span`),K(6),I(),A(7,ej,4,1,`span`,35)(8,tj,4,1,`span`,35),A(9,nj,2,1,`span`,36),A(10,rj,2,1,`span`,36),A(11,ij,2,1,`span`,36),A(12,aj,5,2,`span`,37),I()),e&2){let e,n,r=t.$implicit,i=W(2);D(2),q(i.clock(r.at)),D(2),q(i.ms(r.ms)),D(2),S_(` `,r.checks,` `,r.checks===1?`check`:`checks`,`, `,r.passes,` `,r.passes===1?`pass`:`passes`,` `),D(),j((e=r.cause)?7:r.trigger?8:-1,e),D(2),j(r.unchanged?9:-1),D(),j(r.hookMs?10:-1),D(),j(r.afterRenderMs?11:-1),D(),j((n=r.components[0])?12:-1,n)}}function sj(e,t){if(e&1&&(F(0,`div`,26)(1,`div`)(2,`h3`),K(3),I(),F(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,27),K(8,`Component`),I(),F(9,`th`,28),K(10,`Checks`),I(),F(11,`th`,28),K(12,`Self time`),I(),F(13,`th`,28),K(14,`Slowest`),I()()(),F(15,`tbody`),M(16,XA,10,4,`tr`,null,Zh,!1,ZA,3,0,`tr`),I()(),F(19,`h3`),K(20),I(),F(21,`table`)(22,`thead`)(23,`tr`)(24,`th`,27),K(25,`Component`),I(),F(26,`th`,28),K(27,`Checks`),I(),F(28,`th`,28),K(29,`Cycles`),I(),F(30,`th`,28),K(31,`Self time`),I()()(),F(32,`tbody`),M(33,QA,10,4,`tr`,null,Zh,!1,$A,3,0,`tr`),I()(),F(36,`p`,7),K(37,` Select a component name to show its most checked instance in the tree. `),I()(),F(38,`div`)(39,`h3`),K(40,`Latest cycles`),I(),F(41,`ol`,29),M(42,oj,13,11,`li`,null,PA),I()()(),L(44,`app-cd-timing`,30)(45,`app-cd-diagnosis`,30)),e&2){let e=W();D(3),J(` `,e.range()?`Slowest components in the picked cycles`:`Slowest components`,` `),D(13),N(e.slowest()),D(4),J(` `,e.range()?`Most often checked in the picked cycles`:`Most often checked`,` `),D(13),N(e.busiest()),D(9),N(e.latest()),D(2),P(`page`,e.page()),D(),P(`page`,e.page())}}function cj(e,t){e&1&&(F(0,`p`,10),K(1,`Use the app. Cycles show up here as Angular runs change detection.`),I())}var lj=3e3,uj=10,dj=class e{livePage=$(null,{alias:`page`});pageId=$(null);rpc=$(null);native=$(!1);angularPages=hD(()=>this.rpc());angularPage=X(()=>gD(this.angularPages(),this.pageId()));attachPending=X(()=>this.angularPage()?.capabilities.profiler===!0);showComponent=nv();range=T(null);imported=T(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=T(``);announcement=T(``);recording=X(()=>this.page()?.recording===!0);cycles=X(()=>this.page()?.cycles??[]);slowMs=X(()=>this.page()?.slowMs??16);maxCycles=X(()=>IT(this.rpc()).limits.cdCycles);picked=X(()=>rk(this.cycles(),this.range()));hasSpans=X(()=>this.picked().some(e=>e.spans?.length));spanNames=X(()=>this.page()?.spanNames??[]);stats=X(()=>this.range()?ik(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,uj));busiest=X(()=>[...this.stats()].sort((e,t)=>t.checks-e.checks).slice(0,uj));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 XE(e)}causeText(e){return zO(e)}confirming=T(null);confirmTimer;constructor(){E(()=>{let e=this.confirming();e!==null&&this.livePage()?.recording===!0===e&&Z(()=>this.confirmed(e))}),x(ys).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)},lj))}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 _T(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=O({type:e,selectors:[[`app-cd-recording`]],inputs:{livePage:[1,`page`,`livePage`],pageId:[1,`pageId`],rpc:[1,`rpc`],native:[1,`native`]},outputs:{showComponent:`showComponent`},decls:23,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`,`slowMs`,`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`],[`type`,`button`,1,`name-link`,3,`click`],[1,`num`],[`colspan`,`4`],[1,`when`],[1,`trigger`],[1,`timing`],[1,`top`]],template:function(e,t){if(e&1&&(F(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Change detection`),I(),A(4,IA,4,5),F(5,`app-cd-transfer`,3),H(`imported`,function(e){return t.showImport(e)}),I(),F(6,`p`,4),K(7),I(),F(8,`p`,5),K(9),I()(),A(10,LA,7,1,`p`,6),F(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. `),A(13,RA,1,0)(14,zA,1,0),I(),A(15,HA,2,1),A(16,GA,16,7),L(17,`app-limit-note`,8),M(18,KA,2,1,`p`,9,Qh),A(20,YA,9,10),A(21,sj,46,6)(22,cj,2,0,`p`,10),I()),e&2){let e;D(4),j(t.imported()?-1:4),D(),P(`page`,t.page())(`maxCycles`,t.maxCycles()),D(2),q(t.status()),D(2),q(t.announcement()),D(),j((e=t.imported())?10:-1,e),D(3),j(t.native()?13:14),D(2),j(t.page()?.supported===!1?15:-1),D(),j(!t.imported()&&!t.native()?16:-1),D(),P(`dropped`,t.page()?.dropped??0)(`max`,t.maxCycles()),D(),N(t.capNotes()),D(2),j(t.cycles().length?20:-1),D(),j(t.page()?.components?.length?21:t.recording()?22:-1)}},dependencies:[bD,aO,yA,jk,SA,qk,cA,NA],styles:[`[_nghost-%COMP%] { display: block; margin-top: 16px; } @@ -1946,7 +1946,7 @@ td.mono[_ngcontent-%COMP%] { .trigger[_ngcontent-%COMP%] .mono[_ngcontent-%COMP%], .top[_ngcontent-%COMP%] .mono[_ngcontent-%COMP%] { overflow-wrap: anywhere; -}`]})};function fj(e){return Object.fromEntries(e.map(e=>[e.name,e.value??null]))}function pj(e){return e.map(e=>({name:e.name,listened:!!e.listened}))}function mj(e){let t={component:e.name,tag:e.tag,hostPath:e.path};e.selector&&(t.selector=e.selector),e.source&&(t.source=e.source),e.changeDetection&&(t.changeDetection=e.changeDetection),e.encapsulation&&(t.encapsulation=e.encapsulation),t.inputs=fj(e.inputs),t.outputs=pj(e.outputs),t.properties=fj(e.properties??[]),e.listeners.length&&(t.listeners=e.listeners),e.directives.length&&(t.directives=e.directives.map(e=>({name:e.name,inputs:fj(e.inputs),outputs:pj(e.outputs)}))),t.injected=e.dependencies.map(e=>({token:e.token,providedBy:e.providedBy?e.providedByName??`an injector`:null}));try{return JSON.stringify(t,null,2)}catch{return JSON.stringify({component:e.name,tag:e.tag,hostPath:e.path})}}function hj(e){return e.selector||e.path}var gj=1e3;function _j(e,t){let n=[];for(let[r,i]of t){let t=e.get(r);t!==void 0&&t!==i&&n.push(r)}return n}function vj(e){try{return JSON.stringify(e)??`undefined`}catch{return String(e)}}var yj=class{ms;changed=T(new Set);owner=null;last=new Map;timers=new Map;constructor(e=gj){this.ms=e}update(e,t){let n=new Map([...t].map(([e,t])=>[e,vj(t)]));if(e!==this.owner){this.clear(),this.owner=e,this.last=n;return}let r=_j(this.last,n);if(this.last=n,r.length){this.changed.update(e=>new Set([...e,...r]));for(let e of r)clearTimeout(this.timers.get(e)),this.timers.set(e,setTimeout(()=>{this.timers.delete(e),this.changed.update(t=>{let n=new Set(t);return n.delete(e),n})},this.ms))}}clear(){for(let e of this.timers.values())clearTimeout(e);this.timers.clear(),this.changed().size&&this.changed.set(new Set)}};function bj(e,t,n=0){return e===`directive`?`directive:${n}:${t}`:`${e}:${t}`}var xj=[`*`];function Sj(e,t){e&1&&K(0),e&2&&q(W(2).label())}function Cj(e,t){e&1&&Eg(0,0,null,Sj,1,1)}function wj(e,t){if(e&1&&(F(0,`span`,4),K(1),I()),e&2){let e=W(2);D(),q(e.message())}}function Tj(e,t){if(e&1){let e=B();F(0,`button`,2),H(`click`,function(){return S(e),C(W().open())}),dg(1,3),I(),A(2,wj,2,1,`span`,4)}if(e&2){let e=W(),t=Ag(1);P(`title`,`Open `+e.label()+` in your editor`),k(`aria-label`,`Open `+e.label()+` in your editor`),D(),P(`ngTemplateOutlet`,t),D(),j(e.message()?2:-1)}}function Ej(e,t){if(e&1&&(F(0,`span`,1),dg(1,3),I()),e&2){let e=W(),t=Ag(1);P(`title`,e.label()),D(),P(`ngTemplateOutlet`,t)}}var Dj=class e{source=T(T(null));client=X(()=>this.source()());available=X(()=>{let e=this.client();return!!e&&!yT(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 _T(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=El({token:e,factory:e.ɵfac})};function Oj(e,t){return t?`${e}:${t}`:e}var kj=class e{editor=x(Dj);file=$.required();line=$(void 0);label=X(()=>Oj(this.file(),this.line()));message=T(``);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=O({type:e,selectors:[[`app-source-link`]],inputs:{file:[1,`file`],line:[1,`line`]},ngContentSelectors:xj,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&&(Tg(),Dh(0,Cj,2,0,`ng-template`,null,0,q_),A(2,Tj,3,4)(3,Ej,2,2,`span`,1)),e&2&&(D(2),j(t.editor.available()?2:3))},dependencies:[Uv],styles:[`[_nghost-%COMP%] { +}`]})};function fj(e){return Object.fromEntries(e.map(e=>[e.name,e.value??null]))}function pj(e){return e.map(e=>({name:e.name,listened:!!e.listened}))}function mj(e){let t={component:e.name,tag:e.tag,hostPath:e.path};e.selector&&(t.selector=e.selector),e.source&&(t.source=e.source),e.changeDetection&&(t.changeDetection=e.changeDetection),e.encapsulation&&(t.encapsulation=e.encapsulation),t.inputs=fj(e.inputs),t.outputs=pj(e.outputs),t.properties=fj(e.properties??[]),e.listeners.length&&(t.listeners=e.listeners),e.directives.length&&(t.directives=e.directives.map(e=>({name:e.name,inputs:fj(e.inputs),outputs:pj(e.outputs)}))),t.injected=e.dependencies.map(e=>({token:e.token,providedBy:e.providedBy?e.providedByName??`an injector`:null}));try{return JSON.stringify(t,null,2)}catch{return JSON.stringify({component:e.name,tag:e.tag,hostPath:e.path})}}function hj(e){return e.selector||e.path}var gj=1e3;function _j(e,t){let n=[];for(let[r,i]of t){let t=e.get(r);t!==void 0&&t!==i&&n.push(r)}return n}function vj(e){try{return JSON.stringify(e)??`undefined`}catch{return String(e)}}var yj=class{ms;changed=T(new Set);owner=null;last=new Map;timers=new Map;constructor(e=gj){this.ms=e}update(e,t){let n=new Map([...t].map(([e,t])=>[e,vj(t)]));if(e!==this.owner){this.clear(),this.owner=e,this.last=n;return}let r=_j(this.last,n);if(this.last=n,r.length){this.changed.update(e=>new Set([...e,...r]));for(let e of r)clearTimeout(this.timers.get(e)),this.timers.set(e,setTimeout(()=>{this.timers.delete(e),this.changed.update(t=>{let n=new Set(t);return n.delete(e),n})},this.ms))}}clear(){for(let e of this.timers.values())clearTimeout(e);this.timers.clear(),this.changed().size&&this.changed.set(new Set)}};function bj(e,t,n=0){return e===`directive`?`directive:${n}:${t}`:`${e}:${t}`}var xj=[`*`];function Sj(e,t){e&1&&K(0),e&2&&q(W(2).label())}function Cj(e,t){e&1&&Og(0,0,null,Sj,1,1)}function wj(e,t){if(e&1&&(F(0,`span`,4),K(1),I()),e&2){let e=W(2);D(),q(e.message())}}function Tj(e,t){if(e&1){let e=B();F(0,`button`,2),H(`click`,function(){return S(e),C(W().open())}),pg(1,3),I(),A(2,wj,2,1,`span`,4)}if(e&2){let e=W(),t=Mg(1);P(`title`,`Open `+e.label()+` in your editor`),k(`aria-label`,`Open `+e.label()+` in your editor`),D(),P(`ngTemplateOutlet`,t),D(),j(e.message()?2:-1)}}function Ej(e,t){if(e&1&&(F(0,`span`,1),pg(1,3),I()),e&2){let e=W(),t=Mg(1);P(`title`,e.label()),D(),P(`ngTemplateOutlet`,t)}}var Dj=class e{source=T(T(null));client=X(()=>this.source()());available=X(()=>{let e=this.client();return!!e&&!yT(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 _T(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=El({token:e,factory:e.ɵfac})};function Oj(e,t){return t?`${e}:${t}`:e}var kj=class e{editor=x(Dj);file=$.required();line=$(void 0);label=X(()=>Oj(this.file(),this.line()));message=T(``);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=O({type:e,selectors:[[`app-source-link`]],inputs:{file:[1,`file`],line:[1,`line`]},ngContentSelectors:xj,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&&(Dg(),kh(0,Cj,2,0,`ng-template`,null,0,Y_),A(2,Tj,3,4)(3,Ej,2,2,`span`,1)),e&2&&(D(2),j(t.editor.available()?2:3))},dependencies:[Gv],styles:[`[_nghost-%COMP%] { display: inline; min-width: 0; } @@ -1981,7 +1981,7 @@ td.mono[_ngcontent-%COMP%] { color: var(--%NS%danger-text); font-family: var(--%NS%font-sans); font-size: 0.92em; -}`]})},Aj=[`field`],jj=[`editButton`],Mj=[`valueBox`];function Nj(e,t){if(e&1){let e=B();R(0,`div`,5)(1,`label`,6),K(2),z(),R(3,`input`,7,0),U(`input`,function(t){return S(e),C(W().draft.set(t.target.value))})(`keydown.enter`,function(t){S(e);let n=W();return t.preventDefault(),C(n.apply())})(`keydown.escape`,function(t){S(e);let n=W();return t.preventDefault(),t.stopPropagation(),C(n.cancel())}),z(),R(5,`button`,8),U(`click`,function(){return S(e),C(W().apply())}),K(6,`Apply`),z(),R(7,`button`,9),U(`click`,function(){return S(e),C(W().cancel())}),K(8,`Cancel`),z()(),R(9,`p`,10),K(10),z()}if(e&2){let e=W();D(),V(`htmlFor`,e.fieldId),D(),J(`New value of `,e.prop().name,`, as JSON`),D(),V(`id`,e.fieldId)(`value`,e.draft())(`readOnly`,e.busy()),k(`aria-busy`,e.busy()?`true`:null)(`aria-invalid`,e.error()?`true`:null)(`aria-describedby`,e.hintId+(e.error()?` `+e.errorId:``)),D(2),V(`disabled`,e.busy()),D(4),V(`id`,e.hintId),D(),J(` JSON, such as "text", 42, true or `,e.objectSample,`. Enter applies, Escape cancels. `)}}function Pj(e,t){if(e&1&&(R(0,`pre`,null,1),K(2),U_(3,`json`),z()),e&2){let e=W(2);k(`tabindex`,e.scrollable()?0:null)(`role`,e.scrollable()?`region`:null)(`aria-label`,e.scrollable()?`Value of `+e.prop().name:null),D(2),q(W_(3,4,e.prop().value))}}function Fj(e,t){if(e&1){let e=B();R(0,`button`,14,2),U(`click`,function(){return S(e),C(W(2).start())}),K(2,` Edit `),z()}if(e&2){let e=W(2);V(`disabled`,e.busy()),k(`aria-label`,`Edit `+e.prop().name)}}function Ij(e,t){if(e&1&&(R(0,`p`,13),K(1),z()),e&2){let e=W(2);D(),q(e.prop().locked)}}function Lj(e,t){if(e&1&&(R(0,`div`,11),A(1,Pj,4,6,`pre`),A(2,Fj,3,2,`button`,12),z(),A(3,Ij,2,1,`p`,13)),e&2){let e=W();D(),j(e.bare()?-1:1),D(),j(e.editable()?2:-1),D(),j(e.writes()&&e.prop().locked?3:-1)}}function Rj(e,t){if(e&1&&(R(0,`p`,3),K(1),z()),e&2){let e=W();V(`id`,e.errorId),D(),q(e.error())}}var zj=0;function Bj(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 Vj=class e{prop=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);bare=$(!1);readDraft=$(null);fieldId=`prop-edit-${++zj}`;hintId=`${this.fieldId}-hint`;errorId=`${this.fieldId}-error`;objectSample=`{"a": 1}`;editing=T(!1);draft=T(``);busy=T(!1);error=T(``);done=T(``);editable=X(()=>this.writes()&&!!this.prop().edit&&!!this.pageId()&&!!this.rpc());field=sv(`field`);editButton=sv(`editButton`);valueBox=sv(`valueBox`);injector=x(_s);scrollable=T(!1);constructor(){mv(()=>{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),td(()=>{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=Bj(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(){td(()=>this.editButton()?.nativeElement.focus(),{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-prop-value`]],viewQuery:function(e,t){e&1&&Og(t.field,Aj,5)(t.editButton,jj,5)(t.valueBox,Mj,5),e&2&&kg(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&&(A(0,Nj,11,11)(1,Lj,4,3),A(2,Rj,2,2,`p`,3),R(3,`p`,4),K(4),z()),e&2&&(j(+!t.editing()),D(2),j(t.error()?2:-1),D(2),q(t.done()))},dependencies:[Gv],styles:[`[_nghost-%COMP%] { +}`]})},Aj=[`field`],jj=[`editButton`],Mj=[`valueBox`];function Nj(e,t){if(e&1){let e=B();R(0,`div`,5)(1,`label`,6),K(2),z(),R(3,`input`,7,0),U(`input`,function(t){return S(e),C(W().draft.set(t.target.value))})(`keydown.enter`,function(t){S(e);let n=W();return t.preventDefault(),C(n.apply())})(`keydown.escape`,function(t){S(e);let n=W();return t.preventDefault(),t.stopPropagation(),C(n.cancel())}),z(),R(5,`button`,8),U(`click`,function(){return S(e),C(W().apply())}),K(6,`Apply`),z(),R(7,`button`,9),U(`click`,function(){return S(e),C(W().cancel())}),K(8,`Cancel`),z()(),R(9,`p`,10),K(10),z()}if(e&2){let e=W();D(),V(`htmlFor`,e.fieldId),D(),J(`New value of `,e.prop().name,`, as JSON`),D(),V(`id`,e.fieldId)(`value`,e.draft())(`readOnly`,e.busy()),k(`aria-busy`,e.busy()?`true`:null)(`aria-invalid`,e.error()?`true`:null)(`aria-describedby`,e.hintId+(e.error()?` `+e.errorId:``)),D(2),V(`disabled`,e.busy()),D(4),V(`id`,e.hintId),D(),J(` JSON, such as "text", 42, true or `,e.objectSample,`. Enter applies, Escape cancels. `)}}function Pj(e,t){if(e&1&&(R(0,`pre`,null,1),K(2),G_(3,`json`),z()),e&2){let e=W(2);k(`tabindex`,e.scrollable()?0:null)(`role`,e.scrollable()?`region`:null)(`aria-label`,e.scrollable()?`Value of `+e.prop().name:null),D(2),q(K_(3,4,e.prop().value))}}function Fj(e,t){if(e&1){let e=B();R(0,`button`,14,2),U(`click`,function(){return S(e),C(W(2).start())}),K(2,` Edit `),z()}if(e&2){let e=W(2);V(`disabled`,e.busy()),k(`aria-label`,`Edit `+e.prop().name)}}function Ij(e,t){if(e&1&&(R(0,`p`,13),K(1),z()),e&2){let e=W(2);D(),q(e.prop().locked)}}function Lj(e,t){if(e&1&&(R(0,`div`,11),A(1,Pj,4,6,`pre`),A(2,Fj,3,2,`button`,12),z(),A(3,Ij,2,1,`p`,13)),e&2){let e=W();D(),j(e.bare()?-1:1),D(),j(e.editable()?2:-1),D(),j(e.writes()&&e.prop().locked?3:-1)}}function Rj(e,t){if(e&1&&(R(0,`p`,3),K(1),z()),e&2){let e=W();V(`id`,e.errorId),D(),q(e.error())}}var zj=0;function Bj(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 Vj=class e{prop=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);bare=$(!1);readDraft=$(null);fieldId=`prop-edit-${++zj}`;hintId=`${this.fieldId}-hint`;errorId=`${this.fieldId}-error`;objectSample=`{"a": 1}`;editing=T(!1);draft=T(``);busy=T(!1);error=T(``);done=T(``);editable=X(()=>this.writes()&&!!this.prop().edit&&!!this.pageId()&&!!this.rpc());field=lv(`field`);editButton=lv(`editButton`);valueBox=lv(`valueBox`);injector=x(_s);scrollable=T(!1);constructor(){gv(()=>{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),rd(()=>{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=Bj(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(){rd(()=>this.editButton()?.nativeElement.focus(),{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-prop-value`]],viewQuery:function(e,t){e&1&&Ag(t.field,Aj,5)(t.editButton,jj,5)(t.valueBox,Mj,5),e&2&&jg(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&&(A(0,Nj,11,11)(1,Lj,4,3),A(2,Rj,2,2,`p`,3),R(3,`p`,4),K(4),z()),e&2&&(j(+!t.editing()),D(2),j(t.error()?2:-1),D(2),q(t.done()))},dependencies:[qv],styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -2104,7 +2104,7 @@ button.edit[_ngcontent-%COMP%] { .error[_ngcontent-%COMP%] { color: var(--%NS%danger-text); -}`]})},Hj=1e3,Uj={depth:5,limit:100},Wj=`[redacted]`;function Gj(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function Kj(e){return Gj(e)&&typeof e.$more==`number`&&Object.keys(e).length===1}function qj(e){return Gj(e)&&typeof e.$collapsed==`string`&&typeof e.size==`number`&&Object.keys(e).length===2}function Jj(e){return e===`Array`?`array`:e===`Map`?`map`:e===`Set`?`set`:`object`}function Yj(e){return e.$type===`Map`&&Array.isArray(e.entries)}function Xj(e){return e.$type===`Set`&&Array.isArray(e.values)}function Zj(e){return Object.keys(e).filter(e=>e!==`$type`&&e!==`$more`)}function Qj(e){if(!e||typeof e!=`object`)return null;if(qj(e))return e.size<=0?null:{kind:Jj(e.$collapsed),type:e.$collapsed,size:e.size,collapsed:!0};if(Kj(e))return null;if(Array.isArray(e)){let t=e.at(-1),n=Kj(t)?t.$more:0,r=e.length-+!!n+n;return r?{kind:`array`,type:`Array`,size:r,collapsed:!1}:null}let t=e;if(Yj(t)||Xj(t)){let e=typeof t.size==`number`?t.size:0,n=Yj(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=Zj(t).length+n,i=typeof t.$type==`string`?t.$type:`Object`;return r?{kind:`object`,type:i,size:r,collapsed:!1}:null}function $j(e){if(typeof e==`string`)return JSON.stringify(e);let t=Qj(e);if(t)return nM(t);try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function eM(e){let t=Qj(e);if(!t||t.collapsed)return{children:[],more:0};if(Array.isArray(e)){let n=(Kj(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:$j(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:Zj(n).map(e=>({key:e,label:e,value:n[e]})),more:typeof n.$more==`number`?n.$more:0}}function tM(e,t,n){return`${e} ${e===1?t:n}`}function nM(e){let t={array:tM(e.size,`item`,`items`),object:tM(e.size,`key`,`keys`),map:tM(e.size,`entry`,`entries`),set:tM(e.size,`value`,`values`)}[e.kind];return`${e.type} (${t})`}function rM(e,t){return JSON.stringify(t===void 0?e:[t,...e])}function iM(e,t){return e.map((e,n)=>n===0?e:(t?t[n-1]!==`object`:/^\d+$/.test(e))?`[${e}]`:`.${e}`).join(``)}function aM(e){return e.every(e=>e&&e===e.trim()&&!/[.[\]]/.test(e))?e.join(`.`):null}var oM=/^\[(Getter|Unreadable|Circular|Truncated|Function\b.*|Promise)\]$/;function sM(e){return e===null||typeof e==`boolean`?!0:typeof e==`number`?Number.isFinite(e):typeof e==`string`&&e!==Wj&&!oM.test(e)&&!e.endsWith(`…`)}function cM(e,t){return!e||t.kind===`map`||t.kind===`set`||e===`signal`&&t.kind===`object`&&t.type!==`Object`?null:e}function lM(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=rM(e);if(!(s.has(r)||a.length>=i)){s.add(r);for(let r of eM(t).children){let t=[...e,r.key];if(r.label.toLowerCase().includes(o)&&a.push(t),!Qj(r.value))continue;let i=n(t)??(Qj(r.value)?.collapsed?void 0:r.value);i!==void 0&&c(t,i)}}};return c(e,n(e)??t),a}var uM=(e,t)=>t.id;function dM(e,t){if(e&1){let e=B();F(0,`button`,2),H(`click`,function(){S(e);let t=W().$implicit;return C(W(3).toggle(t))}),w(),F(1,`svg`,3),L(2,`path`,4),I(),ls(),F(3,`span`,14),K(4),I(),F(5,`span`,5),K(6),I()()}if(e&2){let e=W().$implicit;k(`aria-expanded`,e.open)(`aria-label`,e.label+`: `+e.text),D(4),J(``,e.label,`:`),D(2),q(e.text)}}function fM(e,t){if(e&1&&L(0,`app-prop-value`,15),e&2){let e=W(5);P(`prop`,t)(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}function pM(e,t){if(e&1&&(F(0,`span`,16),K(1),I()),e&2){let e=W(2).$implicit;D(),q(e.text)}}function mM(e,t){if(e&1&&(F(0,`span`,14),K(1),I(),A(2,fM,1,5,`app-prop-value`,15)(3,pM,2,1,`span`,16)),e&2){let e,t=W().$implicit;D(),J(``,t.label,`:`),D(),j((e=t.edit)?2:3,e)}}function hM(e,t){if(e&1){let e=B();F(0,`button`,17),H(`click`,function(){S(e);let t=W().$implicit;return C(W(3).more(t))}),K(1),F(2,`span`,18),K(3),I()()}if(e&2){let e=W().$implicit,t=W(3);D(),J(` Show `,t.step(e),` more `),D(2),J(`(`,e.more,` not listed)`)}}function gM(e,t){e&1&&(F(0,`span`,12),K(1,`Reading from the page…`),I())}function _M(e,t){if(e&1&&(F(0,`span`,13),K(1),I()),e&2){let e=W().$implicit;D(),q(e.text)}}function vM(e,t){if(e&1&&(F(0,`li`,9),A(1,dM,7,4,`button`,10)(2,mM,4,2)(3,hM,4,2,`button`,11)(4,gM,2,0,`span`,12)(5,_M,2,1,`span`,13),I()),e&2){let e,n=t.$implicit;Zg(`padding-left`,n.depth*14,`px`),D(),j((e=n.kind)===`node`?1:e===`leaf`?2:e===`more`?3:e===`loading`?4:e===`error`?5:-1)}}function yM(e,t){if(e&1&&(F(0,`ul`,7),M(1,vM,6,3,`li`,8,uM),I()),e&2){let e=W(2);P(`id`,e.listId),k(`aria-label`,e.prop().name+` entries`),D(),N(e.rows())}}function bM(e,t){if(e&1){let e=B();F(0,`div`,1)(1,`button`,2),H(`click`,function(){return S(e),C(W().toggleRoot())}),w(),F(2,`svg`,3),L(3,`path`,4),I(),ls(),F(4,`span`,5),K(5),I()(),L(6,`app-prop-value`,6),I(),A(7,yM,3,2,`ul`,7)}if(e&2){let e=t,n=W();D(),k(`aria-expanded`,n.rootOpen())(`aria-controls`,n.rootOpen()?n.listId:null)(`aria-label`,n.prop().name+`: `+n.summaryOf(e)),D(4),q(n.summaryOf(e)),D(),P(`bare`,!0)(`prop`,n.prop())(`componentId`,n.componentId())(`pageId`,n.pageId())(`rpc`,n.rpc())(`writes`,n.writes())(`readDraft`,n.readWhole),D(),j(n.rootOpen()?7:-1)}}function xM(e,t){if(e&1&&L(0,`app-prop-value`,0),e&2){let e=W();P(`prop`,e.prop())(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}var SM=0;function CM(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function wM(e){if(Array.isArray(e))return e.every(wM);if(e&&typeof e==`object`){let t=e;return![`$collapsed`,`$more`,`$type`].some(e=>Object.hasOwn(t,e))&&Object.values(t).every(wM)}return sM(e)}var TM=class e{prop=$.required();store=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);directive=$(void 0);query=$(``);listId=`value-tree-${++SM}`;host=x(kl);pendingMore=null;constructor(){mv(()=>{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(()=>Qj(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 lM(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(rM(e));for(let t=2;t<=e.length;t++)i.add(rM(e.slice(0,t)))}let o=this.prop(),s=this.writes()&&n===void 0,c=[],l=(e,o,d,f,p,m)=>{let{children:ee,more:h}=eM(e);for(let e of ee){let ee=[...o,e.key],h=rM(ee);if(r&&!m&&!i.has(h))continue;let g=Qj(e.value),te=rM(ee,n);if(!g){let t=p&&sM(e.value)?aM(ee):null;c.push({id:te,kind:`leaf`,depth:f,path:ee,label:e.label,text:CM(e.value),edit:s&&t&&p?{name:iM(ee,[...d]),prop:t,value:e.value,edit:p}:void 0});continue}let ne=!!r&&!m&&i.has(h)&&!a.has(h)||t.isOpen(ee,n);if(c.push({id:te,kind:`node`,depth:f,path:ee,label:e.label,text:nM(g),container:g,open:ne}),!ne)continue;let re=t.level(ee,n)??(g.collapsed?void 0:e.value),ie=[...d,g.kind];re===void 0?t.errors().has(te)?c.push({...u(ee,f+1,`error`),text:t.errors().get(te)}):c.push(u(ee,f+1,`loading`)):l(re,ee,ie,f+1,cM(p,g),m||a.has(h))}h>0&&(!r||m)&&c.push({...u(o,f,`more`),more:h,listed:ee.length})},u=(e,t,r)=>({id:`${rM(e,n)}:${r}`,kind:r,depth:t,path:e,label:``,text:``});return l(this.rootValue(),this.rootPath(),[e.kind],0,s?cM(o.editInside??null,e):null,!r),c});readWhole=async()=>{let e=await this.store().read(this.rootPath(),Uj.depth,Uj.limit);return e.ok?wM(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 nM(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=O({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&&A(0,bM,8,12)(1,xM,1,5,`app-prop-value`,0),e&2){let e;j((e=t.root())?0:1,e)}},dependencies:[Vj],styles:[`[_nghost-%COMP%] { +}`]})},Hj=1e3,Uj={depth:5,limit:100},Wj=`[redacted]`;function Gj(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function Kj(e){return Gj(e)&&typeof e.$more==`number`&&Object.keys(e).length===1}function qj(e){return Gj(e)&&typeof e.$collapsed==`string`&&typeof e.size==`number`&&Object.keys(e).length===2}function Jj(e){return e===`Array`?`array`:e===`Map`?`map`:e===`Set`?`set`:`object`}function Yj(e){return e.$type===`Map`&&Array.isArray(e.entries)}function Xj(e){return e.$type===`Set`&&Array.isArray(e.values)}function Zj(e){return Object.keys(e).filter(e=>e!==`$type`&&e!==`$more`)}function Qj(e){if(!e||typeof e!=`object`)return null;if(qj(e))return e.size<=0?null:{kind:Jj(e.$collapsed),type:e.$collapsed,size:e.size,collapsed:!0};if(Kj(e))return null;if(Array.isArray(e)){let t=e.at(-1),n=Kj(t)?t.$more:0,r=e.length-+!!n+n;return r?{kind:`array`,type:`Array`,size:r,collapsed:!1}:null}let t=e;if(Yj(t)||Xj(t)){let e=typeof t.size==`number`?t.size:0,n=Yj(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=Zj(t).length+n,i=typeof t.$type==`string`?t.$type:`Object`;return r?{kind:`object`,type:i,size:r,collapsed:!1}:null}function $j(e){if(typeof e==`string`)return JSON.stringify(e);let t=Qj(e);if(t)return nM(t);try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function eM(e){let t=Qj(e);if(!t||t.collapsed)return{children:[],more:0};if(Array.isArray(e)){let n=(Kj(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:$j(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:Zj(n).map(e=>({key:e,label:e,value:n[e]})),more:typeof n.$more==`number`?n.$more:0}}function tM(e,t,n){return`${e} ${e===1?t:n}`}function nM(e){let t={array:tM(e.size,`item`,`items`),object:tM(e.size,`key`,`keys`),map:tM(e.size,`entry`,`entries`),set:tM(e.size,`value`,`values`)}[e.kind];return`${e.type} (${t})`}function rM(e,t){return JSON.stringify(t===void 0?e:[t,...e])}function iM(e,t){return e.map((e,n)=>n===0?e:(t?t[n-1]!==`object`:/^\d+$/.test(e))?`[${e}]`:`.${e}`).join(``)}function aM(e){return e.every(e=>e&&e===e.trim()&&!/[.[\]]/.test(e))?e.join(`.`):null}var oM=/^\[(Getter|Unreadable|Circular|Truncated|Function\b.*|Promise)\]$/;function sM(e){return e===null||typeof e==`boolean`?!0:typeof e==`number`?Number.isFinite(e):typeof e==`string`&&e!==Wj&&!oM.test(e)&&!e.endsWith(`…`)}function cM(e,t){return!e||t.kind===`map`||t.kind===`set`||e===`signal`&&t.kind===`object`&&t.type!==`Object`?null:e}function lM(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=rM(e);if(!(s.has(r)||a.length>=i)){s.add(r);for(let r of eM(t).children){let t=[...e,r.key];if(r.label.toLowerCase().includes(o)&&a.push(t),!Qj(r.value))continue;let i=n(t)??(Qj(r.value)?.collapsed?void 0:r.value);i!==void 0&&c(t,i)}}};return c(e,n(e)??t),a}var uM=(e,t)=>t.id;function dM(e,t){if(e&1){let e=B();F(0,`button`,2),H(`click`,function(){S(e);let t=W().$implicit;return C(W(3).toggle(t))}),w(),F(1,`svg`,3),L(2,`path`,4),I(),ls(),F(3,`span`,14),K(4),I(),F(5,`span`,5),K(6),I()()}if(e&2){let e=W().$implicit;k(`aria-expanded`,e.open)(`aria-label`,e.label+`: `+e.text),D(4),J(``,e.label,`:`),D(2),q(e.text)}}function fM(e,t){if(e&1&&L(0,`app-prop-value`,15),e&2){let e=W(5);P(`prop`,t)(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}function pM(e,t){if(e&1&&(F(0,`span`,16),K(1),I()),e&2){let e=W(2).$implicit;D(),q(e.text)}}function mM(e,t){if(e&1&&(F(0,`span`,14),K(1),I(),A(2,fM,1,5,`app-prop-value`,15)(3,pM,2,1,`span`,16)),e&2){let e,t=W().$implicit;D(),J(``,t.label,`:`),D(),j((e=t.edit)?2:3,e)}}function hM(e,t){if(e&1){let e=B();F(0,`button`,17),H(`click`,function(){S(e);let t=W().$implicit;return C(W(3).more(t))}),K(1),F(2,`span`,18),K(3),I()()}if(e&2){let e=W().$implicit,t=W(3);D(),J(` Show `,t.step(e),` more `),D(2),J(`(`,e.more,` not listed)`)}}function gM(e,t){e&1&&(F(0,`span`,12),K(1,`Reading from the page…`),I())}function _M(e,t){if(e&1&&(F(0,`span`,13),K(1),I()),e&2){let e=W().$implicit;D(),q(e.text)}}function vM(e,t){if(e&1&&(F(0,`li`,9),A(1,dM,7,4,`button`,10)(2,mM,4,2)(3,hM,4,2,`button`,11)(4,gM,2,0,`span`,12)(5,_M,2,1,`span`,13),I()),e&2){let e,n=t.$implicit;$g(`padding-left`,n.depth*14,`px`),D(),j((e=n.kind)===`node`?1:e===`leaf`?2:e===`more`?3:e===`loading`?4:e===`error`?5:-1)}}function yM(e,t){if(e&1&&(F(0,`ul`,7),M(1,vM,6,3,`li`,8,uM),I()),e&2){let e=W(2);P(`id`,e.listId),k(`aria-label`,e.prop().name+` entries`),D(),N(e.rows())}}function bM(e,t){if(e&1){let e=B();F(0,`div`,1)(1,`button`,2),H(`click`,function(){return S(e),C(W().toggleRoot())}),w(),F(2,`svg`,3),L(3,`path`,4),I(),ls(),F(4,`span`,5),K(5),I()(),L(6,`app-prop-value`,6),I(),A(7,yM,3,2,`ul`,7)}if(e&2){let e=t,n=W();D(),k(`aria-expanded`,n.rootOpen())(`aria-controls`,n.rootOpen()?n.listId:null)(`aria-label`,n.prop().name+`: `+n.summaryOf(e)),D(4),q(n.summaryOf(e)),D(),P(`bare`,!0)(`prop`,n.prop())(`componentId`,n.componentId())(`pageId`,n.pageId())(`rpc`,n.rpc())(`writes`,n.writes())(`readDraft`,n.readWhole),D(),j(n.rootOpen()?7:-1)}}function xM(e,t){if(e&1&&L(0,`app-prop-value`,0),e&2){let e=W();P(`prop`,e.prop())(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}var SM=0;function CM(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function wM(e){if(Array.isArray(e))return e.every(wM);if(e&&typeof e==`object`){let t=e;return![`$collapsed`,`$more`,`$type`].some(e=>Object.hasOwn(t,e))&&Object.values(t).every(wM)}return sM(e)}var TM=class e{prop=$.required();store=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);directive=$(void 0);query=$(``);listId=`value-tree-${++SM}`;host=x(kl);pendingMore=null;constructor(){gv(()=>{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(()=>Qj(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 lM(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(rM(e));for(let t=2;t<=e.length;t++)i.add(rM(e.slice(0,t)))}let o=this.prop(),s=this.writes()&&n===void 0,c=[],l=(e,o,d,f,p,m)=>{let{children:ee,more:h}=eM(e);for(let e of ee){let ee=[...o,e.key],h=rM(ee);if(r&&!m&&!i.has(h))continue;let g=Qj(e.value),te=rM(ee,n);if(!g){let t=p&&sM(e.value)?aM(ee):null;c.push({id:te,kind:`leaf`,depth:f,path:ee,label:e.label,text:CM(e.value),edit:s&&t&&p?{name:iM(ee,[...d]),prop:t,value:e.value,edit:p}:void 0});continue}let ne=!!r&&!m&&i.has(h)&&!a.has(h)||t.isOpen(ee,n);if(c.push({id:te,kind:`node`,depth:f,path:ee,label:e.label,text:nM(g),container:g,open:ne}),!ne)continue;let re=t.level(ee,n)??(g.collapsed?void 0:e.value),ie=[...d,g.kind];re===void 0?t.errors().has(te)?c.push({...u(ee,f+1,`error`),text:t.errors().get(te)}):c.push(u(ee,f+1,`loading`)):l(re,ee,ie,f+1,cM(p,g),m||a.has(h))}h>0&&(!r||m)&&c.push({...u(o,f,`more`),more:h,listed:ee.length})},u=(e,t,r)=>({id:`${rM(e,n)}:${r}`,kind:r,depth:t,path:e,label:``,text:``});return l(this.rootValue(),this.rootPath(),[e.kind],0,s?cM(o.editInside??null,e):null,!r),c});readWhole=async()=>{let e=await this.store().read(this.rootPath(),Uj.depth,Uj.limit);return e.ok?wM(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 nM(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=O({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&&A(0,bM,8,12)(1,xM,1,5,`app-prop-value`,0),e&2){let e;j((e=t.root())?0:1,e)}},dependencies:[Vj],styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -2275,7 +2275,7 @@ button.edit[_ngcontent-%COMP%] { .status[_ngcontent-%COMP%]:empty { display: none; -}`]})},NM=(e,t)=>t.block.id,PM=(e,t)=>t.kind,FM=(e,t)=>t.id;function IM(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,e.label,` `)}}function LM(e,t){if(e&1&&(K(0),R(1,`span`,18),K(2),z()),e&2){let e=W().$implicit;J(` `,e.kind,` `),D(2),J(``,e.seconds,`s`)}}function RM(e,t){if(e&1&&(R(0,`span`,9),A(1,IM,1,1)(2,LM,3,2),z()),e&2){let e=t.$implicit;Qg(`note-`+e.kind),k(`title`,e.text),D(),j(e.seconds===void 0?1:2)}}function zM(e,t){if(e&1&&(R(0,`span`,9),K(1),z()),e&2){let e=W().$implicit;k(`title`,e.block.hydratedAt===void 0?`The block hydrated before the devtools attached to the page.`:null),D(),q(e.hydrated)}}function BM(e,t){e&1&&(R(0,`span`,9),K(1,`@error block`),z())}function VM(e,t){if(e&1&&(R(0,`span`,10),K(1),z()),e&2){let e=W().$implicit;D(),q(e.timings)}}function HM(e,t){e&1&&(R(0,`span`,11),K(1,`mismatch`),z())}function UM(e,t){if(e&1&&(R(0,`dt`),K(1,`Template of`),z(),R(2,`dd`,19),K(3),z()),e&2){let e=t;D(3),Y(``,e.name,` <`,e.tag,`>`)}}function WM(e,t){if(e&1&&(R(0,`dt`),K(1,`In this state since`),z(),R(2,`dd`),K(3),z()),e&2){let e=W(2).$implicit,t=W(2);D(3),q(t.clock(e.block.since))}}function GM(e,t){if(e&1&&(R(0,`dt`),K(1,`Hydrated`),z(),R(2,`dd`),K(3),z()),e&2){let e=W(2).$implicit,t=W(2);D(3),J(` `,e.block.hydratedAt===void 0?`Before the devtools attached`:t.clock(e.block.hydratedAt),` `)}}function KM(e,t){if(e&1&&(R(0,`span`,23),K(1),z()),e&2){let e=W().$implicit;D(),q(e.hydration)}}function qM(e,t){if(e&1&&(R(0,`li`)(1,`span`,22),K(2),z(),R(3,`span`,19),K(4),z(),A(5,KM,2,1,`span`,23),z()),e&2){let e=t.$implicit,n=W(5);D(2),q(n.clock(e.at)),D(2),q(e.state),D(),j(e.hydration===`not-configured`?-1:5)}}function JM(e,t){if(e&1&&(R(0,`h3`,20),K(1,`Transitions`),z(),R(2,`ol`,21),M(3,qM,6,3,`li`,null,Yh),z()),e&2){let e=W(2).$implicit;D(3),N(e.block.transitions)}}function YM(e,t){if(e&1){let e=B();R(0,`li`)(1,`button`,25),U(`click`,function(){let t=S(e).$implicit;return C(W(5).showNode.emit(t.id))}),K(2),R(3,`span`,19),K(4),z()()()}if(e&2){let e=t.$implicit;D(2),J(` Show `,e.name,` `),D(2),J(`<`,e.tag,`>`)}}function XM(e,t){if(e&1&&(R(0,`h3`,20),K(1,`Hydration mismatches`),z(),R(2,`ul`,24),M(3,YM,5,2,`li`,null,FM),z()),e&2){let e=W(2).$implicit;D(3),N(e.mismatches)}}function ZM(e,t){if(e&1&&(R(0,`div`,17)(1,`dl`)(2,`dt`),K(3,`Block`),z(),R(4,`dd`,19),K(5),z(),A(6,UM,4,2),A(7,WM,4,1),A(8,GM,4,1),R(9,`dt`),K(10,`Root elements`),z(),R(11,`dd`),K(12),z(),R(13,`dt`),K(14,`Triggers`),z(),R(15,`dd`,19),K(16),z()(),A(17,JM,5,0),A(18,XM,5,0),z()),e&2){let e,t=W().$implicit;V(`id`,`defer-detail-`+t.block.id),D(5),q(t.block.id),D(),j((e=t.block.owner)?6:-1,e),D(),j(t.block.since?7:-1),D(),j(t.block.hydration===`hydrated`?8:-1),D(4),q(t.block.rootIds.length||`None rendered`),D(4),q(t.block.triggers.join(`, `)||`None`),D(),j(t.block.transitions?.length?17:-1),D(),j(t.mismatches.length?18:-1)}}function QM(e,t){if(e&1){let e=B();R(0,`li`,4)(1,`button`,5),U(`click`,function(){let t=S(e).$implicit;return C(W(2).showOwner.emit(t.block))})(`focus`,function(){let t=S(e).$implicit;return C(W(2).highlight.emit(t.block))})(`blur`,function(){return S(e),C(W(2).highlight.emit(null))})(`mouseenter`,function(){let t=S(e).$implicit;return C(W(2).highlight.emit(t.block))})(`mouseleave`,function(){return S(e),C(W(2).highlight.emit(null))}),R(2,`span`,6),K(3),z(),R(4,`span`,7),K(5),z(),M(6,RM,3,4,`span`,8,PM),A(8,zM,2,2,`span`,9),A(9,BM,2,0,`span`,9),A(10,VM,2,1,`span`,10),A(11,HM,2,0,`span`,11),R(12,`span`,12),K(13),z()(),R(14,`button`,13),U(`click`,function(){let t=S(e).$implicit;return C(W(2).toggle(t.block.id))}),w(),R(15,`svg`,14),sg(16,`path`,15),z(),ls(),R(17,`span`,16),K(18),z()(),A(19,ZM,19,9,`div`,17),z()}if(e&2){let e=t.$implicit,n=W(2);D(),k(`aria-disabled`,e.block.owner?null:`true`),D(2),q(e.block.owner?.name??`Unknown component`),D(),Qg(`defer-state-`+e.block.state),D(),q(e.block.state),D(),N(e.notes),D(2),j(e.hydrated?8:-1),D(),j(e.block.hasErrorBlock?9:-1),D(),j(e.timings?10:-1),D(),j(e.mismatches.length?11:-1),D(2),q(e.block.triggers.join(`, `)||`no triggers`),D(),k(`aria-expanded`,n.isOpen(e.block.id))(`aria-controls`,n.isOpen(e.block.id)?`defer-detail-`+e.block.id:null),D(4),J(`Details of the block in `,e.block.owner?.name??`an unknown component`),D(),j(n.isOpen(e.block.id)?19:-1)}}function $M(e,t){if(e&1&&(R(0,`section`,0)(1,`h2`,1),K(2,` Defer blocks `),R(3,`span`,2),K(4),z()(),R(5,`ul`,3),M(6,QM,20,14,`li`,4,NM),z()()),e&2){let e=W();D(4),Y(``,e.rows().length,``,e.truncated()?`+`:``),D(2),N(e.rows())}}function eN(e){return e<1e3?`${e}ms`:`${Number((e/1e3).toFixed(2))}s`}function tN(e){let t=[],n=e.placeholder?.minimumTime;n!=null&&t.push(`placeholder min ${eN(n)}`);let r=[e.loading?.afterTime==null?``:`after ${eN(e.loading.afterTime)}`,e.loading?.minimumTime==null?``:`min ${eN(e.loading.minimumTime)}`].filter(Boolean);return r.length&&t.push(`loading ${r.join(`, `)}`),t.join(` · `)}var nN=class e{blocks=$([]);truncated=$(!1);clockOffset=$(0);showOwner=ev();mismatches=$([]);showNode=ev();open=T(new Set);highlight=ev();now=T(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:cT({...t,since:t.since||e},e),timings:tN(t),mismatches:this.mismatches().filter(e=>t.rootIds.includes(e.id)),hydrated:t.hydration===`hydrated`?aT(t):``}))});isOpen(e){return this.open().has(e)}toggle(e){this.open.update(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n})}clock(e){return XE(e)}constructor(){let e,t=()=>{clearInterval(e),e=void 0};E(()=>{if(!this.waiting())return t();e===void 0&&(this.now.set(Date.now()),e=setInterval(()=>this.now.set(Date.now()),1e3))}),x(ys).onDestroy(t)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-defer-blocks`]],inputs:{blocks:[1,`blocks`],truncated:[1,`truncated`],clockOffset:[1,`clockOffset`],mismatches:[1,`mismatches`]},outputs:{showOwner:`showOwner`,showNode:`showNode`,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`],[1,`defer-item`],[`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,`flag`,`note-failed`],[1,`triggers`,`mono`],[`type`,`button`,1,`defer-toggle`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`m9 6 6 6-6 6`],[1,`sr-only`],[1,`defer-detail`,3,`id`],[`aria-hidden`,`true`],[1,`mono`],[1,`detail-label`],[1,`transitions`],[1,`when`],[1,`muted`],[1,`mismatch-links`],[`type`,`button`,3,`click`]],template:function(e,t){e&1&&A(0,$M,8,2,`section`,0),e&2&&j(t.rows().length?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})},NM=(e,t)=>t.block.id,PM=(e,t)=>t.kind,FM=(e,t)=>t.id;function IM(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,e.label,` `)}}function LM(e,t){if(e&1&&(K(0),R(1,`span`,18),K(2),z()),e&2){let e=W().$implicit;J(` `,e.kind,` `),D(2),J(``,e.seconds,`s`)}}function RM(e,t){if(e&1&&(R(0,`span`,9),A(1,IM,1,1)(2,LM,3,2),z()),e&2){let e=t.$implicit;e_(`note-`+e.kind),k(`title`,e.text),D(),j(e.seconds===void 0?1:2)}}function zM(e,t){if(e&1&&(R(0,`span`,9),K(1),z()),e&2){let e=W().$implicit;k(`title`,e.block.hydratedAt===void 0?`The block hydrated before the devtools attached to the page.`:null),D(),q(e.hydrated)}}function BM(e,t){e&1&&(R(0,`span`,9),K(1,`@error block`),z())}function VM(e,t){if(e&1&&(R(0,`span`,10),K(1),z()),e&2){let e=W().$implicit;D(),q(e.timings)}}function HM(e,t){e&1&&(R(0,`span`,11),K(1,`mismatch`),z())}function UM(e,t){if(e&1&&(R(0,`dt`),K(1,`Template of`),z(),R(2,`dd`,19),K(3),z()),e&2){let e=t;D(3),Y(``,e.name,` <`,e.tag,`>`)}}function WM(e,t){if(e&1&&(R(0,`dt`),K(1,`In this state since`),z(),R(2,`dd`),K(3),z()),e&2){let e=W(2).$implicit,t=W(2);D(3),q(t.clock(e.block.since))}}function GM(e,t){if(e&1&&(R(0,`dt`),K(1,`Hydrated`),z(),R(2,`dd`),K(3),z()),e&2){let e=W(2).$implicit,t=W(2);D(3),J(` `,e.block.hydratedAt===void 0?`Before the devtools attached`:t.clock(e.block.hydratedAt),` `)}}function KM(e,t){if(e&1&&(R(0,`span`,23),K(1),z()),e&2){let e=W().$implicit;D(),q(e.hydration)}}function qM(e,t){if(e&1&&(R(0,`li`)(1,`span`,22),K(2),z(),R(3,`span`,19),K(4),z(),A(5,KM,2,1,`span`,23),z()),e&2){let e=t.$implicit,n=W(5);D(2),q(n.clock(e.at)),D(2),q(e.state),D(),j(e.hydration===`not-configured`?-1:5)}}function JM(e,t){if(e&1&&(R(0,`h3`,20),K(1,`Transitions`),z(),R(2,`ol`,21),M(3,qM,6,3,`li`,null,Zh),z()),e&2){let e=W(2).$implicit;D(3),N(e.block.transitions)}}function YM(e,t){if(e&1){let e=B();R(0,`li`)(1,`button`,25),U(`click`,function(){let t=S(e).$implicit;return C(W(5).showNode.emit(t.id))}),K(2),R(3,`span`,19),K(4),z()()()}if(e&2){let e=t.$implicit;D(2),J(` Show `,e.name,` `),D(2),J(`<`,e.tag,`>`)}}function XM(e,t){if(e&1&&(R(0,`h3`,20),K(1,`Hydration mismatches`),z(),R(2,`ul`,24),M(3,YM,5,2,`li`,null,FM),z()),e&2){let e=W(2).$implicit;D(3),N(e.mismatches)}}function ZM(e,t){if(e&1&&(R(0,`div`,17)(1,`dl`)(2,`dt`),K(3,`Block`),z(),R(4,`dd`,19),K(5),z(),A(6,UM,4,2),A(7,WM,4,1),A(8,GM,4,1),R(9,`dt`),K(10,`Root elements`),z(),R(11,`dd`),K(12),z(),R(13,`dt`),K(14,`Triggers`),z(),R(15,`dd`,19),K(16),z()(),A(17,JM,5,0),A(18,XM,5,0),z()),e&2){let e,t=W().$implicit;V(`id`,`defer-detail-`+t.block.id),D(5),q(t.block.id),D(),j((e=t.block.owner)?6:-1,e),D(),j(t.block.since?7:-1),D(),j(t.block.hydration===`hydrated`?8:-1),D(4),q(t.block.rootIds.length||`None rendered`),D(4),q(t.block.triggers.join(`, `)||`None`),D(),j(t.block.transitions?.length?17:-1),D(),j(t.mismatches.length?18:-1)}}function QM(e,t){if(e&1){let e=B();R(0,`li`,4)(1,`button`,5),U(`click`,function(){let t=S(e).$implicit;return C(W(2).showOwner.emit(t.block))})(`focus`,function(){let t=S(e).$implicit;return C(W(2).highlight.emit(t.block))})(`blur`,function(){return S(e),C(W(2).highlight.emit(null))})(`mouseenter`,function(){let t=S(e).$implicit;return C(W(2).highlight.emit(t.block))})(`mouseleave`,function(){return S(e),C(W(2).highlight.emit(null))}),R(2,`span`,6),K(3),z(),R(4,`span`,7),K(5),z(),M(6,RM,3,4,`span`,8,PM),A(8,zM,2,2,`span`,9),A(9,BM,2,0,`span`,9),A(10,VM,2,1,`span`,10),A(11,HM,2,0,`span`,11),R(12,`span`,12),K(13),z()(),R(14,`button`,13),U(`click`,function(){let t=S(e).$implicit;return C(W(2).toggle(t.block.id))}),w(),R(15,`svg`,14),lg(16,`path`,15),z(),ls(),R(17,`span`,16),K(18),z()(),A(19,ZM,19,9,`div`,17),z()}if(e&2){let e=t.$implicit,n=W(2);D(),k(`aria-disabled`,e.block.owner?null:`true`),D(2),q(e.block.owner?.name??`Unknown component`),D(),e_(`defer-state-`+e.block.state),D(),q(e.block.state),D(),N(e.notes),D(2),j(e.hydrated?8:-1),D(),j(e.block.hasErrorBlock?9:-1),D(),j(e.timings?10:-1),D(),j(e.mismatches.length?11:-1),D(2),q(e.block.triggers.join(`, `)||`no triggers`),D(),k(`aria-expanded`,n.isOpen(e.block.id))(`aria-controls`,n.isOpen(e.block.id)?`defer-detail-`+e.block.id:null),D(4),J(`Details of the block in `,e.block.owner?.name??`an unknown component`),D(),j(n.isOpen(e.block.id)?19:-1)}}function $M(e,t){if(e&1&&(R(0,`section`,0)(1,`h2`,1),K(2,` Defer blocks `),R(3,`span`,2),K(4),z()(),R(5,`ul`,3),M(6,QM,20,14,`li`,4,NM),z()()),e&2){let e=W();D(4),Y(``,e.rows().length,``,e.truncated()?`+`:``),D(2),N(e.rows())}}function eN(e){return e<1e3?`${e}ms`:`${Number((e/1e3).toFixed(2))}s`}function tN(e){let t=[],n=e.placeholder?.minimumTime;n!=null&&t.push(`placeholder min ${eN(n)}`);let r=[e.loading?.afterTime==null?``:`after ${eN(e.loading.afterTime)}`,e.loading?.minimumTime==null?``:`min ${eN(e.loading.minimumTime)}`].filter(Boolean);return r.length&&t.push(`loading ${r.join(`, `)}`),t.join(` · `)}var nN=class e{blocks=$([]);truncated=$(!1);clockOffset=$(0);showOwner=nv();mismatches=$([]);showNode=nv();open=T(new Set);highlight=nv();now=T(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:cT({...t,since:t.since||e},e),timings:tN(t),mismatches:this.mismatches().filter(e=>t.rootIds.includes(e.id)),hydrated:t.hydration===`hydrated`?aT(t):``}))});isOpen(e){return this.open().has(e)}toggle(e){this.open.update(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n})}clock(e){return XE(e)}constructor(){let e,t=()=>{clearInterval(e),e=void 0};E(()=>{if(!this.waiting())return t();e===void 0&&(this.now.set(Date.now()),e=setInterval(()=>this.now.set(Date.now()),1e3))}),x(ys).onDestroy(t)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-defer-blocks`]],inputs:{blocks:[1,`blocks`],truncated:[1,`truncated`],clockOffset:[1,`clockOffset`],mismatches:[1,`mismatches`]},outputs:{showOwner:`showOwner`,showNode:`showNode`,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`],[1,`defer-item`],[`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,`flag`,`note-failed`],[1,`triggers`,`mono`],[`type`,`button`,1,`defer-toggle`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`m9 6 6 6-6 6`],[1,`sr-only`],[1,`defer-detail`,3,`id`],[`aria-hidden`,`true`],[1,`mono`],[1,`detail-label`],[1,`transitions`],[1,`when`],[1,`muted`],[1,`mismatch-links`],[`type`,`button`,3,`click`]],template:function(e,t){e&1&&A(0,$M,8,2,`section`,0),e&2&&j(t.rows().length?0:-1)},styles:[`[_nghost-%COMP%] { display: block; } @@ -2513,7 +2513,7 @@ button.edit[_ngcontent-%COMP%] { min-width: 0; text-overflow: ellipsis; white-space: nowrap; -}`]})},rN=(e,t)=>t.id;function iN(e,t){if(e&1&&(F(0,`p`,4),K(1),I()),e&2){let e=W(2);D(),J(`The page has more @for blocks than the `,e.length,` listed.`)}}function aN(e,t){e&1&&(F(0,`span`,9),K(1,`@empty showing`),I())}function oN(e,t){e&1&&(F(0,`span`,10),K(1,`@empty`),I())}function sN(e,t){e&1&&(F(0,`span`,10),K(1,`renders nothing`),I())}function cN(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,6),H(`click`,function(){let t=S(e).$implicit;return C(W(3).showOwner.emit(t))})(`focus`,function(){let t=S(e).$implicit,n=W(3);return C(n.highlight.emit(n.target(t)))})(`blur`,function(){return S(e),C(W(3).highlight.emit(null))})(`mouseenter`,function(){let t=S(e).$implicit,n=W(3);return C(n.highlight.emit(n.target(t)))})(`mouseleave`,function(){return S(e),C(W(3).highlight.emit(null))}),F(2,`span`,7),K(3),I(),F(4,`span`,8),K(5),I(),A(6,aN,2,0,`span`,9)(7,oN,2,0,`span`,10)(8,sN,2,0,`span`,10),F(9,`span`,11),K(10),I()()()}if(e&2){let e=t.$implicit,n=W(3);D(),k(`aria-disabled`,e.owner?null:`true`),D(2),q(e.owner?.name??`Unknown component`),D(2),Y(` `,e.count,` `,e.count===1?`item`:`items`,` `),D(),j(e.showingEmpty?6:e.hasEmptyBlock?7:e.count===0?8:-1),D(4),q(n.trackLabel(e))}}function lN(e,t){if(e&1&&(F(0,`section`,1)(1,`h2`,2),K(2,` @for blocks `),F(3,`span`,3),K(4),I()(),A(5,iN,2,1,`p`,4),F(6,`ul`,5),M(7,cN,11,6,`li`,null,rN),I()()),e&2){let e=W(),t=W();D(4),q(t.truncated()?e.length+`+`:e.length),D(),j(t.truncated()?5:-1),D(2),N(e)}}function uN(e,t){e&1&&A(0,lN,9,2,`section`,1),e&2&&j(t.length?0:-1)}function dN(e,t){e&1&&L(0,`app-angular-unavailable`,0),e&2&&P(`page`,W().angular())}var fN={$index:`track $index`,item:`track item`,function:`track expression`},pN=class e{blocks=$(void 0);truncated=$(!1);supported=$(null);angular=$(null);showOwner=ev();highlight=ev();target(e){return e.rootIds[0]??e.owner?.id??null}trackLabel(e){return e.track?fN[e.track]:`track unknown`}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-for-blocks`]],inputs:{blocks:[1,`blocks`],truncated:[1,`truncated`],supported:[1,`supported`],angular:[1,`angular`]},outputs:{showOwner:`showOwner`,highlight:`highlight`},decls:2,vars:1,consts:[[`capability`,`forBlocks`,`missing`,``,`compact`,``,1,`for`,3,`page`],[`aria-labelledby`,`ct-for-title`,1,`for`],[`id`,`ct-for-title`,1,`for-title`],[1,`pill`],[1,`note`],[1,`for-list`],[`type`,`button`,1,`for-row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`name`,`mono`],[1,`count`],[1,`flag`,`empty`],[1,`flag`],[1,`track`,`mono`]],template:function(e,t){if(e&1&&A(0,uN,1,1)(1,dN,1,1,`app-angular-unavailable`,0),e&2){let e;j((e=t.blocks())?0:t.supported()===!1?1:-1,e)}},dependencies:[bD],styles:[`[_nghost-%COMP%] { +}`]})},rN=(e,t)=>t.id;function iN(e,t){if(e&1&&(F(0,`p`,4),K(1),I()),e&2){let e=W(2);D(),J(`The page has more @for blocks than the `,e.length,` listed.`)}}function aN(e,t){e&1&&(F(0,`span`,9),K(1,`@empty showing`),I())}function oN(e,t){e&1&&(F(0,`span`,10),K(1,`@empty`),I())}function sN(e,t){e&1&&(F(0,`span`,10),K(1,`renders nothing`),I())}function cN(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,6),H(`click`,function(){let t=S(e).$implicit;return C(W(3).showOwner.emit(t))})(`focus`,function(){let t=S(e).$implicit,n=W(3);return C(n.highlight.emit(n.target(t)))})(`blur`,function(){return S(e),C(W(3).highlight.emit(null))})(`mouseenter`,function(){let t=S(e).$implicit,n=W(3);return C(n.highlight.emit(n.target(t)))})(`mouseleave`,function(){return S(e),C(W(3).highlight.emit(null))}),F(2,`span`,7),K(3),I(),F(4,`span`,8),K(5),I(),A(6,aN,2,0,`span`,9)(7,oN,2,0,`span`,10)(8,sN,2,0,`span`,10),F(9,`span`,11),K(10),I()()()}if(e&2){let e=t.$implicit,n=W(3);D(),k(`aria-disabled`,e.owner?null:`true`),D(2),q(e.owner?.name??`Unknown component`),D(2),Y(` `,e.count,` `,e.count===1?`item`:`items`,` `),D(),j(e.showingEmpty?6:e.hasEmptyBlock?7:e.count===0?8:-1),D(4),q(n.trackLabel(e))}}function lN(e,t){if(e&1&&(F(0,`section`,1)(1,`h2`,2),K(2,` @for blocks `),F(3,`span`,3),K(4),I()(),A(5,iN,2,1,`p`,4),F(6,`ul`,5),M(7,cN,11,6,`li`,null,rN),I()()),e&2){let e=W(),t=W();D(4),q(t.truncated()?e.length+`+`:e.length),D(),j(t.truncated()?5:-1),D(2),N(e)}}function uN(e,t){e&1&&A(0,lN,9,2,`section`,1),e&2&&j(t.length?0:-1)}function dN(e,t){e&1&&L(0,`app-angular-unavailable`,0),e&2&&P(`page`,W().angular())}var fN={$index:`track $index`,item:`track item`,function:`track expression`},pN=class e{blocks=$(void 0);truncated=$(!1);supported=$(null);angular=$(null);showOwner=nv();highlight=nv();target(e){return e.rootIds[0]??e.owner?.id??null}trackLabel(e){return e.track?fN[e.track]:`track unknown`}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-for-blocks`]],inputs:{blocks:[1,`blocks`],truncated:[1,`truncated`],supported:[1,`supported`],angular:[1,`angular`]},outputs:{showOwner:`showOwner`,highlight:`highlight`},decls:2,vars:1,consts:[[`capability`,`forBlocks`,`missing`,``,`compact`,``,1,`for`,3,`page`],[`aria-labelledby`,`ct-for-title`,1,`for`],[`id`,`ct-for-title`,1,`for-title`],[1,`pill`],[1,`note`],[1,`for-list`],[`type`,`button`,1,`for-row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`name`,`mono`],[1,`count`],[1,`flag`,`empty`],[1,`flag`],[1,`track`,`mono`]],template:function(e,t){if(e&1&&A(0,uN,1,1)(1,dN,1,1,`app-angular-unavailable`,0),e&2){let e;j((e=t.blocks())?0:t.supported()===!1?1:-1,e)}},dependencies:[bD],styles:[`[_nghost-%COMP%] { display: block; } @@ -2631,7 +2631,7 @@ button.edit[_ngcontent-%COMP%] { min-width: 0; text-overflow: ellipsis; white-space: nowrap; -}`]})},mN=(e,t)=>t.id;function hN(e,t){if(e&1&&(F(0,`p`,11),K(1),I(),F(2,`h3`,7),K(3,`Still retained`),I(),F(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. `),I()),e&2){let e=W(),t=W();D(),q(t.plural(e.navigations,`navigation`))}}function gN(e,t){e&1&&(F(0,`p`,6),K(1,` This page cannot track destroyed components. It needs WeakRef, FinalizationRegistry and the Angular debug API of a development build. `),I())}function _N(e,t){if(e&1&&(F(0,`span`,18),K(1),I()),e&2){let e=W().$implicit,t=W(4);D(),q(t.plural(e.subscriptions,`open subscription`))}}function vN(e,t){if(e&1&&(F(0,`li`,13)(1,`span`,14),K(2),I(),F(3,`span`,15),K(4),I(),F(5,`span`,16),K(6),I(),F(7,`span`,17),K(8),I(),A(9,_N,2,1,`span`,18),I()),e&2){let e=t.$implicit,n=W(4);D(2),q(e.name),D(2),q(e.route||`/`),D(2),J(``,n.plural(e.navigations,`navigation`),` ago`),D(2),q(n.ageOf(e)),D(),j(e.subscriptions?9:-1)}}function yN(e,t){if(e&1&&(F(0,`p`,6),K(1),I(),F(2,`ul`,12),M(3,vN,10,5,`li`,13,mN),I()),e&2){let e=W(3);D(),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. `),D(2),N(e.retained().slice(0,e.shown))}}function bN(e,t){e&1&&(F(0,`p`,6),K(1,`No destroyed component is still in memory after a few navigations.`),I())}function xN(e,t){if(e&1&&(F(0,`p`,6),K(1),F(2,`span`,19),K(3),I(),K(4,`. Navigate a few times to see whether they stay. `),I()),e&2){let e=W(3);D(),J(` `,e.plural(e.recent().length,`instance`),` destroyed recently and not collected yet: `),D(2),q(e.names(e.recent()))}}function SN(e,t){if(e&1&&(A(0,gN,2,0,`p`,6),F(1,`p`,11),K(2),I(),F(3,`h3`,7),K(4,` Still retained `),F(5,`span`,8),K(6),I()(),A(7,yN,5,2)(8,bN,2,0,`p`,6),A(9,xN,5,2,`p`,6)),e&2){let e=W(),t=W();j(e.support.retention?-1:0),D(2),y_(` `,t.plural(e.navigations,`navigation`),` · `,t.retained().length,` still retained · `,t.plural(e.totals.collected,`instance`),` collected `),D(4),q(t.retained().length),D(),j(t.retained().length?7:8),D(2),j(t.recent().length?9:-1)}}function CN(e,t){if(e&1&&(F(0,`p`,6),K(1,` Off the page but not destroyed (detached views, such as a route reuse cache): `),F(2,`span`,19),K(3),I(),K(4,`. `),I()),e&2){let e=W(2);D(3),q(e.names(e.detached()))}}function wN(e,t){if(e&1&&(F(0,`span`,8),K(1),I()),e&2){let e=W();D(),q(e.subscriptions.length)}}function TN(e,t){if(e&1&&(F(0,`span`,15),K(1),I()),e&2){let e=W().$implicit;D(),q(e.source)}}function EN(e,t){if(e&1&&(F(0,`li`,13)(1,`span`,14),K(2),I(),F(3,`span`,16),K(4),I(),F(5,`span`,18),K(6),I(),A(7,TN,2,1,`span`,15),I()),e&2){let e=t.$implicit;D(2),q(e.name),D(2),J(``,e.count,` open`),D(2),J(` `,e.reason===`instance-destroyed`?`instance destroyed`:`no instance left`,` `),D(),j(e.source?7:-1)}}function DN(e,t){if(e&1&&(F(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. `),I(),F(2,`ul`,12),M(3,EN,8,4,`li`,13,Yh),I()),e&2){let e=W(2),t=W();D(3),N(e.subscriptions.slice(0,t.shown))}}function ON(e,t){e&1&&(F(0,`p`,6),K(1,`No subscription is still open after its component went away.`),I())}function kN(e,t){e&1&&(F(0,`p`,6),K(1,` Subscriptions are tied to component classes only; Angular 20 profiler hooks tie them to instances. `),I())}function AN(e,t){if(e&1&&(A(0,DN,5,0)(1,ON,2,0,`p`,6),A(2,kN,2,0,`p`,6)),e&2){let e=W();j(+!e.subscriptions.length),D(2),j(e.support.instances?-1:2)}}function jN(e,t){e&1&&(F(0,`p`,9),K(1,` Tracking could not start: the page has no RxJS the overlay can load. `),I())}function MN(e,t){e&1&&(F(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. `),I())}function NN(e,t){e&1&&L(0,`app-angular-unavailable`,10),e&2&&P(`page`,W(2).angular())}function PN(e,t){if(e&1&&(F(0,`span`,16),K(1),I()),e&2){let e=W().$implicit,t=W(3);D(),q(t.plural(e.subscriptions,`subscription`))}}function FN(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,20),H(`click`,function(){let t=S(e).$implicit;return C(W(3).showComponent.emit(t.id))})(`focus`,function(){let t=S(e).$implicit;return C(W(3).highlight.emit(t.id))})(`blur`,function(){return S(e),C(W(3).highlight.emit(null))})(`mouseenter`,function(){let t=S(e).$implicit;return C(W(3).highlight.emit(t.id))})(`mouseleave`,function(){return S(e),C(W(3).highlight.emit(null))}),F(2,`span`,14),K(3),I(),F(4,`span`,16),K(5),I(),A(6,PN,2,1,`span`,16),I()()}if(e&2){let e=t.$implicit,n=W(2),r=W();D(3),q(e.name),D(2),q(r.effectsText(e)),D(),j(n.support.subscriptions===`on`?6:-1)}}function IN(e,t){e&1&&(F(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. `),I())}function LN(e,t){if(e&1&&(F(0,`ul`,12),M(1,FN,7,3,`li`,null,mN),I(),A(3,IN,2,0,`p`,6)),e&2){let e=W(),t=W();D(),N(e.components.slice(0,t.shown)),D(2),j(e.components.some(t.hasShared)?3:-1)}}function RN(e,t){e&1&&(F(0,`p`,6),K(1,`No component on the page has a live effect or a tracked subscription.`),I())}function zN(e,t){if(e&1&&(A(0,hN,6,1)(1,SN,10,7),A(2,CN,5,1,`p`,6),F(3,`h3`,7),K(4,` Open subscriptions after destroy `),A(5,wN,2,1,`span`,8),I(),A(6,AN,3,2)(7,jN,2,0,`p`,9)(8,MN,2,0,`p`,6),F(9,`h3`,7),K(10,` Live effects and subscriptions `),F(11,`span`,8),K(12),I()(),A(13,NN,1,1,`app-angular-unavailable`,10),A(14,LN,4,1)(15,RN,2,0,`p`,6)),e&2){let e,n=t,r=W();j(n.support.retention===`dev-di-debug`?0:1),D(2),j(r.detached().length?2:-1),D(3),j(n.support.subscriptions===`on`?5:-1),D(),j((e=n.support.subscriptions)===`on`?6:e===`unavailable`?7:8),D(6),q(n.components.length),D(),j(n.support.effects?-1:13),D(),j(n.components.length?14:15)}}function BN(e,t){e&1&&(F(0,`p`,6),K(1,`No leak data from this page yet. It comes with the next report.`),I())}var VN=20;function HN(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 UN=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,WN=class e{report=$(null);pageId=$(null);rpc=$(null);angular=$(null);now=$(()=>Date.now());showComponent=ev();highlight=ev();shown=VN;minNavigations=2;minSeconds=fw/1e3;plural=UN;busy=T(!1);announcement=T(``);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?`${HN(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=UN(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 _T(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=O({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&&(F(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Leaks`),I(),F(4,`button`,3),H(`click`,function(){return t.toggle()}),K(5,` Track subscriptions `),I(),F(6,`p`,4),K(7),I()(),F(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. `),I(),A(10,zN,16,7)(11,BN,2,0,`p`,6),I()),e&2){let e;D(4),P(`disabled`,!t.pageId()||!t.report()),k(`aria-pressed`,t.tracking())(`aria-disabled`,t.busy()||null),D(3),q(t.announcement()),D(3),j((e=t.report())?10:11,e)}},dependencies:[bD],styles:[`[_nghost-%COMP%] { +}`]})},mN=(e,t)=>t.id;function hN(e,t){if(e&1&&(F(0,`p`,11),K(1),I(),F(2,`h3`,7),K(3,`Still retained`),I(),F(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. `),I()),e&2){let e=W(),t=W();D(),q(t.plural(e.navigations,`navigation`))}}function gN(e,t){e&1&&(F(0,`p`,6),K(1,` This page cannot track destroyed components. It needs WeakRef, FinalizationRegistry and the Angular debug API of a development build. `),I())}function _N(e,t){if(e&1&&(F(0,`span`,18),K(1),I()),e&2){let e=W().$implicit,t=W(4);D(),q(t.plural(e.subscriptions,`open subscription`))}}function vN(e,t){if(e&1&&(F(0,`li`,13)(1,`span`,14),K(2),I(),F(3,`span`,15),K(4),I(),F(5,`span`,16),K(6),I(),F(7,`span`,17),K(8),I(),A(9,_N,2,1,`span`,18),I()),e&2){let e=t.$implicit,n=W(4);D(2),q(e.name),D(2),q(e.route||`/`),D(2),J(``,n.plural(e.navigations,`navigation`),` ago`),D(2),q(n.ageOf(e)),D(),j(e.subscriptions?9:-1)}}function yN(e,t){if(e&1&&(F(0,`p`,6),K(1),I(),F(2,`ul`,12),M(3,vN,10,5,`li`,13,mN),I()),e&2){let e=W(3);D(),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. `),D(2),N(e.retained().slice(0,e.shown))}}function bN(e,t){e&1&&(F(0,`p`,6),K(1,`No destroyed component is still in memory after a few navigations.`),I())}function xN(e,t){if(e&1&&(F(0,`p`,6),K(1),F(2,`span`,19),K(3),I(),K(4,`. Navigate a few times to see whether they stay. `),I()),e&2){let e=W(3);D(),J(` `,e.plural(e.recent().length,`instance`),` destroyed recently and not collected yet: `),D(2),q(e.names(e.recent()))}}function SN(e,t){if(e&1&&(A(0,gN,2,0,`p`,6),F(1,`p`,11),K(2),I(),F(3,`h3`,7),K(4,` Still retained `),F(5,`span`,8),K(6),I()(),A(7,yN,5,2)(8,bN,2,0,`p`,6),A(9,xN,5,2,`p`,6)),e&2){let e=W(),t=W();j(e.support.retention?-1:0),D(2),x_(` `,t.plural(e.navigations,`navigation`),` · `,t.retained().length,` still retained · `,t.plural(e.totals.collected,`instance`),` collected `),D(4),q(t.retained().length),D(),j(t.retained().length?7:8),D(2),j(t.recent().length?9:-1)}}function CN(e,t){if(e&1&&(F(0,`p`,6),K(1,` Off the page but not destroyed (detached views, such as a route reuse cache): `),F(2,`span`,19),K(3),I(),K(4,`. `),I()),e&2){let e=W(2);D(3),q(e.names(e.detached()))}}function wN(e,t){if(e&1&&(F(0,`span`,8),K(1),I()),e&2){let e=W();D(),q(e.subscriptions.length)}}function TN(e,t){if(e&1&&(F(0,`span`,15),K(1),I()),e&2){let e=W().$implicit;D(),q(e.source)}}function EN(e,t){if(e&1&&(F(0,`li`,13)(1,`span`,14),K(2),I(),F(3,`span`,16),K(4),I(),F(5,`span`,18),K(6),I(),A(7,TN,2,1,`span`,15),I()),e&2){let e=t.$implicit;D(2),q(e.name),D(2),J(``,e.count,` open`),D(2),J(` `,e.reason===`instance-destroyed`?`instance destroyed`:`no instance left`,` `),D(),j(e.source?7:-1)}}function DN(e,t){if(e&1&&(F(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. `),I(),F(2,`ul`,12),M(3,EN,8,4,`li`,13,Zh),I()),e&2){let e=W(2),t=W();D(3),N(e.subscriptions.slice(0,t.shown))}}function ON(e,t){e&1&&(F(0,`p`,6),K(1,`No subscription is still open after its component went away.`),I())}function kN(e,t){e&1&&(F(0,`p`,6),K(1,` Subscriptions are tied to component classes only; Angular 20 profiler hooks tie them to instances. `),I())}function AN(e,t){if(e&1&&(A(0,DN,5,0)(1,ON,2,0,`p`,6),A(2,kN,2,0,`p`,6)),e&2){let e=W();j(+!e.subscriptions.length),D(2),j(e.support.instances?-1:2)}}function jN(e,t){e&1&&(F(0,`p`,9),K(1,` Tracking could not start: the page has no RxJS the overlay can load. `),I())}function MN(e,t){e&1&&(F(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. `),I())}function NN(e,t){e&1&&L(0,`app-angular-unavailable`,10),e&2&&P(`page`,W(2).angular())}function PN(e,t){if(e&1&&(F(0,`span`,16),K(1),I()),e&2){let e=W().$implicit,t=W(3);D(),q(t.plural(e.subscriptions,`subscription`))}}function FN(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,20),H(`click`,function(){let t=S(e).$implicit;return C(W(3).showComponent.emit(t.id))})(`focus`,function(){let t=S(e).$implicit;return C(W(3).highlight.emit(t.id))})(`blur`,function(){return S(e),C(W(3).highlight.emit(null))})(`mouseenter`,function(){let t=S(e).$implicit;return C(W(3).highlight.emit(t.id))})(`mouseleave`,function(){return S(e),C(W(3).highlight.emit(null))}),F(2,`span`,14),K(3),I(),F(4,`span`,16),K(5),I(),A(6,PN,2,1,`span`,16),I()()}if(e&2){let e=t.$implicit,n=W(2),r=W();D(3),q(e.name),D(2),q(r.effectsText(e)),D(),j(n.support.subscriptions===`on`?6:-1)}}function IN(e,t){e&1&&(F(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. `),I())}function LN(e,t){if(e&1&&(F(0,`ul`,12),M(1,FN,7,3,`li`,null,mN),I(),A(3,IN,2,0,`p`,6)),e&2){let e=W(),t=W();D(),N(e.components.slice(0,t.shown)),D(2),j(e.components.some(t.hasShared)?3:-1)}}function RN(e,t){e&1&&(F(0,`p`,6),K(1,`No component on the page has a live effect or a tracked subscription.`),I())}function zN(e,t){if(e&1&&(A(0,hN,6,1)(1,SN,10,7),A(2,CN,5,1,`p`,6),F(3,`h3`,7),K(4,` Open subscriptions after destroy `),A(5,wN,2,1,`span`,8),I(),A(6,AN,3,2)(7,jN,2,0,`p`,9)(8,MN,2,0,`p`,6),F(9,`h3`,7),K(10,` Live effects and subscriptions `),F(11,`span`,8),K(12),I()(),A(13,NN,1,1,`app-angular-unavailable`,10),A(14,LN,4,1)(15,RN,2,0,`p`,6)),e&2){let e,n=t,r=W();j(n.support.retention===`dev-di-debug`?0:1),D(2),j(r.detached().length?2:-1),D(3),j(n.support.subscriptions===`on`?5:-1),D(),j((e=n.support.subscriptions)===`on`?6:e===`unavailable`?7:8),D(6),q(n.components.length),D(),j(n.support.effects?-1:13),D(),j(n.components.length?14:15)}}function BN(e,t){e&1&&(F(0,`p`,6),K(1,`No leak data from this page yet. It comes with the next report.`),I())}var VN=20;function HN(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 UN=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,WN=class e{report=$(null);pageId=$(null);rpc=$(null);angular=$(null);now=$(()=>Date.now());showComponent=nv();highlight=nv();shown=VN;minNavigations=2;minSeconds=fw/1e3;plural=UN;busy=T(!1);announcement=T(``);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?`${HN(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=UN(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 _T(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=O({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&&(F(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Leaks`),I(),F(4,`button`,3),H(`click`,function(){return t.toggle()}),K(5,` Track subscriptions `),I(),F(6,`p`,4),K(7),I()(),F(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. `),I(),A(10,zN,16,7)(11,BN,2,0,`p`,6),I()),e&2){let e;D(4),P(`disabled`,!t.pageId()||!t.report()),k(`aria-pressed`,t.tracking())(`aria-disabled`,t.busy()||null),D(3),q(t.announcement()),D(3),j((e=t.report())?10:11,e)}},dependencies:[bD],styles:[`[_nghost-%COMP%] { display: block; } @@ -2787,7 +2787,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); -}`]})},GN=12,KN=900;function qN(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 JN=class{options;injector=x(_s);visibleTop=T(0);viewport=T(KN);rowHeight;host=null;scroller=null;detach=null;enabled;range;padTop;padBottom;constructor(e){this.options=e,this.rowHeight=T(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)-GN));return{start:a,end:Math.min(t,Math.max(a,Math.ceil((i+r)/n)+GN))}}),this.padTop=X(()=>this.enabled()?this.range().start*this.rowHeight():0),this.padBottom=X(()=>this.enabled()?(e.count()-this.range().end)*this.rowHeight():0),E(()=>{e.count(),td(()=>this.update(),{injector:this.injector})}),x(ys).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:KN)}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&&td(t,{injector:this.injector})}};function YN(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 XN=e=>{let t=parseFloat(e);return Number.isFinite(t)?t:0};function ZN(e,t=8){let n=e.ownerDocument.defaultView;if(!n)return e.offsetHeight+t;let r=YN(e),i=r?n.getComputedStyle(r):null,a=i?XN(i.paddingTop):0,o=i?XN(i.scrollPaddingTop):0,s=XN(n.getComputedStyle(e).top);return Math.max(0,Math.ceil(a+s+e.offsetHeight+t-o))}function QN(e,t,n=8){let r=YN(e),i=t.getBoundingClientRect().bottom+n-e.getBoundingClientRect().top;i<=0||(r?r.scrollTop-=i:e.ownerDocument.defaultView?.scrollBy(0,-i))}var $N=[`input`];function eP(e,t){if(e&1){let e=B();R(0,`button`,9),U(`click`,function(){return S(e),C(W().save())}),w(),R(1,`svg`,10),sg(2,`path`,11),z(),ls(),R(3,`span`,12),K(4,`Save`),z()()}e&2&&k(`aria-label`,`Save filter `+W().query())}function tP(e,t){if(e&1){let e=B();R(0,`li`,14)(1,`button`,15),U(`click`,function(){let t=S(e).$implicit;return C(W(2).apply(t))}),K(2),z(),R(3,`button`,16),U(`click`,function(){let t=S(e).$implicit;return C(W(2).remove(t))}),w(),R(4,`svg`,10),sg(5,`path`,17),z()()()}if(e&2){let e=t.$implicit,n=W(2);G(`active`,e===n.query()),D(),k(`aria-pressed`,e===n.query())(`title`,e),D(),J(` `,e,` `),D(),k(`aria-label`,`Remove saved filter `+e)}}function nP(e,t){if(e&1&&(R(0,`ul`,7),M(1,tP,6,6,`li`,13,Xh),z()),e&2){let e=W();D(),N(e.saved())}}function rP(e,t){if(e&1&&(R(0,`span`,8),K(1),z()),e&2){let e=W();D(),q(e.announcement())}}var iP=`pangular-pref:filters`,aP=200;function oP(e){try{let t=localStorage.getItem(`${iP}:${e}`),n=t?JSON.parse(t):[];if(!Array.isArray(n))return[];let r=n.filter(e=>typeof e==`string`&&!!e.trim()&&e.length<=aP);return[...new Set(r)].slice(-8)}catch{return[]}}function sP(e,t){try{t.length?localStorage.setItem(`${iP}:${e}`,JSON.stringify(t)):localStorage.removeItem(`${iP}:${e}`)}catch{}}var cP=class e{value=av(``);label=$(`Filter`);placeholder=$(`Filter`);inputId=$(null);describedBy=$(null);saveKey=$(null);input=sv.required(`input`);host=x(kl);injector=x(_s);announcement=T(``);query=X(()=>this.value().trim());saved=Q(()=>{let e=this.saveKey();return e?oP(e):[]});canSave=X(()=>{let e=this.query();return!!this.saveKey()&&!!e&&e.length<=aP&&!this.saved().includes(e)&&this.saved().length<8});focus(){this.input().nativeElement.focus()}clear(e){this.value()&&(e.preventDefault(),e.stopPropagation(),this.value.set(``))}save(){let e=this.saveKey(),t=this.query();if(!e||!this.canSave())return;let n=[...this.saved(),t];this.saved.set(n),sP(e,n),this.say(`Filter ${t} saved.`),this.focusAfterRender(`.chip:last-child .apply`)}apply(e){this.value.set(this.query()===e?``:e)}remove(e){let t=this.saveKey();if(!t)return;let n=this.saved().indexOf(e),r=this.saved().filter(t=>t!==e);if(this.saved.set(r),sP(t,r),this.say(`Saved filter ${e} removed.`),!r.length){this.focus();return}let i=Math.min(n,r.length-1)+1;this.focusAfterRender(`.chip:nth-child(${i}) .apply`)}focusAfterRender(e){td(()=>{let t=this.host.nativeElement.querySelector(e);t?t.focus():this.focus()},{injector:this.injector})}say(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-search-field`]],viewQuery:function(e,t){e&1&&Og(t.input,$N,5),e&2&&kg()},inputs:{value:[1,`value`],label:[1,`label`],placeholder:[1,`placeholder`],inputId:[1,`inputId`],describedBy:[1,`describedBy`],saveKey:[1,`saveKey`]},outputs:{value:`valueChange`},decls:9,vars:8,consts:[[`input`,``],[1,`box`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`placeholder`,`value`],[`type`,`button`,1,`save`],[`aria-label`,`Saved filters`,1,`chips`],[`role`,`status`,1,`sr-only`],[`type`,`button`,1,`save`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M6 4h12v16l-6-4-6 4z`],[1,`save-text`],[1,`chip`,3,`active`],[1,`chip`],[`type`,`button`,1,`apply`,3,`click`],[`type`,`button`,1,`remove`,3,`click`],[`d`,`M7 7l10 10M17 7 7 17`]],template:function(e,t){e&1&&(R(0,`div`,1),w(),R(1,`svg`,2),sg(2,`circle`,3)(3,`path`,4),z(),ls(),R(4,`input`,5,0),U(`input`,function(e){return t.value.set(e.target.value)})(`keydown.escape`,function(e){return t.clear(e)}),z()(),A(6,eP,5,1,`button`,6),A(7,nP,3,0,`ul`,7),A(8,rP,2,1,`span`,8)),e&2&&(D(4),V(`placeholder`,t.placeholder())(`value`,t.value()),k(`id`,t.inputId())(`aria-label`,t.label())(`aria-describedby`,t.describedBy()),D(2),j(t.canSave()?6:-1),D(),j(t.saveKey()&&t.saved().length?7:-1),D(),j(t.saveKey()?8:-1))},styles:[`[_nghost-%COMP%] { +}`]})},GN=12,KN=900;function qN(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 JN=class{options;injector=x(_s);visibleTop=T(0);viewport=T(KN);rowHeight;host=null;scroller=null;detach=null;enabled;range;padTop;padBottom;constructor(e){this.options=e,this.rowHeight=T(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)-GN));return{start:a,end:Math.min(t,Math.max(a,Math.ceil((i+r)/n)+GN))}}),this.padTop=X(()=>this.enabled()?this.range().start*this.rowHeight():0),this.padBottom=X(()=>this.enabled()?(e.count()-this.range().end)*this.rowHeight():0),E(()=>{e.count(),rd(()=>this.update(),{injector:this.injector})}),x(ys).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:KN)}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&&rd(t,{injector:this.injector})}};function YN(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 XN=e=>{let t=parseFloat(e);return Number.isFinite(t)?t:0};function ZN(e,t=8){let n=e.ownerDocument.defaultView;if(!n)return e.offsetHeight+t;let r=YN(e),i=r?n.getComputedStyle(r):null,a=i?XN(i.paddingTop):0,o=i?XN(i.scrollPaddingTop):0,s=XN(n.getComputedStyle(e).top);return Math.max(0,Math.ceil(a+s+e.offsetHeight+t-o))}function QN(e,t,n=8){let r=YN(e),i=t.getBoundingClientRect().bottom+n-e.getBoundingClientRect().top;i<=0||(r?r.scrollTop-=i:e.ownerDocument.defaultView?.scrollBy(0,-i))}var $N=[`input`];function eP(e,t){if(e&1){let e=B();R(0,`button`,9),U(`click`,function(){return S(e),C(W().save())}),w(),R(1,`svg`,10),lg(2,`path`,11),z(),ls(),R(3,`span`,12),K(4,`Save`),z()()}e&2&&k(`aria-label`,`Save filter `+W().query())}function tP(e,t){if(e&1){let e=B();R(0,`li`,14)(1,`button`,15),U(`click`,function(){let t=S(e).$implicit;return C(W(2).apply(t))}),K(2),z(),R(3,`button`,16),U(`click`,function(){let t=S(e).$implicit;return C(W(2).remove(t))}),w(),R(4,`svg`,10),lg(5,`path`,17),z()()()}if(e&2){let e=t.$implicit,n=W(2);G(`active`,e===n.query()),D(),k(`aria-pressed`,e===n.query())(`title`,e),D(),J(` `,e,` `),D(),k(`aria-label`,`Remove saved filter `+e)}}function nP(e,t){if(e&1&&(R(0,`ul`,7),M(1,tP,6,6,`li`,13,Qh),z()),e&2){let e=W();D(),N(e.saved())}}function rP(e,t){if(e&1&&(R(0,`span`,8),K(1),z()),e&2){let e=W();D(),q(e.announcement())}}var iP=`pangular-pref:filters`,aP=200;function oP(e){try{let t=localStorage.getItem(`${iP}:${e}`),n=t?JSON.parse(t):[];if(!Array.isArray(n))return[];let r=n.filter(e=>typeof e==`string`&&!!e.trim()&&e.length<=aP);return[...new Set(r)].slice(-8)}catch{return[]}}function sP(e,t){try{t.length?localStorage.setItem(`${iP}:${e}`,JSON.stringify(t)):localStorage.removeItem(`${iP}:${e}`)}catch{}}var cP=class e{value=sv(``);label=$(`Filter`);placeholder=$(`Filter`);inputId=$(null);describedBy=$(null);saveKey=$(null);input=lv.required(`input`);host=x(kl);injector=x(_s);announcement=T(``);query=X(()=>this.value().trim());saved=Q(()=>{let e=this.saveKey();return e?oP(e):[]});canSave=X(()=>{let e=this.query();return!!this.saveKey()&&!!e&&e.length<=aP&&!this.saved().includes(e)&&this.saved().length<8});focus(){this.input().nativeElement.focus()}clear(e){this.value()&&(e.preventDefault(),e.stopPropagation(),this.value.set(``))}save(){let e=this.saveKey(),t=this.query();if(!e||!this.canSave())return;let n=[...this.saved(),t];this.saved.set(n),sP(e,n),this.say(`Filter ${t} saved.`),this.focusAfterRender(`.chip:last-child .apply`)}apply(e){this.value.set(this.query()===e?``:e)}remove(e){let t=this.saveKey();if(!t)return;let n=this.saved().indexOf(e),r=this.saved().filter(t=>t!==e);if(this.saved.set(r),sP(t,r),this.say(`Saved filter ${e} removed.`),!r.length){this.focus();return}let i=Math.min(n,r.length-1)+1;this.focusAfterRender(`.chip:nth-child(${i}) .apply`)}focusAfterRender(e){rd(()=>{let t=this.host.nativeElement.querySelector(e);t?t.focus():this.focus()},{injector:this.injector})}say(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-search-field`]],viewQuery:function(e,t){e&1&&Ag(t.input,$N,5),e&2&&jg()},inputs:{value:[1,`value`],label:[1,`label`],placeholder:[1,`placeholder`],inputId:[1,`inputId`],describedBy:[1,`describedBy`],saveKey:[1,`saveKey`]},outputs:{value:`valueChange`},decls:9,vars:8,consts:[[`input`,``],[1,`box`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`placeholder`,`value`],[`type`,`button`,1,`save`],[`aria-label`,`Saved filters`,1,`chips`],[`role`,`status`,1,`sr-only`],[`type`,`button`,1,`save`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M6 4h12v16l-6-4-6 4z`],[1,`save-text`],[1,`chip`,3,`active`],[1,`chip`],[`type`,`button`,1,`apply`,3,`click`],[`type`,`button`,1,`remove`,3,`click`],[`d`,`M7 7l10 10M17 7 7 17`]],template:function(e,t){e&1&&(R(0,`div`,1),w(),R(1,`svg`,2),lg(2,`circle`,3)(3,`path`,4),z(),ls(),R(4,`input`,5,0),U(`input`,function(e){return t.value.set(e.target.value)})(`keydown.escape`,function(e){return t.clear(e)}),z()(),A(6,eP,5,1,`button`,6),A(7,nP,3,0,`ul`,7),A(8,rP,2,1,`span`,8)),e&2&&(D(4),V(`placeholder`,t.placeholder())(`value`,t.value()),k(`id`,t.inputId())(`aria-label`,t.label())(`aria-describedby`,t.describedBy()),D(2),j(t.canSave()?6:-1),D(),j(t.saveKey()&&t.saved().length?7:-1),D(),j(t.saveKey()?8:-1))},styles:[`[_nghost-%COMP%] { display: flex; flex: 1 1 220px; flex-wrap: wrap; @@ -2955,7 +2955,21 @@ input[_ngcontent-%COMP%]:focus { .save[_ngcontent-%COMP%] { transition: none; } -}`]})},lP=[`filterInput`],uP=[`treeEl`],dP=[`propFilterInput`],fP=()=>[],pP=e=>({$implicit:e}),mP=e=>({kind:`component`,id:e}),hP=(e,t)=>t.row.node.id,gP=(e,t)=>t.outlet+t.route,_P=(e,t)=>t+e;function vP(e,t){return this.sourceKey(t)}var yP=(e,t)=>t.formId,bP=(e,t)=>t.name+t.index,xP=(e,t)=>t.name,SP=(e,t)=>t.id,CP=(e,t)=>t.token+e;function wP(e,t){if(e&1){let e=B();F(0,`span`,37),K(1,`Page`),I(),F(2,`app-select`,38),H(`valueChange`,function(t){return S(e),C(W(2).selectPage(t))}),I()}if(e&2){let e=W(2);D(2),P(`options`,e.pageOptions())(`value`,e.page()?.pageId??null)}}function TP(e,t){if(e&1){let e=B();F(0,`button`,39),H(`click`,function(){return S(e),C(W(2).toggleDirectiveHosts())}),w(),F(1,`svg`,12),L(2,`path`,40)(3,`path`,41),I(),ls(),F(4,`span`,15),K(5,`Directive hosts`),I()()}e&2&&k(`aria-pressed`,W(2).showDirectiveHosts())}function EP(e,t){if(e&1){let e=B();F(0,`button`,42),H(`click`,function(){S(e);let t=W(2);return C(t.picking()?t.cancelPick():t.pick())}),w(),F(1,`svg`,12),L(2,`path`,43),I(),ls(),F(3,`span`,15),K(4),I()()}if(e&2){let e=W(2);G(`on`,e.picking()),k(`title`,e.pickLabel()),D(4),q(e.pickLabel())}}function DP(e,t){if(e&1&&(F(0,`p`,21),K(1),I()),e&2){let e=W(2);D(),q(e.pickMessage())}}function OP(e,t){if(e&1&&(F(0,`p`,22),K(1),I()),e&2){let e=W(2);D(),q(e.truncationText())}}function kP(e,t){e&1&&(F(0,`p`,45),K(1,`The filter only searches the components the tree lists.`),I())}function AP(e,t){e&1&&(F(0,`p`,45),K(1,`Directive hosts are hidden, so they are not searched.`),I())}function jP(e,t){if(e&1){let e=B();F(0,`div`,26)(1,`p`,44),K(2),I(),A(3,kP,2,0,`p`,45),A(4,AP,2,0,`p`,45),F(5,`button`,46),H(`click`,function(){return S(e),C(W(2).clearFilter())}),K(6,`Clear filters`),I()()}if(e&2){let e=W(2);D(2),J(`No components match “`,e.filter().trim(),`”`),D(),j(e.page().truncated?3:-1),D(),j(!e.showDirectiveHosts()&&e.page().directiveHostCount?4:-1)}}function MP(e,t){if(e&1&&(F(0,`p`,27),K(1),I()),e&2){let e=W(2);D(),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 NP(e,t){if(e&1){let e=B();F(0,`span`,54),H(`click`,function(t){S(e),W();let n=O_(0);return C(W(2).toggle(n.node.id,t))}),w(),F(1,`svg`,55),L(2,`path`,56),I()()}e&2&&(W(),G(`open`,O_(0).expanded))}function PP(e,t){e&1&&L(0,`span`,49)}function FP(e,t){if(e&1&&(F(0,`span`,57),K(1),I(),F(2,`span`,58),K(3),I(),F(4,`span`,25),K(5,`directive host`),I()),e&2){W();let e=O_(0),t=W(2);D(),J(`<`,e.node.tag,`>`),D(),k(`title`,e.node.directives?.join(`, `)),D(),q(t.hostLabel(e.node))}}function IP(e,t){if(e&1&&(F(0,`span`,59),K(1),I(),F(2,`span`,60),K(3),I()),e&2){W();let e=O_(0);k(`title`,e.node.name),D(),q(e.node.name),D(),k(`title`,`<`+e.node.tag+`>`),D(),J(`<`,e.node.tag,`>`)}}function LP(e,t){if(e&1&&(F(0,`span`)(1,`span`,25),K(2,`Hydration: `),I(),K(3),I()),e&2){let e=t,n=W(3);Qg(`hyd hyd-`+e),D(3),q(n.hydrationText(e))}}function RP(e,t){if(e&1&&(F(0,`span`,51),K(1),I()),e&2){let e=t.$implicit;D(),q(e.route||`/`)}}function zP(e,t){if(e&1&&(F(0,`span`,52),K(1),F(2,`span`,25),K(3),I()()),e&2){let e=t;D(),J(` `,e),D(2),J(` `,e===1?`check`:`checks`,` while recording`)}}function BP(e,t){if(e&1&&(F(0,`span`,53),K(1),F(2,`span`,25),K(3),I()()),e&2){W();let e=O_(0);k(`title`,e.node.directives.join(`, `)),D(),J(` +`,e.node.directives.length,` `),D(2),J(` `,e.node.directives.length===1?`directive`:`directives`,` `)}}function VP(e,t){if(e&1){let e=B();E_(0),F(1,`div`,47),H(`click`,function(){S(e);let t=O_(0);return C(W(2).select(t.node.id))})(`focus`,function(t){S(e);let n=O_(0),r=W(2);return r.focusId.set(n.node.id),r.highlight(n.node.id),C(r.showNameTip(t))})(`blur`,function(){S(e);let t=W(2);return t.highlight(null),C(t.nameTip.set(null))})(`keydown.escape`,function(){return S(e),C(W(2).nameTip.set(null))})(`mouseenter`,function(){S(e);let t=O_(0);return C(W(2).highlight(t.node.id))})(`mouseleave`,function(){return S(e),C(W(2).highlight(null))}),A(2,NP,3,2,`span`,48)(3,PP,1,0,`span`,49),A(4,FP,6,3)(5,IP,4,4),A(6,LP,4,3,`span`,50),M(7,RP,2,1,`span`,51,gP),A(9,zP,4,2,`span`,52),A(10,BP,4,3,`span`,53),I()}if(e&2){let e,n,r=t.$implicit,i=W(2),a=D_(r.row);D(),Zg(`--%NS%depth`,a.depth),G(`selected`,i.selectedId()===a.node.id)(`dir-host`,a.node.kind===`directive`),k(`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),D(),j(a.hasChildren?2:3),D(2),j(a.node.kind===`directive`?4:5),D(2),j((e=a.node.hydration)?6:-1,e),D(),N(i.routedById().get(a.node.id)??L_(20,fP)),D(2),j((n=i.cdHosts()[a.node.id])?9:-1,n),D(),j(a.node.kind!==`directive`&&a.node.directives?.length?10:-1)}}function HP(e,t){if(e&1&&(F(0,`div`,61),K(1),I()),e&2){let e=t;Zg(`top`,e.top,`px`),D(),J(` `,e.text,` `)}}function UP(e,t){if(e&1&&(F(0,`li`,69),K(1),dg(2,72),I()),e&2){let e=t.$implicit;W(3);let n=Ag(3);D(),J(` `,e,` `),D(),P(`ngTemplateOutlet`,n)(`ngTemplateOutletContext`,R_(3,pP,e))}}function WP(e,t){if(e&1){let e=B();F(0,`div`,71)(1,`button`,46),H(`click`,function(){let t=S(e);return C(W(3).reveal(t.id,!0))}),K(2),I()()}e&2&&(D(2),J(` Show `,t.name,` `))}function GP(e,t){if(e&1&&(F(0,`section`,31)(1,`header`,62)(2,`span`,63),K(3,`directive host`),I(),F(4,`h2`,64),K(5),I(),F(6,`span`,65),K(7),I()(),F(8,`div`,66)(9,`h3`),K(10,` Directives `),F(11,`span`,67),K(12),I()(),F(13,`ul`,68),M(14,UP,3,5,`li`,69,_P),I()(),F(16,`div`,66)(17,`p`,70),K(18,` This element hosts directives but no component. Their inputs are bound in the template of the component that renders it. `),I(),A(19,WP,3,1,`div`,71),I()()),e&2){let e,n=t,r=W(2);D(5),J(`<`,n.tag,`>`),D(2),q(r.hostLabel(n)),D(5),q(n.directives?.length??0),D(2),N(n.directives??L_(4,fP)),D(5),j((e=r.ownerOf(n.id))?19:-1,e)}}function KP(e,t){if(e&1&&(F(0,`p`,73),L(1,`app-source-link`,77),I()),e&2){let e=t;D(),P(`file`,e.file)(`line`,e.line)}}function qP(e,t){if(e&1&&(F(0,`p`,78)(1,`span`,80),K(2,`Likely`),I(),F(3,`span`,25),K(4,`, matched by class name: `),I(),L(5,`app-source-link`,77),I()),e&2){W();let e=O_(0);P(`title`,W(3).guessTitle),D(5),P(`file`,e[0].file)(`line`,e[0].line)}}function JP(e,t){if(e&1&&(F(0,`li`),L(1,`app-source-link`,77),I()),e&2){let e=t.$implicit;D(),P(`file`,e.file)(`line`,e.line)}}function YP(e,t){if(e&1&&(F(0,`div`,79)(1,`p`,81)(2,`span`,80),K(3,`Not certain`),I(),K(4),I(),F(5,`ul`,82),M(6,JP,2,2,`li`,null,vP,!0),I()()),e&2){W();let e=O_(0),t=W(),n=W(2);P(`title`,n.guessTitle),D(4),Y(` `,e.length,` source files define `,n.bareName(t.name),`: `),D(2),N(e)}}function XP(e,t){if(e&1&&(E_(0),A(1,qP,6,3,`p`,78)(2,YP,8,3,`div`,79)),e&2){let e=W(),t=D_(W(2).sourceCandidates(e));D(),j(t.length===1?1:t.length>1?2:-1)}}function ZP(e,t){if(e&1){let e=B();F(0,`div`,83)(1,`button`,46),H(`click`,function(){S(e);let t=W();return C(W(2).revealInElements(t))}),K(2,`Reveal in Elements`),I(),F(3,`button`,46),H(`click`,function(){S(e);let t=W();return C(W(2).openSource(t))}),K(4,`Open source`),I()(),F(5,`p`,84),K(6),I()}if(e&2){let e=W(3);D(6),q(e.actionMessage())}}function QP(e,t){if(e&1){let e=B();F(0,`button`,86),H(`click`,function(){let t=S(e).$implicit;return C(W(5).showForm.emit(t.formId))}),K(1),I()}if(e&2){let e=t.$implicit;D(),J(` Show `,e.label,` in Forms `)}}function $P(e,t){if(e&1&&(F(0,`div`,74),M(1,QP,2,1,`button`,85,yP),I()),e&2){let e=W(),t=W(3);D(),N(t.formsIn(e.file))}}function eF(e,t){e&1&&A(0,$P,3,0,`div`,74),e&2&&j(W(3).formsIn(t.file).length?0:-1)}function tF(e,t){if(e&1){let e=B();F(0,`button`,46),H(`click`,function(){S(e);let t=W(2);return C(W(2).openInjector(t))}),K(1,` Show in Injectors `),F(2,`span`,25),K(3),I()()}if(e&2){let e=W(2);D(3),J(`: `,e.name)}}function nF(e,t){if(e&1){let e=B();F(0,`button`,46),H(`click`,function(){S(e);let t=W(2);return C(W(2).openSignals(t))}),K(1,` Show in Signals `),F(2,`span`,25),K(3),I()()}if(e&2){let e=W(2);D(3),J(`: `,e.name)}}function rF(e,t){if(e&1&&(F(0,`div`,74),A(1,tF,4,1,`button`,87),A(2,nF,4,1,`button`,87),I()),e&2){let e=W(3);D(),j(e.canShowInjector()?1:-1),D(),j(e.canShowSignals()?2:-1)}}function iF(e,t){if(e&1){let e=B();F(0,`div`,88)(1,`button`,46),H(`click`,function(){let t=S(e);return C(W(3).copyJson(t))}),K(2,`Copy as JSON`),I(),F(3,`button`,46),H(`click`,function(){let t=S(e);return C(W(3).copyHostPath(t))}),K(4,`Copy host path`),I()(),F(5,`p`,84),K(6),I()}if(e&2){let e=W(3);D(6),q(e.copyMessage())}}function aF(e,t){if(e&1&&L(0,`app-store-global`,75),e&2){let e=W(),t=W(2);P(`rpc`,t.rpc())(`pageId`,t.page()?.pageId)(`target`,R_(4,mP,e.id))(`label`,e.name)}}function oF(e,t){if(e&1&&(F(0,`dt`),K(1,`Routed`),I(),F(2,`dd`,90),K(3),I()),e&2){let e=t.$implicit;D(3),Y(``,e.route||`/`,` in outlet `,e.outlet)}}function sF(e,t){if(e&1&&(F(0,`span`,8),K(1),I()),e&2){let e=W(4);D(),Y(``,e.shownValues()?.count??0,` of `,e.valueTotal())}}function cF(e,t){if(e&1){let e=B();F(0,`div`,95)(1,`p`,44),K(2),I(),F(3,`p`,45),K(4,` The filter searches names, and the nested keys of values you opened. `),I(),F(5,`button`,46),H(`click`,function(){return S(e),C(W(5).clearPropFilter())}),K(6,`Clear filters`),I()()}if(e&2){let e=W(5);D(2),J(` No inputs, outputs or properties match “`,e.propFilter().trim(),`” `)}}function lF(e,t){if(e&1&&(F(0,`span`,100),K(1),I()),e&2){let e=W().$implicit;D(),J(`(`,e.prop,`)`)}}function uF(e,t){if(e&1&&(F(0,`li`,98)(1,`span`,99),K(2),A(3,lF,2,1,`span`,100),I(),L(4,`app-value-tree`,101),I()),e&2){let e=t.$implicit,n=W(4),r=W(3);G(`changed`,r.flashed(`input`,e.name)),D(2),J(` `,e.name,` `),D(),j(e.prop===e.name?-1:3),D(),P(`prop`,e)(`store`,r.values)(`query`,r.propFilter())(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function dF(e,t){if(e&1&&(F(0,`ul`,96),M(1,uF,5,11,`li`,97,xP),I()),e&2){let e=W(2);D(),N(e.inputs)}}function fF(e,t){e&1&&(F(0,`p`,70),K(1,`No inputs.`),I())}function pF(e,t){if(e&1&&(F(0,`div`,66)(1,`h3`),K(2,` Inputs `),F(3,`span`,67),K(4),I()(),A(5,dF,3,0,`ul`,96)(6,fF,2,0,`p`,70),I()),e&2){let e=W();D(4),q(e.inputs.length),D(),j(e.inputs.length?5:6)}}function mF(e,t){if(e&1&&(F(0,`li`,103)(1,`span`,90),K(2),I(),F(3,`span`,104),K(4),I()()),e&2){let e=t.$implicit;G(`on`,e.listened),D(2),q(e.name),D(2),q(e.listened?`listened`:`no listener`)}}function hF(e,t){if(e&1&&(F(0,`ul`,68),M(1,mF,5,4,`li`,102,xP),I()),e&2){let e=W(2);D(),N(e.outputs)}}function gF(e,t){e&1&&(F(0,`p`,70),K(1,`No outputs.`),I())}function _F(e,t){if(e&1&&(F(0,`div`,66)(1,`h3`),K(2,` Outputs `),F(3,`span`,67),K(4),I()(),A(5,hF,3,0,`ul`,68)(6,gF,2,0,`p`,70),I()),e&2){let e=W();D(4),q(e.outputs.length),D(),j(e.outputs.length?5:6)}}function vF(e,t){if(e&1&&(F(0,`span`,105),K(1),I()),e&2){let e=W().$implicit;D(),q(e.kind)}}function yF(e,t){if(e&1){let e=B();F(0,`button`,107),H(`click`,function(){S(e);let t=W().$implicit,n=W(5);return C(W(2).openSignals(n,t.prop))}),K(1,` Show in Signals`),F(2,`span`,25),K(3),I()()}if(e&2){let e=W().$implicit;D(3),J(`: `,e.name)}}function bF(e,t){if(e&1&&(F(0,`li`,98)(1,`span`,99),K(2),A(3,vF,2,1,`span`,105),A(4,yF,4,1,`button`,106),I(),L(5,`app-value-tree`,101),I()),e&2){let e=t.$implicit,n=W(4),r=W(3);G(`changed`,r.flashed(`property`,e.name)),D(2),J(` `,e.name,` `),D(),j(e.kind?3:-1),D(),j(e.kind===`signal`&&r.canShowSignals()&&!r.staticReport()?4:-1),D(),P(`prop`,e)(`store`,r.values)(`query`,r.propFilter())(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function xF(e,t){if(e&1&&(F(0,`ul`,96),M(1,bF,6,12,`li`,97,xP),I()),e&2){let e=W(2);D(),N(e.properties)}}function SF(e,t){e&1&&(F(0,`p`,70),K(1,`No other properties.`),I())}function CF(e,t){if(e&1&&(F(0,`div`,66)(1,`h3`),K(2,` Properties `),F(3,`span`,67),K(4),I()(),A(5,xF,3,0,`ul`,96)(6,SF,2,0,`p`,70),I()),e&2){let e=W();D(4),q(e.properties.length),D(),j(e.properties.length?5:6)}}function wF(e,t){if(e&1&&(F(0,`li`,69),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function TF(e,t){if(e&1&&(F(0,`div`,66)(1,`h3`),K(2,` DOM listeners `),F(3,`span`,67),K(4),I()(),F(5,`ul`,68),M(6,wF,2,1,`li`,69,Xh),I()()),e&2){let e=W(2);D(4),q(e.listeners.length),D(2),N(e.listeners)}}function EF(e,t){if(e&1&&(F(0,`li`,103)(1,`span`,90),K(2),I(),F(3,`span`,104),K(4),I()()),e&2){let e=t.$implicit;D(2),q(e.state),D(2),q(e.triggers.join(`, `)||`no triggers`)}}function DF(e,t){if(e&1&&(F(0,`div`,66)(1,`h3`),K(2,` Defer blocks `),F(3,`span`,67),K(4),I()(),F(5,`ul`,68),M(6,EF,5,2,`li`,103,SP),I()()),e&2){let e=W(5);D(4),q(e.ownedDeferBlocks().length),D(2),N(e.ownedDeferBlocks())}}function OF(e,t){if(e&1&&(F(0,`li`,98)(1,`span`,99),K(2),I(),L(3,`app-value-tree`,109),I()),e&2){let e=t.$implicit,n=W(2).$implicit,r=W(2),i=W(3);G(`changed`,i.flashed(`directive`,e.name,n.index)),D(2),q(e.name),D(),P(`prop`,e)(`store`,i.values)(`query`,i.propFilter())(`directive`,n.index)(`componentId`,r.id)(`pageId`,i.page()?.pageId??null)(`rpc`,i.rpc())}}function kF(e,t){if(e&1&&(F(0,`ul`,96),M(1,OF,4,10,`li`,97,xP),I()),e&2){let e=W().$implicit;D(),N(e.inputs)}}function AF(e,t){if(e&1&&(F(0,`li`,103)(1,`span`,90),K(2),I(),F(3,`span`,104),K(4),I()()),e&2){let e=t.$implicit;G(`on`,e.listened),D(2),q(e.name),D(2),q(e.listened?`listened`:`no listener`)}}function jF(e,t){if(e&1&&(F(0,`ul`,68),M(1,AF,5,4,`li`,102,xP),I()),e&2){let e=W().$implicit;D(),N(e.outputs)}}function MF(e,t){e&1&&(F(0,`p`,70),K(1,`No inputs or outputs.`),I())}function NF(e,t){if(e&1&&(F(0,`div`,66)(1,`h3`)(2,`span`,90),K(3),I(),F(4,`span`,105),K(5,`directive on host`),I()(),F(6,`p`,108),dg(7,72),I(),A(8,kF,3,0,`ul`,96),A(9,jF,3,0,`ul`,68),A(10,MF,2,0,`p`,70),I()),e&2){let e=t.$implicit;W(5);let n=Ag(3);D(3),q(e.name),D(4),P(`ngTemplateOutlet`,n)(`ngTemplateOutletContext`,R_(6,pP,e.name)),D(),j(e.inputs.length?8:-1),D(),j(e.outputs.length?9:-1),D(),j(!e.inputs.length&&!e.outputs.length?10:-1)}}function PF(e,t){if(e&1&&(A(0,cF,7,1,`div`,95),A(1,pF,7,2,`div`,66),A(2,_F,7,2,`div`,66),A(3,CF,7,2,`div`,66),A(4,TF,8,1,`div`,66),A(5,DF,8,1,`div`,66),M(6,NF,11,8,`div`,66,bP)),e&2){let e=t,n=W(),r=W(3);j(r.propQuery()&&!e.count?0:-1),D(),j(!r.propQuery()||e.inputs.length?1:-1),D(),j(!r.propQuery()||e.outputs.length?2:-1),D(),j(!r.propQuery()||e.properties.length?3:-1),D(),j(!r.propQuery()&&n.listeners.length?4:-1),D(),j(!r.propQuery()&&r.ownedDeferBlocks().length?5:-1),D(),N(e.directives)}}function FF(e,t){if(e&1&&(F(0,`span`,105),K(1),I()),e&2){let e=t.$implicit;D(),q(e)}}function IF(e,t){if(e&1&&(F(0,`span`,112),K(1,`from `),F(2,`span`,90),K(3),I()()),e&2){let e=W().$implicit;D(3),q(e.providedByName??`an injector`)}}function LF(e,t){e&1&&(F(0,`span`,113),K(1,`not provided`),I())}function RF(e,t){if(e&1&&(F(0,`li`,110)(1,`span`,111),K(2),I(),M(3,FF,2,1,`span`,105,Xh),A(5,IF,4,1,`span`,112)(6,LF,2,0,`span`,113),I()),e&2){let e=t.$implicit;D(2),q(e.token),D(),N(e.flags),D(2),j(e.providedBy?5:6)}}function zF(e,t){if(e&1&&(F(0,`ul`,93),M(1,RF,7,2,`li`,110,CP),I()),e&2){let e=W();D(),N(e.dependencies)}}function BF(e,t){e&1&&(F(0,`p`,70),K(1,`Nothing is injected through the constructor or inject().`),I())}function VF(e,t){if(e&1){let e=B();F(0,`app-component-pipes`,114),H(`showPipe`,function(t){return S(e),C(W(4).showPipe.emit(t))}),I()}if(e&2){let e=W(2),t=W(2);P(`rpc`,t.rpc())(`pageId`,t.page()?.pageId)(`component`,t.bareName(e.name))(`canShowPipes`,!t.staticReport())}}function HF(e,t){if(e&1){let e=B();F(0,`dl`,89)(1,`dt`),K(2,`Change detection`),I(),F(3,`dd`),K(4),I(),F(5,`dt`),K(6,`Encapsulation`),I(),F(7,`dd`),K(8),I(),F(9,`dt`),K(10,`Host path`),I(),F(11,`dd`,90),K(12),I(),M(13,oF,4,2,null,null,gP),I(),F(15,`div`,91)(16,`app-search-field`,92,3),w_(`valueChange`,function(t){S(e);let n=W(3);return C_(n.propFilter,t)||(n.propFilter=t),C(t)}),I(),A(18,sF,2,2,`span`,8),F(19,`p`,20),K(20),I()(),A(21,PF,8,6),F(22,`div`,66)(23,`h3`),K(24,` Injected `),F(25,`span`,67),K(26),I()(),A(27,zF,3,0,`ul`,93)(28,BF,2,0,`p`,70),I(),A(29,VF,1,4,`app-component-pipes`,94)}if(e&2){let e,n=t,r=W(),i=W(2);D(4),q(n.changeDetection??`Unknown`),D(4),q(n.encapsulation??`Unknown`),D(4),q(n.path),D(),N(i.routedById().get(r.id)??L_(10,fP)),D(3),S_(`value`,i.propFilter),D(2),j(i.propQuery()?18:-1),D(2),q(i.propFilterStatus()),D(),j((e=i.shownValues())?21:-1,e),D(5),q(n.dependencies.length),D(),j(n.dependencies.length?27:28),D(2),j(i.canShowPipes()?29:-1)}}function UF(e,t){e&1&&(F(0,`div`,76),L(1,`span`,115),F(2,`p`,45),K(3,`Reading live values from the page…`),I()())}function WF(e,t){if(e&1&&(F(0,`section`,31)(1,`header`,62)(2,`span`,63),K(3,`component`),I(),F(4,`h2`,64),K(5),I(),F(6,`span`,65),K(7),I(),A(8,KP,2,2,`p`,73)(9,XP,3,2),A(10,ZP,7,1),A(11,eF,1,1),A(12,rF,3,2,`div`,74),A(13,iF,7,1),A(14,aF,1,6,`app-store-global`,75),I(),A(15,HF,30,11)(16,UF,4,0,`div`,76),I()),e&2){let e,n,r,i,a=t,o=W(2);D(5),q(a.name),D(2),J(`<`,a.tag,`>`),D(),j((e=o.detail()?.source)?8:9,e),D(2),j(o.devtoolsActions()?10:-1),D(),j((n=o.sourceFor(a))?11:-1,n),D(),j((o.canShowInjector()||o.canShowSignals())&&!o.staticReport()?12:-1),D(),j((r=o.detail())?13:-1,r),D(),j(!o.staticReport()&&!o.native()?14:-1),D(),j((i=o.detail())?15:16,i)}}function GF(e,t){e&1&&(F(0,`p`,44),K(1,`The selected component was destroyed`),I(),F(2,`p`,45)(3,`span`,90),K(4),I(),K(5,` is no longer on the page. Select another component to see its live values. `),I()),e&2&&(D(4),q(t))}function KF(e,t){e&1&&(F(0,`p`,45),K(1,` Select a component to see its live inputs, properties, outputs, change detection and injected services. `),I())}function qF(e,t){if(e&1&&(F(0,`div`,32),A(1,GF,6,1)(2,KF,2,0,`p`,45),I()),e&2){let e,t=W(2);D(),j((e=t.destroyed())?1:2,e)}}function JF(e,t){e&1&&L(0,`app-angular-unavailable`,34),e&2&&P(`page`,W(2).angularPage())}function YF(e,t){if(e&1){let e=B();F(0,`app-hydration-section`,116),H(`overlay`,function(t){return S(e),C(W(2).setHydrationOverlay(t))})(`showNode`,function(t){return S(e),C(W(2).revealNode(t))})(`highlight`,function(t){return S(e),C(W(2).highlight(t))}),I()}e&2&&P(`report`,W(2).page()?.hydration)}function XF(e,t){if(e&1){let e=B();F(0,`app-cd-recording`,117),H(`showComponent`,function(t){return S(e),C(W(2).showCdComponent(t))}),I(),F(1,`app-leaks-section`,118),H(`showComponent`,function(t){return S(e),C(W(2).showLeakComponent(t))})(`highlight`,function(t){return S(e),C(W(2).highlight(t))}),I()}if(e&2){let e=W(2);P(`page`,e.cdPage())(`pageId`,e.page().pageId)(`rpc`,e.rpc())(`native`,e.native()),D(),P(`report`,e.leaksPage())(`pageId`,e.page().pageId)(`rpc`,e.rpc())(`angular`,e.angularPage())}}function ZF(e,t){if(e&1){let e=B();F(0,`p`,4),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. `),I(),F(2,`div`,5)(3,`app-search-field`,6,1),H(`valueChange`,function(t){return S(e),C(W().setFilter(t))}),I(),F(5,`span`,7),K(6,` Type plain text, a tag such as