) => ({
+ id: String(Math.random()),
+ url: '/api/trips?id=1',
+ method: 'GET',
+ status: 200,
+ durationMs: 5,
+ side: 'client',
+ cacheHit: false,
+ faulted: false,
+ at: NOW,
+ ...extra,
+});
+
+const http = (): HttpState =>
+ ({
+ serverCalls: [call({ side: 'server', url: '/api/cities', cacheSkip: 'post' })],
+ requests: [],
+ rules: [],
+ pages: [
+ {
+ pageId: 'tab1',
+ url: '/trips',
+ initialUrl: '/trips',
+ title: 'Trips',
+ hydration: null,
+ firstSeenAt: NOW,
+ reportedAt: NOW,
+ calls: [
+ call({ status: 500, url: `/api/trips?token=${JWT}` }),
+ call({ status: 500, url: '/api/trips?id=2' }),
+ call({ status: 404, url: '/api/photos/1' }),
+ call({ status: 0, cancelled: true, url: '/api/search' }),
+ call({ status: 503, faulted: true, url: '/api/slow' }),
+ call({ url: '/api/cities' }),
+ ],
+ },
+ ],
+ }) as unknown as HttpState;
+
+const axe = (): AxeReport => ({
+ at: NOW,
+ ms: 120,
+ url: '/trips',
+ violations: [
+ {
+ id: 'image-alt',
+ impact: 'critical',
+ help: 'Images must have alternative text',
+ tags: ['wcag2a'],
+ count: 3,
+ nodes: [
+ { target: 'img.a', html: ' ', owner: { id: 'c2', name: 'TripPhoto' } },
+ { target: 'img.b', html: ' ', owner: { id: 'c2', name: 'TripPhoto' } },
+ ],
+ },
+ {
+ id: 'region',
+ impact: 'moderate',
+ help: 'All page content should be contained by landmarks',
+ tags: ['best-practice'],
+ count: 1,
+ nodes: [{ target: 'p', html: '' }],
+ },
+ ],
+});
+
+const keys = (findings: AuditFinding[]) => findings.map((finding) => finding.key);
+
+describe('buildAudit', () => {
+ it('gathers every area into one list ranked by severity, area and count', () => {
+ const report = buildAudit(
+ {
+ cd: cd(),
+ leaks: { pages: { tab1: leaksPage(true) } },
+ errors: errors(),
+ router: router(),
+ forms: forms(),
+ components: components(),
+ http: http(),
+ pipes: () => [
+ {
+ rule: 'json-pipe',
+ severity: 'info',
+ pipe: 'json',
+ file: 'src/app/trips.ts',
+ line: 4,
+ message: '`| json` is a debugging aid.',
+ fix: 'Remove it.',
+ },
+ ],
+ axe: axe(),
+ },
+ 'tab1',
+ { url: '/trips', title: 'Trips' },
+ NOW,
+ );
+ const ranks = { error: 0, warning: 1, info: 2 };
+ const severities = report.findings.map((finding) => ranks[finding.severity]);
+ expect(severities).toEqual([...severities].sort((a, b) => a - b));
+ expect(report.findings[0]).toMatchObject({
+ area: 'accessibility',
+ rule: 'image-alt',
+ subject: 'TripPhoto',
+ count: 2,
+ });
+ expect(keys(report.findings)).toEqual(
+ expect.arrayContaining([
+ 'accessibility:image-alt:(more elements)',
+ 'accessibility:region:p',
+ 'errors:NG0201:TripList',
+ 'hydration:hydration-mismatch:TripMap',
+ 'hydration:hydration-skipped:',
+ 'change-detection:onpush-candidate:TripList',
+ 'change-detection:onpush-marked-often:Banner',
+ 'change-detection:input-mutated:TripCard',
+ 'change-detection:zone-dependent:Clock',
+ 'change-detection:slow-component:TripList',
+ 'leaks:retained-after-destroy:TripCard',
+ 'leaks:subscription-after-destroy:TripCard',
+ 'router:wildcard-not-last:/**',
+ 'forms:setup-error:NG01203: No value accessor for form control name: email',
+ 'http:request-failed:GET /api/trips',
+ 'http:client-error:GET /api/photos/1',
+ 'http:faulted-by-rule:GET /api/slow',
+ 'http:fetched-twice:GET /api/cities',
+ 'pipes:json-pipe:json in src/app/trips.ts:4',
+ ]),
+ );
+ // The other page's setup error and the cancelled call are not findings.
+ expect(JSON.stringify(report)).not.toContain('NG01050');
+ expect(JSON.stringify(report)).not.toContain('/api/search');
+ expect(JSON.stringify(report)).not.toContain(JWT);
+ const failed = report.findings.find((finding) => finding.rule === 'request-failed');
+ expect(failed).toMatchObject({ count: 2, severity: 'error', tool: 'pangular:list-http-calls' });
+ const error = report.findings.find((finding) => finding.area === 'errors');
+ expect(error).toMatchObject({
+ tool: 'pangular:explain-error',
+ args: { page: 'tab1', id: 'e1' },
+ elementId: 'c1',
+ count: 3,
+ });
+ expect(error!.why).toContain('No provider for TripApi');
+ expect(report.metrics).toMatchObject({
+ cdCycles: 2,
+ cdMeanMs: 12,
+ cdMaxMs: 20,
+ wastedChecks: 47,
+ wastedPercent: 94,
+ retained: 1,
+ openSubscriptions: 2,
+ errorGroups: 1,
+ errors: 3,
+ axeViolations: 2,
+ axeNodes: 4,
+ httpFailures: 3,
+ });
+ expect(report.sources.every((source) => source.state === 'ok')).toBe(true);
+ expect(report.axeAt).toBe(NOW);
+ });
+
+ it('judges no retention when Angular keeps DI debug data, and says so', () => {
+ const report = buildAudit(
+ { leaks: { pages: { tab1: leaksPage('dev-di-debug') } } },
+ 'tab1',
+ {},
+ NOW,
+ );
+ expect(keys(report.findings)).toEqual(['leaks:subscription-after-destroy:TripCard']);
+ expect(report.metrics.retained).toBeUndefined();
+ expect(report.sources.find((source) => source.area === 'leaks')?.note).toMatch(/DI debug data/);
+ });
+
+ it('names the areas it could not read: off, empty and waiting for a recording or a pass', () => {
+ const report = buildAudit({ cd: { pages: {} }, components: null, axe: null }, 'tab1', {}, NOW);
+ const state = Object.fromEntries(report.sources.map((s) => [s.area, s.state]));
+ expect(state).toMatchObject({
+ accessibility: 'empty',
+ 'change-detection': 'empty',
+ hydration: 'empty',
+ errors: 'off',
+ router: 'off',
+ forms: 'off',
+ http: 'off',
+ pipes: 'off',
+ leaks: 'off',
+ });
+ expect(report.findings).toEqual([]);
+ expect(report.sources.find((s) => s.area === 'change-detection')?.note).toContain(
+ 'record: "start"',
+ );
+ });
+
+ it('keeps finding keys the same across audits of a reloaded page', () => {
+ const first = buildAudit({ errors: errors() }, 'tab1', {}, NOW);
+ const reloaded = errors();
+ reloaded.pages['tab1']!.errors = { e7: { ...reloaded.pages['tab1']!.errors['e1']!, id: 'e7' } };
+ const second = buildAudit({ errors: reloaded }, 'tab1', {}, NOW + 1000);
+ expect(keys(second.findings)).toEqual(keys(first.findings));
+ });
+});
+
+describe('rankFindings', () => {
+ it('puts errors first, then by area, then the most frequent', () => {
+ const finding = (key: string, extra: Partial): AuditFinding => ({
+ key,
+ severity: 'warning',
+ area: 'http',
+ rule: key,
+ why: '',
+ tool: 'x',
+ ...extra,
+ });
+ const ranked = rankFindings([
+ finding('a', { severity: 'info' }),
+ finding('b', { count: 2 }),
+ finding('c', { count: 9 }),
+ finding('d', { severity: 'error', area: 'pipes' }),
+ finding('e', { area: 'accessibility' }),
+ ]);
+ expect(keys(ranked)).toEqual(['d', 'e', 'c', 'b', 'a']);
+ });
+});
+
+const snapshot = (findings: AuditFinding[], metrics: object, axeRan = true): AuditSnapshot => ({
+ at: NOW,
+ findings,
+ axe: axeRan,
+ metrics: { findingsError: 0, findingsWarning: 0, findingsInfo: 0, ...metrics },
+});
+
+describe('diffAudits', () => {
+ const f = (key: string, area: AuditFinding['area'] = 'errors', count?: number): AuditFinding => ({
+ key,
+ severity: 'error',
+ area,
+ rule: key,
+ why: key,
+ tool: 'x',
+ ...(count ? { count } : {}),
+ });
+
+ it('lists resolved, new and remaining findings and each number before and after', () => {
+ const diff = diffAudits(
+ snapshot([f('a'), f('b', 'errors', 4)], { cdMeanMs: 10, errors: 4 }),
+ snapshot([f('b', 'errors', 1), f('c')], { cdMeanMs: 6.5, errors: 1, retained: 0 }),
+ );
+ expect(keys(diff.resolved)).toEqual(['a']);
+ expect(keys(diff.added)).toEqual(['c']);
+ expect(diff.remaining).toEqual([
+ expect.objectContaining({ key: 'b', count: 1, countBefore: 4 }),
+ ]);
+ expect(diff.metrics).toEqual(
+ expect.arrayContaining([
+ { metric: 'cdMeanMs', before: 10, after: 6.5, delta: -3.5 },
+ { metric: 'errors', before: 4, after: 1, delta: -3 },
+ { metric: 'retained', after: 0 },
+ ]),
+ );
+ });
+
+ it('does not compare accessibility when only one side ran axe', () => {
+ const diff = diffAudits(snapshot([f('x', 'accessibility')], {}, true), snapshot([], {}, false));
+ expect(diff.resolved).toEqual([]);
+ expect(diff.notes.join(' ')).toContain('Only the before audit ran axe');
+ });
+});
+
+describe('createAuditSessions', () => {
+ it('keeps a baseline per page, drops the after audit on a new baseline, and expires', () => {
+ let changes = 0;
+ const sessions = createAuditSessions({ ttlMs: 1000, onChange: () => changes++ });
+ const base = snapshot([], {});
+ sessions.mark('tab1', 'before', base, 0);
+ sessions.mark('tab1', 'after', base, 10);
+ expect(sessions.get('tab1')?.after).toBe(base);
+ sessions.mark('tab1', 'before', base, 20);
+ expect(sessions.get('tab1')?.after).toBeUndefined();
+ sessions.mark('tab2', 'before', base, 900);
+ sessions.expire(1500);
+ expect(sessions.get('tab1')).toBeUndefined();
+ expect(sessions.get('tab2')).toBeDefined();
+ expect(changes).toBeGreaterThanOrEqual(5);
+ expect(sessions.summary().pages['tab2']).toMatchObject({ before: { at: NOW, findings: 0 } });
+ });
+
+ it('keeps at most maxPages, dropping the least recently used', () => {
+ const sessions = createAuditSessions({ maxPages: 2 });
+ const base = snapshot([], {});
+ sessions.mark('a', 'before', base);
+ sessions.mark('b', 'before', base);
+ sessions.mark('a', 'after', base);
+ sessions.mark('c', 'before', base);
+ expect(Object.keys(sessions.summary().pages).sort()).toEqual(['a', 'c']);
+ });
+
+ it('marks a page as running while an axe pass is out', () => {
+ const sessions = createAuditSessions();
+ sessions.setRunning('tab1', true);
+ expect(sessions.summary().pages['tab1']?.running).toBe(true);
+ sessions.setRunning('tab1', false);
+ expect(sessions.summary().pages['tab1']).toBeUndefined();
+ });
+
+ it('snapshots an audit with whether axe ran', () => {
+ const report = buildAudit({ axe: axe() }, 'tab1', { url: '/trips' }, NOW);
+ expect(snapshotOf(report)).toMatchObject({ axe: true, url: '/trips', at: NOW });
+ });
+});
+
+describe('toAxeReport', () => {
+ it('masks again on the server and drops links and ids it does not trust', () => {
+ const report = toAxeReport({
+ at: NOW,
+ ms: 50,
+ url: `/trips?token=${JWT}`,
+ violations: [
+ {
+ id: 'image-alt',
+ impact: 'critical',
+ help: `Images must have alternative text ${JWT}`,
+ helpUrl: 'https://evil.example/phish',
+ tags: ['wcag2a', '
Pangular Inspector
-
+
From 2b485dc08e60e8faf87d85eed1674174326c054a Mon Sep 17 00:00:00 2001
From: erKam
Date: Tue, 13 Oct 2026 07:10:46 +0000
Subject: [PATCH 3/5] fix(mcp): address audit review findings
Don't compare a stale axe pass, see pages only errors, forms or leaks report, cache the pipe scan, keep sessions alive on reads, store full snapshots, hide component owners when that inspector is off, shorten the axe timeout below the client's, and keep counts out of shared state.
---
app/src/__tests__/audit-inspector.test.ts | 21 ++-
app/src/pages/audit-inspector.ts | 32 ++++-
app/src/pages/audit-types.ts | 4 +-
apps/docs/src/content/agents/tools.md | 4 +-
.../content/getting-started/popup-and-hub.md | 3 +-
.../src/content/guides/inspect-fix-verify.md | 2 +-
apps/docs/src/content/inspectors/audit.md | 34 ++---
.../src/__tests__/audit-findings.test.ts | 46 ++++++-
.../src/__tests__/audit-tools.test.ts | 121 +++++++++++++++++-
.../devtools/src/__tests__/axe-runner.test.ts | 32 ++++-
.../src/__tests__/page-owners.test.ts | 12 ++
.../src/__tests__/pipe-lint-cache.test.ts | 20 +++
packages/devtools/src/axe-runner.ts | 12 ++
packages/devtools/src/devframe.ts | 24 +++-
packages/devtools/src/overlay.ts | 5 +-
packages/devtools/src/rpc/audit-audience.ts | 45 +++++++
packages/devtools/src/rpc/audit-axe.ts | 8 +-
packages/devtools/src/rpc/audit-findings.ts | 7 +-
packages/devtools/src/rpc/audit-register.ts | 93 ++++++++++++--
packages/devtools/src/rpc/audit-sessions.ts | 69 ++++++----
packages/devtools/src/rpc/audit-text.ts | 19 ++-
packages/devtools/src/rpc/page-owners.ts | 10 ++
packages/devtools/src/rpc/pipe-lint-cache.ts | 25 ++++
23 files changed, 558 insertions(+), 90 deletions(-)
create mode 100644 packages/devtools/src/__tests__/pipe-lint-cache.test.ts
create mode 100644 packages/devtools/src/rpc/audit-audience.ts
create mode 100644 packages/devtools/src/rpc/pipe-lint-cache.ts
diff --git a/app/src/__tests__/audit-inspector.test.ts b/app/src/__tests__/audit-inspector.test.ts
index 68c04f23..fb04cca5 100644
--- a/app/src/__tests__/audit-inspector.test.ts
+++ b/app/src/__tests__/audit-inspector.test.ts
@@ -1,7 +1,7 @@
import { TestBed, type ComponentFixture } from '@angular/core/testing';
import type { DevframeRpcClient } from 'devframe/client';
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
-import { AuditInspector } from '../pages/audit-inspector';
+import { AUDIT_REFRESH_DELAY_MS, AuditInspector } from '../pages/audit-inspector';
import type { AuditFinding, AuditResponse } from '../pages/audit-types';
const NOW = Date.UTC(2026, 9, 13, 10, 0, 0);
@@ -232,15 +232,32 @@ describe('AuditInspector', () => {
});
});
- it('reads the audit again when a session or axe pass changes elsewhere', async () => {
+ it('reads the audit again once for a burst of session or axe pass changes', async () => {
start();
await settle();
expect(listeners).toHaveLength(1);
+ // An axe pass starting, its result and its end arrive together.
+ listeners[0]!();
+ listeners[0]!();
listeners[0]!();
await settle();
+ expect(calls.filter((c) => c.name === 'get-audit')).toHaveLength(1);
+ await new Promise((resolve) => setTimeout(resolve, AUDIT_REFRESH_DELAY_MS + 20));
+ await settle();
expect(calls.filter((c) => c.name === 'get-audit')).toHaveLength(2);
});
+ it('offers no Show component, Show in page nor outline with the Components inspector off', async () => {
+ start();
+ fixture.componentRef.setInput('canShowComponent', false);
+ await settle();
+ expect(button('Show component')).toBeUndefined();
+ expect(button('Show in page')).toBeUndefined();
+ host().querySelector('.finding')!.dispatchEvent(new Event('mouseenter'));
+ await settle();
+ expect(calls.some((c) => c.name === 'request-page-highlight')).toBe(false);
+ });
+
it('says what to do without a page, after an error, and in a static report', async () => {
answers['get-audit'] = { pages: [], report: null };
start();
diff --git a/app/src/pages/audit-inspector.ts b/app/src/pages/audit-inspector.ts
index 1791c5a3..dd92566c 100644
--- a/app/src/pages/audit-inspector.ts
+++ b/app/src/pages/audit-inspector.ts
@@ -34,6 +34,12 @@ const SEVERITY_TONE = { error: 'danger', warning: 'warn', info: 'accent' } as co
const SEVERITY_RANK = { error: 0, warning: 1, info: 2 } as const;
/** Areas whose findings point at a component host the Components tab can select. */
const COMPONENT_AREAS: readonly AuditArea[] = ['errors', 'hydration'];
+/**
+ * How long the panel waits after a change to the `audit` shared state before
+ * reading the audit again, so a burst (an axe pass starting, its result, it
+ * ending) costs one read.
+ */
+export const AUDIT_REFRESH_DELAY_MS = 150;
@Component({
selector: 'app-audit-inspector',
@@ -187,8 +193,9 @@ const COMPONENT_AREAS: readonly AuditArea[] = ['errors', 'hydration'];
Agent tool {{ toolCall(finding) }}
- @if (finding.elementId) {
- @if (canShowComponent() && isComponentArea(finding.area)) {
+
+ @if (finding.elementId && canShowComponent()) {
+ @if (isComponentArea(finding.area)) {
(null);
- /** Whether the Components tab is on, so "Show component" has somewhere to go. */
+ /**
+ * Whether the Components inspector is on: "Show component" opens its tab, and
+ * "Show in page" and hover outlines go through its `request-page-highlight`.
+ */
readonly canShowComponent = input(true);
readonly showComponent = output();
@@ -527,6 +537,7 @@ export class AuditInspector {
private unsubscribe?: () => void;
private seq = 0;
private highlighted = false;
+ private queued?: ReturnType;
protected readonly time = time;
protected readonly toolCall = toolCall;
@@ -629,6 +640,7 @@ export class AuditInspector {
});
this.destroyRef.onDestroy(() => {
this.unsubscribe?.();
+ clearTimeout(this.queued);
this.highlight(null);
});
}
@@ -710,7 +722,7 @@ export class AuditInspector {
highlight(finding: AuditFinding | null, reveal = false) {
const client = this.rpc();
- if (!client) return;
+ if (!client || !this.canShowComponent()) return;
const pageId = this.pageId();
const target =
finding?.elementId && pageId
@@ -722,6 +734,16 @@ export class AuditInspector {
void rpcCall(client, 'request-page-highlight', target).catch(() => {});
}
+ /** One read for a burst of shared state changes; none while an action here reads it when done. */
+ private refreshSoon() {
+ if (this.queued !== undefined) return;
+ this.queued = setTimeout(() => {
+ this.queued = undefined;
+ if (this.destroyRef.destroyed || this.axeRunning() || this.busy()) return;
+ void this.refresh();
+ }, AUDIT_REFRESH_DELAY_MS);
+ }
+
private async subscribe(client: DevframeRpcClient) {
await this.refresh();
try {
@@ -729,7 +751,7 @@ export class AuditInspector {
const state = await client.scope('pangular').rpc.sharedState('audit');
if (this.destroyRef.destroyed) return;
this.unsubscribe?.();
- this.unsubscribe = state.on('updated', () => void this.refresh());
+ this.unsubscribe = state.on('updated', () => this.refreshSoon());
} catch {
// Without the shared state the Refresh button still works.
}
diff --git a/app/src/pages/audit-types.ts b/app/src/pages/audit-types.ts
index a7a0b7db..37d5b55b 100644
--- a/app/src/pages/audit-types.ts
+++ b/app/src/pages/audit-types.ts
@@ -73,7 +73,8 @@ export const METRICS: readonly { key: string; label: string; unit?: string }[] =
export interface AuditSource {
area: AuditArea;
- state: 'ok' | 'empty' | 'off';
+ /** `hidden` only reaches agents; the panel sees every area that is on. */
+ state: 'ok' | 'empty' | 'off' | 'hidden';
note?: string;
}
@@ -94,6 +95,7 @@ export interface AuditSnapshot {
findings: AuditFinding[];
metrics: AuditMetrics;
axe: boolean;
+ axeAt?: number;
}
export interface MetricChange {
diff --git a/apps/docs/src/content/agents/tools.md b/apps/docs/src/content/agents/tools.md
index 69f6da33..724ebfb0 100644
--- a/apps/docs/src/content/agents/tools.md
+++ b/apps/docs/src/content/agents/tools.md
@@ -646,9 +646,9 @@ Each finding has a severity, an area, the component, route or URL it is about, o
| `severity` | no | `error`, `warning` or `info`: only findings at that severity or above. |
| `limit` | no | Rows to list, 1 to 200. Default 30. |
-The audit reuses each inspector's own checks: `diagnose-change-detection` hints and checks slower than 16 ms, `find-leaks`, `explain-error`, `hydration`, `lint-routes`, `lint-forms`, `list-http-calls` and `lint-pipes`. Change detection numbers need a recording from `change-detection`. Retention is not judged on a page whose Angular keeps DI debug data, the same as `find-leaks`. An area whose inspector is off, or whose agent tools are hidden with `agent.tools.: false`, is left out.
+The audit reuses each inspector's own checks: `diagnose-change-detection` hints and checks slower than 16 ms, `find-leaks`, `explain-error`, `hydration`, `lint-routes`, `lint-forms`, `list-http-calls` and `lint-pipes`. Change detection numbers need a recording from `change-detection`. Retention is not judged on a page whose Angular keeps DI debug data, the same as `find-leaks`. An area whose inspector is off, or whose agent tools are hidden with `agent.tools.: false`, is left out, and **Coverage** says which. With the Components agent tools hidden, axe findings name no component or instance id.
-The axe pass loads axe-core into the page on demand and changes nothing in the app. It leaves out the overlay's own elements and frames, masks selectors, attributes and summaries, and leaves out text content. With `agent.readOnly`, the tool has no `axe` argument and is marked read-only. A session is kept per page for 30 minutes after its last use, so it survives a reload of the tab. Comparing only works within one page id. See [Inspect, fix and verify](../guides/inspect-fix-verify.md) for the loop.
+The axe pass loads axe-core into the page on demand and changes nothing in the app. It leaves out the overlay's own elements and frames, masks selectors, attributes and summaries, and leaves out text content. With `agent.readOnly`, the tool has no `axe` argument and is marked read-only, and it refuses `session: "clear"` and a `session: "before"` that would replace a baseline, so it never drops one the user took. Two audits that used the same axe pass don't compare accessibility, and a note says so. A reload of the tab drops its axe pass. A session is kept per page for 30 minutes after its last use, so it survives a reload of the tab. Comparing only works within one page id. See [Inspect, fix and verify](../guides/inspect-fix-verify.md) for the loop.
## Analog
diff --git a/apps/docs/src/content/getting-started/popup-and-hub.md b/apps/docs/src/content/getting-started/popup-and-hub.md
index e15e4b37..b3e7a7eb 100644
--- a/apps/docs/src/content/getting-started/popup-and-hub.md
+++ b/apps/docs/src/content/getting-started/popup-and-hub.md
@@ -152,7 +152,7 @@ When the page's server mounts the hub (`/__devframes/`), the button opens the wh
| Dock | Shows |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| All tools | The full panel, with every tab in one tab bar (`/__devframes/pangular/`) |
-| Angular | Dashboard, Timeline, Components, Routes, Signals, Injectors, Forms, Pipes, SSR & HTTP, and Errors |
+| Angular | Dashboard, Timeline, Audit, Components, Routes, Signals, Injectors, Forms, Pipes, SSR & HTTP, and Errors |
| NgRx | The Store tab |
| Analog | The Analog tab, or a notice in apps that do not use Analog |
| Angular Native | Components, Signals, Injectors and Store for a connected [Angular Native](./angular-native.md) app, or a setup notice when none is connected |
@@ -217,6 +217,7 @@ The URL hash selects a tab. Open `/__devframes/pangular/#tab=signals` to land on
| ---------- | ----------------- |
| Dashboard | `#tab=dashboard` |
| Timeline | `#tab=timeline` |
+| Audit | `#tab=audit` |
| Components | `#tab=components` |
| Routes | `#tab=routes` |
| Signals | `#tab=signals` |
diff --git a/apps/docs/src/content/guides/inspect-fix-verify.md b/apps/docs/src/content/guides/inspect-fix-verify.md
index 10ebdc7d..3e67e77e 100644
--- a/apps/docs/src/content/guides/inspect-fix-verify.md
+++ b/apps/docs/src/content/guides/inspect-fix-verify.md
@@ -95,7 +95,7 @@ The answer adds a **Before and after** section:
| New | Findings only the after audit has. Look at these before you call the change done. |
| Still there | Findings in both. When a count moved, it lists those findings, otherwise the first five. |
-When only one of the two audits ran axe, accessibility findings are not compared, and a note says so. Call `audit` with `session: "after"` again after another fix: it compares with the same baseline. Call it with `session: "before"` to start over from the current state, or `session: "clear"` to drop the baseline.
+When only one of the two audits ran axe, or both used the same pass, accessibility findings are not compared, and a note says so. A reload drops the page's last axe pass, so pass `axe: true` again after the change. Call `audit` with `session: "after"` again after another fix: it compares with the same baseline. Call it with `session: "before"` to start over from the current state, or `session: "clear"` to drop the baseline.
## Show the user
diff --git a/apps/docs/src/content/inspectors/audit.md b/apps/docs/src/content/inspectors/audit.md
index aee059e3..e562f79a 100644
--- a/apps/docs/src/content/inspectors/audit.md
+++ b/apps/docs/src/content/inspectors/audit.md
@@ -19,19 +19,19 @@ Agents get the same list from the `audit` tool. See [Agent tools](#agent-tools).
Each row is one finding:
-| Part | What it shows |
-| -------------- | ------------------------------------------------------------------------------------------------------------------- |
-| Severity | **error**, **warning** or **info**. |
-| Area | The inspector it comes from, or **Accessibility** for the axe pass. |
-| Subject | The component class, route, form, URL or pipe it is about. |
-| Count | How many times or places it occurs, as **3×**. |
-| Why | One line on why it is a problem. Values are masked like other live data. |
-| Rule | The check's id, such as `onpush-candidate`, `wildcard-not-last` or `image-alt`. |
-| Agent tool | The tool that explains the finding in detail, with its arguments, such as `explain-error { id: "e1" }`. |
-| Show component | For errors and hydration mismatches, opens the [Components](./components.md) tab on the component. |
-| Show in page | For other findings that map to an element, such as an axe violation, scrolls the page to it and draws a box around. |
-
-Errors come first, then warnings, then info. Within a severity, accessibility comes first, then errors, hydration, change detection, leaks, router, forms, HTTP and pipes, and then the finding that occurs most often. Filter by text, **Area** or **Severity**, and press `Escape` to clear the search. Hovering a row with an element outlines that element in the app.
+| Part | What it shows |
+| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| Severity | **error**, **warning** or **info**. |
+| Area | The inspector it comes from, or **Accessibility** for the axe pass. |
+| Subject | The component class, route, form, URL or pipe it is about. |
+| Count | How many times or places it occurs, as **3×**. |
+| Why | One line on why it is a problem. Values are masked like other live data. |
+| Rule | The check's id, such as `onpush-candidate`, `wildcard-not-last` or `image-alt`. |
+| Agent tool | The tool that explains the finding in detail, with its arguments, such as `explain-error { id: "e1" }`. |
+| Show component | For errors and hydration mismatches, opens the [Components](./components.md) tab on the component. Only with the Components inspector on. |
+| Show in page | For other findings that map to an element, such as an axe violation, scrolls the page to it and draws a box around. Only with the Components inspector on, which draws the box. |
+
+Errors come first, then warnings, then info. Within a severity, accessibility comes first, then errors, hydration, change detection, leaks, router, forms, HTTP and pipes, and then the finding that occurs most often. Filter by text, **Area** or **Severity**, and press `Escape` to clear the search. Hovering a row with an element outlines that element in the app, when the Components inspector is on.
### Where the findings come from
@@ -75,9 +75,9 @@ A number shows only when its area could be read. **Not checked** lists the areas
- Skips frames, and reports violations only.
- Reads the DOM and changes nothing in the app.
- Masks selectors, attributes and axe's summaries, and leaves out text content and `value` attributes.
-- Names the component whose template holds each element.
+- Names the component whose template holds each element, when the Components inspector is on.
-The tab keeps the last pass of each page, and the status line says when it ran. A page whose overlay has no axe pass, or that takes more than 60 seconds, gets an error that says so.
+The tab keeps the last pass of each page, and the status line says when it ran. A reload of the page drops its pass, since the elements it names are gone. A page whose overlay has no axe pass, or that takes more than 45 seconds, gets an error that says so.
### Before and after
@@ -93,7 +93,7 @@ The tab keeps the last pass of each page, and the status line says when it ran.
-The comparison shows each number before and after, with the change marked **better** or **worse** (lower is better for every number). Under it, **Resolved** lists findings the after audit no longer has, **New** the ones only it has, and **Changed count** the findings whose count moved. When only one of the two audits ran axe, accessibility findings are left out of the comparison, and a note says so. Taking another baseline drops the after audit. **Clear** drops both.
+The comparison shows each number before and after, with the change marked **better** or **worse** (lower is better for every number). Under it, **Resolved** lists findings the after audit no longer has, **New** the ones only it has, and **Changed count** the findings whose count moved. When only one of the two audits ran axe, or both used the same axe pass, accessibility findings are left out of the comparison, and a note says so. Run axe again after the change. A baseline an agent took compares with an after audit you take here, and the other way round. Taking another baseline drops the after audit. **Clear** drops both.
### Pages
@@ -105,7 +105,7 @@ When several tabs report, **Page** picks the one to audit. The panel of a tab st
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `pangular:audit` | The ranked findings with the tool to call for each, the key numbers and what could not be checked. `axe: true` runs a fresh axe pass first. `session` takes a baseline (`before`), compares (`after`) or `clear`s it. |
-The tool is an `action` tool because of `axe`. With `agent.readOnly`, it has no `axe` argument, reads the last pass the panel ran, and is marked read-only. An area whose agent tools are hidden with `agent.tools.: false` is left out of the agent's answer, and the panel still shows it. See [Tools](../agents/tools.md#audit) and [Inspect, fix and verify](../guides/inspect-fix-verify.md).
+The tool is an `action` tool because of `axe`. With `agent.readOnly`, it has no `axe` argument, reads the last pass the panel ran, and is marked read-only. It can then take a baseline only for a page that has none, and compare with it: `session: "clear"`, and `session: "before"` over an existing baseline, are refused, so the agent never drops a baseline you took. An area whose agent tools are hidden with `agent.tools.: false` is left out of the agent's answer, and **Coverage** says its agent tools are off. The panel still shows it. With the Components inspector's agent tools off, the axe findings name no component and no instance id. See [Tools](../agents/tools.md#audit) and [Inspect, fix and verify](../guides/inspect-fix-verify.md).
## Limits and gotchas
diff --git a/packages/devtools/src/__tests__/audit-findings.test.ts b/packages/devtools/src/__tests__/audit-findings.test.ts
index 204adfe5..902ce3bb 100644
--- a/packages/devtools/src/__tests__/audit-findings.test.ts
+++ b/packages/devtools/src/__tests__/audit-findings.test.ts
@@ -424,6 +424,20 @@ describe('diffAudits', () => {
expect(diff.resolved).toEqual([]);
expect(diff.notes.join(' ')).toContain('Only the before audit ran axe');
});
+
+ it('does not compare accessibility when both sides reuse one axe pass', () => {
+ const a11y = f('x', 'accessibility');
+ const before = { ...snapshot([a11y], { axeViolations: 1 }), axeAt: NOW };
+ const same = diffAudits(before, { ...before, at: NOW + 10 });
+ expect(same.resolved).toEqual([]);
+ expect(same.remaining).toEqual([]);
+ expect(same.metrics.map((m) => m.metric)).not.toContain('axeViolations');
+ expect(same.notes.join(' ')).toContain('Both audits used the same axe pass');
+
+ const fresh = diffAudits(before, { ...snapshot([], { axeViolations: 0 }), axeAt: NOW + 5 });
+ expect(keys(fresh.resolved)).toEqual(['x']);
+ expect(fresh.notes).toEqual([]);
+ });
});
describe('createAuditSessions', () => {
@@ -441,7 +455,7 @@ describe('createAuditSessions', () => {
expect(sessions.get('tab1')).toBeUndefined();
expect(sessions.get('tab2')).toBeDefined();
expect(changes).toBeGreaterThanOrEqual(5);
- expect(sessions.summary().pages['tab2']).toMatchObject({ before: { at: NOW, findings: 0 } });
+ expect(sessions.summary().pages['tab2']).toEqual({ before: NOW });
});
it('keeps at most maxPages, dropping the least recently used', () => {
@@ -462,9 +476,35 @@ describe('createAuditSessions', () => {
expect(sessions.summary().pages['tab1']).toBeUndefined();
});
- it('snapshots an audit with whether axe ran', () => {
+ it('snapshots an audit with whether axe ran and when', () => {
const report = buildAudit({ axe: axe() }, 'tab1', { url: '/trips' }, NOW);
- expect(snapshotOf(report)).toMatchObject({ axe: true, url: '/trips', at: NOW });
+ expect(snapshotOf(report)).toMatchObject({ axe: true, axeAt: NOW, url: '/trips', at: NOW });
+ });
+
+ it('keeps a session alive while it is read, without telling clients', () => {
+ let changes = 0;
+ const sessions = createAuditSessions({ ttlMs: 1000, onChange: () => changes++ });
+ sessions.mark('tab1', 'before', snapshot([], {}), 0);
+ changes = 0;
+ expect(sessions.use('tab1', 900)).toBeDefined();
+ expect(sessions.use('tab2', 900)).toBeUndefined();
+ expect(sessions.get('tab2')).toBeUndefined();
+ sessions.expire(1500);
+ expect(sessions.get('tab1')).toBeDefined();
+ expect(changes).toBe(0);
+ sessions.expire(2000);
+ expect(sessions.get('tab1')).toBeUndefined();
+ });
+
+ it('drops the axe pass of a page that loaded again and keeps its baseline', () => {
+ const sessions = createAuditSessions();
+ sessions.mark('tab1', 'before', snapshot([], {}));
+ expect(sessions.dropAxe('tab1')).toBe(false);
+ sessions.setAxe('tab1', axe());
+ expect(sessions.summary().pages['tab1']).toEqual({ before: NOW, axe: NOW });
+ expect(sessions.dropAxe('tab1')).toBe(true);
+ expect(sessions.get('tab1')?.axe).toBeUndefined();
+ expect(sessions.get('tab1')?.before).toBeDefined();
});
});
diff --git a/packages/devtools/src/__tests__/audit-tools.test.ts b/packages/devtools/src/__tests__/audit-tools.test.ts
index 0a638197..0ddc22dc 100644
--- a/packages/devtools/src/__tests__/audit-tools.test.ts
+++ b/packages/devtools/src/__tests__/audit-tools.test.ts
@@ -4,7 +4,7 @@ import { createPangular } from '../devframe.ts';
import type { PangularConfig } from '../config.ts';
import { agentSafety, resolvePangularConfig } from '../config.ts';
import type { AxeReport } from '../axe-runner.ts';
-import { createAxeRequests } from '../rpc/audit-axe.ts';
+import { AXE_TIMEOUT_MS, createAxeRequests } from '../rpc/audit-axe.ts';
import type { ErrorsReport } from '../rpc/errors-tools.ts';
const JWT = ['eyJhbGciOiJIUzI1NiJ9', 'eyJzdWIiOiIxMjM0NSJ9', 'c2lnbmF0dXJlc2ln'].join('.');
@@ -234,7 +234,8 @@ describe('the audit agent tool', () => {
await call('push-errors', errors('tab1'));
const text = await audit();
expect(text).not.toContain('TripList');
- expect(text).toContain('Errors: its inspector is turned off.');
+ expect(text).toContain('Errors: its agent tools are off (`agent.tools.errors`).');
+ expect(text).not.toContain('Errors: its inspector is turned off.');
const panel = await call('get-audit', { pageId: 'tab1' });
expect(panel.report.findings).toEqual([
expect.objectContaining({ area: 'errors', subject: 'TripList' }),
@@ -257,9 +258,114 @@ describe('the audit agent tool', () => {
'errors',
].map((key) => [key, false]),
);
- const { tool, call } = await boot({ inspectors });
+ const { ctx, tool, call, audit } = await boot({ inspectors });
expect(tool()).toBeDefined();
expect(await call('get-audit', {})).toEqual({ pages: [], report: null });
+ // A page the overlay claimed is listed, so axe still runs on it.
+ const host = ctx.rpc as unknown as { getCurrentRpcSession: () => unknown };
+ host.getCurrentRpcSession = () => ({ meta: { id: 1 } });
+ await call('claim-page', { pageId: 'tab1', key: 'k'.repeat(32) });
+ host.getCurrentRpcSession = () => undefined;
+ expect((await call('get-audit', {})).pages).toEqual([
+ expect.objectContaining({ pageId: 'tab1' }),
+ ]);
+ answerAxe(ctx, call, () => axeReport());
+ expect(await audit({ axe: true })).toContain('axe rules broken 1');
+ });
+
+ it('audits a page that only the Errors inspector reports', async () => {
+ const inspectors = Object.fromEntries(
+ ['components', 'injectors', 'signals', 'ngrx', 'forms', 'router', 'pipes', 'http'].map(
+ (key) => [key, false],
+ ),
+ );
+ const { call, audit } = await boot({ inspectors });
+ await call('push-errors', errors('tab1'));
+ const text = await audit();
+ expect(text).toContain('Audit of page `tab1`');
+ expect(text).toContain('`TripList`');
+ expect((await call('get-audit', {})).pages).toEqual([
+ expect.objectContaining({ pageId: 'tab1' }),
+ ]);
+ });
+
+ it('does not compare accessibility when the before and after audits reuse one axe pass', async () => {
+ const { ctx, call, audit } = await boot();
+ await call('push-component-tree', tree('tab1'));
+ answerAxe(ctx, call, () => axeReport(2));
+ await audit({ session: 'before', axe: true });
+ const after = await audit({ session: 'after' });
+ expect(after).toContain('Both audits used the same axe pass');
+ expect(after).not.toContain('| axe rules broken |');
+ expect(after).toMatch(/\*\*Still there\*\* \(0\)/);
+ });
+
+ it('drops the axe pass, not the baseline, when the page loads again', async () => {
+ const { ctx, call, audit } = await boot();
+ await call('push-component-tree', tree('tab1'));
+ answerAxe(ctx, call, () => axeReport());
+ await audit({ session: 'before', axe: true });
+ expect((await call('get-audit', { pageId: 'tab1' })).axe).not.toBeNull();
+ await call('claim-page', { pageId: 'tab1', key: 'k'.repeat(32) });
+ const result = await call('get-audit', { pageId: 'tab1' });
+ expect(result.axe).toBeNull();
+ expect(result.session.before).toMatchObject({ axe: true, axeAt: expect.any(Number) });
+ expect(await audit({ session: 'after' })).toContain('Only the before audit ran axe');
+ });
+
+ it('keeps the full baseline an agent took, so the panel after audit does not see hidden areas as new', async () => {
+ const { call, audit } = await boot({
+ agent: { tools: { errors: false } },
+ inspectors: { pipes: false },
+ });
+ await call('push-component-tree', tree('tab1'));
+ await call('push-errors', errors('tab1'));
+ await audit({ session: 'before' });
+ expect(await call('audit-session', { pageId: 'tab1', action: 'after' })).toEqual({ ok: true });
+ const { session } = await call('get-audit', { pageId: 'tab1' });
+ expect(session.before.findings).toEqual([expect.objectContaining({ area: 'errors' })]);
+ expect(session.diff.added).toEqual([]);
+ expect(session.diff.remaining).toEqual([expect.objectContaining({ area: 'errors' })]);
+ // The agent's comparison still leaves the hidden area out.
+ const after = await audit({ session: 'after' });
+ expect(after).not.toContain('TripList');
+ expect(after).not.toContain('Error occurrences');
+ });
+
+ it('keeps component owners out of the axe answer when the agent cannot see components', async () => {
+ const { ctx, call, audit } = await boot({
+ agent: { tools: { components: false } },
+ inspectors: { pipes: false },
+ });
+ await call('push-component-tree', tree('tab1'));
+ answerAxe(ctx, call, () => axeReport(2));
+ await audit({ session: 'before', axe: true });
+ const text = await audit({ area: 'accessibility', axe: true, session: 'after' });
+ expect(text).toContain('`image-alt` Images must have alternative text');
+ expect(text).not.toContain('TripPhoto');
+ expect(text).not.toContain('c1-3');
+ expect(text).not.toContain('inspect-component');
+ const panel = await call('get-audit', { pageId: 'tab1' });
+ expect(panel.report.findings).toContainEqual(
+ expect.objectContaining({ area: 'accessibility', subject: 'TripPhoto' }),
+ );
+ });
+
+ it('refuses to drop or replace the baseline in read-only mode', async () => {
+ const { call, audit } = await boot({ agent: { readOnly: true }, inspectors: { pipes: false } });
+ await call('push-component-tree', tree('tab1'));
+ await call('push-errors', errors('tab1'));
+ expect(await audit({ session: 'before' })).toContain('Saved this audit as the baseline');
+ const taken = (await call('get-audit', { pageId: 'tab1' })).session.before.at;
+ expect(await audit({ session: 'before' })).toContain("can't replace the audit session");
+ expect(await audit({ session: 'clear' })).toContain("can't drop the audit session");
+ expect((await call('get-audit', { pageId: 'tab1' })).session.before.at).toBe(taken);
+ expect(await audit({ session: 'after' })).toContain('## Before and after');
+ });
+
+ it('stops waiting for axe before the client gives up on the call', () => {
+ // devframe's client times an RPC call out after 60 s.
+ expect(AXE_TIMEOUT_MS).toBeLessThan(60_000);
});
});
@@ -287,10 +393,11 @@ describe('the audit RPC functions for the panel', () => {
sharedState: { get: (key: string) => Promise<{ value: () => any }> };
}
).sharedState.get('pangular:audit');
- expect(shared.value().pages['tab1']).toMatchObject({
- before: { findings: 2 },
- after: { findings: 1 },
- axe: { violations: 1 },
+ // Times only: a count would tell other clients what hidden areas hold.
+ expect(shared.value().pages['tab1']).toEqual({
+ before: expect.any(Number),
+ after: expect.any(Number),
+ axe: expect.any(Number),
});
expect(await call('audit-session', { pageId: 'tab1', action: 'nope' })).toMatchObject({
ok: false,
diff --git a/packages/devtools/src/__tests__/axe-runner.test.ts b/packages/devtools/src/__tests__/axe-runner.test.ts
index 07007d88..edce43c8 100644
--- a/packages/devtools/src/__tests__/axe-runner.test.ts
+++ b/packages/devtools/src/__tests__/axe-runner.test.ts
@@ -1,6 +1,12 @@
// @vitest-environment jsdom
import { afterEach, describe, expect, it, vi } from 'vitest';
-import { OVERLAY_HOST_IDS, attachAxe, nodeSnippet, type AxeLike } from '../axe-runner.ts';
+import {
+ OVERLAY_HOST_IDS,
+ attachAxe,
+ axeOwnerNg,
+ nodeSnippet,
+ type AxeLike,
+} from '../axe-runner.ts';
import type { BlockOwnerDebugNg } from '../block-owner.ts';
const JWT = ['eyJhbGciOiJIUzI1NiJ9', 'eyJzdWIiOiIxMjM0NSJ9', 'c2lnbmF0dXJlc2ln'].join('.');
@@ -69,6 +75,30 @@ afterEach(() => {
});
describe('attachAxe', () => {
+ it('names element owners only with the Components inspector on', async () => {
+ const { ng } = page();
+ const axe = fakeAxe(() => [document.getElementById('hero')!]);
+ const owners = async (componentsOn: boolean) => {
+ const channel = rpc();
+ attachAxe(
+ channel.my,
+ 'tab1',
+ axeOwnerNg(componentsOn, () => ng),
+ {
+ loadAxe: async () => ({ default: axe }),
+ },
+ );
+ channel.emit('axe-run', { requestId: 'a1', pageId: 'tab1' });
+ await vi.waitFor(() => expect(channel.calls).toHaveLength(1));
+ return channel.calls[0]!.message.result.report.violations[0].nodes[0];
+ };
+ expect((await owners(true)).owner).toMatchObject({ name: 'TripCard' });
+ const hidden = await owners(false);
+ expect(hidden.owner).toBeUndefined();
+ // The element id is the overlay's own WeakMap id, kept for the panel.
+ expect(hidden.elementId).toEqual(expect.any(String));
+ });
+
it('loads axe-core only when its own page asks for a pass', async () => {
const { ng } = page();
const axe = fakeAxe(() => [document.getElementById('hero')!]);
diff --git a/packages/devtools/src/__tests__/page-owners.test.ts b/packages/devtools/src/__tests__/page-owners.test.ts
index 7a795bf0..c0f32713 100644
--- a/packages/devtools/src/__tests__/page-owners.test.ts
+++ b/packages/devtools/src/__tests__/page-owners.test.ts
@@ -26,6 +26,18 @@ function fakeHost() {
describe('page owners', () => {
afterEach(() => vi.useRealTimers());
+ it('lists the claimed pages whose connection is still open', () => {
+ const { host, as, close } = fakeHost();
+ const owners = createPageOwners(host, () => PAGE_TTL_MS);
+ as(1);
+ owners.claim('tab-1', keyOf('a'));
+ as(2);
+ owners.claim('tab-2', keyOf('b'));
+ expect(owners.live().map((page) => page.pageId)).toEqual(['tab-1', 'tab-2']);
+ close(1);
+ expect(owners.live()).toEqual([{ pageId: 'tab-2', reportedAt: expect.any(Number) }]);
+ });
+
it('gives a page to the first connection and refuses another one', () => {
const { host, as } = fakeHost();
const owners = createPageOwners(host, () => PAGE_TTL_MS);
diff --git a/packages/devtools/src/__tests__/pipe-lint-cache.test.ts b/packages/devtools/src/__tests__/pipe-lint-cache.test.ts
new file mode 100644
index 00000000..56166a6a
--- /dev/null
+++ b/packages/devtools/src/__tests__/pipe-lint-cache.test.ts
@@ -0,0 +1,20 @@
+import { describe, expect, it, vi } from 'vitest';
+import { cachedPipeLint } from '../rpc/pipe-lint-cache.ts';
+import type { PipeLintFinding } from '../rpc/pipe-lint.ts';
+
+describe('cachedPipeLint', () => {
+ it('scans once within the time to live, then again', () => {
+ let now = 0;
+ const findings: PipeLintFinding[] = [];
+ const lint = vi.fn(() => findings);
+ const cached = cachedPipeLint(lint, { ttlMs: 1000, now: () => now });
+ expect(cached()).toBe(findings);
+ now = 999;
+ cached();
+ cached();
+ expect(lint).toHaveBeenCalledTimes(1);
+ now = 1000;
+ cached();
+ expect(lint).toHaveBeenCalledTimes(2);
+ });
+});
diff --git a/packages/devtools/src/axe-runner.ts b/packages/devtools/src/axe-runner.ts
index 2b76043a..2e426e9e 100644
--- a/packages/devtools/src/axe-runner.ts
+++ b/packages/devtools/src/axe-runner.ts
@@ -191,6 +191,18 @@ function axeOf(module: unknown): AxeLike | null {
return null;
}
+/**
+ * The debug API the axe pass names element owners with: `getNg` with the
+ * Components inspector on, nothing otherwise, since the owner (class name
+ * and instance id) is component data that inspector gates.
+ */
+export function axeOwnerNg(
+ componentsOn: boolean,
+ getNg: () => BlockOwnerDebugNg | undefined,
+): () => BlockOwnerDebugNg | undefined {
+ return componentsOn ? getNg : () => undefined;
+}
+
/**
* Runs axe-core over the app when the server asks (`axe-run`), never on its
* own, and answers with `axe-result`. axe-core is loaded on the first request
diff --git a/packages/devtools/src/devframe.ts b/packages/devtools/src/devframe.ts
index 178b47af..688df915 100644
--- a/packages/devtools/src/devframe.ts
+++ b/packages/devtools/src/devframe.ts
@@ -32,6 +32,7 @@ import { registerInjectionExplain } from './rpc/injection-explain.ts';
import { sanitizeInjectorTree } from './rpc/injector-report.ts';
import { createFrameworkNames, markFramework } from './rpc/framework-tokens.ts';
import { lintPipes, lintPipesText } from './rpc/pipe-lint.ts';
+import { cachedPipeLint } from './rpc/pipe-lint-cache.ts';
import { explainPipeOnPage, pipeRecordRequest, pipeRecordText } from './rpc/pipes-agent.ts';
import { createPageOwners } from './rpc/page-owners.ts';
import { trackPageSessions } from './rpc/page-sessions.ts';
@@ -401,6 +402,7 @@ const pangular = defineDevframe({
return true;
};
+ let onPageClaimed = (_pageId: string) => {};
register({
name: 'claim-page',
type: 'action',
@@ -408,7 +410,10 @@ const pangular = defineDevframe({
handler: (message: { pageId?: unknown; key?: unknown } | null) => {
const pageId = message?.pageId;
if (typeof pageId !== 'string' || !pageId || pageId.length >= 50) return { ok: false };
- return { ok: owners.claim(pageId, message?.key) };
+ const ok = owners.claim(pageId, message?.key);
+ // The overlay claims once per load: what the audit holds of the old document is stale.
+ if (ok) onPageClaimed(pageId);
+ return { ok };
},
});
@@ -3944,15 +3949,25 @@ const pangular = defineDevframe({
});
});
- await registerAudit({
+ const audit = await registerAudit({
my,
register,
agent,
answersFor,
agentSees: (inspector) => config.agent.tools[inspector],
agentAxe: !config.agent.readOnly,
+ agentReadOnly: config.agent.readOnly,
+ // Every page the overlay claimed, so axe works with any set of inspectors on.
pages: () =>
- withPageUrls([...componentPages.values(), ...httpPages.values(), ...routerPages.values()]),
+ withPageUrls([
+ ...owners.live(),
+ ...componentPages.values(),
+ ...httpPages.values(),
+ ...routerPages.values(),
+ ...formPages.values(),
+ ...(errorsInspector?.pages() ?? []),
+ ...(leaksInspector?.pages() ?? []),
+ ]),
sources: {
...(on.components
? {
@@ -3965,9 +3980,10 @@ const pangular = defineDevframe({
...(on.router ? { router: () => routerState.value() as RouterState } : {}),
...(on.forms ? { forms: () => formsState.value() as FormsState } : {}),
...(on.http ? { http: () => httpState.value() as HttpState } : {}),
- ...(on.pipes ? { pipes: () => lintPipes(ctx.cwd) } : {}),
+ ...(on.pipes ? { pipes: cachedPipeLint(() => lintPipes(ctx.cwd)) } : {}),
},
});
+ onPageClaimed = audit.pageLoaded;
if (on.analog) {
await registerAnalog(my as never, { cwd: ctx.cwd, agent } as never, {
diff --git a/packages/devtools/src/overlay.ts b/packages/devtools/src/overlay.ts
index de47e29b..6d4abebc 100644
--- a/packages/devtools/src/overlay.ts
+++ b/packages/devtools/src/overlay.ts
@@ -9,7 +9,7 @@ import { attachHttp } from './http-overlay.ts';
import { attachCapacitor } from './capacitor-overlay.ts';
import { attachErrors } from './errors-collector.ts';
import { attachLeaks } from './leaks-collector.ts';
-import { attachAxe } from './axe-runner.ts';
+import { attachAxe, axeOwnerNg } from './axe-runner.ts';
import { createRecentWrites } from './error-explain.ts';
import { allowClientRules, httpRegistry } from './http-rules.ts';
import { attachNgrx } from './ngrx-overlay.ts';
@@ -499,7 +499,8 @@ async function startOverlay(options: OverlayOptions, own: (cleanup: () => void)
? attachLeaks(my, pageId, getNg, { tickMs, active: () => lease.active })
: null;
// Runs axe-core only when the panel or an agent asks; it loads axe-core then.
- const axe = attachAxe(my, pageId, getNg);
+ // The component owning each element is component data: only with that inspector on.
+ const axe = attachAxe(my, pageId, axeOwnerNg(on.components, getNg));
const angularInfo = attachAngularInfo(my, pageId, getNg, { tickMs });
const consoleGlobals = attachConsoleGlobals(my, pageId, {
getNg,
diff --git a/packages/devtools/src/rpc/audit-audience.ts b/packages/devtools/src/rpc/audit-audience.ts
new file mode 100644
index 00000000..6cf8dd8e
--- /dev/null
+++ b/packages/devtools/src/rpc/audit-audience.ts
@@ -0,0 +1,45 @@
+// What an agent may see of the axe pass. Each axe element names the component
+// that holds it (class name and instance id), which is component data: when
+// the agent can't see the Components inspector, the owners, the element ids
+// and the findings grouped by owner are folded away before the answer.
+
+import type { AxeReport } from '../axe-runner.ts';
+import { rankFindings, type AuditFinding } from './audit-findings.ts';
+
+/** The axe pass without the component that owns each element, nor its element id. */
+export function withoutAxeOwners(report: AxeReport): AxeReport {
+ return {
+ ...report,
+ violations: report.violations.map((violation) => ({
+ ...violation,
+ nodes: violation.nodes.map(({ owner: _owner, elementId: _elementId, ...node }) => node),
+ })),
+ };
+}
+
+/**
+ * Accessibility findings folded to one per rule, without the owning
+ * component as subject. Applied to both sides of a comparison, keys stay
+ * comparable.
+ */
+export function withoutOwnerSubjects(findings: AuditFinding[]): AuditFinding[] {
+ const out: AuditFinding[] = [];
+ const byRule = new Map();
+ for (const finding of findings) {
+ if (finding.area !== 'accessibility') {
+ out.push(finding);
+ continue;
+ }
+ const key = `accessibility:${finding.rule}:`;
+ const seen = byRule.get(key);
+ if (seen) {
+ seen.count = (seen.count ?? 1) + (finding.count ?? 1);
+ continue;
+ }
+ const { subject: _subject, elementId: _elementId, ...rest } = finding;
+ const folded: AuditFinding = { ...rest, key };
+ byRule.set(key, folded);
+ out.push(folded);
+ }
+ return byRule.size ? rankFindings(out) : out;
+}
diff --git a/packages/devtools/src/rpc/audit-axe.ts b/packages/devtools/src/rpc/audit-axe.ts
index 9391ee30..660906bf 100644
--- a/packages/devtools/src/rpc/audit-axe.ts
+++ b/packages/devtools/src/rpc/audit-axe.ts
@@ -15,8 +15,12 @@ import { redactUrl } from '../router.ts';
import { redactText } from '../serialize.ts';
import { clip } from '../text.ts';
-/** How long a pass may take before the server stops waiting. axe on a large page takes seconds. */
-export const AXE_TIMEOUT_MS = 60_000;
+/**
+ * How long a pass may take before the server stops waiting. axe on a large
+ * page takes seconds. Shorter than devframe's own RPC timeout (60 s), so the
+ * panel gets this error, which says what to check, instead of a generic one.
+ */
+export const AXE_TIMEOUT_MS = 45_000;
const IMPACTS: readonly AxeImpact[] = ['critical', 'serious', 'moderate', 'minor'];
diff --git a/packages/devtools/src/rpc/audit-findings.ts b/packages/devtools/src/rpc/audit-findings.ts
index 885b5fcd..6845df61 100644
--- a/packages/devtools/src/rpc/audit-findings.ts
+++ b/packages/devtools/src/rpc/audit-findings.ts
@@ -154,8 +154,11 @@ export const METRIC_ORDER: (keyof AuditMetrics)[] = [
/** Whether the audit could read an area, and why not. */
export interface AuditSource {
area: AuditArea;
- /** `ok`: read; `empty`: on, with nothing to read yet; `off`: its inspector is off. */
- state: 'ok' | 'empty' | 'off';
+ /**
+ * `ok`: read; `empty`: on, with nothing to read yet; `off`: its inspector is
+ * off; `hidden`: on, but the agent's tools for it are off (`agent.tools`).
+ */
+ state: 'ok' | 'empty' | 'off' | 'hidden';
note?: string;
}
diff --git a/packages/devtools/src/rpc/audit-register.ts b/packages/devtools/src/rpc/audit-register.ts
index 17880e46..6ae38e2f 100644
--- a/packages/devtools/src/rpc/audit-register.ts
+++ b/packages/devtools/src/rpc/audit-register.ts
@@ -1,6 +1,7 @@
import { createSharedState } from 'devframe/utils/shared-state';
import type { PangularInspector } from '../config.ts';
import type { ComponentPage, HttpState } from '../types.ts';
+import { withoutAxeOwners, withoutOwnerSubjects } from './audit-audience.ts';
import { createAxeRequests } from './audit-axe.ts';
import {
AUDIT_AREAS,
@@ -95,6 +96,11 @@ export interface AuditHost {
agentSees(inspector: PangularInspector): boolean;
/** Whether the agent may run axe on the page: off in `agent.readOnly`. */
agentAxe: boolean;
+ /**
+ * `agent.readOnly`: the agent may read the audit and compare with a
+ * baseline, but not drop or replace the baseline the user took.
+ */
+ agentReadOnly?: boolean;
timeoutMs?: number;
}
@@ -102,6 +108,11 @@ export interface AuditRegistration {
/** The audit as the panel or an agent sees it, for tests. */
audit(pageId: string, audience?: 'panel' | 'agent'): AuditReport;
sessions: ReturnType;
+ /**
+ * A page loaded again (it claimed its page id): its last axe pass names
+ * elements that are gone, so it is dropped. The baseline stays.
+ */
+ pageLoaded(pageId: string): void;
stop(): void;
}
@@ -110,6 +121,19 @@ type SessionAction = (typeof MARKS)[number];
const SEVERITIES: readonly AuditSeverity[] = ['error', 'warning', 'info'];
+/** The source each area reads, to tell an area that is off from one hidden from the agent. */
+const AREA_SOURCE: Record = {
+ accessibility: undefined,
+ 'change-detection': 'cd',
+ leaks: 'leaks',
+ hydration: 'components',
+ errors: 'errors',
+ router: 'router',
+ forms: 'forms',
+ http: 'http',
+ pipes: 'pipes',
+};
+
/**
* The audit, shared by every inspector: the `audit` shared state (sessions
* and axe passes per page), the `get-audit`, `audit-session`,
@@ -171,13 +195,15 @@ export async function registerAudit(host: AuditHost): Promise
return [...seen.values()];
};
- const audit = (pageId: string, audience: 'panel' | 'agent' = 'panel') => {
- const page = pageList().find((entry) => entry.pageId === pageId);
- return buildAudit(inputsFor(pageId, audience), pageId, page ?? {});
- };
+ /** Whether axe elements may name their components: the agent sees them with the Components inspector. */
+ const ownersFor = (audience: 'panel' | 'agent') =>
+ audience === 'panel' || host.agentSees('components');
- /** Drops the areas an agent can't see from a snapshot the panel took. */
- const forAudience = (snapshot: AuditSnapshot, audience: 'panel' | 'agent'): AuditSnapshot => {
+ /** Drops the areas an agent can't see, and the axe owners when it can't see components. */
+ const forAudience = (
+ snapshot: T,
+ audience: 'panel' | 'agent',
+ ): T => {
if (audience === 'panel') return snapshot;
const metrics = Object.fromEntries(
Object.entries(snapshot.metrics).filter(([key]) => {
@@ -185,7 +211,8 @@ export async function registerAudit(host: AuditHost): Promise
return !area || visible(area, audience);
}),
) as unknown as AuditMetrics;
- const findings = snapshot.findings.filter((finding) => visible(finding.area, audience));
+ const shown = snapshot.findings.filter((finding) => visible(finding.area, audience));
+ const findings = ownersFor(audience) ? shown : withoutOwnerSubjects(shown);
const count = (severity: AuditSeverity) =>
findings.filter((finding) => finding.severity === severity).length;
return {
@@ -200,13 +227,33 @@ export async function registerAudit(host: AuditHost): Promise
};
};
+ const audit = (pageId: string, audience: 'panel' | 'agent' = 'panel'): AuditReport => {
+ const page = pageList().find((entry) => entry.pageId === pageId);
+ const report = buildAudit(inputsFor(pageId, audience), pageId, page ?? {});
+ if (audience === 'panel') return report;
+ // Name the areas that are on but hidden from the agent apart from the ones that are off.
+ const sources = report.sources.map((source) => {
+ const inspector = AREA_INSPECTOR[source.area];
+ const from = AREA_SOURCE[source.area];
+ return source.state === 'off' && inspector && from && host.sources[from]
+ ? {
+ area: source.area,
+ state: 'hidden' as const,
+ note: `its agent tools are off (\`agent.tools.${inspector}\`).`,
+ }
+ : source;
+ });
+ return { ...forAudience(report, audience), sources };
+ };
+
const diffOf = (session: AuditSession | undefined, audience: 'panel' | 'agent') =>
session?.before && session.after
? diffAudits(forAudience(session.before, audience), forAudience(session.after, audience))
: undefined;
- const mark = (pageId: string, action: AuditMark, report: AuditReport) =>
- sessions.mark(pageId, action, snapshotOf(report));
+ /** Saves the full audit, so a baseline the agent took compares with an after audit of the panel. */
+ const mark = (pageId: string, action: AuditMark) =>
+ sessions.mark(pageId, action, snapshotOf(audit(pageId, 'panel')));
/** The page a call names, else the most recent; an error text when it names none that reports. */
const resolvePage = (asked: unknown): { pageId: string; others: number } | { error: string } => {
@@ -227,6 +274,11 @@ export async function registerAudit(host: AuditHost): Promise
return { pageId: latest.pageId, others: pages.length - 1 };
};
+ const agentAxeReport = (pageId: string) => {
+ const report = sessions.get(pageId)?.axe;
+ return report && !ownersFor('agent') ? withoutAxeOwners(report) : report;
+ };
+
const timer = setInterval(() => sessions.expire(), EXPIRE_EVERY_MS);
timer.unref?.();
@@ -265,7 +317,7 @@ export async function registerAudit(host: AuditHost): Promise
const pages = pageList().map(({ pageId, url, title }) => ({ pageId, url, title }));
const page = resolvePage(message?.pageId);
if ('error' in page) return { pages, report: null };
- const session = sessions.get(page.pageId);
+ const session = sessions.use(page.pageId);
return {
pages,
report: audit(page.pageId),
@@ -297,7 +349,7 @@ export async function registerAudit(host: AuditHost): Promise
if (action === 'after' && !sessions.get(page.pageId)?.before) {
return { ok: false, error: 'Take a baseline first.' };
}
- mark(page.pageId, action as AuditMark, audit(page.pageId));
+ mark(page.pageId, action as AuditMark);
return { ok: true };
},
});
@@ -318,7 +370,11 @@ export async function registerAudit(host: AuditHost): Promise
host.agentAxe
? '`axe: true` runs a fresh axe pass first. '
: 'The agent is read-only, so it uses the last axe pass the panel ran. '
- }Measure a change with \`session\`: \`before\` saves this audit as the page's baseline, \`after\` takes the audit again and compares: findings resolved, new and still there, and each number before and after. Sessions are kept per page for 30 minutes after their last use and survive a reload of the tab. \`clear\` drops the page's session. An area whose inspector is off, or whose agent tools are off, is left out and named under Coverage.`,
+ }Measure a change with \`session\`: \`before\` saves this audit as the page's baseline, \`after\` takes the audit again and compares: findings resolved, new and still there, and each number before and after. Sessions are kept per page for 30 minutes after their last use and survive a reload of the tab. \`clear\` drops the page's session.${
+ host.agentReadOnly
+ ? ' The agent is read-only, so it can take a baseline only when the page has none, and cannot clear one.'
+ : ''
+ } An area whose inspector is off, or whose agent tools are off, is left out and named under Coverage.`,
inputSchema: {
type: 'object',
properties: {
@@ -355,6 +411,13 @@ export async function registerAudit(host: AuditHost): Promise
if (session !== undefined && !MARKS.includes(session)) {
return { markdown: 'Pass `session`: `before`, `after` or `clear`.' };
}
+ sessions.use(pageId);
+ const kept = sessions.get(pageId)?.before;
+ if (host.agentReadOnly && (session === 'clear' || (session === 'before' && kept))) {
+ return {
+ markdown: `The agent is read-only (\`agent.readOnly\`), so it can't ${session === 'clear' ? 'drop' : 'replace'} the audit session of page ${code(pageId)}, which the user may have taken.${kept ? ' Call with `session: "after"` to compare with the baseline.' : ''} Clear it in the panel's Audit tab.`,
+ };
+ }
if (session === 'clear') {
return {
markdown: sessions.clear(pageId)
@@ -378,7 +441,7 @@ export async function registerAudit(host: AuditHost): Promise
let sessionNote = axeNote;
let diff: AuditDiff | undefined;
if (session === 'before' || session === 'after') {
- const saved = mark(pageId, session, report);
+ const saved = mark(pageId, session);
if (session === 'before') {
sessionNote =
`${axeNote} Saved this audit as the baseline of page ${code(pageId)}. Make your change, reload or use the app the same way (record change detection again if you compare its numbers), then call with \`session: "after"\`.`.trim();
@@ -400,7 +463,8 @@ export async function registerAudit(host: AuditHost): Promise
severity,
limit,
otherPages: page.others,
- axe: sessions.get(pageId)?.axe,
+ axe: agentAxeReport(pageId),
+ axeOwners: ownersFor('agent'),
session: sessions.get(pageId),
sessionNote,
diff,
@@ -412,6 +476,7 @@ export async function registerAudit(host: AuditHost): Promise
return {
audit,
sessions,
+ pageLoaded: (pageId) => void sessions.dropAxe(pageId),
stop: () => clearInterval(timer),
};
}
diff --git a/packages/devtools/src/rpc/audit-sessions.ts b/packages/devtools/src/rpc/audit-sessions.ts
index 02fc3a5d..5dae56fe 100644
--- a/packages/devtools/src/rpc/audit-sessions.ts
+++ b/packages/devtools/src/rpc/audit-sessions.ts
@@ -11,7 +11,7 @@ import {
type AuditReport,
} from './audit-findings.ts';
-/** How long a session lives after its last change. Long enough to edit code and rebuild. */
+/** How long a session lives after its last use. Long enough to edit code and rebuild. */
export const AUDIT_SESSION_TTL_MS = 30 * 60_000;
/** Pages that keep a session or an axe pass at once; the least recently used goes first. */
export const MAX_AUDIT_PAGES = 10;
@@ -26,6 +26,8 @@ export interface AuditSnapshot {
metrics: AuditMetrics;
/** Whether an axe pass was part of it, so accessibility numbers compare like with like. */
axe: boolean;
+ /** When that axe pass ran, on the page clock, so two audits that reuse one pass are not compared. */
+ axeAt?: number;
}
export interface MetricChange {
@@ -55,21 +57,24 @@ export interface AuditSession {
after?: AuditSnapshot;
/** The page's last axe pass. */
axe?: AxeReport;
- /** Server clock of the last change. */
+ /** Server clock of the last use: a change, or a read by the panel or an agent. */
updatedAt: number;
}
-/** The `audit` shared state: a small summary per page, so the panel knows when to fetch again. */
+/**
+ * The `audit` shared state: when each page's session and axe pass last
+ * changed, so the panel knows when to fetch again. Times and flags only:
+ * every client can read it, and counts would tell what hidden areas hold.
+ */
export interface AuditSharedState {
pages: Record<
string,
{
- before?: { at: number; findings: number };
- after?: { at: number; findings: number };
- axe?: { at: number; violations: number };
+ before?: number;
+ after?: number;
+ axe?: number;
/** An axe pass is running on the page. */
running?: boolean;
- updatedAt: number;
}
>;
}
@@ -81,6 +86,7 @@ export function snapshotOf(report: AuditReport): AuditSnapshot {
findings: report.findings,
metrics: report.metrics,
axe: report.axeAt !== undefined,
+ ...(report.axeAt !== undefined ? { axeAt: report.axeAt } : {}),
};
}
@@ -88,9 +94,12 @@ export function snapshotOf(report: AuditReport): AuditSnapshot {
export function diffAudits(before: AuditSnapshot, after: AuditSnapshot): AuditDiff {
const beforeByKey = new Map(before.findings.map((finding) => [finding.key, finding]));
const afterKeys = new Set(after.findings.map((finding) => finding.key));
- // An axe pass on one side only would read as every violation fixed or added.
- const comparable = (finding: AuditFinding) =>
- finding.area !== 'accessibility' || (before.axe && after.axe);
+ // An axe pass on one side only would read as every violation fixed or added,
+ // and one pass reused by both says nothing about the change.
+ const samePass =
+ before.axe && after.axe && before.axeAt !== undefined && before.axeAt === after.axeAt;
+ const axeComparable = before.axe && after.axe && !samePass;
+ const comparable = (finding: AuditFinding) => finding.area !== 'accessibility' || axeComparable;
const resolved = before.findings.filter(
(finding) => !afterKeys.has(finding.key) && comparable(finding),
);
@@ -98,7 +107,7 @@ export function diffAudits(before: AuditSnapshot, after: AuditSnapshot): AuditDi
(finding) => !beforeByKey.has(finding.key) && comparable(finding),
);
const remaining = after.findings
- .filter((finding) => beforeByKey.has(finding.key))
+ .filter((finding) => beforeByKey.has(finding.key) && comparable(finding))
.map((finding) => {
const countBefore = beforeByKey.get(finding.key)?.count;
return countBefore === undefined ? finding : { ...finding, countBefore };
@@ -108,6 +117,7 @@ export function diffAudits(before: AuditSnapshot, after: AuditSnapshot): AuditDi
const was = before.metrics[metric];
const now = after.metrics[metric];
if (was === undefined && now === undefined) continue;
+ if (samePass && (metric === 'axeViolations' || metric === 'axeNodes')) continue;
metrics.push({
metric,
...(was === undefined ? {} : { before: was }),
@@ -122,6 +132,10 @@ export function diffAudits(before: AuditSnapshot, after: AuditSnapshot): AuditDi
notes.push(
`Only the ${before.axe ? 'before' : 'after'} audit ran axe, so accessibility findings are not compared. Run axe for both to compare them.`,
);
+ } else if (samePass) {
+ notes.push(
+ 'Both audits used the same axe pass, so accessibility findings are not compared. Run axe again after the change.',
+ );
}
if (before.url && after.url && before.url !== after.url) {
notes.push(`The page was on ${before.url} before and on ${after.url} after.`);
@@ -154,6 +168,13 @@ export function createAuditSessions(
return {
get: (pageId: string): AuditSession | undefined => sessions.get(pageId),
+ /**
+ * Marks a page's session as used by a read, so it lives on while the
+ * panel or an agent keeps reading it. Changes nothing a client sees.
+ */
+ use(pageId: string, now = Date.now()): AuditSession | undefined {
+ return sessions.has(pageId) ? touch(pageId, now) : undefined;
+ },
mark(pageId: string, mark: AuditMark, snapshot: AuditSnapshot, now = Date.now()) {
const session = touch(pageId, now);
session[mark] = snapshot;
@@ -166,6 +187,17 @@ export function createAuditSessions(
touch(pageId, now).axe = report;
changed();
},
+ /**
+ * Drops the page's axe pass when the page loads again: its element ids
+ * name elements that are gone. The baseline stays.
+ */
+ dropAxe(pageId: string): boolean {
+ const session = sessions.get(pageId);
+ if (!session?.axe) return false;
+ delete session.axe;
+ changed();
+ return true;
+ },
setRunning(pageId: string, on: boolean) {
if (on === running.has(pageId)) return;
if (on) running.add(pageId);
@@ -191,20 +223,13 @@ export function createAuditSessions(
const pages: AuditSharedState['pages'] = {};
for (const session of sessions.values()) {
pages[session.pageId] = {
- updatedAt: session.updatedAt,
- ...(session.before
- ? { before: { at: session.before.at, findings: session.before.findings.length } }
- : {}),
- ...(session.after
- ? { after: { at: session.after.at, findings: session.after.findings.length } }
- : {}),
- ...(session.axe
- ? { axe: { at: session.axe.at, violations: session.axe.violations.length } }
- : {}),
+ ...(session.before ? { before: session.before.at } : {}),
+ ...(session.after ? { after: session.after.at } : {}),
+ ...(session.axe ? { axe: session.axe.at } : {}),
};
}
for (const pageId of running) {
- pages[pageId] = { ...(pages[pageId] ?? { updatedAt: Date.now() }), running: true };
+ pages[pageId] = { ...pages[pageId], running: true };
}
return { pages };
},
diff --git a/packages/devtools/src/rpc/audit-text.ts b/packages/devtools/src/rpc/audit-text.ts
index 91b5f99a..bccf7356 100644
--- a/packages/devtools/src/rpc/audit-text.ts
+++ b/packages/devtools/src/rpc/audit-text.ts
@@ -71,8 +71,12 @@ function sourcesText(report: AuditReport): string {
return lines.length ? `**Coverage**\n${lines.join('\n')}` : '';
}
-/** The nodes of each axe rule, for `area: "accessibility"`. */
-export function axeDetailText(report: AxeReport, limit: number): string {
+/**
+ * The nodes of each axe rule, for `area: "accessibility"`. Without `owners`
+ * (the agent can't see the Components inspector), pass a report without
+ * owners and the hint to the component tools is left out.
+ */
+export function axeDetailText(report: AxeReport, limit: number, owners = true): string {
if (!report.violations.length) {
return `**axe pass** (${report.ms} ms${report.version ? `, axe-core ${report.version}` : ''}): no violations in the app.`;
}
@@ -89,7 +93,10 @@ export function axeDetailText(report: AxeReport, limit: number): string {
: '';
return `- **${code(violation.id)}** ${violation.impact ?? ''} (${violation.count}): ${cell(violation.help)}${violation.helpUrl ? ` [Rule](${violation.helpUrl})` : ''}${violation.tags.length ? ` ${violation.tags.map(code).join(' ')}` : ''}\n${nodes}${more}`;
});
- return `**axe pass** (${report.ms} ms${report.version ? `, axe-core ${report.version}` : ''}), rules by elements affected. Selectors and attributes are masked, and text content is left out. Pass an instance id to pangular:inspect-component, or an element to pangular:highlight.\n\n${sections.join('\n')}`;
+ const hint = owners
+ ? ' Pass an instance id to pangular:inspect-component, or an element to pangular:highlight.'
+ : '';
+ return `**axe pass** (${report.ms} ms${report.version ? `, axe-core ${report.version}` : ''}), rules by elements affected. Selectors and attributes are masked, and text content is left out.${hint}\n\n${sections.join('\n')}`;
}
export interface AuditTextArgs {
@@ -99,6 +106,8 @@ export interface AuditTextArgs {
/** Other pages the caller could pick, for a note. */
otherPages?: number;
axe?: AxeReport;
+ /** Whether the axe elements may name their components (the agent sees the Components inspector). */
+ axeOwners?: boolean;
session?: AuditSession;
/** What the call did to the session. */
sessionNote?: string;
@@ -161,7 +170,9 @@ export function auditText(report: AuditReport, args: AuditTextArgs): string {
}
if (args.sessionNote) parts.push(args.sessionNote);
parts.push(shown.length ? findingRows(shown, args.limit) : 'No finding.');
- if (args.area === 'accessibility' && args.axe) parts.push(axeDetailText(args.axe, args.limit));
+ if (args.area === 'accessibility' && args.axe) {
+ parts.push(axeDetailText(args.axe, args.limit, args.axeOwners ?? true));
+ }
parts.push(metricsText(report.metrics));
const coverage = sourcesText(report);
if (coverage) parts.push(coverage);
diff --git a/packages/devtools/src/rpc/page-owners.ts b/packages/devtools/src/rpc/page-owners.ts
index 92810b53..0f42b08f 100644
--- a/packages/devtools/src/rpc/page-owners.ts
+++ b/packages/devtools/src/rpc/page-owners.ts
@@ -31,6 +31,11 @@ export interface PageOwners {
forget(pageId: string): boolean;
/** Whether `pageId` reported or pinged within its expiry on a connection that is still open. */
alive(pageId: string, now?: number): boolean;
+ /**
+ * The pages that are alive, with when their owner was last seen: every
+ * page the overlay claimed, whichever inspectors are on.
+ */
+ live(now?: number): { pageId: string; reportedAt: number }[];
/** Drops owners that have been quiet for long, so the map does not grow. */
expire(now?: number): void;
}
@@ -99,6 +104,11 @@ export function createPageOwners(host: unknown, ttl: PageTtl): PageOwners {
const owner = owners.get(pageId);
return !!owner && !gone(pageId, owner, now);
},
+ live(now = Date.now()) {
+ return [...owners]
+ .filter(([pageId, owner]) => !gone(pageId, owner, now))
+ .map(([pageId, owner]) => ({ pageId, reportedAt: owner.seenAt }));
+ },
expire(now = Date.now()) {
for (const [pageId, owner] of owners) {
if (now - owner.seenAt > Math.max(ttl(pageId), HIDDEN_PAGE_TTL_MS)) {
diff --git a/packages/devtools/src/rpc/pipe-lint-cache.ts b/packages/devtools/src/rpc/pipe-lint-cache.ts
new file mode 100644
index 00000000..7729c0a1
--- /dev/null
+++ b/packages/devtools/src/rpc/pipe-lint-cache.ts
@@ -0,0 +1,25 @@
+// The pipe lint scans every source file synchronously. The audit reads it on
+// each call, and the panel fetches the audit again on every session or axe
+// change, so one result is kept for a short while instead of scanning again.
+
+import type { PipeLintFinding } from './pipe-lint.ts';
+
+/** How long one pipe lint result is reused. Short enough to see a saved edit on the next audit. */
+export const PIPE_LINT_TTL_MS = 10_000;
+
+/** Wraps `lint` so calls within `ttlMs` of the last scan reuse its result. */
+export function cachedPipeLint(
+ lint: () => PipeLintFinding[],
+ options: { ttlMs?: number; now?: () => number } = {},
+): () => PipeLintFinding[] {
+ const ttlMs = options.ttlMs ?? PIPE_LINT_TTL_MS;
+ const now = options.now ?? Date.now;
+ let last: { at: number; findings: PipeLintFinding[] } | undefined;
+ return () => {
+ const at = now();
+ if (!last || at - last.at >= ttlMs || at < last.at) {
+ last = { at, findings: lint() };
+ }
+ return last.findings;
+ };
+}
From 0a45dcdb32d0f2e6a7e384183c1045b9fba1fd46 Mon Sep 17 00:00:00 2001
From: erKam
Date: Tue, 13 Oct 2026 07:10:51 +0000
Subject: [PATCH 4/5] build(extension): rebuild the panel bundle
The Audit tab picked up the review fixes.
---
...h1z-DojfAbAj.js => browser-agent-rpc-BXhoSh1z-B_f3HV4w.js} | 2 +-
extension/ui/assets/{index-CkjVN-Tb.js => index-DJ-lPKba.js} | 4 ++--
extension/ui/index.html | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
rename extension/ui/assets/{browser-agent-rpc-BXhoSh1z-DojfAbAj.js => browser-agent-rpc-BXhoSh1z-B_f3HV4w.js} (93%)
rename extension/ui/assets/{index-CkjVN-Tb.js => index-DJ-lPKba.js} (99%)
diff --git a/extension/ui/assets/browser-agent-rpc-BXhoSh1z-DojfAbAj.js b/extension/ui/assets/browser-agent-rpc-BXhoSh1z-B_f3HV4w.js
similarity index 93%
rename from extension/ui/assets/browser-agent-rpc-BXhoSh1z-DojfAbAj.js
rename to extension/ui/assets/browser-agent-rpc-BXhoSh1z-B_f3HV4w.js
index 10dccd51..80939169 100644
--- a/extension/ui/assets/browser-agent-rpc-BXhoSh1z-DojfAbAj.js
+++ b/extension/ui/assets/browser-agent-rpc-BXhoSh1z-B_f3HV4w.js
@@ -1 +1 @@
-import{t as e}from"./index-CkjVN-Tb.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(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).catch(()=>{}))}))},s=a(o),l=e.events.on(`connection:status`,e=>{e===`connected`&&o()});return o(),()=>{n=!0,s(),l()}}export{l as setupBrowserAgentRpcBridge};
\ No newline at end of file
+import{t as e}from"./index-DJ-lPKba.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(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).catch(()=>{}))}))},s=a(o),l=e.events.on(`connection:status`,e=>{e===`connected`&&o()});return o(),()=>{n=!0,s(),l()}}export{l as setupBrowserAgentRpcBridge};
\ No newline at end of file
diff --git a/extension/ui/assets/index-CkjVN-Tb.js b/extension/ui/assets/index-DJ-lPKba.js
similarity index 99%
rename from extension/ui/assets/index-CkjVN-Tb.js
rename to extension/ui/assets/index-DJ-lPKba.js
index 085c419a..f5439644 100644
--- a/extension/ui/assets/index-CkjVN-Tb.js
+++ b/extension/ui/assets/index-DJ-lPKba.js
@@ -5,7 +5,7 @@
`):``,this.name=`UnsubscriptionError`,this.errors=t}});function gr(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var _r=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=ur(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(pr(c))try{c()}catch(e){i=e instanceof hr?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=ur(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{br(f)}catch(e){i??=[],e instanceof hr?i=fr(fr([],dr(i)),dr(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 hr(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)br(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)&&gr(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&gr(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),vr=_r.EMPTY;function yr(e){return e instanceof _r||e&&`closed`in e&&pr(e.remove)&&pr(e.add)&&pr(e.unsubscribe)}function br(e){pr(e)?e():e.unsubscribe()}var xr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Sr={setTimeout:function(e,t){var n=[...arguments].slice(2),r=Sr.delegate;return r?.setTimeout?r.setTimeout.apply(r,fr([e,t],dr(n))):setTimeout.apply(void 0,fr([e,t],dr(n)))},clearTimeout:function(e){return(Sr.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function Cr(e){Sr.setTimeout(function(){var t=xr.onUnhandledError;if(t)t(e);else throw e})}function wr(){}var Tr=(function(){return Or(`C`,void 0,void 0)})();function Er(e){return Or(`E`,void 0,e)}function Dr(e){return Or(`N`,e,void 0)}function Or(e,t,n){return{kind:e,value:t,error:n}}var kr=null;function Ar(e){if(xr.useDeprecatedSynchronousErrorHandling){var t=!kr;if(t&&(kr={errorThrown:!1,error:null}),e(),t){var n=kr,r=n.errorThrown,i=n.error;if(kr=null,r)throw i}}else e()}function jr(e){xr.useDeprecatedSynchronousErrorHandling&&kr&&(kr.errorThrown=!0,kr.error=e)}var Mr=function(e){lr(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,yr(t)&&t.add(n)):n.destination=Br,n}return t.create=function(e,t,n){return new Ir(e,t,n)},t.prototype.next=function(e){this.isStopped?zr(Dr(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?zr(Er(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?zr(Tr,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}(_r),Nr=Function.prototype.bind;function Pr(e,t){return Nr.call(e,t)}var Fr=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){Lr(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Lr(e)}else Lr(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Lr(e)}},e}(),Ir=function(e){lr(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(pr(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&xr.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&Pr(t.next,o),error:t.error&&Pr(t.error,o),complete:t.complete&&Pr(t.complete,o)}):a=t}return i.destination=new Fr(a),i}return t}(Mr);function Lr(e){xr.useDeprecatedSynchronousErrorHandling?jr(e):Cr(e)}function Rr(e){throw e}function zr(e,t){var n=xr.onStoppedNotification;n&&Sr.setTimeout(function(){return n(e,t)})}var Br={closed:!0,next:wr,error:Rr,complete:wr},Vr=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function Hr(e){return e}function Ur(e){return e.length===0?Hr:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var Wr=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=qr(e)?e:new Ir(e,t,n);return Ar(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=Gr(t),new t(function(t,r){var i=new Ir({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[Vr]=function(){return this},e.prototype.pipe=function(){return Ur([...arguments])(this)},e.prototype.toPromise=function(e){var t=this;return e=Gr(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 Gr(e){return e??xr.Promise??Promise}function Kr(e){return e&&pr(e.next)&&pr(e.error)&&pr(e.complete)}function qr(e){return e&&e instanceof Mr||Kr(e)&&yr(e)}function Jr(e){return pr(e?.lift)}function Yr(e){return function(t){if(Jr(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 Xr(e,t,n,r,i){return new Zr(e,t,n,r,i)}var Zr=function(e){lr(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}(Mr),Qr=mr(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),$r=function(e){lr(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 ei(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Qr},t.prototype.next=function(e){var t=this;Ar(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=ur(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;Ar(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;Ar(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?vr:(this.currentObservers=null,a.push(e),new _r(function(){t.currentObservers=null,gr(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 Wr;return e.source=this,e},t.create=function(e,t){return new ei(e,t)},t}(Wr),ei=function(e){lr(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)??vr},t}($r),ti=function(e){lr(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}($r);function ni(e,t){return Yr(function(n,r){var i=0;n.subscribe(Xr(r,function(n){r.next(e.call(t,n,i++))}))})}var ri=`https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss`,ii=class extends Error{code;constructor(e,t){super(oi(e,t)),this.code=e}};function ai(e){return`NG0${Math.abs(e)}`}function oi(e,t){return`${ai(e)}${t?`: `+t:``}`}function si(e){for(let t in e)if(e[t]===si)return t;throw Error(``)}function ci(e){if(typeof e==`string`)return e;if(Array.isArray(e))return`[${e.map(ci).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 li(e,t){return e?t?`${e} ${t}`:e:t||``}var ui=si({__forward_ref__:si});function di(e){return e.__forward_ref__=di,e}function fi(e){return pi(e)?e():e}function pi(e){return typeof e==`function`&&Object.hasOwn(e,ui)&&e.__forward_ref__===di}function mi(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function hi(e){return gi(e,yi)}function gi(e,t){return Object.hasOwn(e,t)&&e[t]||null}function _i(e){return(e?.[yi]??null)||null}function vi(e){return e&&Object.hasOwn(e,bi)?e[bi]:null}var yi=si({ɵprov:si}),bi=si({ɵinj:si}),xi=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=mi({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Si(e){return e&&!!e.ɵproviders}var Ci=si({ɵcmp:si}),wi=si({ɵdir:si}),Ti=si({ɵpipe:si}),Ei=si({ɵfac:si}),Di=si({__NG_ELEMENT_ID__:si}),Oi=si({__NG_ENV_ID__:si});function ki(e){return Mi(e,`@Component`),e[Ci]||null}function Ai(e){return Mi(e,`@Directive`),e[wi]||null}function ji(e){return Mi(e,`@Pipe`),e[Ti]||null}function Mi(e,t){if(e==null)throw new ii(-919,!1)}function Ni(e){return typeof e==`string`?e:e==null?``:String(e)}var Pi=si({ngErrorCode:si}),Fi=si({ngErrorMessage:si}),Ii=si({ngTokenPath:si});function Li(e,t){return zi(``,-200,t)}function Ri(e,t){throw new ii(-201,!1)}function zi(e,t,n){let r=new ii(t,e);return r[Pi]=t,r[Fi]=e,n&&(r[Ii]=n),r}function Bi(e){return e[Pi]}var Vi;function Hi(){return Vi}function Ui(e){let t=Vi;return Vi=e,t}function Wi(e,t,n){let r=hi(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;Ri(e,``)}var Gi=globalThis,Ki={},qi=`__NG_DI_FLAG__`,Ji=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=Zi(t)||0;try{return this.injector.get(e,n&8?null:Ki,n)}catch(e){if(nr(e))return e;throw e}}};function Yi(e,t=0){let n=$n();if(n===void 0)throw new ii(-203,!1);if(n===null)return Wi(e,void 0,t);{let r=Qi(t),i=n.retrieve(e,r);if(nr(i)){if(r.optional)return null;throw i}return i}}function Xi(e,t=0){return(Hi()||Yi)(fi(e),t)}function C(e,t){return Xi(e,Zi(t))}function Zi(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Qi(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function $i(e){let t=[];for(let n=0;nArray.isArray(e)?ia(e,t):t(e))}function aa(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function oa(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function sa(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 la(e,t,n){let r=da(e,t);return r>=0?e[r|1]=n:(r=~r,ca(e,r,t,n)),r}function ua(e,t){let n=da(e,t);if(n>=0)return e[n|1]}function da(e,t){return fa(e,t,1)}function fa(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 ia(t,e=>{let t=e;Sa(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&xa(i,a),n}function xa(e,t){for(let n=0;n{t(e,r)})}}function Sa(e,t,n,r){if(e=fi(e),!e)return!1;let i=null,a=vi(e),o=!a&&ki(e);if(!a&&!o){let t=e.ngModule;if(a=vi(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)Sa(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{ia(a.imports,i=>{Sa(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&xa(e,t)}if(!s){let e=ta(i)||(()=>new i);t({provide:i,useFactory:e,deps:ma},i),t({provide:_a,useValue:i,multi:!0},i),t({provide:ha,useValue:()=>Xi(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;Ca(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function Ca(e,t){for(let n of e)Si(n)&&(n=n.ɵproviders),Array.isArray(n)?Ca(n,t):t(n)}var wa=si({provide:String,useValue:si});function Ta(e){return typeof e==`object`&&!!e&&wa in e}function Ea(e){return!!(e&&e.useExisting)}function Da(e){return!!(e&&e.useFactory)}function Oa(e){return typeof e==`function`}var ka=new xi(``),Aa={},ja={},Ma=void 0;function Na(){return Ma===void 0&&(Ma=new va),Ma}var Pa=class{},Fa=class extends Pa{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,Ga(e,e=>this.processProvider(e)),this.records.set(ga,Va(void 0,this)),r.has(`environment`)&&this.records.set(Pa,Va(void 0,this));let i=this.records.get(ka);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(_a,ma,{self:!0}))}retrieve(e,t){let n=Zi(t)||0;try{return this.get(e,Ki,n)}catch(e){if(nr(e))return e;throw e}}destroy(){Ba(this),this._destroyed=!0;let e=pn(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(),pn(e)}}onDestroy(e){return Ba(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Ba(this);let t=er(this),n=Ui(void 0);try{return e()}finally{er(t),Ui(n)}}get(e,t=Ki,n){if(Ba(this),Object.hasOwn(e,Oi))return e[Oi](this);let r=Zi(n),i=er(this),a=Ui(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=Wa(e)&&hi(e);t=n&&this.injectableDefInScope(n)?Va(Ia(e),Aa):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?Na():this.parent;return t=r&8&&t===Ki?null:t,n.get(e,t)}catch(e){let t=Bi(e);throw t===-200||t===-201?new ii(t,null):e}finally{Ui(a),er(i)}}resolveInjectorInitializers(){let e=pn(null),t=er(this),n=Ui(void 0);try{let e=this.get(ha,ma,{self:!0});for(let t of e)t()}finally{er(t),Ui(n),pn(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=fi(e);let t=Oa(e)?e:fi(e&&e.provide),n=Ra(e);if(!Oa(e)&&e.multi===!0){let n=this.records.get(t);n||(n=Va(void 0,Aa,!0),n.factory=()=>$i(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=pn(null);try{if(t.value===ja)throw Li(``);return t.value===Aa&&(t.value=ja,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&Ua(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{pn(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=fi(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 Ia(e){let t=hi(e),n=t===null?ta(e):t.factory;if(n!==null)return n;if(e instanceof xi)throw new ii(-204,!1);if(e instanceof Function)return La(e);throw new ii(-204,!1)}function La(e){if(e.length>0)throw new ii(-204,!1);let t=_i(e);return t===null?()=>new e:()=>t.factory(e)}function Ra(e){return Ta(e)?Va(void 0,e.useValue):Va(za(e),Aa)}function za(e,t,n){let r;if(Oa(e)){let t=fi(e);return ta(t)||Ia(t)}if(Ta(e))r=()=>fi(e.useValue);else if(Da(e))r=()=>e.useFactory(...$i(e.deps||[]));else if(Ea(e))r=(t,n)=>Xi(fi(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=fi(e&&(e.useClass||e.provide));if(Ha(e))r=()=>new t(...$i(e.deps));else return ta(t)||Ia(t)}return r}function Ba(e){if(e.destroyed)throw new ii(-205,!1)}function Va(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function Ha(e){return!!e.deps}function Ua(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function Wa(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function Ga(e,t){for(let n of e)Array.isArray(n)?Ga(n,t):n&&Si(n)?Ga(n.ɵproviders,t):t(n)}function Ka(e,t){let n;e instanceof Fa?(Ba(e),n=e):n=new Ji(e);let r=er(n),i=Ui(void 0);try{return t()}finally{er(r),Ui(i)}}function qa(){return Hi()!==void 0||$n()!=null}var Ja=1;function Ya(e){return Array.isArray(e)&&typeof e[Ja]==`object`}function Xa(e){return Array.isArray(e)&&e[Ja]===!0}function Za(e){return!!(e.flags&4)}function Qa(e){return e.componentOffset>-1}function $a(e){return(e.flags&1)==1}function eo(e){return!!e.template}function to(e){return!!(e[2]&512)}function no(e){return(e[2]&256)==256}var ro=(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})(ro||{}),io=`math`;function ao(e){for(;Array.isArray(e);)e=e[0];return e}function oo(e,t){return ao(t[e])}function so(e,t){return ao(t[e.index])}function co(e,t){return e.data[t]}function lo(e,t){return e[t]}function uo(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function fo(e,t){let n=t[e];return Ya(n)?n:n[0]}function po(e){return(e[2]&128)==128}function mo(e){return Xa(e[3])}function ho(e,t){return t==null?null:e[t]}function go(e){e[17]=0}function _o(e){e[2]&1024||(e[2]|=1024,po(e)&&xo(e))}function vo(e,t){for(;e>0;)t=t[14],e--;return t}function yo(e){return!!(e[2]&9216||e[24]?.dirty)}function bo(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),yo(e)&&xo(e)}function xo(e){e[10].changeDetectionScheduler?.notify(0);let t=wo(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!po(t)));)t=wo(t)}function So(e,t){if(no(e))throw new ii(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function Co(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function wo(e){let t=e[3];return Xa(t)?t[3]:t}function To(e){return e[7]??=[]}function Eo(e){return e.cleanup??=[]}function Do(e,t,n,r){let i=To(t);i.push(n),e.firstCreatePass&&Eo(e).push(r,i.length-1)}var Oo={lFrame:ls(null),bindingsEnabled:!0,skipHydrationRootTNode:null},ko=!1;function Ao(){return Oo.lFrame.elementDepthCount}function jo(){Oo.lFrame.elementDepthCount++}function Mo(){Oo.lFrame.elementDepthCount--}function No(){return Oo.bindingsEnabled}function Po(){return Oo.skipHydrationRootTNode!==null}function Fo(e){return Oo.skipHydrationRootTNode===e}function Io(){Oo.skipHydrationRootTNode=null}function w(){return Oo.lFrame.lView}function Lo(){return Oo.lFrame.tView}function T(e){return Oo.lFrame.contextLView=e,e[8]}function E(e){return Oo.lFrame.contextLView=null,e}function Ro(){let e=zo();for(;e!==null&&e.type===64;)e=e.parent;return e}function zo(){return Oo.lFrame.currentTNode}function Bo(){let e=Oo.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Vo(e,t){let n=Oo.lFrame;n.currentTNode=e,n.isParent=t}function Ho(){return Oo.lFrame.isParent}function Uo(){Oo.lFrame.isParent=!1}function Wo(){return Oo.lFrame.contextLView}function Go(){return ko}function Ko(e){let t=ko;return ko=e,t}function qo(){let e=Oo.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Jo(){return Oo.lFrame.bindingIndex}function Yo(e){return Oo.lFrame.bindingIndex=e}function Xo(){return Oo.lFrame.bindingIndex++}function Zo(e){let t=Oo.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function Qo(){return Oo.lFrame.inI18n}function $o(e,t){let n=Oo.lFrame;n.bindingIndex=n.bindingRootIndex=e,ts(t)}function es(){return Oo.lFrame.currentDirectiveIndex}function ts(e){Oo.lFrame.currentDirectiveIndex=e}function ns(e){let t=Oo.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function rs(){return Oo.lFrame.currentQueryIndex}function is(e){Oo.lFrame.currentQueryIndex=e}function as(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function os(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=as(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=Oo.lFrame=cs();return r.currentTNode=t,r.lView=e,!0}function ss(e){let t=cs(),n=e[1];Oo.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function cs(){let e=Oo.lFrame,t=e===null?null:e.child;return t===null?ls(e):t}function ls(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 us(){let e=Oo.lFrame;return Oo.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var ds=us;function fs(){let e=us();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 ps(e){return(Oo.lFrame.contextLView=vo(e,Oo.lFrame.contextLView))[8]}function ms(){return Oo.lFrame.selectedIndex}function hs(e){Oo.lFrame.selectedIndex=e}function gs(){let e=Oo.lFrame;return co(e.tView,e.selectedIndex)}function D(){Oo.lFrame.currentNamespace=`svg`}function _s(){vs()}function vs(){Oo.lFrame.currentNamespace=null}function ys(){return Oo.lFrame.currentNamespace}var bs=!0;function xs(){return bs}function Ss(e){bs=e}function Cs(e,t=null,n=null,r){let i=ws(e,t,n,r);return i.resolveInjectorInitializers(),i}function ws(e,t=null,n=null,r,i=new Set){return new Fa([n||ma,ya(e)],t||Na(),null,i)}var Ts=class e{static THROW_IF_NOT_FOUND=Ki;static NULL=new va;static create(e,t){if(Array.isArray(e))return Cs({name:``},t,e,``);{let t=e.name??``;return Cs({name:t},e.parent,e.providers,t)}}static ɵprov=mi({token:e,providedIn:`any`,factory:()=>Xi(ga)});static __NG_ELEMENT_ID__=-1},Es=new xi(``),Ds=class{static __NG_ELEMENT_ID__=ks;static __NG_ENV_ID__=e=>e},Os=class extends Ds{_lView;constructor(e){super(),this._lView=e}get destroyed(){return no(this._lView)}onDestroy(e){let t=this._lView;return So(t,e),()=>Co(t,e)}};function ks(){return new Os(w())}var As=new xi(``),js=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new ti(!1);debugTaskTracker=C(As,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Wr(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=mi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Ms=class extends $r{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,qa()&&(this.destroyRef=C(Ds,{optional:!0})??void 0,this.pendingTasks=C(js,{optional:!0})??void 0)}emit(e){let t=pn(null);try{super.next(e)}finally{pn(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 _r&&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 Ns(...e){}function Ps(e){let t,n;function r(){e=Ns;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 Fs(e){return queueMicrotask(()=>e()),()=>{e=Ns}}var Is=`isAngularZone`,Ls=`isAngularZone_ID`,Rs=0,zs=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Ms(!1);onMicrotaskEmpty=new Ms(!1);onStable=new Ms(!1);onError=new Ms(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new ii(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,Us(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(Is)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new ii(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new ii(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,Bs,Ns,Ns);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)}},Bs={};function Vs(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 Hs(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Ps(()=>{e.callbackScheduled=!1,Ws(e),e.isCheckStableRunning=!0,Vs(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Ws(e)}function Us(e){let t=()=>{Hs(e)},n=Rs++;e._inner=e._inner.fork({name:`angular`,properties:{[Is]:!0,[Ls]:n,[Ls+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(Js(s))return n.invokeTask(i,a,o,s);try{return Gs(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),Ks(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return Gs(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!Ys(s)&&t(),Ks(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,Ws(e),Vs(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 Ws(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function Gs(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Ks(e){e._nesting--,Vs(e)}var qs=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Ms;onMicrotaskEmpty=new Ms;onStable=new Ms;onError=new Ms;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 Js(e){return Xs(e,`__ignore_ng_zone__`)}function Ys(e){return Xs(e,`__scheduler_tick__`)}function Xs(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Zs=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},Qs=new xi(``,{factory:()=>{let e=C(zs),t=C(Pa),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Zs),n.handleError(r))})}}}),$s={provide:ha,useValue:()=>{C(Zs,{optional:!0})},multi:!0};function O(e,t){let[n,r,i]=Wn(e,t?.equal),a=n;return a[fn],a.set=r,a.update=i,a.asReadonly=ec.bind(a),a}function ec(){let e=this[fn];if(e.readonlyFn===void 0){let t=()=>this();t[fn]=e,e.readonlyFn=t}return e.readonlyFn}var tc=new xi(``,{factory:()=>nc}),nc=`ng`,rc=new xi(``),ic=new xi(``,{providedIn:`platform`,factory:()=>`unknown`}),ac=new xi(``,{factory:()=>C(Es).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),oc=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=sc}return e})();function sc(){return new oc(w(),Ro())}var cc=class{},lc=new xi(``,{factory:()=>!0}),uc=new xi(``),dc=(()=>{class e{static ɵprov=mi({token:e,providedIn:`root`,factory:()=>new fc})}return e})(),fc=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}},pc=class{[fn];constructor(e){this[fn]=e}destroy(){this[fn].destroy()}};function mc(e,t){let n=t?.injector??C(Ts),r=t?.manualCleanup===!0?null:n.get(Ds),i,a=n.get(oc,null,{optional:!0}),o=n.get(cc);return a===null?i=yc(e,n.get(dc),o):(i=vc(a.view,o,e),r instanceof Os&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new pc(i)}var hc={...Xn,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=Ko(!1);try{Zn(this)}finally{Ko(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=pn(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],pn(e)}}},gc={...hc,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(On(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},_c={...hc,consumerMarkedDirty(){this.view[2]|=8192,xo(this.view),this.notifier.notify(13)},destroy(){if(On(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[23]?.delete(this)}};function vc(e,t,n){let r=Object.create(_c);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=bc(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function yc(e,t,n){let r=Object.create(gc);return r.fn=bc(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 bc(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}function xc(e){return typeof e==`function`&&e[fn]!==void 0}function Sc(e){return xc(e)&&typeof e.set==`function`}var Cc=Symbol(`InputSignalNode#UNSET`),wc={...Jn,transformFn:void 0,applyValueToInputSignal(e,t){Kn(e,t)}};function Tc(e){return{toString:e}.toString()}var Ec=(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})(Ec||{}),Dc=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function Oc(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var kc=null,Ac=(()=>{kc=Mc;let e=()=>Mc;return e.ngInherit=!0,e})();function jc(){return kc}function Mc(e){return e.type.prototype.ngOnChanges&&(e.setInput=Pc),Nc}function Nc(){let e=Ic(this),t=e?.current;if(t){let n=e.previous;if(n===pa)e.previous=t;else for(let e in t)n[e]=t[e];e.current=null,this.ngOnChanges(t)}}function Pc(e,t,n,r,i){let a=this.declaredInputs[r],o=Ic(e)||Lc(e,{previous:pa,current:null}),s=o.current||={},c=o.previous,l=c[a];s[a]=new Dc(l&&l.currentValue,n,c===pa),Oc(e,t,i,n)}var Fc=`__ngSimpleChanges__`;function Ic(e){return Object.hasOwn(e,Fc)&&e[Fc]||null}function Lc(e,t){return e[Fc]=t}var Rc=[],zc=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,Kc(o,a)):Kc(o,a)}var Jc=-1,Yc=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 Xc(e){return!!(e.flags&8)}function Zc(e){return!!(e.flags&16)}function Qc(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function ol(e,t){let n=al(e),r=t;for(;n>0;)r=r[14],n--;return r}var sl=!0;function cl(e){let t=sl;return sl=e,t}var ll=255,ul=5,dl=0,fl={};function pl(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,Di)&&(r=n[Di]),r??=n[Di]=dl++;let i=r&ll,a=1<>ul)]|=a}function ml(e,t){let n=gl(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,hl(r.data,e),hl(t,null),hl(r.blueprint,null));let i=_l(e,t),a=e.injectorIndex;if(rl(i)){let e=il(i),n=ol(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 hl(e,t){e.push(0,0,0,0,0,0,0,0,t)}function gl(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function _l(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=Ml(i),r===null)return Jc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return Jc}function vl(e,t,n){pl(e,t,n)}function yl(e,t,n){if(n&8||e!==void 0)return e;Ri(t,`NodeInjector`)}function bl(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=Ui(void 0);try{return i?i.get(t,r,n&8):Wi(t,r,n&8)}finally{Ui(a)}}return yl(r,t,n)}function xl(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=jl(e,t,n,r,fl);if(i!==fl)return i}let i=Sl(e,t,n,r,fl);if(i!==fl)return i}return bl(t,n,r,i)}function Sl(e,t,n,r,i){let a=El(n);if(typeof a==`function`){if(!os(t,e,r))return r&1?yl(i,n,r):bl(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))Ri(n);else return e}finally{ds()}}else if(typeof a==`number`){let i=null,o=gl(e,t),s=Jc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?_l(e,t):t[o+8],s===Jc||!Ol(r,!1)?o=-1:(i=t[1],o=il(s),t=ol(s,t)));o!==-1;){let e=t[1];if(Dl(a,o,e.data)){let e=Cl(o,t,n,i,r,c);if(e!==fl)return e}s=t[o+8],s!==Jc&&Ol(r,t[1].data[o+8]===c)&&Dl(a,o,t)?(i=e,o=il(s),t=ol(s,t)):o=-1}}return i}function Cl(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=wl(s,o,n,r==null?Qa(s)&&sl:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?fl:Tl(t,o,c,s,i)}function wl(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&&eo(e)&&e.type===n)return c}return null}function Tl(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof Yc){let s=a;if(s.resolving)throw Li(``);let c=cl(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?Ui(s.injectImpl):null;os(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&Bc(n,o[n],t)}finally{l!==null&&Ui(l),cl(c),s.resolving=!1,ds()}}return a}function El(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,Di)?e[Di]:void 0;return typeof t==`number`?t>=0?t&ll:Al:t}function Dl(e,t,n){let r=1<>ul)]&r)}function Ol(e,t){return!(e&2)&&!(e&1&&t)}var kl=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return xl(this._tNode,this._lView,e,Zi(n),t)}};function Al(){return new kl(Ro(),w())}function jl(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!to(o);){let e=Sl(a,o,n,r|2,fl);if(e!==fl)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,fl,r);if(t!==fl)return t}t=Ml(o),o=o[14]}a=t}return i}function Ml(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}function Nl(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function Pl(){return Fl(Ro(),w())}function Fl(e,t){return new Il(so(e,t))}var Il=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=Pl}return e})();function Ll(e){return e instanceof Il?e.nativeElement:e}function Rl(){return this._results[Symbol.iterator]()}var zl=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 $r}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=ra(e);(this._changesDetected=!na(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]=Rl};function Bl(e){return(e.flags&128)==128}var Vl=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Vl||{}),Hl=new Map,Ul=0;function Wl(){return Ul++}function Gl(e){Hl.set(e[19],e)}function Kl(e){Hl.delete(e[19])}var ql=`__ngContext__`;function Jl(e,t){Ya(t)?(e[ql]=t[19],Gl(t)):e[ql]=t}function Yl(e){return Zl(e[12])}function Xl(e){return Zl(e[4])}function Zl(e){for(;e!==null&&!Xa(e);)e=e[4];return e}var Ql=void 0;function $l(e){Ql=e}function eu(){if(Ql!==void 0)return Ql;if(typeof document<`u`)return document;throw new ii(210,!1)}var tu=!1,nu=new xi(``,{factory:()=>tu}),ru=new WeakMap;function iu(e,t){if(typeof e!=`object`||!e)return;let n=ru.get(e);n||(n=new WeakSet,ru.set(e,n)),n.add(t)}function au(e){return(e.flags&32)==32}var ou=()=>null;function su(e,t,n=!1){return ou(e,t,n)}function cu(e,t){let n=e.contentQueries;if(n!==null){let r=pn(null);try{for(let r=0;r|^->||--!>|)/g,bu=`$1`;function xu(e){return e.replace(vu,e=>e.replace(yu,bu))}function Su(e,t){return e.createText(t)}function Cu(e,t,n){e.setValue(t,n)}function wu(e,t){return e.createComment(xu(t))}function Tu(e,t,n){return e.createElement(t,n)}function Eu(e,t,n,r,i){e.insertBefore(t,n,r,i)}function Du(e,t,n){e.appendChild(t,n)}function Ou(e,t,n,r,i){r===null?Du(e,t,n):Eu(e,t,n,r,i)}function ku(e,t,n,r){e.removeChild(null,t,n,r)}function Au(e,t,n){e.setAttribute(t,`style`,n)}function ju(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function Mu(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&Qc(e,t,r),i!==null&&ju(e,t,i),a!==null&&Au(e,t,a)}function Nu(e){let t=Pu();return t?t.sanitize(ro.URL,e)||``:mu(e,`URL`)?pu(e):_u(Ni(e))}function Pu(){let e=w();return e&&e[10].sanitizer}function Fu(e){return e.ownerDocument.defaultView}function Iu(e){return e.ownerDocument}function Lu(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 Ru=`ng-template`;function zu(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(Uu(r))return!1;o=!0}}}}}return Uu(r)||o}function Uu(e){return!(e&1)}function Wu(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!==``&&!Uu(o)&&(t+=Xu(a,i),i=``),r=o,a||=!Uu(r);n++}return i!==``&&(t+=Xu(a,i)),t}function Qu(e){return e.map(Zu).join(`,`)}function $u(e){let t=[],n=[],r=1,i=2;for(;r!1});function ad(e){if(!e)return 0;let t=e.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(e)*t}function od(e,t){return e.getPropertyValue(t).split(`,`).map(e=>e.trim())}function sd(e){let t=od(e,`transition-property`),n=od(e,`transition-duration`),r=od(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 cd(e){let t=od(e,`animation-name`),n=od(e,`animation-delay`),r=od(e,`animation-duration`),i=od(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 ld(e,t){return e!==void 0&&e.duration>t.duration}function ud(e){return(e.animationName!=null||e.propertyName!=null)&&e.duration>0}function dd(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 fd(e,t){let n=getComputedStyle(e),r=cd(n),i=sd(n),a=r.duration>i.duration?r:i;ld(t.get(e),a)||ud(a)&&t.set(e,a)}function pd(e,t,n){if(!n)return;let r=e.getAnimations();return r.length===0?fd(e,t):md(e,t,r)}function md(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=dd(e)??0,n,i;e.animationName?i=e.animationName:n=e.transitionProperty,t>=r.duration&&(r={animationName:i,propertyName:n,duration:t})}ld(t.get(e),r)||ud(r)&&t.set(e,r)}var hd=new Set,gd=!1,_d=1,vd=typeof document<`u`&&typeof document?.documentElement?.getAnimations==`function`;function yd(e){return e[9].get(id,gd)}function bd(e,t,n){let r=Sd.get(e);if(r){for(let e of t)r.classList.push(e);for(let e of n)r.cleanupFns.push(e)}else Sd.set(e,{classList:t,cleanupFns:n})}function xd(e){let t=Sd.get(e);if(t){for(let e of t.cleanupFns)e();Sd.delete(e)}Cd.delete(e)}var Sd=new WeakMap,Cd=new WeakMap,wd=new WeakMap;function Td(e){return e?e[14]??e:null}var Ed=new WeakSet;function Dd(e,t,n){let r=wd.get(e);if(!r||r.length===0)return;let i=t.parentNode,a=t.previousSibling,o=Td(n);for(let e=r.length-1;e>=0;e--){let{el:n,declarationView:s}=r[e],c=n.parentNode;n===t?(r.splice(e,1),Ed.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 Od(e,t,n){let r=Td(n),i=wd.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):wd.set(e,[{el:t,declarationView:r}])}function kd(e){let t=e[26]??={};return t.enter??=new Map}function Ad(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 jd(e){return e.composedPath?e.composedPath()[0]:e.target}function Md(e,t){let n=Cd.get(t);if(n===void 0)return!0;if(t!==jd(e))return!1;let r=e.animation;if(r){let e=dd(r);if(e!==void 0&&e+_d{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=mi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),zd=[0,1,2,3],Bd=(()=>{class e{ngZone=C(zs);scheduler=C(cc);errorHandler=C(Zs,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){C(Fd,{optional:!0})}execute(){let e=this.sequences.size>0;e&&zc(Ec.AfterRenderHooksStart),this.executing=!0;for(let e of zd)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&&zc(Ec.AfterRenderHooksEnd)}register(e){let{view:t}=e;t===void 0?this.executing?this.deferredRegistrations.add(e):this.addSequence(e):((t[25]??=[]).push(e),xo(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(Pd.AFTER_NEXT_RENDER,e):e()}static ɵprov=mi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Vd=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 Hd(e,t){let n=t?.injector??C(Ts);return Ld(`NgAfterNextRender`),Wd(e,n,t,!0)}function Ud(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function Wd(e,t,n,r){let i=t.get(Rd);i.impl??=t.get(Bd);let a=t.get(Fd,null,{optional:!0}),o=n?.manualCleanup===!0?null:t.get(Ds),s=t.get(oc,null,{optional:!0}),c=new Vd(i.impl,Ud(e),s?.view,r,o,a?.snapshot(null));return i.impl.register(c),c}var Gd=new xi(``,{factory:()=>{let e=C(Pa),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function Kd(e,t,n){let r=e.get(Gd);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 qd(e,t){let n=e.get(Gd);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Jd(e,t){let n=e.get(Gd);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function Yd(e){let t=e.get(Gd);t.isScheduled||=(Hd(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:t.injector}),!0)}function Xd(e){let t=e.get(Gd);t.scheduler=Yd,t.scheduler(e)}function Zd(e,t){for(let[n,r]of t)Kd(e,r.animateFns)}function Qd(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&Zd(r,i)}function $d(e,t,n,r){try{n.get(ga)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&qd(n,i.enter.get(t.index).animateFns);let a=ef(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];nf(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&hd.add(e[19]),Kd(n,()=>tf(e,t,i||void 0,a,r),i||void 0)}function ef(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 tf(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&&nf(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),af(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&hd.delete(e[19]),i(!0)})}else e&&hd.delete(e[19]),i(!1)}function nf(e,t,n){if(t.type&12){let r=e[t.index];if(Xa(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,hd.delete(e[19])),n(!0)})}function of(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;Xa(i)?c=i:Ya(i)&&(l=!0,i=i[0]);let u=ao(i);e===0&&r!==null?(Qd(s,r,a,n),o==null?Du(t,r,u):Eu(t,r,u,o||null,!0)):e===1&&r!==null?(Qd(s,r,a,n),Eu(t,r,u,o||null,!0),Dd(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&Od(a,u,s),Ed.delete(u),$d(s,a,n,e=>{if(Ed.has(u)){Ed.delete(u);return}ku(t,u,l,e)})):e===3&&(Ed.delete(u),$d(s,a,n,()=>{t.destroyNode(u)})),c!=null&&Af(t,e,n,c,a,r,o)}}function sf(e,t){lf(e,t),t[0]=null,t[5]=null}function cf(e,t,n,r,i,a){r[0]=i,r[5]=t,Ef(e,r,n,1,i,a)}function lf(e,t){t[10].changeDetectionScheduler?.notify(9),Ef(e,t,t[11],2,null,null)}function uf(e){let t=e[12];if(!t)return pf(e[1],e);for(;t;){let n=null;if(Ya(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)Ya(t)&&pf(t[1],t),t=t[3];t===null&&(t=e),Ya(t)&&pf(t[1],t),n=t&&t[4]}t=n}}function df(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function ff(e,t){if(no(t))return;let n=t[11];n.destroyNode&&Ef(e,t,n,3,null,null),uf(t)}function pf(e,t){if(no(t))return;let n=pn(null);try{t[2]&=-129,t[2]|=256,t[24]&&On(t[24]),hf(e,t),mf(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&Xa(t[3])){n!==t[3]&&df(n,t);let r=t[18];r!==null&&r.detachView(e)}Kl(t)}finally{pn(n)}}function mf(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&&Bf(e,t,27,!1),zc(o?Ec.TemplateUpdateStart:Ec.TemplateCreateStart,i,n),n(r,i)}finally{hs(a),zc(o?Ec.TemplateUpdateEnd:Ec.TemplateCreateEnd,i,n)}}function Wf(e,t,n){Zf(e,t,n),(n.flags&64)==64&&Qf(e,t,n)}function Gf(e,t,n=so){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a{xo(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function Sp(e){let t=e[24]??Object.create(Cp);return t.lView=e,t}var Cp={...hn,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=wo(e.lView);for(;t&&!wp(t[1]);)t=wo(t);t&&_o(t)},consumerOnSignalRead(){this.lView[24]=this}};function wp(e){return e.type!==2}function Tp(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 Ep=100;function Dp(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{Op(e,t)}finally{n.end?.()}}function Op(e,t){let n=Go();try{Ko(!0),Pp(e,t);let n=0;for(;yo(e);){if(n===Ep)throw new ii(103,!1);n++,Pp(e,1)}}finally{Ko(n)}}function kp(e,t,n,r){if(no(t))return;let i=t[2];ss(t);let a=!0,o=null,s=null;wp(e)?(s=vp(t),o=Cn(s)):mn()===null?(a=!1,s=Sp(t),o=Cn(s)):t[24]&&=(On(t[24]),null);try{go(t),Yo(e.bindingStartIndex),n!==null&&Uf(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&Hc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&Uc(t,n,0,null),Wc(t,0)}if(jp(t),Tp(t),Ap(t,0),e.contentQueries!==null&&cu(e,t),a){let n=e.contentCheckHooks;n!==null&&Hc(t,n)}else{let n=e.contentHooks;n!==null&&Uc(t,n,1),Wc(t,1)}Ip(e,t);let o=e.components;o!==null&&Fp(t,o,0);let s=e.viewQuery;if(s!==null&&lu(2,s,r),a){let n=e.viewCheckHooks;n!==null&&Hc(t,n)}else{let n=e.viewHooks;n!==null&&Uc(t,n,2),Wc(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}gp(t),t[2]&=-73}catch(e){throw xo(t),e}finally{s!==null&&(Tn(s,o),a&&bp(s)),fs()}}function Ap(e,t){for(let n=Yl(e);n!==null;n=Xl(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=oa(e,10+t);sf(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 Up(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(Hp(e,n),oa(t,n))}this._attachedToViewContainer=!1}ff(this._lView[1],this._lView)}onDestroy(e){So(this._lView,e)}markForCheck(){Lp(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){bo(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,Dp(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new ii(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=to(this._lView),t=this._lView[16];t!==null&&!e&&df(t,this._lView),lf(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new ii(902,!1);this._appRef=e;let t=to(this._lView),n=this._lView[16];n!==null&&!t&&Wp(n,this._lView),bo(this._lView)}},Kp=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=qp;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 Gp(fp(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n}))}}return e})();function qp(){return Jp(Ro(),w())}function Jp(e,t){return e.type&4?new Kp(t,e,Fl(e,t)):null}function Yp(e,t,n,r,i){let a=e.data[t];if(a===null)a=Xp(e,t,n,r,i),Qo()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Bo();a.injectorIndex=e===null?-1:e.injectorIndex}return Vo(a,!0),a}function Xp(e,t,n,r,i){let a=zo(),o=Ho(),s=o?a:a&&a.parent,c=e.data[t]=Qp(e,s,n,t,r,i);return Zp(e,c,a,o),c}function Zp(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 Qp(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:ys(),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 $p(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?em(e,n):r.push(e);e[6]=r}function em(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,nm=()=>null;function rm(e,t){return tm(e,t)}function im(e,t,n){return nm(e,t,n)}var am=class{},om=class{},sm=(()=>{class e{static ɵprov=mi({token:e,providedIn:`root`,factory:()=>null})}return e})();function cm(e){return e.debugInfo?.className||e.type.name||null}var lm={},um=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,lm,n);return r!==lm||t===lm?r:this.parentInjector.get(e,t,n)}};function dm(e,t,n){return e[t]=n}function fm(e,t){return e[t]}function pm(e,t,n){if(n===ed)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function mm(e,t,n,r){let i=pm(e,t,n);return pm(e,t+1,r)||i}function hm(e,t,n,r,i){let a=mm(e,t,n,r);return pm(e,t+2,i)||a}function gm(e,t,n,r,i,a){let o=mm(e,t,n,r);return mm(e,t+2,i,a)||o}function _m(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&iu(i,a),Lp(Qa(e)?fo(e.index,t):t,5);let o=t[8],s=vm(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=vm(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function vm(e,t,n,r){let i=pn(null);try{return zc(Ec.OutputStart,t,n),n(r)!==!1}catch(t){return op(e,t),!1}finally{zc(Ec.OutputEnd,t,n),pn(i)}}function ym(e,t,n,r,i,a,o,s){let c=$a(e),l=!1,u=null;if(!r&&c&&(u=xm(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=so(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);bm(a)||Sm(r?t=>r(ao(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function bm(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function xm(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 Sm(e,t,n,r,i,a,o){let s=t.firstCreatePass?Eo(t):null,c=To(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function Cm(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);Sm(e.index,s,t,i,a,c,!0)}var wm=Symbol(`BINDING`),Tm=new xi(``);function Em(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 Bm(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&Vf.SignalBased)!==0};return i&&(a.transform=i),a})}function Jm(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function Ym(e,t,n){let r=t instanceof Pa?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new um(n,r):n}function Xm(e){let t=e.get(om,null);if(t===null)throw new ii(407,!1);return{rendererFactory:t,sanitizer:e.get(sm,null),changeDetectionScheduler:e.get(cc,null),ngReflect:!1,tracingService:e.get(Fd,null,{optional:!0})}}function Zm(e,t,n){let r=$m(e);return Tu(t,r,r===`svg`?`svg`:r===`math`?io:n)}function Qm(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new ii(905,!1)}function $m(e){return(e.selectors[0][0]||`div`).toLowerCase()}var eh=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=qm(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=Jm(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=Qu(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){zc(Ec.DynamicComponentStart);let s=pn(null);try{let s=this.componentDef,c=Ym(s,r||this.ngModule,e),l=Xm(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(cm(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{pn(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=th(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?Kf(l,r,s.encapsulation,t):Zm(s,l,o??null);Qm(u);let d=t.get(Tm,null),f=nh(u,()=>t.get(Es,null)??eu());d&&d.addHost(f);let p=a?.some(ih)||i?.some(e=>typeof e!=`function`&&e.bindings.some(ih)),m=Ff(null,c,null,512|Lf(s),null,null,e,l,t,null,su(u,t,!0));d&&Gm&&f instanceof ShadowRoot&&So(m,()=>{d.removeHost(f)}),m[27]=u,ss(m);let h=null;try{let e=Hm(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);Mu(l,u,e),Jl(u,m),Wf(c,m,e),uu(c,e,m),Um(c,e),n!==void 0&&oh(e,this.ngContentSelectors,n),h=fo(e.index,m),m[8]=h[8],up(c,m,null)}catch(e){throw h!==null&&Kl(h),Kl(m),e}finally{zc(Ec.DynamicComponentEnd),fs()}return new ah(this.componentType,m,!!p)}};function th(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:$u(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[wm].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 ih(e){let t=e[wm].kind;return t===`input`||t===`twoWay`}var ah=class extends am{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=co(t[1],27),this.location=Fl(this._tNode,t),this.instance=fo(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new Gp(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;sp(n,r[1],r,e,t),this.previousInputValues.set(e,t),Lp(fo(n.index,r),1)}get injector(){return new kl(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function oh(e,t,n){let r=e.projection=[];for(let e=0;e{class e{static __NG_ELEMENT_ID__=ch}return e})();function ch(){return fh(Ro(),w())}var lh=class e extends sh{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Fl(this._hostTNode,this._hostLView)}get injector(){return new kl(this._hostTNode,this._hostLView)}get parentInjector(){let e=_l(this._hostTNode,this._hostLView);if(rl(e)){let t=ol(e,this._hostLView),n=il(e),r=t[1].data[n+8];return new kl(r,t)}return new kl(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=uh(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=rm(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,pp(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 eh(ki(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(Pa,null);e&&(i=e)}let d=ki(l.componentType??{}),f=rm(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,pp(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(mo(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 Bp(o,i,a,r),t.attachToViewContainerRef(),aa(dh(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=uh(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=Hp(this._lContainer,t);n&&(oa(dh(this._lContainer),t),ff(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=Hp(this._lContainer,t);return n&&oa(dh(this._lContainer),t)!=null?new Gp(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function uh(e){return e[8]}function dh(e){return e[8]||=[]}function fh(e,t){let n,r=t[e.index];return Xa(r)?n=r:(n=Rp(r,t,null,e),t[e.index]=n,zf(t,n)),mh(n,t,e,r),new lh(n,e,t)}function ph(e,t){let n=e[11],r=n.createComment(``),i=so(t,e);return Eu(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var mh=_h,hh=()=>!1;function gh(e,t,n){return hh(e,t,n)}function _h(e,t,n,r){if(e[7])return;let i;i=n.type&8?ao(r):ph(t,n),e[7]=i}var vh=class e{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},yh=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 Nh(e,t,n){e.queries===null&&(e.queries=new xh),e.queries.track(new Sh(t,n))}function Ph(e,t){return e.queries.getByIndex(t)}function Fh(e,t){let n=e[1],r=Ph(n,t);return r.crossesNgTemplate?Oh(n,e,t,[]):Dh(n,e,r,t)}function Ih(e,t,n){let r,i=Pn(()=>{r._dirtyCounter();let n=Bh(r,e);if(t&&n===void 0)throw new ii(-951,!1);return n});return r=i[fn],r._dirtyCounter=O(0),r._flatValue=void 0,i}function Lh(e){return Ih(!0,!1,e)}function Rh(e){return Ih(!0,!0,e)}function zh(e,t){let n=e[fn];n._lView=w(),n._queryIndex=t,n._queryList=kh(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(e=>e+1))}function Bh(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[2]&4)return t?void 0:ma;let i=kh(n,r),a=Fh(n,r);return i.reset(a,Ll),t?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}function Vh(e){return!!e&&typeof e.then==`function`}function Hh(e){return!!e&&typeof e.subscribe==`function`}var Uh=class{},Wh=class extends Uh{injector;instance=null;constructor(e){super();let t=new Fa([...e.providers,{provide:Uh,useValue:this}],e.parent||Na(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function Gh(e,t,n=null){return new Wh({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var Kh=(()=>{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=ba(!1,e.type),n=t.length>0?Gh([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=mi({token:e,providedIn:`environment`,factory:()=>new e(Xi(Pa))})}return e})();function A(e){return Tc(()=>{let t=Qh(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Vl.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(Kh).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||du.Emulated,styles:e.styles||ma,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&Ld(`NgStandalone`),$h(n);let r=e.dependencies;return n.directiveDefs=eg(r,qh),n.pipeDefs=eg(r,ji),n.id=tg(n),n})}function qh(e){return ki(e)||Ai(e)}function Jh(e,t){if(e==null)return pa;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=Vf.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function Yh(e){if(e==null)return pa;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function Xh(e){return Tc(()=>{let t=Qh(e);return $h(t),t})}function Zh(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 Qh(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||pa,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||ma,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:Jh(e.inputs,t),outputs:Yh(e.outputs),debugInfo:null}}function $h(e){e.features?.forEach(t=>t(e))}function eg(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 tg(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 ng=new xi(``),rg=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=C(ng,{optional:!0})??[];injector=C(Ts);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=Ka(this.injector,t);if(Vh(n))e.push(n);else if(Hh(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=Nl({token:e,factory:e.ɵfac})}return e})();function ig(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=tl(e.mergedAttrs,e.attrs);let t=e.tView=Mf(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=cg(n,t,e,r);xs()&&xf(n,t,c,e),Jl(c,t);let l=Rp(c,t,c,e);t[r+27]=l,zf(t,l),gh(l,e,t)}function ag(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;return t.firstCreatePass?(f=Yp(t,d,4,o||null,s||null),No()&&Om(t,e,f,ho(t.consts,l),ep),Vc(t,f)):f=t.data[d],ig(f,e,t,n,r,i,a,c),$a(f)&&Wf(t,e,f),l!=null&&Gf(e,f,u),f}function og(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=Yp(t,d,4,o||null,s||null),l!=null){let e=ho(t.consts,l);f.localNames=[];for(let t=0;t{throw new ii(600,``)})}var pg=10,mg=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=C(Qs);afterRenderManager=C(Rd);zonelessEnabled=C(lc);rootEffectScheduler=C(dc);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new $r;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=C(js);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(ni(e=>!e))}constructor(){C(Fd,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=C(Pa);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=Ts.NULL){return this._injector.get(zs).run(()=>{if(zc(Ec.BootstrapComponentStart),!this._injector.get(rg).done)throw new ii(405,``);let r=ki(e),i=this._injector.get(Uh),a=new eh(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=hg(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(ug,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),gg(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),zc(Ec.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){zc(Ec.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(Pd.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw zc(Ec.ChangeDetectionEnd),new ii(101,!1);let e=pn(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,pn(e),this.afterTick.next(),zc(Ec.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(om,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++yo(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;gg(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(dg,[]).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),()=>gg(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new ii(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=Nl({token:e,factory:e.ɵfac})}return e})();function hg(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function gg(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function j(e,t,n,r){let i=w();return pm(i,Xo(),t)&&(Lo(),tp(gs(),i,e,t,n,r)),j}function _g(e){if(Ld(`NgAnimateEnter`),!vd)return _g;let t=w();if(yd(t))return _g;let n=Ro(),r=t[9].get(zs);return Nd(kd(t),n,()=>vg(t,n,e,r)),Xd(t[9]),Zd(t[9],kd(t)),_g}function vg(e,t,n,r){let i=so(t,e),a=e[11],o=Ad(n),s=[],c=!1,l=e=>{if(jd(e)!==i)return;let t=e instanceof AnimationEvent?`animationend`:`transitionend`;r.runOutsideAngular(()=>{a.listen(i,t,u)})},u=e=>{jd(e)===i&&(Md(e,i)&&(c=!0),yg(e,i,a))};if(o&&o.length>0){r.runOutsideAngular(()=>{s.push(a.listen(i,`animationstart`,l)),s.push(a.listen(i,`transitionstart`,l))}),bd(i,o,s);for(let e of o)a.addClass(i,e);r.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(!c&&(pd(i,Cd,vd),!Cd.has(i))){for(let e of o)a.removeClass(i,e);xd(i)}})})}}function yg(e,t,n){let r=Sd.get(t);if(jd(e)===t&&r&&Md(e,t)){e.stopPropagation();for(let e of r.classList)n.removeClass(t,e);xd(t)}}var bg=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 xg(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function Sg(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){pn(r);let c=t.length-1;for(pn(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=xg(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=xg(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 Eg,a??=Tg(e,o,s,n),Cg(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;)wg(e,i,n,o,t[o]),o++}else if(t!=null){pn(r);let c=t[Symbol.iterator]();pn(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=xg(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new Eg,a??=Tg(e,o,s,n);let u=n(o,r);if(Cg(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;)wg(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 Cg(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function wg(e,t,n,r,i){if(Cg(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function Tg(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 Eg=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 M(e,t,n,r,i,a,o,s){Ld(`NgControlFlow`);let c=w(),l=Lo();return og(c,l,e,t,n,r,i,ho(l.consts,a),256,o,s),Dg}function Dg(e,t,n,r,i,a,o,s){Ld(`NgControlFlow`);let c=w(),l=Lo();return og(c,l,e,t,n,r,i,ho(l.consts,a),512,o,s),Dg}function N(e,t){Ld(`NgControlFlow`);let n=w(),r=Xo(),i=n[r]===ed?-1:n[r],a=i===-1?void 0:Ng(n,27+i);if(pm(n,r,e)){let r=pn(null);try{if(a!==void 0&&Vp(a,0),e!==-1){let r=27+e,i=Ng(n,r),a=Rg(n[1],r),o=im(i,a,n);Bp(i,fp(n,a,t,{dehydratedView:o}),0,pp(a,o))}}finally{pn(r)}}else if(a!==void 0){let e=zp(a,0);e!==void 0&&(e[8]=t)}}var Og=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 kg(e){return e}function Ag(e,t){return t}var jg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function P(e,t,n,r,i,a,o,s,c,l,u,d,f){Ld(`NgControlFlow`);let p=w(),m=Lo(),h=c!==void 0,g=w(),_=new jg(h,s?o.bind(g[15][8]):o);g[27+e]=_,og(p,m,e+1,t,n,r,i,ho(m.consts,a),256),h&&og(p,m,e+2,c,l,u,d,ho(m.consts,f),512)}var Mg=class extends bg{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,Bp(this.lContainer,t,e,pp(this.templateTNode,n)),Pg(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,Fg(this.lContainer,e),Ig(this.lContainer,e)}create(e,t){let n=rm(this.lContainer,this.templateTNode.tView.ssrId);return fp(this.hostLView,this.templateTNode,new Og(this.lContainer,t,e),{dehydratedView:n})}destroy(e){ff(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];Jd(e,r),hd.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function Fg(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 Hp(e,t)}function Lg(e,t){return zp(e,t)}function Rg(e,t){return co(e,t)}function I(e,t,n){let r=w();return pm(r,Xo(),t)&&(Lo(),Jf(gs(),r,e,t,r[11],n)),I}function zg(e,t,n,r,i){sp(t,e,n,i?`class`:`style`,r)}function L(e,t,n,r){let i=w(),a=i[1],o=e+27,s=a.firstCreatePass?Hm(o,i,2,t,ep,No(),n,r):a.data[o];if(Qa(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(cm(o),()=>(Bg(e,t,i,s,r),L))}}return Bg(e,t,i,s,r),L}function Bg(e,t,n,r,i){if(ip(r,n,e,t,Hg),$a(r)){let e=n[1];Wf(e,n,r),uu(e,r,n)}i!=null&&Gf(n,r)}function R(){let e=Lo(),t=ap(Ro());return e.firstCreatePass&&Um(e,t),Fo(t)&&Io(),Mo(),t.classesWithoutHost!=null&&Xc(t)&&zg(e,t,w(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&Zc(t)&&zg(e,t,w(),t.stylesWithoutHost,!1),R}function z(e,t,n,r){return L(e,t,n,r),R(),z}function B(e,t,n,r){let i=w(),a=i[1],o=e+27,s=a.firstCreatePass?Wm(o,a,2,t,n,r):a.data[o];return ip(s,i,e,t,Hg),r!=null&&Gf(i,s),B}function V(){return Fo(ap(Ro()))&&Io(),Mo(),V}function Vg(e,t,n,r){return B(e,t,n,r),V(),Vg}var Hg=(e,t,n,r,i)=>(Ss(!0),Tu(t[11],r,ys()));function Ug(e,t,n){let r=w(),i=r[1],a=e+27,o=i.firstCreatePass?Hm(a,r,8,`ng-container`,ep,No(),t,n):i.data[a];if(ip(o,r,e,`ng-container`,Kg),$a(o)){let e=r[1];Wf(e,r,o),uu(e,o,r)}return n!=null&&Gf(r,o),Ug}function Wg(){let e=Lo(),t=ap(Ro());return e.firstCreatePass&&Um(e,t),Wg}function Gg(e,t,n){return Ug(e,t,n),Wg(),Gg}var Kg=(e,t,n,r,i)=>(Ss(!0),wu(t[11],``));function H(){return w()}function qg(e,t,n){let r=w();return pm(r,Xo(),t)&&(Lo(),Yf(gs(),r,e,t,r[11],n)),qg}var Jg=void 0;function Yg(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var Xg=[`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`]],Jg,[[`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`]],Jg,[[`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}`,Jg,Jg,Jg],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`×`,`‰`,`∞`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,Yg],Zg=Object.create(null);function Qg(e){let t=t_(e),n=$g(t);if(n)return n;let r=t.split(`-`)[0];if(n=$g(r),n)return n;if(r===`en`)return Xg;throw new ii(701,!1)}function $g(e){if(!(e in Zg)){let t=Gi.ng&&Gi.ng.common&&Gi.ng.common.locales&&Gi.ng.common.locales[e];return t!==void 0&&(Zg[e]=t),t}return Zg[e]}var e_={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 t_(e){return e.toLowerCase().replace(/_/g,`-`)}var n_=`en-US`;function r_(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function U(e,t,n){let r=w(),i=Lo(),a=Ro();return i_(i,r,r[11],a,e,t,n),U}function W(e,t,n){let r=w(),i=Lo(),a=Ro();return(a.type&3||n)&&ym(a,i,r,n,r[11],e,t,_m(a,r,t)),W}function i_(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=_m(r,t,a),ym(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 m_(e){return(e&2)==2}function h_(e,t){return e&131071|t<<17}function g_(e){return e|2}function __(e){return(e&131068)>>2}function v_(e,t){return e&-131069|t<<2}function y_(e){return(e&1)==1}function b_(e){return e|1}function x_(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=p_(o),c=__(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||da(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=p_(e[s+1]);e[r+1]=f_(t,s),t!==0&&(e[t+1]=v_(e[t+1],r)),e[s+1]=h_(e[s+1],r)}else e[r+1]=f_(s,0),s!==0&&(e[s+1]=v_(e[s+1],r)),s=r}else e[r+1]=f_(c,0),s===0?s=r:e[c+1]=v_(e[c+1],r),c=r;l&&(e[r+1]=g_(e[r+1])),C_(e,u,r,!0),C_(e,u,r,!1),S_(t,u,e,r,a),o=f_(s,c),a?t.classBindings=o:t.styleBindings=o}function S_(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&da(a,t)>=0&&(n[r+1]=b_(n[r+1]))}function C_(e,t,n,r){let i=e[n+1],a=t===null,o=r?p_(i):__(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];w_(n,t)&&(s=!0,e[o+1]=r?b_(i):g_(i)),o=r?p_(i):__(i)}s&&(e[n+1]=r?g_(i):b_(i))}function w_(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?da(e,t)>=0:!1}var T_={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function E_(e){return e.substring(T_.key,T_.keyEnd)}function D_(e){return k_(e),O_(e,A_(e,0,T_.textEnd))}function O_(e,t){let n=T_.textEnd;return n===t?-1:(t=T_.keyEnd=j_(e,T_.key=t,n),A_(e,t,n))}function k_(e){T_.key=0,T_.keyEnd=0,T_.value=0,T_.valueEnd=0,T_.textEnd=e.length}function A_(e,t,n){for(;t32;)t++;return t}function K(e,t,n){return P_(e,t,n,!1),K}function q(e,t){return P_(e,t,null,!0),q}function M_(e){F_(G_,N_,e,!0)}function N_(e,t){for(let n=D_(t);n>=0;n=O_(t,n))la(e,E_(t),!0)}function P_(e,t,n,r){let i=w(),a=Lo(),o=Zo(2);if(a.firstUpdatePass&&L_(a,e,o,r),t!==ed&&pm(i,o,t)){let s=a.data[ms()];q_(a,s,i,i[11],e,i[o+1]=X_(t,n),r,o)}}function F_(e,t,n,r){let i=Lo(),a=Zo(2);i.firstUpdatePass&&L_(i,null,a,r);let o=w();if(n!==ed&&pm(o,a,n)){let s=i.data[ms()];if(Z_(s,r)&&!I_(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=li(e,n||``)),zg(i,s,o,n,r)}else K_(i,s,o,o[11],o[a+1],o[a+1]=W_(e,t,n),r,a)}}function I_(e,t){return t>=e.expandoStartIndex}function L_(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[ms()],o=I_(e,n);Z_(a,r)&&t===null&&!o&&(t=!1),t=R_(i,a,t,r),x_(i,a,t,n,o,r)}}function R_(e,t,n,r){let i=ns(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=H_(null,e,t,n,r),n=U_(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=H_(i,e,t,n,r),a===null){let n=z_(e,t,r);n!==void 0&&Array.isArray(n)&&(n=H_(null,e,t,n[1],r),n=U_(n,t.attrs,r),B_(e,t,r,n))}else a=V_(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function z_(e,t,n){let r=n?t.classBindings:t.styleBindings;if(__(r)!==0)return e[p_(r)]}function B_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[p_(i)]=r}function V_(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===ed&&(u=l?ma:void 0);let d=l?ua(u,r):c===r?u:void 0;if(a&&!Y_(d)&&(d=ua(t,r)),Y_(d)&&(s=d,o))return s;let f=e[i+1];i=o?p_(f):__(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=ua(e,r))}return s}function Y_(e){return e!==void 0}function X_(e,t){return e==null||e===``||(typeof t==`string`?e=pu(e)+t:typeof e==`object`&&(e=ci(pu(e)))),e}function Z_(e,t){return!!(e.flags&(t?8:16))}function J(e,t=``){let n=w(),r=Lo(),i=e+27,a=r.firstCreatePass?Yp(r,i,1,t,null):r.data[i],o=Q_(r,n,a,t);n[i]=o,xs()&&xf(r,n,o,a),Vo(a,!1)}var Q_=(e,t,n,r)=>(Ss(!0),Su(t[11],r));function $_(e,t,n,r=``){return pm(e,Xo(),n)?t+Ni(n)+r:ed}function ev(e,t,n,r,i,a=``){let o=mm(e,Jo(),n,i);return Zo(2),o?t+Ni(n)+r+Ni(i)+a:ed}function tv(e,t,n,r,i,a,o,s=``){let c=hm(e,Jo(),n,i,o);return Zo(3),c?t+Ni(n)+r+Ni(i)+a+Ni(o)+s:ed}function nv(e,t,n,r,i,a,o,s,c,l=``){let u=gm(e,Jo(),n,i,o,c);return Zo(4),u?t+Ni(n)+r+Ni(i)+a+Ni(o)+s+Ni(c)+l:ed}function Y(e){return X(``,e),Y}function X(e,t,n){let r=w(),i=$_(r,e,t,n);return i!==ed&&av(r,ms(),i),X}function Z(e,t,n,r,i){let a=w(),o=ev(a,e,t,n,r,i);return o!==ed&&av(a,ms(),o),Z}function rv(e,t,n,r,i,a,o){let s=w(),c=tv(s,e,t,n,r,i,a,o);return c!==ed&&av(s,ms(),c),rv}function iv(e,t,n,r,i,a,o,s,c){let l=w(),u=nv(l,e,t,n,r,i,a,o,s,c);return u!==ed&&av(l,ms(),u),iv}function av(e,t,n){let r=oo(t,e);Cu(e[11],r,n)}function ov(e,t,n){Sc(t)&&(t=t());let r=w();return pm(r,Xo(),t)&&(Lo(),Jf(gs(),r,e,t,r[11],n)),ov}function sv(e,t){let n=Sc(e);return n&&e.set(t),n}function cv(e,t){let n=w(),r=Lo(),i=Ro();return i_(r,n,n[11],i,e,t),cv}var lv={};function uv(e){Ld(`NgLet`);let t=Lo(),n=w(),r=e+27;return Vo(Yp(t,r,128,null,null),!1),uo(t,n,r,lv),uv}function dv(e){return uo(Lo(),w(),ms(),e),e}function fv(e){let t=lo(Wo(),27+e);if(t===lv)throw new ii(314,!1);return t}function pv(e,t,n=``){return $_(w(),e,t,n)}function mv(e,t){let n=qo()+e,r=w();return r[n]===ed?dm(r,n,t()):fm(r,n)}function hv(e,t,n){return vv(w(),qo(),e,t,n)}function gv(e,t,n,r,i){return bv(w(),qo(),e,t,n,r,i)}function _v(e,t){let n=e[t];return n===ed?void 0:n}function vv(e,t,n,r,i,a){let o=t+n;return pm(e,o,i)?dm(e,o+1,a?r.call(a,i):r(i)):_v(e,o+1)}function yv(e,t,n,r,i,a,o){let s=t+n;return mm(e,s,i,a)?dm(e,s+2,o?r.call(o,i,a):r(i,a)):_v(e,s+2)}function bv(e,t,n,r,i,a,o,s){let c=t+n;return hm(e,c,i,a,o)?dm(e,c+3,s?r.call(s,i,a,o):r(i,a,o)):_v(e,c+3)}function xv(e,t){let n=Lo(),r,i=e+27;n.firstCreatePass?(r=Sv(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=ta(r.type,!0)),o=Ui(Dm);try{let e=cl(!1),t=a();return cl(e),uo(n,w(),i,t),t}finally{Ui(o)}}function Sv(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function Cv(e,t,n){let r=e+27,i=w(),a=lo(i,r);return Tv(i,r)?vv(i,qo(),t,a.transform,n,a):a.transform(n)}function wv(e,t,n,r){let i=e+27,a=w(),o=lo(a,i);return Tv(a,i)?yv(a,qo(),t,o.transform,n,r,o):o.transform(n,r)}function Tv(e,t){return e[1].data[t].pure}function Ev(e,t){return Jp(e,t)}var Dv=(()=>{class e{applicationErrorHandler=C(Qs);appRef=C(mg);taskService=C(js);ngZone=C(zs);zonelessEnabled=C(lc);tracing=C(Fd,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new _r;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Ls):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(C(uc,{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?Fs:Ps;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=Nl({token:e,factory:e.ɵfac})}return e})();function Ov(){return[{provide:cc,useExisting:Dv},{provide:zs,useClass:qs},{provide:lc,useValue:!0}]}function kv(){return typeof $localize<`u`&&$localize.locale||`en-US`}var Av=new xi(``,{factory:()=>C(Av,{optional:!0,skipSelf:!0})||kv()}),jv=class{destroyed=!1;listeners=null;errorHandler=C(Zs,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=C(Ds);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new ii(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(oi(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let t=pn(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&&Mv(this.listeners)),pn(t),this.isEmitting=!1}}};function Mv(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function Q(e,t){return Pn(e,t?.equal)}function Nv(e){return sr(e)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var Pv=e=>e;function Fv(e,t){return typeof e==`function`?Iv(rr(e,Pv,t?.equal),t?.debugName,t?.set):Iv(rr(e.source,e.computation,e.equal),e.debugName,e.set)}function Iv(e,t,n){let r=e[fn],i=e;if(n!==void 0){let t=e=>ir(r,e);i.set=e=>n(e,t),i.update=r=>n(r(Nv(e)),t)}else i.set=e=>ir(r,e),i.update=e=>ar(r,e);return i.asReadonly=ec.bind(e),i}function Lv(e,t){let n=Object.create(wc);n.value=e,n.transformFn=t?.transform;function r(){if(gn(n),n.value===Cc)throw new ii(-950,null);return n.value}return r[fn]=n,r}function Rv(e){return new jv}function zv(e,t){return Lv(e,t)}function Bv(e){return Lv(Cc,e)}var $=(zv.required=Bv,zv);function Vv(e,t){let n=Object.create(wc),r=new jv;n.value=e;function i(){return gn(n),Hv(n.value),n.value}return i[fn]=n,i.asReadonly=ec.bind(i),i.set=e=>{n.equal(n.value,e)||(Kn(n,e),r.emit(e))},i.update=e=>{Hv(n.value),i.set(e(n.value))},i.subscribe=r.subscribe.bind(r),i.destroyRef=r.destroyRef,i}function Hv(e){if(e===Cc)throw new ii(952,!1)}function Uv(e,t){return Vv(e,t)}function Wv(e){return Vv(Cc,e)}var Gv=(Uv.required=Wv,Uv);function Kv(e,t){return Lh(t)}function qv(e,t){return Rh(t)}var Jv=(Kv.required=qv,Kv),Yv=new xi(``),Xv=new xi(``);function Zv(e){return!e.moduleRef}function Qv(e){let t=Zv(e)?e.r3Injector:e.moduleRef.injector,n=t.get(zs);return n.run(()=>{Zv(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Qs),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),Zv(e)){let n=()=>t.destroy(),r=e.platformInjector.get(Yv);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(Yv);n.add(t),e.moduleRef.onDestroy(()=>{gg(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return ey(r,n,()=>{let n=t.get(js),r=n.add(),i=t.get(rg);return i.runInitializers(),i.donePromise.then(()=>{if(r_(t.get(Av,n_)||`en-US`),!t.get(Xv,!0))return Zv(e)?t.get(mg):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Zv(e)){let n=t.get(mg);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return $v?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var $v;function ey(e,t,n){try{let r=n();return Vh(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var ty=null;function ny(e=[],t){return Ts.create({name:t,providers:[{provide:ka,useValue:`platform`},{provide:Yv,useValue:new Set([()=>ty=null])},...e]})}function ry(e=[]){if(ty)return ty;let t=ny(e);return ty=t,fg(),iy(t),t}function iy(e){let t=e.get(rc,null);Ka(e,()=>{t?.forEach(e=>e())})}function ay(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;zc(Ec.BootstrapApplicationStart);try{let e=i?.injector??ry(r);return Qv({r3Injector:new Wh({providers:[Ov(),$s,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{zc(Ec.BootstrapApplicationEnd)}}function oy(e){return typeof e==`boolean`?e:e!=null&&e!==`false`}var sy=Symbol(`NOT_SET`),cy=new Set,ly={...Jn,kind:`afterRenderEffectPhase`,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:sy,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(gn(r),r.value),r.signal[fn]=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??cy)t()}finally{On(e)}}};function dy(e,t){let n=t?.injector??C(Ts),r=n.get(cc),i=n.get(Rd),a=n.get(Fd,null,{optional:!0});i.impl??=n.get(Bd);let o=e;typeof o==`function`&&(o={mixedReadWrite:e});let s=n.get(oc,null,{optional:!0}),c=new uy(i.impl,[o.earlyRead,o.write,o.mixedReadWrite,o.read],s?.view,r,n,a?.snapshot(null));return i.impl.register(c),c}var fy=null;function py(){return fy}function my(e){fy??=e}var hy=class{},gy=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(gy||{}),_y=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(_y||{}),vy=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(vy||{}),yy={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 by(e){return Qg(e)[e_.LocaleId]}function xy(e,t,n){let r=Qg(e);return My(My([r[e_.DayPeriodsFormat],r[e_.DayPeriodsStandalone]],t),n)}function Sy(e,t,n){let r=Qg(e);return My(My([r[e_.DaysFormat],r[e_.DaysStandalone]],t),n)}function Cy(e,t,n){let r=Qg(e);return My(My([r[e_.MonthsFormat],r[e_.MonthsStandalone]],t),n)}function wy(e,t){let n=Qg(e)[e_.Eras];return My(n,t)}function Ty(e,t){return My(Qg(e)[e_.DateFormat],t)}function Ey(e,t){return My(Qg(e)[e_.TimeFormat],t)}function Dy(e,t){let n=Qg(e)[e_.DateTimeFormat];return My(n,t)}function Oy(e,t){let n=Qg(e),r=n[e_.NumberSymbols][t];if(r===void 0){if(t===yy.CurrencyDecimal)return n[e_.NumberSymbols][yy.Decimal];if(t===yy.CurrencyGroup)return n[e_.NumberSymbols][yy.Group]}return r}function ky(e){if(!e[e_.ExtraData])throw new ii(2303,!1)}function Ay(e){let t=Qg(e);return ky(t),(t[e_.ExtraData][2]||[]).map(e=>typeof e==`string`?Ny(e):[Ny(e[0]),Ny(e[1])])}function jy(e,t,n){let r=Qg(e);return ky(r),My(My([r[e_.ExtraData][0],r[e_.ExtraData][1]],t)||[],n)||[]}function My(e,t){for(let n=t;n>-1;n--)if(e[n]!==void 0)return e[n];throw new ii(2304,!1)}function Ny(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var Py=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Fy=Object.create(null),Iy=/((?:[^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]*)/,Ly=256;function Ry(e,t,n,r){let i=sb(e);zy(t),t=Vy(n,t)||t;let a=[],o;for(;t;)if(o=Iy.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=ib(r,s),i=ob(i,r));let c=``;return a.forEach(e=>{let t=rb(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function zy(e){if(e.length>Ly)throw new ii(2300,!1)}function By(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function Vy(e,t){let n=by(e);if(Fy[n]??=Object.create(null),Fy[n][t])return Fy[n][t];let r=``;switch(t){case`shortDate`:r=Ty(e,vy.Short);break;case`mediumDate`:r=Ty(e,vy.Medium);break;case`longDate`:r=Ty(e,vy.Long);break;case`fullDate`:r=Ty(e,vy.Full);break;case`shortTime`:r=Ey(e,vy.Short);break;case`mediumTime`:r=Ey(e,vy.Medium);break;case`longTime`:r=Ey(e,vy.Long);break;case`fullTime`:r=Ey(e,vy.Full);break;case`short`:let t=Vy(e,`shortTime`),n=Vy(e,`shortDate`);r=Hy(Dy(e,vy.Short),[t,n]);break;case`medium`:let i=Vy(e,`mediumTime`),a=Vy(e,`mediumDate`);r=Hy(Dy(e,vy.Medium),[i,a]);break;case`long`:let o=Vy(e,`longTime`),s=Vy(e,`longDate`);r=Hy(Dy(e,vy.Long),[o,s]);break;case`full`:let c=Vy(e,`fullTime`),l=Vy(e,`fullDate`);r=Hy(Dy(e,vy.Full),[c,l])}return r&&(Fy[n][t]=r),r}function Hy(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return Object.hasOwn(t,n)?t[n]:e})),e}function Uy(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 Wy(s,t);let c=Oy(o,yy.MinusSign);return Uy(s,t,c,r,i)}}function Ky(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 ii(2301,!1)}}function qy(e,t,n=gy.Format,r=!1){return function(i,a){return Jy(i,a,e,t,n,r)}}function Jy(e,t,n,r,i,a){switch(n){case 2:return Cy(t,i,r)[e.getMonth()];case 1:return Sy(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=Ay(t),a=jy(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?`+`:``)+Uy(o,2,a)+Uy(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+Uy(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+Uy(o,2,a)+`:`+Uy(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+Uy(o,2,a)+`:`+Uy(Math.abs(i%60),2,a);default:throw new ii(2310,!1)}}}var Xy=0,Zy=4;function Qy(e){let t=By(e,Xy,1).getDay();return By(e,0,1+(t<=Zy?Zy:11)-t)}function $y(e){let t=e.getDay(),n=t===0?-3:Zy-t;return By(e.getFullYear(),e.getMonth(),e.getDate()+n)}function eb(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=$y(n),t=Qy(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return Uy(i,e,Oy(r,yy.MinusSign))}}function tb(e,t=!1){return function(n,r){return Uy($y(n).getFullYear(),e,Oy(r,yy.MinusSign),t)}}var nb=Object.create(null);function rb(e){if(nb[e])return nb[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=qy(3,_y.Abbreviated);break;case`GGGG`:t=qy(3,_y.Wide);break;case`GGGGG`:t=qy(3,_y.Narrow);break;case`y`:t=Gy(0,1,0,!1,!0);break;case`yy`:t=Gy(0,2,0,!0,!0);break;case`yyy`:t=Gy(0,3,0,!1,!0);break;case`yyyy`:t=Gy(0,4,0,!1,!0);break;case`Y`:t=tb(1);break;case`YY`:t=tb(2,!0);break;case`YYY`:t=tb(3);break;case`YYYY`:t=tb(4);break;case`M`:case`L`:t=Gy(1,1,1);break;case`MM`:case`LL`:t=Gy(1,2,1);break;case`MMM`:t=qy(2,_y.Abbreviated);break;case`MMMM`:t=qy(2,_y.Wide);break;case`MMMMM`:t=qy(2,_y.Narrow);break;case`LLL`:t=qy(2,_y.Abbreviated,gy.Standalone);break;case`LLLL`:t=qy(2,_y.Wide,gy.Standalone);break;case`LLLLL`:t=qy(2,_y.Narrow,gy.Standalone);break;case`w`:t=eb(1);break;case`ww`:t=eb(2);break;case`W`:t=eb(1,!0);break;case`d`:t=Gy(2,1);break;case`dd`:t=Gy(2,2);break;case`c`:case`cc`:t=Gy(7,1);break;case`ccc`:t=qy(1,_y.Abbreviated,gy.Standalone);break;case`cccc`:t=qy(1,_y.Wide,gy.Standalone);break;case`ccccc`:t=qy(1,_y.Narrow,gy.Standalone);break;case`cccccc`:t=qy(1,_y.Short,gy.Standalone);break;case`E`:case`EE`:case`EEE`:t=qy(1,_y.Abbreviated);break;case`EEEE`:t=qy(1,_y.Wide);break;case`EEEEE`:t=qy(1,_y.Narrow);break;case`EEEEEE`:t=qy(1,_y.Short);break;case`a`:case`aa`:case`aaa`:t=qy(0,_y.Abbreviated);break;case`aaaa`:t=qy(0,_y.Wide);break;case`aaaaa`:t=qy(0,_y.Narrow);break;case`b`:case`bb`:case`bbb`:t=qy(0,_y.Abbreviated,gy.Standalone,!0);break;case`bbbb`:t=qy(0,_y.Wide,gy.Standalone,!0);break;case`bbbbb`:t=qy(0,_y.Narrow,gy.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=qy(0,_y.Abbreviated,gy.Format,!0);break;case`BBBB`:t=qy(0,_y.Wide,gy.Format,!0);break;case`BBBBB`:t=qy(0,_y.Narrow,gy.Format,!0);break;case`h`:t=Gy(3,1,-12);break;case`hh`:t=Gy(3,2,-12);break;case`H`:t=Gy(3,1);break;case`HH`:t=Gy(3,2);break;case`m`:t=Gy(4,1);break;case`mm`:t=Gy(4,2);break;case`s`:t=Gy(5,1);break;case`ss`:t=Gy(5,2);break;case`S`:t=Gy(6,1);break;case`SS`:t=Gy(6,2);break;case`SSS`:t=Gy(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=Yy(0);break;case`ZZZZZ`:t=Yy(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=Yy(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=Yy(2);break;default:return null}return nb[e]=t,t}function ib(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function ab(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function ob(e,t,n){let r=e.getTimezoneOffset();return ab(e,-1*(ib(t,r)-r))}function sb(e){if(lb(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 By(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(Py))return cb(n)}let t=new Date(e);if(!lb(t))throw new ii(2311,!1);return t}function cb(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 lb(e){return e instanceof Date&&!isNaN(e.valueOf())}var ub=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=C(Ts);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)(Dm(sh))};static ɵdir=Xh({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[Ac]})}return e})();function db(e,t){return new ii(2100,!1)}var fb=`mediumDate`,pb=new xi(``),mb=new xi(``),hb=(()=>{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??fb,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Ry(t,e,i||this.locale,a)}catch(t){throw db(e,t.message)}}static ɵfac=function(t){return new(t||e)(Dm(Av,16),Dm(pb,24),Dm(mb,24))};static ɵpipe=Zh({name:`date`,type:e,pure:!0})}return e})(),gb=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=Zh({name:`json`,type:e,pure:!1})}return e})();function _b(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 vb=`browser`,yb=class{_doc;constructor(e){this._doc=e}manager},bb=(()=>{class e extends yb{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)(Xi(Es))};static ɵprov=mi({token:e,factory:e.ɵfac})}return e})(),xb=new xi(``),Sb=(()=>{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 bb));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof bb);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 ii(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(Xi(xb),Xi(zs))};static ɵprov=mi({token:e,factory:e.ɵfac})}return e})(),Cb=`ng-app-id`;function wb(e){for(let t of e)t.remove()}function Tb(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function Eb(e,t,n,r){let i=e.head?.querySelectorAll(`style[${Cb}="${t}"],link[${Cb}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(Cb),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 Db(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var Ob=(()=>{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,Eb(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,Tb);t?.forEach(e=>this.addUsage(e,this.external,Db))}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&&(wb(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])wb(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,Tb(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,Db(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)(Xi(Es),Xi(tc),Xi(ac,8),Xi(ic))};static ɵprov=mi({token:e,factory:e.ɵfac})}return e})(),kb={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`},Ab=/%COMP%/g,jb=`%COMP%`,Mb=`_nghost-${jb}`,Nb=`_ngcontent-${jb}`,Pb=!0,Fb=new xi(``,{factory:()=>Pb}),Ib=new xi(``);function Lb(e){return Nb.replace(Ab,e)}function Rb(e){return Mb.replace(Ab,e)}function zb(e,t){return t.map(t=>t.replace(Ab,e))}var Bb=(()=>{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 Vb(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 Gb?n.applyToHost(e):n instanceof Wb&&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 du.Emulated:r=new Gb(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case du.ShadowDom:return new Ub(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case du.ExperimentalIsolatedShadowDom:return new Ub(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new Wb(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)(Xi(Sb),Xi(Tm),Xi(tc),Xi(Fb),Xi(Es),Xi(zs),Xi(ac),Xi(Fd,8),Xi(Ib,8))};static ɵprov=mi({token:e,factory:e.ɵfac})}return e})(),Vb=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(kb[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(Hb(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=Hb(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new ii(-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 ii(-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=kb[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=kb[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&(td.DashCase|td.Important)?e.style.setProperty(t,n,r&td.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&td.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=py().getGlobalEventTarget(this.doc,e),!e))throw new ii(-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 Hb(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var Ub=class extends Vb{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=zb(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=Db(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)}},Wb=class extends Vb{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?zb(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&&hd.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Gb=class extends Wb{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=Lb(l),this.hostAttr=Rb(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}},Kb=class e extends hy{supportsDOMEvents=!0;static makeCurrent(){my(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=Jb();return t==null?null:Yb(t)}resetBaseElement(){qb=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return _b(document.cookie,e)}},qb=null;function Jb(){return qb||=document.head.querySelector(`base`),qb?qb.getAttribute(`href`):null}function Yb(e){return new URL(e,document.baseURI).pathname}var Xb=[`alt`,`control`,`meta`,`shift`],Zb={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},Qb={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},$b=(()=>{class e extends yb{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(()=>py().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.`),Xb.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=Zb[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`),Xb.forEach(t=>{if(t!==n){let n=Qb[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)(Xi(Es))};static ɵprov=mi({token:e,factory:e.ɵfac})}return e})();async function ex(e,t,n){return ay({rootComponent:e,...tx(t,n)})}function tx(e,t){return{platformRef:t?.platformRef,appProviders:[...ox,...e?.providers??[]],platformProviders:ax}}function nx(){Kb.makeCurrent()}function rx(){return new Zs}function ix(){return $l(document),document}var ax=[{provide:ic,useValue:vb},{provide:rc,useValue:nx,multi:!0},{provide:Es,useFactory:ix}],ox=[{provide:ka,useValue:`root`},{provide:Zs,useFactory:rx},{provide:xb,useClass:bb,multi:!0},{provide:xb,useClass:$b,multi:!0},Bb,{provide:Tm,useClass:Ob},{provide:Ob,useExisting:Tm},Sb,{provide:om,useExisting:Bb},[]];function sx(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 dx({code:i,why:lx(a.why,e),fix:lx(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:lx(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function mx(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 bx=Math.random.bind(Math),xx=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Sx(e=21){let t=``,n=e;for(;n--;)t+=xx[bx()*64|0];return t}var Cx=6e4,wx=e=>e,Tx=wx,{clearTimeout:Ex,setTimeout:Dx}=globalThis;function Ox(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=wx,deserialize:s=Tx,resolver:c,bind:l=`rpc`,timeout:u=Cx,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}=yx(),_=Sx();s.i=_;let ee;async function te(n=s){return u>=0&&(ee=Dx(()=>{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{Ex(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&&(Ex(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(ne),h}function kx(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var Ax=Object.freeze({type:`object`,additionalProperties:!0});function jx(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return Ax}return Ax}function Mx(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 Px(e,t){return Nx(e,t)??[e]}function Fx(e){return typeof e==`string`?`'${e}'`:new zx().serialize(e)}var Ix=` _-,;:!?.'"()[]{}@*/\\%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Lx=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Ix.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Rx(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})(),Bx=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Vx=[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],Hx=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,Ux=[],Wx=class{_data=new Gx;_hash=new Gx([...Bx]);_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)Ux[n]=e[t+n]|0;else{let e=Ux[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=Ux[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;Ux[n]=t+Ux[n-7]+i+Ux[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+Vx[n]+Ux[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=Gx.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 Kx(e){return new Wx().finalize(e).toBase64()}function qx(e){return Kx(Fx(e))}function Jx(e){return qx(e)}function Yx(){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 Xx=/^[\w+.-]{2,}:\/\//;function Zx(e){return e.endsWith(`/`)?e:`${e}/`}function Qx(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function $x(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?Zx(n)+e.replace(/^\.?\//,``):e);return n}function eS(e,t){if(!t||t===`/`||Xx.test(e))return e;let n=Qx(t);return e.startsWith(n)?e:$x(n,e)}function tS(e,t){let n=e.match(Xx);return t+(n?e.slice(n[0].length):e)}var nS=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function rS(e=21){let t=``,n=e;for(;n--;)t+=nS[Math.random()*64|0];return t}var iS=Symbol.for(`immer-nothing`),aS=Symbol.for(`immer-draftable`),oS=Symbol.for(`immer-state`),sS=[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 cS(e,...t){{let n=sS[e],r=MS(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var lS=Object,uS=lS.getPrototypeOf,dS=`constructor`,fS=`prototype`,pS=`configurable`,mS=`enumerable`,hS=`writable`,gS=`value`,_S=e=>!!e&&!!e[oS];function vS(e){return e?xS(e)||OS(e)||!!e[aS]||!!e[dS]?.[aS]||kS(e)||AS(e):!1}var yS=lS[fS][dS].toString(),bS=new WeakMap;function xS(e){if(!e||!jS(e))return!1;let t=uS(e);if(t===null||t===lS[fS])return!0;let n=lS.hasOwnProperty.call(t,dS)&&t[dS];if(n===Object)return!0;if(!MS(n))return!1;let r=bS.get(n);return r===void 0&&(r=Function.toString.call(n),bS.set(n,r)),r===yS}function SS(e,t,n=!0){CS(e)===0?(n?Reflect.ownKeys(e):lS.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function CS(e){let t=e[oS];return t?t.type_:OS(e)?1:kS(e)?2:AS(e)?3:0}var wS=(e,t,n=CS(e))=>n===2?e.has(t):lS[fS].hasOwnProperty.call(e,t),TS=(e,t,n=CS(e))=>n===2?e.get(t):e[t],ES=(e,t,n,r=CS(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function DS(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var OS=Array.isArray,kS=e=>e instanceof Map,AS=e=>e instanceof Set,jS=e=>typeof e==`object`,MS=e=>typeof e==`function`,NS=e=>typeof e==`boolean`;function PS(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var FS=e=>jS(e)?e?.[oS]:null,IS=e=>e.copy_||e.base_,LS=e=>e.modified_?e.copy_:e.base_;function RS(e,t){if(kS(e))return new Map(e);if(AS(e))return new Set(e);if(OS(e))return Array[fS].slice.call(e);let n=xS(e);if(t===!0||t===`class_only`&&!n){let t=lS.getOwnPropertyDescriptors(e);delete t[oS];let n=Reflect.ownKeys(t);for(let r=0;r1&&lS.defineProperties(e,{set:VS,add:VS,clear:VS,delete:VS}),lS.freeze(e),t&&SS(e,(e,t)=>{zS(t,!0)},!1),e)}function BS(){cS(2)}var VS={[gS]:BS};function HS(e){return e===null||!jS(e)||lS.isFrozen(e)}var US=`MapSet`,WS=`Patches`,GS=`ArrayMethods`,KS={};function qS(e){let t=KS[e];return t||cS(0,e),t}var JS=e=>!!KS[e];function YS(e,t){KS[e]||(KS[e]=t)}var XS,ZS=()=>XS,QS=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:JS(US)?qS(US):void 0,arrayMethodsPlugin_:JS(GS)?qS(GS):void 0});function $S(e,t){t&&(e.patchPlugin_=qS(WS),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function eC(e){tC(e),e.drafts_.forEach(rC),e.drafts_=null}function tC(e){e===XS&&(XS=e.parent_)}var nC=e=>XS=QS(XS,e);function rC(e){let t=e[oS];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function iC(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[oS].modified_&&(eC(t),cS(4)),vS(e)&&(e=aC(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[oS].base_,e,t)}else e=aC(t,n);return oC(t,e,!0),eC(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===iS?void 0:e}function aC(e,t){if(HS(t))return t;let n=t[oS];if(!n)return mC(t,e.handledSet_,e);if(!cC(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);fC(n,e)}return n.copy_}function oC(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&zS(t,n)}function sC(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var cC=(e,t)=>e.scope_===t,lC=[];function uC(e,t,n,r){let i=IS(e),a=e.type_;if(r!==void 0&&TS(i,r,a)===t){ES(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;SS(i,(e,n)=>{if(_S(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??lC;for(let e of o)ES(i,e,n,a)}function dC(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!cC(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=LS(i);uC(e,i.draft_??i,a,n),fC(i,r)})}function fC(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)}sC(e)}}function pC(e,t,n){let{scope_:r}=e;if(_S(n)){let i=n[oS];cC(i,r)&&i.callbacks_.push(function(){CC(e),uC(e,n,LS(i),t)})}else vS(n)&&e.callbacks_.push(function(){let i=IS(e);e.type_===3?i.has(n)&&mC(n,r.handledSet_,r):TS(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&mC(TS(e.copy_,t,e.type_),r.handledSet_,r)})}function mC(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||_S(e)||t.has(e)||!vS(e)||HS(e)?e:(t.add(e),SS(e,(r,i)=>{if(_S(i)){let t=i[oS];cC(t,n)&&(ES(e,r,LS(t),e.type_),sC(t))}else vS(i)&&mC(i,t,n)}),e)}function hC(e,t){let n=OS(e),r={type_:+!!n,scope_:t?t.scope_:ZS(),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=gC;n&&(i=[r],a=_C);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var gC={get(e,t){if(t===oS)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=IS(e);if(!wS(i,t,e.type_))return bC(e,i,t);let a=i[t];if(e.finalized_||!vS(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&PS(t))return a;if(a===vC(e.base_,t)||yC(e,t,a)){CC(e);let n=e.type_===1?+t:t,r=TC(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in IS(e)},ownKeys(e){return Reflect.ownKeys(IS(e))},set(e,t,n){let r=xC(IS(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=vC(IS(e),t),i=r?.[oS];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(DS(n,r)&&(n!==void 0||wS(e.base_,t,e.type_)))return!0;CC(e),SC(e)}return e.copy_[t]===n&&(n!==void 0||wS(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),pC(e,t,n),!0)},deleteProperty(e,t){return CC(e),vC(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),SC(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=IS(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[hS]:!0,[pS]:e.type_!==1||t!==`length`,[mS]:r[mS],[gS]:n[t]}},defineProperty(){cS(11)},getPrototypeOf(e){return uS(e.base_)},setPrototypeOf(){cS(12)}},_C={};for(let e in gC){let t=gC[e];_C[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}_C.deleteProperty=function(e,t){return isNaN(parseInt(t))&&cS(13),_C.set.call(this,e,t,void 0)},_C.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&cS(14),gC.set.call(this,e[0],t,n,e[0])};function vC(e,t){let n=e[oS];return(n?IS(n):e)[t]}function yC(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!vS(n)||n[oS]?!1:e.baseRefs_.has(n)}function bC(e,t,n){let r=xC(t,n);return r?gS in r?r[gS]:r.get?.call(e.draft_):void 0}function xC(e,t){if(!(t in e))return;let n=uS(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=uS(n)}}function SC(e){e.modified_||(e.modified_=!0,e.parent_&&SC(e.parent_))}function CC(e){e.copy_||=(e.assigned_=new Map,RS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var wC=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(MS(e)&&!MS(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}MS(t)||cS(6),n!==void 0&&!MS(n)&&cS(7);let r;if(vS(e)){let i=nC(this),a=TC(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?eC(i):tC(i)}return $S(i,n),iC(r,i)}if(!e||!jS(e)){if(r=t(e),r===void 0&&(r=e),r===iS&&(r=void 0),this.autoFreeze_&&zS(r,!0),n){let t=[],i=[];qS(WS).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}cS(1,e)},this.produceWithPatches=(e,t)=>{if(MS(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]},NS(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),NS(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),NS(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){vS(e)||cS(8),_S(e)&&(e=EC(e));let t=nC(this),n=TC(t,e,void 0);return n[oS].isManual_=!0,tC(t),n}finishDraft(e,t){let n=e&&e[oS];(!n||!n.isManual_)&&cS(9);let{scope_:r}=n;return $S(r,t),iC(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=qS(WS).applyPatches_;return _S(e)?r(e,t):this.produce(e,e=>r(e,t))}};function TC(e,t,n,r){let[i,a]=kS(t)?qS(US).proxyMap_(t,n):AS(t)?qS(US).proxySet_(t,n):hC(t,n);return(n?.scope_??ZS()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?dC(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 EC(e){return _S(e)||cS(10,e),DC(e)}function DC(e){if(!vS(e)||HS(e))return e;let t=e[oS],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=RS(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=RS(e,!0);return SS(n,(e,t)=>{ES(n,e,DC(t))},r),t&&(t.finalized_=!1),n}function OC(){sS.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=FS(TS(e,n.key_)),i=TS(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||wS(e,o)))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=TS(o,e,c),f=TS(s,e,c),p=l?wS(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===iS?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(AS(e))return new Set(Array.from(e).map(u));let t=Object.create(uS(e));for(let n in e)t[n]=u(e[n]);return wS(e,aS)&&(t[aS]=e[aS]),t}function d(e){return _S(e)?u(e):e}YS(WS,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var kC=new wC,AC=kC.produce,jC=kC.produceWithPatches.bind(kC),MC=kC.applyPatches.bind(kC),NC=1e3;function PC(e,t){if(e.add(t),e.size>NC){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function FC(e){let{enablePatches:t=!1}=e;t&&OC();let n=Yx(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=rS())=>{i.has(t)||(OC(),r=MC(r,e),PC(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=rS())=>{if(!i.has(a)){if(PC(i,a),t){let[t,i]=jC(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=AC(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var IC=typeof self==`object`?self:globalThis,LC=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),RC=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function zC(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=LC.has(e)?IC[e]:void 0;return n(new(r??IC.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`&&RC.has(a))return n(new IC[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function BC(e){return zC(new Map,e)(0)}var VC=``,{toString:HC}={},{keys:UC}=Object;function WC(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=HC.call(e).slice(8,-1);switch(n){case`Array`:return[1,VC];case`Object`:return[2,VC];case`Date`:return[3,VC];case`RegExp`:return[4,VC];case`Map`:return[5,VC];case`Set`:return[6,VC];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function GC([e,t]){return e===0&&(t===`function`||t===`symbol`)}function KC(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]=WC(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 UC(r))(e||!GC(WC(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||!(GC(WC(n))||GC(WC(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!GC(WC(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function qC(e,t={}){let n=[];return KC(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:JC,stringify:YC}=JSON,XC={json:!0,lossy:!0};function ZC(e){return BC(JC(e))}function QC(e){return YC(qC(e,XC))}function $C(e){return BC(e)}function ew(e){return QC(e)}function tw(e){return ZC(e)}var nw=256,rw=class extends Error{name=`StreamClosedError`};function iw(e={}){let t=e.id??rS(),n=Math.max(0,e.replayWindow??0),r=Yx(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new rw(`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=ow(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 aw(e={}){let t=e.id??rS(),n=Math.max(1,e.highWaterMark??nw),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 ow(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 sw=128;function cw(e){return e.replace(/[^\w-]+/g,`_`).slice(0,sw)}var lw=`modulepreload`,uw=function(e,t){return new URL(e,t).href},dw={},fw=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=uw(t,n),t=s(t),t in dw)return;dw[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`:lw,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)})},pw=`__connection.json`,mw=`__DEVFRAME_CONNECTION__`,hw=`x-birpc-session`,gw=`__rpc-dump/index.json`,_w=`devframe:services`,vw=`devframe_otp`,yw=`devframe_auth_token`;hx.postMessage.remoteAssetsError;var bw=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>Jx(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()}},xw=vx({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 Sw(e){if(e.agent&&e.jsonSerializable===!1)throw xw.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function Cw(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function ww(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 Tw(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 Ow(e,t){let n=e.handler;if(!n){let r=await Dw(e,t);if(!r.handler)throw xw.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 Tw(e.name,r,t),o=await a(...n);return await Ew(e.name,i,o)}}var kw=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 Ow(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 xw.DF0021({name:e.name});Sw(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 xw.DF0022({name:e.name});Sw(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 Ow(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw xw.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 Aw(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 Mw(t,`undefined`,r,e);return n}return i!==null&&jw(i,r,e,t),n})}function jw(e,t,n,r){if(typeof e==`bigint`)throw Mw(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw Mw(r,`Map`,t,n);if(e instanceof Set)throw Mw(r,`Set`,t,n);if(e instanceof Date)throw Mw(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw Mw(r,e.constructor?.name??`class instance`,t,n)}function Mw(e,t,n,r){let i=Nw(n,r);return xw.DF0020({name:e||``,type:t,path:i})}function Nw(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var Pw=`__DEVFRAME_CONNECTION_META__`,Fw=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function Iw(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 Lw(){return Iw(mw)}function Rw(){return Iw(Pw)}function zw(e){if(e)return e;try{let e=localStorage.getItem(Fw);if(e)return e}catch{}return Iw(Fw)}function Bw(e){globalThis[mw]=e,globalThis[Pw]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&Vw(e.authToken)}function Vw(e){try{localStorage.setItem(Fw,e)}catch{}globalThis[Fw]=e;let t=Lw();t&&(globalThis[mw]={...t,authToken:e})}function Hw(e){let t=eS(pw,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function Uw(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function Ww(){let e=Lw();if(e)return Uw(e,zw()??e.authToken??e.connectionMeta.authToken);let t=Rw();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??Hw(`./`),authToken:zw(t.authToken)}}async function Gw(e={}){if(e.connection){let t=Uw(e.connection,zw(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return Bw(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:Hw(t[0]??`./`),authToken:zw(e.authToken??e.connectionMeta.authToken)};return Bw(n),n}let n=Ww();if(n){let t=Uw(n,zw(e.authToken??n.authToken??n.connectionMeta.authToken));return Bw(t),t}let r=[];for(let n of t){let t=eS(pw,n),i=Hw(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:zw(e.authToken??r.authToken)};return Bw(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var Kw=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function qw(e=vw){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function Jw(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 Yw(e=vw){let t=qw(e);return t&&Jw(e),t}async function Xw(e,t={}){let n=Yw(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function Zw(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(_w,{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 Qw(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:hx.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:hx.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=FC({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=>{if(e.isTrusted)d().then(t);else{t(u);let n=!1;e.events.on(hx.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var $w=new Map;function eT(e=$w){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?Aw(n,r??``):`s:${ew(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?tw(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function tT(){}function nT(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 rT(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 iT(e){let{onConnected:t=tT,onError:n=tT,onDisconnected:r=tT,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${yw}=${encodeURIComponent(e.authToken)}`);let s=eT(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=nT(r);if(!e)break;r=e.rest;let{event:t,data:n}=rT(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`,[hw]: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 aT(e,t){let{channel:n,rpcOptions:r={}}=t;return Ox(e,{...n,timeout:-1,...r,proxify:!1})}function oT(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(hx.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 Kw(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new Kw(`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(hx.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 Kw(`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(hx.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(hx.client.connectionError,e),m(new Kw(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new Kw(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),te=aT(a.functions,{channel:ee,rpcOptions:o});a.register({name:hx.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new Kw(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(hx.client.connectionError,e),m(e),i.emit(hx.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 Kw(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(hx.client.connectionError,e)}return i.emit(hx.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(hx.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(hx.client.error,n,t),Promise.reject(n)):g(te.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(hx.client.error,t,String(e[0]));return}return te.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(hx.client.error,n,t),Promise.reject(n)):g(te.$callOptional(...e),t)},close:()=>{ee.close()}}}function sT(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 cT(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=sT(n.sse,r??`./`,location);return oT({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>iT({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 lT(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:uT(r)?lT(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function uT(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function dT(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function fT(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function pT(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function mT(e){if(e.error)throw lT(e.error);return e.output}function hT(e){return e.some(e=>e!=null)}function gT(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function _T(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?$C(e):e}function a(e,t){return i(gT(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 pT(r)?mT(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(dT(r)){if(hT(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(fT(r)){let e=Jx(n),i=r.records[e];if(i)return mT(await s(i,r.serialization));if(r.fallback)return mT(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!hT(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 vT(e){let t=_T(await e.fetchJsonFromBases(gw),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 yT=``;function bT(e,t){return`${e}${yT}${t}`}function xT(e){let t=new Map,n=new Map;e.client.register({name:hx.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(bT(e,n))?._push(r,i)}}),e.client.register({name:hx.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=bT(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:hx.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=bT(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(hx.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(yT);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=bT(n,r),o=t.get(a);if(o)return o;let s=aw({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(hx.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=bT(t,r),a=n.get(i);if(a)return a;let o=iw({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 ST(){}var CT=new Map;function wT(e){let t=e.url;e.authToken&&(t=`${t}?${yw}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=ST,onError:i=ST,onDisconnected:a=ST,definitions:o=CT}=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=eT(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 TT(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 tS(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function ET(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=TT(n.websocket,r??`./`,location);return oT({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>wT({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 DT(e){return e.includes(`:`)}function OT(e,t){return DT(t)?t:`${e}:${t}`}function kT(e){return{async get(t){return(await e()).value()[t]},async set(t,n){(await e()).mutate(e=>{e[t]=n})},async delete(t){(await e()).mutate(e=>{delete e[t]})},async all(){return(await e()).value()},async onChange(t){return(await e()).on(`updated`,e=>t(e))}}}function AT(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return kT(a)}function jT(e,t){return{global:AT(e,t,`global`),project:AT(e,t,`project`)}}function MT(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(DT(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(OT(t,n),...r)),callEvent:((n,...r)=>e.callEvent(OT(t,n),...r)),callOptional:((n,...r)=>e.callOptional(OT(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(OT(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(OT(t,n),r,i),upload:(n,r)=>e.streaming.upload(OT(t,n),r)}},settings:jT(e,t),scope:e.scope}}function NT(){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 PT(e,t={}){let n=t.modelContext??NT();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=cw(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=kx(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Mx(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>FT(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 FT(e,t,n){try{let r=Px(n,e.args?.length);return{content:[{type:`text`,text:IT(await(await Ow(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:LT(e)}]}}}function IT(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function LT(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 RT(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 zT(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Yx(),a=Array.isArray(t)?t:[t],o=await Gw(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new bw({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new kw(f),m=e.webmcp===!1?void 0:PT(p),h,g=!1;async function _(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(eS(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 ee={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&d?.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);d.apply(e,n)}else await t(e)}}},te=RT(e.transport??`auto`,s),ne=te===`static`?await vT({fetchJsonFromBases:_}):te===`sse`?cT({...ee,sseOptions:e.sseOptions}):ET({...ee,wsOptions:e.wsOptions}),re;try{re=new BroadcastChannel(`devframe-auth`)}catch{}let ie,ae=!1;function oe(e){return((...t)=>ae||!ie?e(...t):ie.then(()=>e(...t)))}function se(){g=!0;try{h?.(),m?.()}finally{try{re?.close()}finally{ne.close?.()}}}let ce={events:i,get isTrusted(){return ne.isTrusted},get status(){return ne.status},get connectionError(){return ne.connectionError},get transport(){return ne.transport??te},get connection(){return o},connectionMeta:s,ensureTrusted:ne.ensureTrusted,requestTrust:ne.requestTrust,requestTrustWithToken:async e=>(Vw(e),o={...o,authToken:e},ne.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await ne.requestTrustWithCode(e);if(!t)return!1;Vw(t),o={...o,authToken:t};try{re?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>ne.requestAuthCode(e),call:oe(ne.call),callEvent:oe(ne.callEvent),callOptional:oe(ne.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:se};ce.sharedState=Qw(ce),ce.streaming=xT(ce),ce.services=Zw(ce);let le=new Map;ce.scope=(e=>{if(!e)return ce;let t=le.get(e);return t||(t=MT(ce,e),le.set(e,t)),t}),f.rpc=ce;function ue(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function de(){if(e.simpleAuth!==!1&&ue()&&typeof globalThis.prompt==`function`)for(await ce.requestAuthCode().catch(()=>{});!ce.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 ce.requestTrustWithCode(t))return}}async function fe(){let t=await ne.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await Xw(ce,{param:n}):!1;t||r||ce.isTrusted||await de()}return ie=fe().then(()=>{ae=!0},()=>{ae=!0}),s.mcp&&fw(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-DojfAbAj.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(ce))}).catch(()=>{}),re&&(re.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&ce.requestTrustWithToken(e.data.authToken)}),ce}var BT=zT,VT=[`components`,`injectors`,`signals`,`ngrx`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`,`errors`],HT=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function UT(e){return`pangular:${e}`}var WT=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`],GT={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}},KT={"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`},qT=[[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 JT(e){return qT.some(([t])=>t===e)}var YT=`pangular`,XT={mod:`Mod`,ctrl:`Ctrl`,control:`Ctrl`,meta:`Meta`,cmd:`Meta`,command:`Meta`,alt:`Alt`,option:`Alt`,opt:`Alt`,shift:`Shift`},ZT=[`Mod`,`Ctrl`,`Meta`,`Alt`,`Shift`];function QT(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=XT[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[...ZT.filter(e=>n.has(e)),r].join(`+`)}function $T(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 eE(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 tE=[{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:`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`}],nE=1e4;function rE(e){return tE.filter(t=>!(`inspector`in t)||e.inspectors[t.inspector])}var iE={components:`a component instance, by its id in the component tree`,injectors:`a component's element injector, by the component's id`,forms:`a form, by its id`},aE=200;function oE(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 sE(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=e=>{let n=t.get(e)?.trim();return n&&n.length<=aE?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 cE=[{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 lE(e){let t=rE(e).map(e=>({id:`tab:${e.id}`,title:`Go to ${e.label}`,group:`Go to`,keywords:`tab open`})),n=cE.filter(t=>!t.inspector||e.inspectors[t.inspector]).map(({inspector:e,...t})=>t);return[...t,...n]}function uE(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function dE(e,t){return typeof e==`boolean`?e:t}var fE=100,pE=100;function mE(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=pE);return[...new Set(t)].slice(0,fE)}function hE(e,t){let{default:n,min:r,max:i}=GT[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function gE(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function _E(e){let t=uE(e),n=uE(t.agent),r=uE(t.inspectors),i=uE(n.tools),a=uE(t.actions),o=dE(t.actions,!0),s=uE(t.redaction),c=uE(t.limits),l=gE(VT,e=>dE(r[e],!0));return{inspectors:l,agent:{readOnly:dE(n.readOnly,!1),tools:gE(VT,e=>l[e]&&dE(i[e],!0))},actions:gE(WT,e=>l[e]&&dE(a[e],o)),redaction:{secretNames:mE(s.secretNames),unmask:mE(s.unmask)},limits:Object.fromEntries(Object.keys(GT).map(e=>[e,hE(c[e],e)])),popup:{hotkey:vE(uE(t.popup).hotkey)}}}function vE(e){return e===!1?!1:QT(e)??`Alt+Shift+P`}function yE(e){let t=e?.configs;return _E(t?.[YT])}function bE(e){return`${{forms:`Writing to forms`,router:`Navigating and clearing navigations`,ngrx:`Restoring NgRx state and dispatching actions`,http:`Changing HTTP mock rules and clearing HTTP calls`,analog:`Calling API routes and clearing server calls`,components:`Editing component properties and signals`}[e]} is turned off in the devtools config (actions.${e}).`}var xE={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`,capacitor:`Capacitor`,errors:`Errors`},SE={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore and dispatch`,http:`HTTP mocking`,analog:`Analog API calls`,components:`Component edits`},CE={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 wE(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=VT.filter(t=>e.inspectors[t]);return n(`Inspectors off`,VT.filter(t=>!e.inspectors[t]).map(e=>xE[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>xE[e])),n(`Blocked actions`,WT.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>SE[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Limits`,Object.keys(GT).filter(t=>e.limits[t]!==GT[t].default).map(t=>CE[t](e.limits[t]))),e.popup.hotkey!==`Alt+Shift+P`&&n(`Popup shortcut`,[e.popup.hotkey===!1?`Off`:e.popup.hotkey]),t}function TE(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 EE(e){return!e.tags.length&&!e.directives.length&&!e.text}function DE(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 OE={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 kE(e){let t=/^(\d+)\.(\d+)/.exec(e.trim());return t?`${t[1]}.${t[2]}`:e.trim()}function AE(e){let t=/^(\d+)(?:\.(\d+))?/.exec(e.trim());return t?[Number(t[1]),Number(t[2]??0)]:null}function jE(e,t){let n=AE(e),r=AE(t);return!n||!r?!1:n[0]===r[0]?n[1]>=r[1]:n[0]>r[0]}function ME(e,t){return e?.capabilities?.[t]===!1}function NE(e,t){let n=OE[e],r=`${n.subject} needs Angular ${n.since} or later`;if(!t)return`${r}; this page's Angular version is unknown.`;let i=kE(t);return jE(t,n.since)?`${r} in a development build; this page runs Angular ${i} without it, which usually means a production build.`:`${r}; this page runs Angular ${i}.`}var PE=`pangular-page-id`,FE=null;function IE(e){FE=e}function LE(){if(FE)return FE;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(PE)||null)}catch{return null}}function RE(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 zE(e,t){return e?t?e.pages?.[t]??null:e:null}function BE(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function VE(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function HE(e,t,n){return VE(e,t,n).then(e=>e,()=>null)}function UE(e){return e?.connectionMeta.backend===`static`}function WE(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 GE(e){return e.split(`@`)[1]??``}var KE={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},qE={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},JE=HE,YE={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 XE(e){return YE[e]??e}var ZE=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function QE(e,t){return await JE(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function $E(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 eD=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function tD(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(eD,(e,t)=>t??(e===`**`?``:e))}function nD(e){return yE(e?.connectionMeta)}function rD(e,t){return nD(e).actions[t]}var iD={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`,capacitor:`capacitor`,errors:`errors`};function aD(e){return iD[e]}var oD=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function sD(e,t){let n=iD[e];return!n||t.inspectors[n]}function cD(e,t){e&1&&(D(),Vg(0,`rect`,4)(1,`rect`,5)(2,`rect`,6)(3,`rect`,7))}function lD(e,t){e&1&&(D(),Vg(0,`path`,8)(1,`circle`,9)(2,`circle`,10)(3,`path`,11))}function uD(e,t){e&1&&(D(),Vg(0,`path`,12)(1,`path`,13))}function dD(e,t){e&1&&(D(),Vg(0,`path`,14)(1,`path`,15)(2,`path`,16))}function fD(e,t){e&1&&(D(),Vg(0,`circle`,17)(1,`path`,18)(2,`circle`,19))}function pD(e,t){e&1&&(D(),Vg(0,`path`,1))}function mD(e,t){e&1&&(D(),Vg(0,`path`,20)(1,`path`,21)(2,`path`,22)(3,`path`,23))}function hD(e,t){e&1&&(D(),Vg(0,`ellipse`,24)(1,`path`,25)(2,`path`,26))}function gD(e,t){e&1&&(D(),Vg(0,`rect`,27)(1,`path`,28)(2,`path`,29)(3,`path`,30))}function _D(e,t){e&1&&(D(),Vg(0,`circle`,31)(1,`path`,8)(2,`path`,32))}function vD(e,t){e&1&&(D(),Vg(0,`path`,33)(1,`path`,34)(2,`path`,35)(3,`path`,36)(4,`circle`,37))}function yD(e,t){e&1&&(D(),Vg(0,`circle`,38)(1,`path`,39))}function bD(e,t){e&1&&(D(),Vg(0,`circle`,31)(1,`path`,40)(2,`path`,41))}function xD(e,t){e&1&&(D(),Vg(0,`path`,2))}function SD(e,t){e&1&&(D(),Vg(0,`path`,3))}var CD=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:16,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`,`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`],[`d`,`M12 7v6`],[`d`,`M12 16.5v.01`]],template:function(e,t){if(e&1&&(D(),B(0,`svg`,0),M(1,cD,4,0)(2,lD,4,0)(3,uD,2,0)(4,dD,3,0)(5,fD,3,0)(6,pD,1,0,`:svg:path`,1)(7,mD,4,0)(8,hD,3,0)(9,gD,4,0)(10,_D,3,0)(11,vD,5,0)(12,yD,2,0)(13,bD,3,0)(14,xD,1,0,`:svg:path`,2)(15,SD,1,0,`:svg:path`,3),V()),e&2){let e;k(),N((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===`errors`?13:e===`analog`?14:e===`capacitor`?15:-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`,[hw]: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 aT(e,t){let{channel:n,rpcOptions:r={}}=t;return Ox(e,{...n,timeout:-1,...r,proxify:!1})}function oT(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(hx.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 Kw(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new Kw(`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(hx.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 Kw(`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(hx.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(hx.client.connectionError,e),m(new Kw(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new Kw(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),te=aT(a.functions,{channel:ee,rpcOptions:o});a.register({name:hx.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new Kw(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(hx.client.connectionError,e),m(e),i.emit(hx.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 Kw(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(hx.client.connectionError,e)}return i.emit(hx.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(hx.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(hx.client.error,n,t),Promise.reject(n)):g(te.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(hx.client.error,t,String(e[0]));return}return te.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(hx.client.error,n,t),Promise.reject(n)):g(te.$callOptional(...e),t)},close:()=>{ee.close()}}}function sT(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 cT(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=sT(n.sse,r??`./`,location);return oT({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>iT({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 lT(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:uT(r)?lT(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function uT(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function dT(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function fT(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function pT(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function mT(e){if(e.error)throw lT(e.error);return e.output}function hT(e){return e.some(e=>e!=null)}function gT(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function _T(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?$C(e):e}function a(e,t){return i(gT(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 pT(r)?mT(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(dT(r)){if(hT(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(fT(r)){let e=Jx(n),i=r.records[e];if(i)return mT(await s(i,r.serialization));if(r.fallback)return mT(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!hT(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 vT(e){let t=_T(await e.fetchJsonFromBases(gw),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 yT=``;function bT(e,t){return`${e}${yT}${t}`}function xT(e){let t=new Map,n=new Map;e.client.register({name:hx.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(bT(e,n))?._push(r,i)}}),e.client.register({name:hx.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=bT(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:hx.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=bT(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(hx.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(yT);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=bT(n,r),o=t.get(a);if(o)return o;let s=aw({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(hx.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=bT(t,r),a=n.get(i);if(a)return a;let o=iw({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 ST(){}var CT=new Map;function wT(e){let t=e.url;e.authToken&&(t=`${t}?${yw}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=ST,onError:i=ST,onDisconnected:a=ST,definitions:o=CT}=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=eT(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 TT(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 tS(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function ET(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=TT(n.websocket,r??`./`,location);return oT({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>wT({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 DT(e){return e.includes(`:`)}function OT(e,t){return DT(t)?t:`${e}:${t}`}function kT(e){return{async get(t){return(await e()).value()[t]},async set(t,n){(await e()).mutate(e=>{e[t]=n})},async delete(t){(await e()).mutate(e=>{delete e[t]})},async all(){return(await e()).value()},async onChange(t){return(await e()).on(`updated`,e=>t(e))}}}function AT(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return kT(a)}function jT(e,t){return{global:AT(e,t,`global`),project:AT(e,t,`project`)}}function MT(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(DT(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(OT(t,n),...r)),callEvent:((n,...r)=>e.callEvent(OT(t,n),...r)),callOptional:((n,...r)=>e.callOptional(OT(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(OT(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(OT(t,n),r,i),upload:(n,r)=>e.streaming.upload(OT(t,n),r)}},settings:jT(e,t),scope:e.scope}}function NT(){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 PT(e,t={}){let n=t.modelContext??NT();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=cw(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=kx(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Mx(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>FT(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 FT(e,t,n){try{let r=Px(n,e.args?.length);return{content:[{type:`text`,text:IT(await(await Ow(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:LT(e)}]}}}function IT(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function LT(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 RT(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 zT(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Yx(),a=Array.isArray(t)?t:[t],o=await Gw(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new bw({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new kw(f),m=e.webmcp===!1?void 0:PT(p),h,g=!1;async function _(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(eS(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 ee={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&d?.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);d.apply(e,n)}else await t(e)}}},te=RT(e.transport??`auto`,s),ne=te===`static`?await vT({fetchJsonFromBases:_}):te===`sse`?cT({...ee,sseOptions:e.sseOptions}):ET({...ee,wsOptions:e.wsOptions}),re;try{re=new BroadcastChannel(`devframe-auth`)}catch{}let ie,ae=!1;function oe(e){return((...t)=>ae||!ie?e(...t):ie.then(()=>e(...t)))}function se(){g=!0;try{h?.(),m?.()}finally{try{re?.close()}finally{ne.close?.()}}}let ce={events:i,get isTrusted(){return ne.isTrusted},get status(){return ne.status},get connectionError(){return ne.connectionError},get transport(){return ne.transport??te},get connection(){return o},connectionMeta:s,ensureTrusted:ne.ensureTrusted,requestTrust:ne.requestTrust,requestTrustWithToken:async e=>(Vw(e),o={...o,authToken:e},ne.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await ne.requestTrustWithCode(e);if(!t)return!1;Vw(t),o={...o,authToken:t};try{re?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>ne.requestAuthCode(e),call:oe(ne.call),callEvent:oe(ne.callEvent),callOptional:oe(ne.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:se};ce.sharedState=Qw(ce),ce.streaming=xT(ce),ce.services=Zw(ce);let le=new Map;ce.scope=(e=>{if(!e)return ce;let t=le.get(e);return t||(t=MT(ce,e),le.set(e,t)),t}),f.rpc=ce;function ue(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function de(){if(e.simpleAuth!==!1&&ue()&&typeof globalThis.prompt==`function`)for(await ce.requestAuthCode().catch(()=>{});!ce.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 ce.requestTrustWithCode(t))return}}async function fe(){let t=await ne.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await Xw(ce,{param:n}):!1;t||r||ce.isTrusted||await de()}return ie=fe().then(()=>{ae=!0},()=>{ae=!0}),s.mcp&&fw(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-B_f3HV4w.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(ce))}).catch(()=>{}),re&&(re.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&ce.requestTrustWithToken(e.data.authToken)}),ce}var BT=zT,VT=[`components`,`injectors`,`signals`,`ngrx`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`,`errors`],HT=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function UT(e){return`pangular:${e}`}var WT=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`],GT={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}},KT={"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`},qT=[[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 JT(e){return qT.some(([t])=>t===e)}var YT=`pangular`,XT={mod:`Mod`,ctrl:`Ctrl`,control:`Ctrl`,meta:`Meta`,cmd:`Meta`,command:`Meta`,alt:`Alt`,option:`Alt`,opt:`Alt`,shift:`Shift`},ZT=[`Mod`,`Ctrl`,`Meta`,`Alt`,`Shift`];function QT(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=XT[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[...ZT.filter(e=>n.has(e)),r].join(`+`)}function $T(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 eE(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 tE=[{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:`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`}],nE=1e4;function rE(e){return tE.filter(t=>!(`inspector`in t)||e.inspectors[t.inspector])}var iE={components:`a component instance, by its id in the component tree`,injectors:`a component's element injector, by the component's id`,forms:`a form, by its id`},aE=200;function oE(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 sE(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=e=>{let n=t.get(e)?.trim();return n&&n.length<=aE?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 cE=[{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 lE(e){let t=rE(e).map(e=>({id:`tab:${e.id}`,title:`Go to ${e.label}`,group:`Go to`,keywords:`tab open`})),n=cE.filter(t=>!t.inspector||e.inspectors[t.inspector]).map(({inspector:e,...t})=>t);return[...t,...n]}function uE(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function dE(e,t){return typeof e==`boolean`?e:t}var fE=100,pE=100;function mE(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=pE);return[...new Set(t)].slice(0,fE)}function hE(e,t){let{default:n,min:r,max:i}=GT[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function gE(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function _E(e){let t=uE(e),n=uE(t.agent),r=uE(t.inspectors),i=uE(n.tools),a=uE(t.actions),o=dE(t.actions,!0),s=uE(t.redaction),c=uE(t.limits),l=gE(VT,e=>dE(r[e],!0));return{inspectors:l,agent:{readOnly:dE(n.readOnly,!1),tools:gE(VT,e=>l[e]&&dE(i[e],!0))},actions:gE(WT,e=>l[e]&&dE(a[e],o)),redaction:{secretNames:mE(s.secretNames),unmask:mE(s.unmask)},limits:Object.fromEntries(Object.keys(GT).map(e=>[e,hE(c[e],e)])),popup:{hotkey:vE(uE(t.popup).hotkey)}}}function vE(e){return e===!1?!1:QT(e)??`Alt+Shift+P`}function yE(e){let t=e?.configs;return _E(t?.[YT])}function bE(e){return`${{forms:`Writing to forms`,router:`Navigating and clearing navigations`,ngrx:`Restoring NgRx state and dispatching actions`,http:`Changing HTTP mock rules and clearing HTTP calls`,analog:`Calling API routes and clearing server calls`,components:`Editing component properties and signals`}[e]} is turned off in the devtools config (actions.${e}).`}var xE={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`,capacitor:`Capacitor`,errors:`Errors`},SE={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore and dispatch`,http:`HTTP mocking`,analog:`Analog API calls`,components:`Component edits`},CE={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 wE(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=VT.filter(t=>e.inspectors[t]);return n(`Inspectors off`,VT.filter(t=>!e.inspectors[t]).map(e=>xE[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>xE[e])),n(`Blocked actions`,WT.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>SE[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Limits`,Object.keys(GT).filter(t=>e.limits[t]!==GT[t].default).map(t=>CE[t](e.limits[t]))),e.popup.hotkey!==`Alt+Shift+P`&&n(`Popup shortcut`,[e.popup.hotkey===!1?`Off`:e.popup.hotkey]),t}function TE(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 EE(e){return!e.tags.length&&!e.directives.length&&!e.text}function DE(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 OE={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 kE(e){let t=/^(\d+)\.(\d+)/.exec(e.trim());return t?`${t[1]}.${t[2]}`:e.trim()}function AE(e){let t=/^(\d+)(?:\.(\d+))?/.exec(e.trim());return t?[Number(t[1]),Number(t[2]??0)]:null}function jE(e,t){let n=AE(e),r=AE(t);return!n||!r?!1:n[0]===r[0]?n[1]>=r[1]:n[0]>r[0]}function ME(e,t){return e?.capabilities?.[t]===!1}function NE(e,t){let n=OE[e],r=`${n.subject} needs Angular ${n.since} or later`;if(!t)return`${r}; this page's Angular version is unknown.`;let i=kE(t);return jE(t,n.since)?`${r} in a development build; this page runs Angular ${i} without it, which usually means a production build.`:`${r}; this page runs Angular ${i}.`}var PE=`pangular-page-id`,FE=null;function IE(e){FE=e}function LE(){if(FE)return FE;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(PE)||null)}catch{return null}}function RE(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 zE(e,t){return e?t?e.pages?.[t]??null:e:null}function BE(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function VE(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function HE(e,t,n){return VE(e,t,n).then(e=>e,()=>null)}function UE(e){return e?.connectionMeta.backend===`static`}function WE(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 GE(e){return e.split(`@`)[1]??``}var KE={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},qE={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},JE=HE,YE={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 XE(e){return YE[e]??e}var ZE=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function QE(e,t){return await JE(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function $E(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 eD=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function tD(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(eD,(e,t)=>t??(e===`**`?``:e))}function nD(e){return yE(e?.connectionMeta)}function rD(e,t){return nD(e).actions[t]}var iD={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`,capacitor:`capacitor`,errors:`errors`};function aD(e){return iD[e]}var oD=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function sD(e,t){let n=iD[e];return!n||t.inspectors[n]}function cD(e,t){e&1&&(D(),Vg(0,`rect`,4)(1,`rect`,5)(2,`rect`,6)(3,`rect`,7))}function lD(e,t){e&1&&(D(),Vg(0,`path`,8)(1,`circle`,9)(2,`circle`,10)(3,`path`,11))}function uD(e,t){e&1&&(D(),Vg(0,`path`,12)(1,`path`,13))}function dD(e,t){e&1&&(D(),Vg(0,`path`,14)(1,`path`,15)(2,`path`,16))}function fD(e,t){e&1&&(D(),Vg(0,`circle`,17)(1,`path`,18)(2,`circle`,19))}function pD(e,t){e&1&&(D(),Vg(0,`path`,1))}function mD(e,t){e&1&&(D(),Vg(0,`path`,20)(1,`path`,21)(2,`path`,22)(3,`path`,23))}function hD(e,t){e&1&&(D(),Vg(0,`ellipse`,24)(1,`path`,25)(2,`path`,26))}function gD(e,t){e&1&&(D(),Vg(0,`rect`,27)(1,`path`,28)(2,`path`,29)(3,`path`,30))}function _D(e,t){e&1&&(D(),Vg(0,`circle`,31)(1,`path`,8)(2,`path`,32))}function vD(e,t){e&1&&(D(),Vg(0,`path`,33)(1,`path`,34)(2,`path`,35)(3,`path`,36)(4,`circle`,37))}function yD(e,t){e&1&&(D(),Vg(0,`circle`,38)(1,`path`,39))}function bD(e,t){e&1&&(D(),Vg(0,`circle`,31)(1,`path`,40)(2,`path`,41))}function xD(e,t){e&1&&(D(),Vg(0,`path`,2))}function SD(e,t){e&1&&(D(),Vg(0,`path`,3))}var CD=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:16,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`,`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`],[`d`,`M12 7v6`],[`d`,`M12 16.5v.01`]],template:function(e,t){if(e&1&&(D(),B(0,`svg`,0),M(1,cD,4,0)(2,lD,4,0)(3,uD,2,0)(4,dD,3,0)(5,fD,3,0)(6,pD,1,0,`:svg:path`,1)(7,mD,4,0)(8,hD,3,0)(9,gD,4,0)(10,_D,3,0)(11,vD,5,0)(12,yD,2,0)(13,bD,3,0)(14,xD,1,0,`:svg:path`,2)(15,SD,1,0,`:svg:path`,3),V()),e&2){let e;k(),N((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===`errors`?13:e===`analog`?14:e===`capacitor`?15:-1)}},styles:[`[_nghost-%COMP%] {
display: inline-flex;
flex-shrink: 0;
}`]})},wD=(e,t)=>t.tab,TD=(e,t)=>t.label;function ED(e,t){e&1&&J(0),e&2&&X(` `,G().meta()?.projectName,` `)}function DD(e,t){e&1&&J(0,` Project details unavailable `)}function OD(e,t){e&1&&J(0,` Loading… `)}function kD(e,t){e&1&&(J(0,` Run `),L(1,`code`),J(2,`pangular build`),R(),J(3,` again to rebuild the report. `))}function AD(e,t){e&1&&J(0,` Check that the dev server is running. `)}function jD(e,t){if(e&1){let e=H();L(0,`button`,12),U(`click`,function(){return T(e),E(G(2).loadMeta())}),J(1,`Try again`),R()}}function MD(e,t){if(e&1&&(L(0,`p`,10),M(1,kD,4,0)(2,AD,1,0),R(),M(3,jD,2,0,`button`,11)),e&2){let e=G();k(),N(e.staticReport()?1:2),k(2),N(e.staticReport()?-1:3)}}function ND(e,t){e&1&&(L(0,`li`,5)(1,`span`),J(2,`Analog`),R(),J(3),R()),e&2&&(k(3),Y(t))}function PD(e,t){e&1&&(L(0,`li`)(1,`span`),J(2,`Change detection`),R(),J(3),R()),e&2&&(k(3),Y(t))}function FD(e,t){if(e&1&&(L(0,`span`,19),J(1),R(),L(2,`span`,20),J(3),R()),e&2){let e=G().$implicit,t=G();k(),Y(t.cards()[e.tab]?.value),k(2),Y(t.cards()[e.tab]?.sub)}}function ID(e,t){e&1&&(L(0,`span`,21),J(1,`–`),R(),L(2,`span`,20),J(3,`Count unavailable`),R())}function LD(e,t){e&1&&(z(0,`span`,22),L(1,`span`,20),J(2,`Counting…`),R())}function RD(e,t){if(e&1){let e=H();L(0,`button`,13),U(`click`,function(){let t=T(e).$implicit;return E(G().navigate.emit(t.tab))}),L(1,`span`,14)(2,`span`,15),z(3,`app-tab-icon`,16),R(),L(4,`span`,17),J(5,`→`),R()(),L(6,`span`,18),J(7),R(),M(8,FD,4,2)(9,ID,4,0)(10,LD,3,0),R()}if(e&2){let e,n=t.$implicit,r=t.$index,i=G().stateOf(n.tab);K(`animation-delay`,60*r,`ms`),j(`aria-busy`,i===`loading`),k(3),I(`name`,n.tab),k(4),Y(n.label),k(),N((e=i)===`ready`?8:e===`error`?9:10)}}function zD(e,t){e&1&&(L(0,`p`),J(1,`Loading…`),R())}function BD(e,t){if(e&1&&(L(0,`div`)(1,`dt`),J(2),R(),L(3,`dd`),J(4),R()()),e&2){let e=t.$implicit;k(2),Y(e.label),k(2),Y(e.value)}}function VD(e,t){if(e&1&&(L(0,`dl`),P(1,BD,5,2,`div`,null,TD),R()),e&2){let e=G();k(),F(e.configItems())}}function HD(e,t){e&1&&(L(0,`p`),J(1,`Defaults`),R())}var UD=[{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 WD(e){return UD.filter(t=>sD(t.tab,e))}var GD={zoneless:`Zoneless`,zone:`zone.js`,"zone-unused":`Zoneless, zone.js loaded`};function KD(e){return e&&Object.hasOwn(GD,e)?GD[e]:null}var qD=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),JD={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 YD(e,t,n){return`${e} ${e===1?t:n}`}function XD(e,t){for(let n of e??[])t(n),XD(n.children,t)}function ZD(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 · ${YD(t,`directive`,`directives`)}`}}function QD(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 · ${YD(t,`redirect`,`redirects`)}`}}function $D(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]=JD[e]??[e,e];return YD(t,n,r)});return{value:e.length,sub:n.join(` · `)}}function eO(e,t){let n=e?.forms??[],r=t?n.filter(e=>GE(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 tO(e){return e.cancelled||e.status===void 0?!1:e.status===0||e.status>=400}function nO(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(tO).length;return{value:o.length,sub:`${o.length===1?`call`:`calls`} · ${s} failed`}}var rO=class e{rpc=$(null);navigate=Rv();staticReport=Q(()=>UE(this.rpc()));meta=O(null);config=Q(()=>nD(this.rpc()));stats=Q(()=>this.rpc()?WD(this.config()):[]);configItems=Q(()=>wE(this.config()));metaState=O(`loading`);states=O({});rows=O({});injectorTree=O(null);signalGraph=O(null);formsState=O(null);httpState=O(null);pageId=LE();destroyRef=C(Ds);stopLive=[];zone=Q(()=>KD(zE(this.injectorTree(),this.pageId)?.zone));liveInjectors=Q(()=>{let e=zE(this.injectorTree(),this.pageId);if(!e?.roots?.length)return null;let t=0,n=0,r=e=>{t++,n+=e.providers?.length??0};return XD(e.roots,r),XD(e.environment,r),{injectors:t,providers:n}});liveSignals=Q(()=>{let e=BE(this.signalGraph(),this.pageId);return e?.nodes?.length?e.nodes.filter(e=>qD.has(e.kind??``)).length:null});cards=Q(()=>{let e=this.rows(),t={};if(e.components&&(t.components=ZD(e.components)),e.routes&&(t.routes=QD(e.routes)),e.store&&(t.store=$D(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 · ${YD(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=eO(i,this.pageId));let a=this.httpState();return a&&(t.network=nO(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`)}))}constructor(){mc(()=>{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);let n=nD(e),r=e=>sD(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)),sD(`forms`,t)&&r(`forms`,e=>this.formsState.set(e??{}),`forms`),sD(`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=A({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&&(L(0,`section`,0)(1,`div`,1)(2,`p`,2),J(3,`Project`),R(),L(4,`h2`,3),M(5,ED,1,1)(6,DD,1,0)(7,OD,1,0),R(),M(8,MD,4,2),R(),L(9,`ul`,4)(10,`li`)(11,`span`),J(12,`Angular`),R(),J(13),R(),L(14,`li`)(15,`span`),J(16,`TypeScript`),R(),J(17),R(),L(18,`li`)(19,`span`),J(20,`SSR`),R(),J(21),R(),M(22,ND,4,1,`li`,5),M(23,PD,4,1,`li`),R()(),L(24,`div`,6),P(25,RD,11,6,`button`,7,wD),R(),L(27,`section`,8)(28,`h2`,9),J(29,`Configuration`),R(),M(30,zD,2,0,`p`)(31,VD,3,0,`dl`)(32,HD,2,0,`p`),R()),e&2){let e,n,r;j(`aria-busy`,t.metaState()===`loading`),k(4),q(`muted`,t.metaState()!==`ready`),k(),N((e=t.metaState())===`ready`?5:e===`error`?6:7),k(3),N(t.metaState()===`error`?8:-1),k(),q(`pending`,t.metaState()===`loading`),k(4),Y(t.meta()?.angularVersion??`…`),k(4),Y(t.meta()?.typescript??`…`),k(4),Y(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),k(),N((n=t.meta()?.analog)?22:-1,n),k(),N((r=t.zone())?23:-1,r),k(2),F(t.stats()),k(2),j(`aria-busy`,!t.rpc()),k(3),N(t.rpc()?t.configItems().length?31:32:30)}},dependencies:[CD],styles:[`[_nghost-%COMP%] {
@@ -16796,7 +16796,7 @@ ul[_ngcontent-%COMP%] {
margin: 0;
color: var(--%NS%text-2);
font-size: 12px;
-}`]})},s3=(e,t)=>t.label,c3=(e,t)=>t.key,l3=(e,t)=>t.area;function u3(e,t){e&1&&(L(0,`div`,1)(1,`p`),J(2,`The audit reads a live page, and a static report has none.`),R(),L(3,`p`,3),J(4,`Open the panel from the server that runs the app to audit it.`),R()())}function d3(e,t){e&1&&(L(0,`p`,1),J(1,`Loading the audit…`),R())}function f3(e,t){if(e&1){let e=H();L(0,`div`,2)(1,`p`),J(2,`Can't read the audit from the devtools server.`),R(),L(3,`button`,4),U(`click`,function(){return T(e),E(G().refresh())}),J(4,`Retry`),R()()}}function p3(e,t){e&1&&(L(0,`div`,1)(1,`p`),J(2,`No page reports live data yet.`),R(),L(3,`p`,3),J(4,` Open the app with the overlay loaded. The audit reads what the other inspectors collect from it. `),R()())}function m3(e,t){if(e&1){let e=H();L(0,`app-select`,33),U(`valueChange`,function(t){return T(e),E(G(2).pickPage(t))}),R()}if(e&2){let e=G(2);I(`options`,e.pageOptions())(`value`,e.pageId())}}function h3(e,t){e&1&&(L(0,`p`,18),J(1),R()),e&2&&(k(),Y(t))}function g3(e,t){if(e&1){let e=H();L(0,`button`,16),U(`click`,function(){return T(e),E(G(2).mark(`clear`))}),J(1,` Clear `),R()}e&2&&I(`disabled`,G(2).busy())}function _3(e,t){e&1&&(L(0,`p`,18),J(1),R()),e&2&&(k(),Y(t))}function v3(e,t){e&1&&z(0,`app-audit-diff`,24),e&2&&I(`diff`,t)}function y3(e,t){e&1&&(L(0,`p`,27),J(1,` No finding on this page. Run axe, or record change detection, to check more. `),R())}function b3(e,t){if(e&1){let e=H();L(0,`div`,27)(1,`p`),J(2,`No finding matches the filters.`),R(),L(3,`button`,4),U(`click`,function(){T(e),G();let t=d_(11);return G().clearFilters(),E(t.focus())}),J(4,` Clear filters `),R()()}}function x3(e,t){if(e&1&&(L(0,`code`,39),J(1),R()),e&2){let e=G().$implicit;k(),Y(e.subject)}}function S3(e,t){if(e&1&&(L(0,`span`,40),J(1),R()),e&2){let e=G().$implicit;j(`aria-label`,e.count+` times`),k(),X(``,e.count,`×`)}}function C3(e,t){if(e&1){let e=H();L(0,`button`,44),U(`focus`,function(){T(e);let t=G(2).$implicit;return E(G(3).highlight(t))})(`blur`,function(){return T(e),E(G(5).highlight(null))})(`click`,function(){T(e);let t=G(2).$implicit,n=G(3);return E(n.showComponent.emit({id:t.elementId,pageId:n.pageId()}))}),J(1,` Show component `),R()}}function w3(e,t){if(e&1){let e=H();L(0,`button`,44),U(`focus`,function(){T(e);let t=G(2).$implicit;return E(G(3).highlight(t))})(`blur`,function(){return T(e),E(G(5).highlight(null))})(`click`,function(){T(e);let t=G(2).$implicit;return E(G(3).highlight(t,!0))}),J(1,` Show in page `),R()}}function T3(e,t){if(e&1&&M(0,C3,2,0,`button`,43)(1,w3,2,0,`button`,43),e&2){let e=G().$implicit,t=G(3);N(t.canShowComponent()&&t.isComponentArea(e.area)?0:1)}}function E3(e,t){if(e&1){let e=H();L(0,`li`,35),U(`mouseenter`,function(){let t=T(e).$implicit;return E(G(3).highlight(t))})(`mouseleave`,function(){return T(e),E(G(3).highlight(null))}),L(1,`div`,36)(2,`span`,37),J(3),R(),L(4,`span`,38),J(5),R(),M(6,x3,2,1,`code`,39),M(7,S3,2,2,`span`,40),R(),L(8,`p`,41),J(9),R(),L(10,`div`,42)(11,`span`,3),J(12,`Rule `),L(13,`code`),J(14),R()(),L(15,`span`,3),J(16,`Agent tool `),L(17,`code`),J(18),R()(),M(19,T3,2,1),R()()}if(e&2){let e=t.$implicit,n=G(3);k(2),j(`data-tone`,n.tone[e.severity]),k(),Y(e.severity),k(2),Y(n.areaLabel[e.area]),k(),N(e.subject?6:-1),k(),N((e.count??1)>1?7:-1),k(2),Y(e.why),k(5),Y(e.rule),k(4),Y(n.toolCall(e)),k(),N(e.elementId?19:-1)}}function D3(e,t){if(e&1&&(L(0,`ol`,28),P(1,E3,20,9,`li`,34,c3),R()),e&2){let e=G(2);k(),F(e.shown())}}function O3(e,t){if(e&1&&(L(0,`div`)(1,`dt`),J(2),R(),L(3,`dd`),J(4),R()()),e&2){let e=t.$implicit;k(2),Y(e.label),k(2),Y(e.value)}}function k3(e,t){if(e&1&&(L(0,`li`)(1,`strong`),J(2),R(),J(3),R()),e&2){let e=t.$implicit,n=G(3);k(2),Y(n.areaLabel[e.area]),k(),X(` `,e.state===`off`?`Its inspector is turned off.`:e.note??`Nothing to read yet.`,` `)}}function A3(e,t){if(e&1&&(L(0,`section`,32)(1,`h2`,45),J(2,`Not checked`),R(),L(3,`ul`,46),P(4,k3,4,2,`li`,null,l3),R()()),e&2){let e=G(2);k(4),F(e.coverage())}}function j3(e,t){if(e&1){let e=H();L(0,`p`,5),J(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 `),L(2,`code`),J(3,`audit`),R(),J(4,` tool. `),R(),L(5,`div`,6)(6,`div`,7),D(),L(7,`svg`,8),z(8,`circle`,9)(9,`path`,10),R(),_s(),L(10,`input`,11,0),U(`input`,function(t){return T(e),E(G().filter.set(t.target.value))})(`keydown.escape`,function(){return T(e),E(G().filter.set(``))}),R()(),L(12,`app-select`,12),U(`valueChange`,function(t){return T(e),E(G().area.set(t??`all`))}),R(),L(13,`app-select`,13),U(`valueChange`,function(t){return T(e),E(G().severity.set(t??`all`))}),R(),M(14,m3,1,2,`app-select`,14),L(15,`span`,15),J(16),R(),L(17,`button`,16),U(`click`,function(){return T(e),E(G().runAxe())}),J(18),R(),L(19,`button`,16),U(`click`,function(){return T(e),E(G().refresh())}),J(20,`Refresh`),R()(),L(21,`p`,17),J(22),R(),M(23,h3,2,1,`p`,18),L(24,`section`,19)(25,`div`,20)(26,`h2`,21),J(27,`Before and after`),R(),L(28,`div`,22)(29,`button`,16),U(`click`,function(){return T(e),E(G().mark(`before`))}),J(30,` Take baseline `),R(),L(31,`button`,16),U(`click`,function(){return T(e),E(G().mark(`after`))}),J(32,` Take after audit `),R(),M(33,g3,2,1,`button`,23),R()(),L(34,`p`,3),J(35),R(),M(36,_3,2,1,`p`,18),M(37,v3,1,1,`app-audit-diff`,24),R(),L(38,`section`,25)(39,`h2`,26),J(40,`Findings`),R(),M(41,y3,2,0,`p`,27)(42,b3,5,0,`div`,27)(43,D3,3,0,`ol`,28),R(),L(44,`section`,29)(45,`h2`,30),J(46,`Key numbers`),R(),L(47,`dl`,31),P(48,O3,5,2,`div`,null,s3),R()(),M(50,A3,6,0,`section`,32)}if(e&2){let e,t,n,r=G();k(10),I(`value`,r.filter()),k(2),I(`options`,r.areaOptions())(`value`,r.area()),k(),I(`options`,r.severityOptions)(`value`,r.severity()),k(),N(r.pageOptions().length>1?14:-1),k(2),Y(r.countText()),k(),I(`disabled`,r.axeRunning()),k(),X(` `,r.axeRunning()?`Running axe…`:`Run axe`,` `),k(),I(`disabled`,r.busy()),k(3),Y(r.axeStatus()),k(),N((e=r.axeError())?23:-1,e),k(6),I(`disabled`,r.busy()),k(2),I(`disabled`,r.busy()||!r.before()),k(2),N(r.before()?33:-1),k(2),Y(r.sessionText()),k(),N((t=r.sessionError())?36:-1,t),k(),N((n=r.diff())?37:-1,n),k(4),N(r.findings().length?r.shown().length?43:42:41),k(7),F(r.numbers()),k(2),N(r.coverage().length?50:-1)}}var M3={error:`danger`,warning:`warn`,info:`accent`},N3={error:0,warning:1,info:2},P3=[`errors`,`hydration`],F3=class e{rpc=$(null);canShowComponent=$(!0);showComponent=Rv();destroyRef=C(Ds);hostPageId=LE();unsubscribe;seq=0;highlighted=!1;time=$O;toolCall=G4;areaLabel=U4;tone=M3;severityOptions=[{value:`all`,label:`All severities`},{value:`error`,label:`Errors`},{value:`warning`,label:`Warnings and errors`}];data=O(null);loaded=O(!1);failed=O(!1);busy=O(!1);axeRunning=O(!1);axeError=O(null);sessionError=O(null);filter=O(``);area=O(`all`);severity=O(`all`);pageId=Fv({source:()=>this.data(),computation:(e,t)=>t?.value&&e?.pages.some(e=>e.pageId===t.value)?t.value:e?.report?.pageId??this.hostPageId??``});staticReport=Q(()=>UE(this.rpc()));report=Q(()=>this.data()?.report??null);findings=Q(()=>this.report()?.findings??[]);before=Q(()=>this.data()?.session?.before??null);after=Q(()=>this.data()?.session?.after??null);diff=Q(()=>this.data()?.session?.diff??null);pageOptions=Q(()=>(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=Q(()=>[{value:`all`,label:`All areas`},...H4.map(e=>({value:e,label:U4[e],hint:String(this.findings().filter(t=>t.area===e).length)}))]);shown=Q(()=>{let e=this.filter().trim().toLowerCase(),t=this.area(),n=this.severity()===`all`?2:N3[this.severity()];return this.findings().filter(r=>(t===`all`||r.area===t)&&N3[r.severity]<=n&&(!e||`${r.subject??``} ${r.rule} ${r.why}`.toLowerCase().includes(e)))});countText=Q(()=>`${this.shown().length} of ${this.findings().length} findings`);numbers=Q(()=>{let e=this.report()?.metrics??{};return W4.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=Q(()=>(this.report()?.sources??[]).filter(e=>e.state!==`ok`));axeStatus=Q(()=>{if(this.axeRunning())return`Running axe on the page…`;let e=this.data()?.axe;return e?`Last axe pass at ${$O(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=Q(()=>{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 ${$O(e.at)} with ${e.findings.length} findings.`;return t?`${n} After audit at ${$O(t.at)} with ${t.findings.length} findings.`:`${n} Make your change, then take an after audit.`});constructor(){mc(()=>{let e=this.rpc();e&&!UE(e)&&Nv(()=>void this.subscribe(e))}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),this.highlight(null)})}isComponentArea(e){return P3.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 VE(e,`get-audit`,{pageId:this.pageId()||void 0});if(t!==this.seq||this.destroyRef.destroyed)return;let r=K4(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 VE(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 VE(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)return;let r=this.pageId(),i=e?.elementId&&r?{pageId:r,id:e.elementId,...t?{reveal:!0}:{}}:null;(i||this.highlighted)&&(this.highlighted=!!i,VE(n,`request-page-highlight`,i).catch(()=>{}))}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`,()=>void this.refresh())}catch{}}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({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`],[1,`search`],[`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`,`search`,`aria-label`,`Filter findings`,`placeholder`,`Filter by component, rule or text`,3,`input`,`keydown.escape`,`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`],[`role`,`status`,1,`count`],[`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&&M(0,u3,5,0,`div`,1)(1,d3,2,0,`p`,1)(2,f3,5,0,`div`,2)(3,p3,5,0,`div`,1)(4,j3,51,20),e&2&&N(t.staticReport()?0:t.loaded()?t.failed()?2:t.report()?4:3:1)},dependencies:[kO,o3],styles:[`[_nghost-%COMP%] {
+}`]})},s3=(e,t)=>t.label,c3=(e,t)=>t.key,l3=(e,t)=>t.area;function u3(e,t){e&1&&(L(0,`div`,1)(1,`p`),J(2,`The audit reads a live page, and a static report has none.`),R(),L(3,`p`,3),J(4,`Open the panel from the server that runs the app to audit it.`),R()())}function d3(e,t){e&1&&(L(0,`p`,1),J(1,`Loading the audit…`),R())}function f3(e,t){if(e&1){let e=H();L(0,`div`,2)(1,`p`),J(2,`Can't read the audit from the devtools server.`),R(),L(3,`button`,4),U(`click`,function(){return T(e),E(G().refresh())}),J(4,`Retry`),R()()}}function p3(e,t){e&1&&(L(0,`div`,1)(1,`p`),J(2,`No page reports live data yet.`),R(),L(3,`p`,3),J(4,` Open the app with the overlay loaded. The audit reads what the other inspectors collect from it. `),R()())}function m3(e,t){if(e&1){let e=H();L(0,`app-select`,33),U(`valueChange`,function(t){return T(e),E(G(2).pickPage(t))}),R()}if(e&2){let e=G(2);I(`options`,e.pageOptions())(`value`,e.pageId())}}function h3(e,t){e&1&&(L(0,`p`,18),J(1),R()),e&2&&(k(),Y(t))}function g3(e,t){if(e&1){let e=H();L(0,`button`,16),U(`click`,function(){return T(e),E(G(2).mark(`clear`))}),J(1,` Clear `),R()}e&2&&I(`disabled`,G(2).busy())}function _3(e,t){e&1&&(L(0,`p`,18),J(1),R()),e&2&&(k(),Y(t))}function v3(e,t){e&1&&z(0,`app-audit-diff`,24),e&2&&I(`diff`,t)}function y3(e,t){e&1&&(L(0,`p`,27),J(1,` No finding on this page. Run axe, or record change detection, to check more. `),R())}function b3(e,t){if(e&1){let e=H();L(0,`div`,27)(1,`p`),J(2,`No finding matches the filters.`),R(),L(3,`button`,4),U(`click`,function(){T(e),G();let t=d_(11);return G().clearFilters(),E(t.focus())}),J(4,` Clear filters `),R()()}}function x3(e,t){if(e&1&&(L(0,`code`,39),J(1),R()),e&2){let e=G().$implicit;k(),Y(e.subject)}}function S3(e,t){if(e&1&&(L(0,`span`,40),J(1),R()),e&2){let e=G().$implicit;j(`aria-label`,e.count+` times`),k(),X(``,e.count,`×`)}}function C3(e,t){if(e&1){let e=H();L(0,`button`,44),U(`focus`,function(){T(e);let t=G(2).$implicit;return E(G(3).highlight(t))})(`blur`,function(){return T(e),E(G(5).highlight(null))})(`click`,function(){T(e);let t=G(2).$implicit,n=G(3);return E(n.showComponent.emit({id:t.elementId,pageId:n.pageId()}))}),J(1,` Show component `),R()}}function w3(e,t){if(e&1){let e=H();L(0,`button`,44),U(`focus`,function(){T(e);let t=G(2).$implicit;return E(G(3).highlight(t))})(`blur`,function(){return T(e),E(G(5).highlight(null))})(`click`,function(){T(e);let t=G(2).$implicit;return E(G(3).highlight(t,!0))}),J(1,` Show in page `),R()}}function T3(e,t){if(e&1&&M(0,C3,2,0,`button`,43)(1,w3,2,0,`button`,43),e&2){let e=G().$implicit;N(+!G(3).isComponentArea(e.area))}}function E3(e,t){if(e&1){let e=H();L(0,`li`,35),U(`mouseenter`,function(){let t=T(e).$implicit;return E(G(3).highlight(t))})(`mouseleave`,function(){return T(e),E(G(3).highlight(null))}),L(1,`div`,36)(2,`span`,37),J(3),R(),L(4,`span`,38),J(5),R(),M(6,x3,2,1,`code`,39),M(7,S3,2,2,`span`,40),R(),L(8,`p`,41),J(9),R(),L(10,`div`,42)(11,`span`,3),J(12,`Rule `),L(13,`code`),J(14),R()(),L(15,`span`,3),J(16,`Agent tool `),L(17,`code`),J(18),R()(),M(19,T3,2,1),R()()}if(e&2){let e=t.$implicit,n=G(3);k(2),j(`data-tone`,n.tone[e.severity]),k(),Y(e.severity),k(2),Y(n.areaLabel[e.area]),k(),N(e.subject?6:-1),k(),N((e.count??1)>1?7:-1),k(2),Y(e.why),k(5),Y(e.rule),k(4),Y(n.toolCall(e)),k(),N(e.elementId&&n.canShowComponent()?19:-1)}}function D3(e,t){if(e&1&&(L(0,`ol`,28),P(1,E3,20,9,`li`,34,c3),R()),e&2){let e=G(2);k(),F(e.shown())}}function O3(e,t){if(e&1&&(L(0,`div`)(1,`dt`),J(2),R(),L(3,`dd`),J(4),R()()),e&2){let e=t.$implicit;k(2),Y(e.label),k(2),Y(e.value)}}function k3(e,t){if(e&1&&(L(0,`li`)(1,`strong`),J(2),R(),J(3),R()),e&2){let e=t.$implicit,n=G(3);k(2),Y(n.areaLabel[e.area]),k(),X(` `,e.state===`off`?`Its inspector is turned off.`:e.note??`Nothing to read yet.`,` `)}}function A3(e,t){if(e&1&&(L(0,`section`,32)(1,`h2`,45),J(2,`Not checked`),R(),L(3,`ul`,46),P(4,k3,4,2,`li`,null,l3),R()()),e&2){let e=G(2);k(4),F(e.coverage())}}function j3(e,t){if(e&1){let e=H();L(0,`p`,5),J(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 `),L(2,`code`),J(3,`audit`),R(),J(4,` tool. `),R(),L(5,`div`,6)(6,`div`,7),D(),L(7,`svg`,8),z(8,`circle`,9)(9,`path`,10),R(),_s(),L(10,`input`,11,0),U(`input`,function(t){return T(e),E(G().filter.set(t.target.value))})(`keydown.escape`,function(){return T(e),E(G().filter.set(``))}),R()(),L(12,`app-select`,12),U(`valueChange`,function(t){return T(e),E(G().area.set(t??`all`))}),R(),L(13,`app-select`,13),U(`valueChange`,function(t){return T(e),E(G().severity.set(t??`all`))}),R(),M(14,m3,1,2,`app-select`,14),L(15,`span`,15),J(16),R(),L(17,`button`,16),U(`click`,function(){return T(e),E(G().runAxe())}),J(18),R(),L(19,`button`,16),U(`click`,function(){return T(e),E(G().refresh())}),J(20,`Refresh`),R()(),L(21,`p`,17),J(22),R(),M(23,h3,2,1,`p`,18),L(24,`section`,19)(25,`div`,20)(26,`h2`,21),J(27,`Before and after`),R(),L(28,`div`,22)(29,`button`,16),U(`click`,function(){return T(e),E(G().mark(`before`))}),J(30,` Take baseline `),R(),L(31,`button`,16),U(`click`,function(){return T(e),E(G().mark(`after`))}),J(32,` Take after audit `),R(),M(33,g3,2,1,`button`,23),R()(),L(34,`p`,3),J(35),R(),M(36,_3,2,1,`p`,18),M(37,v3,1,1,`app-audit-diff`,24),R(),L(38,`section`,25)(39,`h2`,26),J(40,`Findings`),R(),M(41,y3,2,0,`p`,27)(42,b3,5,0,`div`,27)(43,D3,3,0,`ol`,28),R(),L(44,`section`,29)(45,`h2`,30),J(46,`Key numbers`),R(),L(47,`dl`,31),P(48,O3,5,2,`div`,null,s3),R()(),M(50,A3,6,0,`section`,32)}if(e&2){let e,t,n,r=G();k(10),I(`value`,r.filter()),k(2),I(`options`,r.areaOptions())(`value`,r.area()),k(),I(`options`,r.severityOptions)(`value`,r.severity()),k(),N(r.pageOptions().length>1?14:-1),k(2),Y(r.countText()),k(),I(`disabled`,r.axeRunning()),k(),X(` `,r.axeRunning()?`Running axe…`:`Run axe`,` `),k(),I(`disabled`,r.busy()),k(3),Y(r.axeStatus()),k(),N((e=r.axeError())?23:-1,e),k(6),I(`disabled`,r.busy()),k(2),I(`disabled`,r.busy()||!r.before()),k(2),N(r.before()?33:-1),k(2),Y(r.sessionText()),k(),N((t=r.sessionError())?36:-1,t),k(),N((n=r.diff())?37:-1,n),k(4),N(r.findings().length?r.shown().length?43:42:41),k(7),F(r.numbers()),k(2),N(r.coverage().length?50:-1)}}var M3={error:`danger`,warning:`warn`,info:`accent`},N3={error:0,warning:1,info:2},P3=[`errors`,`hydration`],F3=class e{rpc=$(null);canShowComponent=$(!0);showComponent=Rv();destroyRef=C(Ds);hostPageId=LE();unsubscribe;seq=0;highlighted=!1;queued;time=$O;toolCall=G4;areaLabel=U4;tone=M3;severityOptions=[{value:`all`,label:`All severities`},{value:`error`,label:`Errors`},{value:`warning`,label:`Warnings and errors`}];data=O(null);loaded=O(!1);failed=O(!1);busy=O(!1);axeRunning=O(!1);axeError=O(null);sessionError=O(null);filter=O(``);area=O(`all`);severity=O(`all`);pageId=Fv({source:()=>this.data(),computation:(e,t)=>t?.value&&e?.pages.some(e=>e.pageId===t.value)?t.value:e?.report?.pageId??this.hostPageId??``});staticReport=Q(()=>UE(this.rpc()));report=Q(()=>this.data()?.report??null);findings=Q(()=>this.report()?.findings??[]);before=Q(()=>this.data()?.session?.before??null);after=Q(()=>this.data()?.session?.after??null);diff=Q(()=>this.data()?.session?.diff??null);pageOptions=Q(()=>(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=Q(()=>[{value:`all`,label:`All areas`},...H4.map(e=>({value:e,label:U4[e],hint:String(this.findings().filter(t=>t.area===e).length)}))]);shown=Q(()=>{let e=this.filter().trim().toLowerCase(),t=this.area(),n=this.severity()===`all`?2:N3[this.severity()];return this.findings().filter(r=>(t===`all`||r.area===t)&&N3[r.severity]<=n&&(!e||`${r.subject??``} ${r.rule} ${r.why}`.toLowerCase().includes(e)))});countText=Q(()=>`${this.shown().length} of ${this.findings().length} findings`);numbers=Q(()=>{let e=this.report()?.metrics??{};return W4.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=Q(()=>(this.report()?.sources??[]).filter(e=>e.state!==`ok`));axeStatus=Q(()=>{if(this.axeRunning())return`Running axe on the page…`;let e=this.data()?.axe;return e?`Last axe pass at ${$O(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=Q(()=>{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 ${$O(e.at)} with ${e.findings.length} findings.`;return t?`${n} After audit at ${$O(t.at)} with ${t.findings.length} findings.`:`${n} Make your change, then take an after audit.`});constructor(){mc(()=>{let e=this.rpc();e&&!UE(e)&&Nv(()=>void this.subscribe(e))}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),clearTimeout(this.queued),this.highlight(null)})}isComponentArea(e){return P3.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 VE(e,`get-audit`,{pageId:this.pageId()||void 0});if(t!==this.seq||this.destroyRef.destroyed)return;let r=K4(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 VE(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 VE(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,VE(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=A({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`],[1,`search`],[`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`,`search`,`aria-label`,`Filter findings`,`placeholder`,`Filter by component, rule or text`,3,`input`,`keydown.escape`,`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`],[`role`,`status`,1,`count`],[`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&&M(0,u3,5,0,`div`,1)(1,d3,2,0,`p`,1)(2,f3,5,0,`div`,2)(3,p3,5,0,`div`,1)(4,j3,51,20),e&2&&N(t.staticReport()?0:t.loaded()?t.failed()?2:t.report()?4:3:1)},dependencies:[kO,o3],styles:[`[_nghost-%COMP%] {
display: block;
font-size: 13px;
}
diff --git a/extension/ui/index.html b/extension/ui/index.html
index f6f39d7a..2350c894 100644
--- a/extension/ui/index.html
+++ b/extension/ui/index.html
@@ -9,7 +9,7 @@
Pangular Inspector
-
+
From db43e7210e600779c9d956d88f6f8e27cfa9929f Mon Sep 17 00:00:00 2001
From: erKam
Date: Tue, 13 Oct 2026 07:22:18 +0000
Subject: [PATCH 5/5] fix(mcp): replace free-text attribute values in axe
snippets
alt, title, aria-label and name can hold personal text that pattern masking misses, so their values are always replaced.
---
apps/docs/src/content/inspectors/audit.md | 2 +-
.../devtools/src/__tests__/axe-runner.test.ts | 15 +++++++++++++++
packages/devtools/src/axe-runner.ts | 14 +++++++++++++-
3 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/apps/docs/src/content/inspectors/audit.md b/apps/docs/src/content/inspectors/audit.md
index e562f79a..ba150c6e 100644
--- a/apps/docs/src/content/inspectors/audit.md
+++ b/apps/docs/src/content/inspectors/audit.md
@@ -74,7 +74,7 @@ A number shows only when its area could be read. **Not checked** lists the areas
- Leaves out the overlay's own elements: the popup, the change detection flash layer, the hydration outline and the highlight box.
- Skips frames, and reports violations only.
- Reads the DOM and changes nothing in the app.
-- Masks selectors, attributes and axe's summaries, and leaves out text content and `value` attributes.
+- Masks selectors, attributes and axe's summaries, and leaves out text content and `value` attributes. `alt`, `title`, `aria-label` and `name` values are always replaced, since they can hold personal text.
- Names the component whose template holds each element, when the Components inspector is on.
The tab keeps the last pass of each page, and the status line says when it ran. A reload of the page drops its pass, since the elements it names are gone. A page whose overlay has no axe pass, or that takes more than 45 seconds, gets an error that says so.
diff --git a/packages/devtools/src/__tests__/axe-runner.test.ts b/packages/devtools/src/__tests__/axe-runner.test.ts
index edce43c8..97b1ef2b 100644
--- a/packages/devtools/src/__tests__/axe-runner.test.ts
+++ b/packages/devtools/src/__tests__/axe-runner.test.ts
@@ -235,4 +235,19 @@ describe('nodeSnippet', () => {
expect(snippet).not.toContain(JWT);
expect(snippet).not.toContain('Ada');
});
+
+ it('replaces free-text attribute values, which can hold personal data', () => {
+ const el = document.createElement('img');
+ el.setAttribute('alt', 'Photo of Ada Lovelace');
+ el.setAttribute('title', 'Ada');
+ el.setAttribute('aria-label', 'Ada Lovelace');
+ el.setAttribute('name', 'ada-avatar');
+ el.setAttribute('role', 'img');
+ const snippet = nodeSnippet(el);
+ expect(snippet).not.toContain('Ada');
+ expect(snippet).not.toContain('ada-avatar');
+ expect(snippet).toContain('alt="[redacted]"');
+ expect(snippet).toContain('aria-label="[redacted]"');
+ expect(snippet).toContain('role="img"');
+ });
});
diff --git a/packages/devtools/src/axe-runner.ts b/packages/devtools/src/axe-runner.ts
index 2e426e9e..688d6b2d 100644
--- a/packages/devtools/src/axe-runner.ts
+++ b/packages/devtools/src/axe-runner.ts
@@ -2,6 +2,7 @@ import { blockOwnerOf, type BlockOwnerDebugNg } from './block-owner.ts';
import { elementId } from './element-id.ts';
import { POPUP_ROOT_ID } from './panel-frame.ts';
import { redactUrl } from './router.ts';
+import { REDACTED } from './forms-privacy.ts';
import { redactText } from './serialize.ts';
import { clip } from './text.ts';
@@ -47,6 +48,13 @@ const SNIPPET_ATTRIBUTES = [
'aria-expanded',
];
+/**
+ * Attributes that hold text people read, so they can hold personal data
+ * (`aria-label="Ada Lovelace"`) that pattern masking misses. Their values are
+ * always replaced; the rest identify the element and are masked by pattern.
+ */
+const FREE_TEXT_ATTRIBUTES = new Set(['alt', 'title', 'aria-label', 'name']);
+
export type AxeImpact = 'critical' | 'serious' | 'moderate' | 'minor';
/** One element that breaks a rule. */
@@ -177,7 +185,11 @@ export function nodeSnippet(el: Element): string {
for (const name of SNIPPET_ATTRIBUTES) {
const value = el.getAttribute(name);
if (value === null) continue;
- const masked = name === 'href' || name === 'src' ? redactUrl(value) : redactText(value);
+ const masked = FREE_TEXT_ATTRIBUTES.has(name)
+ ? REDACTED
+ : name === 'href' || name === 'src'
+ ? redactUrl(value)
+ : redactText(value);
attributes.push(value === '' ? name : `${name}="${clip(masked, MAX_ATTRIBUTE)}"`);
}
return clip(`<${tag}${attributes.length ? ` ${attributes.join(' ')}` : ''}>`, MAX_HTML);