diff --git a/app/src/__tests__/analog-inspector-pages.test.ts b/app/src/__tests__/analog-inspector-pages.test.ts index f960edf1..f7b2e455 100644 --- a/app/src/__tests__/analog-inspector-pages.test.ts +++ b/app/src/__tests__/analog-inspector-pages.test.ts @@ -148,3 +148,55 @@ describe('Analog open pages', () => { expect(inspector.isOpen(route('/src/app/pages/about.page.ts'))).toBe(false); }); }); + +describe('Analog server calls of the tab', () => { + afterEach(() => { + scopeToPage(null); + document.body.innerHTML = ''; + }); + + const call = (id: number, url: string, pageId?: string) => ({ + id, + at: id, + kind: 'load', + method: 'GET', + url, + status: 200, + ms: 1, + from: 'browser', + ...(pageId ? { pageId } : {}), + }); + const state = { + pages: [page('A', '/a'), page('B', '/b')], + calls: [call(1, '/from-a', 'A'), call(2, '/from-b', 'B'), call(3, '/untagged')], + duplicates: [{ route: '/only-b', ssrAt: 1, browserAt: 2 }], + }; + + it('shows only the panel tab\'s calls until "All tabs" is ticked', async () => { + scopeToPage('A'); + const fixture = await render(client({ state })); + const inspector = fixture.componentInstance; + inspector.view.set('server'); + await settle(fixture); + const root: HTMLElement = fixture.nativeElement; + const urls = () => Array.from(root.querySelectorAll('td.request .url'), (e) => e.textContent); + expect(urls()).toEqual(['/from-a']); + // A warning about a route this tab never called stays hidden. + expect(inspector.duplicates()).toEqual([]); + + const toggle = root.querySelector('[data-testid="analog-all-tabs"]')!; + expect(toggle.parentElement?.textContent).toContain('All tabs (including untagged)'); + toggle.click(); + await settle(fixture); + expect(urls()).toEqual(['/untagged', '/from-b', '/from-a']); + }); + + it('shows every call when no page reports', async () => { + const fixture = await render(client({ state: { calls: state.calls } })); + fixture.componentInstance.view.set('server'); + await settle(fixture); + const root: HTMLElement = fixture.nativeElement; + expect(root.querySelectorAll('td.request .url')).toHaveLength(3); + expect(root.querySelector('[data-testid="analog-all-tabs"]')).toBeNull(); + }); +}); diff --git a/app/src/pages/analog-inspector.ts b/app/src/pages/analog-inspector.ts index d220026e..287299c3 100644 --- a/app/src/pages/analog-inspector.ts +++ b/app/src/pages/analog-inspector.ts @@ -80,6 +80,8 @@ interface AnalogCall { location?: string; seeded?: boolean; preview?: string; + /** The tab the call came from, when the dev server could tell. */ + pageId?: string; } interface AnalogPage { @@ -356,7 +358,7 @@ function walk(routes: AnalogRoute[], depth = 0, out: { route: AnalogRoute; depth
Server calls - {{ allCalls().length }} + {{ tabCalls().length }}
Issues @@ -626,8 +628,19 @@ function walk(routes: AnalogRoute[], depth = 0, out: { route: AnalogRoute; depth /> Failed only + @if (scopePageId()) { + + } {{ matchingCalls().length }} of {{ allCalls().length }}{{ matchingCalls().length }} of {{ tabCalls().length }}
@if (shownCount() < matchingCalls().length || serverFull()) { @@ -720,14 +733,14 @@ function walk(routes: AnalogRoute[], depth = 0, out: { route: AnalogRoute; depth - } @else if (allCalls().length && callFiltered()) { + } @else if (tabCalls().length && callFiltered()) {

No calls match.

@if (callQuery().trim()) { Nothing matches “{{ callQuery().trim() }}” with these filters. } @else { - None of the {{ allCalls().length }} calls fit these filters. + None of the {{ tabCalls().length }} calls fit these filters. }

@@ -739,8 +752,10 @@ function walk(routes: AnalogRoute[], depth = 0, out: { route: AnalogRoute; depth } @else {

- @if (allCalls().length) { + @if (tabCalls().length) { No calls of this kind yet. + } @else if (allCalls().length) { + No calls from this tab yet. } @else { No calls yet. } @@ -748,6 +763,10 @@ function walk(routes: AnalogRoute[], depth = 0, out: { route: AnalogRoute; depth

Navigate in the app to see page renders, load() fetches, form actions, server functions and API calls. + @if (!tabCalls().length && allCalls().length) { + Tick “All tabs (including untagged)” to see the + {{ allCalls().length }} calls from other tabs or tied to no tab. + }

} @@ -2212,7 +2231,18 @@ export class AnalogInspector { } return open; }); + /** Every call the dev server keeps, from every tab. */ readonly allCalls = computed(() => this.state().calls ?? []); + /** The tab the Server view shows by default: the panel's page. */ + readonly scopePageId = computed(() => this.page()?.pageId); + /** Shows the calls of every tab, and those the dev server tied to no tab. */ + readonly allTabs = signal(false); + /** The calls of the panel's tab, or every call with "All tabs" on or no page reporting. */ + readonly tabCalls = computed(() => { + const pageId = this.scopePageId(); + const calls = this.allCalls(); + return this.allTabs() || !pageId ? calls : calls.filter((c) => c.pageId === pageId); + }); readonly maxServerCalls = MAX_SERVER_CALLS; readonly callQuery = signal(''); readonly failedOnly = signal(false); @@ -2224,7 +2254,7 @@ export class AnalogInspector { const kind = this.kind(); const query = this.callQuery().trim().toLowerCase(); const failedOnly = this.failedOnly(); - return this.allCalls().filter( + return this.tabCalls().filter( (c) => (kind === 'all' || c.kind === kind) && (!failedOnly || this.isFailed(c)) && @@ -2249,13 +2279,27 @@ export class AnalogInspector { }); readonly serverFns = computed(() => this.project()?.serverFns ?? []); private readonly fnById = computed(() => new Map(this.serverFns().map((fn) => [fn.id, fn]))); + /** The routes and server functions the shown calls touch, so a warning about another tab stays hidden. */ + private readonly shownRoutes = computed( + () => new Set(this.tabCalls().map((c) => `${c.kind} ${c.route ?? ''}`)), + ); readonly refetchedFns = computed(() => Array.from( - new Set((this.state().refetches ?? []).map((r) => this.fnById().get(r.id)?.name ?? r.id)), + new Set( + (this.state().refetches ?? []) + .filter((r) => this.shownRoutes().has(`fn ${r.id}`)) + .map((r) => this.fnById().get(r.id)?.name ?? r.id), + ), ), ); readonly duplicates = computed(() => - Array.from(new Set((this.state().duplicates ?? []).map((d) => d.route))), + Array.from( + new Set( + (this.state().duplicates ?? []) + .filter((d) => this.shownRoutes().has(`load ${d.route}`)) + .map((d) => d.route), + ), + ), ); readonly modeCounts = computed(() => (['ssr', 'ssg', 'cached', 'client', 'redirect'] as const) @@ -2310,7 +2354,7 @@ export class AnalogInspector { const { errors, warnings } = this.lintCount(); return [ { id: 'routes' as View, label: 'Routes', count: this.pageCount(), tone: '' }, - { id: 'server' as View, label: 'Server', count: this.allCalls().length, tone: '' }, + { id: 'server' as View, label: 'Server', count: this.tabCalls().length, tone: '' }, { id: 'render' as View, label: 'Render', count: this.renderRows().length, tone: '' }, { id: 'content' as View, @@ -2432,8 +2476,8 @@ export class AnalogInspector { kindCount(kind: Kind): number { return kind === 'all' - ? this.allCalls().length - : this.allCalls().filter((c) => c.kind === kind).length; + ? this.tabCalls().length + : this.tabCalls().filter((c) => c.kind === kind).length; } modeLabel(mode: RenderRow['mode']): string { @@ -2450,7 +2494,7 @@ export class AnalogInspector { } fnCalls(id: string): number { - return this.allCalls().filter((c) => c.kind === 'fn' && c.route === id).length; + return this.tabCalls().filter((c) => c.kind === 'fn' && c.route === id).length; } outcomeLabel(outcome: ActionOutcome): string { diff --git a/apps/docs/src/content/agents/tools.md b/apps/docs/src/content/agents/tools.md index 8b4b185e..ab27083e 100644 --- a/apps/docs/src/content/agents/tools.md +++ b/apps/docs/src/content/agents/tools.md @@ -968,10 +968,10 @@ These tools cover *Analog apps. Most read your source. Some also read what the V ### The running page -| Tool | What it answers | Reads | Arguments | -| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ------------------------------------------------------------------ | -| `analog-inspect-page` | The open page: its files (layouts first, then pages in named outlets with the outlet name), the `load()` data it received, server rendering and hydration state, and hydration errors. | page | none | -| `analog-list-server-calls` | Recent page renders, `load()` fetches, form actions (with their outcome), server functions by name and API calls, with status, time and size. Flags a `load()` fetched twice and a seeded server function read called again. | Vite plugin | `kind` (`page`, `load`, `action`, `fn` or `api`), `route`, `limit` | +| Tool | What it answers | Reads | Arguments | +| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `analog-inspect-page` | The open page: its files (layouts first, then pages in named outlets with the outlet name), the `load()` data it received, server rendering and hydration state, and hydration errors. | page | none | +| `analog-list-server-calls` | Recent page renders, `load()` fetches, form actions (with their outcome), server functions by name and API calls, with status, time and size. Flags a `load()` fetched twice and a seeded server function read called again. Each call names its tab when the dev server could tell. | Vite plugin | `kind` (`page`, `load`, `action`, `fn` or `api`), `route`, `limit`, `page` (only that tab's calls; leave it out for every call, untagged ones included) | ### Rendering diff --git a/apps/docs/src/content/inspectors/analog.md b/apps/docs/src/content/inspectors/analog.md index b92fcf30..c3e945a9 100644 --- a/apps/docs/src/content/inspectors/analog.md +++ b/apps/docs/src/content/inspectors/analog.md @@ -56,12 +56,15 @@ Type a URL into **Test a URL** and click **Explain** to see which files render i Page renders (server rendered or client only), `load()` fetches, form actions, server functions and API calls, newest first. Each row shows the status, the time, who called it, and a redacted response preview. -| Control | What it does | -| --------------------------------------- | ------------------------------------------------------------------------------------------------------ | -| Kind filter | Show one kind of call. Each choice counts every call of that kind. | -| **Find a URL, path or function** search | Keeps calls whose URL, route path, server function name or file contains the text. `Escape` clears it. | -| **Failed only** | Keeps calls with a status of 400 or more, no status, or a form action that failed. | -| **Clear calls** | Empties the list on the dev server. The tab says **Calls cleared.** or **Could not clear the calls.** | +| Control | What it does | +| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| Kind filter | Show one kind of call. Each choice counts the tab's calls of that kind, before the search and **Failed only**. | +| **Find a URL, path or function** search | Keeps calls whose URL, route path, server function name or file contains the text. `Escape` clears it. | +| **Failed only** | Keeps calls with a status of 400 or more, no status, or a form action that failed. | +| **All tabs (including untagged)** | Shows the calls of every tab, and calls the dev server could not tie to a tab. Off by default. | +| **Clear calls** | Empties the list on the dev server, for every tab. The tab says **Calls cleared.** or **Could not clear the calls.** | + +The list shows the calls of the tab the panel belongs to (with no page id, the tab that reported last). **All tabs (including untagged)** appears while a page reports. See [Which tab a call belongs to](#which-tab-a-call-belongs-to). The filters combine, and the count next to them reads like **12 of 80**. If nothing matches, click **Clear filters** to reset the search, **Failed only** and the kind. @@ -114,6 +117,18 @@ Checks grouped by rule, each with a fix. The count on the tab adds up errors and +### Which tab a call belongs to + +The dev server ties each call to a tab from the best source it has: + +| Source | Calls it covers | +| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `x-pangular-page` header | Browser `HttpClient` calls, such as `load()` fetches on navigation and server functions. With `providePangularHttp()` or `withPangular()`, a dev build sends the tab's page id on requests to its own origin only. | +| Render id | Page renders, and the `load()` and server function requests a render makes over HTTP. The Vite plugin sends the render an id in `Server-Timing` (`pangular-analog`), and the page reports it. Needs a secure context, such as `localhost`. | +| `Referer` | Other requests, such as form actions sent with `fetch()`, when exactly one open tab shows that path. | + +A call none of these covers stays untagged, and shows only with **All tabs (including untagged)** or in `analog-list-server-calls` without `page`. A tab's calls leave with the tab: when it closes or reloads, or 30 seconds after its last report or heartbeat. + ### Supported layouts - **Single app**: `package.json`, `vite.config.ts` and `src/app/pages` in one folder. The build output is read from `dist/analog/public`. @@ -190,7 +205,7 @@ If an option comes from a variable, a spread (`...`), a template string or a com | `pangular:analog-scan-routes` | `filter` | File routes in match order, with page, layout and server files. | | `pangular:analog-scan-url` | `url` (required) | Which files render a URL, or the closest candidates. | | `pangular:analog-inspect-page` | `page` | The open page: its files, `load()` data, rendering and hydration state. | -| `pangular:analog-list-server-calls` | `kind`, `route`, `limit` | Recent server calls, with server function names and action outcomes. | +| `pangular:analog-list-server-calls` | `kind`, `route`, `limit`, `page` | Recent server calls, with server function names and action outcomes. | | `pangular:analog-scan-api-routes` | | Server routes with method, URL and file, plus middleware. | | `pangular:analog-scan-server-functions` | | Server functions with name, method, file, id and call counts. | | `pangular:analog-run-api` | `path` (required), `method`, `body`, `confirm` | Sends a real request to the dev server. | @@ -213,7 +228,7 @@ Response previews and `load()` data redact secret-looking keys, tokens, `Bearer` ### Call history size -The server keeps the last 200 calls, and the **Server** tab renders the newest 150 that match its filters. The server cuts previews to 1000 characters, and page renders have no preview. +The server keeps the last 200 calls of all tabs, and the **Server** tab renders the newest 150 that match its filters. The server cuts previews to 1000 characters, and page renders have no preview. ## FAQ diff --git a/extension/ui/assets/browser-agent-rpc-KH4HHvHf-COs_cJTU.js b/extension/ui/assets/browser-agent-rpc-KH4HHvHf-CD3-sSAR.js similarity index 95% rename from extension/ui/assets/browser-agent-rpc-KH4HHvHf-COs_cJTU.js rename to extension/ui/assets/browser-agent-rpc-KH4HHvHf-CD3-sSAR.js index 14a201d1..aeb451dc 100644 --- a/extension/ui/assets/browser-agent-rpc-KH4HHvHf-COs_cJTU.js +++ b/extension/ui/assets/browser-agent-rpc-KH4HHvHf-CD3-sSAR.js @@ -1 +1 @@ -import{t as e}from"./index-DgHF7ahC.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(){let e=typeof document>`u`?void 0:document;return{url:e?.location?.href??``,title:e?.title??``,visible:!e||e.visibilityState===`visible`,focused:e?.hasFocus()??!0}}function u(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a,l()).catch(()=>{}))}))},s=a(o),u=e.events.on(`connection:status`,e=>{e===`connected`&&o()}),d=typeof window>`u`?void 0:window;return d?.addEventListener(`focus`,o),d?.addEventListener(`blur`,o),d?.document.addEventListener(`visibilitychange`,o),o(),()=>{n=!0,s(),u(),d?.removeEventListener(`focus`,o),d?.removeEventListener(`blur`,o),d?.document.removeEventListener(`visibilitychange`,o)}}export{u as setupBrowserAgentRpcBridge}; \ No newline at end of file +import{t as e}from"./index-g9zn2eza.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(){let e=typeof document>`u`?void 0:document;return{url:e?.location?.href??``,title:e?.title??``,visible:!e||e.visibilityState===`visible`,focused:e?.hasFocus()??!0}}function u(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a,l()).catch(()=>{}))}))},s=a(o),u=e.events.on(`connection:status`,e=>{e===`connected`&&o()}),d=typeof window>`u`?void 0:window;return d?.addEventListener(`focus`,o),d?.addEventListener(`blur`,o),d?.document.addEventListener(`visibilitychange`,o),o(),()=>{n=!0,s(),u(),d?.removeEventListener(`focus`,o),d?.removeEventListener(`blur`,o),d?.document.removeEventListener(`visibilitychange`,o)}}export{u as setupBrowserAgentRpcBridge}; \ No newline at end of file diff --git a/extension/ui/assets/index-DgHF7ahC.js b/extension/ui/assets/index-g9zn2eza.js similarity index 88% rename from extension/ui/assets/index-DgHF7ahC.js rename to extension/ui/assets/index-g9zn2eza.js index 2628d86c..b396cf55 100644 --- a/extension/ui/assets/index-DgHF7ahC.js +++ b/extension/ui/assets/index-g9zn2eza.js @@ -5,7 +5,7 @@ `):``,this.name=`UnsubscriptionError`,this.errors=t}});function dr(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var fr=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=nr(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(cr(c))try{c()}catch(e){i=e instanceof ur?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=nr(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{hr(f)}catch(e){i??=[],e instanceof ur?i=ir(ir([],rr(i)),rr(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 ur(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)hr(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)&&dr(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&dr(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),pr=fr.EMPTY;function mr(e){return e instanceof fr||e&&`closed`in e&&cr(e.remove)&&cr(e.add)&&cr(e.unsubscribe)}function hr(e){cr(e)?e():e.unsubscribe()}var gr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},_r={setTimeout:function(e,t){var n=[...arguments].slice(2),r=_r.delegate;return r?.setTimeout?r.setTimeout.apply(r,ir([e,t],rr(n))):setTimeout.apply(void 0,ir([e,t],rr(n)))},clearTimeout:function(e){return(_r.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function vr(e){_r.setTimeout(function(){var t=gr.onUnhandledError;if(t)t(e);else throw e})}function yr(){}var br=(function(){return Cr(`C`,void 0,void 0)})();function xr(e){return Cr(`E`,void 0,e)}function Sr(e){return Cr(`N`,e,void 0)}function Cr(e,t,n){return{kind:e,value:t,error:n}}var wr=null;function Tr(e){if(gr.useDeprecatedSynchronousErrorHandling){var t=!wr;if(t&&(wr={errorThrown:!1,error:null}),e(),t){var n=wr,r=n.errorThrown,i=n.error;if(wr=null,r)throw i}}else e()}function Er(e){gr.useDeprecatedSynchronousErrorHandling&&wr&&(wr.errorThrown=!0,wr.error=e)}var Dr=function(e){$n(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,mr(t)&&t.add(n)):n.destination=Fr,n}return t.create=function(e,t,n){return new jr(e,t,n)},t.prototype.next=function(e){this.isStopped?Pr(Sr(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?Pr(xr(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?Pr(br,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}(fr),Or=Function.prototype.bind;function kr(e,t){return Or.call(e,t)}var Ar=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){Mr(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Mr(e)}else Mr(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Mr(e)}},e}(),jr=function(e){$n(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(cr(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&gr.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&kr(t.next,o),error:t.error&&kr(t.error,o),complete:t.complete&&kr(t.complete,o)}):a=t}return i.destination=new Ar(a),i}return t}(Dr);function Mr(e){gr.useDeprecatedSynchronousErrorHandling?Er(e):vr(e)}function Nr(e){throw e}function Pr(e,t){var n=gr.onStoppedNotification;n&&_r.setTimeout(function(){return n(e,t)})}var Fr={closed:!0,next:yr,error:Nr,complete:yr},Ir=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function Lr(e){return e}function Rr(e){return e.length===0?Lr:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var zr=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=Hr(e)?e:new jr(e,t,n);return Tr(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=Br(t),new t(function(t,r){var i=new jr({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[Ir]=function(){return this},e.prototype.pipe=function(){return Rr([...arguments])(this)},e.prototype.toPromise=function(e){var t=this;return e=Br(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 Br(e){return e??gr.Promise??Promise}function Vr(e){return e&&cr(e.next)&&cr(e.error)&&cr(e.complete)}function Hr(e){return e&&e instanceof Dr||Vr(e)&&mr(e)}function Ur(e){return cr(e?.lift)}function Wr(e){return function(t){if(Ur(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 Gr(e,t,n,r,i){return new Kr(e,t,n,r,i)}var Kr=function(e){$n(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}(Dr),qr=lr(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),Jr=function(e){$n(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 Yr(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;Tr(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=nr(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;Tr(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;Tr(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?pr:(this.currentObservers=null,a.push(e),new fr(function(){t.currentObservers=null,dr(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 zr;return e.source=this,e},t.create=function(e,t){return new Yr(e,t)},t}(zr),Yr=function(e){$n(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)??pr},t}(Jr),Xr=function(e){$n(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}(Jr);function Zr(e){return e[e.length-1]}function Qr(e){return cr(Zr(e))?e.pop():void 0}var $r=(function(e){return e&&typeof e.length==`number`&&typeof e!=`function`});function ei(e){return cr(e?.then)}function ti(e){return cr(e[Ir])}function ni(e){return Symbol.asyncIterator&&cr(e?.[Symbol.asyncIterator])}function ri(e){return TypeError(`You provided `+(typeof e==`object`&&e?`an invalid object`:`'`+e+`'`)+` where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function ii(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}var ai=ii();function oi(e){return cr(e?.[ai])}function si(e){return or(this,arguments,function(){var t,n,r,i;return tr(this,function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,ar(t.read())];case 3:return n=a.sent(),r=n.value,i=n.done,i?[4,ar(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,ar(r)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function ci(e){return cr(e?.getReader)}function li(e){if(e instanceof zr)return e;if(e!=null){if(ti(e))return uee(e);if($r(e))return dee(e);if(ei(e))return fee(e);if(ni(e))return ui(e);if(oi(e))return pee(e);if(ci(e))return mee(e)}throw ri(e)}function uee(e){return new zr(function(t){var n=e[Ir]();if(cr(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}function dee(e){return new zr(function(t){for(var n=0;n=0?n.slice(0,r):n}function Ci(e,t){return e?t?`${e} ${t}`:e:t||``}var wi=bi({__forward_ref__:bi});function Ti(e){return e.__forward_ref__=Ti,e}function Ei(e){return Di(e)?e():e}function Di(e){return typeof e==`function`&&Object.hasOwn(e,wi)&&e.__forward_ref__===Ti}function Oi(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function ki(e){return Ai(e,Ni)}function Ai(e,t){return Object.hasOwn(e,t)&&e[t]||null}function ji(e){return(e?.[Ni]??null)||null}function Mi(e){return e&&Object.hasOwn(e,Pi)?e[Pi]:null}var Ni=bi({ɵprov:bi}),Pi=bi({ɵinj:bi}),Fi=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=Oi({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Ii(e){return e&&!!e.ɵproviders}var Li=bi({ɵcmp:bi}),Ri=bi({ɵdir:bi}),zi=bi({ɵpipe:bi}),Bi=bi({ɵfac:bi}),Vi=bi({__NG_ELEMENT_ID__:bi}),Hi=bi({__NG_ENV_ID__:bi});function Ui(e){return Ki(e,`@Component`),e[Li]||null}function Wi(e){return Ki(e,`@Directive`),e[Ri]||null}function Gi(e){return Ki(e,`@Pipe`),e[zi]||null}function Ki(e,t){if(e==null)throw new _i(-919,!1)}function qi(e){return typeof e==`string`?e:e==null?``:String(e)}var Ji=bi({ngErrorCode:bi}),Yi=bi({ngErrorMessage:bi}),Xi=bi({ngTokenPath:bi});function Zi(e,t){return $i(``,-200,t)}function Qi(e,t){throw new _i(-201,!1)}function $i(e,t,n){let r=new _i(t,e);return r[Ji]=t,r[Yi]=e,n&&(r[Xi]=n),r}function ea(e){return e[Ji]}var ta;function na(){return ta}function ra(e){let t=ta;return ta=e,t}function ia(e,t,n){let r=ki(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;Qi(e,``)}var aa=globalThis,oa={},sa=`__NG_DI_FLAG__`,ca=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=da(t)||0;try{return this.injector.get(e,n&8?null:oa,n)}catch(e){if(Kn(e))return e;throw e}}};function la(e,t=0){let n=Un();if(n===void 0)throw new _i(-203,!1);if(n===null)return ia(e,void 0,t);{let r=fa(t),i=n.retrieve(e,r);if(Kn(i)){if(r.optional)return null;throw i}return i}}function ua(e,t=0){return(na()||la)(Ei(e),t)}function C(e,t){return ua(e,da(t))}function da(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function fa(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function pa(e){let t=[];for(let n=0;nArray.isArray(e)?va(e,t):t(e))}function ya(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function ba(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function xa(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 Ca(e,t,n){let r=Ta(e,t);return r>=0?e[r|1]=n:(r=~r,Sa(e,r,t,n)),r}function wa(e,t){let n=Ta(e,t);if(n>=0)return e[n|1]}function Ta(e,t){return Ea(e,t,1)}function Ea(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 va(t,e=>{let t=e;Ia(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&Fa(i,a),n}function Fa(e,t){for(let n=0;n{t(e,r)})}}function Ia(e,t,n,r){if(e=Ei(e),!e)return!1;let i=null,a=Mi(e),o=!a&&Ui(e);if(!a&&!o){let t=e.ngModule;if(a=Mi(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)Ia(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{va(a.imports,i=>{Ia(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&Fa(e,t)}if(!s){let e=ha(i)||(()=>new i);t({provide:i,useFactory:e,deps:Oa},i),t({provide:ja,useValue:i,multi:!0},i),t({provide:ka,useValue:()=>ua(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;La(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function La(e,t){for(let n of e)Ii(n)&&(n=n.ɵproviders),Array.isArray(n)?La(n,t):t(n)}var Ra=bi({provide:String,useValue:bi});function za(e){return typeof e==`object`&&!!e&&Ra in e}function Ba(e){return!!(e&&e.useExisting)}function Va(e){return!!(e&&e.useFactory)}function Ha(e){return typeof e==`function`}function Ua(e){return!!e.useClass}var Wa=new Fi(``),Ga={},Ka={},qa=void 0;function Ja(){return qa===void 0&&(qa=new Ma),qa}var Ya=class{},Xa=class extends Ya{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,oo(e,e=>this.processProvider(e)),this.records.set(Aa,no(void 0,this)),r.has(`environment`)&&this.records.set(Ya,no(void 0,this));let i=this.records.get(Wa);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(ja,Oa,{self:!0}))}retrieve(e,t){let n=da(t)||0;try{return this.get(e,oa,n)}catch(e){if(Kn(e))return e;throw e}}destroy(){to(this),this._destroyed=!0;let e=nn(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(),nn(e)}}onDestroy(e){return to(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){to(this);let t=Wn(this),n=ra(void 0);try{return e()}finally{Wn(t),ra(n)}}get(e,t=oa,n){if(to(this),Object.hasOwn(e,Hi))return e[Hi](this);let r=da(n),i=Wn(this),a=ra(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=ao(e)&&ki(e);t=n&&this.injectableDefInScope(n)?no(Za(e),Ga):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?Ja():this.parent;return t=r&8&&t===oa?null:t,n.get(e,t)}catch(e){let t=ea(e);throw t===-200||t===-201?new _i(t,null):e}finally{ra(a),Wn(i)}}resolveInjectorInitializers(){let e=nn(null),t=Wn(this),n=ra(void 0);try{let e=this.get(ka,Oa,{self:!0});for(let t of e)t()}finally{Wn(t),ra(n),nn(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=Ei(e);let t=Ha(e)?e:Ei(e&&e.provide),n=$a(e);if(!Ha(e)&&e.multi===!0){let n=this.records.get(t);n||(n=no(void 0,Ga,!0),n.factory=()=>pa(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=nn(null);try{if(t.value===Ka)throw Zi(``);return t.value===Ga&&(t.value=Ka,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&io(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{nn(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=Ei(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 Za(e){let t=ki(e),n=t===null?ha(e):t.factory;if(n!==null)return n;if(e instanceof Fi)throw new _i(-204,!1);if(e instanceof Function)return Qa(e);throw new _i(-204,!1)}function Qa(e){if(e.length>0)throw new _i(-204,!1);let t=ji(e);return t===null?()=>new e:()=>t.factory(e)}function $a(e){return za(e)?no(void 0,e.useValue):no(eo(e),Ga)}function eo(e,t,n){let r;if(Ha(e)){let t=Ei(e);return ha(t)||Za(t)}if(za(e))r=()=>Ei(e.useValue);else if(Va(e))r=()=>e.useFactory(...pa(e.deps||[]));else if(Ba(e))r=(t,n)=>ua(Ei(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=Ei(e&&(e.useClass||e.provide));if(ro(e))r=()=>new t(...pa(e.deps));else return ha(t)||Za(t)}return r}function to(e){if(e.destroyed)throw new _i(-205,!1)}function no(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function ro(e){return!!e.deps}function io(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function ao(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function oo(e,t){for(let n of e)Array.isArray(n)?oo(n,t):n&&Ii(n)?oo(n.ɵproviders,t):t(n)}function so(e,t){let n;e instanceof Xa?(to(e),n=e):n=new ca(e);let r=Wn(n),i=ra(void 0);try{return t()}finally{Wn(r),ra(i)}}function co(){return na()!==void 0||Un()!=null}var lo=1;function uo(e){return Array.isArray(e)&&typeof e[lo]==`object`}function fo(e){return Array.isArray(e)&&e[lo]===!0}function po(e){return!!(e.flags&4)}function mo(e){return e.componentOffset>-1}function ho(e){return(e.flags&1)==1}function go(e){return!!e.template}function _o(e){return!!(e[2]&512)}function vo(e){return(e[2]&256)==256}var yo=(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})(yo||{}),bo=`math`;function xo(e){for(;Array.isArray(e);)e=e[0];return e}function So(e,t){return xo(t[e])}function Co(e,t){return xo(t[e.index])}function wo(e,t){return e.data[t]}function To(e,t){return e[t]}function Eo(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function Do(e,t){let n=t[e];return uo(n)?n:n[0]}function Oo(e){return(e[2]&128)==128}function Pee(e){return fo(e[3])}function ko(e,t){return t==null?null:e[t]}function Ao(e){e[17]=0}function jo(e){e[2]&1024||(e[2]|=1024,Oo(e)&&Po(e))}function Fee(e,t){for(;e>0;)t=t[14],e--;return t}function Mo(e){return!!(e[2]&9216||e[24]?.dirty)}function No(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),Mo(e)&&Po(e)}function Po(e){e[10].changeDetectionScheduler?.notify(0);let t=Io(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!Oo(t)));)t=Io(t)}function Fo(e,t){if(vo(e))throw new _i(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function Iee(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function Io(e){let t=e[3];return fo(t)?t[3]:t}function Lo(e){return e[7]??=[]}function Ro(e){return e.cleanup??=[]}function Lee(e,t,n,r){let i=Lo(t);i.push(n),e.firstCreatePass&&Ro(e).push(r,i.length-1)}var zo={lFrame:fs(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Bo=!1;function Ree(){return zo.lFrame.elementDepthCount}function zee(){zo.lFrame.elementDepthCount++}function Vo(){zo.lFrame.elementDepthCount--}function Ho(){return zo.bindingsEnabled}function Uo(){return zo.skipHydrationRootTNode!==null}function Wo(e){return zo.skipHydrationRootTNode===e}function Go(){zo.skipHydrationRootTNode=null}function Ko(){return zo.lFrame.lView}function qo(){return zo.lFrame.tView}function w(e){return zo.lFrame.contextLView=e,e[8]}function T(e){return zo.lFrame.contextLView=null,e}function Jo(){let e=Yo();for(;e!==null&&e.type===64;)e=e.parent;return e}function Yo(){return zo.lFrame.currentTNode}function Bee(){let e=zo.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Xo(e,t){let n=zo.lFrame;n.currentTNode=e,n.isParent=t}function Zo(){return zo.lFrame.isParent}function Qo(){zo.lFrame.isParent=!1}function $o(){return zo.lFrame.contextLView}function es(){return Bo}function ts(e){let t=Bo;return Bo=e,t}function ns(){let e=zo.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function rs(){return zo.lFrame.bindingIndex}function Vee(e){return zo.lFrame.bindingIndex=e}function is(){return zo.lFrame.bindingIndex++}function as(e){let t=zo.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function Hee(){return zo.lFrame.inI18n}function Uee(e,t){let n=zo.lFrame;n.bindingIndex=n.bindingRootIndex=e,os(t)}function Wee(){return zo.lFrame.currentDirectiveIndex}function os(e){zo.lFrame.currentDirectiveIndex=e}function Gee(e){let t=zo.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function Kee(){return zo.lFrame.currentQueryIndex}function ss(e){zo.lFrame.currentQueryIndex=e}function cs(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function ls(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=cs(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=zo.lFrame=ds();return r.currentTNode=t,r.lView=e,!0}function us(e){let t=ds(),n=e[1];zo.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function ds(){let e=zo.lFrame,t=e===null?null:e.child;return t===null?fs(e):t}function fs(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 ps(){let e=zo.lFrame;return zo.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var ms=ps;function hs(){let e=ps();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 gs(e){return(zo.lFrame.contextLView=Fee(e,zo.lFrame.contextLView))[8]}function _s(){return zo.lFrame.selectedIndex}function vs(e){zo.lFrame.selectedIndex=e}function ys(){let e=zo.lFrame;return wo(e.tView,e.selectedIndex)}function E(){zo.lFrame.currentNamespace=`svg`}function bs(){xs()}function xs(){zo.lFrame.currentNamespace=null}function Ss(){return zo.lFrame.currentNamespace}var Cs=!0;function ws(){return Cs}function Ts(e){Cs=e}function Es(e,t=null,n=null,r){let i=Ds(e,t,n,r);return i.resolveInjectorInitializers(),i}function Ds(e,t=null,n=null,r,i=new Set){return new Xa([n||Oa,Na(e)],t||Ja(),null,i)}var Os=class e{static THROW_IF_NOT_FOUND=oa;static NULL=new Ma;static create(e,t){if(Array.isArray(e))return Es({name:``},t,e,``);{let t=e.name??``;return Es({name:t},e.parent,e.providers,t)}}static ɵprov=Oi({token:e,providedIn:`any`,factory:()=>ua(Aa)});static __NG_ELEMENT_ID__=-1},ks=new Fi(``),As=class{static __NG_ELEMENT_ID__=Ms;static __NG_ENV_ID__=e=>e},js=class extends As{_lView;constructor(e){super(),this._lView=e}get destroyed(){return vo(this._lView)}onDestroy(e){let t=this._lView;return Fo(t,e),()=>Iee(t,e)}};function Ms(){return new js(Ko())}var Ns=new Fi(``),Ps=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Xr(!1);debugTaskTracker=C(Ns,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new zr(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=Oi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Fs=class extends Jr{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,co()&&(this.destroyRef=C(As,{optional:!0})??void 0,this.pendingTasks=C(Ps,{optional:!0})??void 0)}emit(e){let t=nn(null);try{super.next(e)}finally{nn(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 fr&&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 Is(...e){}function Ls(e){let t,n;function r(){e=Is;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 Rs(e){return queueMicrotask(()=>e()),()=>{e=Is}}var zs=`isAngularZone`,Bs=`isAngularZone_ID`,Vs=0,Hs=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Fs(!1);onMicrotaskEmpty=new Fs(!1);onStable=new Fs(!1);onError=new Fs(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new _i(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,Ks(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(zs)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new _i(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new _i(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,Us,Is,Is);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)}},Us={};function Ws(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 Gs(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Ls(()=>{e.callbackScheduled=!1,qs(e),e.isCheckStableRunning=!0,Ws(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),qs(e)}function Ks(e){let t=()=>{Gs(e)},n=Vs++;e._inner=e._inner.fork({name:`angular`,properties:{[zs]:!0,[Bs]:n,[Bs+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(Zs(s))return n.invokeTask(i,a,o,s);try{return Js(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),Ys(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return Js(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!Qs(s)&&t(),Ys(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,qs(e),Ws(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 qs(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function Js(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Ys(e){e._nesting--,Ws(e)}var Xs=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Fs;onMicrotaskEmpty=new Fs;onStable=new Fs;onError=new Fs;run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function Zs(e){return $s(e,`__ignore_ng_zone__`)}function Qs(e){return $s(e,`__scheduler_tick__`)}function $s(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var ec=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},tc=new Fi(``,{factory:()=>{let e=C(Hs),t=C(Ya),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(ec),n.handleError(r))})}}}),nc={provide:ka,useValue:()=>{C(ec,{optional:!0})},multi:!0};function D(e,t){let[n,r,i]=Pn(e,t?.equal),a=n;return a[tn],a.set=r,a.update=i,a.asReadonly=rc.bind(a),a}function rc(){let e=this[tn];if(e.readonlyFn===void 0){let t=()=>this();t[tn]=e,e.readonlyFn=t}return e.readonlyFn}var ic=new Fi(``,{factory:()=>ac}),ac=`ng`,oc=new Fi(``),sc=new Fi(``,{providedIn:`platform`,factory:()=>`unknown`}),cc=new Fi(``,{factory:()=>C(ks).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),lc=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=uc}return e})();function uc(){return new lc(Ko(),Jo())}var dc=class{},fc=new Fi(``,{factory:()=>!0}),pc=new Fi(``),mc=(()=>{class e{static ɵprov=Oi({token:e,providedIn:`root`,factory:()=>new hc})}return e})(),hc=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}},gc=class{[tn];constructor(e){this[tn]=e}destroy(){this[tn].destroy()}};function _c(e,t){let n=t?.injector??C(Os),r=t?.manualCleanup===!0?null:n.get(As),i,a=n.get(lc,null,{optional:!0}),o=n.get(dc);return a===null?i=Sc(e,n.get(mc),o):(i=xc(a.view,o,e),r instanceof js&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new gc(i)}var vc={...Bn,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=ts(!1);try{Vn(this)}finally{ts(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=nn(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],nn(e)}}},yc={...vc,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(vn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},bc={...vc,consumerMarkedDirty(){this.view[2]|=8192,Po(this.view),this.notifier.notify(13)},destroy(){if(vn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[23]?.delete(this)}};function xc(e,t,n){let r=Object.create(bc);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=Cc(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function Sc(e,t,n){let r=Object.create(yc);return r.fn=Cc(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 Cc(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}function wc(e){return typeof e==`function`&&e[tn]!==void 0}function Tc(e){return wc(e)&&typeof e.set==`function`}var Ec=Symbol(`InputSignalNode#UNSET`),Dc={...Rn,transformFn:void 0,applyValueToInputSignal(e,t){In(e,t)}};function Oc(e){return{toString:e}.toString()}var kc=(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})(kc||{}),Ac=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function jc(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var Mc=null,Nc=(()=>{Mc=Fc;let e=()=>Fc;return e.ngInherit=!0,e})();function Pc(){return Mc}function Fc(e){return e.type.prototype.ngOnChanges&&(e.setInput=Lc),Ic}function Ic(){let e=zc(this),t=e?.current;if(t){let n=e.previous;if(n===Da)e.previous=t;else for(let e in t)n[e]=t[e];e.current=null,this.ngOnChanges(t)}}function Lc(e,t,n,r,i){let a=this.declaredInputs[r],o=zc(e)||Bc(e,{previous:Da,current:null}),s=o.current||={},c=o.previous,l=c[a];s[a]=new Ac(l&&l.currentValue,n,c===Da),jc(e,t,i,n)}var Rc=`__ngSimpleChanges__`;function zc(e){return Object.hasOwn(e,Rc)&&e[Rc]||null}function Bc(e,t){return e[Rc]=t}var Vc=[],Hc=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,Yc(o,a)):Yc(o,a)}var Zc=-1,Qc=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 $c(e){return!!(e.flags&8)}function el(e){return!!(e.flags&16)}function tl(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function ll(e,t){let n=cl(e),r=t;for(;n>0;)r=r[14],n--;return r}var ul=!0;function dl(e){let t=ul;return ul=e,t}var fl=255,pl=5,ml=0,hl={};function gl(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,Vi)&&(r=n[Vi]),r??=n[Vi]=ml++;let i=r&fl,a=1<>pl)]|=a}function _l(e,t){let n=yl(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,vl(r.data,e),vl(t,null),vl(r.blueprint,null));let i=bl(e,t),a=e.injectorIndex;if(ol(i)){let e=sl(i),n=ll(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 vl(e,t){e.push(0,0,0,0,0,0,0,0,t)}function yl(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function bl(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=Ll(i),r===null)return Zc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return Zc}function xl(e,t,n){gl(e,t,n)}function Sl(e,t,n){if(n&8||e!==void 0)return e;Qi(t,`NodeInjector`)}function Cl(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=ra(void 0);try{return i?i.get(t,r,n&8):ia(t,r,n&8)}finally{ra(a)}}return Sl(r,t,n)}function wl(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=Il(e,t,n,r,hl);if(i!==hl)return i}let i=Tl(e,t,n,r,hl);if(i!==hl)return i}return Cl(t,n,r,i)}function Tl(e,t,n,r,i){let a=kl(n);if(typeof a==`function`){if(!ls(t,e,r))return r&1?Sl(i,n,r):Cl(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))Qi(n);else return e}finally{ms()}}else if(typeof a==`number`){let i=null,o=yl(e,t),s=Zc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?bl(e,t):t[o+8],s===Zc||!jl(r,!1)?o=-1:(i=t[1],o=sl(s),t=ll(s,t)));o!==-1;){let e=t[1];if(Al(a,o,e.data)){let e=El(o,t,n,i,r,c);if(e!==hl)return e}s=t[o+8],s!==Zc&&jl(r,t[1].data[o+8]===c)&&Al(a,o,t)?(i=e,o=sl(s),t=ll(s,t)):o=-1}}return i}function El(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=Dl(s,o,n,r==null?mo(s)&&ul:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?hl:Ol(t,o,c,s,i)}function Dl(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&&go(e)&&e.type===n)return c}return null}function Ol(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof Qc){let s=a;if(s.resolving)throw Zi(``);let c=dl(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?ra(s.injectImpl):null;ls(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&Uc(n,o[n],t)}finally{l!==null&&ra(l),dl(c),s.resolving=!1,ms()}}return a}function kl(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,Vi)?e[Vi]:void 0;return typeof t==`number`?t>=0?t&fl:Nl:t}function Al(e,t,n){let r=1<>pl)]&r)}function jl(e,t){return!(e&2)&&!(e&1&&t)}var Ml=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return wl(this._tNode,this._lView,e,da(n),t)}};function Nl(){return new Ml(Jo(),Ko())}function Pl(e){return Oc(()=>{let t=e.prototype.constructor,n=t[Bi]||Fl(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let e=i[Bi]||Fl(i);if(e&&e!==n)return e;i=Object.getPrototypeOf(i)}return e=>new e})}function Fl(e){return Di(e)?()=>{let t=Fl(Ei(e));return t&&t()}:ha(e)}function Il(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!_o(o);){let e=Tl(a,o,n,r|2,hl);if(e!==hl)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,hl,r);if(t!==hl)return t}t=Ll(o),o=o[14]}a=t}return i}function Ll(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}function Rl(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function zl(){return Bl(Jo(),Ko())}function Bl(e,t){return new Vl(Co(e,t))}var Vl=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=zl}return e})();function Hl(e){return e instanceof Vl?e.nativeElement:e}function Ul(){return this._results[Symbol.iterator]()}var Wl=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 Jr}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=_a(e);(this._changesDetected=!ga(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]=Ul};function Gl(e){return(e.flags&128)==128}var Kl=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Kl||{}),ql=new Map,Jl=0;function Yl(){return Jl++}function Xl(e){ql.set(e[19],e)}function Zl(e){ql.delete(e[19])}var Ql=`__ngContext__`;function $l(e,t){uo(t)?(e[Ql]=t[19],Xl(t)):e[Ql]=t}function eu(e){return nu(e[12])}function tu(e){return nu(e[4])}function nu(e){for(;e!==null&&!fo(e);)e=e[4];return e}var ru=void 0;function iu(e){ru=e}function au(){if(ru!==void 0)return ru;if(typeof document<`u`)return document;throw new _i(210,!1)}var ou=!1,su=new Fi(``,{factory:()=>ou}),cu=new WeakMap;function lu(e,t){if(typeof e!=`object`||!e)return;let n=cu.get(e);n||(n=new WeakSet,cu.set(e,n)),n.add(t)}function uu(e){return(e.flags&32)==32}var du=()=>null;function fu(e,t,n=!1){return du(e,t,n)}function pu(e,t){let n=e.contentQueries;if(n!==null){let r=nn(null);try{for(let r=0;r|^->||--!>|)/g,Yee=`​$1​`;function Xee(e){return e.replace(qee,e=>e.replace(Jee,Yee))}function Zee(e,t){return e.createText(t)}function Qee(e,t,n){e.setValue(t,n)}function $ee(e,t){return e.createComment(Xee(t))}function Cu(e,t,n){return e.createElement(t,n)}function wu(e,t,n,r,i){e.insertBefore(t,n,r,i)}function Tu(e,t,n){e.appendChild(t,n)}function Eu(e,t,n,r,i){r===null?Tu(e,t,n):wu(e,t,n,r,i)}function Du(e,t,n,r){e.removeChild(null,t,n,r)}function ete(e,t,n){e.setAttribute(t,`style`,n)}function tte(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function Ou(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&tl(e,t,r),i!==null&&tte(e,t,i),a!==null&&ete(e,t,a)}function ku(e){let t=nte();return t?t.sanitize(yo.URL,e)||``:yu(e,`URL`)?vu(e):Su(qi(e))}function nte(){let e=Ko();return e&&e[10].sanitizer}function Au(e){return e.ownerDocument.defaultView}function ju(e){return e.ownerDocument}function rte(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 Mu=`ng-template`;function ite(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(Pu(r))return!1;o=!0}}}}}return Pu(r)||o}function Pu(e){return!(e&1)}function ste(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!==``&&!Pu(o)&&(t+=Iu(a,i),i=``),r=o,a||=!Pu(r);n++}return i!==``&&(t+=Iu(a,i)),t}function pte(e){return e.map(fte).join(`,`)}function mte(e){let t=[],n=[],r=1,i=2;for(;r!1});function Bu(e){if(!e)return 0;let t=e.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(e)*t}function Vu(e,t){return e.getPropertyValue(t).split(`,`).map(e=>e.trim())}function _te(e){let t=Vu(e,`transition-property`),n=Vu(e,`transition-duration`),r=Vu(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 vte(e){let t=Vu(e,`animation-name`),n=Vu(e,`animation-delay`),r=Vu(e,`animation-duration`),i=Vu(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 Hu(e,t){return e!==void 0&&e.duration>t.duration}function Uu(e){return(e.animationName!=null||e.propertyName!=null)&&e.duration>0}function Wu(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 yte(e,t){let n=getComputedStyle(e),r=vte(n),i=_te(n),a=r.duration>i.duration?r:i;Hu(t.get(e),a)||Uu(a)&&t.set(e,a)}function bte(e,t,n){if(!n)return;let r=e.getAnimations();return r.length===0?yte(e,t):xte(e,t,r)}function xte(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=Wu(e)??0,n,i;e.animationName?i=e.animationName:n=e.transitionProperty,t>=r.duration&&(r={animationName:i,propertyName:n,duration:t})}Hu(t.get(e),r)||Uu(r)&&t.set(e,r)}var Gu=new Set,Ste=!1,Cte=1,Ku=typeof document<`u`&&typeof document?.documentElement?.getAnimations==`function`;function wte(e){return e[9].get(gte,Ste)}function Tte(e,t,n){let r=Ju.get(e);if(r){for(let e of t)r.classList.push(e);for(let e of n)r.cleanupFns.push(e)}else Ju.set(e,{classList:t,cleanupFns:n})}function qu(e){let t=Ju.get(e);if(t){for(let e of t.cleanupFns)e();Ju.delete(e)}Yu.delete(e)}var Ju=new WeakMap,Yu=new WeakMap,Xu=new WeakMap;function Zu(e){return e?e[14]??e:null}var Qu=new WeakSet;function Ete(e,t,n){let r=Xu.get(e);if(!r||r.length===0)return;let i=t.parentNode,a=t.previousSibling,o=Zu(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),Qu.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 Dte(e,t,n){let r=Zu(n),i=Xu.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):Xu.set(e,[{el:t,declarationView:r}])}function $u(e){let t=e[26]??={};return t.enter??=new Map}function Ote(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 ed(e){return e.composedPath?e.composedPath()[0]:e.target}function td(e,t){let n=Yu.get(t);if(n===void 0)return!0;if(t!==ed(e))return!1;let r=e.animation;if(r){let e=Wu(r);if(e!==void 0&&e+Cte{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=Oi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),sd=[0,1,2,3],cd=(()=>{class e{ngZone=C(Hs);scheduler=C(dc);errorHandler=C(ec,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){C(rd,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Hc(kc.AfterRenderHooksStart),this.executing=!0;for(let e of sd)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&&Hc(kc.AfterRenderHooksEnd)}register(e){let{view:t}=e;t===void 0?this.executing?this.deferredRegistrations.add(e):this.addSequence(e):((t[25]??=[]).push(e),Po(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(nd.AFTER_NEXT_RENDER,e):e()}static ɵprov=Oi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),ld=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 ud(e,t){let n=t?.injector??C(Os);return ad(`NgAfterNextRender`),jte(e,n,t,!0)}function Ate(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function jte(e,t,n,r){let i=t.get(od);i.impl??=t.get(cd);let a=t.get(rd,null,{optional:!0}),o=n?.manualCleanup===!0?null:t.get(As),s=t.get(lc,null,{optional:!0}),c=new ld(i.impl,Ate(e),s?.view,r,o,a?.snapshot(null));return i.impl.register(c),c}var dd=new Fi(``,{factory:()=>{let e=C(Ya),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function fd(e,t,n){let r=e.get(dd);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 Mte(e,t){let n=e.get(dd);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Nte(e,t){let n=e.get(dd);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function Pte(e){let t=e.get(dd);t.isScheduled||=(ud(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:t.injector}),!0)}function Fte(e){let t=e.get(dd);t.scheduler=Pte,t.scheduler(e)}function pd(e,t){for(let[n,r]of t)fd(e,r.animateFns)}function md(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&pd(r,i)}function hd(e,t,n,r){try{n.get(Aa)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&Mte(n,i.enter.get(t.index).animateFns);let a=gd(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];vd(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&Gu.add(e[19]),fd(n,()=>_d(e,t,i||void 0,a,r),i||void 0)}function gd(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 _d(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&&vd(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),bd(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&Gu.delete(e[19]),i(!0)})}else e&&Gu.delete(e[19]),i(!1)}function vd(e,t,n){if(t.type&12){let r=e[t.index];if(fo(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,Gu.delete(e[19])),n(!0)})}function xd(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;fo(i)?c=i:uo(i)&&(l=!0,i=i[0]);let u=xo(i);e===0&&r!==null?(md(s,r,a,n),o==null?Tu(t,r,u):wu(t,r,u,o||null,!0)):e===1&&r!==null?(md(s,r,a,n),wu(t,r,u,o||null,!0),Ete(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&Dte(a,u,s),Qu.delete(u),hd(s,a,n,e=>{if(Qu.has(u)){Qu.delete(u);return}Du(t,u,l,e)})):e===3&&(Qu.delete(u),hd(s,a,n,()=>{t.destroyNode(u)})),c!=null&&Gd(t,e,n,c,a,r,o)}}function Sd(e,t){wd(e,t),t[0]=null,t[5]=null}function Cd(e,t,n,r,i,a){r[0]=i,r[5]=t,Vd(e,r,n,1,i,a)}function wd(e,t){t[10].changeDetectionScheduler?.notify(9),Vd(e,t,t[11],2,null,null)}function Td(e){let t=e[12];if(!t)return Od(e[1],e);for(;t;){let n=null;if(uo(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)uo(t)&&Od(t[1],t),t=t[3];t===null&&(t=e),uo(t)&&Od(t[1],t),n=t&&t[4]}t=n}}function Ed(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function Dd(e,t){if(vo(t))return;let n=t[11];n.destroyNode&&Vd(e,t,n,3,null,null),Td(t)}function Od(e,t){if(vo(t))return;let n=nn(null);try{t[2]&=-129,t[2]|=256,t[24]&&vn(t[24]),Ad(e,t),kd(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&fo(t[3])){n!==t[3]&&Ed(n,t);let r=t[18];r!==null&&r.detachView(e)}Zl(t)}finally{nn(n)}}function kd(e,t){let n=e.cleanup,r=t[7];if(n!==null)for(let e=0;e=0?r[t]():r[-t].unsubscribe(),e+=2}else{let t=r[n[e+1]];n[e].call(t)}r!==null&&(t[7]=null);let i=t[21];if(i!==null){t[21]=null;for(let e=0;e27&&tf(e,t,27,!1),Hc(o?kc.TemplateUpdateStart:kc.TemplateCreateStart,i,n),n(r,i)}finally{vs(a),Hc(o?kc.TemplateUpdateEnd:kc.TemplateCreateEnd,i,n)}}function of(e,t,n){pf(e,t,n),(n.flags&64)==64&&mf(e,t,n)}function sf(e,t,n=Co){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a=s&&i<=c){let o=t.data[i],s=r[e+1];rf(o,n[i],s,a),l=!0}else if(i>c)break}}return o!==null&&Object.hasOwn(r.inputs,i)&&(rf(r,n[o],i,a),l=!0),l}function Tf(e,t){let n=Do(t,e),r=n[1];Ef(r,n);let i=n[0];i!==null&&n[6]===null&&(n[6]=fu(i,n[9])),Hc(kc.ComponentStart);try{Df(r,n,n[8])}finally{Hc(kc.ComponentEnd,n[8])}}function Ef(e,t){for(let n=t.length;n{Po(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function zf(e){let t=e[24]??Object.create(Bf);return t.lView=e,t}var Bf={...an,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=Io(e.lView);for(;t&&!Vf(t[1]);)t=Io(t);t&&jo(t)},consumerOnSignalRead(){this.lView[24]=this}};function Vf(e){return e.type!==2}function Hf(e){if(e[23]===null)return;let t=!0;for(;t;){let n=!1;for(let t of e[23])if(t.dirty&&(n=!0,t.zone===null||Zone.current===t.zone?t.run():t.zone.run(()=>t.run()),e[23]===null))return;t=n&&!!(e[2]&8192)}}var Uf=100;function Wf(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{Gf(e,t)}finally{n.end?.()}}function Gf(e,t){let n=es();try{ts(!0),Zf(e,t);let n=0;for(;Mo(e);){if(n===Uf)throw new _i(103,!1);n++,Zf(e,1)}}finally{ts(n)}}function Kf(e,t,n,r){if(vo(t))return;let i=t[2];us(t);let a=!0,o=null,s=null;Vf(e)?(s=Ff(t),o=pn(s)):rn()===null?(a=!1,s=zf(t),o=pn(s)):t[24]&&=(vn(t[24]),null);try{Ao(t),Vee(e.bindingStartIndex),n!==null&&af(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&Gc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&Kc(t,n,0,null),qc(t,0)}if(Jf(t),Hf(t),qf(t,0),e.contentQueries!==null&&pu(e,t),a){let n=e.contentCheckHooks;n!==null&&Gc(t,n)}else{let n=e.contentHooks;n!==null&&Kc(t,n,1),qc(t,1)}$f(e,t);let o=e.components;o!==null&&Qf(t,o,0);let s=e.viewQuery;if(s!==null&&mu(2,s,r),a){let n=e.viewCheckHooks;n!==null&&Gc(t,n)}else{let n=e.viewHooks;n!==null&&Kc(t,n,2),qc(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}Nf(t),t[2]&=-73}catch(e){throw Po(t),e}finally{s!==null&&(hn(s,o),a&&Lf(s)),hs()}}function qf(e,t){for(let n=eu(e);n!==null;n=tu(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=ba(e,10+t);Sd(r[1],r);let o=a[18];o!==null&&o.detachView(a[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}function op(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(ap(e,n),ba(t,n))}this._attachedToViewContainer=!1}Dd(this._lView[1],this._lView)}onDestroy(e){Fo(this._lView,e)}markForCheck(){ep(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){No(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,Wf(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new _i(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=_o(this._lView),t=this._lView[16];t!==null&&!e&&Ed(t,this._lView),wd(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new _i(902,!1);this._appRef=e;let t=_o(this._lView),n=this._lView[16];n!==null&&!t&&sp(n,this._lView),No(this._lView)}},lp=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=up;constructor(e,t,n){this._declarationLView=e,this._declarationTContainer=t,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,n){return new cp(kf(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n}))}}return e})();function up(){return dp(Jo(),Ko())}function dp(e,t){return e.type&4?new lp(t,e,Bl(e,t)):null}function fp(e,t,n,r,i){let a=e.data[t];if(a===null)a=pp(e,t,n,r,i),Hee()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Bee();a.injectorIndex=e===null?-1:e.injectorIndex}return Xo(a,!0),a}function pp(e,t,n,r,i){let a=Yo(),o=Zo(),s=o?a:a&&a.parent,c=e.data[t]=hp(e,s,n,t,r,i);return mp(e,c,a,o),c}function mp(e,t,n,r){e.firstChild===null&&(e.firstChild=t),n!==null&&(r?n.child==null&&t.parent!==null&&(n.child=t):n.next===null&&(n.next=t,t.prev=n))}function hp(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return Uo()&&(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:Ss(),attrs:a,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function gp(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?_p(e,n):r.push(e);e[6]=r}function _p(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,yp=()=>null;function bp(e,t){return vp(e,t)}function xp(e,t,n){return yp(e,t,n)}var Sp=class{},Cp=class{},wp=class{destroyNode=null;static __NG_ELEMENT_ID__=()=>Tp()};function Tp(){let e=Ko(),t=Do(Jo().index,e);return(uo(t)?t:e)[11]}var Ep=(()=>{class e{static ɵprov=Oi({token:e,providedIn:`root`,factory:()=>null})}return e})();function Dp(e){return e.debugInfo?.className||e.type.name||null}var Op={},kp=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,Op,n);return r!==Op||t===Op?r:this.parentInjector.get(e,t,n)}};function Ap(e,t,n){return e[t]=n}function jp(e,t){return e[t]}function Mp(e,t,n){if(n===Lu)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function Np(e,t,n,r){let i=Mp(e,t,n);return Mp(e,t+1,r)||i}function Pp(e,t,n,r,i){let a=Np(e,t,n,r);return Mp(e,t+2,i)||a}function Fp(e,t,n,r,i,a){let o=Np(e,t,n,r);return Np(e,t+2,i,a)||o}function Ip(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&lu(i,a),ep(mo(e)?Do(e.index,t):t,5);let o=t[8],s=Lp(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=Lp(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function Lp(e,t,n,r){let i=nn(null);try{return Hc(kc.OutputStart,t,n),n(r)!==!1}catch(t){return Sf(e,t),!1}finally{Hc(kc.OutputEnd,t,n),nn(i)}}function Rp(e,t,n,r,i,a,o,s){let c=ho(e),l=!1,u=null;if(!r&&c&&(u=Bp(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=Co(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);zp(a)||Vp(r?t=>r(xo(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function zp(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function Bp(e,t,n,r){let i=e.cleanup;if(i!=null)for(let e=0;er?n[r]:null}typeof a==`string`&&(e+=2)}return null}function Vp(e,t,n,r,i,a,o){let s=t.firstCreatePass?Ro(t):null,c=Lo(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function Hp(e,t,n,r,i){let a=null,o=null,s=null,c=!1,l=e.directiveToIndex.get(n.type);if(typeof l==`number`?a=l:[a,o,s]=l,o!==null&&s!==null&&e.hostDirectiveOutputs&&Object.hasOwn(e.hostDirectiveOutputs,r)){let n=e.hostDirectiveOutputs[r];for(let a=0;a=o&&l<=s)c=!0,Up(e,t,l,n[a+1],r,i);else if(l>s)break}}return Object.hasOwn(n.outputs,r)&&(c=!0,Up(e,t,a,r,r,i)),c}function Up(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);Vp(e.index,s,t,i,a,c,!0)}function Wp(){Gp()}function Gp(){let e=Ko(),t=qo(),n=Jo();if(t.firstCreatePass&&Zp(t,n),n.controlDirectiveIndex===-1)return;ad(`NgSignalForms`);let r=e[n.controlDirectiveIndex];t.data[n.controlDirectiveIndex].controlDef.create(r,new Jp(e,t,n))}function Kp(){qp()}function qp(){let e=Ko(),t=qo(),n=ys();if(n.controlDirectiveIndex===-1)return;let r=t.data[n.controlDirectiveIndex].controlDef,i=e[n.controlDirectiveIndex];r.update(i,new Jp(e,t,n))}var Jp=class{lView;tView;tNode;hasPassThrough;constructor(e,t,n){this.lView=e,this.tView=t,this.tNode=n,this.hasPassThrough=!!(n.flags&4096)}get customControl(){return this.tNode.customControlIndex===-1?void 0:this.lView[this.tNode.customControlIndex]}get nativeElement(){return Co(this.tNode,this.lView)}get descriptor(){return`<${this.tNode.value}>`}listenToCustomControlOutput(e,t){let n=this.tView.data[this.tNode.customControlIndex];Hp(this.tNode,this.lView,n,e,Ip(this.tNode,this.lView,t))}listenToCustomControlModel(e){let t=this.tNode.flags&1024?`valueChange`:`checkedChange`,n=this.tView.data[this.tNode.customControlIndex];Hp(this.tNode,this.lView,n,t,Ip(this.tNode,this.lView,e))}listenToDom(e,t){Rp(this.tNode,this.tView,this.lView,void 0,this.lView[11],e,t,Ip(this.tNode,this.lView,t))}setInputOnDirectives(e,t,n){let r=this.tNode.inputs?.[e],i=this.tNode.hostDirectiveInputs?.[e];if(!r&&!i)return!1;let a=!1;if(r)for(let i of r){if(i===this.tNode.controlDirectiveIndex)continue;let r=this.lView[i],o=this.tView.data[i];(!n||n(Xp(r,o,e)))&&(rf(o,r,e,t),a=!0)}if(i)for(let r=0;r0;){let e=n.shift();if(typeof e!=`function`){for(let n in e.inputs)t[e.inputs[n]]=!0;let r=Yp(e.directive);r!==null&&n.push(...r);continue}for(let r of e()){if(typeof r==`function`)continue;if(r.inputs)for(let e=0;e1){t.flags|=4096;return}Qp(e,t)}function Qp(e,t){for(let n=t.directiveStart;n{let r=t.hostDirectiveInputs[e],i=t.hostDirectiveOutputs[e+`Change`];if(!r||!i)return!1;for(let e=0;e=i&&a<=o)return t.flags|=n,t.customControlIndex=r,!0}}return!1};if(e(`value`,1024)||e(`checked`,2048))return}}function $p(e,t){return em(e,t)&&tm(e,t+`Change`)}function em(e,t){return t in e.inputs}function tm(e,t){return t in e.outputs}var nm=Symbol(`BINDING`),rm=new Fi(``);function im(e,t,n){let r=n?e.styles:null,i=n?e.classes:null,a=0;if(t!==null)for(let e=0;e0&&(n.directiveToIndex=new Map);for(let c=0;c0;){let n=e[--t];if(typeof n==`number`&&n<0)return n}return 0}function vm(e,t,n){if(n){if(t.exportAs)for(let r=0;r{let[n,r,i]=e[t],a={propName:n,templateName:t,isSignal:(r&nf.SignalBased)!==0};return i&&(a.transform=i),a})}function Em(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function Dm(e,t,n){let r=t instanceof Ya?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new kp(n,r):n}function Om(e){let t=e.get(Cp,null);if(t===null)throw new _i(407,!1);return{rendererFactory:t,sanitizer:e.get(Ep,null),changeDetectionScheduler:e.get(dc,null),ngReflect:!1,tracingService:e.get(rd,null,{optional:!0})}}function km(e,t,n){let r=jm(e);return Cu(t,r,r===`svg`?`svg`:r===`math`?bo:n)}function Am(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new _i(905,!1)}function jm(e){return(e.selectors[0][0]||`div`).toLowerCase()}var Mm=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=Tm(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=Em(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=pte(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){Hc(kc.DynamicComponentStart);let s=nn(null);try{let s=this.componentDef,c=Dm(s,r||this.ngModule,e),l=Om(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(Dp(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{nn(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=Nm(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?cf(l,r,s.encapsulation,t):km(s,l,o??null);Am(u);let d=t.get(rm,null),f=Pm(u,()=>t.get(ks,null)??au());d&&d.addHost(f);let p=a?.some(Im)||i?.some(e=>typeof e!=`function`&&e.bindings.some(Im)),m=Xd(null,c,null,512|Qd(s),null,null,e,l,t,null,fu(u,t,!0));d&&Cm&&f instanceof ShadowRoot&&Fo(m,()=>{d.removeHost(f)}),m[27]=u,us(m);let h=null;try{let e=bm(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);Ou(l,u,e),$l(u,m),of(c,m,e),hu(c,e,m),xm(c,e),n!==void 0&&Rm(e,this.ngContentSelectors,n),h=Do(e.index,m),m[8]=h[8],Df(c,m,null)}catch(e){throw h!==null&&Zl(h),Zl(m),e}finally{Hc(kc.DynamicComponentEnd),hs()}return new Lm(this.componentType,m,!!p)}};function Nm(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:mte(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[nm].requiredVars,e.create&&(e.targetIdx=0,(a??=[]).push(e)),e.update&&(e.targetIdx=0,(o??=[]).push(e));if(r)for(let e=0;e{if(n&1&&e)for(let t of e)t.create();if(n&2&&t)for(let e of t)e.update()}}function Im(e){let t=e[nm].kind;return t===`input`||t===`twoWay`}var Lm=class extends Sp{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=wo(t[1],27),this.location=Bl(this._tNode,t),this.instance=Do(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new cp(t,void 0),this.componentType=e}setInput(e,t){this._hasInputBindings;let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView;Cf(n,r[1],r,e,t),this.previousInputValues.set(e,t),ep(Do(n.index,r),1)}get injector(){return new Ml(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function Rm(e,t,n){let r=e.projection=[];for(let e=0;e{class e{static __NG_ELEMENT_ID__=Bm}return e})();function Bm(){return Wm(Jo(),Ko())}var Vm=class e extends zm{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Bl(this._hostTNode,this._hostLView)}get injector(){return new Ml(this._hostTNode,this._hostLView)}get parentInjector(){let e=bl(this._hostTNode,this._hostLView);if(ol(e)){let t=ll(e,this._hostLView),n=sl(e),r=t[1].data[n+8];return new Ml(r,t)}return new Ml(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=Hm(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-10}createEmbeddedView(e,t,n){let r,i;typeof n==`number`?r=n:n!=null&&(r=n.index,i=n.injector);let a=bp(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,Af(this._hostTNode,a)),o}createComponent(e,t,n,r,i,a,o){let s,c=t||{};s=c.index,n=c.injector,r=c.projectableNodes,i=c.environmentInjector||c.ngModuleRef,a=c.directives,o=c.bindings;let l=new Mm(Ui(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(Ya,null);e&&(i=e)}let d=Ui(l.componentType??{}),f=bp(this._lContainer,d?.id??null),p=f?.firstChild??null,m=l.create(u,r,p,i,a,o,this._getHostElementNamespace());return this.insertImpl(m.hostView,s,Af(this._hostTNode,f)),m}_getHostElementNamespace(){if(this._hostTNode.type&2){let e=this._hostTNode.parent??this._hostLView[5];return e!==null&&e.type&2&&typeof e.value==`string`&&e.value.toLowerCase()===`foreignobject`?null:e?.namespace??null}return this._hostTNode.namespace}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(t,n,r){let i=t._lView;if(Pee(i)){let n=this.indexOf(t);if(n!==-1)this.detach(n);else{let n=i[3],r=new e(n,n[5],n[3]);r.detach(r.indexOf(t))}}let a=this._adjustIndex(n),o=this._lContainer;return rp(o,i,a,r),t.attachToViewContainerRef(),ya(Um(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=Hm(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=ap(this._lContainer,t);n&&(ba(Um(this._lContainer),t),Dd(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=ap(this._lContainer,t);return n&&ba(Um(this._lContainer),t)!=null?new cp(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function Hm(e){return e[8]}function Um(e){return e[8]||=[]}function Wm(e,t){let n,r=t[e.index];return fo(r)?n=r:(n=tp(r,t,null,e),t[e.index]=n,ef(t,n)),Km(n,t,e,r),new Vm(n,e,t)}function Gm(e,t){let n=e[11],r=n.createComment(``),i=Co(t,e);return wu(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var Km=Ym,qm=()=>!1;function Jm(e,t,n){return qm(e,t,n)}function Ym(e,t,n,r){if(e[7])return;let i;i=n.type&8?xo(r):Gm(t,n),e[7]=i}var Xm=class e{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},Zm=class e{queries;constructor(e=[]){this.queries=e}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries===null?n.length:t.contentQueries[0],i=[];for(let e=0;e0)r.push(o[e/2]);else{let i=a[e+1],o=t[-n];for(let e=10;ee.trim())}function dh(e,t,n){e.queries===null&&(e.queries=new $m),e.queries.track(new eh(t,n))}function fh(e,t){return e.queries.getByIndex(t)}function ph(e,t){let n=e[1],r=fh(n,t);return r.crossesNgTemplate?oh(n,e,t,[]):ah(n,e,r,t)}function mh(e,t,n){let r,i=wn(()=>{r._dirtyCounter();let n=vh(r,e);if(t&&n===void 0)throw new _i(-951,!1);return n});return r=i[tn],r._dirtyCounter=D(0),r._flatValue=void 0,i}function hh(e){return mh(!0,!1,e)}function gh(e){return mh(!0,!0,e)}function _h(e,t){let n=e[tn];n._lView=Ko(),n._queryIndex=t,n._queryList=sh(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(e=>e+1))}function vh(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[2]&4)return t?void 0:Oa;let i=sh(n,r),a=ph(n,r);return i.reset(a,Hl),t?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}function yh(e){return!!e&&typeof e.then==`function`}function bh(e){return!!e&&typeof e.subscribe==`function`}var xh=class{},Sh=class extends xh{injector;instance=null;constructor(e){super();let t=new Xa([...e.providers,{provide:xh,useValue:this}],e.parent||Ja(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function Ch(e,t,n=null){return new Sh({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var wh=(()=>{class e{_injector;cachedInjectors=new Map;constructor(e){this._injector=e}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){let t=Pa(!1,e.type),n=t.length>0?Ch([t],this._injector,``):null;this.cachedInjectors.set(e,n)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static ɵprov=Oi({token:e,providedIn:`environment`,factory:()=>new e(ua(Ya))})}return e})();function k(e){return Oc(()=>{let t=Ah(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Kl.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(wh).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||gu.Emulated,styles:e.styles||Oa,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&ad(`NgStandalone`),jh(n);let r=e.dependencies;return n.directiveDefs=Mh(r,Th),n.pipeDefs=Mh(r,Gi),n.id=Nh(n),n})}function Th(e){return Ui(e)||Wi(e)}function Eh(e,t){if(e==null)return Da;let n={};for(let r in e)if(Object.hasOwn(e,r)){let i=e[r],a,o,s,c;Array.isArray(i)?(s=i[0],a=i[1],o=i[2]??a,c=i[3]||null):(a=i,o=i,s=nf.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function Dh(e){if(e==null)return Da;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function Oh(e){return Oc(()=>{let t=Ah(e);return jh(t),t})}function kh(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function Ah(e){let t={};return{type:e.type,providersResolver:null,viewProvidersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||Da,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||Oa,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:Eh(e.inputs,t),outputs:Dh(e.outputs),debugInfo:null}}function jh(e){e.features?.forEach(t=>t(e))}function Mh(e,t){return e?()=>{let n=typeof e==`function`?e():e,r=[];for(let e of n){let n=t(e);n!==null&&r.push(n)}return r}:null}function Nh(e){let t=0,n=typeof e.consts==`function`?``:e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let e of r.join(`|`))t=Math.imul(31,t)+e.charCodeAt(0)<<0;return t+=2147483648,`c`+t}var Ph=new Fi(``),Fh=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=C(Ph,{optional:!0})??[];injector=C(Os);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=so(this.injector,t);if(yh(n))e.push(n);else if(bh(n)){let t=new Promise((e,t)=>{n.subscribe({complete:e,error:t})});e.push(t)}}let t=()=>{this.done=!0,this.resolve()};Promise.all(e).then(()=>{t()}).catch(e=>{this.reject(e)}),e.length===0&&t(),this.initialized=!0}static ɵfac=function(t){return new(t||e)};static ɵprov=Rl({token:e,factory:e.ɵfac})}return e})();function Ih(e){return t=>{t.controlDef={create:(e,t)=>{e?.ɵngControlCreate(t)},update:(e,t)=>{e?.ɵngControlUpdate?.(t)},passThroughInput:e}}}function Lh(e){return Object.getPrototypeOf(e.prototype).constructor}function Rh(e){let t=Lh(e.type),n=!0,r=[e];for(;t&&t!==Function.prototype&&t!==Object.prototype;){let i,a=Object.hasOwn(t,Li)?t[Li]:void 0,o=Object.hasOwn(t,Ri)?t[Ri]:void 0;if(go(e))i=a??o;else{if(a)throw new _i(903,!1);i=o}if(i){if(n){r.push(i);let t=e;t.inputs=Vh(e.inputs),t.declaredInputs=Vh(e.declaredInputs),t.outputs=Vh(e.outputs);let n=i.hostBindings;n&&Wh(e,n);let a=i.viewQuery,o=i.contentQueries;if(a&&Hh(e,a),o&&Uh(e,o),zh(e,i),xi(e.outputs,i.outputs),go(i)&&i.data.animation){let t=e.data;t.animation=(t.animation||[]).concat(i.data.animation)}}let t=i.features;if(t)for(let r=0;r=0;r--){let i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=il(i.hostAttrs,n=il(n,i.hostAttrs))}}function Vh(e){return e===Da?{}:e===Oa?[]:e}function Hh(e,t){let n=e.viewQuery;e.viewQuery=n?(e,r)=>{t(e,r),n(e,r)}:t}function Uh(e,t){let n=e.contentQueries;e.contentQueries=n?(e,r,i)=>{t(e,r,i),n(e,r,i)}:t}function Wh(e,t){let n=e.hostBindings;e.hostBindings=n?(e,r)=>{t(e,r),n(e,r)}:t}function Gh(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=il(e.mergedAttrs,e.attrs);let t=e.tView=qd(2,e,i,a,o,n.directiveRegistry,n.pipeRegistry,null,n.schemas,n.consts,null);n.queries!==null&&(n.queries.template(n,e),t.queries=n.queries.embeddedTView(e))}s&&(e.flags|=s),Xo(e,!1);let c=Yh(n,t,e,r);ws()&&Id(n,t,c,e),$l(c,t);let l=tp(c,t,c,e);t[r+27]=l,ef(t,l),Jm(l,e,t)}function Kh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;return t.firstCreatePass?(f=fp(t,d,4,o||null,s||null),Ho()&&om(t,e,f,ko(t.consts,l),gf),Wc(t,f)):f=t.data[d],Gh(f,e,t,n,r,i,a,c),ho(f)&&of(t,e,f),l!=null&&sf(e,f,u),f}function qh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=fp(t,d,4,o||null,s||null),l!=null){let e=ko(t.consts,l);f.localNames=[];for(let t=0;t{throw new _i(600,``)})}var eg=10,tg=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=C(tc);afterRenderManager=C(od);zonelessEnabled=C(fc);rootEffectScheduler=C(mc);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Jr;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=C(Ps);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(hi(e=>!e))}constructor(){C(rd,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=C(Ya);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=Os.NULL){return this._injector.get(Hs).run(()=>{if(Hc(kc.BootstrapComponentStart),!this._injector.get(Fh).done)throw new _i(405,``);let r=Ui(e),i=this._injector.get(xh),a=new Mm(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=ng(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(Zh,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),rg(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),Hc(kc.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Hc(kc.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(nd.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw Hc(kc.ChangeDetectionEnd),new _i(101,!1);let e=nn(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,nn(e),this.afterTick.next(),Hc(kc.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Cp,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++Mo(e))){this.dirtyFlags|=2;return}this.dirtyFlags&=-8}attachView(e){let t=e;this._views.push(t),t.attachToAppRef(this)}detachView(e){let t=e;rg(this._views,t),t.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView);try{this.tick()}catch(e){this.internalErrorHandler(e)}this.components.push(e),this._injector.get(Qh,[]).forEach(t=>t(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>rg(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new _i(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=Rl({token:e,factory:e.ɵfac})}return e})();function ng(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function rg(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function A(e,t,n,r){let i=Ko();return Mp(i,is(),t)&&(qo(),_f(ys(),i,e,t,n,r)),A}function ig(e){if(ad(`NgAnimateEnter`),!Ku)return ig;let t=Ko();if(wte(t))return ig;let n=Jo(),r=t[9].get(Hs);return kte($u(t),n,()=>ag(t,n,e,r)),Fte(t[9]),pd(t[9],$u(t)),ig}function ag(e,t,n,r){let i=Co(t,e),a=e[11],o=Ote(n),s=[],c=!1,l=e=>{if(ed(e)!==i)return;let t=e instanceof AnimationEvent?`animationend`:`transitionend`;r.runOutsideAngular(()=>{a.listen(i,t,u)})},u=e=>{ed(e)===i&&(td(e,i)&&(c=!0),og(e,i,a))};if(o&&o.length>0){r.runOutsideAngular(()=>{s.push(a.listen(i,`animationstart`,l)),s.push(a.listen(i,`transitionstart`,l))}),Tte(i,o,s);for(let e of o)a.addClass(i,e);r.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(!c&&(bte(i,Yu,Ku),!Yu.has(i))){for(let e of o)a.removeClass(i,e);qu(i)}})})}}function og(e,t,n){let r=Ju.get(t);if(ed(e)===t&&r&&td(e,t)){e.stopPropagation();for(let e of r.classList)n.removeClass(t,e);qu(t)}}var sg=class{destroy(e){}updateValue(e,t){}swap(e,t){let n=Math.min(e,t),r=Math.max(e,t),i=this.detach(r);if(r-n>1){let e=this.detach(n);this.attach(n,i),this.attach(r,e)}else this.attach(n,i)}move(e,t){this.attach(t,this.detach(e))}};function cg(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function lg(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){nn(r);let c=t.length-1;for(nn(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=cg(o,r,o,l,n);if(u!==0){u<0&&e.updateValue(o,l),o++;continue}let d=e.at(s),f=t[c],p=cg(s,d,c,f,n);if(p!==0){p<0&&e.updateValue(s,f),s--,c--;continue}let m=n(o,r),h=n(s,d),g=n(o,l);if(Object.is(g,h)){let t=n(c,f);Object.is(t,m)?(e.swap(o,s),e.updateValue(s,f),c--,s--):e.move(s,o),e.updateValue(o,l),o++;continue}if(i??=new pg,a??=fg(e,o,s,n),ug(e,i,o,g))e.updateValue(o,l),o++,s++;else if(a.has(g))i.set(m,e.detach(o)),s--;else{let n=e.create(o,t[o]);e.attach(o,n),o++,s++}}for(;o<=c;)dg(e,i,n,o,t[o]),o++}else if(t!=null){nn(r);let c=t[Symbol.iterator]();nn(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=cg(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new pg,a??=fg(e,o,s,n);let u=n(o,r);if(ug(e,i,o,u))e.updateValue(o,r),o++,s++,l=c.next();else if(!a.has(u))e.attach(o,e.create(o,r)),o++,s++,l=c.next();else{let r=n(o,t);i.set(r,e.detach(o)),s--}}}for(;!l.done;)dg(e,i,n,e.length,l.value),l=c.next()}for(;o<=s;)e.destroy(e.detach(s--));i?.forEach(t=>{e.destroy(t)})}function ug(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function dg(e,t,n,r,i){if(ug(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function fg(e,t,n,r){let i=new Set;for(let a=t;a<=n;a++)i.add(r(a,e.at(a)));return i}var pg=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function j(e,t,n,r,i,a,o,s){ad(`NgControlFlow`);let c=Ko(),l=qo();return qh(c,l,e,t,n,r,i,ko(l.consts,a),256,o,s),mg}function mg(e,t,n,r,i,a,o,s){ad(`NgControlFlow`);let c=Ko(),l=qo();return qh(c,l,e,t,n,r,i,ko(l.consts,a),512,o,s),mg}function M(e,t){ad(`NgControlFlow`);let n=Ko(),r=is(),i=n[r]===Lu?-1:n[r],a=i===-1?void 0:bg(n,27+i);if(Mp(n,r,e)){let r=nn(null);try{if(a!==void 0&&ip(a,0),e!==-1){let r=27+e,i=bg(n,r),a=Tg(n[1],r),o=xp(i,a,n);rp(i,kf(n,a,t,{dehydratedView:o}),0,Af(a,o))}}finally{nn(r)}}else if(a!==void 0){let e=np(a,0);e!==void 0&&(e[8]=t)}}var hg=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-10}};function gg(e){return e}function _g(e,t){return t}var vg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function N(e,t,n,r,i,a,o,s,c,l,u,d,f){ad(`NgControlFlow`);let p=Ko(),m=qo(),h=c!==void 0,g=Ko(),_=new vg(h,s?o.bind(g[15][8]):o);g[27+e]=_,qh(p,m,e+1,t,n,r,i,ko(m.consts,a),256),h&&qh(p,m,e+2,c,l,u,d,ko(m.consts,f),512)}var yg=class extends sg{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n}get length(){return this.lContainer.length-10}at(e){return this.getLView(e)[8].$implicit}attach(e,t){let n=t[6];this.needsIndexUpdate||=e!==this.length,rp(this.lContainer,t,e,Af(this.templateTNode,n)),xg(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,Sg(this.lContainer,e),Cg(this.lContainer,e)}create(e,t){let n=bp(this.lContainer,this.templateTNode.tView.ssrId);return kf(this.hostLView,this.templateTNode,new hg(this.lContainer,t,e),{dehydratedView:n})}destroy(e){Dd(e[1],e)}updateValue(e,t){this.getLView(e)[8].$implicit=t}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e0){let e=n[9];Nte(e,r),Gu.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function Sg(e,t){if(e.length<=10)return;let n=e[10+t],r=n?n[26]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function Cg(e,t){return ap(e,t)}function wg(e,t){return np(e,t)}function Tg(e,t){return wo(e,t)}function F(e,t,n){let r=Ko();return Mp(r,is(),t)&&(qo(),uf(ys(),r,e,t,r[11],n)),F}function Eg(e,t,n,r,i){Cf(t,e,n,i?`class`:`style`,r)}function I(e,t,n,r){let i=Ko(),a=i[1],o=e+27,s=a.firstCreatePass?bm(o,i,2,t,gf,Ho(),n,r):a.data[o];if(mo(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(Dp(o),()=>(Dg(e,t,i,s,r),I))}}return Dg(e,t,i,s,r),I}function Dg(e,t,n,r,i){if(bf(r,n,e,t,kg),ho(r)){let e=n[1];of(e,n,r),hu(e,r,n)}i!=null&&sf(n,r)}function L(){let e=qo(),t=xf(Jo());return e.firstCreatePass&&xm(e,t),Wo(t)&&Go(),Vo(),t.classesWithoutHost!=null&&$c(t)&&Eg(e,t,Ko(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&el(t)&&Eg(e,t,Ko(),t.stylesWithoutHost,!1),L}function R(e,t,n,r){return I(e,t,n,r),L(),R}function z(e,t,n,r){let i=Ko(),a=i[1],o=e+27,s=a.firstCreatePass?Sm(o,a,2,t,n,r):a.data[o];return bf(s,i,e,t,kg),r!=null&&sf(i,s),z}function B(){return Wo(xf(Jo()))&&Go(),Vo(),B}function Og(e,t,n,r){return z(e,t,n,r),B(),Og}var kg=(e,t,n,r,i)=>(Ts(!0),Cu(t[11],r,Ss()));function Ag(e,t,n){let r=Ko(),i=r[1],a=e+27,o=i.firstCreatePass?bm(a,r,8,`ng-container`,gf,Ho(),t,n):i.data[a];if(bf(o,r,e,`ng-container`,Ng),ho(o)){let e=r[1];of(e,r,o),hu(e,o,r)}return n!=null&&sf(r,o),Ag}function jg(){let e=qo(),t=xf(Jo());return e.firstCreatePass&&xm(e,t),jg}function Mg(e,t,n){return Ag(e,t,n),jg(),Mg}var Ng=(e,t,n,r,i)=>(Ts(!0),$ee(t[11],``));function V(){return Ko()}function Pg(e,t,n){let r=Ko();return Mp(r,is(),t)&&(qo(),df(ys(),r,e,t,r[11],n)),Pg}var Fg=void 0;function Ig(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var Lg=[`en`,[[`a`,`p`],[`AM`,`PM`]],[[`AM`,`PM`]],[[`S`,`M`,`T`,`W`,`T`,`F`,`S`],[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`]],Fg,[[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]],Fg,[[`B`,`A`],[`BC`,`AD`],[`Before Christ`,`Anno Domini`]],0,[6,0],[`M/d/yy`,`MMM d, y`,`MMMM d, y`,`EEEE, MMMM d, y`],[`h:mm a`,`h:mm:ss a`,`h:mm:ss a z`,`h:mm:ss a zzzz`],[`{1}, {0}`,Fg,Fg,Fg],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`×`,`‰`,`∞`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,Ig],Rg=Object.create(null);function zg(e){let t=Hg(e),n=Bg(t);if(n)return n;let r=t.split(`-`)[0];if(n=Bg(r),n)return n;if(r===`en`)return Lg;throw new _i(701,!1)}function Bg(e){if(!(e in Rg)){let t=aa.ng&&aa.ng.common&&aa.ng.common.locales&&aa.ng.common.locales[e];return t!==void 0&&(Rg[e]=t),t}return Rg[e]}var Vg={LocaleId:0,DayPeriodsFormat:1,DayPeriodsStandalone:2,DaysFormat:3,DaysStandalone:4,MonthsFormat:5,MonthsStandalone:6,Eras:7,FirstDayOfWeek:8,WeekendRange:9,DateFormat:10,TimeFormat:11,DateTimeFormat:12,NumberSymbols:13,NumberFormats:14,CurrencyCode:15,CurrencySymbol:16,CurrencyName:17,Currencies:18,Directionality:19,PluralCase:20,ExtraData:21};function Hg(e){return e.toLowerCase().replace(/_/g,`-`)}var Ug=`en-US`;function Wg(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function H(e,t,n){let r=Ko(),i=qo(),a=Jo();return Gg(i,r,r[11],a,e,t,n),H}function U(e,t,n){let r=Ko(),i=qo(),a=Jo();return(a.type&3||n)&&Rp(a,i,r,n,r[11],e,t,Ip(a,r,t)),U}function Gg(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=Ip(r,t,a),Rp(r,e,t,o,n,i,a,c)&&(s=!1)),s){let e=r.outputs?.[i],n=r.hostDirectiveOutputs?.[i];if(n&&n.length)for(let e=0;e>17&32767}function t_(e){return(e&2)==2}function n_(e,t){return e&131071|t<<17}function r_(e){return e|2}function i_(e){return(e&131068)>>2}function a_(e,t){return e&-131069|t<<2}function o_(e){return(e&1)==1}function s_(e){return e|1}function c_(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=e_(o),c=i_(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||Ta(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=e_(e[s+1]);e[r+1]=$g(t,s),t!==0&&(e[t+1]=a_(e[t+1],r)),e[s+1]=n_(e[s+1],r)}else e[r+1]=$g(s,0),s!==0&&(e[s+1]=a_(e[s+1],r)),s=r}else e[r+1]=$g(c,0),s===0?s=r:e[c+1]=a_(e[c+1],r),c=r;l&&(e[r+1]=r_(e[r+1])),u_(e,u,r,!0),u_(e,u,r,!1),l_(t,u,e,r,a),o=$g(s,c),a?t.classBindings=o:t.styleBindings=o}function l_(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&Ta(a,t)>=0&&(n[r+1]=s_(n[r+1]))}function u_(e,t,n,r){let i=e[n+1],a=t===null,o=r?e_(i):i_(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];d_(n,t)&&(s=!0,e[o+1]=r?s_(i):r_(i)),o=r?e_(i):i_(i)}s&&(e[n+1]=r?r_(i):s_(i))}function d_(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?Ta(e,t)>=0:!1}var f_={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function p_(e){return e.substring(f_.key,f_.keyEnd)}function m_(e){return g_(e),h_(e,__(e,0,f_.textEnd))}function h_(e,t){let n=f_.textEnd;return n===t?-1:(t=f_.keyEnd=v_(e,f_.key=t,n),__(e,t,n))}function g_(e){f_.key=0,f_.keyEnd=0,f_.value=0,f_.valueEnd=0,f_.textEnd=e.length}function __(e,t,n){for(;t32;)t++;return t}function y_(e,t,n){return S_(e,t,n,!1),y_}function G(e,t){return S_(e,t,null,!0),G}function b_(e){C_(N_,x_,e,!0)}function x_(e,t){for(let n=m_(t);n>=0;n=h_(t,n))Ca(e,p_(t),!0)}function S_(e,t,n,r){let i=Ko(),a=qo(),o=as(2);if(a.firstUpdatePass&&T_(a,e,o,r),t!==Lu&&Mp(i,o,t)){let s=a.data[_s()];P_(a,s,i,i[11],e,i[o+1]=Lte(t,n),r,o)}}function C_(e,t,n,r){let i=qo(),a=as(2);i.firstUpdatePass&&T_(i,null,a,r);let o=Ko();if(n!==Lu&&Mp(o,a,n)){let s=i.data[_s()];if(L_(s,r)&&!w_(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=Ci(e,n||``)),Eg(i,s,o,n,r)}else Ite(i,s,o,o[11],o[a+1],o[a+1]=M_(e,t,n),r,a)}}function w_(e,t){return t>=e.expandoStartIndex}function T_(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[_s()],o=w_(e,n);L_(a,r)&&t===null&&!o&&(t=!1),t=E_(i,a,t,r),c_(i,a,t,n,o,r)}}function E_(e,t,n,r){let i=Gee(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=A_(null,e,t,n,r),n=j_(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=A_(i,e,t,n,r),a===null){let n=D_(e,t,r);n!==void 0&&Array.isArray(n)&&(n=A_(null,e,t,n[1],r),n=j_(n,t.attrs,r),O_(e,t,r,n))}else a=k_(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function D_(e,t,n){let r=n?t.classBindings:t.styleBindings;if(i_(r)!==0)return e[e_(r)]}function O_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[e_(i)]=r}function k_(e,t,n){let r,i=t.directiveEnd;for(let a=1+t.directiveStylingLast;a0;){let t=e[i],a=Array.isArray(t),c=a?t[1]:t,l=c===null,u=n[i+1];u===Lu&&(u=l?Oa:void 0);let d=l?wa(u,r):c===r?u:void 0;if(a&&!I_(d)&&(d=wa(t,r)),I_(d)&&(s=d,o))return s;let f=e[i+1];i=o?e_(f):i_(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=wa(e,r))}return s}function I_(e){return e!==void 0}function Lte(e,t){return e==null||e===``||(typeof t==`string`?e=vu(e)+t:typeof e==`object`&&(e=Si(vu(e)))),e}function L_(e,t){return!!(e.flags&(t?8:16))}function K(e,t=``){let n=Ko(),r=qo(),i=e+27,a=r.firstCreatePass?fp(r,i,1,t,null):r.data[i],o=Rte(r,n,a,t);n[i]=o,ws()&&Id(r,n,o,a),Xo(a,!1)}var Rte=(e,t,n,r)=>(Ts(!0),Zee(t[11],r));function R_(e,t,n,r=``){return Mp(e,is(),n)?t+qi(n)+r:Lu}function zte(e,t,n,r,i,a=``){let o=Np(e,rs(),n,i);return as(2),o?t+qi(n)+r+qi(i)+a:Lu}function Bte(e,t,n,r,i,a,o,s=``){let c=Pp(e,rs(),n,i,o);return as(3),c?t+qi(n)+r+qi(i)+a+qi(o)+s:Lu}function Vte(e,t,n,r,i,a,o,s,c,l=``){let u=Fp(e,rs(),n,i,o,c);return as(4),u?t+qi(n)+r+qi(i)+a+qi(o)+s+qi(c)+l:Lu}function q(e){return J(``,e),q}function J(e,t,n){let r=Ko(),i=R_(r,e,t,n);return i!==Lu&&V_(r,_s(),i),J}function Y(e,t,n,r,i){let a=Ko(),o=zte(a,e,t,n,r,i);return o!==Lu&&V_(a,_s(),o),Y}function z_(e,t,n,r,i,a,o){let s=Ko(),c=Bte(s,e,t,n,r,i,a,o);return c!==Lu&&V_(s,_s(),c),z_}function B_(e,t,n,r,i,a,o,s,c){let l=Ko(),u=Vte(l,e,t,n,r,i,a,o,s,c);return u!==Lu&&V_(l,_s(),u),B_}function V_(e,t,n){let r=So(t,e);Qee(e[11],r,n)}function H_(e,t,n){Tc(t)&&(t=t());let r=Ko();return Mp(r,is(),t)&&(qo(),uf(ys(),r,e,t,r[11],n)),H_}function U_(e,t){let n=Tc(e);return n&&e.set(t),n}function W_(e,t){let n=Ko(),r=qo(),i=Jo();return Gg(r,n,n[11],i,e,t),W_}var G_={};function K_(e){ad(`NgLet`);let t=qo(),n=Ko(),r=e+27;return Xo(fp(t,r,128,null,null),!1),Eo(t,n,r,G_),K_}function q_(e){return Eo(qo(),Ko(),_s(),e),e}function J_(e){let t=To($o(),27+e);if(t===G_)throw new _i(314,!1);return t}function Y_(e,t,n=``){return R_(Ko(),e,t,n)}function X_(e,t,n){let r=qo();r.firstCreatePass&&Z_(t,r.data,r.blueprint,go(e),n)}function Z_(e,t,n,r,i){if(e=Ei(e),Array.isArray(e))for(let a=0;a>20;if(Ha(e)||!e.multi){let r=new Qc(l,i,am,null),p=ev(c,t,i?u:u+f,d);p===-1?(xl(_l(s,o),a,c),Q_(a,e,t.length),t.push(c),s.directiveStart++,s.directiveEnd++,i&&(s.providerIndexes+=1048576),n.push(r),o.push(r)):(n[p]=r,o[p]=r)}else{let p=ev(c,t,u+f,d),m=ev(c,t,u,u+f),h=p>=0&&n[p],g=m>=0&&n[m];if(i&&!g||!i&&!h){xl(_l(s,o),a,c);let u=Wte(i?Ute:Hte,n.length,i,r,l,e);!i&&g&&(n[m].providerFactory=u),Q_(a,e,t.length,0),t.push(c),s.directiveStart++,s.directiveEnd++,i&&(s.providerIndexes+=1048576),n.push(u),o.push(u)}else{let t=$_(n[i?m:p],l,!i&&r);Q_(a,e,p>-1?p:m,t)}!i&&r&&g&&n[m].componentProviders++}}}function Q_(e,t,n,r){let i=Ha(t),a=Ua(t);if(i||a){let o=(a?Ei(t.useClass):t).prototype.ngOnDestroy;if(o){let a=e.destroyHooks||=[];if(!i&&t.multi){let e=a.indexOf(n);e===-1?a.push(n,[r,o]):a[e+1].push(r,o)}else a.push(n,o)}}}function $_(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function ev(e,t,n,r){for(let i=n;i{n.providersResolver=(t,n)=>X_(t,n?n(e):e,!1),t&&(n.viewProvidersResolver=(e,n)=>X_(e,n?n(t):t,!0))}}function rv(e,t){let n=ns()+e,r=Ko();return r[n]===Lu?Ap(r,n,t()):jp(r,n)}function iv(e,t,n){return sv(Ko(),ns(),e,t,n)}function av(e,t,n,r){return cv(Ko(),ns(),e,t,n,r)}function Gte(e,t,n,r,i){return Kte(Ko(),ns(),e,t,n,r,i)}function ov(e,t){let n=e[t];return n===Lu?void 0:n}function sv(e,t,n,r,i,a){let o=t+n;return Mp(e,o,i)?Ap(e,o+1,a?r.call(a,i):r(i)):ov(e,o+1)}function cv(e,t,n,r,i,a,o){let s=t+n;return Np(e,s,i,a)?Ap(e,s+2,o?r.call(o,i,a):r(i,a)):ov(e,s+2)}function Kte(e,t,n,r,i,a,o,s){let c=t+n;return Pp(e,c,i,a,o)?Ap(e,c+3,s?r.call(s,i,a,o):r(i,a,o)):ov(e,c+3)}function lv(e,t){let n=qo(),r,i=e+27;n.firstCreatePass?(r=qte(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=ha(r.type,!0)),o=ra(am);try{let e=dl(!1),t=a();return dl(e),Eo(n,Ko(),i,t),t}finally{ra(o)}}function qte(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function uv(e,t,n){let r=e+27,i=Ko(),a=To(i,r);return fv(i,r)?sv(i,ns(),t,a.transform,n,a):a.transform(n)}function dv(e,t,n,r){let i=e+27,a=Ko(),o=To(a,i);return fv(a,i)?cv(a,ns(),t,o.transform,n,r,o):o.transform(n,r)}function fv(e,t){return e[1].data[t].pure}function pv(e,t){return dp(e,t)}var Jte=(()=>{class e{applicationErrorHandler=C(tc);appRef=C(tg);taskService=C(Ps);ngZone=C(Hs);zonelessEnabled=C(fc);tracing=C(rd,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new fr;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Bs):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(C(pc,{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?Rs:Ls;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=Rl({token:e,factory:e.ɵfac})}return e})();function Yte(){return[{provide:dc,useExisting:Jte},{provide:Hs,useClass:Xs},{provide:fc,useValue:!0}]}function Xte(){return typeof $localize<`u`&&$localize.locale||`en-US`}var mv=new Fi(``,{factory:()=>C(mv,{optional:!0,skipSelf:!0})||Xte()}),hv=class{destroyed=!1;listeners=null;errorHandler=C(ec,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=C(As);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new _i(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(yi(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let t=nn(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&&Zte(this.listeners)),nn(t),this.isEmitting=!1}}};function Zte(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function X(e,t){return wn(e,t?.equal)}function Z(e){return Zn(e)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var Qte=e=>e;function Q(e,t){return typeof e==`function`?gv(qn(e,Qte,t?.equal),t?.debugName,t?.set):gv(qn(e.source,e.computation,e.equal),e.debugName,e.set)}function gv(e,t,n){let r=e[tn],i=e;if(n!==void 0){let t=e=>Jn(r,e);i.set=e=>n(e,t),i.update=r=>n(r(Z(e)),t)}else i.set=e=>Jn(r,e),i.update=e=>Yn(r,e);return i.asReadonly=rc.bind(e),i}var _v=!1;function $te(){return _v}function vv(e){_v=e}function yv(e,t){let n=Object.create(Dc);n.value=e,n.transformFn=t?.transform;function r(){if(on(n),n.value===Ec)throw new _i(-950,null);return n.value}return r[tn]=n,r}function bv(e){return new hv}function xv(e,t){return yv(e,t)}function ene(e){return yv(Ec,e)}var $=(xv.required=ene,xv);function Sv(e,t){let n=Object.create(Dc),r=new hv;n.value=e;function i(){return on(n),Cv(n.value),n.value}return i[tn]=n,i.asReadonly=rc.bind(i),i.set=e=>{n.equal(n.value,e)||(In(n,e),r.emit(e))},i.update=e=>{Cv(n.value),i.set(e(n.value))},i.subscribe=r.subscribe.bind(r),i.destroyRef=r.destroyRef,i}function Cv(e){if(e===Ec)throw new _i(952,!1)}function wv(e,t){return Sv(e,t)}function tne(e){return Sv(Ec,e)}var Tv=(wv.required=tne,wv);function Ev(e,t){return hh(t)}function nne(e,t){return gh(t)}var Dv=(Ev.required=nne,Ev),rne=(()=>{class e{static __NG_ELEMENT_ID__=ine}return e})();function ine(e){return ane(Jo(),Ko(),(e&16)==16)}function ane(e,t,n){if(mo(e)&&!n){let n=Do(e.index,t);return new cp(n,n)}if(e.type&175){let e=t[15];return new cp(e,t)}return null}var Ov=new Fi(``),one=new Fi(``);function kv(e){return!e.moduleRef}function sne(e){let t=kv(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Hs);return n.run(()=>{kv(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(tc),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),kv(e)){let n=()=>t.destroy(),r=e.platformInjector.get(Ov);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(Ov);n.add(t),e.moduleRef.onDestroy(()=>{rg(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return lne(r,n,()=>{let n=t.get(Ps),r=n.add(),i=t.get(Fh);return i.runInitializers(),i.donePromise.then(()=>{if(Wg(t.get(mv,Ug)||`en-US`),!t.get(one,!0))return kv(e)?t.get(tg):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(kv(e)){let n=t.get(tg);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return cne?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var cne;function lne(e,t,n){try{let r=n();return yh(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var Av=null;function une(e=[],t){return Os.create({name:t,providers:[{provide:Wa,useValue:`platform`},{provide:Ov,useValue:new Set([()=>Av=null])},...e]})}function dne(e=[]){if(Av)return Av;let t=une(e);return Av=t,$h(),fne(t),t}function fne(e){let t=e.get(oc,null);so(e,()=>{t?.forEach(e=>e())})}function pne(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;Hc(kc.BootstrapApplicationStart);try{let e=i?.injector??dne(r);return sne({r3Injector:new Sh({providers:[Yte(),nc,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{Hc(kc.BootstrapApplicationEnd)}}function jv(e){return typeof e==`boolean`?e:e!=null&&e!==`false`}var Mv=Symbol(`NOT_SET`),Nv=new Set,mne={...Rn,kind:`afterRenderEffectPhase`,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:Mv,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(on(r),r.value),r.signal[tn]=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??Nv)t()}finally{vn(e)}}};function Pv(e,t){let n=t?.injector??C(Os),r=n.get(dc),i=n.get(od),a=n.get(rd,null,{optional:!0});i.impl??=n.get(cd);let o=e;typeof o==`function`&&(o={mixedReadWrite:e});let s=n.get(lc,null,{optional:!0}),c=new hne(i.impl,[o.earlyRead,o.write,o.mixedReadWrite,o.read],s?.view,r,n,a?.snapshot(null));return i.impl.register(c),c}var Fv=null;function Iv(){return Fv}function gne(e){Fv??=e}var _ne=class{},Lv=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(Lv||{}),Rv=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(Rv||{}),zv=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(zv||{}),Bv={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function vne(e){return zg(e)[Vg.LocaleId]}function yne(e,t,n){let r=zg(e);return Kv(Kv([r[Vg.DayPeriodsFormat],r[Vg.DayPeriodsStandalone]],t),n)}function bne(e,t,n){let r=zg(e);return Kv(Kv([r[Vg.DaysFormat],r[Vg.DaysStandalone]],t),n)}function xne(e,t,n){let r=zg(e);return Kv(Kv([r[Vg.MonthsFormat],r[Vg.MonthsStandalone]],t),n)}function Sne(e,t){let n=zg(e)[Vg.Eras];return Kv(n,t)}function Vv(e,t){return Kv(zg(e)[Vg.DateFormat],t)}function Hv(e,t){return Kv(zg(e)[Vg.TimeFormat],t)}function Uv(e,t){let n=zg(e)[Vg.DateTimeFormat];return Kv(n,t)}function Wv(e,t){let n=zg(e),r=n[Vg.NumberSymbols][t];if(r===void 0){if(t===Bv.CurrencyDecimal)return n[Vg.NumberSymbols][Bv.Decimal];if(t===Bv.CurrencyGroup)return n[Vg.NumberSymbols][Bv.Group]}return r}function Gv(e){if(!e[Vg.ExtraData])throw new _i(2303,!1)}function Cne(e){let t=zg(e);return Gv(t),(t[Vg.ExtraData][2]||[]).map(e=>typeof e==`string`?qv(e):[qv(e[0]),qv(e[1])])}function wne(e,t,n){let r=zg(e);return Gv(r),Kv(Kv([r[Vg.ExtraData][0],r[Vg.ExtraData][1]],t)||[],n)||[]}function Kv(e,t){for(let n=t;n>-1;n--)if(e[n]!==void 0)return e[n];throw new _i(2304,!1)}function qv(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var Tne=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Jv=Object.create(null),Ene=/((?:[^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]*)/,Dne=256;function One(e,t,n,r){let i=uy(e);kne(t),t=Xv(n,t)||t;let a=[],o;for(;t;)if(o=Ene.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=sy(r,s),i=ly(i,r));let c=``;return a.forEach(e=>{let t=Fne(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function kne(e){if(e.length>Dne)throw new _i(2300,!1)}function Yv(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function Xv(e,t){let n=vne(e);if(Jv[n]??=Object.create(null),Jv[n][t])return Jv[n][t];let r=``;switch(t){case`shortDate`:r=Vv(e,zv.Short);break;case`mediumDate`:r=Vv(e,zv.Medium);break;case`longDate`:r=Vv(e,zv.Long);break;case`fullDate`:r=Vv(e,zv.Full);break;case`shortTime`:r=Hv(e,zv.Short);break;case`mediumTime`:r=Hv(e,zv.Medium);break;case`longTime`:r=Hv(e,zv.Long);break;case`fullTime`:r=Hv(e,zv.Full);break;case`short`:let t=Xv(e,`shortTime`),n=Xv(e,`shortDate`);r=Zv(Uv(e,zv.Short),[t,n]);break;case`medium`:let i=Xv(e,`mediumTime`),a=Xv(e,`mediumDate`);r=Zv(Uv(e,zv.Medium),[i,a]);break;case`long`:let o=Xv(e,`longTime`),s=Xv(e,`longDate`);r=Zv(Uv(e,zv.Long),[o,s]);break;case`full`:let c=Xv(e,`fullTime`),l=Xv(e,`fullDate`);r=Zv(Uv(e,zv.Full),[c,l])}return r&&(Jv[n][t]=r),r}function Zv(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return Object.hasOwn(t,n)?t[n]:e})),e}function Qv(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 Ane(s,t);let c=Wv(o,Bv.MinusSign);return Qv(s,t,c,r,i)}}function jne(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 _i(2301,!1)}}function ey(e,t,n=Lv.Format,r=!1){return function(i,a){return Mne(i,a,e,t,n,r)}}function Mne(e,t,n,r,i,a){switch(n){case 2:return xne(t,i,r)[e.getMonth()];case 1:return bne(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=Cne(t),a=wne(t,i,r),s=e.findIndex(e=>{if(Array.isArray(e)){let[t,r]=e,i=n>=t.hours&&o>=t.minutes,a=n0?Math.floor(i/60):Math.ceil(i/60);switch(e){case 0:return(i>=0?`+`:``)+Qv(o,2,a)+Qv(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+Qv(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+Qv(o,2,a)+`:`+Qv(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+Qv(o,2,a)+`:`+Qv(Math.abs(i%60),2,a);default:throw new _i(2310,!1)}}}var Nne=0,ny=4;function Pne(e){let t=Yv(e,Nne,1).getDay();return Yv(e,0,1+(t<=ny?ny:11)-t)}function ry(e){let t=e.getDay(),n=t===0?-3:ny-t;return Yv(e.getFullYear(),e.getMonth(),e.getDate()+n)}function iy(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=ry(n),t=Pne(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return Qv(i,e,Wv(r,Bv.MinusSign))}}function ay(e,t=!1){return function(n,r){return Qv(ry(n).getFullYear(),e,Wv(r,Bv.MinusSign),t)}}var oy=Object.create(null);function Fne(e){if(oy[e])return oy[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=ey(3,Rv.Abbreviated);break;case`GGGG`:t=ey(3,Rv.Wide);break;case`GGGGG`:t=ey(3,Rv.Narrow);break;case`y`:t=$v(0,1,0,!1,!0);break;case`yy`:t=$v(0,2,0,!0,!0);break;case`yyy`:t=$v(0,3,0,!1,!0);break;case`yyyy`:t=$v(0,4,0,!1,!0);break;case`Y`:t=ay(1);break;case`YY`:t=ay(2,!0);break;case`YYY`:t=ay(3);break;case`YYYY`:t=ay(4);break;case`M`:case`L`:t=$v(1,1,1);break;case`MM`:case`LL`:t=$v(1,2,1);break;case`MMM`:t=ey(2,Rv.Abbreviated);break;case`MMMM`:t=ey(2,Rv.Wide);break;case`MMMMM`:t=ey(2,Rv.Narrow);break;case`LLL`:t=ey(2,Rv.Abbreviated,Lv.Standalone);break;case`LLLL`:t=ey(2,Rv.Wide,Lv.Standalone);break;case`LLLLL`:t=ey(2,Rv.Narrow,Lv.Standalone);break;case`w`:t=iy(1);break;case`ww`:t=iy(2);break;case`W`:t=iy(1,!0);break;case`d`:t=$v(2,1);break;case`dd`:t=$v(2,2);break;case`c`:case`cc`:t=$v(7,1);break;case`ccc`:t=ey(1,Rv.Abbreviated,Lv.Standalone);break;case`cccc`:t=ey(1,Rv.Wide,Lv.Standalone);break;case`ccccc`:t=ey(1,Rv.Narrow,Lv.Standalone);break;case`cccccc`:t=ey(1,Rv.Short,Lv.Standalone);break;case`E`:case`EE`:case`EEE`:t=ey(1,Rv.Abbreviated);break;case`EEEE`:t=ey(1,Rv.Wide);break;case`EEEEE`:t=ey(1,Rv.Narrow);break;case`EEEEEE`:t=ey(1,Rv.Short);break;case`a`:case`aa`:case`aaa`:t=ey(0,Rv.Abbreviated);break;case`aaaa`:t=ey(0,Rv.Wide);break;case`aaaaa`:t=ey(0,Rv.Narrow);break;case`b`:case`bb`:case`bbb`:t=ey(0,Rv.Abbreviated,Lv.Standalone,!0);break;case`bbbb`:t=ey(0,Rv.Wide,Lv.Standalone,!0);break;case`bbbbb`:t=ey(0,Rv.Narrow,Lv.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=ey(0,Rv.Abbreviated,Lv.Format,!0);break;case`BBBB`:t=ey(0,Rv.Wide,Lv.Format,!0);break;case`BBBBB`:t=ey(0,Rv.Narrow,Lv.Format,!0);break;case`h`:t=$v(3,1,-12);break;case`hh`:t=$v(3,2,-12);break;case`H`:t=$v(3,1);break;case`HH`:t=$v(3,2);break;case`m`:t=$v(4,1);break;case`mm`:t=$v(4,2);break;case`s`:t=$v(5,1);break;case`ss`:t=$v(5,2);break;case`S`:t=$v(6,1);break;case`SS`:t=$v(6,2);break;case`SSS`:t=$v(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=ty(0);break;case`ZZZZZ`:t=ty(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=ty(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=ty(2);break;default:return null}return oy[e]=t,t}function sy(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function cy(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function ly(e,t,n){let r=e.getTimezoneOffset();return cy(e,-1*(sy(t,r)-r))}function uy(e){if(fy(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 Yv(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(Tne))return dy(n)}let t=new Date(e);if(!fy(t))throw new _i(2311,!1);return t}function dy(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 fy(e){return e instanceof Date&&!isNaN(e.valueOf())}var py=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=C(Os);constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let e=this._viewContainerRef;if(this._viewRef&&e.remove(e.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let t=this._createContextForwardProxy();this._viewRef=e.createEmbeddedView(this.ngTemplateOutlet,t,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector===`outlet`?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,t,n)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,t,n):!1,get:(e,t,n)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,t,n)}})}static ɵfac=function(t){return new(t||e)(am(zm))};static ɵdir=Oh({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[Nc]})}return e})();function my(e,t){return new _i(2100,!1)}var hy=`mediumDate`,gy=new Fi(``),_y=new Fi(``),vy=(()=>{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??hy,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return One(t,e,i||this.locale,a)}catch(t){throw my(e,t.message)}}static ɵfac=function(t){return new(t||e)(am(mv,16),am(gy,24),am(_y,24))};static ɵpipe=kh({name:`date`,type:e,pure:!0})}return e})(),yy=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=kh({name:`json`,type:e,pure:!1})}return e})();function by(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 xy=`browser`,Sy=class{_doc;constructor(e){this._doc=e}manager},Cy=(()=>{class e extends Sy{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)(ua(ks))};static ɵprov=Oi({token:e,factory:e.ɵfac})}return e})(),wy=new Fi(``),Ty=(()=>{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 Cy));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof Cy);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 _i(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(ua(wy),ua(Hs))};static ɵprov=Oi({token:e,factory:e.ɵfac})}return e})(),Ey=`ng-app-id`;function Dy(e){for(let t of e)t.remove()}function Oy(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function ky(e,t,n,r){let i=e.head?.querySelectorAll(`style[${Ey}="${t}"],link[${Ey}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(Ey),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 Ay(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var jy=(()=>{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,ky(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,Oy);t?.forEach(e=>this.addUsage(e,this.external,Ay))}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&&(Dy(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Dy(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,Oy(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,Ay(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)(ua(ks),ua(ic),ua(cc,8),ua(sc))};static ɵprov=Oi({token:e,factory:e.ɵfac})}return e})(),My={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`,math:`http://www.w3.org/1998/Math/MathML`},Ny=/%COMP%/g,Py=`%COMP%`,Fy=`_nghost-${Py}`,Iy=`_ngcontent-${Py}`,Ly=!0,Ry=new Fi(``,{factory:()=>Ly}),zy=new Fi(``);function By(e){return Iy.replace(Ny,e)}function Vy(e){return Fy.replace(Ny,e)}function Hy(e,t){return t.map(t=>t.replace(Ny,e))}var Uy=(()=>{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 Wy(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 Jy?n.applyToHost(e):n instanceof qy&&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 gu.Emulated:r=new Jy(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case gu.ShadowDom:return new Ky(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case gu.ExperimentalIsolatedShadowDom:return new Ky(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new qy(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)(ua(Ty),ua(rm),ua(ic),ua(Ry),ua(ks),ua(Hs),ua(cc),ua(rd,8),ua(zy,8))};static ɵprov=Oi({token:e,factory:e.ɵfac})}return e})(),Wy=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(My[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(Gy(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=Gy(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new _i(-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 _i(-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=My[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=My[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&(Ru.DashCase|Ru.Important)?e.style.setProperty(t,n,r&Ru.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&Ru.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=Iv().getGlobalEventTarget(this.doc,e),!e))throw new _i(-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 Gy(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var Ky=class extends Wy{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=Hy(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=Ay(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)}},qy=class extends Wy{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?Hy(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&&Gu.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Jy=class extends qy{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=By(l),this.hostAttr=Vy(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}},Yy=class e extends _ne{supportsDOMEvents=!0;static makeCurrent(){gne(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=Zy();return t==null?null:Qy(t)}resetBaseElement(){Xy=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return by(document.cookie,e)}},Xy=null;function Zy(){return Xy||=document.head.querySelector(`base`),Xy?Xy.getAttribute(`href`):null}function Qy(e){return new URL(e,document.baseURI).pathname}var $y=[`alt`,`control`,`meta`,`shift`],eb={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},tb={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},nb=(()=>{class e extends Sy{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(()=>Iv().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.`),$y.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=eb[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`),$y.forEach(t=>{if(t!==n){let n=tb[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)(ua(ks))};static ɵprov=Oi({token:e,factory:e.ɵfac})}return e})();async function rb(e,t,n){return pne({rootComponent:e,...ib(t,n)})}function ib(e,t){return{platformRef:t?.platformRef,appProviders:[...lb,...e?.providers??[]],platformProviders:cb}}function ab(){Yy.makeCurrent()}function ob(){return new ec}function sb(){return iu(document),document}var cb=[{provide:sc,useValue:xy},{provide:oc,useValue:ab,multi:!0},{provide:ks,useFactory:sb}],lb=[{provide:Wa,useValue:`root`},{provide:ec,useFactory:ob},{provide:wy,useClass:Cy,multi:!0},{provide:wy,useClass:nb,multi:!0},Uy,{provide:rm,useClass:jy},{provide:jy,useExisting:rm},Ty,{provide:Cp,useExisting:Uy},[]];function ub(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 mb({code:i,why:fb(a.why,e),fix:fb(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:fb(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function _b(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 Cb=Math.random.bind(Math),wb=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Tb(e=21){let t=``,n=e;for(;n--;)t+=wb[Cb()*64|0];return t}var Eb=6e4,Db=e=>e,Ob=Db,{clearTimeout:kb,setTimeout:Ab}=globalThis;function jb(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=Db,deserialize:s=Ob,resolver:c,bind:l=`rpc`,timeout:u=Eb,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}=Sb(),_=Tb();s.i=_;let ee;async function te(n=s){return u>=0&&(ee=Ab(()=>{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{kb(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&&(kb(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(ne),h}function Mb(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var Nb=Object.freeze({type:`object`,additionalProperties:!0});function Pb(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return Nb}return Nb}function Fb(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 Lb(e,t){return Ib(e,t)??[e]}function Rb(e){return typeof e==`string`?`'${e}'`:new Hb().serialize(e)}var zb=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Bb=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[zb.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Vb(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})(),Ub=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Wb=[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],Gb=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,Kb=[],qb=class{_data=new Jb;_hash=new Jb([...Ub]);_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)Kb[n]=e[t+n]|0;else{let e=Kb[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=Kb[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;Kb[n]=t+Kb[n-7]+i+Kb[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+Wb[n]+Kb[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=Jb.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 Yb(e){return new qb().finalize(e).toBase64()}function Xb(e){return Yb(Rb(e))}function Zb(e){return Xb(e)}function Qb(){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 $b=/^[\w+.-]{2,}:\/\//;function ex(e){return e.endsWith(`/`)?e:`${e}/`}function tx(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function nx(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?ex(n)+e.replace(/^\.?\//,``):e);return n}function rx(e,t){if(!t||t===`/`||$b.test(e))return e;let n=tx(t);return e.startsWith(n)?e:nx(n,e)}function ix(e,t){let n=e.match($b);return t+(n?e.slice(n[0].length):e)}var ax=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function ox(e=21){let t=``,n=e;for(;n--;)t+=ax[Math.random()*64|0];return t}var sx=Symbol.for(`immer-nothing`),cx=Symbol.for(`immer-draftable`),lx=Symbol.for(`immer-state`),ux=[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 dx(e,...t){{let n=ux[e],r=Fx(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var fx=Object,px=fx.getPrototypeOf,mx=`constructor`,hx=`prototype`,gx=`configurable`,_x=`enumerable`,vx=`writable`,yx=`value`,bx=e=>!!e&&!!e[lx];function xx(e){return e?wx(e)||jx(e)||!!e[cx]||!!e[mx]?.[cx]||Mx(e)||Nx(e):!1}var Sx=fx[hx][mx].toString(),Cx=new WeakMap;function wx(e){if(!e||!Px(e))return!1;let t=px(e);if(t===null||t===fx[hx])return!0;let n=fx.hasOwnProperty.call(t,mx)&&t[mx];if(n===Object)return!0;if(!Fx(n))return!1;let r=Cx.get(n);return r===void 0&&(r=Function.toString.call(n),Cx.set(n,r)),r===Sx}function Tx(e,t,n=!0){Ex(e)===0?(n?Reflect.ownKeys(e):fx.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ex(e){let t=e[lx];return t?t.type_:jx(e)?1:Mx(e)?2:Nx(e)?3:0}var Dx=(e,t,n=Ex(e))=>n===2?e.has(t):fx[hx].hasOwnProperty.call(e,t),Ox=(e,t,n=Ex(e))=>n===2?e.get(t):e[t],kx=(e,t,n,r=Ex(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Ax(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var jx=Array.isArray,Mx=e=>e instanceof Map,Nx=e=>e instanceof Set,Px=e=>typeof e==`object`,Fx=e=>typeof e==`function`,Ix=e=>typeof e==`boolean`;function Lx(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Rx=e=>Px(e)?e?.[lx]:null,zx=e=>e.copy_||e.base_,Bx=e=>e.modified_?e.copy_:e.base_;function Vx(e,t){if(Mx(e))return new Map(e);if(Nx(e))return new Set(e);if(jx(e))return Array[hx].slice.call(e);let n=wx(e);if(t===!0||t===`class_only`&&!n){let t=fx.getOwnPropertyDescriptors(e);delete t[lx];let n=Reflect.ownKeys(t);for(let r=0;r1&&fx.defineProperties(e,{set:Wx,add:Wx,clear:Wx,delete:Wx}),fx.freeze(e),t&&Tx(e,(e,t)=>{Hx(t,!0)},!1),e)}function Ux(){dx(2)}var Wx={[yx]:Ux};function Gx(e){return e===null||!Px(e)||fx.isFrozen(e)}var Kx=`MapSet`,qx=`Patches`,Jx=`ArrayMethods`,Yx={};function Xx(e){let t=Yx[e];return t||dx(0,e),t}var Zx=e=>!!Yx[e];function Qx(e,t){Yx[e]||(Yx[e]=t)}var $x,eS=()=>$x,tS=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Zx(Kx)?Xx(Kx):void 0,arrayMethodsPlugin_:Zx(Jx)?Xx(Jx):void 0});function nS(e,t){t&&(e.patchPlugin_=Xx(qx),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function rS(e){iS(e),e.drafts_.forEach(oS),e.drafts_=null}function iS(e){e===$x&&($x=e.parent_)}var aS=e=>$x=tS($x,e);function oS(e){let t=e[lx];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function sS(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[lx].modified_&&(rS(t),dx(4)),xx(e)&&(e=cS(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[lx].base_,e,t)}else e=cS(t,n);return lS(t,e,!0),rS(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===sx?void 0:e}function cS(e,t){if(Gx(t))return t;let n=t[lx];if(!n)return _S(t,e.handledSet_,e);if(!dS(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);hS(n,e)}return n.copy_}function lS(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Hx(t,n)}function uS(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var dS=(e,t)=>e.scope_===t,fS=[];function pS(e,t,n,r){let i=zx(e),a=e.type_;if(r!==void 0&&Ox(i,r,a)===t){kx(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Tx(i,(e,n)=>{if(bx(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??fS;for(let e of o)kx(i,e,n,a)}function mS(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!dS(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Bx(i);pS(e,i.draft_??i,a,n),hS(i,r)})}function hS(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)}uS(e)}}function gS(e,t,n){let{scope_:r}=e;if(bx(n)){let i=n[lx];dS(i,r)&&i.callbacks_.push(function(){ES(e),pS(e,n,Bx(i),t)})}else xx(n)&&e.callbacks_.push(function(){let i=zx(e);e.type_===3?i.has(n)&&_S(n,r.handledSet_,r):Ox(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&_S(Ox(e.copy_,t,e.type_),r.handledSet_,r)})}function _S(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||bx(e)||t.has(e)||!xx(e)||Gx(e)?e:(t.add(e),Tx(e,(r,i)=>{if(bx(i)){let t=i[lx];dS(t,n)&&(kx(e,r,Bx(t),e.type_),uS(t))}else xx(i)&&_S(i,t,n)}),e)}function vS(e,t){let n=jx(e),r={type_:+!!n,scope_:t?t.scope_:eS(),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=yS;n&&(i=[r],a=bS);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var yS={get(e,t){if(t===lx)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=zx(e);if(!Dx(i,t,e.type_))return CS(e,i,t);let a=i[t];if(e.finalized_||!xx(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Lx(t))return a;if(a===xS(e.base_,t)||SS(e,t,a)){ES(e);let n=e.type_===1?+t:t,r=OS(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in zx(e)},ownKeys(e){return Reflect.ownKeys(zx(e))},set(e,t,n){let r=wS(zx(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=xS(zx(e),t),i=r?.[lx];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(Ax(n,r)&&(n!==void 0||Dx(e.base_,t,e.type_)))return!0;ES(e),TS(e)}return e.copy_[t]===n&&(n!==void 0||Dx(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),gS(e,t,n),!0)},deleteProperty(e,t){return ES(e),xS(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),TS(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=zx(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[vx]:!0,[gx]:e.type_!==1||t!==`length`,[_x]:r[_x],[yx]:n[t]}},defineProperty(){dx(11)},getPrototypeOf(e){return px(e.base_)},setPrototypeOf(){dx(12)}},bS={};for(let e in yS){let t=yS[e];bS[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}bS.deleteProperty=function(e,t){return isNaN(parseInt(t))&&dx(13),bS.set.call(this,e,t,void 0)},bS.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&dx(14),yS.set.call(this,e[0],t,n,e[0])};function xS(e,t){let n=e[lx];return(n?zx(n):e)[t]}function SS(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!xx(n)||n[lx]?!1:e.baseRefs_.has(n)}function CS(e,t,n){let r=wS(t,n);return r?yx in r?r[yx]:r.get?.call(e.draft_):void 0}function wS(e,t){if(!(t in e))return;let n=px(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=px(n)}}function TS(e){e.modified_||(e.modified_=!0,e.parent_&&TS(e.parent_))}function ES(e){e.copy_||=(e.assigned_=new Map,Vx(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var DS=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Fx(e)&&!Fx(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Fx(t)||dx(6),n!==void 0&&!Fx(n)&&dx(7);let r;if(xx(e)){let i=aS(this),a=OS(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?rS(i):iS(i)}return nS(i,n),sS(r,i)}if(!e||!Px(e)){if(r=t(e),r===void 0&&(r=e),r===sx&&(r=void 0),this.autoFreeze_&&Hx(r,!0),n){let t=[],i=[];Xx(qx).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}dx(1,e)},this.produceWithPatches=(e,t)=>{if(Fx(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]},Ix(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Ix(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Ix(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){xx(e)||dx(8),bx(e)&&(e=kS(e));let t=aS(this),n=OS(t,e,void 0);return n[lx].isManual_=!0,iS(t),n}finishDraft(e,t){let n=e&&e[lx];(!n||!n.isManual_)&&dx(9);let{scope_:r}=n;return nS(r,t),sS(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=Xx(qx).applyPatches_;return bx(e)?r(e,t):this.produce(e,e=>r(e,t))}};function OS(e,t,n,r){let[i,a]=Mx(t)?Xx(Kx).proxyMap_(t,n):Nx(t)?Xx(Kx).proxySet_(t,n):vS(t,n);return(n?.scope_??eS()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?mS(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 kS(e){return bx(e)||dx(10,e),AS(e)}function AS(e){if(!xx(e)||Gx(e))return e;let t=e[lx],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Vx(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Vx(e,!0);let i=n;return Nx(n)&&(n=new Set),Tx(i,(e,t)=>{kx(n,e,AS(t))},r),t&&(t.finalized_=!1),n}function jS(){ux.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=Rx(Ox(e,n.key_)),i=Ox(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||Dx(e,o))||n.parent_.type_===1&&n.parent_.allIndicesReassigned_)return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e{let u=Ox(o,e,c),f=Ox(s,e,c),p=l?Dx(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===sx?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(Nx(e))return new Set(Array.from(e).map(u));let t=Object.create(px(e));for(let n in e)t[n]=u(e[n]);return Dx(e,cx)&&(t[cx]=e[cx]),t}function d(e){return bx(e)?u(e):e}Qx(qx,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var MS=new DS,NS=MS.produce,PS=MS.produceWithPatches.bind(MS),FS=MS.applyPatches.bind(MS),IS=1e3;function LS(e,t){if(e.add(t),e.size>IS){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function RS(e){let{enablePatches:t=!1}=e;t&&jS();let n=Qb(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=ox())=>{i.has(t)||(jS(),r=FS(r,e),LS(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=ox())=>{if(!i.has(a)){if(LS(i,a),t){let[t,i]=PS(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=NS(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var zS=typeof self==`object`?self:globalThis,BS=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),VS=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function HS(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=BS.has(e)?zS[e]:void 0;return n(new(r??zS.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`&&VS.has(a))return n(new zS[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function US(e){return HS(new Map,e)(0)}var WS=``,{toString:GS}={},{keys:KS}=Object;function qS(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=GS.call(e).slice(8,-1);switch(n){case`Array`:return[1,WS];case`Object`:return[2,WS];case`Date`:return[3,WS];case`RegExp`:return[4,WS];case`Map`:return[5,WS];case`Set`:return[6,WS];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function JS([e,t]){return e===0&&(t===`function`||t===`symbol`)}function YS(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]=qS(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 KS(r))(e||!JS(qS(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||!(JS(qS(n))||JS(qS(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!JS(qS(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function XS(e,t={}){let n=[];return YS(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:ZS,stringify:QS}=JSON,$S={json:!0,lossy:!0};function eC(e){return US(ZS(e))}function tC(e){return QS(XS(e,$S))}function nC(e){return US(e)}function rC(e){return tC(e)}function iC(e){return eC(e)}var aC=256,oC=class extends Error{name=`StreamClosedError`};function sC(e={}){let t=e.id??ox(),n=Math.max(0,e.replayWindow??0),r=Qb(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new oC(`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=lC(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 cC(e={}){let t=e.id??ox(),n=Math.max(1,e.highWaterMark??aC),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 lC(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 uC=128;function dC(e){return e.replace(/[^\w-]+/g,`_`).slice(0,uC)}var fC=`modulepreload`,pC=function(e,t){return new URL(e,t).href},mC={},hC=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=pC(t,n),t=s(t),t in mC)return;mC[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`:fC,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)})},gC=`__connection.json`,_C=`__DEVFRAME_CONNECTION__`,vC=`x-birpc-session`,yC=`__rpc-dump/index.json`,bC=`devframe:services`,xC=`devframe_otp`,SC=`devframe_auth_token`;vb.postMessage.remoteAssetsError;var CC=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>Zb(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()}},wC=xb({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 TC(e){if(e.agent&&e.jsonSerializable===!1)throw wC.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function EC(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function DC(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 OC(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 jC(e,t){let n=e.handler;if(!n){let r=await AC(e,t);if(!r.handler)throw wC.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 OC(e.name,r,t),o=await a(...n);return await kC(e.name,i,o)}}var MC=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 jC(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 wC.DF0021({name:e.name});TC(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 wC.DF0022({name:e.name});TC(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 jC(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw wC.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 NC(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 FC(t,`undefined`,r,e);return n}return i!==null&&PC(i,r,e,t),n})}function PC(e,t,n,r){if(typeof e==`bigint`)throw FC(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw FC(r,`Map`,t,n);if(e instanceof Set)throw FC(r,`Set`,t,n);if(e instanceof Date)throw FC(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw FC(r,e.constructor?.name??`class instance`,t,n)}function FC(e,t,n,r){let i=IC(n,r);return wC.DF0020({name:e||``,type:t,path:i})}function IC(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var LC=`__DEVFRAME_CONNECTION_META__`,RC=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function zC(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 BC(){return zC(_C)}function VC(){return zC(LC)}function HC(e){if(e)return e;try{let e=localStorage.getItem(RC);if(e)return e}catch{}return zC(RC)}function UC(e){globalThis[_C]=e,globalThis[LC]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&WC(e.authToken)}function WC(e){try{localStorage.setItem(RC,e)}catch{}globalThis[RC]=e;let t=BC();t&&(globalThis[_C]={...t,authToken:e})}function GC(e){let t=rx(gC,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function KC(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function qC(){let e=BC();if(e)return KC(e,HC()??e.authToken??e.connectionMeta.authToken);let t=VC();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??GC(`./`),authToken:HC(t.authToken)}}async function JC(e={}){if(e.connection){let t=KC(e.connection,HC(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return UC(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:GC(t[0]??`./`),authToken:HC(e.authToken??e.connectionMeta.authToken)};return UC(n),n}let n=qC();if(n){let t=KC(n,HC(e.authToken??n.authToken??n.connectionMeta.authToken));return UC(t),t}let r=[];for(let n of t){let t=rx(gC,n),i=GC(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:HC(e.authToken??r.authToken)};return UC(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var YC=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function XC(e=xC){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function ZC(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 QC(e=xC){let t=XC(e);return t&&ZC(e),t}async function $C(e,t={}){let n=QC(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function ew(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(bC,{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 tw(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:vb.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:vb.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=RS({initialValue:l?.initialValue,enablePatches:!1});async function d(){if(a||e.callEvent(`devframe:rpc:server-state:subscribe`,c),l?.initialValue!==void 0){t.set(c,u);for(let e of i)e(c);return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&u.mutate(()=>o(c,e))}).catch(e=>{console.error(`Error getting server state`,e)}),n.set(c,s(c,u)),u}{let r=await e.call(`devframe:rpc:server-state:get`,c);u.mutate(()=>o(c,r)),t.set(c,u);for(let e of i)e(c);return n.set(c,s(c,u)),u}}return new Promise((t,n)=>{if(e.isTrusted)d().then(t,n);else{t(u);let n=!1;e.events.on(vb.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var nw=new Map;function rw(e=nw){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?NC(n,r??``):`s:${rC(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?iC(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function iw(){}function aw(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 ow(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 sw(e){let{onConnected:t=iw,onError:n=iw,onDisconnected:r=iw,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${SC}=${encodeURIComponent(e.authToken)}`);let s=rw(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=aw(r);if(!e)break;r=e.rest;let{event:t,data:n}=ow(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`,[vC]: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 cw(e,t){let{channel:n,rpcOptions:r={}}=t;return jb(e,{...n,timeout:-1,...r,proxify:!1})}function lw(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(vb.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 YC(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new YC(`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(vb.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 YC(`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(vb.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(vb.client.connectionError,e),m(new YC(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new YC(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),te=cw(a.functions,{channel:ee,rpcOptions:o});a.register({name:vb.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new YC(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(vb.client.connectionError,e),m(e),i.emit(vb.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 YC(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(vb.client.connectionError,e)}return i.emit(vb.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(vb.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(vb.client.error,n,t),Promise.reject(n)):g(te.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(vb.client.error,t,String(e[0]));return}return te.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(vb.client.error,n,t),Promise.reject(n)):g(te.$callOptional(...e),t)},close:()=>{ee.close()}}}function uw(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 dw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=uw(n.sse,r??`./`,location);return lw({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>sw({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 fw(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:pw(r)?fw(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function pw(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function mw(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function hw(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function gw(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function _w(e){if(e.error)throw fw(e.error);return e.output}function vw(e){return e.some(e=>e!=null)}function yw(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function bw(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?nC(e):e}function a(e,t){return i(yw(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 gw(r)?_w(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(mw(r)){if(vw(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(hw(r)){let e=Zb(n),i=r.records[e];if(i)return _w(await s(i,r.serialization));if(r.fallback)return _w(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!vw(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 xw(e){let t=bw(await e.fetchJsonFromBases(yC),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 Sw=``;function Cw(e,t){return`${e}${Sw}${t}`}function ww(e){let t=new Map,n=new Map;e.client.register({name:vb.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(Cw(e,n))?._push(r,i)}}),e.client.register({name:vb.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=Cw(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:vb.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=Cw(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(vb.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(Sw);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=Cw(n,r),o=t.get(a);if(o)return o;let s=cC({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(vb.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=Cw(t,r),a=n.get(i);if(a)return a;let o=sC({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 Tw(){}var Ew=new Map;function Dw(e){let t=e.url;e.authToken&&(t=`${t}?${SC}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=Tw,onError:i=Tw,onDisconnected:a=Tw,definitions:o=Ew}=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=rw(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 Ow(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 ix(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function kw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=Ow(n.websocket,r??`./`,location);return lw({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>Dw({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 Aw(e){return e.includes(`:`)}function jw(e,t){return Aw(t)?t:`${e}:${t}`}function Mw(e){return{async get(t){return(await e()).value()?.[t]},async set(t,n){(await e()).mutate(e=>{if(e===void 0)return{[t]:n};e[t]=n})},async delete(t){(await e()).mutate(e=>{e!==void 0&&delete e[t]})},async all(){return(await e()).value()??{}},async onChange(t){return(await e()).on(`updated`,e=>t(e??{}))}}}function Nw(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=(async()=>(await e.ensureTrusted(),e.sharedState.get(r)))().catch(e=>{throw i=void 0,e}),i}return Mw(a)}function Pw(e,t){return{global:Nw(e,t,`global`),project:Nw(e,t,`project`)}}function Fw(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(Aw(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(jw(t,n),...r)),callEvent:((n,...r)=>e.callEvent(jw(t,n),...r)),callOptional:((n,...r)=>e.callOptional(jw(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(jw(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(jw(t,n),r,i),upload:(n,r)=>e.streaming.upload(jw(t,n),r)}},settings:Pw(e,t),scope:e.scope}}function Iw(){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 Lw(e,t={}){let n=t.modelContext??Iw();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=dC(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=Mb(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Fb(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>Rw(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 Rw(e,t,n){try{let r=Lb(n,e.args?.length);return{content:[{type:`text`,text:zw(await(await jC(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:Bw(e)}]}}}function zw(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function Bw(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 Vw(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 Hw(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Qb(),a=Array.isArray(t)?t:[t],o=await JC(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new CC({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new MC(f),m=e.webmcp===!1?void 0:Lw(p),h,g=!1,_=0,ee;function te(){_++,ee=void 0,d.clear(),r===!0&&d.updateOptions({functions:[]})}r&&(p.register({name:vb.broadcast.cacheInvalidate,type:`event`,handler:te}),i.on(vb.client.connectionStatus,te),i.on(vb.client.isTrustedUpdated,te));async function ne(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(rx(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let re=e.callTimeout??0,ie=re>0?re:1/0,ae,oe={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){let a=performance.now()+ie;if(await n.onRequest?.call(this,e,t,i),r===!0&&e.i&&ae.isTrusted&&!e.m.startsWith(`anonymous:`)&&e.m!==`devframe:rpc:cacheable-functions`){function t(){if(performance.now()>=a)throw new YC(`timeout`,`[devframe] RPC call "${e.m}" timed out after ${re}ms`)}for(;!ee&&(t(),!(g||ae.status!==`connected`));){let e=_;ee=ae.callOptional(`devframe:rpc:cacheable-functions`).then(t=>{e===_&&d.updateOptions({functions:t??[]})}).catch(t=>{throw e===_&&(ee=void 0),t}),await ee}await ee,t()}let o=_;if(r&&e.i&&!g&&ae.isTrusted&&d.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);o===_&&!g&&d.apply(e,n)}else await t(e)}}},se=Vw(e.transport??`auto`,s);ae=se===`static`?await xw({fetchJsonFromBases:ne}):se===`sse`?dw({...oe,sseOptions:e.sseOptions}):kw({...oe,wsOptions:e.wsOptions});let ce;try{ce=new BroadcastChannel(`devframe-auth`)}catch{}let le,ue=!1;function de(e){return((...t)=>ue||!le?e(...t):le.then(()=>e(...t)))}function fe(){g=!0,te();try{h?.(),m?.()}finally{try{ce?.close()}finally{ae.close?.()}}}let pe={events:i,get isTrusted(){return ae.isTrusted},get status(){return ae.status},get connectionError(){return ae.connectionError},get transport(){return ae.transport??se},get connection(){return o},connectionMeta:s,ensureTrusted:ae.ensureTrusted,requestTrust:ae.requestTrust,requestTrustWithToken:async e=>(WC(e),o={...o,authToken:e},ae.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await ae.requestTrustWithCode(e);if(!t)return!1;WC(t),o={...o,authToken:t};try{ce?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>ae.requestAuthCode(e),call:de(ae.call),callEvent:de(ae.callEvent),callOptional:de(ae.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:fe};pe.sharedState=tw(pe),pe.streaming=ww(pe),pe.services=ew(pe);let me=new Map;pe.scope=(e=>{if(!e)return pe;let t=me.get(e);return t||(t=Fw(pe,e),me.set(e,t)),t}),f.rpc=pe;function he(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function ge(){if(e.simpleAuth!==!1&&he()&&typeof globalThis.prompt==`function`)for(await pe.requestAuthCode().catch(()=>{});!pe.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await pe.requestTrustWithCode(t))return}}async function _e(){let t=await ae.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await $C(pe,{param:n}):!1;t||r||pe.isTrusted||await ge()}return le=_e().then(()=>{ue=!0},()=>{ue=!0}),s.mcp&&hC(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-KH4HHvHf-COs_cJTU.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(pe))}).catch(()=>{}),ce&&(ce.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&pe.requestTrustWithToken(e.data.authToken)}),pe}var Uw=Hw,Ww=[`components`,`injectors`,`signals`,`ngrx`,`tanstackQuery`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`,`errors`,`plugins`],Gw=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function Kw(e){return`pangular:${e}`}var qw=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`,`tanstackQuery`,`plugins`],Jw={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}},Yw={"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`},Xw=[[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 Zw(e){return Xw.some(([t])=>t===e)}var Qw=/^[a-z][a-z0-9-]{0,39}$/;function $w(e,t){let n=t.plugins?.[e],r=t.inspectors.plugins&&Qw.test(e)&&(n?.enabled??!0);return{enabled:r,tools:r&&t.agent.tools.plugins&&(n?.tools??!0),actions:r&&t.actions.plugins&&(n?.actions??!0)}}var eT=`pangular`,tT={mod:`Mod`,ctrl:`Ctrl`,control:`Ctrl`,meta:`Meta`,cmd:`Meta`,command:`Meta`,alt:`Alt`,option:`Alt`,opt:`Alt`,shift:`Shift`},nT=[`Mod`,`Ctrl`,`Meta`,`Alt`,`Shift`];function rT(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=tT[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[...nT.filter(e=>n.has(e)),r].join(`+`)}function iT(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 aT(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 oT=[{id:`dashboard`,label:`Dashboard`},{id:`timeline`,label:`Timeline`},{id:`audit`,label:`Audit`},{id:`analog`,label:`Analog`,inspector:`analog`},{id:`components`,label:`Components`,inspector:`components`},{id:`routes`,label:`Routes`,inspector:`router`},{id:`signals`,label:`Signals`,inspector:`signals`},{id:`injectors`,label:`Injectors`,inspector:`injectors`},{id:`store`,label:`Store`,inspector:`ngrx`},{id:`queries`,label:`Queries`,inspector:`tanstackQuery`},{id:`forms`,label:`Forms`,inspector:`forms`},{id:`pipes`,label:`Pipes`,inspector:`pipes`},{id:`network`,label:`SSR & HTTP`,inspector:`http`},{id:`errors`,label:`Errors`,inspector:`errors`},{id:`capacitor`,label:`Capacitor`,inspector:`capacitor`},{id:`plugins`,label:`Plugins`,inspector:`plugins`}],sT=1e4;function cT(e){return oT.filter(t=>!(`inspector`in t)||e.inspectors[t.inspector])}var lT={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`},uT=200;function dT(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 fT(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=e=>{let n=t.get(e)?.trim();return n&&n.length<=uT?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 pT=[{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 mT(e){let t=cT(e).map(e=>({id:`tab:${e.id}`,title:`Go to ${e.label}`,group:`Go to`,keywords:`tab open`})),n=pT.filter(t=>!t.inspector||e.inspectors[t.inspector]).map(({inspector:e,...t})=>t);return[...t,...n]}function hT(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function gT(e,t){return typeof e==`boolean`?e:t}var _T=100,vT=100;function yT(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=vT);return[...new Set(t)].slice(0,_T)}function bT(e,t){let{default:n,min:r,max:i}=Jw[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function xT(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function ST(e){let t=hT(e),n=hT(t.agent),r=hT(t.inspectors),i=hT(n.tools),a=hT(t.actions),o=gT(t.actions,!0),s=hT(t.redaction),c=hT(t.limits),l=xT(Ww,e=>gT(r[e],!0));return{inspectors:l,agent:{readOnly:gT(n.readOnly,!1),tools:xT(Ww,e=>l[e]&&gT(i[e],!0)),browserTools:gT(n.browserTools,!1)},actions:xT(qw,e=>l[e]&&gT(a[e],o)),redaction:{secretNames:yT(s.secretNames),unmask:yT(s.unmask)},limits:Object.fromEntries(Object.keys(Jw).map(e=>[e,bT(c[e],e)])),popup:{hotkey:DT(hT(t.popup).hotkey)},plugins:ET(t.plugins),lint:{rules:wT(t.lint)}}}var CT=200;function wT(e){let t=hT(hT(e).rules),n={};for(let[e,r]of Object.entries(t).slice(0,CT))typeof r==`boolean`&&(n[e]=r);return n}var TT=100;function ET(e){let t={};for(let[n,r]of Object.entries(hT(e)).slice(0,TT)){if(!Qw.test(n))continue;if(typeof r==`boolean`){t[n]={enabled:r,tools:!0,actions:!0};continue}let e=hT(r);r!==void 0&&Object.keys(e).length&&(t[n]={enabled:gT(e.enabled,!0),tools:gT(e.tools,!0),actions:gT(e.actions,!0)})}return t}function DT(e){return e===!1?!1:rT(e)??`Alt+Shift+P`}function OT(e){let t=e?.configs;return ST(t?.[eT])}function kT(e){return`${{forms:`Writing to forms`,router:`Navigating and clearing navigations`,ngrx:`Restoring NgRx state and dispatching actions`,http:`Changing HTTP mock rules and SSR overrides, and clearing HTTP calls`,analog:`Calling API routes and clearing server calls`,components:`Editing component properties and signals`,tanstackQuery:`Invalidating and refetching TanStack queries`,plugins:`Running plugin actions`}[e]} is turned off in the devtools config (actions.${e}).`}var AT=[`pangular:build-meta`],jT={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,tanstackQuery:`TanStack Query`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`,capacitor:`Capacitor`,errors:`Errors`,plugins:`Plugins`},MT={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore and dispatch`,http:`HTTP mocking`,analog:`Analog API calls`,components:`Component edits`,tanstackQuery:`TanStack Query invalidate and refetch`,plugins:`Plugin actions`},NT={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 PT(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=Ww.filter(t=>e.inspectors[t]);n(`Inspectors off`,Ww.filter(t=>!e.inspectors[t]).map(e=>jT[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>jT[e])),n(`Blocked actions`,qw.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>MT[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Limits`,Object.keys(Jw).filter(t=>e.limits[t]!==Jw[t].default).map(t=>NT[t](e.limits[t]))),e.popup.hotkey!==`Alt+Shift+P`&&n(`Popup shortcut`,[e.popup.hotkey===!1?`Off`:e.popup.hotkey]);let i=Object.entries(e.plugins??{});return n(`Plugins off`,i.filter(([,e])=>!e.enabled).map(([e])=>e)),n(`Plugin tools or actions off`,i.filter(([,e])=>e.enabled&&(!e.tools||!e.actions)).map(([e,t])=>`${e} (${[!t.tools&&`tools`,!t.actions&&`actions`].filter(Boolean).join(`, `)})`)),n(`Lint rules off`,Object.entries(e.lint?.rules??{}).filter(([,e])=>!e).map(([e])=>e)),t}function FT(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 IT(e){return!e.tags.length&&!e.directives.length&&!e.text}function LT(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 RT={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 zT(e){let t=/^(\d+)\.(\d+)/.exec(e.trim());return t?`${t[1]}.${t[2]}`:e.trim()}function BT(e){let t=/^(\d+)(?:\.(\d+))?/.exec(e.trim());return t?[Number(t[1]),Number(t[2]??0)]:null}function VT(e,t){let n=BT(e),r=BT(t);return!n||!r?!1:n[0]===r[0]?n[1]>=r[1]:n[0]>r[0]}function HT(e,t){return e?.capabilities?.[t]===!1}function UT(e,t){let n=RT[e],r=`${n.subject} needs Angular ${n.since} or later`;if(!t)return`${r}; this page's Angular version is unknown.`;let i=zT(t);return VT(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 WT=/^on (viewport|interaction|hover)\b/;function GT(e){let t=e.filter(e=>!/^(prefetch|hydrate) /.test(e));return t.length>0&&t.every(e=>WT.test(e))}function KT(e,t){let n=[],r=e.since>0?Math.max(0,Math.round((t-e.since)/1e3)):0;return e.state===`error`&&n.push({kind:`failed`,text:`failed to load`,label:`failed`}),(e.state===`placeholder`||e.state===`initial`)&&r*1e3>=1e4&&n.push(GT(e.triggers)?{kind:`waiting`,text:`waiting for its trigger for ${r}s`,label:`waiting ${r}s`,seconds:r}:{kind:`stuck`,text:`on its placeholder for ${r}s`,label:`stuck ${r}s`,seconds:r}),e.hydrateNever?n.push({kind:`hydrate-never`,text:`hydrate never: the server HTML stays static`,label:`hydrate never`}):e.hydration===`dehydrated`&&n.push({kind:`dehydrated`,text:`still dehydrated`,label:`dehydrated`}),n}var qT=`pangular-page-id`,JT=null;function YT(e){JT=e}function XT(){if(JT)return JT;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(qT)||null)}catch{return null}}function ZT(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 QT(e,t){return e?t?e.pages?.[t]??null:e:null}function $T(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function eE(){return{functions:[...AT]}}function tE(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function nE(e,t,n){return tE(e,t,n).then(e=>e,()=>null)}function rE(e){return e?.connectionMeta.backend===`static`}function iE(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 aE(e=globalThis){delete e.__DEVFRAME_CONNECTION__,delete e.__DEVFRAME_CONNECTION_META__}function oE(e){return e.split(`@`)[1]??``}var sE={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},cE={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},lE=nE,uE={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 dE(e){return uE[e]??e}var fE=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function pE(e,t){return await lE(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function mE(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 hE=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function gE(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(hE,(e,t)=>t??(e===`**`?``:e))}function _E(e){return OT(e?.connectionMeta)}function vE(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)?[...e]:void 0}function yE(e,t){if(!t||typeof t!=`object`)return e;let n=vE(t.secretNames),r=vE(t.unmask);return!n||!r?e:{...e,redaction:{secretNames:n,unmask:r}}}function bE(e,t){return _E(e).actions[t]}var xE={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,queries:`tanstackQuery`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`,capacitor:`capacitor`,errors:`errors`,plugins:`plugins`};function SE(e){return xE[e]}var CE=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function wE(e,t){let n=xE[e];return!n||t.inspectors[n]}function TE(e,t){e&1&&(E(),Og(0,`rect`,5)(1,`rect`,6)(2,`rect`,7)(3,`rect`,8))}function EE(e,t){e&1&&(E(),Og(0,`path`,9)(1,`circle`,10)(2,`circle`,11)(3,`path`,12))}function DE(e,t){e&1&&(E(),Og(0,`path`,13)(1,`path`,14))}function OE(e,t){e&1&&(E(),Og(0,`path`,15)(1,`path`,16)(2,`path`,17))}function kE(e,t){e&1&&(E(),Og(0,`circle`,18)(1,`path`,19)(2,`circle`,20))}function AE(e,t){e&1&&(E(),Og(0,`path`,1))}function jE(e,t){e&1&&(E(),Og(0,`path`,21)(1,`path`,22)(2,`path`,23)(3,`path`,24))}function ME(e,t){e&1&&(E(),Og(0,`ellipse`,25)(1,`path`,26)(2,`path`,27))}function NE(e,t){e&1&&(E(),Og(0,`rect`,28)(1,`path`,29)(2,`path`,30)(3,`path`,31))}function PE(e,t){e&1&&(E(),Og(0,`circle`,32)(1,`path`,9)(2,`path`,33))}function FE(e,t){e&1&&(E(),Og(0,`path`,34)(1,`path`,35)(2,`path`,36)(3,`path`,37)(4,`circle`,38))}function IE(e,t){e&1&&(E(),Og(0,`circle`,39)(1,`path`,40))}function LE(e,t){e&1&&(E(),Og(0,`ellipse`,41)(1,`path`,42)(2,`path`,43)(3,`path`,44)(4,`path`,45))}function RE(e,t){e&1&&(E(),Og(0,`circle`,32)(1,`path`,46)(2,`path`,47))}function zE(e,t){e&1&&(E(),Og(0,`path`,2))}function BE(e,t){e&1&&(E(),Og(0,`path`,3))}function VE(e,t){e&1&&(E(),Og(0,`path`,4))}var HE=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:18,vars:1,consts:[[`viewBox`,`0 0 24 24`,`width`,`16`,`height`,`16`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`1.8`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`,`aria-hidden`,`true`],[`d`,`M22 12h-4l-3 9L9 3l-3 9H2`],[`d`,`M10 3h4v3a2 2 0 1 0 4 0V5h1a2 2 0 0 1 2 2v4h-2a2 2 0 1 0 0 4h2v4a2 2 0 0 1-2 2h-4v-2a2 2 0 1 0-4 0v2H7a2 2 0 0 1-2-2v-4H4a2 2 0 1 1 0-4h1V7a2 2 0 0 1 2-2h3Z`],[`d`,`m8 3 4 8 5-5 5 15H2L8 3z`],[`fill`,`currentColor`,`stroke`,`none`,`transform`,`translate(1.8 1.8) scale(0.85)`,`d`,`M24 3.7l-5.766 5.766 5.725 5.736-3.713 3.712L5.073 3.742 8.786.03l5.736 5.726L20.284 0 24 3.7zM.029 8.785l3.713-3.713 15.173 15.173-3.713 3.714-5.732-5.726L3.7 24 0 20.285l5.754-5.764L.029 8.785z`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`x`,`14`,`y`,`12`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`3`,`y`,`16`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`d`,`M3 12h18`],[`cx`,`7`,`cy`,`12`,`r`,`2`],[`cx`,`14`,`cy`,`12`,`r`,`2`],[`d`,`M18 7v10`],[`d`,`M9 11l2 2 4-4`],[`d`,`M12 3 4 6v6c0 4.5 3.4 8.3 8 9 4.6-.7 8-4.5 8-9V6l-8-3Z`],[`d`,`M12 2 3 7l9 5 9-5-9-5Z`],[`d`,`m3 12 9 5 9-5`],[`d`,`m3 17 9 5 9-5`],[`cx`,`6`,`cy`,`19`,`r`,`3`],[`d`,`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`],[`cx`,`18`,`cy`,`5`,`r`,`3`],[`d`,`M12 22v-5`],[`d`,`M9 8V2`],[`d`,`M15 8V2`],[`d`,`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`],[`cx`,`12`,`cy`,`5`,`rx`,`9`,`ry`,`3`],[`d`,`M3 5v14a9 3 0 0 0 18 0V5`],[`d`,`M3 12a9 3 0 0 0 18 0`],[`x`,`3`,`y`,`4`,`width`,`18`,`height`,`16`,`rx`,`2`],[`d`,`M7 9h10`],[`d`,`M7 13h6`],[`d`,`M7 17h8`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M12 3a14 14 0 0 1 0 18a14 14 0 0 1 0-18Z`],[`d`,`M4 7h10`],[`d`,`M4 17h6`],[`d`,`m14 13 4 4-4 4`],[`d`,`M10 17h8`],[`cx`,`18`,`cy`,`7`,`r`,`3`],[`cx`,`12`,`cy`,`12`,`r`,`3`],[`d`,`M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1Z`],[`cx`,`11`,`cy`,`5`,`rx`,`8`,`ry`,`3`],[`d`,`M3 5v6c0 1.66 3.58 3 8 3`],[`d`,`M3 11v6c0 1.66 3.58 3 8 3`],[`d`,`M21 14a4 4 0 1 1-1.2-2.85L21 12.3`],[`d`,`M21 9v3.3h-3.3`],[`d`,`M12 7v6`],[`d`,`M12 16.5v.01`]],template:function(e,t){if(e&1&&(E(),z(0,`svg`,0),j(1,TE,4,0)(2,EE,4,0)(3,DE,2,0)(4,OE,3,0)(5,kE,3,0)(6,AE,1,0,`:svg:path`,1)(7,jE,4,0)(8,ME,3,0)(9,NE,4,0)(10,PE,3,0)(11,FE,5,0)(12,IE,2,0)(13,LE,5,0)(14,RE,3,0)(15,zE,1,0,`:svg:path`,2)(16,BE,1,0,`:svg:path`,3)(17,VE,1,0,`:svg:path`,4),B()),e&2){let e;O(),M((e=t.name())===`dashboard`?1:e===`timeline`?2:e===`audit`?3:e===`components`?4:e===`routes`?5:e===`signals`?6:e===`injectors`?7:e===`store`?8:e===`forms`?9:e===`network`?10:e===`pipes`?11:e===`settings`?12:e===`queries`?13:e===`errors`?14:e===`plugins`?15:e===`analog`?16:e===`capacitor`?17:-1)}},styles:[`[_nghost-%COMP%] { +`))}}g()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await ee(e.body)}catch(e){if(c.signal.aborted){g();return}h(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l){n(Error(`Devframe SSE channel is closed; message dropped`));return}try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[vC]: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 cw(e,t){let{channel:n,rpcOptions:r={}}=t;return jb(e,{...n,timeout:-1,...r,proxify:!1})}function lw(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(vb.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 YC(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new YC(`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(vb.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 YC(`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(vb.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(vb.client.connectionError,e),m(new YC(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new YC(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),te=cw(a.functions,{channel:ee,rpcOptions:o});a.register({name:vb.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new YC(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(vb.client.connectionError,e),m(e),i.emit(vb.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 YC(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(vb.client.connectionError,e)}return i.emit(vb.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(vb.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(vb.client.error,n,t),Promise.reject(n)):g(te.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(vb.client.error,t,String(e[0]));return}return te.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(vb.client.error,n,t),Promise.reject(n)):g(te.$callOptional(...e),t)},close:()=>{ee.close()}}}function uw(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 dw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=uw(n.sse,r??`./`,location);return lw({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>sw({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 fw(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:pw(r)?fw(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function pw(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function mw(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function hw(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function gw(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function _w(e){if(e.error)throw fw(e.error);return e.output}function vw(e){return e.some(e=>e!=null)}function yw(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function bw(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?nC(e):e}function a(e,t){return i(yw(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 gw(r)?_w(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(mw(r)){if(vw(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(hw(r)){let e=Zb(n),i=r.records[e];if(i)return _w(await s(i,r.serialization));if(r.fallback)return _w(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!vw(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 xw(e){let t=bw(await e.fetchJsonFromBases(yC),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 Sw=``;function Cw(e,t){return`${e}${Sw}${t}`}function ww(e){let t=new Map,n=new Map;e.client.register({name:vb.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(Cw(e,n))?._push(r,i)}}),e.client.register({name:vb.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=Cw(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:vb.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=Cw(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(vb.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(Sw);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=Cw(n,r),o=t.get(a);if(o)return o;let s=cC({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(vb.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=Cw(t,r),a=n.get(i);if(a)return a;let o=sC({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 Tw(){}var Ew=new Map;function Dw(e){let t=e.url;e.authToken&&(t=`${t}?${SC}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=Tw,onError:i=Tw,onDisconnected:a=Tw,definitions:o=Ew}=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=rw(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 Ow(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 ix(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function kw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=Ow(n.websocket,r??`./`,location);return lw({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>Dw({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 Aw(e){return e.includes(`:`)}function jw(e,t){return Aw(t)?t:`${e}:${t}`}function Mw(e){return{async get(t){return(await e()).value()?.[t]},async set(t,n){(await e()).mutate(e=>{if(e===void 0)return{[t]:n};e[t]=n})},async delete(t){(await e()).mutate(e=>{e!==void 0&&delete e[t]})},async all(){return(await e()).value()??{}},async onChange(t){return(await e()).on(`updated`,e=>t(e??{}))}}}function Nw(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=(async()=>(await e.ensureTrusted(),e.sharedState.get(r)))().catch(e=>{throw i=void 0,e}),i}return Mw(a)}function Pw(e,t){return{global:Nw(e,t,`global`),project:Nw(e,t,`project`)}}function Fw(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(Aw(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(jw(t,n),...r)),callEvent:((n,...r)=>e.callEvent(jw(t,n),...r)),callOptional:((n,...r)=>e.callOptional(jw(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(jw(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(jw(t,n),r,i),upload:(n,r)=>e.streaming.upload(jw(t,n),r)}},settings:Pw(e,t),scope:e.scope}}function Iw(){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 Lw(e,t={}){let n=t.modelContext??Iw();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=dC(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=Mb(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Fb(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>Rw(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 Rw(e,t,n){try{let r=Lb(n,e.args?.length);return{content:[{type:`text`,text:zw(await(await jC(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:Bw(e)}]}}}function zw(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function Bw(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 Vw(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 Hw(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Qb(),a=Array.isArray(t)?t:[t],o=await JC(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new CC({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new MC(f),m=e.webmcp===!1?void 0:Lw(p),h,g=!1,_=0,ee;function te(){_++,ee=void 0,d.clear(),r===!0&&d.updateOptions({functions:[]})}r&&(p.register({name:vb.broadcast.cacheInvalidate,type:`event`,handler:te}),i.on(vb.client.connectionStatus,te),i.on(vb.client.isTrustedUpdated,te));async function ne(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(rx(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let re=e.callTimeout??0,ie=re>0?re:1/0,ae,oe={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){let a=performance.now()+ie;if(await n.onRequest?.call(this,e,t,i),r===!0&&e.i&&ae.isTrusted&&!e.m.startsWith(`anonymous:`)&&e.m!==`devframe:rpc:cacheable-functions`){function t(){if(performance.now()>=a)throw new YC(`timeout`,`[devframe] RPC call "${e.m}" timed out after ${re}ms`)}for(;!ee&&(t(),!(g||ae.status!==`connected`));){let e=_;ee=ae.callOptional(`devframe:rpc:cacheable-functions`).then(t=>{e===_&&d.updateOptions({functions:t??[]})}).catch(t=>{throw e===_&&(ee=void 0),t}),await ee}await ee,t()}let o=_;if(r&&e.i&&!g&&ae.isTrusted&&d.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);o===_&&!g&&d.apply(e,n)}else await t(e)}}},se=Vw(e.transport??`auto`,s);ae=se===`static`?await xw({fetchJsonFromBases:ne}):se===`sse`?dw({...oe,sseOptions:e.sseOptions}):kw({...oe,wsOptions:e.wsOptions});let ce;try{ce=new BroadcastChannel(`devframe-auth`)}catch{}let le,ue=!1;function de(e){return((...t)=>ue||!le?e(...t):le.then(()=>e(...t)))}function fe(){g=!0,te();try{h?.(),m?.()}finally{try{ce?.close()}finally{ae.close?.()}}}let pe={events:i,get isTrusted(){return ae.isTrusted},get status(){return ae.status},get connectionError(){return ae.connectionError},get transport(){return ae.transport??se},get connection(){return o},connectionMeta:s,ensureTrusted:ae.ensureTrusted,requestTrust:ae.requestTrust,requestTrustWithToken:async e=>(WC(e),o={...o,authToken:e},ae.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await ae.requestTrustWithCode(e);if(!t)return!1;WC(t),o={...o,authToken:t};try{ce?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>ae.requestAuthCode(e),call:de(ae.call),callEvent:de(ae.callEvent),callOptional:de(ae.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:fe};pe.sharedState=tw(pe),pe.streaming=ww(pe),pe.services=ew(pe);let me=new Map;pe.scope=(e=>{if(!e)return pe;let t=me.get(e);return t||(t=Fw(pe,e),me.set(e,t)),t}),f.rpc=pe;function he(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function ge(){if(e.simpleAuth!==!1&&he()&&typeof globalThis.prompt==`function`)for(await pe.requestAuthCode().catch(()=>{});!pe.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await pe.requestTrustWithCode(t))return}}async function _e(){let t=await ae.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await $C(pe,{param:n}):!1;t||r||pe.isTrusted||await ge()}return le=_e().then(()=>{ue=!0},()=>{ue=!0}),s.mcp&&hC(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-KH4HHvHf-CD3-sSAR.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(pe))}).catch(()=>{}),ce&&(ce.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&pe.requestTrustWithToken(e.data.authToken)}),pe}var Uw=Hw,Ww=[`components`,`injectors`,`signals`,`ngrx`,`tanstackQuery`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`,`errors`,`plugins`],Gw=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function Kw(e){return`pangular:${e}`}var qw=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`,`tanstackQuery`,`plugins`],Jw={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}},Yw={"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`},Xw=[[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 Zw(e){return Xw.some(([t])=>t===e)}var Qw=/^[a-z][a-z0-9-]{0,39}$/;function $w(e,t){let n=t.plugins?.[e],r=t.inspectors.plugins&&Qw.test(e)&&(n?.enabled??!0);return{enabled:r,tools:r&&t.agent.tools.plugins&&(n?.tools??!0),actions:r&&t.actions.plugins&&(n?.actions??!0)}}var eT=`pangular`,tT={mod:`Mod`,ctrl:`Ctrl`,control:`Ctrl`,meta:`Meta`,cmd:`Meta`,command:`Meta`,alt:`Alt`,option:`Alt`,opt:`Alt`,shift:`Shift`},nT=[`Mod`,`Ctrl`,`Meta`,`Alt`,`Shift`];function rT(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=tT[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[...nT.filter(e=>n.has(e)),r].join(`+`)}function iT(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 aT(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 oT=[{id:`dashboard`,label:`Dashboard`},{id:`timeline`,label:`Timeline`},{id:`audit`,label:`Audit`},{id:`analog`,label:`Analog`,inspector:`analog`},{id:`components`,label:`Components`,inspector:`components`},{id:`routes`,label:`Routes`,inspector:`router`},{id:`signals`,label:`Signals`,inspector:`signals`},{id:`injectors`,label:`Injectors`,inspector:`injectors`},{id:`store`,label:`Store`,inspector:`ngrx`},{id:`queries`,label:`Queries`,inspector:`tanstackQuery`},{id:`forms`,label:`Forms`,inspector:`forms`},{id:`pipes`,label:`Pipes`,inspector:`pipes`},{id:`network`,label:`SSR & HTTP`,inspector:`http`},{id:`errors`,label:`Errors`,inspector:`errors`},{id:`capacitor`,label:`Capacitor`,inspector:`capacitor`},{id:`plugins`,label:`Plugins`,inspector:`plugins`}],sT=1e4;function cT(e){return oT.filter(t=>!(`inspector`in t)||e.inspectors[t.inspector])}var lT={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`},uT=200;function dT(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 fT(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=e=>{let n=t.get(e)?.trim();return n&&n.length<=uT?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 pT=[{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 mT(e){let t=cT(e).map(e=>({id:`tab:${e.id}`,title:`Go to ${e.label}`,group:`Go to`,keywords:`tab open`})),n=pT.filter(t=>!t.inspector||e.inspectors[t.inspector]).map(({inspector:e,...t})=>t);return[...t,...n]}function hT(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function gT(e,t){return typeof e==`boolean`?e:t}var _T=100,vT=100;function yT(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=vT);return[...new Set(t)].slice(0,_T)}function bT(e,t){let{default:n,min:r,max:i}=Jw[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function xT(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function ST(e){let t=hT(e),n=hT(t.agent),r=hT(t.inspectors),i=hT(n.tools),a=hT(t.actions),o=gT(t.actions,!0),s=hT(t.redaction),c=hT(t.limits),l=xT(Ww,e=>gT(r[e],!0));return{inspectors:l,agent:{readOnly:gT(n.readOnly,!1),tools:xT(Ww,e=>l[e]&&gT(i[e],!0)),browserTools:gT(n.browserTools,!1)},actions:xT(qw,e=>l[e]&&gT(a[e],o)),redaction:{secretNames:yT(s.secretNames),unmask:yT(s.unmask)},limits:Object.fromEntries(Object.keys(Jw).map(e=>[e,bT(c[e],e)])),popup:{hotkey:DT(hT(t.popup).hotkey)},plugins:ET(t.plugins),lint:{rules:wT(t.lint)}}}var CT=200;function wT(e){let t=hT(hT(e).rules),n={};for(let[e,r]of Object.entries(t).slice(0,CT))typeof r==`boolean`&&(n[e]=r);return n}var TT=100;function ET(e){let t={};for(let[n,r]of Object.entries(hT(e)).slice(0,TT)){if(!Qw.test(n))continue;if(typeof r==`boolean`){t[n]={enabled:r,tools:!0,actions:!0};continue}let e=hT(r);r!==void 0&&Object.keys(e).length&&(t[n]={enabled:gT(e.enabled,!0),tools:gT(e.tools,!0),actions:gT(e.actions,!0)})}return t}function DT(e){return e===!1?!1:rT(e)??`Alt+Shift+P`}function OT(e){let t=e?.configs;return ST(t?.[eT])}function kT(e){return`${{forms:`Writing to forms`,router:`Navigating and clearing navigations`,ngrx:`Restoring NgRx state and dispatching actions`,http:`Changing HTTP mock rules and SSR overrides, and clearing HTTP calls`,analog:`Calling API routes and clearing server calls`,components:`Editing component properties and signals`,tanstackQuery:`Invalidating and refetching TanStack queries`,plugins:`Running plugin actions`}[e]} is turned off in the devtools config (actions.${e}).`}var AT=[`pangular:build-meta`],jT={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,tanstackQuery:`TanStack Query`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`,capacitor:`Capacitor`,errors:`Errors`,plugins:`Plugins`},MT={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore and dispatch`,http:`HTTP mocking`,analog:`Analog API calls`,components:`Component edits`,tanstackQuery:`TanStack Query invalidate and refetch`,plugins:`Plugin actions`},NT={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 PT(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=Ww.filter(t=>e.inspectors[t]);n(`Inspectors off`,Ww.filter(t=>!e.inspectors[t]).map(e=>jT[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>jT[e])),n(`Blocked actions`,qw.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>MT[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Limits`,Object.keys(Jw).filter(t=>e.limits[t]!==Jw[t].default).map(t=>NT[t](e.limits[t]))),e.popup.hotkey!==`Alt+Shift+P`&&n(`Popup shortcut`,[e.popup.hotkey===!1?`Off`:e.popup.hotkey]);let i=Object.entries(e.plugins??{});return n(`Plugins off`,i.filter(([,e])=>!e.enabled).map(([e])=>e)),n(`Plugin tools or actions off`,i.filter(([,e])=>e.enabled&&(!e.tools||!e.actions)).map(([e,t])=>`${e} (${[!t.tools&&`tools`,!t.actions&&`actions`].filter(Boolean).join(`, `)})`)),n(`Lint rules off`,Object.entries(e.lint?.rules??{}).filter(([,e])=>!e).map(([e])=>e)),t}function FT(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 IT(e){return!e.tags.length&&!e.directives.length&&!e.text}function LT(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 RT={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 zT(e){let t=/^(\d+)\.(\d+)/.exec(e.trim());return t?`${t[1]}.${t[2]}`:e.trim()}function BT(e){let t=/^(\d+)(?:\.(\d+))?/.exec(e.trim());return t?[Number(t[1]),Number(t[2]??0)]:null}function VT(e,t){let n=BT(e),r=BT(t);return!n||!r?!1:n[0]===r[0]?n[1]>=r[1]:n[0]>r[0]}function HT(e,t){return e?.capabilities?.[t]===!1}function UT(e,t){let n=RT[e],r=`${n.subject} needs Angular ${n.since} or later`;if(!t)return`${r}; this page's Angular version is unknown.`;let i=zT(t);return VT(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 WT=/^on (viewport|interaction|hover)\b/;function GT(e){let t=e.filter(e=>!/^(prefetch|hydrate) /.test(e));return t.length>0&&t.every(e=>WT.test(e))}function KT(e,t){let n=[],r=e.since>0?Math.max(0,Math.round((t-e.since)/1e3)):0;return e.state===`error`&&n.push({kind:`failed`,text:`failed to load`,label:`failed`}),(e.state===`placeholder`||e.state===`initial`)&&r*1e3>=1e4&&n.push(GT(e.triggers)?{kind:`waiting`,text:`waiting for its trigger for ${r}s`,label:`waiting ${r}s`,seconds:r}:{kind:`stuck`,text:`on its placeholder for ${r}s`,label:`stuck ${r}s`,seconds:r}),e.hydrateNever?n.push({kind:`hydrate-never`,text:`hydrate never: the server HTML stays static`,label:`hydrate never`}):e.hydration===`dehydrated`&&n.push({kind:`dehydrated`,text:`still dehydrated`,label:`dehydrated`}),n}var qT=`pangular-page-id`,JT=null;function YT(e){JT=e}function XT(){if(JT)return JT;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(qT)||null)}catch{return null}}function ZT(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 QT(e,t){return e?t?e.pages?.[t]??null:e:null}function $T(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function eE(){return{functions:[...AT]}}function tE(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function nE(e,t,n){return tE(e,t,n).then(e=>e,()=>null)}function rE(e){return e?.connectionMeta.backend===`static`}function iE(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 aE(e=globalThis){delete e.__DEVFRAME_CONNECTION__,delete e.__DEVFRAME_CONNECTION_META__}function oE(e){return e.split(`@`)[1]??``}var sE={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},cE={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},lE=nE,uE={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 dE(e){return uE[e]??e}var fE=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function pE(e,t){return await lE(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function mE(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 hE=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function gE(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(hE,(e,t)=>t??(e===`**`?``:e))}function _E(e){return OT(e?.connectionMeta)}function vE(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)?[...e]:void 0}function yE(e,t){if(!t||typeof t!=`object`)return e;let n=vE(t.secretNames),r=vE(t.unmask);return!n||!r?e:{...e,redaction:{secretNames:n,unmask:r}}}function bE(e,t){return _E(e).actions[t]}var xE={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,queries:`tanstackQuery`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`,capacitor:`capacitor`,errors:`errors`,plugins:`plugins`};function SE(e){return xE[e]}var CE=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function wE(e,t){let n=xE[e];return!n||t.inspectors[n]}function TE(e,t){e&1&&(E(),Og(0,`rect`,5)(1,`rect`,6)(2,`rect`,7)(3,`rect`,8))}function EE(e,t){e&1&&(E(),Og(0,`path`,9)(1,`circle`,10)(2,`circle`,11)(3,`path`,12))}function DE(e,t){e&1&&(E(),Og(0,`path`,13)(1,`path`,14))}function OE(e,t){e&1&&(E(),Og(0,`path`,15)(1,`path`,16)(2,`path`,17))}function kE(e,t){e&1&&(E(),Og(0,`circle`,18)(1,`path`,19)(2,`circle`,20))}function AE(e,t){e&1&&(E(),Og(0,`path`,1))}function jE(e,t){e&1&&(E(),Og(0,`path`,21)(1,`path`,22)(2,`path`,23)(3,`path`,24))}function ME(e,t){e&1&&(E(),Og(0,`ellipse`,25)(1,`path`,26)(2,`path`,27))}function NE(e,t){e&1&&(E(),Og(0,`rect`,28)(1,`path`,29)(2,`path`,30)(3,`path`,31))}function PE(e,t){e&1&&(E(),Og(0,`circle`,32)(1,`path`,9)(2,`path`,33))}function FE(e,t){e&1&&(E(),Og(0,`path`,34)(1,`path`,35)(2,`path`,36)(3,`path`,37)(4,`circle`,38))}function IE(e,t){e&1&&(E(),Og(0,`circle`,39)(1,`path`,40))}function LE(e,t){e&1&&(E(),Og(0,`ellipse`,41)(1,`path`,42)(2,`path`,43)(3,`path`,44)(4,`path`,45))}function RE(e,t){e&1&&(E(),Og(0,`circle`,32)(1,`path`,46)(2,`path`,47))}function zE(e,t){e&1&&(E(),Og(0,`path`,2))}function BE(e,t){e&1&&(E(),Og(0,`path`,3))}function VE(e,t){e&1&&(E(),Og(0,`path`,4))}var HE=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:18,vars:1,consts:[[`viewBox`,`0 0 24 24`,`width`,`16`,`height`,`16`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`1.8`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`,`aria-hidden`,`true`],[`d`,`M22 12h-4l-3 9L9 3l-3 9H2`],[`d`,`M10 3h4v3a2 2 0 1 0 4 0V5h1a2 2 0 0 1 2 2v4h-2a2 2 0 1 0 0 4h2v4a2 2 0 0 1-2 2h-4v-2a2 2 0 1 0-4 0v2H7a2 2 0 0 1-2-2v-4H4a2 2 0 1 1 0-4h1V7a2 2 0 0 1 2-2h3Z`],[`d`,`m8 3 4 8 5-5 5 15H2L8 3z`],[`fill`,`currentColor`,`stroke`,`none`,`transform`,`translate(1.8 1.8) scale(0.85)`,`d`,`M24 3.7l-5.766 5.766 5.725 5.736-3.713 3.712L5.073 3.742 8.786.03l5.736 5.726L20.284 0 24 3.7zM.029 8.785l3.713-3.713 15.173 15.173-3.713 3.714-5.732-5.726L3.7 24 0 20.285l5.754-5.764L.029 8.785z`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`x`,`14`,`y`,`12`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`3`,`y`,`16`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`d`,`M3 12h18`],[`cx`,`7`,`cy`,`12`,`r`,`2`],[`cx`,`14`,`cy`,`12`,`r`,`2`],[`d`,`M18 7v10`],[`d`,`M9 11l2 2 4-4`],[`d`,`M12 3 4 6v6c0 4.5 3.4 8.3 8 9 4.6-.7 8-4.5 8-9V6l-8-3Z`],[`d`,`M12 2 3 7l9 5 9-5-9-5Z`],[`d`,`m3 12 9 5 9-5`],[`d`,`m3 17 9 5 9-5`],[`cx`,`6`,`cy`,`19`,`r`,`3`],[`d`,`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`],[`cx`,`18`,`cy`,`5`,`r`,`3`],[`d`,`M12 22v-5`],[`d`,`M9 8V2`],[`d`,`M15 8V2`],[`d`,`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`],[`cx`,`12`,`cy`,`5`,`rx`,`9`,`ry`,`3`],[`d`,`M3 5v14a9 3 0 0 0 18 0V5`],[`d`,`M3 12a9 3 0 0 0 18 0`],[`x`,`3`,`y`,`4`,`width`,`18`,`height`,`16`,`rx`,`2`],[`d`,`M7 9h10`],[`d`,`M7 13h6`],[`d`,`M7 17h8`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M12 3a14 14 0 0 1 0 18a14 14 0 0 1 0-18Z`],[`d`,`M4 7h10`],[`d`,`M4 17h6`],[`d`,`m14 13 4 4-4 4`],[`d`,`M10 17h8`],[`cx`,`18`,`cy`,`7`,`r`,`3`],[`cx`,`12`,`cy`,`12`,`r`,`3`],[`d`,`M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1Z`],[`cx`,`11`,`cy`,`5`,`rx`,`8`,`ry`,`3`],[`d`,`M3 5v6c0 1.66 3.58 3 8 3`],[`d`,`M3 11v6c0 1.66 3.58 3 8 3`],[`d`,`M21 14a4 4 0 1 1-1.2-2.85L21 12.3`],[`d`,`M21 9v3.3h-3.3`],[`d`,`M12 7v6`],[`d`,`M12 16.5v.01`]],template:function(e,t){if(e&1&&(E(),z(0,`svg`,0),j(1,TE,4,0)(2,EE,4,0)(3,DE,2,0)(4,OE,3,0)(5,kE,3,0)(6,AE,1,0,`:svg:path`,1)(7,jE,4,0)(8,ME,3,0)(9,NE,4,0)(10,PE,3,0)(11,FE,5,0)(12,IE,2,0)(13,LE,5,0)(14,RE,3,0)(15,zE,1,0,`:svg:path`,2)(16,BE,1,0,`:svg:path`,3)(17,VE,1,0,`:svg:path`,4),B()),e&2){let e;O(),M((e=t.name())===`dashboard`?1:e===`timeline`?2:e===`audit`?3:e===`components`?4:e===`routes`?5:e===`signals`?6:e===`injectors`?7:e===`store`?8:e===`forms`?9:e===`network`?10:e===`pipes`?11:e===`settings`?12:e===`queries`?13:e===`errors`?14:e===`plugins`?15:e===`analog`?16:e===`capacitor`?17:-1)}},styles:[`[_nghost-%COMP%] { display: inline-flex; flex-shrink: 0; }`]})},UE=(e,t)=>t.tab,WE=(e,t)=>t.label;function GE(e,t){e&1&&K(0),e&2&&J(` `,W().meta()?.projectName,` `)}function KE(e,t){e&1&&K(0,` Project details unavailable `)}function qE(e,t){e&1&&K(0,` Loading… `)}function JE(e,t){e&1&&(K(0,` Run `),I(1,`code`),K(2,`pangular build`),L(),K(3,` again to rebuild the report. `))}function YE(e,t){e&1&&K(0,` Check that the dev server is running. `)}function XE(e,t){if(e&1){let e=V();I(0,`button`,12),H(`click`,function(){return w(e),T(W(2).loadMeta())}),K(1,`Try again`),L()}}function ZE(e,t){if(e&1&&(I(0,`p`,10),j(1,JE,4,0)(2,YE,1,0),L(),j(3,XE,2,0,`button`,11)),e&2){let e=W();O(),M(e.staticReport()?1:2),O(2),M(e.staticReport()?-1:3)}}function QE(e,t){e&1&&(I(0,`li`,5)(1,`span`),K(2,`Analog`),L(),K(3),L()),e&2&&(O(3),q(t))}function $E(e,t){e&1&&(I(0,`li`)(1,`span`),K(2,`Change detection`),L(),K(3),L()),e&2&&(O(3),q(t))}function eD(e,t){if(e&1&&(I(0,`span`,19),K(1),L(),I(2,`span`,20),K(3),L()),e&2){let e=W().$implicit,t=W();O(),q(t.cards()[e.tab]?.value),O(2),q(t.cards()[e.tab]?.sub)}}function tD(e,t){e&1&&(I(0,`span`,21),K(1,`–`),L(),I(2,`span`,20),K(3,`Count unavailable`),L())}function nD(e,t){e&1&&(R(0,`span`,22),I(1,`span`,20),K(2,`Counting…`),L())}function rD(e,t){if(e&1){let e=V();I(0,`button`,13),H(`click`,function(){let t=w(e).$implicit;return T(W().navigate.emit(t.tab))}),I(1,`span`,14)(2,`span`,15),R(3,`app-tab-icon`,16),L(),I(4,`span`,17),K(5,`→`),L()(),I(6,`span`,18),K(7),L(),j(8,eD,4,2)(9,tD,4,0)(10,nD,3,0),L()}if(e&2){let e,n=t.$implicit,r=t.$index,i=W().stateOf(n.tab);y_(`animation-delay`,60*r,`ms`),A(`aria-busy`,i===`loading`),O(3),F(`name`,n.tab),O(4),q(n.label),O(),M((e=i)===`ready`?8:e===`error`?9:10)}}function iD(e,t){e&1&&(I(0,`p`),K(1,`Loading…`),L())}function aD(e,t){if(e&1&&(I(0,`div`)(1,`dt`),K(2),L(),I(3,`dd`),K(4),L()()),e&2){let e=t.$implicit;O(2),q(e.label),O(2),q(e.value)}}function oD(e,t){if(e&1&&(I(0,`dl`),N(1,aD,5,2,`div`,null,WE),L()),e&2){let e=W();O(),P(e.configItems())}}function sD(e,t){e&1&&(I(0,`p`),K(1,`Defaults`),L())}var cD=[{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 lD(e){return cD.filter(t=>wE(t.tab,e))}var uD={zoneless:`Zoneless`,zone:`zone.js`,"zone-unused":`Zoneless, zone.js loaded`};function dD(e){return e&&Object.hasOwn(uD,e)?uD[e]:null}var fD=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),pD={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 mD(e,t,n){return`${e} ${e===1?t:n}`}function hD(e,t){for(let n of e??[])t(n),hD(n.children,t)}function gD(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 · ${mD(t,`directive`,`directives`)}`}}function _D(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 · ${mD(t,`redirect`,`redirects`)}`}}function vD(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]=pD[e]??[e,e];return mD(t,n,r)});return{value:e.length,sub:n.join(` · `)}}function yD(e,t){let n=e?.forms??[],r=t?n.filter(e=>oE(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 bD(e){return e.cancelled||e.status===void 0?!1:e.status===0||e.status>=400}function xD(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(bD).length;return{value:o.length,sub:`${o.length===1?`call`:`calls`} · ${s} failed`}}var SD=class e{rpc=$(null);navigate=bv();staticReport=X(()=>rE(this.rpc()));meta=D(null);redaction=D(null);config=X(()=>yE(_E(this.rpc()),this.redaction()));stats=X(()=>this.rpc()?lD(this.config()):[]);configItems=X(()=>PT(this.config()));metaState=D(`loading`);states=D({});rows=D({});injectorTree=D(null);signalGraph=D(null);formsState=D(null);httpState=D(null);pageId=XT();destroyRef=C(As);stopLive=[];zone=X(()=>dD(QT(this.injectorTree(),this.pageId)?.zone));liveInjectors=X(()=>{let e=QT(this.injectorTree(),this.pageId);if(!e?.roots?.length)return null;let t=0,n=0,r=e=>{t++,n+=e.providers?.length??0};return hD(e.roots,r),hD(e.environment,r),{injectors:t,providers:n}});liveSignals=X(()=>{let e=$T(this.signalGraph(),this.pageId);return e?.nodes?.length?e.nodes.filter(e=>fD.has(e.kind??``)).length:null});cards=X(()=>{let e=this.rows(),t={};if(e.components&&(t.components=gD(e.components)),e.routes&&(t.routes=_D(e.routes)),e.store&&(t.store=vD(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 · ${mD(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=yD(i,this.pageId));let a=this.httpState();return a&&(t.network=xD(a,this.pageId)),t});loadMeta(e=this.rpc()){e&&(this.metaState.set(`loading`),e.scope(`pangular`).rpc.call(`build-meta`).then(t=>{this.rpc()===e&&(this.meta.set(t),this.metaState.set(`ready`))}).catch(()=>{this.rpc()===e&&this.metaState.set(`error`)}))}loadRedaction(e){this.redaction.set(null),!rE(e)&&tE(e,`redaction-config`).then(t=>{this.rpc()===e&&this.redaction.set(t)}).catch(()=>{})}constructor(){_c(()=>{let e=this.rpc();if(!e)return;let t=e.scope(`pangular`);this.states.set({}),this.rows.set({}),this.formsState.set(null),this.httpState.set(null),this.loadMeta(e),this.loadRedaction(e);let n=_E(e),r=e=>wE(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)),wE(`forms`,t)&&r(`forms`,e=>this.formsState.set(e??{}),`forms`),wE(`network`,t)&&r(`http`,e=>this.httpState.set(e??{}),`network`)])}unwatch(){for(let e of this.stopLive.splice(0))e()}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:33,vars:14,consts:[[`aria-labelledby`,`project-title`,1,`project`],[1,`project-head`],[1,`eyebrow`],[`id`,`project-title`],[1,`chips`],[1,`analog`],[1,`grid`],[`type`,`button`,1,`stat`,3,`animation-delay`],[`aria-labelledby`,`config-title`,1,`config`],[`id`,`config-title`],[1,`hint`],[`type`,`button`,1,`retry`],[`type`,`button`,1,`retry`,3,`click`],[`type`,`button`,1,`stat`,3,`click`],[1,`top`],[1,`icon`],[3,`name`],[`aria-hidden`,`true`,1,`go`],[1,`label`],[1,`big`],[1,`sub`],[1,`big`,`muted`],[`aria-hidden`,`true`,1,`big`,`skeleton`]],template:function(e,t){if(e&1&&(I(0,`section`,0)(1,`div`,1)(2,`p`,2),K(3,`Project`),L(),I(4,`h2`,3),j(5,GE,1,1)(6,KE,1,0)(7,qE,1,0),L(),j(8,ZE,4,2),L(),I(9,`ul`,4)(10,`li`)(11,`span`),K(12,`Angular`),L(),K(13),L(),I(14,`li`)(15,`span`),K(16,`TypeScript`),L(),K(17),L(),I(18,`li`)(19,`span`),K(20,`SSR`),L(),K(21),L(),j(22,QE,4,1,`li`,5),j(23,$E,4,1,`li`),L()(),I(24,`div`,6),N(25,rD,11,6,`button`,7,UE),L(),I(27,`section`,8)(28,`h2`,9),K(29,`Configuration`),L(),j(30,iD,2,0,`p`)(31,oD,3,0,`dl`)(32,sD,2,0,`p`),L()),e&2){let e,n,r;A(`aria-busy`,t.metaState()===`loading`),O(4),G(`muted`,t.metaState()!==`ready`),O(),M((e=t.metaState())===`ready`?5:e===`error`?6:7),O(3),M(t.metaState()===`error`?8:-1),O(),G(`pending`,t.metaState()===`loading`),O(4),q(t.meta()?.angularVersion??`…`),O(4),q(t.meta()?.typescript??`…`),O(4),q(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),O(),M((n=t.meta()?.analog)?22:-1,n),O(),M((r=t.zone())?23:-1,r),O(2),P(t.stats()),O(2),A(`aria-busy`,!t.rpc()),O(3),M(t.rpc()?t.configItems().length?31:32:30)}},dependencies:[HE],styles:[`[_nghost-%COMP%] { @@ -10089,7 +10089,7 @@ textarea[aria-invalid=true][_ngcontent-%COMP%] { .kv[_ngcontent-%COMP%] { grid-template-columns: minmax(0, 1fr); } -}`]})};function Eq(e,t){let{start:n,end:r}=t.range();return e.slice(n,r).map((e,t)=>({entry:e,index:n+t}))}function Dq(e){let t=e?.pages;return!t||typeof t!=`object`||Array.isArray(t)?[]:Object.values(t).filter(e=>{let t=e;return!!t&&typeof t.pageId==`string`&&Array.isArray(t.clients)&&Array.isArray(t.queries)&&Array.isArray(t.mutations)}).sort((e,t)=>t.reportedAt-e.reportedAt)}function Oq(e){return e.invalidated?`invalidated`:e.stale?`stale`:`fresh`}function kq(e,t){if(!t)return`never`;let n=Math.max(0,Math.round(e/1e3));return n<60?`${n} s ago`:n<3600?`${Math.round(n/60)} min ago`:`${Math.round(n/3600)} h ago`}function Aq(e){return e===void 0?`not set`:e===null?`Infinity`:e===`static`?`static`:e<1e3?`${e} ms`:e<6e4?`${Math.round(e/100)/10} s`:`${Math.round(e/6e3)/10} min`}function jq(e,t){return t===`fetching`?`accent`:t===`paused`?`warn`:e===`error`?`danger`:e===`success`?`ok`:e===`pending`?`warn`:`plain`}function Mq(e,t){switch(t){case`all`:return!0;case`fetching`:return e.fetchStatus===`fetching`;case`stale`:return e.stale||e.invalidated;case`inactive`:return e.observers===0;default:return e.status===t}}var Nq=[`detailPanel`],Pq=(e,t)=>({preview:e,id:t}),Fq=(e,t)=>t.id;function Iq(e,t){e&1&&(I(0,`p`,3),K(1,`Loading queries…`),L())}function Lq(e,t){if(e&1){let e=V();I(0,`div`,4)(1,`p`),K(2,`Can't read TanStack Query from the devtools server.`),L(),I(3,`button`,6),H(`click`,function(){return w(e),T(W().retry())}),K(4,`Retry`),L()()}}function Rq(e,t){e&1&&(I(0,`p`,7),K(1,`The connected page has no QueryClient yet.`),L(),I(2,`p`),K(3,` Add `),I(4,`code`),K(5,`provideTanStackQuery(new QueryClient())`),L(),K(6,` to the app's providers. The tab reads it once something in the app injects it, such as `),I(7,`code`),K(8,`injectQuery()`),L(),K(9,`. `),L())}function zq(e,t){e&1&&(I(0,`p`,7),K(1,`No page reports a QueryClient yet.`),L(),I(2,`p`),K(3,` Open the app with the overlay loaded. The tab reads the `),I(4,`code`),K(5,`QueryClient`),L(),K(6,` that `),I(7,`code`),K(8,`provideTanStackQuery()`),L(),K(9,` registers, once something in the app injects it. `),L())}function Bq(e,t){if(e&1&&(I(0,`div`,5),j(1,Rq,10,0)(2,zq,10,0),L()),e&2){let e=W();O(),M(e.connected()?1:2)}}function Vq(e,t){if(e&1){let e=V();I(0,`app-select`,22),H(`valueChange`,function(t){return w(e),T(W(2).status.set(t??`all`))}),L()}if(e&2){let e=W(2);F(`options`,e.filters)(`value`,e.status())}}function Hq(e,t){if(e&1){let e=V();I(0,`app-select`,23),H(`valueChange`,function(t){return w(e),T(W(2).selectPage(t))}),L()}if(e&2){let e=W(2);F(`options`,e.pageOptions())(`value`,e.page()?.pageId??null)}}function Uq(e,t){if(e&1&&(I(0,`p`,24),K(1),L()),e&2){let e=W(),t=W(2);O(),Y(` The page reports the `,t.view()===`queries`?`300 queries`:`100 mutations`,` it updated last and leaves out `,t.view()===`queries`?e.queries:e.mutations,` more. `)}}function Wq(e,t){if(e&1&&j(0,Uq,2,2,`p`,24),e&2){let e=t;M(e.queries||e.mutations?0:-1)}}function Gq(e,t){e&1&&(I(0,`p`,7),K(1,`No query in the cache yet.`),L(),I(2,`p`),K(3,`Queries show up here when the app creates them with `),I(4,`code`),K(5,`injectQuery()`),L(),K(6,`.`),L())}function Kq(e,t){e&1&&(I(0,`p`,7),K(1,`No mutation yet.`),L(),I(2,`p`),K(3,`Mutations show up here once the app calls `),I(4,`code`),K(5,`mutate()`),L(),K(6,`.`),L())}function qq(e,t){if(e&1&&(I(0,`div`,5),j(1,Gq,7,0)(2,Kq,7,0),L()),e&2){let e=W(2);O(),M(e.view()===`queries`?1:2)}}function Jq(e,t){if(e&1){let e=V();I(0,`div`,5)(1,`p`,7),K(2,`Nothing matches the filters.`),L(),I(3,`button`,6),H(`click`,function(){w(e),W();let t=Qg(17);return W().clearFilters(),T(t.focus())}),K(4,` Clear filters `),L()()}}function Yq(e,t){if(e&1){let e=V();I(0,`li`)(1,`button`,28),H(`click`,function(){let t=w(e).$implicit;return T(W(3).select(t.id))}),I(2,`span`,29)(3,`code`,30),K(4),L(),I(5,`span`,31),K(6),L()(),I(7,`span`,32),K(8),L()()()}if(e&2){let e=t.$implicit,n=W(3);O(),G(`selected`,e.id===n.selected()?.id),A(`aria-pressed`,e.id===n.selected()?.id),O(2),F(`title`,e.label),O(),q(e.label),O(),A(`data-tone`,e.tone),O(),q(e.status),O(2),q(e.meta)}}function Xq(e,t){if(e&1&&(I(0,`span`,35),K(1),L()),e&2){let e=W();O(),Y(`(`,e.dataUpdateCount,` `,e.dataUpdateCount===1?`update`:`updates`,`)`)}}function Zq(e,t){e&1&&(I(0,`span`,35),K(1,`(disabled)`),L())}function Qq(e,t){if(e&1&&(I(0,`dt`),K(1,`Failures`),L(),I(2,`dd`),K(3),L()),e&2){let e=W();O(3),q(e.failureCount)}}function $q(e,t){if(e&1&&(I(0,`dt`),K(1,`Error`),L(),I(2,`dd`)(3,`code`,41),K(4),L()()),e&2){let e=W();O(4),q(e.error)}}function eJ(e,t){if(e&1&&(I(0,`p`,38),K(1),L()),e&2){let e=W(4);O(),q(e.writesOff)}}function tJ(e,t){e&1&&(I(0,`p`,35),K(1,`No data yet.`),L())}function nJ(e,t){if(e&1&&Mg(0,40),e&2){let e=W();W(3),F(`ngTemplateOutlet`,Qg(5))(`ngTemplateOutletContext`,av(2,Pq,e.preview,e.id))}}function rJ(e,t){if(e&1){let e=V();I(0,`h2`,33)(1,`code`),K(2),L()(),I(3,`dl`,34)(4,`dt`),K(5,`Status`),L(),I(6,`dd`)(7,`span`,31),K(8),L()(),I(9,`dt`),K(10,`Fetch status`),L(),I(11,`dd`),K(12),L(),I(13,`dt`),K(14,`Freshness`),L(),I(15,`dd`),K(16),L(),I(17,`dt`),K(18,`Data updated`),L(),I(19,`dd`),K(20),j(21,Xq,2,2,`span`,35),L(),I(22,`dt`),K(23,`Observers`),L(),I(24,`dd`),K(25),j(26,Zq,2,0,`span`,35),L(),I(27,`dt`),K(28,`staleTime`),L(),I(29,`dd`),K(30),L(),I(31,`dt`),K(32,`gcTime`),L(),I(33,`dd`),K(34),L(),j(35,Qq,4,1),j(36,$q,5,1),L(),I(37,`div`,36)(38,`button`,37),H(`click`,function(){let t=w(e);return T(W(3).act(`invalidate`,t.id))}),K(39,` Invalidate `),L(),I(40,`button`,37),H(`click`,function(){let t=w(e);return T(W(3).act(`refetch`,t.id))}),K(41,` Refetch `),L()(),j(42,eJ,2,1,`p`,38),I(43,`h3`,39),K(44,`Data`),L(),j(45,tJ,2,0,`p`,35)(46,nJ,1,5,`ng-container`,40)}if(e&2){let e=t,n=W(3);O(2),q(e.keyText),O(5),A(`data-tone`,n.tone(e.status)),O(),q(e.status),O(4),q(e.fetchStatus),O(4),q(n.freshnessOf(e)),O(4),J(` `,n.age(e.dataUpdatedAt),` `),O(),M(e.dataUpdateCount?21:-1),O(4),J(` `,e.observers,` `),O(),M(e.disabled?26:-1),O(4),q(n.duration(e.staleTime)),O(4),q(n.duration(e.gcTime)),O(),M(e.failureCount?35:-1),O(),M(e.error?36:-1),O(2),F(`disabled`,n.busy()||!n.canWrite()),A(`aria-describedby`,n.canWrite()?null:`query-writes-off`),O(2),F(`disabled`,n.busy()||!n.canWrite()),A(`aria-describedby`,n.canWrite()?null:`query-writes-off`),O(2),M(n.canWrite()?-1:42),O(3),M(e.hasData?46:45)}}function iJ(e,t){e&1&&(I(0,`span`,35),K(1,`(paused)`),L())}function aJ(e,t){if(e&1&&(I(0,`dt`),K(1,`Failures`),L(),I(2,`dd`),K(3),L()),e&2){let e=W();O(3),q(e.failureCount)}}function oJ(e,t){if(e&1&&(I(0,`dt`),K(1,`Error`),L(),I(2,`dd`)(3,`code`,41),K(4),L()()),e&2){let e=W();O(4),q(e.error)}}function sJ(e,t){if(e&1&&(I(0,`h2`,33)(1,`code`),K(2),L()(),I(3,`dl`,34)(4,`dt`),K(5,`Status`),L(),I(6,`dd`)(7,`span`,31),K(8),L(),j(9,iJ,2,0,`span`,35),L(),I(10,`dt`),K(11,`Submitted`),L(),I(12,`dd`),K(13),L(),j(14,aJ,4,1),j(15,oJ,5,1),L(),I(16,`h3`,39),K(17,`Variables and data`),L(),Mg(18,40)),e&2){let e=t,n=W(3),r=Qg(5);O(2),q(n.mutationLabel(e)),O(5),A(`data-tone`,n.tone(e.status)),O(),q(e.status),O(),M(e.isPaused?9:-1),O(4),q(n.age(e.submittedAt)),O(),M(e.failureCount?14:-1),O(),M(e.error?15:-1),O(3),F(`ngTemplateOutlet`,r)(`ngTemplateOutletContext`,av(9,Pq,e.variables,e.id))}}function cJ(e,t){if(e&1&&(I(0,`h2`,42),K(1,`Details`),L(),I(2,`p`,35),K(3),L()),e&2){let e=W(3);O(3),J(` Select a `,e.view()===`queries`?`query`:`mutation`,` to see its details. `)}}function lJ(e,t){if(e&1&&(I(0,`div`,21)(1,`ul`,25),N(2,Yq,9,8,`li`,null,Fq),L(),I(4,`section`,26,2),j(6,rJ,47,19)(7,sJ,19,12)(8,cJ,4,1),I(9,`p`,27),K(10),L()()()),e&2){let e,t=W(2);O(),A(`aria-label`,t.view()===`queries`?`Queries`:`Mutations`),O(),P(t.rows()),O(4),M((e=t.selectedQuery())?6:(e=t.selectedMutation())?7:8,e),O(4),q(t.message())}}function Ine(e,t){if(e&1){let e=V();I(0,`p`,8),K(1,` The queries and mutations of the TanStack Query client the app provides, read from the live page. Keys, errors and data are masked like other live data. `),L(),I(2,`div`,9)(3,`div`,10)(4,`button`,11),H(`click`,function(){return w(e),T(W().setView(`queries`))}),K(5,` Queries `),I(6,`span`,12),K(7),L()(),I(8,`button`,11),H(`click`,function(){return w(e),T(W().setView(`mutations`))}),K(9,` Mutations `),I(10,`span`,12),K(11),L()()(),I(12,`div`,13),E(),I(13,`svg`,14),R(14,`circle`,15)(15,`path`,16),L(),bs(),I(16,`input`,17,1),H(`input`,function(t){return w(e),T(W().filter.set(t.target.value))})(`keydown.escape`,function(){return w(e),T(W().filter.set(``))}),L()(),j(18,Vq,1,2,`app-select`,18),j(19,Hq,1,2,`app-select`,19),I(20,`span`,20),K(21),L()(),j(22,Wq,1,1),j(23,qq,3,1,`div`,5)(24,Jq,5,0,`div`,5)(25,lJ,11,3,`div`,21)}if(e&2){let e,t=W();O(4),A(`aria-pressed`,t.view()===`queries`),O(3),q(t.page()?.queries.length??0),O(),A(`aria-pressed`,t.view()===`mutations`),O(3),q(t.page()?.mutations.length??0),O(5),F(`value`,t.filter()),O(2),M(t.view()===`queries`?18:-1),O(),M(t.pages().length>1?19:-1),O(2),q(t.countText()),O(),M((e=t.page()?.more)?22:-1,e),O(),M(t.allRows().length?t.rows().length?25:24:23)}}function uJ(e,t){if(e&1&&(I(0,`p`,43),K(1,`Variables`),L(),I(2,`pre`,45),K(3),L()),e&2){let e=W(),t=W(3);O(3),q(t.prettyText(e.variables))}}function dJ(e,t){if(e&1&&(j(0,uJ,4,1),I(1,`p`,43),K(2,`Data`),L(),I(3,`pre`,44),K(4),L()),e&2){let e=t,n=W(3);M(e.variables===void 0?-1:0),O(4),q(e.data===void 0?`No data.`:n.prettyText(e.data))}}function fJ(e,t){if(e&1&&(I(0,`p`,35),K(1),L()),e&2){let e=W(3);O(),q(e.full().result.error??`The page did not send the data.`)}}function pJ(e,t){if(e&1&&j(0,dJ,5,2)(1,fJ,2,1,`p`,35),e&2){let e;M((e=W(2).full().result.detail)?0:1,e)}}function mJ(e,t){if(e&1&&(I(0,`pre`,46),K(1),L()),e&2){let e=W(2).preview,t=W();O(),q(t.prettyText(e))}}function hJ(e,t){if(e&1){let e=V();j(0,mJ,2,1,`pre`,46),I(1,`button`,37),H(`click`,function(){w(e);let t=W().id;return T(W().loadData(t))}),K(2),L()}if(e&2){let e=W().preview,t=W();M(e===void 0?-1:0),O(),F(`disabled`,t.loadingData()),O(),J(` `,t.loadingData()?`Loading…`:`Show all data`,` `)}}function gJ(e,t){if(e&1&&j(0,pJ,2,1)(1,hJ,3,3),e&2){let e=t.id;M(W().full()?.id===e?0:1)}}var _J=[{value:`all`,label:`All statuses`},{value:`fetching`,label:`Fetching`},{value:`success`,label:`Success`},{value:`error`,label:`Error`},{value:`pending`,label:`Pending`},{value:`stale`,label:`Stale or invalidated`},{value:`inactive`,label:`No observers`}],vJ=class e{rpc=$(null);angularPages=AD(()=>this.rpc());connected=X(()=>Object.keys(this.angularPages()).length>0);destroyRef=C(As);hostPageId=XT();unsubscribe;detailPanel=Dv(`detailPanel`);filters=_J;writesOff=kT(`tanstackQuery`);canWrite=X(()=>bE(this.rpc(),`tanstackQuery`));pages=D([]);loaded=D(!1);failed=D(!1);view=D(`queries`);filter=D(``);status=D(`all`);selectedPageId=D(null);selectedId=D(null);busy=D(!1);message=D(``);loadingData=D(!1);full=Q({source:()=>this.selectedId(),computation:()=>null});now=D(Date.now());page=X(()=>{let e=this.pages();return e.find(e=>e.pageId===this.selectedPageId())??e.find(e=>e.pageId===this.hostPageId)??e[0]??null});pageOptions=X(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.url})));queries=X(()=>{let e=this.filter().trim().toLowerCase(),t=this.status();return(this.page()?.queries??[]).filter(n=>Mq(n,t)&&(!e||n.keyText.toLowerCase().includes(e)))});mutations=X(()=>{let e=this.filter().trim().toLowerCase();return(this.page()?.mutations??[]).filter(t=>!e||this.mutationLabel(t).toLowerCase().includes(e))});allRows=X(()=>this.view()===`queries`?this.page()?.queries??[]:this.page()?.mutations??[]);rows=X(()=>(this.now(),this.view()===`queries`?this.queries().map(e=>({id:e.id,label:e.keyText,status:e.fetchStatus===`idle`?e.status:e.fetchStatus,tone:jq(e.status,e.fetchStatus),meta:`${Oq(e)} · ${e.observers} ${e.observers===1?`observer`:`observers`} · ${this.age(e.dataUpdatedAt)}`})):this.mutations().map(e=>({id:e.id,label:this.mutationLabel(e),status:e.isPaused?`paused`:e.status,tone:e.isPaused?`warn`:jq(e.status),meta:`submitted ${this.age(e.submittedAt)}`}))));countText=X(()=>{let e=this.allRows().length;return`${this.rows().length} of ${e} ${this.view()===`queries`?`queries`:`mutations`}`});selectedQuery=X(()=>this.view()===`queries`?this.page()?.queries.find(e=>e.id===this.selectedId())??null:null);selectedMutation=X(()=>this.view()===`mutations`?this.page()?.mutations.find(e=>e.id===this.selectedId())??null:null);selected=X(()=>this.selectedQuery()??this.selectedMutation());constructor(){_c(()=>{let e=this.rpc();e&&this.load(e)});let e=setInterval(()=>this.now.set(Date.now()),1e3);this.destroyRef.onDestroy(()=>{clearInterval(e),this.unsubscribe?.()})}age(e){let t=this.page();if(!t)return kq(0,e);let n=t.at-t.reportedAt;return kq(this.now()+n-e,e)}freshnessOf(e){return Oq(e)}duration(e){return Aq(e)}tone(e){return jq(e)}prettyText(e){return fW(e)}mutationLabel(e){return e.keyText??`Mutation ${e.id}`}setView(e){this.view.set(e),this.selectedId.set(null),this.message.set(``)}selectPage(e){this.selectedPageId.set(e),this.selectedId.set(null),this.message.set(``)}select(e){this.selectedId.set(e),this.message.set(``),typeof matchMedia==`function`&&matchMedia(`(max-width: 880px)`).matches&&this.detailPanel()?.nativeElement.scrollIntoView?.({block:`nearest`})}clearFilters(){this.filter.set(``),this.status.set(`all`)}retry(){let e=this.rpc();e&&this.load(e)}async loadData(e){let t=this.page();if(t&&!this.loadingData()){this.loadingData.set(!0);try{let n=await tE(this.rpc(),`request-tanstack-query`,{pageId:t.pageId,request:{type:`detail`,id:e}});this.selectedId()===e&&this.full.set({id:e,result:n??{}})}catch{this.selectedId()===e&&this.full.set({id:e,result:{error:`Could not reach the page to read the data.`}})}finally{this.loadingData.set(!1)}}}async act(e,t){let n=this.page();if(n&&!this.busy()){this.busy.set(!0);try{let r=await tE(this.rpc(),`request-tanstack-query`,{pageId:n.pageId,request:{type:e,id:t}});this.message.set(r?.error??r?.message??`Done.`),this.full.set(null)}catch{this.message.set(`Could not reach the page.`)}finally{this.busy.set(!1)}}}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`tanstack-query`);if(this.destroyRef.destroyed)return;let n=e=>this.pages.set(Dq(e));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-query-inspector`]],viewQuery:function(e,t){e&1&&Xg(t.detailPanel,Nq,5),e&2&&Zg()},inputs:{rpc:[1,`rpc`]},decls:6,vars:1,consts:[[`dataTpl`,``],[`search`,``],[`detailPanel`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`role`,`status`,1,`state`,`empty-card`],[`type`,`button`,1,`btn`,3,`click`],[1,`state-title`],[1,`intro`],[1,`toolbar`],[`role`,`group`,`aria-label`,`Show`,1,`views`],[`type`,`button`,1,`view`,3,`click`],[1,`badge`],[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 by key`,`placeholder`,`Filter by key`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Status`,1,`filter-select`,3,`options`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`options`,`value`],[`role`,`status`,1,`count`],[1,`layout`],[`ariaLabel`,`Status`,1,`filter-select`,3,`valueChange`,`options`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`valueChange`,`options`,`value`],[1,`notice`],[`appRovingList`,`button.row`,1,`rows`],[`aria-labelledby`,`query-detail-heading`,1,`detail`],[`role`,`status`,1,`message`],[`type`,`button`,1,`row`,3,`click`],[1,`row-top`],[1,`key`,3,`title`],[1,`pill`],[1,`row-meta`],[`id`,`query-detail-heading`,1,`detail-title`],[1,`kv`],[1,`muted`],[1,`actions`],[`type`,`button`,1,`btn`,3,`click`,`disabled`],[`id`,`query-writes-off`,1,`hint`],[1,`sub`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[1,`error`],[`id`,`query-detail-heading`,1,`sr-only`],[1,`label`],[`tabindex`,`0`,`aria-label`,`Data`],[`tabindex`,`0`,`aria-label`,`Variables`],[`tabindex`,`0`,`aria-label`,`Preview`]],template:function(e,t){e&1&&(j(0,Iq,2,0,`p`,3)(1,Lq,5,0,`div`,4)(2,Bq,3,1,`div`,5)(3,Ine,26,10),Jh(4,gJ,2,1,`ng-template`,null,0,pv)),e&2&&M(t.loaded()?t.failed()?1:t.pages().length?3:2:0)},dependencies:[py,Iz,JD],styles:[`[_nghost-%COMP%] { +}`]})};function Eq(e,t){let{start:n,end:r}=t.range();return e.slice(n,r).map((e,t)=>({entry:e,index:n+t}))}function Dq(e){let t=e?.pages;return!t||typeof t!=`object`||Array.isArray(t)?[]:Object.values(t).filter(e=>{let t=e;return!!t&&typeof t.pageId==`string`&&Array.isArray(t.clients)&&Array.isArray(t.queries)&&Array.isArray(t.mutations)}).sort((e,t)=>t.reportedAt-e.reportedAt)}function Oq(e){return e.invalidated?`invalidated`:e.stale?`stale`:`fresh`}function kq(e,t){if(!t)return`never`;let n=Math.max(0,Math.round(e/1e3));return n<60?`${n} s ago`:n<3600?`${Math.round(n/60)} min ago`:`${Math.round(n/3600)} h ago`}function Aq(e){return e===void 0?`not set`:e===null?`Infinity`:e===`static`?`static`:e<1e3?`${e} ms`:e<6e4?`${Math.round(e/100)/10} s`:`${Math.round(e/6e3)/10} min`}function jq(e,t){return t===`fetching`?`accent`:t===`paused`?`warn`:e===`error`?`danger`:e===`success`?`ok`:e===`pending`?`warn`:`plain`}function Mq(e,t){switch(t){case`all`:return!0;case`fetching`:return e.fetchStatus===`fetching`;case`stale`:return e.stale||e.invalidated;case`inactive`:return e.observers===0;default:return e.status===t}}var Nq=[`detailPanel`],Pq=(e,t)=>({preview:e,id:t}),Fq=(e,t)=>t.id;function Iq(e,t){e&1&&(I(0,`p`,3),K(1,`Loading queries…`),L())}function Lq(e,t){if(e&1){let e=V();I(0,`div`,4)(1,`p`),K(2,`Can't read TanStack Query from the devtools server.`),L(),I(3,`button`,6),H(`click`,function(){return w(e),T(W().retry())}),K(4,`Retry`),L()()}}function Rq(e,t){e&1&&(I(0,`p`,7),K(1,`The connected page has no QueryClient yet.`),L(),I(2,`p`),K(3,` Add `),I(4,`code`),K(5,`provideTanStackQuery(new QueryClient())`),L(),K(6,` to the app's providers. The tab reads it once something in the app injects it, such as `),I(7,`code`),K(8,`injectQuery()`),L(),K(9,`. `),L())}function zq(e,t){e&1&&(I(0,`p`,7),K(1,`No page reports a QueryClient yet.`),L(),I(2,`p`),K(3,` Open the app with the overlay loaded. The tab reads the `),I(4,`code`),K(5,`QueryClient`),L(),K(6,` that `),I(7,`code`),K(8,`provideTanStackQuery()`),L(),K(9,` registers, once something in the app injects it. `),L())}function Bq(e,t){if(e&1&&(I(0,`div`,5),j(1,Rq,10,0)(2,zq,10,0),L()),e&2){let e=W();O(),M(e.connected()?1:2)}}function Vq(e,t){if(e&1){let e=V();I(0,`app-select`,22),H(`valueChange`,function(t){return w(e),T(W(2).status.set(t??`all`))}),L()}if(e&2){let e=W(2);F(`options`,e.filters)(`value`,e.status())}}function Hq(e,t){if(e&1){let e=V();I(0,`app-select`,23),H(`valueChange`,function(t){return w(e),T(W(2).selectPage(t))}),L()}if(e&2){let e=W(2);F(`options`,e.pageOptions())(`value`,e.page()?.pageId??null)}}function Uq(e,t){if(e&1&&(I(0,`p`,24),K(1),L()),e&2){let e=W(),t=W(2);O(),Y(` The page reports the `,t.view()===`queries`?`300 queries`:`100 mutations`,` it updated last and leaves out `,t.view()===`queries`?e.queries:e.mutations,` more. `)}}function Wq(e,t){if(e&1&&j(0,Uq,2,2,`p`,24),e&2){let e=t;M(e.queries||e.mutations?0:-1)}}function Gq(e,t){e&1&&(I(0,`p`,7),K(1,`No query in the cache yet.`),L(),I(2,`p`),K(3,`Queries show up here when the app creates them with `),I(4,`code`),K(5,`injectQuery()`),L(),K(6,`.`),L())}function Kq(e,t){e&1&&(I(0,`p`,7),K(1,`No mutation yet.`),L(),I(2,`p`),K(3,`Mutations show up here once the app calls `),I(4,`code`),K(5,`mutate()`),L(),K(6,`.`),L())}function qq(e,t){if(e&1&&(I(0,`div`,5),j(1,Gq,7,0)(2,Kq,7,0),L()),e&2){let e=W(2);O(),M(e.view()===`queries`?1:2)}}function Jq(e,t){if(e&1){let e=V();I(0,`div`,5)(1,`p`,7),K(2,`Nothing matches the filters.`),L(),I(3,`button`,6),H(`click`,function(){w(e),W();let t=Qg(17);return W().clearFilters(),T(t.focus())}),K(4,` Clear filters `),L()()}}function Yq(e,t){if(e&1){let e=V();I(0,`li`)(1,`button`,28),H(`click`,function(){let t=w(e).$implicit;return T(W(3).select(t.id))}),I(2,`span`,29)(3,`code`,30),K(4),L(),I(5,`span`,31),K(6),L()(),I(7,`span`,32),K(8),L()()()}if(e&2){let e=t.$implicit,n=W(3);O(),G(`selected`,e.id===n.selected()?.id),A(`aria-pressed`,e.id===n.selected()?.id),O(2),F(`title`,e.label),O(),q(e.label),O(),A(`data-tone`,e.tone),O(),q(e.status),O(2),q(e.meta)}}function Xq(e,t){if(e&1&&(I(0,`span`,35),K(1),L()),e&2){let e=W();O(),Y(`(`,e.dataUpdateCount,` `,e.dataUpdateCount===1?`update`:`updates`,`)`)}}function Zq(e,t){e&1&&(I(0,`span`,35),K(1,`(disabled)`),L())}function Qq(e,t){if(e&1&&(I(0,`dt`),K(1,`Failures`),L(),I(2,`dd`),K(3),L()),e&2){let e=W();O(3),q(e.failureCount)}}function $q(e,t){if(e&1&&(I(0,`dt`),K(1,`Error`),L(),I(2,`dd`)(3,`code`,41),K(4),L()()),e&2){let e=W();O(4),q(e.error)}}function eJ(e,t){if(e&1&&(I(0,`p`,38),K(1),L()),e&2){let e=W(4);O(),q(e.writesOff)}}function tJ(e,t){e&1&&(I(0,`p`,35),K(1,`No data yet.`),L())}function nJ(e,t){if(e&1&&Mg(0,40),e&2){let e=W();W(3),F(`ngTemplateOutlet`,Qg(5))(`ngTemplateOutletContext`,av(2,Pq,e.preview,e.id))}}function rJ(e,t){if(e&1){let e=V();I(0,`h2`,33)(1,`code`),K(2),L()(),I(3,`dl`,34)(4,`dt`),K(5,`Status`),L(),I(6,`dd`)(7,`span`,31),K(8),L()(),I(9,`dt`),K(10,`Fetch status`),L(),I(11,`dd`),K(12),L(),I(13,`dt`),K(14,`Freshness`),L(),I(15,`dd`),K(16),L(),I(17,`dt`),K(18,`Data updated`),L(),I(19,`dd`),K(20),j(21,Xq,2,2,`span`,35),L(),I(22,`dt`),K(23,`Observers`),L(),I(24,`dd`),K(25),j(26,Zq,2,0,`span`,35),L(),I(27,`dt`),K(28,`staleTime`),L(),I(29,`dd`),K(30),L(),I(31,`dt`),K(32,`gcTime`),L(),I(33,`dd`),K(34),L(),j(35,Qq,4,1),j(36,$q,5,1),L(),I(37,`div`,36)(38,`button`,37),H(`click`,function(){let t=w(e);return T(W(3).act(`invalidate`,t.id))}),K(39,` Invalidate `),L(),I(40,`button`,37),H(`click`,function(){let t=w(e);return T(W(3).act(`refetch`,t.id))}),K(41,` Refetch `),L()(),j(42,eJ,2,1,`p`,38),I(43,`h3`,39),K(44,`Data`),L(),j(45,tJ,2,0,`p`,35)(46,nJ,1,5,`ng-container`,40)}if(e&2){let e=t,n=W(3);O(2),q(e.keyText),O(5),A(`data-tone`,n.tone(e.status)),O(),q(e.status),O(4),q(e.fetchStatus),O(4),q(n.freshnessOf(e)),O(4),J(` `,n.age(e.dataUpdatedAt),` `),O(),M(e.dataUpdateCount?21:-1),O(4),J(` `,e.observers,` `),O(),M(e.disabled?26:-1),O(4),q(n.duration(e.staleTime)),O(4),q(n.duration(e.gcTime)),O(),M(e.failureCount?35:-1),O(),M(e.error?36:-1),O(2),F(`disabled`,n.busy()||!n.canWrite()),A(`aria-describedby`,n.canWrite()?null:`query-writes-off`),O(2),F(`disabled`,n.busy()||!n.canWrite()),A(`aria-describedby`,n.canWrite()?null:`query-writes-off`),O(2),M(n.canWrite()?-1:42),O(3),M(e.hasData?46:45)}}function iJ(e,t){e&1&&(I(0,`span`,35),K(1,`(paused)`),L())}function aJ(e,t){if(e&1&&(I(0,`dt`),K(1,`Failures`),L(),I(2,`dd`),K(3),L()),e&2){let e=W();O(3),q(e.failureCount)}}function oJ(e,t){if(e&1&&(I(0,`dt`),K(1,`Error`),L(),I(2,`dd`)(3,`code`,41),K(4),L()()),e&2){let e=W();O(4),q(e.error)}}function sJ(e,t){if(e&1&&(I(0,`h2`,33)(1,`code`),K(2),L()(),I(3,`dl`,34)(4,`dt`),K(5,`Status`),L(),I(6,`dd`)(7,`span`,31),K(8),L(),j(9,iJ,2,0,`span`,35),L(),I(10,`dt`),K(11,`Submitted`),L(),I(12,`dd`),K(13),L(),j(14,aJ,4,1),j(15,oJ,5,1),L(),I(16,`h3`,39),K(17,`Variables and data`),L(),Mg(18,40)),e&2){let e=t,n=W(3),r=Qg(5);O(2),q(n.mutationLabel(e)),O(5),A(`data-tone`,n.tone(e.status)),O(),q(e.status),O(),M(e.isPaused?9:-1),O(4),q(n.age(e.submittedAt)),O(),M(e.failureCount?14:-1),O(),M(e.error?15:-1),O(3),F(`ngTemplateOutlet`,r)(`ngTemplateOutletContext`,av(9,Pq,e.variables,e.id))}}function cJ(e,t){if(e&1&&(I(0,`h2`,42),K(1,`Details`),L(),I(2,`p`,35),K(3),L()),e&2){let e=W(3);O(3),J(` Select a `,e.view()===`queries`?`query`:`mutation`,` to see its details. `)}}function lJ(e,t){if(e&1&&(I(0,`div`,21)(1,`ul`,25),N(2,Yq,9,8,`li`,null,Fq),L(),I(4,`section`,26,2),j(6,rJ,47,19)(7,sJ,19,12)(8,cJ,4,1),I(9,`p`,27),K(10),L()()()),e&2){let e,t=W(2);O(),A(`aria-label`,t.view()===`queries`?`Queries`:`Mutations`),O(),P(t.rows()),O(4),M((e=t.selectedQuery())?6:(e=t.selectedMutation())?7:8,e),O(4),q(t.message())}}function uJ(e,t){if(e&1){let e=V();I(0,`p`,8),K(1,` The queries and mutations of the TanStack Query client the app provides, read from the live page. Keys, errors and data are masked like other live data. `),L(),I(2,`div`,9)(3,`div`,10)(4,`button`,11),H(`click`,function(){return w(e),T(W().setView(`queries`))}),K(5,` Queries `),I(6,`span`,12),K(7),L()(),I(8,`button`,11),H(`click`,function(){return w(e),T(W().setView(`mutations`))}),K(9,` Mutations `),I(10,`span`,12),K(11),L()()(),I(12,`div`,13),E(),I(13,`svg`,14),R(14,`circle`,15)(15,`path`,16),L(),bs(),I(16,`input`,17,1),H(`input`,function(t){return w(e),T(W().filter.set(t.target.value))})(`keydown.escape`,function(){return w(e),T(W().filter.set(``))}),L()(),j(18,Vq,1,2,`app-select`,18),j(19,Hq,1,2,`app-select`,19),I(20,`span`,20),K(21),L()(),j(22,Wq,1,1),j(23,qq,3,1,`div`,5)(24,Jq,5,0,`div`,5)(25,lJ,11,3,`div`,21)}if(e&2){let e,t=W();O(4),A(`aria-pressed`,t.view()===`queries`),O(3),q(t.page()?.queries.length??0),O(),A(`aria-pressed`,t.view()===`mutations`),O(3),q(t.page()?.mutations.length??0),O(5),F(`value`,t.filter()),O(2),M(t.view()===`queries`?18:-1),O(),M(t.pages().length>1?19:-1),O(2),q(t.countText()),O(),M((e=t.page()?.more)?22:-1,e),O(),M(t.allRows().length?t.rows().length?25:24:23)}}function dJ(e,t){if(e&1&&(I(0,`p`,43),K(1,`Variables`),L(),I(2,`pre`,45),K(3),L()),e&2){let e=W(),t=W(3);O(3),q(t.prettyText(e.variables))}}function fJ(e,t){if(e&1&&(j(0,dJ,4,1),I(1,`p`,43),K(2,`Data`),L(),I(3,`pre`,44),K(4),L()),e&2){let e=t,n=W(3);M(e.variables===void 0?-1:0),O(4),q(e.data===void 0?`No data.`:n.prettyText(e.data))}}function pJ(e,t){if(e&1&&(I(0,`p`,35),K(1),L()),e&2){let e=W(3);O(),q(e.full().result.error??`The page did not send the data.`)}}function Ine(e,t){if(e&1&&j(0,fJ,5,2)(1,pJ,2,1,`p`,35),e&2){let e;M((e=W(2).full().result.detail)?0:1,e)}}function mJ(e,t){if(e&1&&(I(0,`pre`,46),K(1),L()),e&2){let e=W(2).preview,t=W();O(),q(t.prettyText(e))}}function hJ(e,t){if(e&1){let e=V();j(0,mJ,2,1,`pre`,46),I(1,`button`,37),H(`click`,function(){w(e);let t=W().id;return T(W().loadData(t))}),K(2),L()}if(e&2){let e=W().preview,t=W();M(e===void 0?-1:0),O(),F(`disabled`,t.loadingData()),O(),J(` `,t.loadingData()?`Loading…`:`Show all data`,` `)}}function gJ(e,t){if(e&1&&j(0,Ine,2,1)(1,hJ,3,3),e&2){let e=t.id;M(W().full()?.id===e?0:1)}}var _J=[{value:`all`,label:`All statuses`},{value:`fetching`,label:`Fetching`},{value:`success`,label:`Success`},{value:`error`,label:`Error`},{value:`pending`,label:`Pending`},{value:`stale`,label:`Stale or invalidated`},{value:`inactive`,label:`No observers`}],vJ=class e{rpc=$(null);angularPages=AD(()=>this.rpc());connected=X(()=>Object.keys(this.angularPages()).length>0);destroyRef=C(As);hostPageId=XT();unsubscribe;detailPanel=Dv(`detailPanel`);filters=_J;writesOff=kT(`tanstackQuery`);canWrite=X(()=>bE(this.rpc(),`tanstackQuery`));pages=D([]);loaded=D(!1);failed=D(!1);view=D(`queries`);filter=D(``);status=D(`all`);selectedPageId=D(null);selectedId=D(null);busy=D(!1);message=D(``);loadingData=D(!1);full=Q({source:()=>this.selectedId(),computation:()=>null});now=D(Date.now());page=X(()=>{let e=this.pages();return e.find(e=>e.pageId===this.selectedPageId())??e.find(e=>e.pageId===this.hostPageId)??e[0]??null});pageOptions=X(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.url})));queries=X(()=>{let e=this.filter().trim().toLowerCase(),t=this.status();return(this.page()?.queries??[]).filter(n=>Mq(n,t)&&(!e||n.keyText.toLowerCase().includes(e)))});mutations=X(()=>{let e=this.filter().trim().toLowerCase();return(this.page()?.mutations??[]).filter(t=>!e||this.mutationLabel(t).toLowerCase().includes(e))});allRows=X(()=>this.view()===`queries`?this.page()?.queries??[]:this.page()?.mutations??[]);rows=X(()=>(this.now(),this.view()===`queries`?this.queries().map(e=>({id:e.id,label:e.keyText,status:e.fetchStatus===`idle`?e.status:e.fetchStatus,tone:jq(e.status,e.fetchStatus),meta:`${Oq(e)} · ${e.observers} ${e.observers===1?`observer`:`observers`} · ${this.age(e.dataUpdatedAt)}`})):this.mutations().map(e=>({id:e.id,label:this.mutationLabel(e),status:e.isPaused?`paused`:e.status,tone:e.isPaused?`warn`:jq(e.status),meta:`submitted ${this.age(e.submittedAt)}`}))));countText=X(()=>{let e=this.allRows().length;return`${this.rows().length} of ${e} ${this.view()===`queries`?`queries`:`mutations`}`});selectedQuery=X(()=>this.view()===`queries`?this.page()?.queries.find(e=>e.id===this.selectedId())??null:null);selectedMutation=X(()=>this.view()===`mutations`?this.page()?.mutations.find(e=>e.id===this.selectedId())??null:null);selected=X(()=>this.selectedQuery()??this.selectedMutation());constructor(){_c(()=>{let e=this.rpc();e&&this.load(e)});let e=setInterval(()=>this.now.set(Date.now()),1e3);this.destroyRef.onDestroy(()=>{clearInterval(e),this.unsubscribe?.()})}age(e){let t=this.page();if(!t)return kq(0,e);let n=t.at-t.reportedAt;return kq(this.now()+n-e,e)}freshnessOf(e){return Oq(e)}duration(e){return Aq(e)}tone(e){return jq(e)}prettyText(e){return fW(e)}mutationLabel(e){return e.keyText??`Mutation ${e.id}`}setView(e){this.view.set(e),this.selectedId.set(null),this.message.set(``)}selectPage(e){this.selectedPageId.set(e),this.selectedId.set(null),this.message.set(``)}select(e){this.selectedId.set(e),this.message.set(``),typeof matchMedia==`function`&&matchMedia(`(max-width: 880px)`).matches&&this.detailPanel()?.nativeElement.scrollIntoView?.({block:`nearest`})}clearFilters(){this.filter.set(``),this.status.set(`all`)}retry(){let e=this.rpc();e&&this.load(e)}async loadData(e){let t=this.page();if(t&&!this.loadingData()){this.loadingData.set(!0);try{let n=await tE(this.rpc(),`request-tanstack-query`,{pageId:t.pageId,request:{type:`detail`,id:e}});this.selectedId()===e&&this.full.set({id:e,result:n??{}})}catch{this.selectedId()===e&&this.full.set({id:e,result:{error:`Could not reach the page to read the data.`}})}finally{this.loadingData.set(!1)}}}async act(e,t){let n=this.page();if(n&&!this.busy()){this.busy.set(!0);try{let r=await tE(this.rpc(),`request-tanstack-query`,{pageId:n.pageId,request:{type:e,id:t}});this.message.set(r?.error??r?.message??`Done.`),this.full.set(null)}catch{this.message.set(`Could not reach the page.`)}finally{this.busy.set(!1)}}}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`tanstack-query`);if(this.destroyRef.destroyed)return;let n=e=>this.pages.set(Dq(e));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-query-inspector`]],viewQuery:function(e,t){e&1&&Xg(t.detailPanel,Nq,5),e&2&&Zg()},inputs:{rpc:[1,`rpc`]},decls:6,vars:1,consts:[[`dataTpl`,``],[`search`,``],[`detailPanel`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`role`,`status`,1,`state`,`empty-card`],[`type`,`button`,1,`btn`,3,`click`],[1,`state-title`],[1,`intro`],[1,`toolbar`],[`role`,`group`,`aria-label`,`Show`,1,`views`],[`type`,`button`,1,`view`,3,`click`],[1,`badge`],[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 by key`,`placeholder`,`Filter by key`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Status`,1,`filter-select`,3,`options`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`options`,`value`],[`role`,`status`,1,`count`],[1,`layout`],[`ariaLabel`,`Status`,1,`filter-select`,3,`valueChange`,`options`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`valueChange`,`options`,`value`],[1,`notice`],[`appRovingList`,`button.row`,1,`rows`],[`aria-labelledby`,`query-detail-heading`,1,`detail`],[`role`,`status`,1,`message`],[`type`,`button`,1,`row`,3,`click`],[1,`row-top`],[1,`key`,3,`title`],[1,`pill`],[1,`row-meta`],[`id`,`query-detail-heading`,1,`detail-title`],[1,`kv`],[1,`muted`],[1,`actions`],[`type`,`button`,1,`btn`,3,`click`,`disabled`],[`id`,`query-writes-off`,1,`hint`],[1,`sub`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[1,`error`],[`id`,`query-detail-heading`,1,`sr-only`],[1,`label`],[`tabindex`,`0`,`aria-label`,`Data`],[`tabindex`,`0`,`aria-label`,`Variables`],[`tabindex`,`0`,`aria-label`,`Preview`]],template:function(e,t){e&1&&(j(0,Iq,2,0,`p`,3)(1,Lq,5,0,`div`,4)(2,Bq,3,1,`div`,5)(3,uJ,26,10),Jh(4,gJ,2,1,`ng-template`,null,0,pv)),e&2&&M(t.loaded()?t.failed()?1:t.pages().length?3:2:0)},dependencies:[py,Iz,JD],styles:[`[_nghost-%COMP%] { display: block; min-width: 0; font-size: 13px; @@ -14166,7 +14166,7 @@ button.pipe-link[_ngcontent-%COMP%]:focus-visible { .spinner[_ngcontent-%COMP%] { animation: none; } -}`]})},pQ=()=>[],mQ=()=>[`/`],hQ=(e,t)=>t.id,gQ=(e,t)=>t.route.id,_Q=(e,t)=>t[0],vQ=(e,t)=>t.file+t.method,yQ=(e,t)=>t.path,bQ=(e,t)=>t.mode,xQ=(e,t)=>t.file,SQ=(e,t)=>t.rule;function CQ(e,t){if(e&1){let e=V();I(0,`div`,0)(1,`h2`,3),K(2,`Could not read the project.`),L(),I(3,`p`,4),K(4,` Check that the dev server with Pangular Inspector is still running, then retry. `),L(),I(5,`button`,5),H(`click`,function(){return w(e),T(W().retry())}),K(6,`Retry`),L()()}}function wQ(e,t){e&1&&(I(0,`div`,1),R(1,`span`,6),I(2,`span`),K(3,`Reading the project…`),L()())}function TQ(e,t){e&1&&(I(0,`div`,2)(1,`h2`,3),K(2,`This app is not an Analog app.`),L(),I(3,`p`,4),K(4,` Add `),I(5,`code`),K(6,`pangular()`),L(),K(7,` from `),I(8,`code`),K(9,`@pangular-inspector/devtools/vite`),L(),K(10,` next to `),I(11,`code`),K(12,`analog()`),L(),K(13,` in vite.config.ts and run the Analog dev server. `),L()())}function EQ(e,t){if(e&1&&(I(0,`div`,11)(1,`span`,9),K(2,`Open in the browser`),L(),I(3,`span`,15),K(4),L()()),e&2){let e=t;O(3),F(`title`,e.url),O(),q(e.url)}}function DQ(e,t){if(e&1){let e=V();I(0,`button`,16),H(`click`,function(){let t=w(e).$implicit;return T(W(2).view.set(t.id))}),K(1),I(2,`span`,17),K(3),L()()}if(e&2){let e=t.$implicit,n=W(2);F(`id`,`analog-tab-`+e.id),A(`aria-selected`,e.id===n.view())(`aria-controls`,`analog-panel-`+e.id)(`tabindex`,e.id===n.view()?0:-1),O(),J(` `,e.label,` `),O(),A(`data-tone`,e.tone),O(),q(e.count)}}function OQ(e,t){e&1&&(I(0,`div`,26),K(1),L()),e&2&&(O(),q(t))}function kQ(e,t){if(e&1&&(I(0,`app-source-link`,34),K(1),L()),e&2){let e=W().$implicit,t=W(5);F(`file`,e.file),O(),q(t.short(e.file))}}function AQ(e,t){if(e&1&&(I(0,`span`,31),K(1),L()),e&2){let e=W().$implicit;O(),q(e.fullPath)}}function jQ(e,t){if(e&1&&(I(0,`li`),j(1,kQ,2,2,`app-source-link`,34)(2,AQ,2,1,`span`,31),I(3,`span`,35),K(4),L()()),e&2){let e=t.$implicit;O(),M(e.file?1:2),O(2),A(`data-kind`,e.kind),O(),q(e.kind)}}function MQ(e,t){if(e&1&&(I(0,`span`,36),K(1),L()),e&2){let e=t.$implicit;O(),Y(``,e[0],` = `,e[1])}}function NQ(e,t){if(e&1&&(I(0,`div`,33),N(1,MQ,2,2,`span`,36,_Q),L()),e&2){let e=W(2),t=W(3);O(),P(t.paramList(e.match.params))}}function PQ(e,t){if(e&1&&(I(0,`strong`,31),K(1),L(),K(2,` renders `),I(3,`ol`,32),N(4,jQ,5,3,`li`,null,hQ),L(),j(6,NQ,3,0,`div`,33)),e&2){let e=W(),t=W(3);O(),q(e.url),O(3),P(e.match.chain),O(2),M(t.paramList(e.match.params).length?6:-1)}}function FQ(e,t){if(e&1&&(I(0,`app-source-link`,34),K(1),L()),e&2){let e=W().$implicit,t=W(6);F(`file`,e.file),O(),q(t.short(e.file))}}function IQ(e,t){if(e&1&&(I(0,`span`,31),K(1),L()),e&2){let e=W().$implicit;O(),q(e.path)}}function LQ(e,t){if(e&1&&(I(0,`li`),j(1,FQ,2,2,`app-source-link`,34)(2,IQ,2,1,`span`,31),I(3,`span`,4),K(4),L()()),e&2){let e=t.$implicit;O(),M(e.file?1:2),O(3),q(e.reason)}}function RQ(e,t){if(e&1&&(I(0,`ul`,37),N(1,LQ,5,2,`li`,null,gg),L()),e&2){let e=W(2);O(),P(e.match.rejected.slice(0,5))}}function zQ(e,t){if(e&1&&(I(0,`strong`,31),K(1),L(),K(2,` matches no file route. Angular throws NG04002 "Cannot match any routes". `),j(3,RQ,3,0,`ul`,37)),e&2){let e=W();O(),q(e.url),O(2),M(e.match.rejected.length?3:-1)}}function BQ(e,t){if(e&1&&(I(0,`div`,27),j(1,PQ,7,2)(2,zQ,4,2),L()),e&2){let e=t;A(`data-tone`,e.match.matched?`good`:`bad`),O(),M(e.match.matched?1:2)}}function VQ(e,t){e&1&&(I(0,`span`,39),K(1,`└`),L())}function HQ(e,t){if(e&1&&(I(0,`span`,41),K(1),L()),e&2){let e=W().$implicit,t=W(3);O(),q(t.openText(e.route))}}function UQ(e,t){if(e&1&&(I(0,`app-source-link`,42)(1,`span`,46),K(2),L(),K(3),L()),e&2){let e=W().$implicit,t=W(3);F(`file`,e.route.file),O(2),q(t.dir(e.route.file)),O(),q(t.base(e.route.file))}}function WQ(e,t){e&1&&(I(0,`span`,4),K(1,`folder only`),L())}function GQ(e,t){if(e&1&&(I(0,`span`,44),K(1),L()),e&2){let e=t.$implicit;O(),J(``,e,`()`)}}function KQ(e,t){if(e&1&&(I(0,`span`,45),K(1),L()),e&2){let e=W().$implicit;O(),J(`"`,e.route.title,`"`)}}function qQ(e,t){if(e&1&&(I(0,`span`,36),K(1),L()),e&2){let e=W().$implicit;O(),q(e)}}function JQ(e,t){if(e&1&&j(0,qQ,2,1,`span`,36),e&2){let e=t.$implicit;M(e===`title`?-1:0)}}function YQ(e,t){if(e&1&&(I(0,`tr`)(1,`td`)(2,`div`,38),j(3,VQ,2,0,`span`,39),I(4,`span`,40),K(5),L(),I(6,`span`,35),K(7),L(),j(8,HQ,2,1,`span`,41),L()(),I(9,`td`),j(10,UQ,4,3,`app-source-link`,42)(11,WQ,2,0,`span`,4),L(),I(12,`td`)(13,`div`,43),N(14,GQ,2,1,`span`,44,_g),L()(),I(16,`td`),j(17,KQ,2,1,`span`,45),N(18,JQ,1,1,null,null,_g),L()()),e&2){let e=t.$implicit,n=W(3);G(`open`,n.isOpen(e.route))(`dim`,e.route.kind===`group`||e.route.kind===`implicit`),O(2),y_(`padding-left`,e.depth*16,`px`),O(),M(e.depth?3:-1),O(2),q(e.route.fullPath),O(),A(`data-kind`,e.route.kind),O(),q(n.kindText(e.route)),O(),M(n.isOpen(e.route)?8:-1),O(2),M(e.route.file?10:11),O(4),P(n.serverExports(e.route)),O(3),M(e.route.title?17:-1),O(),P(e.route.routeMeta??rv(13,pQ))}}function XQ(e,t){e&1&&K(0,` No route matches the filter. Try part of a path or a file name. `)}function ZQ(e,t){e&1&&K(0,` No file routes yet. Add a .page.ts file under src/app/pages. `)}function QQ(e,t){if(e&1&&(I(0,`tr`)(1,`td`,47),j(2,XQ,1,0)(3,ZQ,1,0),L()()),e&2){let e=W(3);O(2),M(e.filter().trim()?2:3)}}function $Q(e,t){if(e&1){let e=V();I(0,`div`,18)(1,`form`,19),H(`submit`,function(t){w(e);let n=W(2);return t.preventDefault(),T(n.explain())}),I(2,`label`,20),K(3,`Test a URL`),L(),I(4,`input`,21),H(`input`,function(t){return w(e),T(W(2).testUrl.set(t.target.value))}),L(),I(5,`button`,22),K(6),L()(),I(7,`label`,23),K(8,`Filter routes`),L(),I(9,`input`,24),H(`input`,function(t){return w(e),T(W(2).filter.set(t.target.value))})(`keydown.escape`,function(){return w(e),T(W(2).filter.set(``))}),L()(),I(10,`div`,25),j(11,OQ,2,1,`div`,26)(12,BQ,3,2,`div`,27),L(),I(13,`div`,28)(14,`table`)(15,`thead`)(16,`tr`)(17,`th`,29),K(18,`Route`),L(),I(19,`th`,29),K(20,`File`),L(),I(21,`th`,29),K(22,`Data`),L(),I(23,`th`,29),K(24,`Route meta`),L()()(),I(25,`tbody`),N(26,YQ,20,14,`tr`,30,gQ,!1,QQ,4,1,`tr`),L()()()}if(e&2){let e,t=W(2);O(4),F(`value`,t.testUrl()),O(),F(`disabled`,t.explaining()),O(),J(` `,t.explaining()?`Explaining…`:`Explain`,` `),O(3),F(`value`,t.filter()),O(2),M((e=t.explainError())?11:(e=t.explained())?12:-1,e),O(15),P(t.routeRows())}}function e$(e,t){if(e&1&&(I(0,`span`,31),K(1),L(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;O(),q(e),O(),J(``,n===r-1?``:`, `,` `)}}function t$(e,t){if(e&1&&(I(0,`div`,48)(1,`strong`),K(2,`load() ran twice`),L(),K(3,` for `),N(4,e$,3,2,null,null,_g),K(6,` : once while server rendering, again in the browser. TransferState did not serve the server result. `),L()),e&2){let e=W(3);O(4),P(e.duplicates())}}function n$(e,t){if(e&1&&(I(0,`span`,31),K(1),L(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;O(),q(e),O(),J(``,n===r-1?``:`, `,` `)}}function r$(e,t){if(e&1&&(I(0,`div`,48)(1,`strong`),K(2,`Server function read ran twice`),L(),K(3,`: `),N(4,n$,3,2,null,null,_g),K(6,` ran while server rendering, then again in the browser. The browser did not use the TransferState seed. `),L()),e&2){let e=W(3);O(4),P(e.refetchedFns())}}function i$(e,t){if(e&1){let e=V();I(0,`label`)(1,`input`,80),H(`change`,function(){let t=w(e).$implicit;return T(W(3).kind.set(t))}),L(),K(2),I(3,`span`,4),K(4),L()()}if(e&2){let e=t.$implicit,n=W(3);G(`on`,n.kind()===e),O(),F(`checked`,n.kind()===e),A(`data-kind`,e),O(),J(` `,n.kindLabel(e),` `),O(2),q(n.kindCount(e))}}function a$(e,t){if(e&1&&K(0),e&2){let e=W(4);Y(` Showing the newest `,e.shownCount(),` of `,e.matchingCalls().length,`. `)}}function o$(e,t){e&1&&K(0),e&2&&J(` The dev server keeps only the newest `,W(4).maxServerCalls,` calls and drops older ones. `)}function s$(e,t){if(e&1&&(I(0,`p`,66),j(1,a$,1,2),j(2,o$,1,1),L()),e&2){let e=W(3);O(),M(e.shownCount()1?6:-1),O(2),q(e.summary),O(2),P(e.items),O(5),J(` `,e.fix),O(2),q(e.rule)}}function S1(e,t){if(e&1&&(I(0,`p`,4),K(1),L(),I(2,`ul`,114),N(3,x1,18,8,`li`,null,SQ),L()),e&2){let e=W(3);O(),Y(` `,e.plural(e.findings().length,`issue`),` in `,e.plural(e.lintCards().length,`group`),`. Each card says what is wrong, where, and how to fix it. `),O(2),P(e.lintCards())}}function C1(e,t){e&1&&(I(0,`div`,113)(1,`strong`),K(2,`No Analog problems found.`),L(),K(3,` Routes, server files, prerender config and content all check out. `),L())}function w1(e,t){e&1&&j(0,S1,5,2)(1,C1,4,0,`div`,113),e&2&&M(+!W(2).findings().length)}function T1(e,t){if(e&1){let e=V();I(0,`section`,7)(1,`div`,8)(2,`span`,9),K(3,`Analog`),L(),I(4,`span`,10),K(5),L()(),I(6,`div`,8)(7,`span`,9),K(8,`Pages`),L(),I(9,`span`,10),K(10),L()(),I(11,`div`,8)(12,`span`,9),K(13,`API routes`),L(),I(14,`span`,10),K(15),L()(),I(16,`div`,8)(17,`span`,9),K(18,`Server calls`),L(),I(19,`span`,10),K(20),L()(),I(21,`div`,8)(22,`span`,9),K(23,`Issues`),L(),I(24,`span`,10),K(25),L()(),j(26,EQ,5,2,`div`,11),L(),I(27,`div`,12),H(`keydown`,function(t){return w(e),T(W().onKey(t))}),N(28,DQ,4,7,`button`,13,hQ),L(),I(30,`div`,14),j(31,$Q,29,6)(32,L$,65,21)(33,l1,19,4)(34,h1,2,1)(35,w1,2,1),L()}if(e&2){let e,t,n=W();O(5),q(n.project().version||`unknown`),O(5),q(n.pageCount()),O(5),q(n.project().api.length),O(5),q(n.allCalls().length),O(),A(`data-tone`,n.lintTone()||`good`),O(4),q(n.lintCount().errors+n.lintCount().warnings),O(),M((e=n.page())?26:-1,e),O(2),P(n.views()),O(2),F(`id`,`analog-panel-`+n.view()),A(`aria-labelledby`,`analog-tab-`+n.view()),O(),M((t=n.view())===`routes`?31:t===`server`?32:t===`render`?33:t===`content`?34:t===`lint`?35:-1)}}var E1={"scan-error":{title:`A folder could not be read`,summary:`Its files are missing from routes, API routes and lint results.`},"duplicate-url":{title:`Two files serve the same URL`,summary:`Only one of them is reachable; the other never renders.`},"sibling-params":{title:`Two dynamic pages in one folder`,summary:`Both are [param] pages at the same level, so the first one always wins.`},"missing-default-export":{title:`Page has no default export`,summary:`Analog needs the component as the default export, so the page renders nothing.`},"redirect-with-component":{title:`Redirect page also exports a component`,summary:`The redirect runs first, so the component never shows.`},"redirect-path-match":{title:`Redirect matches too much`,summary:`An empty-path redirect without pathMatch "full" catches every URL below it.`},"layout-without-outlet":{title:`Layout has no router-outlet`,summary:`The layout has child pages, but without they never render.`},"server-without-load":{title:`.server.ts without load or action`,summary:`The server file exports no load, action or server function, so Analog calls nothing.`},"orphan-server-file":{title:`.server.ts without a page`,summary:`No page file sits next to it, so its load never runs.`},"api-method-suffix":{title:`Unknown method suffix on an API file`,summary:`The suffix is not an HTTP method, so it becomes part of the URL.`},"duplicate-api-route":{title:`Two handlers for one API route`,summary:`Two files answer the same method and path.`},"api-outside-prefix":{title:`Server route outside the API prefix`,summary:`During vite dev only routes under the prefix reach Nitro.`},"prerender-unknown-route":{title:`Prerender entry matches no page`,summary:`prerender.routes lists a path that no page file serves.`},"prerender-missing-root":{title:`Home page is not prerendered`,summary:`static is on, but prerender.routes leaves out /.`},"content-frontmatter":{title:`Broken frontmatter`,summary:`The markdown frontmatter cannot be read.`},"duplicate-slug":{title:`Two posts share a slug`,summary:`injectContent picks one of them at random.`},"content-shadows-page":{title:`Markdown file takes over a page`,summary:`Files under src/content are routes too, so these URLs render the markdown file instead of the [param] page.`},"load-fetched-twice":{title:`load() runs twice`,summary:`These pages fetched their data while rendering on the server and again in the browser.`},"fn-fetched-twice":{title:`Server function read runs twice`,summary:`These reads ran while rendering on the server and again in the browser right after hydration.`},"restart-needed":{title:`New pages need a restart`,summary:`These page files exist, but the running router does not know them yet.`},"hydration-error":{title:`Hydration error`,summary:`The browser DOM did not match the server HTML.`},"api-not-found":{title:`API call failed with 404 or 405`,summary:`A request hit a path or method that no server route handles.`}},D1=200,O1=new Set([`missing-default-export`,`redirect-with-component`,`redirect-path-match`,`layout-without-outlet`,`server-without-load`,`orphan-server-file`,`load-fetched-twice`,`restart-needed`,`prerender-missing-root`]),k1={ssr:`SSR`,ssg:`Prerendered`,client:`Client only`,cached:`Cached`,redirect:`Redirect`},A1={all:`All`,page:`Pages`,load:`load()`,action:`Actions`,fn:`Server fn`,api:`API`},j1={success:`succeeded`,redirect:`redirected`,invalid:`validation errors`,error:`failed`},M1={success:`good`,redirect:`info`,invalid:`warn`,error:`bad`};function N1(e,t=0,n=[]){for(let r of e)n.push({route:r,depth:t}),N1(r.children,t+1,n);return n}var P1=class e{plural=xO;rpc=$(null);canCall=X(()=>bE(this.rpc(),`analog`));callsOff=kT(`analog`);kinds=[`all`,`page`,`load`,`action`,`fn`,`api`];methods=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`];methodOptions=this.methods.map(e=>({value:e,label:e}));view=D(`routes`);project=D(null);loadFailed=D(!1);state=D({});findings=D([]);renderRows=D([]);plan=D(null);filter=D(``);testUrl=D(``);explained=D(null);explainError=D(``);explaining=D(!1);kind=D(`all`);method=D(`GET`);apiPath=D(``);apiBody=D(``);confirmSend=Q({source:()=>`${this.method()} ${this.apiPath().trim()}`,computation:()=>!1});response=D(null);sending=D(!1);needsConfirm=X(()=>this.method()!==`GET`&&!this.confirmSend());canSend=X(()=>this.canCall()&&!this.sending()&&!this.needsConfirm());sendHintId=X(()=>this.canCall()?this.needsConfirm()?`analog-confirm-hint`:null:`analog-calls-off`);unsubscribe=null;refreshTimer;refreshRun=0;destroyRef=C(As);host=C(Vl);hostPageId=XT();page=X(()=>{let e=this.state().pages??[];return(this.hostPageId?e.find(e=>e.pageId===this.hostPageId):e[0])??null});openFiles=X(()=>{let e=new Map;for(let t of this.page()?.chain??[])t.file&&(!e.has(t.file)||!t.outlet)&&e.set(t.file,t.outlet??``);return e});allCalls=X(()=>this.state().calls??[]);maxServerCalls=D1;callQuery=D(``);failedOnly=D(!1);callsMessage=D(``);callFiltered=X(()=>!!this.callQuery().trim()||this.failedOnly());matchingCalls=X(()=>{let e=this.kind(),t=this.callQuery().trim().toLowerCase(),n=this.failedOnly();return this.allCalls().filter(r=>(e===`all`||r.kind===e)&&(!n||this.isFailed(r))&&(!t||this.callText(r).includes(t)))});calls=X(()=>this.matchingCalls().slice(-150).reverse());shownCount=X(()=>this.calls().length);serverFull=X(()=>this.allCalls().length>=D1);allRoutes=X(()=>N1(this.project()?.routes??[]));pageCount=X(()=>this.allRoutes().filter(e=>e.route.file&&e.route.kind!==`layout`).length);routeRows=X(()=>{let e=this.filter().trim().toLowerCase();return e?this.allRoutes().filter(t=>t.route.fullPath.toLowerCase().includes(e)||!!t.route.file?.toLowerCase().includes(e)):this.allRoutes()});serverFns=X(()=>this.project()?.serverFns??[]);fnById=X(()=>new Map(this.serverFns().map(e=>[e.id,e])));refetchedFns=X(()=>Array.from(new Set((this.state().refetches??[]).map(e=>this.fnById().get(e.id)?.name??e.id))));duplicates=X(()=>Array.from(new Set((this.state().duplicates??[]).map(e=>e.route))));modeCounts=X(()=>[`ssr`,`ssg`,`cached`,`client`,`redirect`].map(e=>({mode:e,label:k1[e],count:this.renderRows().filter(t=>t.mode===e).length})).filter(e=>e.count));lintCards=X(()=>{let e={error:0,warning:1,info:2},t=new Map;for(let e of this.findings()){let n=t.get(e.rule);if(!n){let r=E1[e.rule];n={rule:e.rule,severity:e.severity,title:r?.title??e.rule,summary:r?.summary??e.message,fix:e.fix,items:[]},t.set(e.rule,n)}let r=O1.has(e.rule)||e.message===n.summary?void 0:e.message;n.items.some(t=>t.file===e.file&&t.path===e.path&&t.message===r)||n.items.push({file:e.file,path:e.path,message:r})}return Array.from(t.values()).sort((t,n)=>e[t.severity]-e[n.severity])});lintCount=X(()=>{let e=this.findings();return{errors:e.filter(e=>e.severity===`error`).length,warnings:e.filter(e=>e.severity===`warning`).length}});lintTone=X(()=>{let{errors:e,warnings:t}=this.lintCount();return e?`bad`:t?`warn`:``});views=X(()=>{let{errors:e,warnings:t}=this.lintCount();return[{id:`routes`,label:`Routes`,count:this.pageCount(),tone:``},{id:`server`,label:`Server`,count:this.allCalls().length,tone:``},{id:`render`,label:`Render`,count:this.renderRows().length,tone:``},{id:`content`,label:`Content`,count:this.project()?.content.length??0,tone:``},{id:`lint`,label:`Lint`,count:e+t,tone:this.lintTone()}]});constructor(){_c(()=>{let e=this.rpc();e&&Z(()=>void this.load(e))}),_c(()=>{let e=this.view();this.state(),Z(()=>this.scheduleRefresh(e))}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),clearTimeout(this.refreshTimer)})}async load(e){let t=await nE(e,`analog-project`);if(!this.destroyRef.destroyed){this.project.set(t),this.loadFailed.set(t===null);try{let t=await e.scope(`pangular`).rpc.sharedState(`analog`);if(this.destroyRef.destroyed)return;let n=e=>this.state.set(e??{});n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.state.set({})}this.destroyRef.destroyed||await this.refresh(this.view())}}retry(){let e=this.rpc();e&&(this.loadFailed.set(!1),this.load(e))}scheduleRefresh(e){clearTimeout(this.refreshTimer),this.refreshTimer=setTimeout(()=>void this.refresh(e),300)}async refresh(e){let t=this.rpc();if(!t)return;let n=++this.refreshRun,[r,i]=await Promise.all([nE(t,`analog-lint`,this.hostPageId??void 0),nE(t,`analog-render`)]);if(n===this.refreshRun&&(this.findings.set(r??[]),this.renderRows.set(i?.rows??[]),this.plan.set(i?.plan??null),e===`routes`||e===`content`||this.project()===null)){let e=await nE(t,`analog-project`);e&&n===this.refreshRun&&(this.project.set(e),this.loadFailed.set(!1))}}isOpen(e){return!!e.file&&this.openFiles().has(e.file)}openText(e){let t=e.file?this.openFiles().get(e.file):void 0;return t?`open in ${t}`:`open`}kindText(e){return e.catchAll?e.catchAll===`optional`?`optional catch-all`:`catch-all`:e.kind===`implicit`?`folder`:e.kind}serverExports(e){return(e.serverExports??[]).filter(e=>e===`load`||e===`action`)}short(e){return e?.replace(/^\/src\/app\//,``).replace(/^\//,``)}dir(e){let t=this.short(e)??e;return t.includes(`/`)?t.slice(0,t.lastIndexOf(`/`)+1):``}base(e){return e.slice(e.lastIndexOf(`/`)+1)}paramList(e){return Object.entries(e)}kindLabel(e){return A1[e]}kindCount(e){return e===`all`?this.allCalls().length:this.allCalls().filter(t=>t.kind===e).length}modeLabel(e){return k1[e]}mismatch(e){return!e.last?.render||e.mode===`redirect`?!1:e.mode===`client`?e.last.render!==`client`:e.last.render===`client`}fnOf(e){return e.kind===`fn`&&e.route?this.fnById().get(e.route):void 0}fnCalls(e){return this.allCalls().filter(t=>t.kind===`fn`&&t.route===e).length}outcomeLabel(e){return j1[e]}outcomeTone(e){return M1[e]}statusClass(e){return e>=500||e===0?`bad`:e>=400?`warn`:`good`}tone(e){return e===`error`?`bad`:e===`warning`?`warn`:`info`}shadowed(e){return this.findings().find(t=>t.rule===`content-shadows-page`&&t.file===e)?.relatedFile}contentUrl(e){return this.allRoutes().find(t=>t.route.file===e)?.route.fullPath}pretty(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}time=vO;tryApi(e){this.method.set(e.method===`ANY`?`GET`:e.method),this.apiPath.set(e.path.replace(/:(\w+)/g,`1`).replace(`**`,`x`)),this.confirmSend.set(!1),this.response.set(null),queueMicrotask(()=>document.getElementById(`api-path`)?.focus())}isFailed(e){return!e.status||e.status>=400||e.outcome===`error`}callText(e){let t=this.fnOf(e);return[e.url,e.route,t?.name,t?.file].filter(Boolean).join(` `).toLowerCase()}clearCallFilters(){this.callQuery.set(``),this.failedOnly.set(!1),this.kind.set(`all`),queueMicrotask(()=>this.host.nativeElement.querySelector(`#analog-call-search`)?.focus())}async clearCalls(){let e=this.rpc();try{if(!e)throw Error(`No devtools server`);await tE(e,`analog-clear-calls`),this.callsMessage.set(`Calls cleared.`),queueMicrotask(()=>this.host.nativeElement.querySelector(`input[name="analog-kind"]:checked`)?.focus())}catch{this.callsMessage.set(`Could not clear the calls.`)}}async explain(){let e=this.testUrl().trim();if(!e){this.explained.set(null),this.explainError.set(`Type a URL to explain, for example /products/42.`);return}this.explaining.set(!0),this.explainError.set(``);try{let t=await tE(this.rpc(),`analog-explain-url`,e);if(!t)throw Error(`The devtools server did not answer`);this.explained.set({url:e,match:t})}catch(t){let n=String(t?.message||`The devtools server did not answer`);this.explained.set(null),this.explainError.set(`Could not explain ${e}. ${n.replace(/\.?$/,`.`)}`)}finally{this.explaining.set(!1)}}async send(){let e=this.apiPath().trim();if(!e||this.sending()||this.needsConfirm())return;let t;if(this.method()!==`GET`&&this.apiBody().trim())try{t=JSON.parse(this.apiBody())}catch{this.response.set({error:`The body is not valid JSON.`});return}this.response.set(null),this.sending.set(!0);try{let n=await nE(this.rpc(),`analog-call-api`,{method:this.method(),path:e,body:t,confirm:this.confirmSend()});this.response.set(n??{error:`No answer from the devtools server.`})}finally{this.sending.set(!1),this.confirmSend.set(!1)}}onKey(e){let t=this.views().map(e=>e.id),n=t.indexOf(this.view()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.view.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#analog-tab-${t[r]}`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-analog-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`role`,`alert`,1,`empty`],[`role`,`status`,1,`loading`],[1,`empty`],[1,`empty-title`],[1,`muted`],[`type`,`button`,1,`btn`,3,`click`],[`aria-hidden`,`true`,1,`spinner`],[`aria-label`,`Analog summary`,1,`summary`],[1,`stat`],[1,`label`],[1,`value`],[1,`stat`,`wide`],[`role`,`tablist`,`aria-label`,`Analog views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[1,`value`,`mono`,3,`title`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`count`],[1,`toolbar`],[1,`inline`,`explain`,3,`submit`],[`for`,`analog-url`],[`id`,`analog-url`,`type`,`text`,`placeholder`,`/products/42`,1,`field`,`grow`,`mono`,3,`input`,`value`],[`type`,`submit`,1,`btn`,`primary`,3,`disabled`],[`for`,`route-filter`,1,`sr-only`],[`id`,`route-filter`,`type`,`search`,`placeholder`,`Filter by path or file`,1,`field`,`filter`,3,`input`,`keydown.escape`,`value`],[`role`,`status`,1,`explain-result`],[`data-tone`,`bad`,1,`callout`],[1,`callout`],[`role`,`region`,`aria-label`,`File routes`,`tabindex`,`0`,1,`table-wrap`],[`scope`,`col`],[3,`open`,`dim`],[1,`mono`],[1,`chain`],[1,`chips`],[1,`mono`,3,`file`],[1,`pill`],[1,`chip`,`mono`],[1,`plain`],[1,`route`],[`aria-hidden`,`true`,1,`guide`],[1,`mono`,`path`],[1,`pill`,`live`],[1,`file`,3,`file`],[1,`meta`],[`data-kind`,`load`,1,`pill`],[1,`chip`],[1,`dir`],[`colspan`,`4`,1,`empty-row`],[`data-tone`,`warn`,`role`,`note`,1,`callout`],[`id`,`analog-calls-heading`],[1,`calls-bar`],[1,`segmented`],[1,`sr-only`],[3,`on`],[1,`calls-actions`],[`type`,`button`,1,`btn`,`ghost`,3,`click`,`disabled`],[`role`,`status`,1,`calls-message`],[`role`,`group`,`aria-label`,`Filter the server calls`,1,`call-filters`],[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`],[`id`,`analog-call-search`,`type`,`search`,`placeholder`,`Find a URL, path or function…`,`aria-label`,`Find a URL, path or function`,`autocomplete`,`off`,`spellcheck`,`false`,1,`field`,3,`input`,`keydown.escape`,`value`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[`aria-live`,`polite`,1,`total`],[1,`note`],[`role`,`region`,`aria-label`,`Server calls`,`tabindex`,`0`,1,`table-wrap`],[`role`,`status`,1,`empty-box`,`no-match`],[1,`empty-box`],[`role`,`region`,`aria-label`,`API routes`,`tabindex`,`0`,1,`table-wrap`],[1,`card`,`playground`,3,`submit`],[1,`row`],[`ariaLabel`,`Method`,1,`method-select`,3,`valueChange`,`options`,`value`],[`for`,`api-path`,1,`sr-only`],[`id`,`api-path`,`type`,`text`,`placeholder`,`/api/v1/products`,1,`field`,`grow`,`mono`,3,`input`,`value`],[`id`,`analog-calls-off`,1,`muted`],[`id`,`analog-confirm-hint`,1,`muted`],[`role`,`status`,1,`muted`],[`role`,`status`,1,`response`],[`type`,`radio`,`name`,`analog-kind`,1,`sr-only`,3,`change`,`checked`],[`scope`,`col`,1,`num`],[1,`muted`,`nowrap`],[1,`request`],[1,`method`],[1,`mono`,`url`],[1,`status`],[1,`num`,`nowrap`],[1,`mono`,`muted`,3,`file`],[1,`code`],[1,`empty-lead`],[1,`empty-actions`],[`type`,`button`,1,`btn`,`ghost`,3,`click`],[1,`actions`],[`role`,`region`,`aria-label`,`Server functions`,`tabindex`,`0`,1,`table-wrap`],[1,`num`,`tnum`],[`for`,`api-body`],[`id`,`api-body`,`rows`,`3`,`placeholder`,`{"name": "Ada"}`,1,`field`,`mono`,3,`input`,`value`],[1,`check`,`confirm-send`],[`data-status`,`bad`,1,`status`],[`role`,`status`,1,`note`],[`role`,`region`,`aria-label`,`Render modes`,`tabindex`,`0`,1,`table-wrap`],[1,`card`],[1,`muted`,`small`],[1,`muted`,`small`,`tnum`],[`data-tone`,`warn`,1,`pill`],[1,`facts`],[1,`tnum`],[`data-tone`,`warn`,1,`chip`,`mono`],[`data-tone`,`bad`,1,`chip`,`mono`],[`role`,`region`,`aria-label`,`Content files`,`tabindex`,`0`,1,`table-wrap`],[1,`muted`,`nowrap`,`tnum`],[`data-tone`,`bad`,1,`pill`],[`data-tone`,`good`,`role`,`status`,1,`callout`],[1,`findings`],[1,`finding-head`],[1,`finding-title`],[1,`where`],[1,`fix`],[1,`rule`,`mono`],[1,`detail`]],template:function(e,t){e&1&&j(0,CQ,7,0,`div`,0)(1,wQ,4,0,`div`,1)(2,TQ,14,0,`div`,2)(3,T1,36,10),e&2&&M(t.project()===null&&t.loadFailed()?0:t.project()===null?1:t.project().analog?3:2)},dependencies:[JD,Fj],styles:[`@charset "UTF-8"; +}`]})},pQ=()=>[],mQ=()=>[`/`],hQ=(e,t)=>t.id,gQ=(e,t)=>t.route.id,_Q=(e,t)=>t[0],vQ=(e,t)=>t.file+t.method,yQ=(e,t)=>t.path,bQ=(e,t)=>t.mode,xQ=(e,t)=>t.file,SQ=(e,t)=>t.rule;function CQ(e,t){if(e&1){let e=V();I(0,`div`,0)(1,`h2`,3),K(2,`Could not read the project.`),L(),I(3,`p`,4),K(4,` Check that the dev server with Pangular Inspector is still running, then retry. `),L(),I(5,`button`,5),H(`click`,function(){return w(e),T(W().retry())}),K(6,`Retry`),L()()}}function wQ(e,t){e&1&&(I(0,`div`,1),R(1,`span`,6),I(2,`span`),K(3,`Reading the project…`),L()())}function TQ(e,t){e&1&&(I(0,`div`,2)(1,`h2`,3),K(2,`This app is not an Analog app.`),L(),I(3,`p`,4),K(4,` Add `),I(5,`code`),K(6,`pangular()`),L(),K(7,` from `),I(8,`code`),K(9,`@pangular-inspector/devtools/vite`),L(),K(10,` next to `),I(11,`code`),K(12,`analog()`),L(),K(13,` in vite.config.ts and run the Analog dev server. `),L()())}function EQ(e,t){if(e&1&&(I(0,`div`,11)(1,`span`,9),K(2,`Open in the browser`),L(),I(3,`span`,15),K(4),L()()),e&2){let e=t;O(3),F(`title`,e.url),O(),q(e.url)}}function DQ(e,t){if(e&1){let e=V();I(0,`button`,16),H(`click`,function(){let t=w(e).$implicit;return T(W(2).view.set(t.id))}),K(1),I(2,`span`,17),K(3),L()()}if(e&2){let e=t.$implicit,n=W(2);F(`id`,`analog-tab-`+e.id),A(`aria-selected`,e.id===n.view())(`aria-controls`,`analog-panel-`+e.id)(`tabindex`,e.id===n.view()?0:-1),O(),J(` `,e.label,` `),O(),A(`data-tone`,e.tone),O(),q(e.count)}}function OQ(e,t){e&1&&(I(0,`div`,26),K(1),L()),e&2&&(O(),q(t))}function kQ(e,t){if(e&1&&(I(0,`app-source-link`,34),K(1),L()),e&2){let e=W().$implicit,t=W(5);F(`file`,e.file),O(),q(t.short(e.file))}}function AQ(e,t){if(e&1&&(I(0,`span`,31),K(1),L()),e&2){let e=W().$implicit;O(),q(e.fullPath)}}function jQ(e,t){if(e&1&&(I(0,`li`),j(1,kQ,2,2,`app-source-link`,34)(2,AQ,2,1,`span`,31),I(3,`span`,35),K(4),L()()),e&2){let e=t.$implicit;O(),M(e.file?1:2),O(2),A(`data-kind`,e.kind),O(),q(e.kind)}}function MQ(e,t){if(e&1&&(I(0,`span`,36),K(1),L()),e&2){let e=t.$implicit;O(),Y(``,e[0],` = `,e[1])}}function NQ(e,t){if(e&1&&(I(0,`div`,33),N(1,MQ,2,2,`span`,36,_Q),L()),e&2){let e=W(2),t=W(3);O(),P(t.paramList(e.match.params))}}function PQ(e,t){if(e&1&&(I(0,`strong`,31),K(1),L(),K(2,` renders `),I(3,`ol`,32),N(4,jQ,5,3,`li`,null,hQ),L(),j(6,NQ,3,0,`div`,33)),e&2){let e=W(),t=W(3);O(),q(e.url),O(3),P(e.match.chain),O(2),M(t.paramList(e.match.params).length?6:-1)}}function FQ(e,t){if(e&1&&(I(0,`app-source-link`,34),K(1),L()),e&2){let e=W().$implicit,t=W(6);F(`file`,e.file),O(),q(t.short(e.file))}}function IQ(e,t){if(e&1&&(I(0,`span`,31),K(1),L()),e&2){let e=W().$implicit;O(),q(e.path)}}function LQ(e,t){if(e&1&&(I(0,`li`),j(1,FQ,2,2,`app-source-link`,34)(2,IQ,2,1,`span`,31),I(3,`span`,4),K(4),L()()),e&2){let e=t.$implicit;O(),M(e.file?1:2),O(3),q(e.reason)}}function RQ(e,t){if(e&1&&(I(0,`ul`,37),N(1,LQ,5,2,`li`,null,gg),L()),e&2){let e=W(2);O(),P(e.match.rejected.slice(0,5))}}function zQ(e,t){if(e&1&&(I(0,`strong`,31),K(1),L(),K(2,` matches no file route. Angular throws NG04002 "Cannot match any routes". `),j(3,RQ,3,0,`ul`,37)),e&2){let e=W();O(),q(e.url),O(2),M(e.match.rejected.length?3:-1)}}function BQ(e,t){if(e&1&&(I(0,`div`,27),j(1,PQ,7,2)(2,zQ,4,2),L()),e&2){let e=t;A(`data-tone`,e.match.matched?`good`:`bad`),O(),M(e.match.matched?1:2)}}function VQ(e,t){e&1&&(I(0,`span`,39),K(1,`└`),L())}function HQ(e,t){if(e&1&&(I(0,`span`,41),K(1),L()),e&2){let e=W().$implicit,t=W(3);O(),q(t.openText(e.route))}}function UQ(e,t){if(e&1&&(I(0,`app-source-link`,42)(1,`span`,46),K(2),L(),K(3),L()),e&2){let e=W().$implicit,t=W(3);F(`file`,e.route.file),O(2),q(t.dir(e.route.file)),O(),q(t.base(e.route.file))}}function WQ(e,t){e&1&&(I(0,`span`,4),K(1,`folder only`),L())}function GQ(e,t){if(e&1&&(I(0,`span`,44),K(1),L()),e&2){let e=t.$implicit;O(),J(``,e,`()`)}}function KQ(e,t){if(e&1&&(I(0,`span`,45),K(1),L()),e&2){let e=W().$implicit;O(),J(`"`,e.route.title,`"`)}}function qQ(e,t){if(e&1&&(I(0,`span`,36),K(1),L()),e&2){let e=W().$implicit;O(),q(e)}}function JQ(e,t){if(e&1&&j(0,qQ,2,1,`span`,36),e&2){let e=t.$implicit;M(e===`title`?-1:0)}}function YQ(e,t){if(e&1&&(I(0,`tr`)(1,`td`)(2,`div`,38),j(3,VQ,2,0,`span`,39),I(4,`span`,40),K(5),L(),I(6,`span`,35),K(7),L(),j(8,HQ,2,1,`span`,41),L()(),I(9,`td`),j(10,UQ,4,3,`app-source-link`,42)(11,WQ,2,0,`span`,4),L(),I(12,`td`)(13,`div`,43),N(14,GQ,2,1,`span`,44,_g),L()(),I(16,`td`),j(17,KQ,2,1,`span`,45),N(18,JQ,1,1,null,null,_g),L()()),e&2){let e=t.$implicit,n=W(3);G(`open`,n.isOpen(e.route))(`dim`,e.route.kind===`group`||e.route.kind===`implicit`),O(2),y_(`padding-left`,e.depth*16,`px`),O(),M(e.depth?3:-1),O(2),q(e.route.fullPath),O(),A(`data-kind`,e.route.kind),O(),q(n.kindText(e.route)),O(),M(n.isOpen(e.route)?8:-1),O(2),M(e.route.file?10:11),O(4),P(n.serverExports(e.route)),O(3),M(e.route.title?17:-1),O(),P(e.route.routeMeta??rv(13,pQ))}}function XQ(e,t){e&1&&K(0,` No route matches the filter. Try part of a path or a file name. `)}function ZQ(e,t){e&1&&K(0,` No file routes yet. Add a .page.ts file under src/app/pages. `)}function QQ(e,t){if(e&1&&(I(0,`tr`)(1,`td`,47),j(2,XQ,1,0)(3,ZQ,1,0),L()()),e&2){let e=W(3);O(2),M(e.filter().trim()?2:3)}}function $Q(e,t){if(e&1){let e=V();I(0,`div`,18)(1,`form`,19),H(`submit`,function(t){w(e);let n=W(2);return t.preventDefault(),T(n.explain())}),I(2,`label`,20),K(3,`Test a URL`),L(),I(4,`input`,21),H(`input`,function(t){return w(e),T(W(2).testUrl.set(t.target.value))}),L(),I(5,`button`,22),K(6),L()(),I(7,`label`,23),K(8,`Filter routes`),L(),I(9,`input`,24),H(`input`,function(t){return w(e),T(W(2).filter.set(t.target.value))})(`keydown.escape`,function(){return w(e),T(W(2).filter.set(``))}),L()(),I(10,`div`,25),j(11,OQ,2,1,`div`,26)(12,BQ,3,2,`div`,27),L(),I(13,`div`,28)(14,`table`)(15,`thead`)(16,`tr`)(17,`th`,29),K(18,`Route`),L(),I(19,`th`,29),K(20,`File`),L(),I(21,`th`,29),K(22,`Data`),L(),I(23,`th`,29),K(24,`Route meta`),L()()(),I(25,`tbody`),N(26,YQ,20,14,`tr`,30,gQ,!1,QQ,4,1,`tr`),L()()()}if(e&2){let e,t=W(2);O(4),F(`value`,t.testUrl()),O(),F(`disabled`,t.explaining()),O(),J(` `,t.explaining()?`Explaining…`:`Explain`,` `),O(3),F(`value`,t.filter()),O(2),M((e=t.explainError())?11:(e=t.explained())?12:-1,e),O(15),P(t.routeRows())}}function e$(e,t){if(e&1&&(I(0,`span`,31),K(1),L(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;O(),q(e),O(),J(``,n===r-1?``:`, `,` `)}}function t$(e,t){if(e&1&&(I(0,`div`,48)(1,`strong`),K(2,`load() ran twice`),L(),K(3,` for `),N(4,e$,3,2,null,null,_g),K(6,` : once while server rendering, again in the browser. TransferState did not serve the server result. `),L()),e&2){let e=W(3);O(4),P(e.duplicates())}}function n$(e,t){if(e&1&&(I(0,`span`,31),K(1),L(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;O(),q(e),O(),J(``,n===r-1?``:`, `,` `)}}function r$(e,t){if(e&1&&(I(0,`div`,48)(1,`strong`),K(2,`Server function read ran twice`),L(),K(3,`: `),N(4,n$,3,2,null,null,_g),K(6,` ran while server rendering, then again in the browser. The browser did not use the TransferState seed. `),L()),e&2){let e=W(3);O(4),P(e.refetchedFns())}}function i$(e,t){if(e&1){let e=V();I(0,`label`)(1,`input`,80),H(`change`,function(){let t=w(e).$implicit;return T(W(3).kind.set(t))}),L(),K(2),I(3,`span`,4),K(4),L()()}if(e&2){let e=t.$implicit,n=W(3);G(`on`,n.kind()===e),O(),F(`checked`,n.kind()===e),A(`data-kind`,e),O(),J(` `,n.kindLabel(e),` `),O(2),q(n.kindCount(e))}}function a$(e,t){if(e&1){let e=V();I(0,`label`,63)(1,`input`,81),H(`change`,function(t){return w(e),T(W(3).allTabs.set(t.target.checked))}),L(),K(2,` All tabs (including untagged) `),L()}if(e&2){let e=W(3);O(),F(`checked`,e.allTabs())}}function o$(e,t){if(e&1&&K(0),e&2){let e=W(4);Y(` Showing the newest `,e.shownCount(),` of `,e.matchingCalls().length,`. `)}}function s$(e,t){e&1&&K(0),e&2&&J(` The dev server keeps only the newest `,W(4).maxServerCalls,` calls and drops older ones. `)}function c$(e,t){if(e&1&&(I(0,`p`,66),j(1,o$,1,2),j(2,s$,1,1),L()),e&2){let e=W(3);O(),M(e.shownCount()1?6:-1),O(2),q(e.summary),O(2),P(e.items),O(5),J(` `,e.fix),O(2),q(e.rule)}}function T1(e,t){if(e&1&&(I(0,`p`,4),K(1),L(),I(2,`ul`,115),N(3,w1,18,8,`li`,null,SQ),L()),e&2){let e=W(3);O(),Y(` `,e.plural(e.findings().length,`issue`),` in `,e.plural(e.lintCards().length,`group`),`. Each card says what is wrong, where, and how to fix it. `),O(2),P(e.lintCards())}}function E1(e,t){e&1&&(I(0,`div`,114)(1,`strong`),K(2,`No Analog problems found.`),L(),K(3,` Routes, server files, prerender config and content all check out. `),L())}function D1(e,t){e&1&&j(0,T1,5,2)(1,E1,4,0,`div`,114),e&2&&M(+!W(2).findings().length)}function O1(e,t){if(e&1){let e=V();I(0,`section`,7)(1,`div`,8)(2,`span`,9),K(3,`Analog`),L(),I(4,`span`,10),K(5),L()(),I(6,`div`,8)(7,`span`,9),K(8,`Pages`),L(),I(9,`span`,10),K(10),L()(),I(11,`div`,8)(12,`span`,9),K(13,`API routes`),L(),I(14,`span`,10),K(15),L()(),I(16,`div`,8)(17,`span`,9),K(18,`Server calls`),L(),I(19,`span`,10),K(20),L()(),I(21,`div`,8)(22,`span`,9),K(23,`Issues`),L(),I(24,`span`,10),K(25),L()(),j(26,EQ,5,2,`div`,11),L(),I(27,`div`,12),H(`keydown`,function(t){return w(e),T(W().onKey(t))}),N(28,DQ,4,7,`button`,13,hQ),L(),I(30,`div`,14),j(31,$Q,29,6)(32,B$,66,22)(33,f1,19,4)(34,v1,2,1)(35,D1,2,1),L()}if(e&2){let e,t,n=W();O(5),q(n.project().version||`unknown`),O(5),q(n.pageCount()),O(5),q(n.project().api.length),O(5),q(n.tabCalls().length),O(),A(`data-tone`,n.lintTone()||`good`),O(4),q(n.lintCount().errors+n.lintCount().warnings),O(),M((e=n.page())?26:-1,e),O(2),P(n.views()),O(2),F(`id`,`analog-panel-`+n.view()),A(`aria-labelledby`,`analog-tab-`+n.view()),O(),M((t=n.view())===`routes`?31:t===`server`?32:t===`render`?33:t===`content`?34:t===`lint`?35:-1)}}var k1={"scan-error":{title:`A folder could not be read`,summary:`Its files are missing from routes, API routes and lint results.`},"duplicate-url":{title:`Two files serve the same URL`,summary:`Only one of them is reachable; the other never renders.`},"sibling-params":{title:`Two dynamic pages in one folder`,summary:`Both are [param] pages at the same level, so the first one always wins.`},"missing-default-export":{title:`Page has no default export`,summary:`Analog needs the component as the default export, so the page renders nothing.`},"redirect-with-component":{title:`Redirect page also exports a component`,summary:`The redirect runs first, so the component never shows.`},"redirect-path-match":{title:`Redirect matches too much`,summary:`An empty-path redirect without pathMatch "full" catches every URL below it.`},"layout-without-outlet":{title:`Layout has no router-outlet`,summary:`The layout has child pages, but without they never render.`},"server-without-load":{title:`.server.ts without load or action`,summary:`The server file exports no load, action or server function, so Analog calls nothing.`},"orphan-server-file":{title:`.server.ts without a page`,summary:`No page file sits next to it, so its load never runs.`},"api-method-suffix":{title:`Unknown method suffix on an API file`,summary:`The suffix is not an HTTP method, so it becomes part of the URL.`},"duplicate-api-route":{title:`Two handlers for one API route`,summary:`Two files answer the same method and path.`},"api-outside-prefix":{title:`Server route outside the API prefix`,summary:`During vite dev only routes under the prefix reach Nitro.`},"prerender-unknown-route":{title:`Prerender entry matches no page`,summary:`prerender.routes lists a path that no page file serves.`},"prerender-missing-root":{title:`Home page is not prerendered`,summary:`static is on, but prerender.routes leaves out /.`},"content-frontmatter":{title:`Broken frontmatter`,summary:`The markdown frontmatter cannot be read.`},"duplicate-slug":{title:`Two posts share a slug`,summary:`injectContent picks one of them at random.`},"content-shadows-page":{title:`Markdown file takes over a page`,summary:`Files under src/content are routes too, so these URLs render the markdown file instead of the [param] page.`},"load-fetched-twice":{title:`load() runs twice`,summary:`These pages fetched their data while rendering on the server and again in the browser.`},"fn-fetched-twice":{title:`Server function read runs twice`,summary:`These reads ran while rendering on the server and again in the browser right after hydration.`},"restart-needed":{title:`New pages need a restart`,summary:`These page files exist, but the running router does not know them yet.`},"hydration-error":{title:`Hydration error`,summary:`The browser DOM did not match the server HTML.`},"api-not-found":{title:`API call failed with 404 or 405`,summary:`A request hit a path or method that no server route handles.`}},A1=200,j1=new Set([`missing-default-export`,`redirect-with-component`,`redirect-path-match`,`layout-without-outlet`,`server-without-load`,`orphan-server-file`,`load-fetched-twice`,`restart-needed`,`prerender-missing-root`]),M1={ssr:`SSR`,ssg:`Prerendered`,client:`Client only`,cached:`Cached`,redirect:`Redirect`},N1={all:`All`,page:`Pages`,load:`load()`,action:`Actions`,fn:`Server fn`,api:`API`},P1={success:`succeeded`,redirect:`redirected`,invalid:`validation errors`,error:`failed`},F1={success:`good`,redirect:`info`,invalid:`warn`,error:`bad`};function I1(e,t=0,n=[]){for(let r of e)n.push({route:r,depth:t}),I1(r.children,t+1,n);return n}var L1=class e{plural=xO;rpc=$(null);canCall=X(()=>bE(this.rpc(),`analog`));callsOff=kT(`analog`);kinds=[`all`,`page`,`load`,`action`,`fn`,`api`];methods=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`];methodOptions=this.methods.map(e=>({value:e,label:e}));view=D(`routes`);project=D(null);loadFailed=D(!1);state=D({});findings=D([]);renderRows=D([]);plan=D(null);filter=D(``);testUrl=D(``);explained=D(null);explainError=D(``);explaining=D(!1);kind=D(`all`);method=D(`GET`);apiPath=D(``);apiBody=D(``);confirmSend=Q({source:()=>`${this.method()} ${this.apiPath().trim()}`,computation:()=>!1});response=D(null);sending=D(!1);needsConfirm=X(()=>this.method()!==`GET`&&!this.confirmSend());canSend=X(()=>this.canCall()&&!this.sending()&&!this.needsConfirm());sendHintId=X(()=>this.canCall()?this.needsConfirm()?`analog-confirm-hint`:null:`analog-calls-off`);unsubscribe=null;refreshTimer;refreshRun=0;destroyRef=C(As);host=C(Vl);hostPageId=XT();page=X(()=>{let e=this.state().pages??[];return(this.hostPageId?e.find(e=>e.pageId===this.hostPageId):e[0])??null});openFiles=X(()=>{let e=new Map;for(let t of this.page()?.chain??[])t.file&&(!e.has(t.file)||!t.outlet)&&e.set(t.file,t.outlet??``);return e});allCalls=X(()=>this.state().calls??[]);scopePageId=X(()=>this.page()?.pageId);allTabs=D(!1);tabCalls=X(()=>{let e=this.scopePageId(),t=this.allCalls();return this.allTabs()||!e?t:t.filter(t=>t.pageId===e)});maxServerCalls=A1;callQuery=D(``);failedOnly=D(!1);callsMessage=D(``);callFiltered=X(()=>!!this.callQuery().trim()||this.failedOnly());matchingCalls=X(()=>{let e=this.kind(),t=this.callQuery().trim().toLowerCase(),n=this.failedOnly();return this.tabCalls().filter(r=>(e===`all`||r.kind===e)&&(!n||this.isFailed(r))&&(!t||this.callText(r).includes(t)))});calls=X(()=>this.matchingCalls().slice(-150).reverse());shownCount=X(()=>this.calls().length);serverFull=X(()=>this.allCalls().length>=A1);allRoutes=X(()=>I1(this.project()?.routes??[]));pageCount=X(()=>this.allRoutes().filter(e=>e.route.file&&e.route.kind!==`layout`).length);routeRows=X(()=>{let e=this.filter().trim().toLowerCase();return e?this.allRoutes().filter(t=>t.route.fullPath.toLowerCase().includes(e)||!!t.route.file?.toLowerCase().includes(e)):this.allRoutes()});serverFns=X(()=>this.project()?.serverFns??[]);fnById=X(()=>new Map(this.serverFns().map(e=>[e.id,e])));shownRoutes=X(()=>new Set(this.tabCalls().map(e=>`${e.kind} ${e.route??``}`)));refetchedFns=X(()=>Array.from(new Set((this.state().refetches??[]).filter(e=>this.shownRoutes().has(`fn ${e.id}`)).map(e=>this.fnById().get(e.id)?.name??e.id))));duplicates=X(()=>Array.from(new Set((this.state().duplicates??[]).filter(e=>this.shownRoutes().has(`load ${e.route}`)).map(e=>e.route))));modeCounts=X(()=>[`ssr`,`ssg`,`cached`,`client`,`redirect`].map(e=>({mode:e,label:M1[e],count:this.renderRows().filter(t=>t.mode===e).length})).filter(e=>e.count));lintCards=X(()=>{let e={error:0,warning:1,info:2},t=new Map;for(let e of this.findings()){let n=t.get(e.rule);if(!n){let r=k1[e.rule];n={rule:e.rule,severity:e.severity,title:r?.title??e.rule,summary:r?.summary??e.message,fix:e.fix,items:[]},t.set(e.rule,n)}let r=j1.has(e.rule)||e.message===n.summary?void 0:e.message;n.items.some(t=>t.file===e.file&&t.path===e.path&&t.message===r)||n.items.push({file:e.file,path:e.path,message:r})}return Array.from(t.values()).sort((t,n)=>e[t.severity]-e[n.severity])});lintCount=X(()=>{let e=this.findings();return{errors:e.filter(e=>e.severity===`error`).length,warnings:e.filter(e=>e.severity===`warning`).length}});lintTone=X(()=>{let{errors:e,warnings:t}=this.lintCount();return e?`bad`:t?`warn`:``});views=X(()=>{let{errors:e,warnings:t}=this.lintCount();return[{id:`routes`,label:`Routes`,count:this.pageCount(),tone:``},{id:`server`,label:`Server`,count:this.tabCalls().length,tone:``},{id:`render`,label:`Render`,count:this.renderRows().length,tone:``},{id:`content`,label:`Content`,count:this.project()?.content.length??0,tone:``},{id:`lint`,label:`Lint`,count:e+t,tone:this.lintTone()}]});constructor(){_c(()=>{let e=this.rpc();e&&Z(()=>void this.load(e))}),_c(()=>{let e=this.view();this.state(),Z(()=>this.scheduleRefresh(e))}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),clearTimeout(this.refreshTimer)})}async load(e){let t=await nE(e,`analog-project`);if(!this.destroyRef.destroyed){this.project.set(t),this.loadFailed.set(t===null);try{let t=await e.scope(`pangular`).rpc.sharedState(`analog`);if(this.destroyRef.destroyed)return;let n=e=>this.state.set(e??{});n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.state.set({})}this.destroyRef.destroyed||await this.refresh(this.view())}}retry(){let e=this.rpc();e&&(this.loadFailed.set(!1),this.load(e))}scheduleRefresh(e){clearTimeout(this.refreshTimer),this.refreshTimer=setTimeout(()=>void this.refresh(e),300)}async refresh(e){let t=this.rpc();if(!t)return;let n=++this.refreshRun,[r,i]=await Promise.all([nE(t,`analog-lint`,this.hostPageId??void 0),nE(t,`analog-render`)]);if(n===this.refreshRun&&(this.findings.set(r??[]),this.renderRows.set(i?.rows??[]),this.plan.set(i?.plan??null),e===`routes`||e===`content`||this.project()===null)){let e=await nE(t,`analog-project`);e&&n===this.refreshRun&&(this.project.set(e),this.loadFailed.set(!1))}}isOpen(e){return!!e.file&&this.openFiles().has(e.file)}openText(e){let t=e.file?this.openFiles().get(e.file):void 0;return t?`open in ${t}`:`open`}kindText(e){return e.catchAll?e.catchAll===`optional`?`optional catch-all`:`catch-all`:e.kind===`implicit`?`folder`:e.kind}serverExports(e){return(e.serverExports??[]).filter(e=>e===`load`||e===`action`)}short(e){return e?.replace(/^\/src\/app\//,``).replace(/^\//,``)}dir(e){let t=this.short(e)??e;return t.includes(`/`)?t.slice(0,t.lastIndexOf(`/`)+1):``}base(e){return e.slice(e.lastIndexOf(`/`)+1)}paramList(e){return Object.entries(e)}kindLabel(e){return N1[e]}kindCount(e){return e===`all`?this.tabCalls().length:this.tabCalls().filter(t=>t.kind===e).length}modeLabel(e){return M1[e]}mismatch(e){return!e.last?.render||e.mode===`redirect`?!1:e.mode===`client`?e.last.render!==`client`:e.last.render===`client`}fnOf(e){return e.kind===`fn`&&e.route?this.fnById().get(e.route):void 0}fnCalls(e){return this.tabCalls().filter(t=>t.kind===`fn`&&t.route===e).length}outcomeLabel(e){return P1[e]}outcomeTone(e){return F1[e]}statusClass(e){return e>=500||e===0?`bad`:e>=400?`warn`:`good`}tone(e){return e===`error`?`bad`:e===`warning`?`warn`:`info`}shadowed(e){return this.findings().find(t=>t.rule===`content-shadows-page`&&t.file===e)?.relatedFile}contentUrl(e){return this.allRoutes().find(t=>t.route.file===e)?.route.fullPath}pretty(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}time=vO;tryApi(e){this.method.set(e.method===`ANY`?`GET`:e.method),this.apiPath.set(e.path.replace(/:(\w+)/g,`1`).replace(`**`,`x`)),this.confirmSend.set(!1),this.response.set(null),queueMicrotask(()=>document.getElementById(`api-path`)?.focus())}isFailed(e){return!e.status||e.status>=400||e.outcome===`error`}callText(e){let t=this.fnOf(e);return[e.url,e.route,t?.name,t?.file].filter(Boolean).join(` `).toLowerCase()}clearCallFilters(){this.callQuery.set(``),this.failedOnly.set(!1),this.kind.set(`all`),queueMicrotask(()=>this.host.nativeElement.querySelector(`#analog-call-search`)?.focus())}async clearCalls(){let e=this.rpc();try{if(!e)throw Error(`No devtools server`);await tE(e,`analog-clear-calls`),this.callsMessage.set(`Calls cleared.`),queueMicrotask(()=>this.host.nativeElement.querySelector(`input[name="analog-kind"]:checked`)?.focus())}catch{this.callsMessage.set(`Could not clear the calls.`)}}async explain(){let e=this.testUrl().trim();if(!e){this.explained.set(null),this.explainError.set(`Type a URL to explain, for example /products/42.`);return}this.explaining.set(!0),this.explainError.set(``);try{let t=await tE(this.rpc(),`analog-explain-url`,e);if(!t)throw Error(`The devtools server did not answer`);this.explained.set({url:e,match:t})}catch(t){let n=String(t?.message||`The devtools server did not answer`);this.explained.set(null),this.explainError.set(`Could not explain ${e}. ${n.replace(/\.?$/,`.`)}`)}finally{this.explaining.set(!1)}}async send(){let e=this.apiPath().trim();if(!e||this.sending()||this.needsConfirm())return;let t;if(this.method()!==`GET`&&this.apiBody().trim())try{t=JSON.parse(this.apiBody())}catch{this.response.set({error:`The body is not valid JSON.`});return}this.response.set(null),this.sending.set(!0);try{let n=await nE(this.rpc(),`analog-call-api`,{method:this.method(),path:e,body:t,confirm:this.confirmSend()});this.response.set(n??{error:`No answer from the devtools server.`})}finally{this.sending.set(!1),this.confirmSend.set(!1)}}onKey(e){let t=this.views().map(e=>e.id),n=t.indexOf(this.view()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.view.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#analog-tab-${t[r]}`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-analog-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`role`,`alert`,1,`empty`],[`role`,`status`,1,`loading`],[1,`empty`],[1,`empty-title`],[1,`muted`],[`type`,`button`,1,`btn`,3,`click`],[`aria-hidden`,`true`,1,`spinner`],[`aria-label`,`Analog summary`,1,`summary`],[1,`stat`],[1,`label`],[1,`value`],[1,`stat`,`wide`],[`role`,`tablist`,`aria-label`,`Analog views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[1,`value`,`mono`,3,`title`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`count`],[1,`toolbar`],[1,`inline`,`explain`,3,`submit`],[`for`,`analog-url`],[`id`,`analog-url`,`type`,`text`,`placeholder`,`/products/42`,1,`field`,`grow`,`mono`,3,`input`,`value`],[`type`,`submit`,1,`btn`,`primary`,3,`disabled`],[`for`,`route-filter`,1,`sr-only`],[`id`,`route-filter`,`type`,`search`,`placeholder`,`Filter by path or file`,1,`field`,`filter`,3,`input`,`keydown.escape`,`value`],[`role`,`status`,1,`explain-result`],[`data-tone`,`bad`,1,`callout`],[1,`callout`],[`role`,`region`,`aria-label`,`File routes`,`tabindex`,`0`,1,`table-wrap`],[`scope`,`col`],[3,`open`,`dim`],[1,`mono`],[1,`chain`],[1,`chips`],[1,`mono`,3,`file`],[1,`pill`],[1,`chip`,`mono`],[1,`plain`],[1,`route`],[`aria-hidden`,`true`,1,`guide`],[1,`mono`,`path`],[1,`pill`,`live`],[1,`file`,3,`file`],[1,`meta`],[`data-kind`,`load`,1,`pill`],[1,`chip`],[1,`dir`],[`colspan`,`4`,1,`empty-row`],[`data-tone`,`warn`,`role`,`note`,1,`callout`],[`id`,`analog-calls-heading`],[1,`calls-bar`],[1,`segmented`],[1,`sr-only`],[3,`on`],[1,`calls-actions`],[`type`,`button`,1,`btn`,`ghost`,3,`click`,`disabled`],[`role`,`status`,1,`calls-message`],[`role`,`group`,`aria-label`,`Filter the server calls`,1,`call-filters`],[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`],[`id`,`analog-call-search`,`type`,`search`,`placeholder`,`Find a URL, path or function…`,`aria-label`,`Find a URL, path or function`,`autocomplete`,`off`,`spellcheck`,`false`,1,`field`,3,`input`,`keydown.escape`,`value`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[`aria-live`,`polite`,1,`total`],[1,`note`],[`role`,`region`,`aria-label`,`Server calls`,`tabindex`,`0`,1,`table-wrap`],[`role`,`status`,1,`empty-box`,`no-match`],[1,`empty-box`],[`role`,`region`,`aria-label`,`API routes`,`tabindex`,`0`,1,`table-wrap`],[1,`card`,`playground`,3,`submit`],[1,`row`],[`ariaLabel`,`Method`,1,`method-select`,3,`valueChange`,`options`,`value`],[`for`,`api-path`,1,`sr-only`],[`id`,`api-path`,`type`,`text`,`placeholder`,`/api/v1/products`,1,`field`,`grow`,`mono`,3,`input`,`value`],[`id`,`analog-calls-off`,1,`muted`],[`id`,`analog-confirm-hint`,1,`muted`],[`role`,`status`,1,`muted`],[`role`,`status`,1,`response`],[`type`,`radio`,`name`,`analog-kind`,1,`sr-only`,3,`change`,`checked`],[`type`,`checkbox`,`data-testid`,`analog-all-tabs`,3,`change`,`checked`],[`scope`,`col`,1,`num`],[1,`muted`,`nowrap`],[1,`request`],[1,`method`],[1,`mono`,`url`],[1,`status`],[1,`num`,`nowrap`],[1,`mono`,`muted`,3,`file`],[1,`code`],[1,`empty-lead`],[1,`empty-actions`],[`type`,`button`,1,`btn`,`ghost`,3,`click`],[1,`actions`],[`role`,`region`,`aria-label`,`Server functions`,`tabindex`,`0`,1,`table-wrap`],[1,`num`,`tnum`],[`for`,`api-body`],[`id`,`api-body`,`rows`,`3`,`placeholder`,`{"name": "Ada"}`,1,`field`,`mono`,3,`input`,`value`],[1,`check`,`confirm-send`],[`data-status`,`bad`,1,`status`],[`role`,`status`,1,`note`],[`role`,`region`,`aria-label`,`Render modes`,`tabindex`,`0`,1,`table-wrap`],[1,`card`],[1,`muted`,`small`],[1,`muted`,`small`,`tnum`],[`data-tone`,`warn`,1,`pill`],[1,`facts`],[1,`tnum`],[`data-tone`,`warn`,1,`chip`,`mono`],[`data-tone`,`bad`,1,`chip`,`mono`],[`role`,`region`,`aria-label`,`Content files`,`tabindex`,`0`,1,`table-wrap`],[1,`muted`,`nowrap`,`tnum`],[`data-tone`,`bad`,1,`pill`],[`data-tone`,`good`,`role`,`status`,1,`callout`],[1,`findings`],[1,`finding-head`],[1,`finding-title`],[1,`where`],[1,`fix`],[1,`rule`,`mono`],[1,`detail`]],template:function(e,t){e&1&&j(0,CQ,7,0,`div`,0)(1,wQ,4,0,`div`,1)(2,TQ,14,0,`div`,2)(3,O1,36,10),e&2&&M(t.project()===null&&t.loadFailed()?0:t.project()===null?1:t.project().analog?3:2)},dependencies:[JD,Fj],styles:[`@charset "UTF-8"; [_nghost-%COMP%] { --%NS%good: var(--%NS%ok); --%NS%bad: var(--%NS%danger); @@ -15318,7 +15318,7 @@ h2[_ngcontent-%COMP%] { color: var(--%NS%text-strong); font-size: 15px; font-weight: 600; -}`]})},F1=(e,t)=>t.id,I1=(e,t)=>t.name;function L1(e,t){if(e&1&&(z(0,`div`,5)(1,`dt`),K(2),B(),z(3,`dd`),K(4),B()()),e&2){let e=t.$implicit;O(2),q(e.name),O(),G(`masked`,e.masked),O(),q(e.value)}}function R1(e,t){if(e&1&&(z(0,`dl`),N(1,L1,5,4,`div`,5,I1),B()),e&2){let e=W().$implicit;O(),P(e.rows)}}function z1(e,t){if(e&1&&(z(0,`p`,4),K(1),B()),e&2){let e=W().$implicit;O(),q(e.none)}}function B1(e,t){if(e&1&&(z(0,`section`,1)(1,`h4`,3),K(2),B(),j(3,R1,3,0,`dl`)(4,z1,2,1,`p`,4),B()),e&2){let e=t.$implicit;A(`aria-labelledby`,e.id),O(),Pg(`id`,e.id),O(),Y(``,e.title,` (`,e.rows.length,`)`),O(),M(e.rows.length?3:4)}}var V1=class e{callId=$(``);request=$(void 0);response=$(void 0);sides=X(()=>[{id:`req-headers-${this.callId()}`,title:`Request headers`,rows:H1(this.request()),none:`None recorded.`},{id:`res-headers-${this.callId()}`,title:`Response headers`,rows:H1(this.response()),none:`None recorded. A cross-origin response shows only the headers CORS exposes.`}]);static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-http-headers`]],inputs:{callId:[1,`callId`],request:[1,`request`],response:[1,`response`]},decls:8,vars:0,consts:[[1,`headers`],[1,`side`],[1,`note`],[3,`id`],[1,`none`],[1,`row`]],template:function(e,t){e&1&&(z(0,`div`,0),N(1,B1,5,5,`section`,1,F1),B(),z(3,`p`,2),K(4,` Request headers are the ones the call had when it reached `),z(5,`code`),K(6,`withPangular()`),B(),K(7,`, before later interceptors added theirs. Credentials, cookies and secret values are masked. `),B()),e&2&&(O(),P(t.sides()))},styles:[`[_nghost-%COMP%] { +}`]})},R1=(e,t)=>t.id,z1=(e,t)=>t.name;function B1(e,t){if(e&1&&(z(0,`div`,5)(1,`dt`),K(2),B(),z(3,`dd`),K(4),B()()),e&2){let e=t.$implicit;O(2),q(e.name),O(),G(`masked`,e.masked),O(),q(e.value)}}function V1(e,t){if(e&1&&(z(0,`dl`),N(1,B1,5,4,`div`,5,z1),B()),e&2){let e=W().$implicit;O(),P(e.rows)}}function H1(e,t){if(e&1&&(z(0,`p`,4),K(1),B()),e&2){let e=W().$implicit;O(),q(e.none)}}function U1(e,t){if(e&1&&(z(0,`section`,1)(1,`h4`,3),K(2),B(),j(3,V1,3,0,`dl`)(4,H1,2,1,`p`,4),B()),e&2){let e=t.$implicit;A(`aria-labelledby`,e.id),O(),Pg(`id`,e.id),O(),Y(``,e.title,` (`,e.rows.length,`)`),O(),M(e.rows.length?3:4)}}var W1=class e{callId=$(``);request=$(void 0);response=$(void 0);sides=X(()=>[{id:`req-headers-${this.callId()}`,title:`Request headers`,rows:G1(this.request()),none:`None recorded.`},{id:`res-headers-${this.callId()}`,title:`Response headers`,rows:G1(this.response()),none:`None recorded. A cross-origin response shows only the headers CORS exposes.`}]);static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-http-headers`]],inputs:{callId:[1,`callId`],request:[1,`request`],response:[1,`response`]},decls:8,vars:0,consts:[[1,`headers`],[1,`side`],[1,`note`],[3,`id`],[1,`none`],[1,`row`]],template:function(e,t){e&1&&(z(0,`div`,0),N(1,U1,5,5,`section`,1,R1),B(),z(3,`p`,2),K(4,` Request headers are the ones the call had when it reached `),z(5,`code`),K(6,`withPangular()`),B(),K(7,`, before later interceptors added theirs. Credentials, cookies and secret values are masked. `),B()),e&2&&(O(),P(t.sides()))},styles:[`[_nghost-%COMP%] { display: block; margin-top: 12px; } @@ -15385,7 +15385,7 @@ dd.masked[_ngcontent-%COMP%] { .note[_ngcontent-%COMP%] { margin-top: 8px; -}`]})};function H1(e){return Object.entries(e??{}).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>({name:e,value:t,masked:t.includes(`[redacted]`)}))}var U1=(e,t)=>t.key,W1=(e,t)=>t.call.id;function G1(e,t){if(e&1){let e=V();I(0,`li`)(1,`button`,14),H(`click`,function(){let t=w(e).$implicit;return T(W(3).open.emit(t.call.id))}),I(2,`span`,15)(3,`span`,16),K(4),L(),I(5,`span`,17),K(6),L()(),I(7,`span`,18),R(8,`span`),L(),I(9,`span`,19)(10,`span`),K(11),L(),K(12),L()()()}if(e&2){let e=t.$implicit,n=W(3);O(),G(`selected`,n.selectedId()===e.call.id),A(`data-call-id`,e.call.id)(`aria-pressed`,n.selectedId()===e.call.id)(`aria-label`,e.label)(`aria-controls`,n.selectedId()?`call-preview`:null),O(3),q(e.call.method),O(),F(`title`,e.call.url),O(),q(n.pathOf(e.call.url)),O(2),b_(`bar `+e.tone),y_(`left`,e.left,`%`)(`width`,e.width,`%`),O(2),b_(`status status-`+e.tone),O(),q(e.status),O(),Y(` · +`,e.offsetMs,` ms · `,e.call.durationMs,` ms`)}}function K1(e,t){if(e&1&&(I(0,`section`,7)(1,`h3`,8)(2,`span`,9),K(3),L(),I(4,`span`,10),K(5,`, `),L(),I(6,`span`,11),K(7),L(),I(8,`span`,10),K(9,`, `),L(),I(10,`span`,12),K(11),L()(),I(12,`ul`,13),N(13,G1,13,20,`li`,null,W1),L()()),e&2){let e=t.$implicit;A(`aria-labelledby`,`wf-`+e.key),O(),F(`id`,`wf-`+e.key),O(2),J(`Navigation `,e.index),O(3),F(`title`,e.url),O(),q(e.url||`Unknown page`),O(4),z_(``,e.rows.length,` `,e.rows.length===1?`call`:`calls`,`, `,e.spanMs,` ms`),O(2),P(e.rows)}}function q1(e,t){if(e&1&&(I(0,`div`,1)(1,`span`),R(2,`i`,2),K(3,`Network`),L(),I(4,`span`),R(5,`i`,3),K(6,`Transfer cache`),L(),I(7,`span`),R(8,`i`,4),K(9,`Failed`),L(),I(10,`span`),R(11,`i`,5),K(12,`Cancelled`),L()(),I(13,`div`,6),N(14,K1,15,8,`section`,7,U1),L()),e&2){let e=W();O(14),P(e.groups())}}function J1(e,t){e&1&&(I(0,`div`,0)(1,`p`),K(2,`No client calls to show.`),L(),I(3,`p`,20),K(4,` The waterfall shows calls made in the browser. Clear the filters or pick All sides, then use the page. `),L()())}function Y1(e){try{let t=new URL(e,`http://x`);return t.pathname+t.search}catch{return e}}function X1(e){return e.cancelled?`cancelled`:e.status?String(e.status):`ERR`}function Z1(e){return e.cancelled?`neutral`:!e.status||e.status>=400||e.error?`bad`:e.cacheHit?`cache`:`ok`}function Q1(e){let t=[],n=e.filter(e=>e.side===`client`).sort((e,t)=>e.at-t.at),r;for(let e of n){let n=e.pageUrl??``;(!r||r.url!==n)&&(r={key:`${e.at}:${e.id}`,index:t.length+1,url:n,startedAt:e.at,spanMs:0,rows:[]},t.push(r));let i=e.at-r.startedAt;r.spanMs=Math.max(r.spanMs,i+Math.max(e.durationMs,0)),r.rows.push({call:e,offsetMs:i,left:0,width:0,tone:Z1(e),status:X1(e)+(e.cacheHit&&!e.cancelled?` cache`:``),label:``})}for(let e of t){let t=Math.max(e.spanMs,1);for(let n of e.rows)n.left=n.offsetMs/t*100,n.width=Math.max(Math.max(n.call.durationMs,0)/t*100,.8),n.label=`${n.call.method} ${Y1(n.call.url)}, starts at +${n.offsetMs} ms, takes ${n.call.durationMs} ms, status ${X1(n.call)}`+(n.call.cacheHit?`, transfer cache`:``)}return t.reverse()}var $1=class e{calls=$([]);selectedId=$(null);open=bv();groups=X(()=>Q1(this.calls()));pathOf=Y1;static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-network-waterfall`]],inputs:{calls:[1,`calls`],selectedId:[1,`selectedId`]},outputs:{open:`open`},decls:2,vars:1,consts:[[`role`,`status`,1,`empty`],[`aria-hidden`,`true`,1,`legend`],[1,`swatch`,`ok`],[1,`swatch`,`cache`],[1,`swatch`,`bad`],[1,`swatch`,`neutral`],[`appRovingList`,`button.wf-row`,1,`groups`],[1,`group`],[1,`group-head`,3,`id`],[1,`group-title`],[1,`sr-only`],[1,`group-url`,3,`title`],[1,`group-meta`],[1,`rows`],[`type`,`button`,1,`wf-row`,3,`click`],[1,`name`],[1,`method`],[1,`path`,3,`title`],[`aria-hidden`,`true`,1,`track`],[`aria-hidden`,`true`,1,`time`],[1,`muted`,`small`]],template:function(e,t){e&1&&j(0,q1,16,0)(1,J1,5,0,`div`,0),e&2&&M(+!t.groups().length)},dependencies:[Iz],styles:[`[_nghost-%COMP%] { +}`]})};function G1(e){return Object.entries(e??{}).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>({name:e,value:t,masked:t.includes(`[redacted]`)}))}var K1=(e,t)=>t.key,q1=(e,t)=>t.call.id;function J1(e,t){if(e&1){let e=V();I(0,`li`)(1,`button`,14),H(`click`,function(){let t=w(e).$implicit;return T(W(3).open.emit(t.call.id))}),I(2,`span`,15)(3,`span`,16),K(4),L(),I(5,`span`,17),K(6),L()(),I(7,`span`,18),R(8,`span`),L(),I(9,`span`,19)(10,`span`),K(11),L(),K(12),L()()()}if(e&2){let e=t.$implicit,n=W(3);O(),G(`selected`,n.selectedId()===e.call.id),A(`data-call-id`,e.call.id)(`aria-pressed`,n.selectedId()===e.call.id)(`aria-label`,e.label)(`aria-controls`,n.selectedId()?`call-preview`:null),O(3),q(e.call.method),O(),F(`title`,e.call.url),O(),q(n.pathOf(e.call.url)),O(2),b_(`bar `+e.tone),y_(`left`,e.left,`%`)(`width`,e.width,`%`),O(2),b_(`status status-`+e.tone),O(),q(e.status),O(),Y(` · +`,e.offsetMs,` ms · `,e.call.durationMs,` ms`)}}function Y1(e,t){if(e&1&&(I(0,`section`,7)(1,`h3`,8)(2,`span`,9),K(3),L(),I(4,`span`,10),K(5,`, `),L(),I(6,`span`,11),K(7),L(),I(8,`span`,10),K(9,`, `),L(),I(10,`span`,12),K(11),L()(),I(12,`ul`,13),N(13,J1,13,20,`li`,null,q1),L()()),e&2){let e=t.$implicit;A(`aria-labelledby`,`wf-`+e.key),O(),F(`id`,`wf-`+e.key),O(2),J(`Navigation `,e.index),O(3),F(`title`,e.url),O(),q(e.url||`Unknown page`),O(4),z_(``,e.rows.length,` `,e.rows.length===1?`call`:`calls`,`, `,e.spanMs,` ms`),O(2),P(e.rows)}}function X1(e,t){if(e&1&&(I(0,`div`,1)(1,`span`),R(2,`i`,2),K(3,`Network`),L(),I(4,`span`),R(5,`i`,3),K(6,`Transfer cache`),L(),I(7,`span`),R(8,`i`,4),K(9,`Failed`),L(),I(10,`span`),R(11,`i`,5),K(12,`Cancelled`),L()(),I(13,`div`,6),N(14,Y1,15,8,`section`,7,K1),L()),e&2){let e=W();O(14),P(e.groups())}}function Z1(e,t){e&1&&(I(0,`div`,0)(1,`p`),K(2,`No client calls to show.`),L(),I(3,`p`,20),K(4,` The waterfall shows calls made in the browser. Clear the filters or pick All sides, then use the page. `),L()())}function Q1(e){try{let t=new URL(e,`http://x`);return t.pathname+t.search}catch{return e}}function $1(e){return e.cancelled?`cancelled`:e.status?String(e.status):`ERR`}function e0(e){return e.cancelled?`neutral`:!e.status||e.status>=400||e.error?`bad`:e.cacheHit?`cache`:`ok`}function t0(e){let t=[],n=e.filter(e=>e.side===`client`).sort((e,t)=>e.at-t.at),r;for(let e of n){let n=e.pageUrl??``;(!r||r.url!==n)&&(r={key:`${e.at}:${e.id}`,index:t.length+1,url:n,startedAt:e.at,spanMs:0,rows:[]},t.push(r));let i=e.at-r.startedAt;r.spanMs=Math.max(r.spanMs,i+Math.max(e.durationMs,0)),r.rows.push({call:e,offsetMs:i,left:0,width:0,tone:e0(e),status:$1(e)+(e.cacheHit&&!e.cancelled?` cache`:``),label:``})}for(let e of t){let t=Math.max(e.spanMs,1);for(let n of e.rows)n.left=n.offsetMs/t*100,n.width=Math.max(Math.max(n.call.durationMs,0)/t*100,.8),n.label=`${n.call.method} ${Q1(n.call.url)}, starts at +${n.offsetMs} ms, takes ${n.call.durationMs} ms, status ${$1(n.call)}`+(n.call.cacheHit?`, transfer cache`:``)}return t.reverse()}var n0=class e{calls=$([]);selectedId=$(null);open=bv();groups=X(()=>t0(this.calls()));pathOf=Q1;static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-network-waterfall`]],inputs:{calls:[1,`calls`],selectedId:[1,`selectedId`]},outputs:{open:`open`},decls:2,vars:1,consts:[[`role`,`status`,1,`empty`],[`aria-hidden`,`true`,1,`legend`],[1,`swatch`,`ok`],[1,`swatch`,`cache`],[1,`swatch`,`bad`],[1,`swatch`,`neutral`],[`appRovingList`,`button.wf-row`,1,`groups`],[1,`group`],[1,`group-head`,3,`id`],[1,`group-title`],[1,`sr-only`],[1,`group-url`,3,`title`],[1,`group-meta`],[1,`rows`],[`type`,`button`,1,`wf-row`,3,`click`],[1,`name`],[1,`method`],[1,`path`,3,`title`],[`aria-hidden`,`true`,1,`track`],[`aria-hidden`,`true`,1,`time`],[1,`muted`,`small`]],template:function(e,t){e&1&&j(0,X1,16,0)(1,Z1,5,0,`div`,0),e&2&&M(+!t.groups().length)},dependencies:[Iz],styles:[`[_nghost-%COMP%] { display: block; } @@ -15591,7 +15591,7 @@ dd.masked[_ngcontent-%COMP%] { .wf-row[_ngcontent-%COMP%] { transition: none; } -}`]})},e0=[`callsBody`],t0=(e,t)=>t.id,n0=(e,t)=>t.id+t.kind,r0=(e,t)=>t.entry.side+t.entry.id,i0=(e,t)=>t.key;function a0(e,t){e&1&&(I(0,`div`,2),R(1,`span`,71),I(2,`span`),K(3,`Loading…`),L()())}function o0(e,t){if(e&1){let e=V();I(0,`div`,3)(1,`strong`),K(2,`Could not reach the devtools server.`),L(),I(3,`span`),K(4,`Check that the app's dev server is running with the devtools plugin.`),L(),I(5,`button`,27),H(`click`,function(){return w(e),T(W().retry())}),K(6,`Try again`),L()()}}function s0(e,t){e&1&&(I(0,`span`,87),K(1,`this page`),L())}function c0(e,t){e&1&&(I(0,`span`,88),K(1,`overridden`),L())}function l0(e,t){e&1&&(I(0,`span`,89),K(1,`aborted`),L())}function u0(e,t){if(e&1){let e=V();I(0,`tr`,78),H(`click`,function(){let t=w(e).$implicit;return T(W(2).selectedRequestId.set(t.id))}),I(1,`td`,79)(2,`button`,80)(3,`span`,81),K(4),L(),K(5),I(6,`span`,82),K(7),L()()(),I(8,`td`,83),R(9,`span`,84),K(10),L(),I(11,`td`),K(12),L(),I(13,`td`,85),K(14),L(),I(15,`td`,85),K(16),L(),I(17,`td`)(18,`div`,86),j(19,s0,2,0,`span`,87),j(20,c0,2,0,`span`,88),j(21,l0,2,0,`span`,89),L()()()}if(e&2){let e=t.$implicit,n=W(2);G(`selected`,n.selectedRequest()?.id===e.id),O(2),F(`title`,e.url),A(`aria-pressed`,n.selectedRequest()?.id===e.id),O(2),q(e.method),O(),J(` `,e.url,` `),O(2),Y(`, `,e.status,`, `,n.renderModeLabel(e.renderMode)),O(),G(`ok`,n.statusTone(e.status)===`ok`)(`redirect`,n.statusTone(e.status)===`redirect`)(`bad`,n.statusTone(e.status)===`bad`),O(2),J(``,e.status,` `),O(2),q(n.renderModeLabel(e.renderMode)),O(2),J(``,e.renderMs,` ms`),O(2),Y(``,e.fetches,` (`,e.fetchMs,` ms)`),O(3),M(e.id===n.selected()?.ssrRequestId?19:-1),O(),M(e.overrides?.length?20:-1),O(),M(e.aborted?21:-1)}}function d0(e,t){e&1&&(I(0,`p`,60),K(1),I(2,`code`),K(3,`ssrMiddleware`),L(),K(4,` saw it, so the render mode can't be read and TransferState edits can't apply. Mount `),I(5,`code`),K(6,`ssrMiddleware`),L(),K(7,` after `),I(8,`code`),K(9,`compression()`),L(),K(10,`. `),L()),e&2&&(O(),J(` The body was already compressed (`,t,`) when `))}function f0(e,t){if(e&1&&(I(0,`span`,94),K(1),L()),e&2){let e=W().$implicit;O(),q(e.note)}}function p0(e,t){if(e&1&&(I(0,`p`,93)(1,`span`,88),K(2),L(),I(3,`span`),K(4),L(),j(5,f0,2,1,`span`,94),L()),e&2){let e=t.$implicit,n=W(4);O(2),q(n.overrideLabel(e.kind)),O(2),q(e.applied?`applied`:`not applied`),O(),M(e.note?5:-1)}}function m0(e,t){if(e&1&&(I(0,`h3`),K(1,`Overrides from the panel`),L(),I(2,`p`,60),K(3,` This response was changed on purpose, so it is not what the app sends on its own. `),L(),N(4,p0,6,3,`p`,93,n0)),e&2){let e=W();O(4),P(e.overrides)}}function h0(e,t){if(e&1&&(K(0,` to `),I(1,`code`),K(2),L()),e&2){let e=W().$implicit;O(2),q(e.finalUrl)}}function g0(e,t){if(e&1&&(I(0,`div`)(1,`dt`),K(2,`Guards`),L(),I(3,`dd`),K(4),L()()),e&2){let e=W().$implicit,t=W(4);O(3),G(`bad`,t.guardVerdict(e)===`rejected`),O(),Y(` `,t.msLabel(e.guards.ms),``,t.guardVerdict(e)?`, `+t.guardVerdict(e):``,` `)}}function _0(e,t){if(e&1&&(I(0,`div`)(1,`dt`),K(2,`Resolvers`),L(),I(3,`dd`),K(4),L()()),e&2){let e=W().$implicit,t=W(4);O(4),q(t.msLabel(e.resolvers.ms))}}function v0(e,t){if(e&1&&(I(0,`div`)(1,`dt`),K(2,`Navigation total`),L(),I(3,`dd`),K(4),L()()),e&2){let e=W().$implicit;O(4),J(``,e.durationMs,` ms`)}}function y0(e,t){if(e&1&&(I(0,`p`,60),K(1),L()),e&2){let e=W().$implicit;O(),q(e.reason)}}function b0(e,t){if(e&1&&(I(0,`dl`,95)(1,`div`)(2,`dt`),K(3,`Navigation`),L(),I(4,`dd`)(5,`code`),K(6),L(),j(7,h0,3,1),K(8),L()(),j(9,g0,5,4,`div`),j(10,_0,5,1,`div`),j(11,v0,5,1,`div`),L(),j(12,y0,2,1,`p`,60)),e&2){let e=t.$implicit;O(6),q(e.url),O(),M(e.finalUrl?7:-1),O(),J(` (`,e.outcome,`) `),O(),M(e.guards?9:-1),O(),M(e.resolvers?10:-1),O(),M(e.durationMs===void 0?-1:11),O(),M(e.reason?12:-1)}}function x0(e,t){if(e&1&&(I(0,`h3`),K(1,`Router during the render`),L(),N(2,b0,13,7,null,null,gg)),e&2){let e=W();O(2),P(e.navigations)}}function S0(e,t){e&1&&(I(0,`span`,87),K(1,`cached`),L())}function C0(e,t){if(e&1&&(I(0,`span`,97),K(1,`not cached`),L()),e&2){let e=W().$implicit;F(`title`,W(3).skipText(e.cacheSkip))}}function w0(e,t){if(e&1&&(I(0,`p`,98),K(1),L()),e&2){let e=W().$implicit,t=W(3);O(),J(`Not cached: `,t.skipText(e.cacheSkip),`.`)}}function T0(e,t){if(e&1&&(I(0,`p`,93)(1,`span`,81),K(2),L(),I(3,`span`,96),K(4),L(),I(5,`span`,83),K(6),L(),I(7,`span`,94),K(8),L(),j(9,S0,2,0,`span`,87)(10,C0,2,1,`span`,97),L(),j(11,w0,2,1,`p`,98)),e&2){let e=t.$implicit,n=W(3);O(2),q(e.method),O(),F(`title`,e.url),O(),q(e.url),O(),G(`ok`,n.callTone(e)===`ok`)(`bad`,n.callTone(e)===`bad`),O(),q(n.statusLabel(e)),O(2),J(``,e.durationMs,` ms`),O(),M(e.cacheStored?9:e.cacheSkip?10:-1),O(2),M(!e.cacheStored&&e.cacheSkip?11:-1)}}function E0(e,t){e&1&&(I(0,`p`,60),K(1,`The render made no HttpClient calls.`),L())}function D0(e,t){e&1&&(I(0,`p`,98),K(1),L()),e&2&&(O(),J(`Why: `,t,`.`))}function O0(e,t){if(e&1&&(I(0,`p`,93)(1,`span`,81),K(2),L(),I(3,`span`,96),K(4),L(),I(5,`span`,89),K(6,`cache miss`),L()(),j(7,D0,2,1,`p`,98)),e&2){let e,n=t.$implicit,r=W(4);O(2),q(n.method),O(),F(`title`,n.url),O(),q(n.url),O(3),M((e=r.refetchReason(n))?7:-1,e)}}function k0(e,t){if(e&1&&(I(0,`h3`),K(1),L(),I(2,`p`,60),K(3,` These calls ran on the server and again after hydration instead of reading the transfer cache. `),L(),N(4,O0,8,4,null,null,t0)),e&2){let e=W(3);O(),J(`Fetched again in the browser (`,e.refetched().length,`)`),O(3),P(e.refetched())}}function A0(e,t){e&1&&(I(0,`p`,92),K(1,`No server call ran again in the browser.`),L())}function j0(e,t){if(e&1&&(I(0,`div`,77)(1,`h3`,90),K(2),I(3,`code`),K(4),L()(),I(5,`dl`,91)(6,`div`)(7,`dt`),K(8,`Request id`),L(),I(9,`dd`)(10,`code`),K(11),L()()(),I(12,`div`)(13,`dt`),K(14,`Render`),L(),I(15,`dd`),K(16),L()(),I(17,`div`)(18,`dt`),K(19,`Total`),L(),I(20,`dd`),K(21),L()(),I(22,`div`)(23,`dt`),K(24,`Sent`),L(),I(25,`dd`),K(26),L()(),I(27,`div`)(28,`dt`),K(29,`Browser page`),L(),I(30,`dd`),K(31),L()()(),j(32,d0,11,1,`p`,60),j(33,m0,6,0),j(34,x0,4,0),I(35,`h3`),K(36),L(),N(37,T0,12,11,null,null,t0,!1,E0,2,0,`p`,60),j(40,k0,6,1)(41,A0,2,0,`p`,92),L()),e&2){let e,n=t,r=W(2);O(2),J(` `,n.method,` `),O(2),q(n.url),O(7),q(n.id),O(5),J(``,n.renderMs,` ms`),O(5),J(``,n.durationMs,` ms`),O(5),J(``,n.bytes,` B`),O(5),q(r.requestPage()?.title||r.requestPage()?.url||`not connected`),O(),M((e=r.compressedWith(n))?32:-1,e),O(),M(n.overrides?.length?33:-1),O(),M(n.navigations?.length?34:-1),O(2),J(`Server calls (`,r.requestCalls().length,`)`),O(),P(r.requestCalls()),O(3),M(r.refetched().length?40:r.requestPage()&&r.requestCalls().length?41:-1)}}function M0(e,t){if(e&1&&(I(0,`div`,72)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,73),K(5,`Request`),L(),I(6,`th`,73),K(7,`Status`),L(),I(8,`th`,73),K(9,`Render mode`),L(),I(10,`th`,74),K(11,`Render`),L(),I(12,`th`,74),K(13,`Server calls`),L(),I(14,`th`,73),K(15,`Notes`),L()()(),I(16,`tbody`,75),N(17,u0,22,22,`tr`,76,t0),L()()(),j(19,j0,42,13,`div`,77)),e&2){let e,t=W();O(17),P(t.requests()),O(2),M((e=t.selectedRequest())?19:-1,e)}}function N0(e,t){e&1&&(I(0,`div`,13)(1,`p`),K(2,`No SSR requests traced.`),L(),I(3,`p`,60),K(4,` Add `),I(5,`code`),K(6,`app.use(devtools.ssrMiddleware)`),L(),K(7,` before the Angular handler in `),I(8,`code`),K(9,`server.ts`),L(),K(10,`, or wrap a web-standard handler with `),I(11,`code`),K(12,`withPangularSsr()`),L(),K(13,`, then load a server rendered page. `),L()())}function P0(e,t){if(e&1){let e=V();I(0,`app-network-waterfall`,99),H(`open`,function(t){return w(e),T(W().openCall(t))}),L()}if(e&2){let e=W();F(`calls`,e.waterfallCalls())(`selectedId`,e.selectedCall()?.id??null)}}function F0(e,t){e&1&&(I(0,`p`,100),K(1,` Rows render as you scroll, so the browser's find only sees the ones near view; the search field searches them all. `),L())}function I0(e,t){if(e&1&&(I(0,`tr`,103),R(1,`td`,104),L()),e&2){let e=W(2);O(),y_(`height`,e.callWindow.padTop(),`px`)}}function L0(e,t){e&1&&(I(0,`span`,105),K(1,`transfer cache`),L())}function R0(e,t){if(e&1&&(I(0,`span`,105),K(1),L()),e&2){W();let e=J_(0);O(),J(`delayed `,e.delayMs,` ms`)}}function z0(e,t){e&1&&(I(0,`span`,88),K(1,`mocked`),L())}function B0(e,t){e&1&&(I(0,`span`,89),K(1,`faulted`),L())}function V0(e,t){if(e&1&&(I(0,`span`,108),K(1,`rule `),I(2,`code`),K(3),L()()),e&2){let e=t;F(`title`,`Matched rule: `+e),O(3),q(e)}}function H0(e,t){if(e&1){let e=V();K_(0),I(1,`tr`,78),H(`click`,function(){w(e);let t=J_(0);return T(W(2).openCall(t.id))}),I(2,`td`)(3,`span`,105),K(4),L()(),I(5,`td`,81),K(6),L(),I(7,`td`,79)(8,`button`,106),K(9),L()(),I(10,`td`,107),K(11),L(),I(12,`td`,83),R(13,`span`,84),K(14),L(),I(15,`td`,85),K(16),L(),I(17,`td`)(18,`div`,86),j(19,L0,2,0,`span`,105),j(20,R0,2,1,`span`,105),j(21,z0,2,0,`span`,88),j(22,B0,2,0,`span`,89),j(23,V0,4,2,`span`,108),L()()()}if(e&2){let e,n=t.$implicit,r=W(2),i=q_(n.entry);O(),G(`selected`,r.selectedCall()?.id===i.id),A(`aria-rowindex`,n.index+2)(`data-vindex`,n.index),O(2),G(`server`,i.side===`server`),O(),q(i.side===`server`?`SSR`:`Client`),O(2),q(i.method),O(2),F(`title`,i.url),A(`data-call-id`,i.id)(`aria-pressed`,r.selectedCall()?.id===i.id)(`aria-controls`,r.selectedCall()?`call-preview`:null),O(),J(` `,i.url,` `),O(),F(`title`,i.pageUrl??``),O(),J(` `,i.pageUrl??``,` `),O(),G(`ok`,r.callTone(i)===`ok`)(`redirect`,r.callTone(i)===`redirect`)(`bad`,r.callTone(i)===`bad`),O(2),J(``,r.statusLabel(i),` `),O(2),J(``,i.durationMs,` ms`),O(3),M(i.cacheHit?19:-1),O(),M(i.delayMs?20:-1),O(),M(i.mocked?21:-1),O(),M(i.faulted?22:-1),O(),M((e=r.rulePatternOf(i))?23:-1,e)}}function U0(e,t){if(e&1&&(I(0,`tr`,103),R(1,`td`,104),L()),e&2){let e=W(2);O(),y_(`height`,e.callWindow.padBottom(),`px`)}}function W0(e,t){if(e&1&&(j(0,F0,2,0,`p`,100),I(1,`div`,72)(2,`table`)(3,`thead`)(4,`tr`,101)(5,`th`,73),K(6,`Side`),L(),I(7,`th`,73),K(8,`Method`),L(),I(9,`th`,73),K(10,`URL`),L(),I(11,`th`,73),K(12,`Page`),L(),I(13,`th`,73),K(14,`Status`),L(),I(15,`th`,74),K(16,`Time`),L(),I(17,`th`,73),K(18,`Notes`),L()()(),I(19,`tbody`,102,0),j(21,I0,2,2,`tr`,103),N(22,H0,24,29,`tr`,76,r0),j(24,U0,2,2,`tr`,103),L()()()),e&2){let e=W();M(e.callWindow.enabled()?0:-1),O(2),A(`aria-rowcount`,e.visibleCalls().length+1),O(17),F(`rovingWindow`,e.callWindow),O(2),M(e.callWindow.padTop()?21:-1),O(),P(e.shownCalls()),O(2),M(e.callWindow.padBottom()?24:-1)}}function G0(e,t){e&1&&K(0),e&2&&J(` Nothing matches “`,W(2).callQuery().trim(),`” with these filters. `)}function K0(e,t){e&1&&K(0),e&2&&J(` None of the `,W(2).timeline().length,` requests fit these filters. `)}function q0(e,t){if(e&1){let e=V();I(0,`div`,31)(1,`p`),K(2,`No requests match.`),L(),I(3,`p`,60),j(4,G0,1,1)(5,K0,1,1),L(),I(6,`div`,109)(7,`button`,27),H(`click`,function(){return w(e),T(W().clearCallFilters())}),K(8,`Clear filters`),L()()()}if(e&2){let e=W();O(4),M(e.callQuery().trim()?4:5)}}function J0(e,t){e&1&&(I(0,`div`,13)(1,`p`),K(2,`No requests yet.`),L(),I(3,`p`,60),K(4,` Add `),I(5,`code`),K(6,`withPangular()`),L(),K(7,` to `),I(8,`code`),K(9,`provideHttpClient`),L(),K(10,`, then load a page of the app. `),L()())}function Y0(e,t){if(e&1){let e=V();I(0,`button`,116),H(`click`,function(){w(e);let t=W();return T(W().copyPreview(t))}),K(1,` Copy `),L()}if(e&2){let e=W();A(`aria-label`,`Copy the response of `+e.method+` `+e.url)}}function X0(e,t){e&1&&(I(0,`p`,118),K(1,` Matched rule `),I(2,`code`),K(3),L()()),e&2&&(O(3),q(t))}function Z0(e,t){if(e&1){let e=V();I(0,`div`,110),H(`keydown.escape`,function(){return w(e),T(W().closePreview())}),I(1,`div`,111)(2,`h3`,112),K(3,`Response preview`),L(),I(4,`div`,113),j(5,Y0,2,1,`button`,114),I(6,`button`,115),H(`click`,function(){let t=w(e);return T(W().mockCall(t))}),K(7,` Mock this request `),L(),I(8,`button`,116),H(`click`,function(){return w(e),T(W().closePreview())}),K(9,`Close`),L()()(),I(10,`p`,117)(11,`span`,81),K(12),L(),I(13,`span`,83),K(14),L(),I(15,`span`,96),K(16),L()(),j(17,X0,4,1,`p`,118),I(18,`pre`,119),K(19),L(),R(20,`app-http-headers`,120),L()}if(e&2){let e,n=t,r=W();O(5),M(!n.error&&n.preview?5:-1),O(),F(`disabled`,!r.canWrite()),A(`aria-describedby`,r.canWrite()?null:`http-writes-off`),O(6),q(n.method),O(),G(`ok`,r.callTone(n)===`ok`)(`redirect`,r.callTone(n)===`redirect`)(`bad`,r.callTone(n)===`bad`),O(),q(r.statusLabel(n)),O(),F(`title`,n.url),O(),q(n.url),O(),M((e=r.rulePatternOf(n))?17:-1,e),O(),G(`error`,!!n.error&&!n.cancelled),A(`aria-label`,n.error?`Response error`:`Response body`),O(),q(n.error??r.previewText(n)??`(no body)`),O(),F(`callId`,n.id)(`request`,n.requestHeaders)(`response`,n.responseHeaders)}}function Q0(e,t){if(e&1&&(I(0,`p`,35),K(1),L()),e&2){let e=W();O(),q(e.writesOff)}}function $0(e,t){e&1&&(I(0,`p`,50),K(1,` SSR mocks are not transferred to the client: the browser requests the URL again and gets the real response unless the rule also applies on the client. `),L())}function e2(e,t){e&1&&(I(0,`span`),K(1,`passthrough`),L())}function t2(e,t){if(e&1&&(I(0,`span`,83),K(1),L()),e&2){let e=W().$implicit,t=W();G(`ok`,t.statusTone(e.status)===`ok`)(`redirect`,t.statusTone(e.status)===`redirect`)(`bad`,t.statusTone(e.status)===`bad`),O(),q(e.status)}}function n2(e,t){if(e&1&&(I(0,`span`),K(1),L()),e&2){let e=W().$implicit;O(),J(``,e.delayMs,` ms`)}}function r2(e,t){e&1&&(I(0,`span`),K(1,`mock body`),L())}function i2(e,t){e&1&&(I(0,`p`,128),K(1,` The SSR mock is not written to TransferState, so the browser requests this URL again. `),L())}function a2(e,t){if(e&1){let e=V();I(0,`li`)(1,`label`,121)(2,`input`,122),H(`change`,function(){let t=w(e).$implicit;return T(W().toggleRule(t.id))}),L(),I(3,`code`,123)(4,`span`,124),K(5),L(),K(6),L()(),I(7,`button`,125),H(`click`,function(){let t=w(e).$implicit;return T(W().removeRule(t.id))}),K(8,` Remove `),L(),I(9,`span`,126)(10,`span`),K(11),L(),j(12,e2,2,0,`span`)(13,t2,2,7,`span`,127),j(14,n2,2,1,`span`),j(15,r2,2,0,`span`),L(),j(16,i2,2,0,`p`,128),L()}if(e&2){let e=t.$implicit,n=W();G(`off`,!e.enabled),O(2),F(`checked`,e.enabled)(`disabled`,!n.canWrite()),A(`aria-describedby`,n.canWrite()?null:`http-writes-off`)(`aria-label`,`Enable rule for `+e.pattern),O(),F(`title`,e.pattern),O(2),q(e.method||`ANY`),O(),J(` `,e.pattern),O(),F(`disabled`,!n.canWrite()),A(`aria-describedby`,n.canWrite()?null:`http-writes-off`)(`aria-label`,`Remove rule for `+e.pattern),O(4),q(n.targetLabel(e.target)),O(),M(e.status===void 0?12:13),O(2),M(e.delayMs?14:-1),O(),M(e.body?15:-1),O(),M(n.mocksOnServer(e)?16:-1)}}function o2(e,t){e&1&&(I(0,`li`,57),K(1,`No rules. SSR rules apply on the next page load.`),L())}function s2(e,t){if(e&1){let e=V();I(0,`p`,65),K(1,` Throws while the server renders, so it needs `),I(2,`code`),K(3,`providePangularHttp()`),L(),K(4,` and a page the engine renders. Prerendered files served as static files skip it. `),L(),I(5,`label`),K(6,` Error message `),I(7,`input`,129),H(`input`,function(t){return w(e),T(W().patchOverride(`message`,t))}),L()()}if(e&2){let e=W();O(7),F(`value`,e.overrideDraft().message)}}function c2(e,t){e&1&&K(0,` For a cached HTTP response this is the whole cache record, not only the response body. `)}function l2(e,t){e&1&&(I(0,`p`,133),K(1,` Filled in from the TransferState payload. The value starts empty because the panel only shows a redacted copy, so type the JSON the server should send. `),j(2,c2,1,0),L()),e&2&&(O(2),M(t===`http`?2:-1))}function u2(e,t){if(e&1){let e=V();I(0,`label`),K(1,` TransferState key `),I(2,`input`,130),H(`input`,function(t){return w(e),T(W().patchOverride(`key`,t))}),L()(),I(3,`label`)(4,`span`),K(5,`New JSON value `),I(6,`span`,37),K(7,`(empty removes the entry)`),L()(),I(8,`textarea`,131),H(`input`,function(t){return w(e),T(W().patchOverride(`value`,t))}),L()(),I(9,`p`,132),K(10),L(),j(11,l2,3,1,`p`,133)}if(e&2){let e,t=W();O(2),F(`value`,t.overrideDraft().key),O(6),F(`value`,t.overrideDraft().value),A(`aria-invalid`,t.overrideValueError()?`true`:null)(`aria-describedby`,t.overrideFromPayload()?`override-value-error override-value-note`:`override-value-error`),O(2),q(t.overrideValueError()),O(),M((e=t.overrideFromPayload())?11:-1,e)}}function d2(e,t){e&1&&(I(0,`p`,65),K(1,` Serves `),I(2,`code`),K(3,`index.csr.html`),L(),K(4,` instead of rendering. Needs `),I(5,`code`),K(6,`browserDistFolder`),L(),K(7,` in `),I(8,`code`),K(9,`initPangularHub()`),L(),K(10,`. `),L())}function f2(e,t){if(e&1&&(I(0,`span`),K(1),L()),e&2){let e=W().$implicit;O(),q(e.message)}}function p2(e,t){if(e&1&&(I(0,`span`),K(1),L()),e&2){let e=W().$implicit;O(),Y(``,e.value===void 0?`remove`:`set`,` `,e.key)}}function m2(e,t){if(e&1){let e=V();I(0,`li`)(1,`label`,121)(2,`input`,122),H(`change`,function(){let t=w(e).$implicit;return T(W().toggleOverride(t.id))}),L(),I(3,`code`,123)(4,`span`,124),K(5),L(),K(6),L()(),I(7,`button`,134),H(`click`,function(){let t=w(e).$implicit;return T(W().removeOverride(t.id))}),K(8,` Remove `),L(),I(9,`span`,126),j(10,f2,2,1,`span`),j(11,p2,2,2,`span`),L()()}if(e&2){let e=t.$implicit,n=W();G(`off`,!e.enabled),O(2),F(`checked`,e.enabled)(`disabled`,!n.canWrite()),A(`aria-label`,`Enable `+n.overrideLabel(e.kind)+` for `+e.pattern),O(),F(`title`,e.pattern),O(2),q(n.overrideLabel(e.kind)),O(),J(` `,e.pattern),O(),F(`disabled`,!n.canWrite()),A(`aria-label`,`Remove `+n.overrideLabel(e.kind)+` for `+e.pattern),O(3),M(e.message?10:-1),O(),M(e.key?11:-1)}}function h2(e,t){e&1&&(I(0,`li`,57),K(1,`No overrides.`),L())}function g2(e,t){if(e&1&&(I(0,`div`)(1,`dt`),K(2,`DOM nodes hydrated`),L(),I(3,`dd`),K(4),L()(),I(5,`div`)(6,`dt`),K(7,`DOM nodes skipped`),L(),I(8,`dd`),K(9),L()(),I(10,`div`)(11,`dt`),K(12,`Mismatched components`),L(),I(13,`dd`),K(14),L()()),e&2){let e=t;O(4),q(e.hydrated),O(5),q(e.skipped),O(4),G(`bad`,e.mismatched>0),O(),q(e.mismatched)}}function _2(e,t){if(e&1&&(I(0,`span`,136)(1,`span`,137),K(2,`Expected`),L(),I(3,`code`),K(4),L()()),e&2){let e=W().$implicit;O(4),q(e.expected)}}function v2(e,t){if(e&1&&(I(0,`span`,136)(1,`span`,137),K(2,`Actual`),L(),I(3,`code`),K(4),L()()),e&2){let e=W().$implicit;O(4),q(e.actual)}}function y2(e,t){if(e&1&&(I(0,`li`)(1,`code`),K(2),L(),j(3,_2,5,1,`span`,136),j(4,v2,5,1,`span`,136),L()),e&2){let e=t.$implicit;O(2),q(e.isClass?e.component:`<`+e.component+`>`),O(),M(e.expected?3:-1),O(),M(e.actual?4:-1)}}function b2(e,t){if(e&1&&(I(0,`h3`),K(1),L(),I(2,`ul`,135),N(3,y2,5,3,`li`,null,gg),L()),e&2){let e=W();O(),J(`Mismatches (`,e.mismatches.length,`)`),O(2),P(e.mismatches)}}function x2(e,t){if(e&1&&(I(0,`li`)(1,`code`),K(2),L()()),e&2){let e=t.$implicit;O(2),q(e)}}function S2(e,t){if(e&1&&(I(0,`h3`),K(1,`ngSkipHydration hosts`),L(),I(2,`ul`,138),N(3,x2,3,1,`li`,null,gg),L()),e&2){let e=W();O(3),P(e.skipHydrationHosts)}}function C2(e,t){e&1&&(I(0,`h3`),K(1,`Warnings`),L(),I(2,`p`,60),K(3,` Not captured: add `),I(4,`code`),K(5,`providePangularHttp()`),L(),K(6,` to the app providers. `),L())}function w2(e,t){if(e&1&&(I(0,`pre`,139),K(1),L()),e&2){let e=t.$implicit;O(),q(e)}}function T2(e,t){e&1&&(I(0,`p`,92),K(1,`No hydration warnings.`),L())}function E2(e,t){if(e&1&&(I(0,`h3`),K(1),L(),N(2,w2,2,1,`pre`,139,gg,!1,T2,2,0,`p`,92)),e&2){let e=W();O(),J(`Warnings (`,e.warnings.length,`)`),O(),P(e.warnings)}}function D2(e,t){if(e&1&&(I(0,`dl`,91)(1,`div`)(2,`dt`),K(3,`Enabled`),L(),I(4,`dd`)(5,`span`,105),K(6),L()()(),I(7,`div`)(8,`dt`),K(9,`Hydrated components`),L(),I(10,`dd`),K(11),L()(),I(12,`div`)(13,`dt`),K(14,`Hydrated nodes`),L(),I(15,`dd`),K(16),L()(),I(17,`div`)(18,`dt`),K(19,`Skipped components`),L(),I(20,`dd`),K(21),L()(),I(22,`div`)(23,`dt`),K(24,`App stable after`),L(),I(25,`dd`),K(26),L()(),I(27,`div`)(28,`dt`),K(29,`Incremental defer blocks`),L(),I(30,`dd`),K(31),L()(),j(32,g2,15,5),L(),j(33,b2,5,1),j(34,S2,5,0),j(35,C2,7,0)(36,E2,5,2)),e&2){let e,n=t;O(5),G(`on`,n.enabled)(`off-tag`,!n.enabled),O(),q(n.enabled?`yes`:`no (client render only)`),O(5),q(n.hydratedComponents??`n/a`),O(5),q(n.hydratedNodes??`n/a`),O(5),q(n.componentsSkippedHydration??`n/a`),O(5),q(n.stableMs===void 0?`n/a`:n.stableMs+` ms`),O(5),q(n.deferBlocksWithIncrementalHydration??`n/a`),O(),M((e=n.nodes)?32:-1,e),O(),M(n.mismatches?.length?33:-1),O(),M(n.skipHydrationHosts.length?34:-1),O(),M(n.warningsCaptured===!1?35:36)}}function O2(e,t){e&1&&(I(0,`div`,13)(1,`p`),K(2,`No hydration data for this page.`),L(),I(3,`p`,60),K(4,`Open a server rendered page of the app to see its stats.`),L()())}function k2(e,t){e&1&&(I(0,`div`,13)(1,`p`),K(2,`No TransferState script: this page was not server rendered.`),L()())}function A2(e,t){if(e&1&&(I(0,`p`,141),K(1),L()),e&2){let e=W(2);O(),q(e.error)}}function j2(e,t){e&1&&(I(0,`span`,105),K(1),L()),e&2&&(O(),q(t))}function M2(e,t){if(e&1&&(I(0,`span`,105),K(1),L(),I(2,`span`,144),K(3),L()),e&2){let e=t,n=W().$implicit,r=W(3);G(`server`,r.statusTone(e.status)===`ok`)(`fault`,r.statusTone(e.status)===`bad`),O(),J(`HTTP `,e.status),O(2),q(e.url??n.key)}}function N2(e,t){if(e&1&&(I(0,`span`,144),K(1),L()),e&2){let e=W().$implicit;O(),q(e.key)}}function P2(e,t){if(e&1){let e=V();I(0,`button`,116),H(`click`,function(){w(e);let t=W().$implicit;return T(W(3).editEntry(t))}),K(1,` Edit in SSR overrides `),L()}if(e&2){let e=W().$implicit;A(`aria-label`,`Edit in SSR overrides, key `+e.key)}}function F2(e,t){if(e&1){let e=V();I(0,`details`)(1,`summary`),R(2,`span`,143),j(3,j2,2,1,`span`,105),j(4,M2,4,6)(5,N2,2,1,`span`,144),I(6,`span`,145),K(7),L()(),I(8,`div`,146)(9,`span`,147),K(10,`Key`),L(),I(11,`code`,148),K(12),L(),I(13,`div`,149)(14,`button`,116),H(`click`,function(){let t=w(e).$implicit;return T(W(3).copyKey(t.key))}),K(15,` Copy `),L(),j(16,P2,2,1,`button`,114),L()(),I(17,`pre`,150),K(18),lv(19,`json`),L()()}if(e&2){let e,n,r=t.$implicit,i=W(3);O(3),M((e=i.payloadLabel(r))?3:-1,e),O(),M((n=r.http)?4:5,n),O(3),J(``,r.size,` B`),O(5),q(r.key),O(2),A(`aria-label`,`Copy key `+r.key),O(2),M(i.canEditEntry(r)?16:-1),O(),A(`aria-label`,`Value of `+r.key),O(),q(uv(19,8,r.value))}}function I2(e,t){if(e&1&&(I(0,`p`,140),K(1),L(),j(2,A2,2,1,`p`,141),I(3,`div`,142),N(4,F2,20,10,`details`,null,i0),L()),e&2){let e=W();O(),z_(` `,e.entries.length,` entr`,e.entries.length===1?`y`:`ies`,`, `,e.size,` bytes `),O(),M(e.error?2:-1),O(2),P(e.entries)}}function L2(e,t){e&1&&j(0,k2,3,0,`div`,13)(1,I2,6,4),e&2&&M(+!!t.found)}function R2(e,t){e&1&&(I(0,`div`,13)(1,`p`),K(2,`Open a page of the app to see its payload.`),L()())}var z2={kind:`render-error`,pattern:``,message:``,key:``,value:``},B2={"render-error":`Render error`,"client-render":`Client render`,"state-edit":`TransferState edit`},V2={server:`Server`,prerender:`Prerender`,client:`Client`,redirect:`Redirect`,"not-rendered":`Not rendered`,unknown:`Unknown`},H2={pattern:``,method:``,target:`both`,status:``,delayMs:``,body:``};function U2(e){try{let t=new URL(e,`http://x`);return t.pathname+t.search}catch{return e}}var W2=/\[redacted\]|%5Bredacted%5D/gi;function G2(e){return(/^([a-z][a-z\d+.-]*:|\/\/)/i.test(e)?U2(e):e).replace(W2,`*`)}function K2(e){let t=bO(e);if(t!==null)return t;try{return JSON.parse(e),e.trim()}catch{return null}}var q2=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`];function J2(e){try{return new URL(e,`http://x`).pathname}catch{return``}}function Y2(e){let t=J2(e);return t===`/`?``:t}var X2=/\[redacted\]|%5Bredacted%5D/i,Z2=200,Q2=50,$2=500,e4=1e5,t4=[{value:``,label:`None`},...Xw.map(([e,t])=>({value:String(e),label:`${e} ${t}`}))],n4=class e{rpc=$(null);canWrite=X(()=>bE(this.rpc(),`http`));writesOff=kT(`http`);loading=D(!1);failed=D(!1);serverCalls=D([]);pages=D([]);payloads=D({});serverDropped=D(0);requests=D([]);rules=D([]);addingRule=D(!1);addingOverride=D(!1);ruleSaves=Promise.resolve(!0);overrideSaves=Promise.resolve(!0);overrides=D([]);overrideDraft=D({...z2});overrideFromPayload=D(null);overrideKindOptions=[{value:`render-error`,label:`Render error`},{value:`client-render`,label:`Force Client render`},{value:`state-edit`,label:`Edit TransferState entry`}];overrideValueError=X(()=>{let e=this.overrideDraft().value.trim();if(!e)return``;try{return JSON.parse(e),``}catch{return`The value must be valid JSON.`}});overrideReady=X(()=>{let e=this.overrideDraft();return!e.pattern.trim()||this.overrides().length>=20?!1:e.kind!==`state-edit`||!!e.key.trim()&&!this.overrideValueError()});hostPageId=XT();selectedPageId=Q({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:e.find(e=>e.pageId===this.hostPageId)?.pageId??e[0]?.pageId??null});selectedCallId=D(null);draft=D({...H2});message=D(``);bodyPlaceholder=`{ "error": "Service unavailable" }`;statusOptions=t4;unsubscribe=[];destroyRef=C(As);injector=C(Os);host=C(Vl);selected=X(()=>this.pages().find(e=>e.pageId===this.selectedPageId())??null);pageRequestId=X(()=>this.selected()?.ssrRequestId??null);selectedRequestId=Q(()=>this.pageRequestId());selectedPayload=X(()=>{let e=this.selectedPageId();return e?this.payloads()[e]??null:null});maxCalls=X(()=>_E(this.rpc()).limits.httpCalls);droppedCalls=X(()=>(this.selected()?.dropped??0)+this.serverDropped());pageServerCalls=X(()=>{let e=this.selected()?.initialUrl;return e?this.serverCalls().filter(t=>!t.pageUrl||t.pageUrl===e):this.serverCalls()});timeline=X(()=>[...this.pageServerCalls(),...this.selected()?.calls??[]].sort((e,t)=>t.at-e.at));callQuery=D(``);timelineView=D(`table`);waterfallCalls=X(()=>this.visibleCalls().filter(e=>e.side===`client`));sideFilter=D(`all`);failedOnly=D(!1);sideOptions=[{value:`all`,label:`All sides`},{value:`server`,label:`SSR`},{value:`client`,label:`Client`}];callWindow=new UN({count:X(()=>this.visibleCalls().length),estimate:37});shownCalls=X(()=>{let{start:e,end:t}=this.callWindow.range();return this.visibleCalls().slice(e,t).map((t,n)=>({entry:t,index:e+n}))});callsBody=Dv(`callsBody`);visibleCalls=X(()=>{let e=this.callQuery().trim().toLowerCase(),t=this.sideFilter()??`all`,n=this.failedOnly();return this.timeline().filter(r=>(t===`all`||r.side===t)&&(!n||this.isFailed(r))&&(!e||`${r.method} ${r.url}`.toLowerCase().includes(e)||`${r.method} ${U2(r.url)}`.toLowerCase().includes(e)))});countText=X(()=>{let e=this.timeline().length;if(this.timelineView()!==`waterfall`)return`${this.visibleCalls().length} of ${e}`;let t=this.waterfallCalls().length;return`${t} client ${t===1?`call`:`calls`} of ${e}`});filterStatus=X(()=>{this.callQuery(),this.sideFilter(),this.failedOnly(),this.timelineView(),this.filterFlip=!this.filterFlip;let e=Z(()=>this.countText());return this.filterFlip?`${e}\u00a0`:e});filterFlip=!0;selectedCall=X(()=>this.visibleCalls().find(e=>e.id===this.selectedCallId())??null);selectedRequest=X(()=>this.requests().find(e=>e.id===this.selectedRequestId())??null);requestCalls=X(()=>{let e=this.selectedRequest()?.id;return e?this.serverCalls().filter(t=>t.requestId===e):[]});requestPage=X(()=>{let e=this.selectedRequest()?.id;return e?this.pages().find(t=>t.ssrRequestId===e)??null:null});refetched=X(()=>{let e=this.selectedRequest(),t=this.requestPage();if(!e||!t)return[];let n=new Set(this.requestCalls().filter(e=>e.status).map(e=>`${e.method} ${U2(e.url)}`));return t.calls.filter(t=>t.side===`client`&&!t.cacheHit&&!t.mocked&&t.at>=e.at&&n.has(`${t.method} ${U2(t.url)}`))});draftMocksOnServer=X(()=>{let e=this.draftRule();return!!e&&this.mocksOnServer(e)});draftRule=X(()=>{let e=this.draft(),t=e.pattern.trim();if(!t||t.length>$2||this.bodyError()||this.rules().length>=Q2)return null;let n=e.body.trim(),r=Math.min(Math.max(Math.round(Number(e.delayMs))||0,0),1e4),i=e.status.trim()?Number(e.status):n?200:void 0;return i!==void 0&&!Zw(i)||i===void 0&&!r?null:{pattern:t,enabled:!0,target:e.target,...e.method?{method:e.method}:{},...i===void 0?{}:{status:i},...r?{delayMs:r}:{},...n?{body:n}:{}}});draftHint=X(()=>{let e=this.draft();return this.rules().length>=Q2?`You can add up to ${Q2} rules. Remove one to add another.`:e.pattern.trim()?e.pattern.trim().length>$2?`The URL pattern is limited to ${$2} characters.`:this.bodyError()?``:e.status.trim()&&!Zw(Number(e.status))?`Pick a status from the list.`:this.draftRule()?!e.status.trim()&&e.body.trim()?`With no status, the mock body returns 200.`:``:`Set a status, a delay or a mock body.`:`Enter a URL pattern to add a rule.`});bodyError=X(()=>{let e=this.draft().body.trim();if(!e)return``;if(e.length>e4)return`The mock body is limited to ${e4} characters.`;try{return JSON.parse(e),``}catch{return`The mock body must be valid JSON.`}});constructor(){_c(()=>{let e=this.callsBody()?.nativeElement;e&&this.callWindow.attach(e)}),_c(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.stopListening())}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=e.scope(`pangular`).rpc,[n,r]=await Promise.all([t.sharedState(`http`),t.sharedState(`http-payloads`)]);if(this.destroyRef.destroyed)return;let i=e=>{let t=e;this.serverCalls.set(t?.serverCalls??[]),this.serverDropped.set(t?.serverDropped??0),this.requests.set([...t?.requests??[]].reverse()),this.pages.set(t?.pages??[]),this.rules.set(t?.rules??[]),this.overrides.set(t?.ssrOverrides??[])},a=e=>this.payloads.set(e?.pages??{});i(n.value()),a(r.value()),this.stopListening(),this.unsubscribe=[n.on(`updated`,i),r.on(`updated`,a)]}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}retry(){let e=this.rpc();e&&this.load(e)}guardVerdict(e){return e.guards?.passed===!1?e.outcome===`redirected`?`redirected`:`rejected`:``}msLabel(e){return e===void 0?`n/a`:`${e} ms`}skipText(e){return Yw[e]??``}refetchReason(e){let t=`${e.method} ${U2(e.url)}`,n=this.requestCalls().filter(e=>`${e.method} ${U2(e.url)}`===t),r=n[0];return r?.cacheSkip&&n.every(e=>e.cacheSkip===r.cacheSkip)?this.skipText(r.cacheSkip):``}compressedWith(e){if(e.compressedBeforeTrace)return e.headers[`content-encoding`]??`unknown encoding`}renderModeLabel(e){return V2[e]??`Unknown`}statusLabel(e){return e.cancelled?`cancelled`:e.status?String(e.status):`ERR`}callTone(e){return e.cancelled?`neutral`:this.statusTone(e.status)}isFailed(e){return!!e.cancelled||!e.status||e.status>=400}clearCallFilters(){this.callQuery.set(``),this.sideFilter.set(`all`),this.failedOnly.set(!1),this.host.nativeElement.querySelector(`#timeline-search`)?.focus()}rulePatternOf(e){return e.rulePattern?e.rulePattern:e.ruleId?this.rules().find(t=>t.id===e.ruleId)?.pattern??null:null}openCall(e){this.selectedCallId.set(e),ud(()=>this.host.nativeElement.querySelector(`#preview-heading`)?.focus(),{injector:this.injector})}previewText(e){if(e.preview!==void 0)return bO(e.preview)??e.preview}async copyPreview(e){let t=this.previewText(e);if(t)try{await navigator.clipboard.writeText(t),this.message.set(`Copied.`)}catch{this.message.set(`The clipboard is not available here.`)}}mockCall(e){let t=e.method.toUpperCase(),n=G2(e.url),r=e.error||!e.preview?null:K2(e.preview);this.draft.set({...H2,pattern:n,method:t,body:r??``});let i=`${t} ${n}`;this.message.set(r?`Filled in a rule for ${i} with the preview as its body. Check it, then add the rule.`:e.preview&&!e.error?`Filled in a rule for ${i}. The preview is not complete JSON, so it is not used as the body.`:`Filled in a rule for ${i}. Set a status, a delay or a body, then add the rule.`),ud(()=>this.host.nativeElement.querySelector(`#rule-pattern`)?.focus(),{injector:this.injector})}closePreview(){let e=this.selectedCallId();this.selectedCallId.set(null),e&&[...this.host.nativeElement.querySelectorAll(`button[data-call-id]`)].find(t=>t.dataset.callId===e)?.focus()}stopListening(){for(let e of this.unsubscribe.splice(0))e()}statusTone(e){return e===void 0?`neutral`:e===0||e>=400?`bad`:e>=300?`redirect`:e>=200?`ok`:`neutral`}mocksOnServer(e){return e.target!==`client`&&e.status!==void 0&&e.status<400}payloadLabel(e){return e.source===`hydration`?`hydration annotations`:e.fn?`Analog server function ${e.fn.name??e.fn.id}`:e.source===`analog`?`Analog`:null}targetLabel(e){return e===`both`?`SSR + client`:e===`server`?`SSR only`:`Client only`}pageOptions=X(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url})));methodOptions=X(()=>{let e=this.draft().method;return[{value:``,label:`Any`},...(e&&!q2.includes(e)?[...q2,e]:q2).map(e=>({value:e,label:e}))]});targetOptions=[{value:`both`,label:`SSR + client`},{value:`server`,label:`SSR only`},{value:`client`,label:`Client only`}];selectPage(e){e&&this.selectedPageId.set(e),this.selectedCallId.set(null),this.overrideFromPayload.set(null)}setDraft(e,t){this.draft.update(n=>({...n,[e]:t}))}patch(e,t){let n=t.target.value;this.draft.update(t=>({...t,[e]:n}))}async addRule(e){e.preventDefault();let t=this.draftRule();if(!t||this.addingRule())return;let n={id:`r${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`,...t};this.addingRule.set(!0);let r=await this.saveRules(e=>[[...e,n],n],`Rule added.`);this.addingRule.set(!1),r&&(this.draft.set({...H2}),this.host.nativeElement.querySelector(`#rule-pattern`)?.focus())}toggleRule(e){this.saveRules(t=>{let n=t.find(t=>t.id===e);return n?[t.map(t=>t.id===e?{...t,enabled:!t.enabled}:t),n]:null},`Rule updated.`)}async removeRule(e){let t=-1;await this.saveRules(n=>(t=n.findIndex(t=>t.id===e),t<0?null:[n.filter(t=>t.id!==e),n[t]]),`Rule removed.`)&&this.focusAfterRemove(`[data-remove-rule]`,t,`#rule-list-heading`)}async clearCalls(){try{await tE(this.rpc(),`clear-http-calls`),this.selectedCallId.set(null),this.message.set(`Timeline cleared.`)}catch{this.message.set(`Could not clear the timeline.`)}}overrideLabel(e){return B2[e]??e}setOverrideDraft(e,t){this.overrideDraft.update(n=>({...n,[e]:t})),e===`kind`&&t!==`state-edit`&&this.overrideFromPayload.set(null)}patchOverride(e,t){let n=t.target.value;this.overrideDraft.update(t=>({...t,[e]:n})),e===`key`&&this.overrideFromPayload.set(null)}async copyKey(e){try{await navigator.clipboard.writeText(e),this.message.set(`Copied.`)}catch{this.message.set(`The clipboard is not available here.`)}}canEditEntry(e){let{key:t}=e;return this.canWrite()&&!!t&&t===t.trim()&&t.length<=Z2&&!X2.test(t)}editEntry(e){if(!this.canEditEntry(e))return;let t=this.selected();this.overrideDraft.set({...z2,kind:`state-edit`,pattern:t?Y2(t.initialUrl??t.url):``,key:e.key}),this.overrideFromPayload.set(e.http?`http`:`other`),this.message.set(`Editing the TransferState entry in SSR overrides.`),ud(()=>{let e=this.host.nativeElement.querySelector(this.overrideDraft().pattern?`#override-value`:`#override-pattern`);e?.scrollIntoView?.({block:`center`}),e?.focus()},{injector:this.injector})}async addOverride(e){if(e.preventDefault(),!this.overrideReady()||this.addingOverride())return;let t=this.overrideDraft(),n={id:`o${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`,kind:t.kind,pattern:t.pattern.trim(),enabled:!0,...t.kind===`render-error`&&t.message.trim()?{message:t.message.trim()}:{},...t.kind===`state-edit`?{key:t.key.trim()}:{},...t.kind===`state-edit`&&t.value.trim()?{value:t.value.trim()}:{}};this.addingOverride.set(!0);let r=await this.saveOverrides(e=>[...e,n],`Override added. Reload the page.`);this.addingOverride.set(!1),r&&(this.overrideDraft.set({...z2,kind:t.kind}),this.overrideFromPayload.set(null),this.host.nativeElement.querySelector(`#override-pattern`)?.focus())}toggleOverride(e){this.saveOverrides(t=>t.some(t=>t.id===e)?t.map(t=>t.id===e?{...t,enabled:!t.enabled}:t):null,`Override updated. Reload the page.`)}async removeOverride(e){let t=-1;await this.saveOverrides(n=>(t=n.findIndex(t=>t.id===e),t<0?null:n.filter(t=>t.id!==e)),`Override removed.`)&&this.focusAfterRemove(`[data-remove-override]`,t,`#override-list-heading`)}focusAfterRemove(e,t,n){ud(()=>{let r=this.host.nativeElement,i=r.querySelectorAll(e);(i[Math.min(t,i.length-1)]??r.querySelector(n))?.focus()},{injector:this.injector})}announce(e){if(this.message()!==e){this.message.set(e);return}this.message.set(``),ud(()=>{this.message()===``&&this.message.set(e)},{injector:this.injector})}saveOverrides(e,t){let n=this.overrideSaves.then(async()=>{let n=e(this.overrides());if(!n)return!1;try{let e=await tE(this.rpc(),`set-ssr-overrides`,n);return this.overrides.set(Array.isArray(e)?e:n),this.announce(t),!0}catch{return this.message.set(`Could not save the overrides.`),!1}});return this.overrideSaves=n,n}saveRules(e,t){let n=this.ruleSaves.then(async()=>{let n=e(this.rules());if(!n)return!1;let[r,i]=n;try{let e=await tE(this.rpc(),`set-http-rules`,r);return this.rules.set(Array.isArray(e)?e:r),this.announce(i.target===`client`?t:`${t} Reload the page to apply it to SSR.`),!0}catch{return this.message.set(`Could not save the rules.`),!1}});return this.ruleSaves=n,n}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-network-inspector`]],viewQuery:function(e,t){e&1&&Xg(t.callsBody,e0,5),e&2&&Zg()},inputs:{rpc:[1,`rpc`]},decls:136,vars:59,consts:[[`callsBody`,``],[1,`page-intro`],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`,`error`],[1,`toolbar`,3,`hidden`],[1,`page-picker`],[`id`,`page-picker-label`],[`labelledBy`,`page-picker-label`,`emptyText`,`No connected page`,`placeholder`,`No connected page`,3,`valueChange`,`options`,`value`],[`type`,`button`,3,`click`,`disabled`],[`role`,`status`,1,`message`],[1,`grid`,3,`hidden`],[`aria-labelledby`,`ssr-heading`,1,`panel`,`wide`],[`id`,`ssr-heading`],[1,`empty`],[`aria-labelledby`,`timeline-heading`,1,`panel`,`wide`],[`id`,`timeline-heading`],[`what`,`HTTP calls`,`limit`,`httpCalls`,3,`dropped`,`max`],[`role`,`group`,`aria-label`,`Filter the HTTP timeline`,1,`filters`],[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`],[`id`,`timeline-search`,`type`,`search`,`placeholder`,`Find a URL or method…`,`aria-label`,`Find a URL or method`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Side`,1,`side-filter`,3,`valueChange`,`options`,`value`],[1,`inline`,`failed-toggle`],[`type`,`checkbox`,3,`change`,`checked`],[`role`,`group`,`aria-label`,`Timeline view`,1,`view-toggle`],[`type`,`button`,3,`click`],[1,`total`],[`role`,`status`,1,`sr-only`],[3,`calls`,`selectedId`],[`role`,`status`,1,`empty`,`no-match`],[`id`,`call-preview`,`role`,`region`,`aria-labelledby`,`preview-heading`,1,`preview`],[`aria-labelledby`,`rules-heading`,1,`panel`],[`id`,`rules-heading`],[`id`,`http-writes-off`,1,`muted`,`small`],[`id`,`rule-form`,1,`rule-form`,3,`submit`],[1,`hint`],[`id`,`rule-pattern`,`required`,``,`spellcheck`,`false`,`autocomplete`,`off`,`placeholder`,`e.g. /api/products`,3,`input`,`value`],[1,`row`],[1,`field-group`],[`id`,`rule-method-label`],[`labelledBy`,`rule-method-label`,3,`valueChange`,`options`,`value`],[`id`,`rule-target-label`],[`labelledBy`,`rule-target-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`id`,`rule-status-label`],[`labelledBy`,`rule-status-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`type`,`number`,`inputmode`,`numeric`,`min`,`0`,`max`,`10000`,`placeholder`,`0`,3,`input`,`value`],[`rows`,`3`,`spellcheck`,`false`,`aria-describedby`,`body-error`,3,`input`,`placeholder`,`value`],[`id`,`body-error`,1,`field-error`],[`id`,`rule-ssr-note`,1,`muted`,`small`],[`id`,`rule-hint`,1,`muted`,`small`],[1,`form-actions`],[`type`,`submit`,3,`disabled`],[`id`,`rule-list-heading`,`tabindex`,`-1`,1,`rules-heading`],[1,`rules`],[3,`off`],[1,`empty-rule`],[`aria-labelledby`,`overrides-heading`,1,`panel`],[`id`,`overrides-heading`],[1,`muted`,`small`],[1,`rule-form`,3,`submit`],[`id`,`override-kind-label`],[`labelledBy`,`override-kind-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`id`,`override-pattern`,`required`,``,`spellcheck`,`false`,`autocomplete`,`off`,`placeholder`,`e.g. /examples/ssr`,3,`input`,`value`],[`id`,`override-kind-help`,1,`muted`,`small`],[`id`,`override-list-heading`,`tabindex`,`-1`,1,`rules-heading`],[`aria-labelledby`,`hydration-heading`,1,`panel`],[`id`,`hydration-heading`],[`aria-labelledby`,`payload-heading`,1,`panel`,`wide`],[`id`,`payload-heading`],[`aria-hidden`,`true`,1,`spinner`],[1,`table-wrap`],[`scope`,`col`],[`scope`,`col`,1,`num`],[`appRovingList`,`button.ssr-row`],[3,`selected`],[`id`,`ssr-detail`,`role`,`region`,`aria-labelledby`,`ssr-detail-heading`,1,`preview`],[3,`click`],[1,`url`],[`type`,`button`,`aria-controls`,`ssr-detail`,1,`link`,`ssr-row`,3,`title`],[1,`method`],[1,`sr-only`],[1,`status`],[`aria-hidden`,`true`,1,`dot`],[1,`num`],[1,`notes`],[1,`tag`,`server`],[1,`tag`,`mock`],[1,`tag`,`fault`],[`id`,`ssr-detail-heading`],[1,`stats`],[1,`muted`,`small`,`ok-note`],[1,`request-call`],[1,`muted`],[1,`stats`,`nav-stats`],[1,`preview-url`,3,`title`],[1,`tag`,3,`title`],[1,`muted`,`small`,`skip-reason`],[3,`open`,`calls`,`selectedId`],[1,`muted`,`small`,`window-note`],[`aria-rowindex`,`1`],[`appRovingList`,`button[data-call-id]`,3,`rovingWindow`],[`aria-hidden`,`true`,1,`spacer`],[`colspan`,`7`],[1,`tag`],[`type`,`button`,1,`link`,3,`title`],[1,`page-url`,3,`title`],[1,`tag`,`rule-ref`,3,`title`],[1,`empty-actions`],[`id`,`call-preview`,`role`,`region`,`aria-labelledby`,`preview-heading`,1,`preview`,3,`keydown.escape`],[1,`preview-head`],[`id`,`preview-heading`,`tabindex`,`-1`],[1,`preview-actions`],[`type`,`button`,1,`ghost`],[`type`,`button`,`aria-controls`,`rule-form`,1,`ghost`,3,`click`,`disabled`],[`type`,`button`,1,`ghost`,3,`click`],[1,`preview-meta`],[1,`preview-rule`],[`tabindex`,`0`,`role`,`region`,1,`preview-body`],[3,`callId`,`request`,`response`],[1,`inline`],[`type`,`checkbox`,3,`change`,`checked`,`disabled`],[1,`rule-pattern`,3,`title`],[1,`rule-method`],[`type`,`button`,`data-remove-rule`,``,1,`link`,`remove`,3,`click`,`disabled`],[1,`rule-meta`],[1,`status`,3,`ok`,`redirect`,`bad`],[1,`rule-note`],[`spellcheck`,`false`,`placeholder`,`Simulated render error`,`aria-describedby`,`override-kind-help`,3,`input`,`value`],[`id`,`override-key`,`spellcheck`,`false`,`autocomplete`,`off`,3,`input`,`value`],[`id`,`override-value`,`rows`,`3`,`spellcheck`,`false`,3,`input`,`value`],[`id`,`override-value-error`,1,`field-error`],[`id`,`override-value-note`,1,`muted`,`small`],[`type`,`button`,`data-remove-override`,``,1,`link`,`remove`,3,`click`,`disabled`],[1,`plain`,`mismatches`],[1,`mismatch-row`],[1,`mismatch-label`],[1,`plain`],[1,`warn`],[1,`muted`,`small`,`summary-line`],[`role`,`alert`,1,`bad`],[1,`entries`],[`aria-hidden`,`true`,1,`chevron`],[1,`entry-key`],[1,`entry-size`],[1,`entry-key-row`],[1,`entry-key-label`],[1,`entry-key-text`],[1,`entry-actions`],[`tabindex`,`0`,`role`,`region`]],template:function(e,t){if(e&1&&(I(0,`p`,1),K(1,` HttpClient calls made while rendering on the server and in the browser, from the live page and the devtools server, with hydration stats, the TransferState payload and fault injection. `),L(),j(2,a0,4,0,`div`,2)(3,o0,7,0,`div`,3),I(4,`div`,4)(5,`div`,5)(6,`span`,6),K(7,`Page`),L(),I(8,`app-select`,7),H(`valueChange`,function(e){return t.selectPage(e)}),L()(),I(9,`button`,8),H(`click`,function(){return t.clearCalls()}),K(10,` Clear timeline `),L(),I(11,`p`,9),K(12),L()(),I(13,`div`,10)(14,`section`,11)(15,`h2`,12),K(16),L(),j(17,M0,20,1)(18,N0,14,0,`div`,13),L(),I(19,`section`,14)(20,`h2`,15),K(21),L(),R(22,`app-limit-note`,16),I(23,`div`,17)(24,`div`,18),E(),I(25,`svg`,19),R(26,`circle`,20)(27,`path`,21),L(),bs(),I(28,`input`,22),H(`input`,function(e){return t.callQuery.set(e.target.value)})(`keydown.escape`,function(){return t.callQuery.set(``)}),L()(),I(29,`app-select`,23),W_(`valueChange`,function(e){return U_(t.sideFilter,e)||(t.sideFilter=e),e}),L(),I(30,`label`,24)(31,`input`,25),H(`change`,function(e){return t.failedOnly.set(e.target.checked)}),L(),K(32,` Failed only `),L(),I(33,`div`,26)(34,`button`,27),H(`click`,function(){return t.timelineView.set(`table`)}),K(35,` Table `),L(),I(36,`button`,27),H(`click`,function(){return t.timelineView.set(`waterfall`)}),K(37,` Waterfall `),L()(),I(38,`span`,28),K(39),L(),I(40,`span`,29),K(41),L()(),j(42,P0,1,2,`app-network-waterfall`,30)(43,W0,25,5)(44,q0,9,1,`div`,31)(45,J0,11,0,`div`,13),j(46,Z0,21,21,`div`,32),L(),I(47,`section`,33)(48,`h2`,34),K(49,`Fault injection`),L(),j(50,Q0,2,1,`p`,35),I(51,`form`,36),H(`submit`,function(e){return t.addRule(e)}),I(52,`label`)(53,`span`),K(54,`URL pattern `),I(55,`span`,37),K(56,`(substring or * glob, ^ anchors the path)`),L()(),I(57,`input`,38),H(`input`,function(e){return t.patch(`pattern`,e)}),L()(),I(58,`div`,39)(59,`div`,40)(60,`span`,41),K(61,`Method`),L(),I(62,`app-select`,42),H(`valueChange`,function(e){return t.setDraft(`method`,e??``)}),L()(),I(63,`div`,40)(64,`span`,43),K(65,`Apply on`),L(),I(66,`app-select`,44),H(`valueChange`,function(e){return t.setDraft(`target`,e??`both`)}),L()()(),I(67,`div`,39)(68,`div`,40)(69,`span`,45),K(70,`Status`),L(),I(71,`app-select`,46),H(`valueChange`,function(e){return t.setDraft(`status`,e??``)}),L()(),I(72,`label`),K(73,` Delay (ms) `),I(74,`input`,47),H(`input`,function(e){return t.patch(`delayMs`,e)}),L()()(),I(75,`label`)(76,`span`),K(77,`Mock JSON body `),I(78,`span`,37),K(79,`(optional)`),L()(),I(80,`textarea`,48),H(`input`,function(e){return t.patch(`body`,e)}),L()(),I(81,`p`,49),K(82),L(),j(83,$0,2,0,`p`,50),I(84,`p`,51),K(85),L(),I(86,`div`,52)(87,`button`,53),K(88,` Add rule `),L()()(),I(89,`h3`,54),K(90),L(),I(91,`ul`,55),N(92,a2,17,17,`li`,56,t0,!1,o2,2,0,`li`,57),L()(),I(95,`section`,58)(96,`h2`,59),K(97,`SSR overrides`),L(),I(98,`p`,60),K(99,` Development only. These change what the server sends for matching pages, from the next full page load, and the request is marked `),I(100,`strong`),K(101,`overridden`),L(),K(102,`. `),L(),I(103,`form`,61),H(`submit`,function(e){return t.addOverride(e)}),I(104,`div`,40)(105,`span`,62),K(106,`Override`),L(),I(107,`app-select`,63),H(`valueChange`,function(e){return t.setOverrideDraft(`kind`,e??`render-error`)}),L()(),I(108,`label`)(109,`span`),K(110,`Page pattern `),I(111,`span`,37),K(112,`(substring or * glob, ^ anchors the path)`),L()(),I(113,`input`,64),H(`input`,function(e){return t.patchOverride(`pattern`,e)}),L()(),j(114,s2,8,1)(115,u2,12,6)(116,d2,11,0,`p`,65),I(117,`div`,52)(118,`button`,53),K(119,` Add override `),L()()(),I(120,`h3`,66),K(121),L(),I(122,`ul`,55),N(123,m2,12,12,`li`,56,t0,!1,h2,2,0,`li`,57),L()(),I(126,`section`,67)(127,`h2`,68),K(128,`Hydration`),L(),j(129,D2,37,14)(130,O2,5,0,`div`,13),L(),I(131,`section`,69)(132,`h2`,70),K(133,`TransferState payload`),L(),j(134,L2,2,1)(135,R2,3,0,`div`,13),L()()),e&2){let e,n,r,i;O(2),M(t.loading()?2:t.failed()?3:-1),O(2),F(`hidden`,t.loading()),O(4),F(`options`,t.pageOptions())(`value`,t.selected()?.pageId??null),O(),F(`disabled`,!t.canWrite()),A(`aria-describedby`,t.canWrite()?null:`http-writes-off`),O(3),q(t.message()),O(),F(`hidden`,t.loading()),O(3),J(`SSR requests (`,t.requests().length,`)`),O(),M(t.requests().length?17:18),O(4),J(`HTTP timeline (`,t.timeline().length,`)`),O(),F(`dropped`,t.droppedCalls())(`max`,t.maxCalls()),O(),G(`no-calls`,!t.timeline().length),O(5),F(`value`,t.callQuery()),O(),F(`options`,t.sideOptions),H_(`value`,t.sideFilter),O(2),F(`checked`,t.failedOnly()),O(3),A(`aria-pressed`,t.timelineView()===`table`),O(2),A(`aria-pressed`,t.timelineView()===`waterfall`),O(3),q(t.countText()),O(2),q(t.filterStatus()),O(),M(t.visibleCalls().length&&t.timelineView()===`waterfall`?42:t.visibleCalls().length?43:t.timeline().length?44:45),O(4),M((e=t.selectedCall())?46:-1,e),O(4),M(t.canWrite()?-1:50),O(7),F(`value`,t.draft().pattern),O(5),F(`options`,t.methodOptions())(`value`,t.draft().method),O(4),F(`describedBy`,t.draftMocksOnServer()?`rule-ssr-note`:``)(`options`,t.targetOptions)(`value`,t.draft().target),O(5),F(`describedBy`,t.draftMocksOnServer()?`rule-ssr-note`:``)(`options`,t.statusOptions)(`value`,t.draft().status),O(3),F(`value`,t.draft().delayMs),O(6),F(`placeholder`,t.bodyPlaceholder)(`value`,t.draft().body),A(`aria-invalid`,t.bodyError()?`true`:null),O(2),q(t.bodyError()),O(),M(t.draftMocksOnServer()?83:-1),O(2),q(t.draftHint()),O(2),F(`disabled`,!t.canWrite()||!t.draftRule()),A(`aria-disabled`,t.addingRule()||null)(`aria-describedby`,t.canWrite()?`rule-hint`:`http-writes-off`),O(3),J(` Rules (`,t.rules().length,`) `),O(2),P(t.rules()),O(15),F(`describedBy`,t.overrideDraft().kind===`state-edit`?``:`override-kind-help`)(`options`,t.overrideKindOptions)(`value`,t.overrideDraft().kind),O(6),F(`value`,t.overrideDraft().pattern),O(),M((n=t.overrideDraft().kind)===`render-error`?114:n===`state-edit`?115:n===`client-render`?116:-1),O(4),F(`disabled`,!t.canWrite()||!t.overrideReady()),A(`aria-disabled`,t.addingOverride()||null)(`aria-describedby`,t.canWrite()?null:`http-writes-off`),O(3),J(` Overrides (`,t.overrides().length,`) `),O(2),P(t.overrides()),O(6),M((r=t.selected()?.hydration)?129:130,r),O(5),M((i=t.selectedPayload())?134:135,i)}},dependencies:[V1,wO,$1,Iz,JD,yy],styles:[`@charset "UTF-8"; +}`]})},r0=[`callsBody`],i0=(e,t)=>t.id,a0=(e,t)=>t.id+t.kind,o0=(e,t)=>t.entry.side+t.entry.id,s0=(e,t)=>t.key;function c0(e,t){e&1&&(I(0,`div`,2),R(1,`span`,71),I(2,`span`),K(3,`Loading…`),L()())}function l0(e,t){if(e&1){let e=V();I(0,`div`,3)(1,`strong`),K(2,`Could not reach the devtools server.`),L(),I(3,`span`),K(4,`Check that the app's dev server is running with the devtools plugin.`),L(),I(5,`button`,27),H(`click`,function(){return w(e),T(W().retry())}),K(6,`Try again`),L()()}}function u0(e,t){e&1&&(I(0,`span`,87),K(1,`this page`),L())}function d0(e,t){e&1&&(I(0,`span`,88),K(1,`overridden`),L())}function f0(e,t){e&1&&(I(0,`span`,89),K(1,`aborted`),L())}function p0(e,t){if(e&1){let e=V();I(0,`tr`,78),H(`click`,function(){let t=w(e).$implicit;return T(W(2).selectedRequestId.set(t.id))}),I(1,`td`,79)(2,`button`,80)(3,`span`,81),K(4),L(),K(5),I(6,`span`,82),K(7),L()()(),I(8,`td`,83),R(9,`span`,84),K(10),L(),I(11,`td`),K(12),L(),I(13,`td`,85),K(14),L(),I(15,`td`,85),K(16),L(),I(17,`td`)(18,`div`,86),j(19,u0,2,0,`span`,87),j(20,d0,2,0,`span`,88),j(21,f0,2,0,`span`,89),L()()()}if(e&2){let e=t.$implicit,n=W(2);G(`selected`,n.selectedRequest()?.id===e.id),O(2),F(`title`,e.url),A(`aria-pressed`,n.selectedRequest()?.id===e.id),O(2),q(e.method),O(),J(` `,e.url,` `),O(2),Y(`, `,e.status,`, `,n.renderModeLabel(e.renderMode)),O(),G(`ok`,n.statusTone(e.status)===`ok`)(`redirect`,n.statusTone(e.status)===`redirect`)(`bad`,n.statusTone(e.status)===`bad`),O(2),J(``,e.status,` `),O(2),q(n.renderModeLabel(e.renderMode)),O(2),J(``,e.renderMs,` ms`),O(2),Y(``,e.fetches,` (`,e.fetchMs,` ms)`),O(3),M(e.id===n.selected()?.ssrRequestId?19:-1),O(),M(e.overrides?.length?20:-1),O(),M(e.aborted?21:-1)}}function m0(e,t){e&1&&(I(0,`p`,60),K(1),I(2,`code`),K(3,`ssrMiddleware`),L(),K(4,` saw it, so the render mode can't be read and TransferState edits can't apply. Mount `),I(5,`code`),K(6,`ssrMiddleware`),L(),K(7,` after `),I(8,`code`),K(9,`compression()`),L(),K(10,`. `),L()),e&2&&(O(),J(` The body was already compressed (`,t,`) when `))}function h0(e,t){if(e&1&&(I(0,`span`,94),K(1),L()),e&2){let e=W().$implicit;O(),q(e.note)}}function g0(e,t){if(e&1&&(I(0,`p`,93)(1,`span`,88),K(2),L(),I(3,`span`),K(4),L(),j(5,h0,2,1,`span`,94),L()),e&2){let e=t.$implicit,n=W(4);O(2),q(n.overrideLabel(e.kind)),O(2),q(e.applied?`applied`:`not applied`),O(),M(e.note?5:-1)}}function _0(e,t){if(e&1&&(I(0,`h3`),K(1,`Overrides from the panel`),L(),I(2,`p`,60),K(3,` This response was changed on purpose, so it is not what the app sends on its own. `),L(),N(4,g0,6,3,`p`,93,a0)),e&2){let e=W();O(4),P(e.overrides)}}function v0(e,t){if(e&1&&(K(0,` to `),I(1,`code`),K(2),L()),e&2){let e=W().$implicit;O(2),q(e.finalUrl)}}function y0(e,t){if(e&1&&(I(0,`div`)(1,`dt`),K(2,`Guards`),L(),I(3,`dd`),K(4),L()()),e&2){let e=W().$implicit,t=W(4);O(3),G(`bad`,t.guardVerdict(e)===`rejected`),O(),Y(` `,t.msLabel(e.guards.ms),``,t.guardVerdict(e)?`, `+t.guardVerdict(e):``,` `)}}function b0(e,t){if(e&1&&(I(0,`div`)(1,`dt`),K(2,`Resolvers`),L(),I(3,`dd`),K(4),L()()),e&2){let e=W().$implicit,t=W(4);O(4),q(t.msLabel(e.resolvers.ms))}}function x0(e,t){if(e&1&&(I(0,`div`)(1,`dt`),K(2,`Navigation total`),L(),I(3,`dd`),K(4),L()()),e&2){let e=W().$implicit;O(4),J(``,e.durationMs,` ms`)}}function S0(e,t){if(e&1&&(I(0,`p`,60),K(1),L()),e&2){let e=W().$implicit;O(),q(e.reason)}}function C0(e,t){if(e&1&&(I(0,`dl`,95)(1,`div`)(2,`dt`),K(3,`Navigation`),L(),I(4,`dd`)(5,`code`),K(6),L(),j(7,v0,3,1),K(8),L()(),j(9,y0,5,4,`div`),j(10,b0,5,1,`div`),j(11,x0,5,1,`div`),L(),j(12,S0,2,1,`p`,60)),e&2){let e=t.$implicit;O(6),q(e.url),O(),M(e.finalUrl?7:-1),O(),J(` (`,e.outcome,`) `),O(),M(e.guards?9:-1),O(),M(e.resolvers?10:-1),O(),M(e.durationMs===void 0?-1:11),O(),M(e.reason?12:-1)}}function w0(e,t){if(e&1&&(I(0,`h3`),K(1,`Router during the render`),L(),N(2,C0,13,7,null,null,gg)),e&2){let e=W();O(2),P(e.navigations)}}function T0(e,t){e&1&&(I(0,`span`,87),K(1,`cached`),L())}function E0(e,t){if(e&1&&(I(0,`span`,97),K(1,`not cached`),L()),e&2){let e=W().$implicit;F(`title`,W(3).skipText(e.cacheSkip))}}function D0(e,t){if(e&1&&(I(0,`p`,98),K(1),L()),e&2){let e=W().$implicit,t=W(3);O(),J(`Not cached: `,t.skipText(e.cacheSkip),`.`)}}function O0(e,t){if(e&1&&(I(0,`p`,93)(1,`span`,81),K(2),L(),I(3,`span`,96),K(4),L(),I(5,`span`,83),K(6),L(),I(7,`span`,94),K(8),L(),j(9,T0,2,0,`span`,87)(10,E0,2,1,`span`,97),L(),j(11,D0,2,1,`p`,98)),e&2){let e=t.$implicit,n=W(3);O(2),q(e.method),O(),F(`title`,e.url),O(),q(e.url),O(),G(`ok`,n.callTone(e)===`ok`)(`bad`,n.callTone(e)===`bad`),O(),q(n.statusLabel(e)),O(2),J(``,e.durationMs,` ms`),O(),M(e.cacheStored?9:e.cacheSkip?10:-1),O(2),M(!e.cacheStored&&e.cacheSkip?11:-1)}}function k0(e,t){e&1&&(I(0,`p`,60),K(1,`The render made no HttpClient calls.`),L())}function A0(e,t){e&1&&(I(0,`p`,98),K(1),L()),e&2&&(O(),J(`Why: `,t,`.`))}function j0(e,t){if(e&1&&(I(0,`p`,93)(1,`span`,81),K(2),L(),I(3,`span`,96),K(4),L(),I(5,`span`,89),K(6,`cache miss`),L()(),j(7,A0,2,1,`p`,98)),e&2){let e,n=t.$implicit,r=W(4);O(2),q(n.method),O(),F(`title`,n.url),O(),q(n.url),O(3),M((e=r.refetchReason(n))?7:-1,e)}}function M0(e,t){if(e&1&&(I(0,`h3`),K(1),L(),I(2,`p`,60),K(3,` These calls ran on the server and again after hydration instead of reading the transfer cache. `),L(),N(4,j0,8,4,null,null,i0)),e&2){let e=W(3);O(),J(`Fetched again in the browser (`,e.refetched().length,`)`),O(3),P(e.refetched())}}function N0(e,t){e&1&&(I(0,`p`,92),K(1,`No server call ran again in the browser.`),L())}function P0(e,t){if(e&1&&(I(0,`div`,77)(1,`h3`,90),K(2),I(3,`code`),K(4),L()(),I(5,`dl`,91)(6,`div`)(7,`dt`),K(8,`Request id`),L(),I(9,`dd`)(10,`code`),K(11),L()()(),I(12,`div`)(13,`dt`),K(14,`Render`),L(),I(15,`dd`),K(16),L()(),I(17,`div`)(18,`dt`),K(19,`Total`),L(),I(20,`dd`),K(21),L()(),I(22,`div`)(23,`dt`),K(24,`Sent`),L(),I(25,`dd`),K(26),L()(),I(27,`div`)(28,`dt`),K(29,`Browser page`),L(),I(30,`dd`),K(31),L()()(),j(32,m0,11,1,`p`,60),j(33,_0,6,0),j(34,w0,4,0),I(35,`h3`),K(36),L(),N(37,O0,12,11,null,null,i0,!1,k0,2,0,`p`,60),j(40,M0,6,1)(41,N0,2,0,`p`,92),L()),e&2){let e,n=t,r=W(2);O(2),J(` `,n.method,` `),O(2),q(n.url),O(7),q(n.id),O(5),J(``,n.renderMs,` ms`),O(5),J(``,n.durationMs,` ms`),O(5),J(``,n.bytes,` B`),O(5),q(r.requestPage()?.title||r.requestPage()?.url||`not connected`),O(),M((e=r.compressedWith(n))?32:-1,e),O(),M(n.overrides?.length?33:-1),O(),M(n.navigations?.length?34:-1),O(2),J(`Server calls (`,r.requestCalls().length,`)`),O(),P(r.requestCalls()),O(3),M(r.refetched().length?40:r.requestPage()&&r.requestCalls().length?41:-1)}}function F0(e,t){if(e&1&&(I(0,`div`,72)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,73),K(5,`Request`),L(),I(6,`th`,73),K(7,`Status`),L(),I(8,`th`,73),K(9,`Render mode`),L(),I(10,`th`,74),K(11,`Render`),L(),I(12,`th`,74),K(13,`Server calls`),L(),I(14,`th`,73),K(15,`Notes`),L()()(),I(16,`tbody`,75),N(17,p0,22,22,`tr`,76,i0),L()()(),j(19,P0,42,13,`div`,77)),e&2){let e,t=W();O(17),P(t.requests()),O(2),M((e=t.selectedRequest())?19:-1,e)}}function I0(e,t){e&1&&(I(0,`div`,13)(1,`p`),K(2,`No SSR requests traced.`),L(),I(3,`p`,60),K(4,` Add `),I(5,`code`),K(6,`app.use(devtools.ssrMiddleware)`),L(),K(7,` before the Angular handler in `),I(8,`code`),K(9,`server.ts`),L(),K(10,`, or wrap a web-standard handler with `),I(11,`code`),K(12,`withPangularSsr()`),L(),K(13,`, then load a server rendered page. `),L()())}function L0(e,t){if(e&1){let e=V();I(0,`app-network-waterfall`,99),H(`open`,function(t){return w(e),T(W().openCall(t))}),L()}if(e&2){let e=W();F(`calls`,e.waterfallCalls())(`selectedId`,e.selectedCall()?.id??null)}}function R0(e,t){e&1&&(I(0,`p`,100),K(1,` Rows render as you scroll, so the browser's find only sees the ones near view; the search field searches them all. `),L())}function z0(e,t){if(e&1&&(I(0,`tr`,103),R(1,`td`,104),L()),e&2){let e=W(2);O(),y_(`height`,e.callWindow.padTop(),`px`)}}function B0(e,t){e&1&&(I(0,`span`,105),K(1,`transfer cache`),L())}function V0(e,t){if(e&1&&(I(0,`span`,105),K(1),L()),e&2){W();let e=J_(0);O(),J(`delayed `,e.delayMs,` ms`)}}function H0(e,t){e&1&&(I(0,`span`,88),K(1,`mocked`),L())}function U0(e,t){e&1&&(I(0,`span`,89),K(1,`faulted`),L())}function W0(e,t){if(e&1&&(I(0,`span`,108),K(1,`rule `),I(2,`code`),K(3),L()()),e&2){let e=t;F(`title`,`Matched rule: `+e),O(3),q(e)}}function G0(e,t){if(e&1){let e=V();K_(0),I(1,`tr`,78),H(`click`,function(){w(e);let t=J_(0);return T(W(2).openCall(t.id))}),I(2,`td`)(3,`span`,105),K(4),L()(),I(5,`td`,81),K(6),L(),I(7,`td`,79)(8,`button`,106),K(9),L()(),I(10,`td`,107),K(11),L(),I(12,`td`,83),R(13,`span`,84),K(14),L(),I(15,`td`,85),K(16),L(),I(17,`td`)(18,`div`,86),j(19,B0,2,0,`span`,105),j(20,V0,2,1,`span`,105),j(21,H0,2,0,`span`,88),j(22,U0,2,0,`span`,89),j(23,W0,4,2,`span`,108),L()()()}if(e&2){let e,n=t.$implicit,r=W(2),i=q_(n.entry);O(),G(`selected`,r.selectedCall()?.id===i.id),A(`aria-rowindex`,n.index+2)(`data-vindex`,n.index),O(2),G(`server`,i.side===`server`),O(),q(i.side===`server`?`SSR`:`Client`),O(2),q(i.method),O(2),F(`title`,i.url),A(`data-call-id`,i.id)(`aria-pressed`,r.selectedCall()?.id===i.id)(`aria-controls`,r.selectedCall()?`call-preview`:null),O(),J(` `,i.url,` `),O(),F(`title`,i.pageUrl??``),O(),J(` `,i.pageUrl??``,` `),O(),G(`ok`,r.callTone(i)===`ok`)(`redirect`,r.callTone(i)===`redirect`)(`bad`,r.callTone(i)===`bad`),O(2),J(``,r.statusLabel(i),` `),O(2),J(``,i.durationMs,` ms`),O(3),M(i.cacheHit?19:-1),O(),M(i.delayMs?20:-1),O(),M(i.mocked?21:-1),O(),M(i.faulted?22:-1),O(),M((e=r.rulePatternOf(i))?23:-1,e)}}function K0(e,t){if(e&1&&(I(0,`tr`,103),R(1,`td`,104),L()),e&2){let e=W(2);O(),y_(`height`,e.callWindow.padBottom(),`px`)}}function q0(e,t){if(e&1&&(j(0,R0,2,0,`p`,100),I(1,`div`,72)(2,`table`)(3,`thead`)(4,`tr`,101)(5,`th`,73),K(6,`Side`),L(),I(7,`th`,73),K(8,`Method`),L(),I(9,`th`,73),K(10,`URL`),L(),I(11,`th`,73),K(12,`Page`),L(),I(13,`th`,73),K(14,`Status`),L(),I(15,`th`,74),K(16,`Time`),L(),I(17,`th`,73),K(18,`Notes`),L()()(),I(19,`tbody`,102,0),j(21,z0,2,2,`tr`,103),N(22,G0,24,29,`tr`,76,o0),j(24,K0,2,2,`tr`,103),L()()()),e&2){let e=W();M(e.callWindow.enabled()?0:-1),O(2),A(`aria-rowcount`,e.visibleCalls().length+1),O(17),F(`rovingWindow`,e.callWindow),O(2),M(e.callWindow.padTop()?21:-1),O(),P(e.shownCalls()),O(2),M(e.callWindow.padBottom()?24:-1)}}function J0(e,t){e&1&&K(0),e&2&&J(` Nothing matches “`,W(2).callQuery().trim(),`” with these filters. `)}function Y0(e,t){e&1&&K(0),e&2&&J(` None of the `,W(2).timeline().length,` requests fit these filters. `)}function X0(e,t){if(e&1){let e=V();I(0,`div`,31)(1,`p`),K(2,`No requests match.`),L(),I(3,`p`,60),j(4,J0,1,1)(5,Y0,1,1),L(),I(6,`div`,109)(7,`button`,27),H(`click`,function(){return w(e),T(W().clearCallFilters())}),K(8,`Clear filters`),L()()()}if(e&2){let e=W();O(4),M(e.callQuery().trim()?4:5)}}function Z0(e,t){e&1&&(I(0,`div`,13)(1,`p`),K(2,`No requests yet.`),L(),I(3,`p`,60),K(4,` Add `),I(5,`code`),K(6,`withPangular()`),L(),K(7,` to `),I(8,`code`),K(9,`provideHttpClient`),L(),K(10,`, then load a page of the app. `),L()())}function Q0(e,t){if(e&1){let e=V();I(0,`button`,116),H(`click`,function(){w(e);let t=W();return T(W().copyPreview(t))}),K(1,` Copy `),L()}if(e&2){let e=W();A(`aria-label`,`Copy the response of `+e.method+` `+e.url)}}function $0(e,t){e&1&&(I(0,`p`,118),K(1,` Matched rule `),I(2,`code`),K(3),L()()),e&2&&(O(3),q(t))}function e2(e,t){if(e&1){let e=V();I(0,`div`,110),H(`keydown.escape`,function(){return w(e),T(W().closePreview())}),I(1,`div`,111)(2,`h3`,112),K(3,`Response preview`),L(),I(4,`div`,113),j(5,Q0,2,1,`button`,114),I(6,`button`,115),H(`click`,function(){let t=w(e);return T(W().mockCall(t))}),K(7,` Mock this request `),L(),I(8,`button`,116),H(`click`,function(){return w(e),T(W().closePreview())}),K(9,`Close`),L()()(),I(10,`p`,117)(11,`span`,81),K(12),L(),I(13,`span`,83),K(14),L(),I(15,`span`,96),K(16),L()(),j(17,$0,4,1,`p`,118),I(18,`pre`,119),K(19),L(),R(20,`app-http-headers`,120),L()}if(e&2){let e,n=t,r=W();O(5),M(!n.error&&n.preview?5:-1),O(),F(`disabled`,!r.canWrite()),A(`aria-describedby`,r.canWrite()?null:`http-writes-off`),O(6),q(n.method),O(),G(`ok`,r.callTone(n)===`ok`)(`redirect`,r.callTone(n)===`redirect`)(`bad`,r.callTone(n)===`bad`),O(),q(r.statusLabel(n)),O(),F(`title`,n.url),O(),q(n.url),O(),M((e=r.rulePatternOf(n))?17:-1,e),O(),G(`error`,!!n.error&&!n.cancelled),A(`aria-label`,n.error?`Response error`:`Response body`),O(),q(n.error??r.previewText(n)??`(no body)`),O(),F(`callId`,n.id)(`request`,n.requestHeaders)(`response`,n.responseHeaders)}}function t2(e,t){if(e&1&&(I(0,`p`,35),K(1),L()),e&2){let e=W();O(),q(e.writesOff)}}function n2(e,t){e&1&&(I(0,`p`,50),K(1,` SSR mocks are not transferred to the client: the browser requests the URL again and gets the real response unless the rule also applies on the client. `),L())}function r2(e,t){e&1&&(I(0,`span`),K(1,`passthrough`),L())}function i2(e,t){if(e&1&&(I(0,`span`,83),K(1),L()),e&2){let e=W().$implicit,t=W();G(`ok`,t.statusTone(e.status)===`ok`)(`redirect`,t.statusTone(e.status)===`redirect`)(`bad`,t.statusTone(e.status)===`bad`),O(),q(e.status)}}function a2(e,t){if(e&1&&(I(0,`span`),K(1),L()),e&2){let e=W().$implicit;O(),J(``,e.delayMs,` ms`)}}function o2(e,t){e&1&&(I(0,`span`),K(1,`mock body`),L())}function s2(e,t){e&1&&(I(0,`p`,128),K(1,` The SSR mock is not written to TransferState, so the browser requests this URL again. `),L())}function c2(e,t){if(e&1){let e=V();I(0,`li`)(1,`label`,121)(2,`input`,122),H(`change`,function(){let t=w(e).$implicit;return T(W().toggleRule(t.id))}),L(),I(3,`code`,123)(4,`span`,124),K(5),L(),K(6),L()(),I(7,`button`,125),H(`click`,function(){let t=w(e).$implicit;return T(W().removeRule(t.id))}),K(8,` Remove `),L(),I(9,`span`,126)(10,`span`),K(11),L(),j(12,r2,2,0,`span`)(13,i2,2,7,`span`,127),j(14,a2,2,1,`span`),j(15,o2,2,0,`span`),L(),j(16,s2,2,0,`p`,128),L()}if(e&2){let e=t.$implicit,n=W();G(`off`,!e.enabled),O(2),F(`checked`,e.enabled)(`disabled`,!n.canWrite()),A(`aria-describedby`,n.canWrite()?null:`http-writes-off`)(`aria-label`,`Enable rule for `+e.pattern),O(),F(`title`,e.pattern),O(2),q(e.method||`ANY`),O(),J(` `,e.pattern),O(),F(`disabled`,!n.canWrite()),A(`aria-describedby`,n.canWrite()?null:`http-writes-off`)(`aria-label`,`Remove rule for `+e.pattern),O(4),q(n.targetLabel(e.target)),O(),M(e.status===void 0?12:13),O(2),M(e.delayMs?14:-1),O(),M(e.body?15:-1),O(),M(n.mocksOnServer(e)?16:-1)}}function l2(e,t){e&1&&(I(0,`li`,57),K(1,`No rules. SSR rules apply on the next page load.`),L())}function u2(e,t){if(e&1){let e=V();I(0,`p`,65),K(1,` Throws while the server renders, so it needs `),I(2,`code`),K(3,`providePangularHttp()`),L(),K(4,` and a page the engine renders. Prerendered files served as static files skip it. `),L(),I(5,`label`),K(6,` Error message `),I(7,`input`,129),H(`input`,function(t){return w(e),T(W().patchOverride(`message`,t))}),L()()}if(e&2){let e=W();O(7),F(`value`,e.overrideDraft().message)}}function d2(e,t){e&1&&K(0,` For a cached HTTP response this is the whole cache record, not only the response body. `)}function f2(e,t){e&1&&(I(0,`p`,133),K(1,` Filled in from the TransferState payload. The value starts empty because the panel only shows a redacted copy, so type the JSON the server should send. `),j(2,d2,1,0),L()),e&2&&(O(2),M(t===`http`?2:-1))}function p2(e,t){if(e&1){let e=V();I(0,`label`),K(1,` TransferState key `),I(2,`input`,130),H(`input`,function(t){return w(e),T(W().patchOverride(`key`,t))}),L()(),I(3,`label`)(4,`span`),K(5,`New JSON value `),I(6,`span`,37),K(7,`(empty removes the entry)`),L()(),I(8,`textarea`,131),H(`input`,function(t){return w(e),T(W().patchOverride(`value`,t))}),L()(),I(9,`p`,132),K(10),L(),j(11,f2,3,1,`p`,133)}if(e&2){let e,t=W();O(2),F(`value`,t.overrideDraft().key),O(6),F(`value`,t.overrideDraft().value),A(`aria-invalid`,t.overrideValueError()?`true`:null)(`aria-describedby`,t.overrideFromPayload()?`override-value-error override-value-note`:`override-value-error`),O(2),q(t.overrideValueError()),O(),M((e=t.overrideFromPayload())?11:-1,e)}}function m2(e,t){e&1&&(I(0,`p`,65),K(1,` Serves `),I(2,`code`),K(3,`index.csr.html`),L(),K(4,` instead of rendering. Needs `),I(5,`code`),K(6,`browserDistFolder`),L(),K(7,` in `),I(8,`code`),K(9,`initPangularHub()`),L(),K(10,`. `),L())}function h2(e,t){if(e&1&&(I(0,`span`),K(1),L()),e&2){let e=W().$implicit;O(),q(e.message)}}function g2(e,t){if(e&1&&(I(0,`span`),K(1),L()),e&2){let e=W().$implicit;O(),Y(``,e.value===void 0?`remove`:`set`,` `,e.key)}}function _2(e,t){if(e&1){let e=V();I(0,`li`)(1,`label`,121)(2,`input`,122),H(`change`,function(){let t=w(e).$implicit;return T(W().toggleOverride(t.id))}),L(),I(3,`code`,123)(4,`span`,124),K(5),L(),K(6),L()(),I(7,`button`,134),H(`click`,function(){let t=w(e).$implicit;return T(W().removeOverride(t.id))}),K(8,` Remove `),L(),I(9,`span`,126),j(10,h2,2,1,`span`),j(11,g2,2,2,`span`),L()()}if(e&2){let e=t.$implicit,n=W();G(`off`,!e.enabled),O(2),F(`checked`,e.enabled)(`disabled`,!n.canWrite()),A(`aria-label`,`Enable `+n.overrideLabel(e.kind)+` for `+e.pattern),O(),F(`title`,e.pattern),O(2),q(n.overrideLabel(e.kind)),O(),J(` `,e.pattern),O(),F(`disabled`,!n.canWrite()),A(`aria-label`,`Remove `+n.overrideLabel(e.kind)+` for `+e.pattern),O(3),M(e.message?10:-1),O(),M(e.key?11:-1)}}function v2(e,t){e&1&&(I(0,`li`,57),K(1,`No overrides.`),L())}function y2(e,t){if(e&1&&(I(0,`div`)(1,`dt`),K(2,`DOM nodes hydrated`),L(),I(3,`dd`),K(4),L()(),I(5,`div`)(6,`dt`),K(7,`DOM nodes skipped`),L(),I(8,`dd`),K(9),L()(),I(10,`div`)(11,`dt`),K(12,`Mismatched components`),L(),I(13,`dd`),K(14),L()()),e&2){let e=t;O(4),q(e.hydrated),O(5),q(e.skipped),O(4),G(`bad`,e.mismatched>0),O(),q(e.mismatched)}}function b2(e,t){if(e&1&&(I(0,`span`,136)(1,`span`,137),K(2,`Expected`),L(),I(3,`code`),K(4),L()()),e&2){let e=W().$implicit;O(4),q(e.expected)}}function x2(e,t){if(e&1&&(I(0,`span`,136)(1,`span`,137),K(2,`Actual`),L(),I(3,`code`),K(4),L()()),e&2){let e=W().$implicit;O(4),q(e.actual)}}function S2(e,t){if(e&1&&(I(0,`li`)(1,`code`),K(2),L(),j(3,b2,5,1,`span`,136),j(4,x2,5,1,`span`,136),L()),e&2){let e=t.$implicit;O(2),q(e.isClass?e.component:`<`+e.component+`>`),O(),M(e.expected?3:-1),O(),M(e.actual?4:-1)}}function C2(e,t){if(e&1&&(I(0,`h3`),K(1),L(),I(2,`ul`,135),N(3,S2,5,3,`li`,null,gg),L()),e&2){let e=W();O(),J(`Mismatches (`,e.mismatches.length,`)`),O(2),P(e.mismatches)}}function w2(e,t){if(e&1&&(I(0,`li`)(1,`code`),K(2),L()()),e&2){let e=t.$implicit;O(2),q(e)}}function T2(e,t){if(e&1&&(I(0,`h3`),K(1,`ngSkipHydration hosts`),L(),I(2,`ul`,138),N(3,w2,3,1,`li`,null,gg),L()),e&2){let e=W();O(3),P(e.skipHydrationHosts)}}function E2(e,t){e&1&&(I(0,`h3`),K(1,`Warnings`),L(),I(2,`p`,60),K(3,` Not captured: add `),I(4,`code`),K(5,`providePangularHttp()`),L(),K(6,` to the app providers. `),L())}function D2(e,t){if(e&1&&(I(0,`pre`,139),K(1),L()),e&2){let e=t.$implicit;O(),q(e)}}function O2(e,t){e&1&&(I(0,`p`,92),K(1,`No hydration warnings.`),L())}function k2(e,t){if(e&1&&(I(0,`h3`),K(1),L(),N(2,D2,2,1,`pre`,139,gg,!1,O2,2,0,`p`,92)),e&2){let e=W();O(),J(`Warnings (`,e.warnings.length,`)`),O(),P(e.warnings)}}function A2(e,t){if(e&1&&(I(0,`dl`,91)(1,`div`)(2,`dt`),K(3,`Enabled`),L(),I(4,`dd`)(5,`span`,105),K(6),L()()(),I(7,`div`)(8,`dt`),K(9,`Hydrated components`),L(),I(10,`dd`),K(11),L()(),I(12,`div`)(13,`dt`),K(14,`Hydrated nodes`),L(),I(15,`dd`),K(16),L()(),I(17,`div`)(18,`dt`),K(19,`Skipped components`),L(),I(20,`dd`),K(21),L()(),I(22,`div`)(23,`dt`),K(24,`App stable after`),L(),I(25,`dd`),K(26),L()(),I(27,`div`)(28,`dt`),K(29,`Incremental defer blocks`),L(),I(30,`dd`),K(31),L()(),j(32,y2,15,5),L(),j(33,C2,5,1),j(34,T2,5,0),j(35,E2,7,0)(36,k2,5,2)),e&2){let e,n=t;O(5),G(`on`,n.enabled)(`off-tag`,!n.enabled),O(),q(n.enabled?`yes`:`no (client render only)`),O(5),q(n.hydratedComponents??`n/a`),O(5),q(n.hydratedNodes??`n/a`),O(5),q(n.componentsSkippedHydration??`n/a`),O(5),q(n.stableMs===void 0?`n/a`:n.stableMs+` ms`),O(5),q(n.deferBlocksWithIncrementalHydration??`n/a`),O(),M((e=n.nodes)?32:-1,e),O(),M(n.mismatches?.length?33:-1),O(),M(n.skipHydrationHosts.length?34:-1),O(),M(n.warningsCaptured===!1?35:36)}}function j2(e,t){e&1&&(I(0,`div`,13)(1,`p`),K(2,`No hydration data for this page.`),L(),I(3,`p`,60),K(4,`Open a server rendered page of the app to see its stats.`),L()())}function M2(e,t){e&1&&(I(0,`div`,13)(1,`p`),K(2,`No TransferState script: this page was not server rendered.`),L()())}function N2(e,t){if(e&1&&(I(0,`p`,141),K(1),L()),e&2){let e=W(2);O(),q(e.error)}}function P2(e,t){e&1&&(I(0,`span`,105),K(1),L()),e&2&&(O(),q(t))}function F2(e,t){if(e&1&&(I(0,`span`,105),K(1),L(),I(2,`span`,144),K(3),L()),e&2){let e=t,n=W().$implicit,r=W(3);G(`server`,r.statusTone(e.status)===`ok`)(`fault`,r.statusTone(e.status)===`bad`),O(),J(`HTTP `,e.status),O(2),q(e.url??n.key)}}function I2(e,t){if(e&1&&(I(0,`span`,144),K(1),L()),e&2){let e=W().$implicit;O(),q(e.key)}}function L2(e,t){if(e&1){let e=V();I(0,`button`,116),H(`click`,function(){w(e);let t=W().$implicit;return T(W(3).editEntry(t))}),K(1,` Edit in SSR overrides `),L()}if(e&2){let e=W().$implicit;A(`aria-label`,`Edit in SSR overrides, key `+e.key)}}function R2(e,t){if(e&1){let e=V();I(0,`details`)(1,`summary`),R(2,`span`,143),j(3,P2,2,1,`span`,105),j(4,F2,4,6)(5,I2,2,1,`span`,144),I(6,`span`,145),K(7),L()(),I(8,`div`,146)(9,`span`,147),K(10,`Key`),L(),I(11,`code`,148),K(12),L(),I(13,`div`,149)(14,`button`,116),H(`click`,function(){let t=w(e).$implicit;return T(W(3).copyKey(t.key))}),K(15,` Copy `),L(),j(16,L2,2,1,`button`,114),L()(),I(17,`pre`,150),K(18),lv(19,`json`),L()()}if(e&2){let e,n,r=t.$implicit,i=W(3);O(3),M((e=i.payloadLabel(r))?3:-1,e),O(),M((n=r.http)?4:5,n),O(3),J(``,r.size,` B`),O(5),q(r.key),O(2),A(`aria-label`,`Copy key `+r.key),O(2),M(i.canEditEntry(r)?16:-1),O(),A(`aria-label`,`Value of `+r.key),O(),q(uv(19,8,r.value))}}function z2(e,t){if(e&1&&(I(0,`p`,140),K(1),L(),j(2,N2,2,1,`p`,141),I(3,`div`,142),N(4,R2,20,10,`details`,null,s0),L()),e&2){let e=W();O(),z_(` `,e.entries.length,` entr`,e.entries.length===1?`y`:`ies`,`, `,e.size,` bytes `),O(),M(e.error?2:-1),O(2),P(e.entries)}}function B2(e,t){e&1&&j(0,M2,3,0,`div`,13)(1,z2,6,4),e&2&&M(+!!t.found)}function V2(e,t){e&1&&(I(0,`div`,13)(1,`p`),K(2,`Open a page of the app to see its payload.`),L()())}var H2={kind:`render-error`,pattern:``,message:``,key:``,value:``},U2={"render-error":`Render error`,"client-render":`Client render`,"state-edit":`TransferState edit`},W2={server:`Server`,prerender:`Prerender`,client:`Client`,redirect:`Redirect`,"not-rendered":`Not rendered`,unknown:`Unknown`},G2={pattern:``,method:``,target:`both`,status:``,delayMs:``,body:``};function K2(e){try{let t=new URL(e,`http://x`);return t.pathname+t.search}catch{return e}}var q2=/\[redacted\]|%5Bredacted%5D/gi;function J2(e){return(/^([a-z][a-z\d+.-]*:|\/\/)/i.test(e)?K2(e):e).replace(q2,`*`)}function Y2(e){let t=bO(e);if(t!==null)return t;try{return JSON.parse(e),e.trim()}catch{return null}}var X2=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`];function Z2(e){try{return new URL(e,`http://x`).pathname}catch{return``}}function Q2(e){let t=Z2(e);return t===`/`?``:t}var $2=/\[redacted\]|%5Bredacted%5D/i,e4=200,t4=50,n4=500,r4=1e5,i4=[{value:``,label:`None`},...Xw.map(([e,t])=>({value:String(e),label:`${e} ${t}`}))],a4=class e{rpc=$(null);canWrite=X(()=>bE(this.rpc(),`http`));writesOff=kT(`http`);loading=D(!1);failed=D(!1);serverCalls=D([]);pages=D([]);payloads=D({});serverDropped=D(0);requests=D([]);rules=D([]);addingRule=D(!1);addingOverride=D(!1);ruleSaves=Promise.resolve(!0);overrideSaves=Promise.resolve(!0);overrides=D([]);overrideDraft=D({...H2});overrideFromPayload=D(null);overrideKindOptions=[{value:`render-error`,label:`Render error`},{value:`client-render`,label:`Force Client render`},{value:`state-edit`,label:`Edit TransferState entry`}];overrideValueError=X(()=>{let e=this.overrideDraft().value.trim();if(!e)return``;try{return JSON.parse(e),``}catch{return`The value must be valid JSON.`}});overrideReady=X(()=>{let e=this.overrideDraft();return!e.pattern.trim()||this.overrides().length>=20?!1:e.kind!==`state-edit`||!!e.key.trim()&&!this.overrideValueError()});hostPageId=XT();selectedPageId=Q({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:e.find(e=>e.pageId===this.hostPageId)?.pageId??e[0]?.pageId??null});selectedCallId=D(null);draft=D({...G2});message=D(``);bodyPlaceholder=`{ "error": "Service unavailable" }`;statusOptions=i4;unsubscribe=[];destroyRef=C(As);injector=C(Os);host=C(Vl);selected=X(()=>this.pages().find(e=>e.pageId===this.selectedPageId())??null);pageRequestId=X(()=>this.selected()?.ssrRequestId??null);selectedRequestId=Q(()=>this.pageRequestId());selectedPayload=X(()=>{let e=this.selectedPageId();return e?this.payloads()[e]??null:null});maxCalls=X(()=>_E(this.rpc()).limits.httpCalls);droppedCalls=X(()=>(this.selected()?.dropped??0)+this.serverDropped());pageServerCalls=X(()=>{let e=this.selected()?.initialUrl;return e?this.serverCalls().filter(t=>!t.pageUrl||t.pageUrl===e):this.serverCalls()});timeline=X(()=>[...this.pageServerCalls(),...this.selected()?.calls??[]].sort((e,t)=>t.at-e.at));callQuery=D(``);timelineView=D(`table`);waterfallCalls=X(()=>this.visibleCalls().filter(e=>e.side===`client`));sideFilter=D(`all`);failedOnly=D(!1);sideOptions=[{value:`all`,label:`All sides`},{value:`server`,label:`SSR`},{value:`client`,label:`Client`}];callWindow=new UN({count:X(()=>this.visibleCalls().length),estimate:37});shownCalls=X(()=>{let{start:e,end:t}=this.callWindow.range();return this.visibleCalls().slice(e,t).map((t,n)=>({entry:t,index:e+n}))});callsBody=Dv(`callsBody`);visibleCalls=X(()=>{let e=this.callQuery().trim().toLowerCase(),t=this.sideFilter()??`all`,n=this.failedOnly();return this.timeline().filter(r=>(t===`all`||r.side===t)&&(!n||this.isFailed(r))&&(!e||`${r.method} ${r.url}`.toLowerCase().includes(e)||`${r.method} ${K2(r.url)}`.toLowerCase().includes(e)))});countText=X(()=>{let e=this.timeline().length;if(this.timelineView()!==`waterfall`)return`${this.visibleCalls().length} of ${e}`;let t=this.waterfallCalls().length;return`${t} client ${t===1?`call`:`calls`} of ${e}`});filterStatus=X(()=>{this.callQuery(),this.sideFilter(),this.failedOnly(),this.timelineView(),this.filterFlip=!this.filterFlip;let e=Z(()=>this.countText());return this.filterFlip?`${e}\u00a0`:e});filterFlip=!0;selectedCall=X(()=>this.visibleCalls().find(e=>e.id===this.selectedCallId())??null);selectedRequest=X(()=>this.requests().find(e=>e.id===this.selectedRequestId())??null);requestCalls=X(()=>{let e=this.selectedRequest()?.id;return e?this.serverCalls().filter(t=>t.requestId===e):[]});requestPage=X(()=>{let e=this.selectedRequest()?.id;return e?this.pages().find(t=>t.ssrRequestId===e)??null:null});refetched=X(()=>{let e=this.selectedRequest(),t=this.requestPage();if(!e||!t)return[];let n=new Set(this.requestCalls().filter(e=>e.status).map(e=>`${e.method} ${K2(e.url)}`));return t.calls.filter(t=>t.side===`client`&&!t.cacheHit&&!t.mocked&&t.at>=e.at&&n.has(`${t.method} ${K2(t.url)}`))});draftMocksOnServer=X(()=>{let e=this.draftRule();return!!e&&this.mocksOnServer(e)});draftRule=X(()=>{let e=this.draft(),t=e.pattern.trim();if(!t||t.length>n4||this.bodyError()||this.rules().length>=t4)return null;let n=e.body.trim(),r=Math.min(Math.max(Math.round(Number(e.delayMs))||0,0),1e4),i=e.status.trim()?Number(e.status):n?200:void 0;return i!==void 0&&!Zw(i)||i===void 0&&!r?null:{pattern:t,enabled:!0,target:e.target,...e.method?{method:e.method}:{},...i===void 0?{}:{status:i},...r?{delayMs:r}:{},...n?{body:n}:{}}});draftHint=X(()=>{let e=this.draft();return this.rules().length>=t4?`You can add up to ${t4} rules. Remove one to add another.`:e.pattern.trim()?e.pattern.trim().length>n4?`The URL pattern is limited to ${n4} characters.`:this.bodyError()?``:e.status.trim()&&!Zw(Number(e.status))?`Pick a status from the list.`:this.draftRule()?!e.status.trim()&&e.body.trim()?`With no status, the mock body returns 200.`:``:`Set a status, a delay or a mock body.`:`Enter a URL pattern to add a rule.`});bodyError=X(()=>{let e=this.draft().body.trim();if(!e)return``;if(e.length>r4)return`The mock body is limited to ${r4} characters.`;try{return JSON.parse(e),``}catch{return`The mock body must be valid JSON.`}});constructor(){_c(()=>{let e=this.callsBody()?.nativeElement;e&&this.callWindow.attach(e)}),_c(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.stopListening())}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=e.scope(`pangular`).rpc,[n,r]=await Promise.all([t.sharedState(`http`),t.sharedState(`http-payloads`)]);if(this.destroyRef.destroyed)return;let i=e=>{let t=e;this.serverCalls.set(t?.serverCalls??[]),this.serverDropped.set(t?.serverDropped??0),this.requests.set([...t?.requests??[]].reverse()),this.pages.set(t?.pages??[]),this.rules.set(t?.rules??[]),this.overrides.set(t?.ssrOverrides??[])},a=e=>this.payloads.set(e?.pages??{});i(n.value()),a(r.value()),this.stopListening(),this.unsubscribe=[n.on(`updated`,i),r.on(`updated`,a)]}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}retry(){let e=this.rpc();e&&this.load(e)}guardVerdict(e){return e.guards?.passed===!1?e.outcome===`redirected`?`redirected`:`rejected`:``}msLabel(e){return e===void 0?`n/a`:`${e} ms`}skipText(e){return Yw[e]??``}refetchReason(e){let t=`${e.method} ${K2(e.url)}`,n=this.requestCalls().filter(e=>`${e.method} ${K2(e.url)}`===t),r=n[0];return r?.cacheSkip&&n.every(e=>e.cacheSkip===r.cacheSkip)?this.skipText(r.cacheSkip):``}compressedWith(e){if(e.compressedBeforeTrace)return e.headers[`content-encoding`]??`unknown encoding`}renderModeLabel(e){return W2[e]??`Unknown`}statusLabel(e){return e.cancelled?`cancelled`:e.status?String(e.status):`ERR`}callTone(e){return e.cancelled?`neutral`:this.statusTone(e.status)}isFailed(e){return!!e.cancelled||!e.status||e.status>=400}clearCallFilters(){this.callQuery.set(``),this.sideFilter.set(`all`),this.failedOnly.set(!1),this.host.nativeElement.querySelector(`#timeline-search`)?.focus()}rulePatternOf(e){return e.rulePattern?e.rulePattern:e.ruleId?this.rules().find(t=>t.id===e.ruleId)?.pattern??null:null}openCall(e){this.selectedCallId.set(e),ud(()=>this.host.nativeElement.querySelector(`#preview-heading`)?.focus(),{injector:this.injector})}previewText(e){if(e.preview!==void 0)return bO(e.preview)??e.preview}async copyPreview(e){let t=this.previewText(e);if(t)try{await navigator.clipboard.writeText(t),this.message.set(`Copied.`)}catch{this.message.set(`The clipboard is not available here.`)}}mockCall(e){let t=e.method.toUpperCase(),n=J2(e.url),r=e.error||!e.preview?null:Y2(e.preview);this.draft.set({...G2,pattern:n,method:t,body:r??``});let i=`${t} ${n}`;this.message.set(r?`Filled in a rule for ${i} with the preview as its body. Check it, then add the rule.`:e.preview&&!e.error?`Filled in a rule for ${i}. The preview is not complete JSON, so it is not used as the body.`:`Filled in a rule for ${i}. Set a status, a delay or a body, then add the rule.`),ud(()=>this.host.nativeElement.querySelector(`#rule-pattern`)?.focus(),{injector:this.injector})}closePreview(){let e=this.selectedCallId();this.selectedCallId.set(null),e&&[...this.host.nativeElement.querySelectorAll(`button[data-call-id]`)].find(t=>t.dataset.callId===e)?.focus()}stopListening(){for(let e of this.unsubscribe.splice(0))e()}statusTone(e){return e===void 0?`neutral`:e===0||e>=400?`bad`:e>=300?`redirect`:e>=200?`ok`:`neutral`}mocksOnServer(e){return e.target!==`client`&&e.status!==void 0&&e.status<400}payloadLabel(e){return e.source===`hydration`?`hydration annotations`:e.fn?`Analog server function ${e.fn.name??e.fn.id}`:e.source===`analog`?`Analog`:null}targetLabel(e){return e===`both`?`SSR + client`:e===`server`?`SSR only`:`Client only`}pageOptions=X(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url})));methodOptions=X(()=>{let e=this.draft().method;return[{value:``,label:`Any`},...(e&&!X2.includes(e)?[...X2,e]:X2).map(e=>({value:e,label:e}))]});targetOptions=[{value:`both`,label:`SSR + client`},{value:`server`,label:`SSR only`},{value:`client`,label:`Client only`}];selectPage(e){e&&this.selectedPageId.set(e),this.selectedCallId.set(null),this.overrideFromPayload.set(null)}setDraft(e,t){this.draft.update(n=>({...n,[e]:t}))}patch(e,t){let n=t.target.value;this.draft.update(t=>({...t,[e]:n}))}async addRule(e){e.preventDefault();let t=this.draftRule();if(!t||this.addingRule())return;let n={id:`r${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`,...t};this.addingRule.set(!0);let r=await this.saveRules(e=>[[...e,n],n],`Rule added.`);this.addingRule.set(!1),r&&(this.draft.set({...G2}),this.host.nativeElement.querySelector(`#rule-pattern`)?.focus())}toggleRule(e){this.saveRules(t=>{let n=t.find(t=>t.id===e);return n?[t.map(t=>t.id===e?{...t,enabled:!t.enabled}:t),n]:null},`Rule updated.`)}async removeRule(e){let t=-1;await this.saveRules(n=>(t=n.findIndex(t=>t.id===e),t<0?null:[n.filter(t=>t.id!==e),n[t]]),`Rule removed.`)&&this.focusAfterRemove(`[data-remove-rule]`,t,`#rule-list-heading`)}async clearCalls(){try{await tE(this.rpc(),`clear-http-calls`),this.selectedCallId.set(null),this.message.set(`Timeline cleared.`)}catch{this.message.set(`Could not clear the timeline.`)}}overrideLabel(e){return U2[e]??e}setOverrideDraft(e,t){this.overrideDraft.update(n=>({...n,[e]:t})),e===`kind`&&t!==`state-edit`&&this.overrideFromPayload.set(null)}patchOverride(e,t){let n=t.target.value;this.overrideDraft.update(t=>({...t,[e]:n})),e===`key`&&this.overrideFromPayload.set(null)}async copyKey(e){try{await navigator.clipboard.writeText(e),this.message.set(`Copied.`)}catch{this.message.set(`The clipboard is not available here.`)}}canEditEntry(e){let{key:t}=e;return this.canWrite()&&!!t&&t===t.trim()&&t.length<=e4&&!$2.test(t)}editEntry(e){if(!this.canEditEntry(e))return;let t=this.selected();this.overrideDraft.set({...H2,kind:`state-edit`,pattern:t?Q2(t.initialUrl??t.url):``,key:e.key}),this.overrideFromPayload.set(e.http?`http`:`other`),this.message.set(`Editing the TransferState entry in SSR overrides.`),ud(()=>{let e=this.host.nativeElement.querySelector(this.overrideDraft().pattern?`#override-value`:`#override-pattern`);e?.scrollIntoView?.({block:`center`}),e?.focus()},{injector:this.injector})}async addOverride(e){if(e.preventDefault(),!this.overrideReady()||this.addingOverride())return;let t=this.overrideDraft(),n={id:`o${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`,kind:t.kind,pattern:t.pattern.trim(),enabled:!0,...t.kind===`render-error`&&t.message.trim()?{message:t.message.trim()}:{},...t.kind===`state-edit`?{key:t.key.trim()}:{},...t.kind===`state-edit`&&t.value.trim()?{value:t.value.trim()}:{}};this.addingOverride.set(!0);let r=await this.saveOverrides(e=>[...e,n],`Override added. Reload the page.`);this.addingOverride.set(!1),r&&(this.overrideDraft.set({...H2,kind:t.kind}),this.overrideFromPayload.set(null),this.host.nativeElement.querySelector(`#override-pattern`)?.focus())}toggleOverride(e){this.saveOverrides(t=>t.some(t=>t.id===e)?t.map(t=>t.id===e?{...t,enabled:!t.enabled}:t):null,`Override updated. Reload the page.`)}async removeOverride(e){let t=-1;await this.saveOverrides(n=>(t=n.findIndex(t=>t.id===e),t<0?null:n.filter(t=>t.id!==e)),`Override removed.`)&&this.focusAfterRemove(`[data-remove-override]`,t,`#override-list-heading`)}focusAfterRemove(e,t,n){ud(()=>{let r=this.host.nativeElement,i=r.querySelectorAll(e);(i[Math.min(t,i.length-1)]??r.querySelector(n))?.focus()},{injector:this.injector})}announce(e){if(this.message()!==e){this.message.set(e);return}this.message.set(``),ud(()=>{this.message()===``&&this.message.set(e)},{injector:this.injector})}saveOverrides(e,t){let n=this.overrideSaves.then(async()=>{let n=e(this.overrides());if(!n)return!1;try{let e=await tE(this.rpc(),`set-ssr-overrides`,n);return this.overrides.set(Array.isArray(e)?e:n),this.announce(t),!0}catch{return this.message.set(`Could not save the overrides.`),!1}});return this.overrideSaves=n,n}saveRules(e,t){let n=this.ruleSaves.then(async()=>{let n=e(this.rules());if(!n)return!1;let[r,i]=n;try{let e=await tE(this.rpc(),`set-http-rules`,r);return this.rules.set(Array.isArray(e)?e:r),this.announce(i.target===`client`?t:`${t} Reload the page to apply it to SSR.`),!0}catch{return this.message.set(`Could not save the rules.`),!1}});return this.ruleSaves=n,n}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-network-inspector`]],viewQuery:function(e,t){e&1&&Xg(t.callsBody,r0,5),e&2&&Zg()},inputs:{rpc:[1,`rpc`]},decls:136,vars:59,consts:[[`callsBody`,``],[1,`page-intro`],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`,`error`],[1,`toolbar`,3,`hidden`],[1,`page-picker`],[`id`,`page-picker-label`],[`labelledBy`,`page-picker-label`,`emptyText`,`No connected page`,`placeholder`,`No connected page`,3,`valueChange`,`options`,`value`],[`type`,`button`,3,`click`,`disabled`],[`role`,`status`,1,`message`],[1,`grid`,3,`hidden`],[`aria-labelledby`,`ssr-heading`,1,`panel`,`wide`],[`id`,`ssr-heading`],[1,`empty`],[`aria-labelledby`,`timeline-heading`,1,`panel`,`wide`],[`id`,`timeline-heading`],[`what`,`HTTP calls`,`limit`,`httpCalls`,3,`dropped`,`max`],[`role`,`group`,`aria-label`,`Filter the HTTP timeline`,1,`filters`],[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`],[`id`,`timeline-search`,`type`,`search`,`placeholder`,`Find a URL or method…`,`aria-label`,`Find a URL or method`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Side`,1,`side-filter`,3,`valueChange`,`options`,`value`],[1,`inline`,`failed-toggle`],[`type`,`checkbox`,3,`change`,`checked`],[`role`,`group`,`aria-label`,`Timeline view`,1,`view-toggle`],[`type`,`button`,3,`click`],[1,`total`],[`role`,`status`,1,`sr-only`],[3,`calls`,`selectedId`],[`role`,`status`,1,`empty`,`no-match`],[`id`,`call-preview`,`role`,`region`,`aria-labelledby`,`preview-heading`,1,`preview`],[`aria-labelledby`,`rules-heading`,1,`panel`],[`id`,`rules-heading`],[`id`,`http-writes-off`,1,`muted`,`small`],[`id`,`rule-form`,1,`rule-form`,3,`submit`],[1,`hint`],[`id`,`rule-pattern`,`required`,``,`spellcheck`,`false`,`autocomplete`,`off`,`placeholder`,`e.g. /api/products`,3,`input`,`value`],[1,`row`],[1,`field-group`],[`id`,`rule-method-label`],[`labelledBy`,`rule-method-label`,3,`valueChange`,`options`,`value`],[`id`,`rule-target-label`],[`labelledBy`,`rule-target-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`id`,`rule-status-label`],[`labelledBy`,`rule-status-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`type`,`number`,`inputmode`,`numeric`,`min`,`0`,`max`,`10000`,`placeholder`,`0`,3,`input`,`value`],[`rows`,`3`,`spellcheck`,`false`,`aria-describedby`,`body-error`,3,`input`,`placeholder`,`value`],[`id`,`body-error`,1,`field-error`],[`id`,`rule-ssr-note`,1,`muted`,`small`],[`id`,`rule-hint`,1,`muted`,`small`],[1,`form-actions`],[`type`,`submit`,3,`disabled`],[`id`,`rule-list-heading`,`tabindex`,`-1`,1,`rules-heading`],[1,`rules`],[3,`off`],[1,`empty-rule`],[`aria-labelledby`,`overrides-heading`,1,`panel`],[`id`,`overrides-heading`],[1,`muted`,`small`],[1,`rule-form`,3,`submit`],[`id`,`override-kind-label`],[`labelledBy`,`override-kind-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`id`,`override-pattern`,`required`,``,`spellcheck`,`false`,`autocomplete`,`off`,`placeholder`,`e.g. /examples/ssr`,3,`input`,`value`],[`id`,`override-kind-help`,1,`muted`,`small`],[`id`,`override-list-heading`,`tabindex`,`-1`,1,`rules-heading`],[`aria-labelledby`,`hydration-heading`,1,`panel`],[`id`,`hydration-heading`],[`aria-labelledby`,`payload-heading`,1,`panel`,`wide`],[`id`,`payload-heading`],[`aria-hidden`,`true`,1,`spinner`],[1,`table-wrap`],[`scope`,`col`],[`scope`,`col`,1,`num`],[`appRovingList`,`button.ssr-row`],[3,`selected`],[`id`,`ssr-detail`,`role`,`region`,`aria-labelledby`,`ssr-detail-heading`,1,`preview`],[3,`click`],[1,`url`],[`type`,`button`,`aria-controls`,`ssr-detail`,1,`link`,`ssr-row`,3,`title`],[1,`method`],[1,`sr-only`],[1,`status`],[`aria-hidden`,`true`,1,`dot`],[1,`num`],[1,`notes`],[1,`tag`,`server`],[1,`tag`,`mock`],[1,`tag`,`fault`],[`id`,`ssr-detail-heading`],[1,`stats`],[1,`muted`,`small`,`ok-note`],[1,`request-call`],[1,`muted`],[1,`stats`,`nav-stats`],[1,`preview-url`,3,`title`],[1,`tag`,3,`title`],[1,`muted`,`small`,`skip-reason`],[3,`open`,`calls`,`selectedId`],[1,`muted`,`small`,`window-note`],[`aria-rowindex`,`1`],[`appRovingList`,`button[data-call-id]`,3,`rovingWindow`],[`aria-hidden`,`true`,1,`spacer`],[`colspan`,`7`],[1,`tag`],[`type`,`button`,1,`link`,3,`title`],[1,`page-url`,3,`title`],[1,`tag`,`rule-ref`,3,`title`],[1,`empty-actions`],[`id`,`call-preview`,`role`,`region`,`aria-labelledby`,`preview-heading`,1,`preview`,3,`keydown.escape`],[1,`preview-head`],[`id`,`preview-heading`,`tabindex`,`-1`],[1,`preview-actions`],[`type`,`button`,1,`ghost`],[`type`,`button`,`aria-controls`,`rule-form`,1,`ghost`,3,`click`,`disabled`],[`type`,`button`,1,`ghost`,3,`click`],[1,`preview-meta`],[1,`preview-rule`],[`tabindex`,`0`,`role`,`region`,1,`preview-body`],[3,`callId`,`request`,`response`],[1,`inline`],[`type`,`checkbox`,3,`change`,`checked`,`disabled`],[1,`rule-pattern`,3,`title`],[1,`rule-method`],[`type`,`button`,`data-remove-rule`,``,1,`link`,`remove`,3,`click`,`disabled`],[1,`rule-meta`],[1,`status`,3,`ok`,`redirect`,`bad`],[1,`rule-note`],[`spellcheck`,`false`,`placeholder`,`Simulated render error`,`aria-describedby`,`override-kind-help`,3,`input`,`value`],[`id`,`override-key`,`spellcheck`,`false`,`autocomplete`,`off`,3,`input`,`value`],[`id`,`override-value`,`rows`,`3`,`spellcheck`,`false`,3,`input`,`value`],[`id`,`override-value-error`,1,`field-error`],[`id`,`override-value-note`,1,`muted`,`small`],[`type`,`button`,`data-remove-override`,``,1,`link`,`remove`,3,`click`,`disabled`],[1,`plain`,`mismatches`],[1,`mismatch-row`],[1,`mismatch-label`],[1,`plain`],[1,`warn`],[1,`muted`,`small`,`summary-line`],[`role`,`alert`,1,`bad`],[1,`entries`],[`aria-hidden`,`true`,1,`chevron`],[1,`entry-key`],[1,`entry-size`],[1,`entry-key-row`],[1,`entry-key-label`],[1,`entry-key-text`],[1,`entry-actions`],[`tabindex`,`0`,`role`,`region`]],template:function(e,t){if(e&1&&(I(0,`p`,1),K(1,` HttpClient calls made while rendering on the server and in the browser, from the live page and the devtools server, with hydration stats, the TransferState payload and fault injection. `),L(),j(2,c0,4,0,`div`,2)(3,l0,7,0,`div`,3),I(4,`div`,4)(5,`div`,5)(6,`span`,6),K(7,`Page`),L(),I(8,`app-select`,7),H(`valueChange`,function(e){return t.selectPage(e)}),L()(),I(9,`button`,8),H(`click`,function(){return t.clearCalls()}),K(10,` Clear timeline `),L(),I(11,`p`,9),K(12),L()(),I(13,`div`,10)(14,`section`,11)(15,`h2`,12),K(16),L(),j(17,F0,20,1)(18,I0,14,0,`div`,13),L(),I(19,`section`,14)(20,`h2`,15),K(21),L(),R(22,`app-limit-note`,16),I(23,`div`,17)(24,`div`,18),E(),I(25,`svg`,19),R(26,`circle`,20)(27,`path`,21),L(),bs(),I(28,`input`,22),H(`input`,function(e){return t.callQuery.set(e.target.value)})(`keydown.escape`,function(){return t.callQuery.set(``)}),L()(),I(29,`app-select`,23),W_(`valueChange`,function(e){return U_(t.sideFilter,e)||(t.sideFilter=e),e}),L(),I(30,`label`,24)(31,`input`,25),H(`change`,function(e){return t.failedOnly.set(e.target.checked)}),L(),K(32,` Failed only `),L(),I(33,`div`,26)(34,`button`,27),H(`click`,function(){return t.timelineView.set(`table`)}),K(35,` Table `),L(),I(36,`button`,27),H(`click`,function(){return t.timelineView.set(`waterfall`)}),K(37,` Waterfall `),L()(),I(38,`span`,28),K(39),L(),I(40,`span`,29),K(41),L()(),j(42,L0,1,2,`app-network-waterfall`,30)(43,q0,25,5)(44,X0,9,1,`div`,31)(45,Z0,11,0,`div`,13),j(46,e2,21,21,`div`,32),L(),I(47,`section`,33)(48,`h2`,34),K(49,`Fault injection`),L(),j(50,t2,2,1,`p`,35),I(51,`form`,36),H(`submit`,function(e){return t.addRule(e)}),I(52,`label`)(53,`span`),K(54,`URL pattern `),I(55,`span`,37),K(56,`(substring or * glob, ^ anchors the path)`),L()(),I(57,`input`,38),H(`input`,function(e){return t.patch(`pattern`,e)}),L()(),I(58,`div`,39)(59,`div`,40)(60,`span`,41),K(61,`Method`),L(),I(62,`app-select`,42),H(`valueChange`,function(e){return t.setDraft(`method`,e??``)}),L()(),I(63,`div`,40)(64,`span`,43),K(65,`Apply on`),L(),I(66,`app-select`,44),H(`valueChange`,function(e){return t.setDraft(`target`,e??`both`)}),L()()(),I(67,`div`,39)(68,`div`,40)(69,`span`,45),K(70,`Status`),L(),I(71,`app-select`,46),H(`valueChange`,function(e){return t.setDraft(`status`,e??``)}),L()(),I(72,`label`),K(73,` Delay (ms) `),I(74,`input`,47),H(`input`,function(e){return t.patch(`delayMs`,e)}),L()()(),I(75,`label`)(76,`span`),K(77,`Mock JSON body `),I(78,`span`,37),K(79,`(optional)`),L()(),I(80,`textarea`,48),H(`input`,function(e){return t.patch(`body`,e)}),L()(),I(81,`p`,49),K(82),L(),j(83,n2,2,0,`p`,50),I(84,`p`,51),K(85),L(),I(86,`div`,52)(87,`button`,53),K(88,` Add rule `),L()()(),I(89,`h3`,54),K(90),L(),I(91,`ul`,55),N(92,c2,17,17,`li`,56,i0,!1,l2,2,0,`li`,57),L()(),I(95,`section`,58)(96,`h2`,59),K(97,`SSR overrides`),L(),I(98,`p`,60),K(99,` Development only. These change what the server sends for matching pages, from the next full page load, and the request is marked `),I(100,`strong`),K(101,`overridden`),L(),K(102,`. `),L(),I(103,`form`,61),H(`submit`,function(e){return t.addOverride(e)}),I(104,`div`,40)(105,`span`,62),K(106,`Override`),L(),I(107,`app-select`,63),H(`valueChange`,function(e){return t.setOverrideDraft(`kind`,e??`render-error`)}),L()(),I(108,`label`)(109,`span`),K(110,`Page pattern `),I(111,`span`,37),K(112,`(substring or * glob, ^ anchors the path)`),L()(),I(113,`input`,64),H(`input`,function(e){return t.patchOverride(`pattern`,e)}),L()(),j(114,u2,8,1)(115,p2,12,6)(116,m2,11,0,`p`,65),I(117,`div`,52)(118,`button`,53),K(119,` Add override `),L()()(),I(120,`h3`,66),K(121),L(),I(122,`ul`,55),N(123,_2,12,12,`li`,56,i0,!1,v2,2,0,`li`,57),L()(),I(126,`section`,67)(127,`h2`,68),K(128,`Hydration`),L(),j(129,A2,37,14)(130,j2,5,0,`div`,13),L(),I(131,`section`,69)(132,`h2`,70),K(133,`TransferState payload`),L(),j(134,B2,2,1)(135,V2,3,0,`div`,13),L()()),e&2){let e,n,r,i;O(2),M(t.loading()?2:t.failed()?3:-1),O(2),F(`hidden`,t.loading()),O(4),F(`options`,t.pageOptions())(`value`,t.selected()?.pageId??null),O(),F(`disabled`,!t.canWrite()),A(`aria-describedby`,t.canWrite()?null:`http-writes-off`),O(3),q(t.message()),O(),F(`hidden`,t.loading()),O(3),J(`SSR requests (`,t.requests().length,`)`),O(),M(t.requests().length?17:18),O(4),J(`HTTP timeline (`,t.timeline().length,`)`),O(),F(`dropped`,t.droppedCalls())(`max`,t.maxCalls()),O(),G(`no-calls`,!t.timeline().length),O(5),F(`value`,t.callQuery()),O(),F(`options`,t.sideOptions),H_(`value`,t.sideFilter),O(2),F(`checked`,t.failedOnly()),O(3),A(`aria-pressed`,t.timelineView()===`table`),O(2),A(`aria-pressed`,t.timelineView()===`waterfall`),O(3),q(t.countText()),O(2),q(t.filterStatus()),O(),M(t.visibleCalls().length&&t.timelineView()===`waterfall`?42:t.visibleCalls().length?43:t.timeline().length?44:45),O(4),M((e=t.selectedCall())?46:-1,e),O(4),M(t.canWrite()?-1:50),O(7),F(`value`,t.draft().pattern),O(5),F(`options`,t.methodOptions())(`value`,t.draft().method),O(4),F(`describedBy`,t.draftMocksOnServer()?`rule-ssr-note`:``)(`options`,t.targetOptions)(`value`,t.draft().target),O(5),F(`describedBy`,t.draftMocksOnServer()?`rule-ssr-note`:``)(`options`,t.statusOptions)(`value`,t.draft().status),O(3),F(`value`,t.draft().delayMs),O(6),F(`placeholder`,t.bodyPlaceholder)(`value`,t.draft().body),A(`aria-invalid`,t.bodyError()?`true`:null),O(2),q(t.bodyError()),O(),M(t.draftMocksOnServer()?83:-1),O(2),q(t.draftHint()),O(2),F(`disabled`,!t.canWrite()||!t.draftRule()),A(`aria-disabled`,t.addingRule()||null)(`aria-describedby`,t.canWrite()?`rule-hint`:`http-writes-off`),O(3),J(` Rules (`,t.rules().length,`) `),O(2),P(t.rules()),O(15),F(`describedBy`,t.overrideDraft().kind===`state-edit`?``:`override-kind-help`)(`options`,t.overrideKindOptions)(`value`,t.overrideDraft().kind),O(6),F(`value`,t.overrideDraft().pattern),O(),M((n=t.overrideDraft().kind)===`render-error`?114:n===`state-edit`?115:n===`client-render`?116:-1),O(4),F(`disabled`,!t.canWrite()||!t.overrideReady()),A(`aria-disabled`,t.addingOverride()||null)(`aria-describedby`,t.canWrite()?null:`http-writes-off`),O(3),J(` Overrides (`,t.overrides().length,`) `),O(2),P(t.overrides()),O(6),M((r=t.selected()?.hydration)?129:130,r),O(5),M((i=t.selectedPayload())?134:135,i)}},dependencies:[W1,wO,n0,Iz,JD,yy],styles:[`@charset "UTF-8"; .page-intro[_ngcontent-%COMP%] { margin: 0 0 12px; color: var(--%NS%text-2); @@ -16681,7 +16681,7 @@ summary[_ngcontent-%COMP%]:hover .entry-key[_ngcontent-%COMP%] { .message[_ngcontent-%COMP%] { text-align: left; } -}`]})};function r4(e,t){e&1&&(E(),z(0,`svg`,9),Og(1,`path`,20),B())}function i4(e,t){e&1&&(E(),z(0,`svg`,10)(1,`defs`)(2,`linearGradient`,21),Og(3,`stop`,22)(4,`stop`,23),B()(),Og(5,`path`,24),z(6,`g`,25),Og(7,`path`,26)(8,`path`,27)(9,`path`,28)(10,`path`,29),B()())}function a4(e,t){e&1&&(E(),z(0,`svg`,11),Og(1,`path`,30)(2,`path`,31)(3,`path`,32)(4,`path`,33),B())}function o4(e,t){e&1&&(E(),z(0,`svg`,9),Og(1,`path`,34)(2,`path`,35)(3,`path`,36)(4,`path`,37)(5,`path`,38)(6,`path`,39),B())}function s4(e,t){if(e&1&&(z(0,`a`,16)(1,`span`,40)(2,`strong`),K(3),B()(),z(4,`span`,41),K(5,`→`),B(),z(6,`span`,42),K(7,`(opens in a new tab)`),B()()),e&2){let e=t;Pg(`href`,e.href,ku),O(3),q(e.label)}}function c4(e,t){if(e&1&&(z(0,`li`),K(1),B()),e&2){let e=t.$implicit,n=t.$index;y_(`animation-delay`,200+n*120,`ms`),O(),q(e)}}var l4=class e{info=$.required();plansTitle=X(()=>{let e=this.info();return e.plansTitle??(e.link?`In an ${e.name} app`:`On the roadmap`)});static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-coming-soon`]],hostVars:2,hostBindings:function(e,t){e&2&&y_(`--%NS%brand`,t.info().color)},inputs:{info:[1,`info`]},decls:29,vars:6,consts:[[`aria-labelledby`,`soon-title`,1,`soon`],[`aria-hidden`,`true`,1,`stage`],[1,`ring`,`r1`],[1,`ring`,`r2`],[1,`orbit`,`o1`],[1,`dot`],[1,`orbit`,`o2`],[1,`orbit`,`o3`],[1,`logo`],[`viewBox`,`0 0 256 256`,`width`,`96`,`height`,`96`],[`viewBox`,`0 0 32 32`,`width`,`88`,`height`,`88`],[`viewBox`,`0 0 256 182`,`width`,`104`,`height`,`74`],[1,`badge`],[`aria-hidden`,`true`,1,`spark`],[`id`,`soon-title`],[1,`summary`],[`target`,`_blank`,`rel`,`noopener noreferrer`,1,`author`,`cta`,3,`href`],[1,`plans-title`],[1,`plans`],[3,`animation-delay`],[`fill`,`#3c5afd`,`d`,`M237.248 18.752q18.061 18.06 18.748 45.247V192c-.457 18.12-6.707 33.207-18.748 45.247c-12.04 12.04-27.127 18.291-45.251 18.752H63.999q-27.187-.69-45.247-18.752C6.712 225.208.46 210.121 0 192.001V64q.69-27.187 18.752-45.247Q36.812.692 63.999 0h127.998c18.124.46 33.211 6.711 45.251 18.752m-17.655 103q-6.033-6.003-6.28-15.066V64q-.192-9.063-6.221-15.091c-4.02-4.023-9.054-6.093-15.095-6.22h-21.312v106.626L85.315 42.687H63.999c-6.042.128-11.072 2.198-15.091 6.221c-4.023 4.02-6.093 9.05-6.22 15.09v42.688q-.249 9.063-6.281 15.066q-6.03 5.996-15.091 6.246q9.062.255 15.09 6.25c4.024 4.002 6.115 9.024 6.281 15.066V192c.128 6.037 2.198 11.072 6.221 15.091q6.03 6.03 15.09 6.22h21.317V106.687l85.37 106.627h21.312c6.041-.128 11.076-2.202 15.095-6.221s6.093-9.054 6.22-15.09v-42.688q.249-9.063 6.281-15.066q6.03-5.995 15.091-6.25q-9.062-.25-15.09-6.246`],[`id`,`an-hero-grad`,`x1`,`0`,`y1`,`0`,`x2`,`1`,`y2`,`1`],[`offset`,`0`,`stop-color`,`#f0224f`],[`offset`,`1`,`stop-color`,`#c4002d`],[`d`,`M16 0C27.2 0 32 4.8 32 16S27.2 32 16 32 0 27.2 0 16 4.8 0 16 0Z`,`fill`,`url(#an-hero-grad)`],[`transform`,`translate(6.4 6.4) scale(0.8)`,`fill`,`#fff`],[`d`,`M14.8486 0L23.138 16.8551L23.9996 3.99892L14.8486 0Z`],[`d`,`M16.9875 17.7114H7.01272L5.73926 20.627L12.0001 24L18.261 20.627L16.9875 17.7114Z`],[`d`,`M8.72168 13.9298H15.2812L11.9997 6.39575L8.72168 13.9298Z`],[`d`,`M9.15103 0L0 3.99892L0.861556 16.8551L9.15103 0Z`],[`fill`,`#c30f2e`,`d`,`M152.228.001L48.455 181.046H256L152.228 0z`],[`fill`,`#dd0330`,`d`,`M88.314 26.967L0 181.52h176.628L88.315 26.967z`],[`fill`,`#fff`,`d`,`M18.167 135.294h220.236v-2.419H18.167z`],[`fill`,`#fff`,`d`,`M204.38 170.667c-.861 0-1.67-.358-2.348-1.034c-4.045-4.063-4.221-20.586-4.026-45.33c.11-13.521.257-32.043-1.9-33.504c-2.104.873-2.315 16.172-2.451 26.301c-.162 11.785-.327 23.98-2.242 30.189c-.57 1.84-1.306 3.525-2.786 3.39c-2.086-.185-2.76-3.48-4.317-16.478c-.647-5.4-1.317-10.98-2.101-13.14a11 11 0 0 0-.269-.66c-.835 1.889-1.8 7.079-2.47 10.682c-.927 4.976-1.803 9.676-2.9 11.726c-.847 1.575-2.19 3.63-4.067 3.231c-2.558-.537-3.323-5.693-3.552-8.719c0-25.455-3.33-28.417-3.997-28.753l-.107.081l-.162-.036c-2.377 1.038-2.506 9.294-2.627 17.276c-.096 5.856-.198 12.492-1.053 18.701c-1.108 8.05-2.448 9.603-4.115 9.507c-3.838-.262-3.95-13.482-3.95-14.987c0-.472.012-1.028.027-1.642c.074-3.076.205-8.8-1.687-10.604c-.25-.239-.603-.515-.879-.437c-1.347.339-2.745 4.714-3.209 6.153c-.147.457-.265.833-.364 1.09c-.078.214-.177.515-.294.88c-1.02 3.095-2.18 6.183-4.16 6.944c-.732.284-1.498.222-2.216-.183c-.953-.541-1.73-1.646-2.455-3.482c-.397-1.016-.735-2.046-1.082-3.081c-.419-1.263-.85-2.569-1.384-3.808c-.419-.965-1.464-1.4-2.796-1.164c-2.768.494-3.232 3.29-3.622 7.5c-.07.733-.137 1.452-.228 2.128c-.011.198-.501 6.38-.814 8.344c-.865 5.39-2.002 7.512-3.89 7.358c-4.66-.398-6.798-20.836-6.684-29.47c.088-6.592-1.104-9-1.818-9.382c-.074-.034-.189-.096-.46.095c-.843.571-1.594 2.348-1.363 4.215c2.566 20.32.674 43.592-3.96 48.833c-1.46 1.649-3.448 1.627-4.832.236c-4.049-4.064-4.218-20.586-4.026-45.33c.11-13.521.254-32.043-1.9-33.504c-2.105.873-2.311 16.172-2.45 26.301c-.163 11.785-.329 23.98-2.246 30.189c-.57 1.84-1.307 3.525-2.782 3.39c-2.091-.186-2.761-3.48-4.321-16.478c-.649-5.4-1.319-10.98-2.101-13.14c-.1-.273-.189-.49-.27-.66c-.832 1.889-1.796 7.079-2.466 10.682c-.927 4.976-1.803 9.676-2.904 11.726c-.846 1.575-2.19 3.63-4.063 3.231c-2.558-.537-3.324-5.693-3.552-8.719c-.003-25.455-3.33-28.417-3.997-28.753l-.106.081l-.166-.036c-2.374 1.038-2.503 9.293-2.629 17.276c-.091 5.856-.194 12.492-1.048 18.701c-1.107 8.05-2.437 9.618-4.111 9.507c-3.846-.262-3.958-13.482-3.958-14.987c0-.472.016-1.028.03-1.642c.074-3.076.207-8.8-1.685-10.604c-.25-.239-.603-.515-.88-.438c-1.347.34-2.75 4.715-3.206 6.155a47 47 0 0 1-.364 1.09q-.16.432-.298.875c-1.02 3.096-2.18 6.187-4.155 6.95c-.736.282-1.506.22-2.22-.185c-.953-.541-1.734-1.646-2.454-3.482c-.398-1.016-.74-2.046-1.083-3.081c-.42-1.263-.854-2.569-1.387-3.808c-.416-.965-1.465-1.4-2.797-1.164c-3.188.567-3.943 4.52-4.55 9.238l-.106.839l-2.411-.32l.114-.824c.527-4.137 1.328-10.39 6.53-11.31c2.446-.435 4.585.581 5.446 2.583c.578 1.34 1.031 2.695 1.466 4.008c.324.99.654 1.98 1.037 2.959c.674 1.708 1.197 2.15 1.392 2.257c1.218-.38 2.462-4.167 2.873-5.414c.13-.402.24-.732.328-.968c.085-.233.195-.571.328-.98c1.097-3.43 2.474-7.144 4.918-7.762c.747-.191 1.903-.166 3.157 1.035c2.665 2.544 2.525 8.48 2.433 12.41c-.014.59-.028 1.126-.028 1.583c0 6.272.93 10.655 1.64 12.16c.367-.77.998-2.63 1.598-7.007c.831-6.066.938-12.624 1.027-18.41c.161-10.24.275-17.663 3.982-19.408c.552-.339 1.469-.522 2.436-.033c3.586 1.803 5.326 11.885 5.326 30.817c.225 2.926 1.013 6.006 1.66 6.448c.004-.066.53-.39 1.394-2.01c.925-1.718 1.845-6.665 2.655-11.026c1.792-9.614 2.606-12.989 4.726-13.166c1.615-.158 2.362 1.896 2.676 2.76c.883 2.422 1.537 7.888 2.23 13.678c.54 4.49 1.31 10.902 2.094 13.497c.084-.228.18-.5.283-.836c1.815-5.878 1.98-17.887 2.14-29.507c.22-16.14.503-26.139 3.448-28.226a2.44 2.44 0 0 1 2.233-.316c3.448 1.144 3.714 11.254 3.519 35.8c-.14 17.799-.313 39.952 3.323 43.603c.317.32.542.32.622.32c.17 0 .413-.161.67-.452c3.681-4.162 6.01-26.022 3.372-46.927c-.328-2.602.677-5.337 2.392-6.514c.946-.652 2.036-.736 2.978-.232c2.145 1.14 3.187 5.024 3.102 11.546c-.15 11.387 2.584 24.714 4.37 26.842c.282-.471.842-1.763 1.379-5.145c.301-1.87.799-8.153.806-8.216c.09-.71.155-1.398.217-2.097c.369-3.924.82-8.804 5.613-9.654c2.444-.435 4.583.577 5.448 2.583c.577 1.34 1.027 2.695 1.46 4.008c.332.99.664 1.98 1.046 2.959c.67 1.708 1.197 2.15 1.387 2.257c1.218-.38 2.467-4.167 2.875-5.41c.132-.402.243-.737.328-.973c.088-.228.195-.57.324-.979c1.1-3.43 2.477-7.144 4.924-7.762c.74-.191 1.9-.166 3.154 1.035c2.665 2.543 2.526 8.48 2.437 12.41q-.029.792-.033 1.583c0 6.272.931 10.655 1.641 12.16c.365-.77.994-2.63 1.601-7.007c.832-6.066.931-12.624 1.027-18.41c.159-10.24.273-17.663 3.98-19.408c.55-.339 1.467-.522 2.44-.033c3.58 1.803 5.325 11.884 5.325 30.817c.224 2.926 1.012 6.006 1.656 6.448c.008-.066.526-.39 1.399-2.01c.923-1.718 1.84-6.665 2.653-11.026c1.786-9.614 2.602-12.989 4.722-13.166c1.62-.158 2.367 1.896 2.68 2.76c.88 2.422 1.535 7.888 2.233 13.678c.534 4.49 1.304 10.902 2.092 13.497c.08-.228.176-.5.28-.836c1.813-5.878 1.976-17.887 2.138-29.507c.216-16.14.504-26.139 3.448-28.226a2.45 2.45 0 0 1 2.234-.316c3.452 1.144 3.718 11.254 3.52 35.8c-.141 17.799-.314 39.952 3.319 43.603c.324.32.544.32.63.32c.165 0 .408-.161.662-.452c3.687-4.162 6.014-26.022 3.375-46.927c-.342-2.723.43-5.47 1.84-6.526c.71-.537 1.575-.647 2.37-.313c2.054.877 3.445 4.63 4.255 11.484c.339 2.87.641 5.974.931 9.036c.641 6.683 1.509 15.69 2.684 17.67c.36-.46 1.096-1.704 2.19-5.038l2.307.753c-1.696 5.157-3.026 7.1-4.755 6.902c-2.69-.299-3.468-5.734-4.84-20.055c-.29-3.048-.59-6.132-.928-8.989c-1.03-8.74-2.782-9.532-2.801-9.54c-.342.174-1.137 1.992-.842 4.31c2.558 20.32.673 43.597-3.964 48.834c-.747.842-1.587 1.27-2.485 1.27`],[`fill`,`#53b9ff`,`d`,`M39.863 54.115L.311 93.716l60.995 61.179L0 216.385l39.428 39.619l61.43-61.507l61.097 61.068l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m140.517 154.896l-39.658 39.601l61.097 61.069l39.552-39.602z`],[`fill-opacity`,`.2`,`d`,`m140.517 154.896l-39.658 39.601l15.267 15.182z`],[`fill`,`#53b9ff`,`d`,`M194.57 100.985L256 39.478L216.431 0l-61.412 61.384L93.917.311L54.365 39.913L216.01 201.761l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m115.36 100.987l39.659-39.602L93.917.313L54.365 39.914z`],[`fill-opacity`,`.2`,`d`,`m115.359 100.985l39.659-39.601l-15.271-15.186z`],[1,`who`],[`aria-hidden`,`true`,1,`go`],[1,`sr-only`]],template:function(e,t){if(e&1&&(z(0,`section`,0)(1,`div`,1),Og(2,`span`,2)(3,`span`,3),z(4,`span`,4),Og(5,`span`,5),B(),z(6,`span`,6),Og(7,`span`,5),B(),z(8,`span`,7),Og(9,`span`,5),B(),z(10,`div`,8),j(11,r4,2,0,`:svg:svg`,9)(12,i4,11,0,`:svg:svg`,10)(13,a4,5,0,`:svg:svg`,11)(14,o4,7,0,`:svg:svg`,9),B()(),z(15,`p`,12)(16,`span`,13),K(17,`✦`),B(),K(18),B(),z(19,`h2`,14),K(20),B(),z(21,`p`,15),K(22),B(),j(23,s4,8,2,`a`,16),z(24,`h3`,17),K(25),B(),z(26,`ul`,18),N(27,c4,2,3,`li`,19,_g),B()()),e&2){let e,n;O(11),M((e=t.info().id)===`nativescript`?11:e===`angular-native`?12:e===`analog`?13:e===`capacitor`?14:-1),O(7),J(` `,t.info().badge),O(2),q(t.info().heading),O(2),q(t.info().summary),O(),M((n=t.info().link)?23:-1,n),O(2),J(` `,t.plansTitle(),` `),O(2),P(t.info().plans)}},styles:[`[_nghost-%COMP%] { +}`]})};function o4(e,t){e&1&&(E(),z(0,`svg`,9),Og(1,`path`,20),B())}function s4(e,t){e&1&&(E(),z(0,`svg`,10)(1,`defs`)(2,`linearGradient`,21),Og(3,`stop`,22)(4,`stop`,23),B()(),Og(5,`path`,24),z(6,`g`,25),Og(7,`path`,26)(8,`path`,27)(9,`path`,28)(10,`path`,29),B()())}function c4(e,t){e&1&&(E(),z(0,`svg`,11),Og(1,`path`,30)(2,`path`,31)(3,`path`,32)(4,`path`,33),B())}function l4(e,t){e&1&&(E(),z(0,`svg`,9),Og(1,`path`,34)(2,`path`,35)(3,`path`,36)(4,`path`,37)(5,`path`,38)(6,`path`,39),B())}function u4(e,t){if(e&1&&(z(0,`a`,16)(1,`span`,40)(2,`strong`),K(3),B()(),z(4,`span`,41),K(5,`→`),B(),z(6,`span`,42),K(7,`(opens in a new tab)`),B()()),e&2){let e=t;Pg(`href`,e.href,ku),O(3),q(e.label)}}function d4(e,t){if(e&1&&(z(0,`li`),K(1),B()),e&2){let e=t.$implicit,n=t.$index;y_(`animation-delay`,200+n*120,`ms`),O(),q(e)}}var f4=class e{info=$.required();plansTitle=X(()=>{let e=this.info();return e.plansTitle??(e.link?`In an ${e.name} app`:`On the roadmap`)});static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-coming-soon`]],hostVars:2,hostBindings:function(e,t){e&2&&y_(`--%NS%brand`,t.info().color)},inputs:{info:[1,`info`]},decls:29,vars:6,consts:[[`aria-labelledby`,`soon-title`,1,`soon`],[`aria-hidden`,`true`,1,`stage`],[1,`ring`,`r1`],[1,`ring`,`r2`],[1,`orbit`,`o1`],[1,`dot`],[1,`orbit`,`o2`],[1,`orbit`,`o3`],[1,`logo`],[`viewBox`,`0 0 256 256`,`width`,`96`,`height`,`96`],[`viewBox`,`0 0 32 32`,`width`,`88`,`height`,`88`],[`viewBox`,`0 0 256 182`,`width`,`104`,`height`,`74`],[1,`badge`],[`aria-hidden`,`true`,1,`spark`],[`id`,`soon-title`],[1,`summary`],[`target`,`_blank`,`rel`,`noopener noreferrer`,1,`author`,`cta`,3,`href`],[1,`plans-title`],[1,`plans`],[3,`animation-delay`],[`fill`,`#3c5afd`,`d`,`M237.248 18.752q18.061 18.06 18.748 45.247V192c-.457 18.12-6.707 33.207-18.748 45.247c-12.04 12.04-27.127 18.291-45.251 18.752H63.999q-27.187-.69-45.247-18.752C6.712 225.208.46 210.121 0 192.001V64q.69-27.187 18.752-45.247Q36.812.692 63.999 0h127.998c18.124.46 33.211 6.711 45.251 18.752m-17.655 103q-6.033-6.003-6.28-15.066V64q-.192-9.063-6.221-15.091c-4.02-4.023-9.054-6.093-15.095-6.22h-21.312v106.626L85.315 42.687H63.999c-6.042.128-11.072 2.198-15.091 6.221c-4.023 4.02-6.093 9.05-6.22 15.09v42.688q-.249 9.063-6.281 15.066q-6.03 5.996-15.091 6.246q9.062.255 15.09 6.25c4.024 4.002 6.115 9.024 6.281 15.066V192c.128 6.037 2.198 11.072 6.221 15.091q6.03 6.03 15.09 6.22h21.317V106.687l85.37 106.627h21.312c6.041-.128 11.076-2.202 15.095-6.221s6.093-9.054 6.22-15.09v-42.688q.249-9.063 6.281-15.066q6.03-5.995 15.091-6.25q-9.062-.25-15.09-6.246`],[`id`,`an-hero-grad`,`x1`,`0`,`y1`,`0`,`x2`,`1`,`y2`,`1`],[`offset`,`0`,`stop-color`,`#f0224f`],[`offset`,`1`,`stop-color`,`#c4002d`],[`d`,`M16 0C27.2 0 32 4.8 32 16S27.2 32 16 32 0 27.2 0 16 4.8 0 16 0Z`,`fill`,`url(#an-hero-grad)`],[`transform`,`translate(6.4 6.4) scale(0.8)`,`fill`,`#fff`],[`d`,`M14.8486 0L23.138 16.8551L23.9996 3.99892L14.8486 0Z`],[`d`,`M16.9875 17.7114H7.01272L5.73926 20.627L12.0001 24L18.261 20.627L16.9875 17.7114Z`],[`d`,`M8.72168 13.9298H15.2812L11.9997 6.39575L8.72168 13.9298Z`],[`d`,`M9.15103 0L0 3.99892L0.861556 16.8551L9.15103 0Z`],[`fill`,`#c30f2e`,`d`,`M152.228.001L48.455 181.046H256L152.228 0z`],[`fill`,`#dd0330`,`d`,`M88.314 26.967L0 181.52h176.628L88.315 26.967z`],[`fill`,`#fff`,`d`,`M18.167 135.294h220.236v-2.419H18.167z`],[`fill`,`#fff`,`d`,`M204.38 170.667c-.861 0-1.67-.358-2.348-1.034c-4.045-4.063-4.221-20.586-4.026-45.33c.11-13.521.257-32.043-1.9-33.504c-2.104.873-2.315 16.172-2.451 26.301c-.162 11.785-.327 23.98-2.242 30.189c-.57 1.84-1.306 3.525-2.786 3.39c-2.086-.185-2.76-3.48-4.317-16.478c-.647-5.4-1.317-10.98-2.101-13.14a11 11 0 0 0-.269-.66c-.835 1.889-1.8 7.079-2.47 10.682c-.927 4.976-1.803 9.676-2.9 11.726c-.847 1.575-2.19 3.63-4.067 3.231c-2.558-.537-3.323-5.693-3.552-8.719c0-25.455-3.33-28.417-3.997-28.753l-.107.081l-.162-.036c-2.377 1.038-2.506 9.294-2.627 17.276c-.096 5.856-.198 12.492-1.053 18.701c-1.108 8.05-2.448 9.603-4.115 9.507c-3.838-.262-3.95-13.482-3.95-14.987c0-.472.012-1.028.027-1.642c.074-3.076.205-8.8-1.687-10.604c-.25-.239-.603-.515-.879-.437c-1.347.339-2.745 4.714-3.209 6.153c-.147.457-.265.833-.364 1.09c-.078.214-.177.515-.294.88c-1.02 3.095-2.18 6.183-4.16 6.944c-.732.284-1.498.222-2.216-.183c-.953-.541-1.73-1.646-2.455-3.482c-.397-1.016-.735-2.046-1.082-3.081c-.419-1.263-.85-2.569-1.384-3.808c-.419-.965-1.464-1.4-2.796-1.164c-2.768.494-3.232 3.29-3.622 7.5c-.07.733-.137 1.452-.228 2.128c-.011.198-.501 6.38-.814 8.344c-.865 5.39-2.002 7.512-3.89 7.358c-4.66-.398-6.798-20.836-6.684-29.47c.088-6.592-1.104-9-1.818-9.382c-.074-.034-.189-.096-.46.095c-.843.571-1.594 2.348-1.363 4.215c2.566 20.32.674 43.592-3.96 48.833c-1.46 1.649-3.448 1.627-4.832.236c-4.049-4.064-4.218-20.586-4.026-45.33c.11-13.521.254-32.043-1.9-33.504c-2.105.873-2.311 16.172-2.45 26.301c-.163 11.785-.329 23.98-2.246 30.189c-.57 1.84-1.307 3.525-2.782 3.39c-2.091-.186-2.761-3.48-4.321-16.478c-.649-5.4-1.319-10.98-2.101-13.14c-.1-.273-.189-.49-.27-.66c-.832 1.889-1.796 7.079-2.466 10.682c-.927 4.976-1.803 9.676-2.904 11.726c-.846 1.575-2.19 3.63-4.063 3.231c-2.558-.537-3.324-5.693-3.552-8.719c-.003-25.455-3.33-28.417-3.997-28.753l-.106.081l-.166-.036c-2.374 1.038-2.503 9.293-2.629 17.276c-.091 5.856-.194 12.492-1.048 18.701c-1.107 8.05-2.437 9.618-4.111 9.507c-3.846-.262-3.958-13.482-3.958-14.987c0-.472.016-1.028.03-1.642c.074-3.076.207-8.8-1.685-10.604c-.25-.239-.603-.515-.88-.438c-1.347.34-2.75 4.715-3.206 6.155a47 47 0 0 1-.364 1.09q-.16.432-.298.875c-1.02 3.096-2.18 6.187-4.155 6.95c-.736.282-1.506.22-2.22-.185c-.953-.541-1.734-1.646-2.454-3.482c-.398-1.016-.74-2.046-1.083-3.081c-.42-1.263-.854-2.569-1.387-3.808c-.416-.965-1.465-1.4-2.797-1.164c-3.188.567-3.943 4.52-4.55 9.238l-.106.839l-2.411-.32l.114-.824c.527-4.137 1.328-10.39 6.53-11.31c2.446-.435 4.585.581 5.446 2.583c.578 1.34 1.031 2.695 1.466 4.008c.324.99.654 1.98 1.037 2.959c.674 1.708 1.197 2.15 1.392 2.257c1.218-.38 2.462-4.167 2.873-5.414c.13-.402.24-.732.328-.968c.085-.233.195-.571.328-.98c1.097-3.43 2.474-7.144 4.918-7.762c.747-.191 1.903-.166 3.157 1.035c2.665 2.544 2.525 8.48 2.433 12.41c-.014.59-.028 1.126-.028 1.583c0 6.272.93 10.655 1.64 12.16c.367-.77.998-2.63 1.598-7.007c.831-6.066.938-12.624 1.027-18.41c.161-10.24.275-17.663 3.982-19.408c.552-.339 1.469-.522 2.436-.033c3.586 1.803 5.326 11.885 5.326 30.817c.225 2.926 1.013 6.006 1.66 6.448c.004-.066.53-.39 1.394-2.01c.925-1.718 1.845-6.665 2.655-11.026c1.792-9.614 2.606-12.989 4.726-13.166c1.615-.158 2.362 1.896 2.676 2.76c.883 2.422 1.537 7.888 2.23 13.678c.54 4.49 1.31 10.902 2.094 13.497c.084-.228.18-.5.283-.836c1.815-5.878 1.98-17.887 2.14-29.507c.22-16.14.503-26.139 3.448-28.226a2.44 2.44 0 0 1 2.233-.316c3.448 1.144 3.714 11.254 3.519 35.8c-.14 17.799-.313 39.952 3.323 43.603c.317.32.542.32.622.32c.17 0 .413-.161.67-.452c3.681-4.162 6.01-26.022 3.372-46.927c-.328-2.602.677-5.337 2.392-6.514c.946-.652 2.036-.736 2.978-.232c2.145 1.14 3.187 5.024 3.102 11.546c-.15 11.387 2.584 24.714 4.37 26.842c.282-.471.842-1.763 1.379-5.145c.301-1.87.799-8.153.806-8.216c.09-.71.155-1.398.217-2.097c.369-3.924.82-8.804 5.613-9.654c2.444-.435 4.583.577 5.448 2.583c.577 1.34 1.027 2.695 1.46 4.008c.332.99.664 1.98 1.046 2.959c.67 1.708 1.197 2.15 1.387 2.257c1.218-.38 2.467-4.167 2.875-5.41c.132-.402.243-.737.328-.973c.088-.228.195-.57.324-.979c1.1-3.43 2.477-7.144 4.924-7.762c.74-.191 1.9-.166 3.154 1.035c2.665 2.543 2.526 8.48 2.437 12.41q-.029.792-.033 1.583c0 6.272.931 10.655 1.641 12.16c.365-.77.994-2.63 1.601-7.007c.832-6.066.931-12.624 1.027-18.41c.159-10.24.273-17.663 3.98-19.408c.55-.339 1.467-.522 2.44-.033c3.58 1.803 5.325 11.884 5.325 30.817c.224 2.926 1.012 6.006 1.656 6.448c.008-.066.526-.39 1.399-2.01c.923-1.718 1.84-6.665 2.653-11.026c1.786-9.614 2.602-12.989 4.722-13.166c1.62-.158 2.367 1.896 2.68 2.76c.88 2.422 1.535 7.888 2.233 13.678c.534 4.49 1.304 10.902 2.092 13.497c.08-.228.176-.5.28-.836c1.813-5.878 1.976-17.887 2.138-29.507c.216-16.14.504-26.139 3.448-28.226a2.45 2.45 0 0 1 2.234-.316c3.452 1.144 3.718 11.254 3.52 35.8c-.141 17.799-.314 39.952 3.319 43.603c.324.32.544.32.63.32c.165 0 .408-.161.662-.452c3.687-4.162 6.014-26.022 3.375-46.927c-.342-2.723.43-5.47 1.84-6.526c.71-.537 1.575-.647 2.37-.313c2.054.877 3.445 4.63 4.255 11.484c.339 2.87.641 5.974.931 9.036c.641 6.683 1.509 15.69 2.684 17.67c.36-.46 1.096-1.704 2.19-5.038l2.307.753c-1.696 5.157-3.026 7.1-4.755 6.902c-2.69-.299-3.468-5.734-4.84-20.055c-.29-3.048-.59-6.132-.928-8.989c-1.03-8.74-2.782-9.532-2.801-9.54c-.342.174-1.137 1.992-.842 4.31c2.558 20.32.673 43.597-3.964 48.834c-.747.842-1.587 1.27-2.485 1.27`],[`fill`,`#53b9ff`,`d`,`M39.863 54.115L.311 93.716l60.995 61.179L0 216.385l39.428 39.619l61.43-61.507l61.097 61.068l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m140.517 154.896l-39.658 39.601l61.097 61.069l39.552-39.602z`],[`fill-opacity`,`.2`,`d`,`m140.517 154.896l-39.658 39.601l15.267 15.182z`],[`fill`,`#53b9ff`,`d`,`M194.57 100.985L256 39.478L216.431 0l-61.412 61.384L93.917.311L54.365 39.913L216.01 201.761l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m115.36 100.987l39.659-39.602L93.917.313L54.365 39.914z`],[`fill-opacity`,`.2`,`d`,`m115.359 100.985l39.659-39.601l-15.271-15.186z`],[1,`who`],[`aria-hidden`,`true`,1,`go`],[1,`sr-only`]],template:function(e,t){if(e&1&&(z(0,`section`,0)(1,`div`,1),Og(2,`span`,2)(3,`span`,3),z(4,`span`,4),Og(5,`span`,5),B(),z(6,`span`,6),Og(7,`span`,5),B(),z(8,`span`,7),Og(9,`span`,5),B(),z(10,`div`,8),j(11,o4,2,0,`:svg:svg`,9)(12,s4,11,0,`:svg:svg`,10)(13,c4,5,0,`:svg:svg`,11)(14,l4,7,0,`:svg:svg`,9),B()(),z(15,`p`,12)(16,`span`,13),K(17,`✦`),B(),K(18),B(),z(19,`h2`,14),K(20),B(),z(21,`p`,15),K(22),B(),j(23,u4,8,2,`a`,16),z(24,`h3`,17),K(25),B(),z(26,`ul`,18),N(27,d4,2,3,`li`,19,_g),B()()),e&2){let e,n;O(11),M((e=t.info().id)===`nativescript`?11:e===`angular-native`?12:e===`analog`?13:e===`capacitor`?14:-1),O(7),J(` `,t.info().badge),O(2),q(t.info().heading),O(2),q(t.info().summary),O(),M((n=t.info().link)?23:-1,n),O(2),J(` `,t.plansTitle(),` `),O(2),P(t.info().plans)}},styles:[`[_nghost-%COMP%] { display: block; min-height: 100%; background: radial-gradient(60% 50% at 50% 18%, color-mix(in srgb, var(--%NS%brand) 22%, transparent), transparent 70%); @@ -17027,9 +17027,9 @@ h2[_ngcontent-%COMP%] { .author[_ngcontent-%COMP%]:hover .go[_ngcontent-%COMP%] { transform: none; } -}`]})},u4=new Set([`CapacitorCookies`,`CapacitorHttp`,`SystemBars`,`WebView`]);function d4(e){return e==null?`Unknown`:e?`Yes`:`No`}function f4(e,t){let n=t.size?Math.max(...t.values())+1:0;for(let r of e)t.has(r.pageId)||t.set(r.pageId,n++);let r=new Set(e.map(e=>e.pageId));for(let e of t.keys())r.has(e)||t.delete(e);return[...e].sort((e,n)=>t.get(e.pageId)-t.get(n.pageId))}function p4(e,t){let n=[...e].sort((e,t)=>t.reportedAt-e.reportedAt);return e.find(e=>e.pageId===t)?.pageId??n.find(e=>e.info.bridge)?.pageId??n[0]?.pageId??null}var m4=new WeakMap;function h4(e){let t=e.calls;if(Array.isArray(t))return e;let n=m4.get(e);if(!n){let r=Object.values(t??{}).filter(e=>!!e&&typeof e.id==`number`);n={...e,calls:r.sort((e,t)=>e.id-t.id)},m4.set(e,n)}return n}function g4(e){let t=e?.pages;return!t||typeof t!=`object`?[]:Object.values(t).filter(e=>e&&typeof e.pageId==`string`&&!!e.info).map(h4).sort((e,t)=>t.reportedAt-e.reportedAt)}function _4(e){let t=e.error;return!!t&&(t.code===`UNIMPLEMENTED`||/not implemented/i.test(t.message))}function v4(e,t){return e.durationMs===void 0?e.status===`pending`?Math.max(0,t-e.startedAt):0:e.durationMs}function y4(e,t,n){return t===`failed`?e.status===`error`:t===`pending`?e.status===`pending`:t!==`slow`||v4(e,n)>=500}function b4(e){if(e<1e3)return`${Math.max(0,Math.round(e))} ms`;let t=Math.round(e/1e3);if(t<60)return`${t} s`;let n=Math.round(t/60);return n<60?`${n} min`:`${Math.round(n/60)} h`}function x4(e,t){let n=t-e;return n<1e3?`just now`:`${b4(n)} ago`}function S4(e,t){return u4.has(e.name)?null:e.registered===!0&&!e.available?t===`android`||t===`ios`?{before:`Not available on ${t}. Run `,command:`npx cap sync ${t}`,after:`, then run the app again.`}:{before:`Not available here. Run `,command:`npx cap sync`,after:` if it should be native.`}:e.native&&e.registered===!1?{before:`Installed, not imported by the app.`}:null}function C4(e,t){let n=e.info,r=n=>e.calls.filter(e=>y4(e,n,t)).length,i=n.env.capacitorHttp;return{pageId:e.pageId,platform:n.platform,native:n.native,logsCalls:n.bridge||n.webCalls,calls:e.calls.length,failed:r(`failed`),slow:r(`slow`),pending:r(`pending`),capacitorHttp:i===null?`Unknown`:i?`On`:`Off`,hints:n.plugins.filter(e=>S4(e,n.platform)).length}}function w4(e){let t=new Map;for(let n of e){if(n.removed)continue;let e=`${n.plugin} ${n.event}`;t.set(e,(t.get(e)??0)+1)}return t}var T4=/^[A-Za-z_$][\w$]*$/;function E4(e,t=``){if(e===void 0)return`undefined`;if(typeof e!=`object`||!e)return JSON.stringify(e)??String(e);let n=`${t} `;if(Array.isArray(e))return e.length?`[\n${e.map(e=>n+E4(e,n)).join(`, -`)},\n${t}]`:`[]`;let r=Object.entries(e);return r.length?`{\n${r.map(([e,t])=>`${n}${T4.test(e)?e:JSON.stringify(e)}: ${E4(t,n)}`).join(`, -`)},\n${t}}`:`{}`}function D4(e){let t=T4.test(e.plugin)?e.plugin:`Capacitor.Plugins[${JSON.stringify(e.plugin)}]`,n=T4.test(e.method)?`.${e.method}`:`[${JSON.stringify(e.method)}]`,r=e.args===void 0?[]:[E4(e.args)];return e.kind===`callback`&&(r.length||r.push(`{}`),r.push(`(result, error) => {}`)),`await ${t}${n}(${r.join(`, `)});`}function O4(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e,null,2)??`undefined`}catch{return String(e)}}function k4(e,t=120){let n;try{n=JSON.stringify(e)??`undefined`}catch{n=String(e)}return n.length>t?`${n.slice(0,t-1)}…`:n}function A4(e,t){if(e&1){let e=V();z(0,`button`,8),U(`click`,function(){let t=w(e).$implicit;return T(W().tab.set(t))}),K(1),B()}if(e&2){let e=t.$implicit,n=W();Pg(`id`,`cap-tab-`+e),A(`aria-selected`,n.tab()===e)(`aria-controls`,`cap-panel-`+e)(`tabindex`,n.tab()===e?0:-1),O(),J(` `,n.tabLabel(e),` `)}}function j4(e,t){e&1&&(z(0,`p`,9),K(1,`No arguments.`),B())}function M4(e,t){if(e&1&&(z(0,`pre`,10),K(1),B()),e&2){let e=W(2),t=J_(0);O(),q(e.json(t.args))}}function N4(e,t){e&1&&j(0,j4,2,0,`p`,9)(1,M4,2,1,`pre`,10),e&2&&(W(),M(J_(0).args===void 0?0:1))}function P4(e,t){if(e&1&&(z(0,`code`),K(1),B()),e&2){let e=W();O(),q(e.code)}}function F4(e,t){if(e&1&&(z(0,`p`,11),j(1,P4,2,1,`code`),K(2),B()),e&2){let e=t;O(),M(e.code?1:-1),O(),J(` `,e.message,` `)}}function I4(e,t){e&1&&(z(0,`p`,9),K(1,`No answer yet.`),B())}function L4(e,t){if(e&1&&(z(0,`p`,9),K(1),B()),e&2){W(3);let e=J_(0);O(),J(`The latest of `,e.callbacks,` callbacks.`)}}function R4(e,t){e&1&&(z(0,`p`,9),K(1,`Resolved without a value.`),B())}function z4(e,t){if(e&1&&(z(0,`pre`,12),K(1),B()),e&2){let e=W(3),t=J_(0);O(),q(e.json(t.result))}}function B4(e,t){if(e&1&&(j(0,L4,2,1,`p`,9),j(1,R4,2,0,`p`,9)(2,z4,2,1,`pre`,12)),e&2){W(2);let e=J_(0);M(e.callbacks&&e.callbacks>1?0:-1),O(),M(e.result===void 0?1:2)}}function V4(e,t){if(e&1&&j(0,F4,3,2,`p`,11)(1,I4,2,0,`p`,9)(2,B4,3,2),e&2){let e;W();let t=J_(0);M((e=t.error)?0:t.status===`pending`?1:2,e)}}function H4(e,t){if(e&1&&(z(0,`div`)(1,`dt`),K(2,`Callbacks`),B(),z(3,`dd`),K(4),B()()),e&2){W(2);let e=J_(0);O(4),q(e.callbacks??0)}}function U4(e,t){if(e&1&&(z(0,`dl`)(1,`div`)(2,`dt`),K(3,`Started`),B(),z(4,`dd`),K(5),B()(),z(6,`div`)(7,`dt`),K(8,`Finished`),B(),z(9,`dd`),K(10),B()(),z(11,`div`)(12,`dt`),K(13),B(),z(14,`dd`),K(15),B()(),j(16,H4,5,1,`div`),B()),e&2){let e=W(),t=J_(0);O(5),q(e.time(t.startedAt)),O(5),J(` `,t.durationMs===void 0?`Not yet`:e.time(t.startedAt+t.durationMs),` `),O(3),q(t.status===`pending`?`Waiting for`:`Duration`),O(2),q(e.span(e.took(t,e.now()))),O(),M(t.kind===`callback`?16:-1)}}var W4=[`args`,`outcome`,`timing`],G4=class e{call=$.required();now=$.required();announce=bv();host=C(Vl);tab=D(`args`);tabOrder=W4;json=O4;time=vO;span=b4;took=v4;statusText=X(()=>{let e=this.call();return e.status===`pending`?`Pending`:e.status===`ok`?`OK`:_4(e)?`Not implemented`:`Error`});panelHasFocusable=X(()=>{let e=this.call();return this.tab()===`args`?e.args!==void 0:this.tab()===`outcome`&&!e.error&&e.status===`ok`&&e.result!==void 0});tabLabel(e){return e===`args`?`Arguments`:e===`timing`?`Timing`:this.call().status===`error`?`Error`:`Result`}onTabKey(e){let t=W4.indexOf(this.tab()),n;if(e.key===`ArrowRight`)n=(t+1)%W4.length;else if(e.key===`ArrowLeft`)n=(t-1+W4.length)%W4.length;else if(e.key===`Home`)n=0;else if(e.key===`End`)n=W4.length-1;else return;e.preventDefault();let r=W4[n];this.tab.set(r),this.host.nativeElement.querySelector(`#cap-tab-${r}`)?.focus()}async copy(e){let t=this.call(),n=`${t.plugin}.${t.method}()`,r=e===`json`?O4(t):D4(t);try{await navigator.clipboard.writeText(r),this.announce.emit(`Copied ${n} as ${e===`json`?`JSON`:`code`}.`)}catch{this.announce.emit(`The clipboard is not available here.`)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-capacitor-call-detail`]],inputs:{call:[1,`call`],now:[1,`now`]},outputs:{announce:`announce`},decls:19,vars:10,consts:[[`id`,`cap-detail`,`aria-labelledby`,`cap-detail-title`,1,`detail`],[`id`,`cap-detail-title`],[1,`meta`],[1,`actions`],[`type`,`button`,1,`small`,3,`click`],[`role`,`tablist`,`aria-label`,`Call details`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`muted`],[`tabindex`,`0`,`aria-label`,`Arguments`],[1,`error-text`],[`tabindex`,`0`,`aria-label`,`Result`]],template:function(e,t){if(e&1&&(K_(0),z(1,`section`,0)(2,`h3`,1)(3,`code`),K(4),B()(),z(5,`p`,2),K(6),B(),z(7,`div`,3)(8,`button`,4),U(`click`,function(){return t.copy(`json`)}),K(9,`Copy as JSON`),B(),z(10,`button`,4),U(`click`,function(){return t.copy(`code`)}),K(11,`Copy as code`),B()(),z(12,`div`,5),U(`keydown`,function(e){return t.onTabKey(e)}),N(13,A4,2,5,`button`,6,_g),B(),z(15,`div`,7),j(16,N4,2,1)(17,V4,3,1)(18,U4,17,5,`dl`),B()()),e&2){let e,n=q_(t.call());O(4),Y(``,n.plugin,`.`,n.method,`()`),O(2),z_(` `,t.statusText(),`, `,n.via,`, `,n.kind===`callback`?`stream`:`promise`,` `),O(7),P(t.tabOrder),O(2),Pg(`id`,`cap-panel-`+t.tab()),A(`aria-labelledby`,`cap-tab-`+t.tab())(`tabindex`,t.panelHasFocusable()?null:0),O(),M((e=t.tab())===`args`?16:e===`outcome`?17:e===`timing`?18:-1)}},styles:[`.detail[_ngcontent-%COMP%] { +}`]})},p4=new Set([`CapacitorCookies`,`CapacitorHttp`,`SystemBars`,`WebView`]);function m4(e){return e==null?`Unknown`:e?`Yes`:`No`}function h4(e,t){let n=t.size?Math.max(...t.values())+1:0;for(let r of e)t.has(r.pageId)||t.set(r.pageId,n++);let r=new Set(e.map(e=>e.pageId));for(let e of t.keys())r.has(e)||t.delete(e);return[...e].sort((e,n)=>t.get(e.pageId)-t.get(n.pageId))}function g4(e,t){let n=[...e].sort((e,t)=>t.reportedAt-e.reportedAt);return e.find(e=>e.pageId===t)?.pageId??n.find(e=>e.info.bridge)?.pageId??n[0]?.pageId??null}var _4=new WeakMap;function v4(e){let t=e.calls;if(Array.isArray(t))return e;let n=_4.get(e);if(!n){let r=Object.values(t??{}).filter(e=>!!e&&typeof e.id==`number`);n={...e,calls:r.sort((e,t)=>e.id-t.id)},_4.set(e,n)}return n}function y4(e){let t=e?.pages;return!t||typeof t!=`object`?[]:Object.values(t).filter(e=>e&&typeof e.pageId==`string`&&!!e.info).map(v4).sort((e,t)=>t.reportedAt-e.reportedAt)}function b4(e){let t=e.error;return!!t&&(t.code===`UNIMPLEMENTED`||/not implemented/i.test(t.message))}function x4(e,t){return e.durationMs===void 0?e.status===`pending`?Math.max(0,t-e.startedAt):0:e.durationMs}function S4(e,t,n){return t===`failed`?e.status===`error`:t===`pending`?e.status===`pending`:t!==`slow`||x4(e,n)>=500}function C4(e){if(e<1e3)return`${Math.max(0,Math.round(e))} ms`;let t=Math.round(e/1e3);if(t<60)return`${t} s`;let n=Math.round(t/60);return n<60?`${n} min`:`${Math.round(n/60)} h`}function w4(e,t){let n=t-e;return n<1e3?`just now`:`${C4(n)} ago`}function T4(e,t){return p4.has(e.name)?null:e.registered===!0&&!e.available?t===`android`||t===`ios`?{before:`Not available on ${t}. Run `,command:`npx cap sync ${t}`,after:`, then run the app again.`}:{before:`Not available here. Run `,command:`npx cap sync`,after:` if it should be native.`}:e.native&&e.registered===!1?{before:`Installed, not imported by the app.`}:null}function E4(e,t){let n=e.info,r=n=>e.calls.filter(e=>S4(e,n,t)).length,i=n.env.capacitorHttp;return{pageId:e.pageId,platform:n.platform,native:n.native,logsCalls:n.bridge||n.webCalls,calls:e.calls.length,failed:r(`failed`),slow:r(`slow`),pending:r(`pending`),capacitorHttp:i===null?`Unknown`:i?`On`:`Off`,hints:n.plugins.filter(e=>T4(e,n.platform)).length}}function D4(e){let t=new Map;for(let n of e){if(n.removed)continue;let e=`${n.plugin} ${n.event}`;t.set(e,(t.get(e)??0)+1)}return t}var O4=/^[A-Za-z_$][\w$]*$/;function k4(e,t=``){if(e===void 0)return`undefined`;if(typeof e!=`object`||!e)return JSON.stringify(e)??String(e);let n=`${t} `;if(Array.isArray(e))return e.length?`[\n${e.map(e=>n+k4(e,n)).join(`, +`)},\n${t}]`:`[]`;let r=Object.entries(e);return r.length?`{\n${r.map(([e,t])=>`${n}${O4.test(e)?e:JSON.stringify(e)}: ${k4(t,n)}`).join(`, +`)},\n${t}}`:`{}`}function A4(e){let t=O4.test(e.plugin)?e.plugin:`Capacitor.Plugins[${JSON.stringify(e.plugin)}]`,n=O4.test(e.method)?`.${e.method}`:`[${JSON.stringify(e.method)}]`,r=e.args===void 0?[]:[k4(e.args)];return e.kind===`callback`&&(r.length||r.push(`{}`),r.push(`(result, error) => {}`)),`await ${t}${n}(${r.join(`, `)});`}function j4(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e,null,2)??`undefined`}catch{return String(e)}}function M4(e,t=120){let n;try{n=JSON.stringify(e)??`undefined`}catch{n=String(e)}return n.length>t?`${n.slice(0,t-1)}…`:n}function N4(e,t){if(e&1){let e=V();z(0,`button`,8),U(`click`,function(){let t=w(e).$implicit;return T(W().tab.set(t))}),K(1),B()}if(e&2){let e=t.$implicit,n=W();Pg(`id`,`cap-tab-`+e),A(`aria-selected`,n.tab()===e)(`aria-controls`,`cap-panel-`+e)(`tabindex`,n.tab()===e?0:-1),O(),J(` `,n.tabLabel(e),` `)}}function P4(e,t){e&1&&(z(0,`p`,9),K(1,`No arguments.`),B())}function F4(e,t){if(e&1&&(z(0,`pre`,10),K(1),B()),e&2){let e=W(2),t=J_(0);O(),q(e.json(t.args))}}function I4(e,t){e&1&&j(0,P4,2,0,`p`,9)(1,F4,2,1,`pre`,10),e&2&&(W(),M(J_(0).args===void 0?0:1))}function L4(e,t){if(e&1&&(z(0,`code`),K(1),B()),e&2){let e=W();O(),q(e.code)}}function R4(e,t){if(e&1&&(z(0,`p`,11),j(1,L4,2,1,`code`),K(2),B()),e&2){let e=t;O(),M(e.code?1:-1),O(),J(` `,e.message,` `)}}function z4(e,t){e&1&&(z(0,`p`,9),K(1,`No answer yet.`),B())}function B4(e,t){if(e&1&&(z(0,`p`,9),K(1),B()),e&2){W(3);let e=J_(0);O(),J(`The latest of `,e.callbacks,` callbacks.`)}}function V4(e,t){e&1&&(z(0,`p`,9),K(1,`Resolved without a value.`),B())}function H4(e,t){if(e&1&&(z(0,`pre`,12),K(1),B()),e&2){let e=W(3),t=J_(0);O(),q(e.json(t.result))}}function U4(e,t){if(e&1&&(j(0,B4,2,1,`p`,9),j(1,V4,2,0,`p`,9)(2,H4,2,1,`pre`,12)),e&2){W(2);let e=J_(0);M(e.callbacks&&e.callbacks>1?0:-1),O(),M(e.result===void 0?1:2)}}function W4(e,t){if(e&1&&j(0,R4,3,2,`p`,11)(1,z4,2,0,`p`,9)(2,U4,3,2),e&2){let e;W();let t=J_(0);M((e=t.error)?0:t.status===`pending`?1:2,e)}}function G4(e,t){if(e&1&&(z(0,`div`)(1,`dt`),K(2,`Callbacks`),B(),z(3,`dd`),K(4),B()()),e&2){W(2);let e=J_(0);O(4),q(e.callbacks??0)}}function K4(e,t){if(e&1&&(z(0,`dl`)(1,`div`)(2,`dt`),K(3,`Started`),B(),z(4,`dd`),K(5),B()(),z(6,`div`)(7,`dt`),K(8,`Finished`),B(),z(9,`dd`),K(10),B()(),z(11,`div`)(12,`dt`),K(13),B(),z(14,`dd`),K(15),B()(),j(16,G4,5,1,`div`),B()),e&2){let e=W(),t=J_(0);O(5),q(e.time(t.startedAt)),O(5),J(` `,t.durationMs===void 0?`Not yet`:e.time(t.startedAt+t.durationMs),` `),O(3),q(t.status===`pending`?`Waiting for`:`Duration`),O(2),q(e.span(e.took(t,e.now()))),O(),M(t.kind===`callback`?16:-1)}}var q4=[`args`,`outcome`,`timing`],J4=class e{call=$.required();now=$.required();announce=bv();host=C(Vl);tab=D(`args`);tabOrder=q4;json=j4;time=vO;span=C4;took=x4;statusText=X(()=>{let e=this.call();return e.status===`pending`?`Pending`:e.status===`ok`?`OK`:b4(e)?`Not implemented`:`Error`});panelHasFocusable=X(()=>{let e=this.call();return this.tab()===`args`?e.args!==void 0:this.tab()===`outcome`&&!e.error&&e.status===`ok`&&e.result!==void 0});tabLabel(e){return e===`args`?`Arguments`:e===`timing`?`Timing`:this.call().status===`error`?`Error`:`Result`}onTabKey(e){let t=q4.indexOf(this.tab()),n;if(e.key===`ArrowRight`)n=(t+1)%q4.length;else if(e.key===`ArrowLeft`)n=(t-1+q4.length)%q4.length;else if(e.key===`Home`)n=0;else if(e.key===`End`)n=q4.length-1;else return;e.preventDefault();let r=q4[n];this.tab.set(r),this.host.nativeElement.querySelector(`#cap-tab-${r}`)?.focus()}async copy(e){let t=this.call(),n=`${t.plugin}.${t.method}()`,r=e===`json`?j4(t):A4(t);try{await navigator.clipboard.writeText(r),this.announce.emit(`Copied ${n} as ${e===`json`?`JSON`:`code`}.`)}catch{this.announce.emit(`The clipboard is not available here.`)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-capacitor-call-detail`]],inputs:{call:[1,`call`],now:[1,`now`]},outputs:{announce:`announce`},decls:19,vars:10,consts:[[`id`,`cap-detail`,`aria-labelledby`,`cap-detail-title`,1,`detail`],[`id`,`cap-detail-title`],[1,`meta`],[1,`actions`],[`type`,`button`,1,`small`,3,`click`],[`role`,`tablist`,`aria-label`,`Call details`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`muted`],[`tabindex`,`0`,`aria-label`,`Arguments`],[1,`error-text`],[`tabindex`,`0`,`aria-label`,`Result`]],template:function(e,t){if(e&1&&(K_(0),z(1,`section`,0)(2,`h3`,1)(3,`code`),K(4),B()(),z(5,`p`,2),K(6),B(),z(7,`div`,3)(8,`button`,4),U(`click`,function(){return t.copy(`json`)}),K(9,`Copy as JSON`),B(),z(10,`button`,4),U(`click`,function(){return t.copy(`code`)}),K(11,`Copy as code`),B()(),z(12,`div`,5),U(`keydown`,function(e){return t.onTabKey(e)}),N(13,N4,2,5,`button`,6,_g),B(),z(15,`div`,7),j(16,I4,2,1)(17,W4,3,1)(18,K4,17,5,`dl`),B()()),e&2){let e,n=q_(t.call());O(4),Y(``,n.plugin,`.`,n.method,`()`),O(2),z_(` `,t.statusText(),`, `,n.via,`, `,n.kind===`callback`?`stream`:`promise`,` `),O(7),P(t.tabOrder),O(2),Pg(`id`,`cap-panel-`+t.tab()),A(`aria-labelledby`,`cap-tab-`+t.tab())(`tabindex`,t.panelHasFocusable()?null:0),O(),M((e=t.tab())===`args`?16:e===`outcome`?17:e===`timing`?18:-1)}},styles:[`.detail[_ngcontent-%COMP%] { border: 1px solid var(--%NS%border); border-radius: var(--%NS%radius); background: var(--%NS%surface); @@ -17182,7 +17182,7 @@ dd[_ngcontent-%COMP%] { margin: 0; color: var(--%NS%text); font-variant-numeric: tabular-nums; -}`]})},K4=(e,t)=>t.plugin,q4=(e,t)=>t.label;function J4(e,t){if(e&1&&(z(0,`span`,5),K(1),B(),K(2,` `),z(3,`span`,6),K(4,`from `),z(5,`code`),K(6),B(),K(7),B()),e&2){let e=W().$implicit,t=W(2);O(),q(e.value),O(5),q(e.from),O(),J(`, `,t.ago(e.at,t.now()))}}function Y4(e,t){e&1&&(z(0,`span`,4),K(1,`Not reported yet`),B())}function X4(e,t){if(e&1&&(z(0,`div`)(1,`dt`),K(2),B(),z(3,`dd`),j(4,J4,8,3)(5,Y4,2,0,`span`,4),B()()),e&2){let e=t.$implicit;O(2),q(e.label),O(2),M(e.value===null?5:4)}}function Z4(e,t){if(e&1&&(z(0,`article`,2)(1,`h3`,3)(2,`code`),K(3),B()(),z(4,`dl`),N(5,X4,6,2,`div`,null,q4),B()()),e&2){let e=t.$implicit;A(`aria-labelledby`,`cap-state-`+e.plugin),O(),Pg(`id`,`cap-state-`+e.plugin),O(2),q(e.plugin),O(2),P(e.fields)}}function Q4(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function $4(e,t=e=>e){return n=>{let r=Q4(n)?n[e]:void 0;return typeof r==`string`||typeof r==`number`||typeof r==`boolean`?t(String(r)):null}}function e3(e,t,n){return[...e.map(e=>({method:e,read:n})),...t.map(e=>({event:e,read:n}))]}var t3=[{plugin:`Foldable`,fields:[{label:`Fold state`,sources:e3([`getFoldState`],[`foldStateChange`],$4(`state`))},{label:`Posture`,sources:e3([`getFoldState`],[`foldStateChange`],$4(`posture`))},{label:`Hinge orientation`,sources:e3([`getFoldState`],[`foldStateChange`],$4(`hingeOrientation`))},{label:`Hinge angle`,sources:e3([`getHingeAngle`],[`hingeAngleChange`],$4(`angle`,e=>`${e}°`))},{label:`Active display`,sources:e3([`getFoldState`],[`foldStateChange`],$4(`activeDisplay`))},{label:`Size class`,sources:e3([`getSizeClass`],[`sizeClassChange`],e=>{let t=$4(`widthClass`)(e),n=$4(`heightClass`)(e);return!t&&!n?null:[t&&`width ${t}`,n&&`height ${n}`].filter(Boolean).join(`, `)})}]}];function n3(e,t,n){let r=null,i=(e,t,i)=>{if(r&&r.at>=i)return;let a=n.read(e);a!==null&&(r={value:a,from:t,at:i})};if(`method`in n)for(let r of e.calls)r.plugin===t&&r.method===n.method&&r.status===`ok`&&i(r.result,`${n.method}()`,r.startedAt+(r.durationMs??0));else for(let r of e.listeners)r.plugin===t&&r.event===n.event&&r.lastEventAt!==void 0&&r.last!==void 0&&i(r.last,n.event,r.lastEventAt);return r}function r3(e,t=t3){let n=new Set(e.info.plugins.map(e=>e.name));return t.filter(e=>n.has(e.plugin)).map(t=>({plugin:t.plugin,fields:t.fields.map(n=>{let r=null;for(let i of n.sources){let n=n3(e,t.plugin,i);n&&(!r||n.at>r.at)&&(r=n)}let i=r;return{label:n.label,value:i?.value??null,from:i?.from??null,at:i?.at??null}})}))}var i3=class e{cards=$.required();now=$.required();ago=x4;static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-capacitor-state`]],inputs:{cards:[1,`cards`],now:[1,`now`]},decls:5,vars:0,consts:[[1,`lead`],[1,`cards`],[1,`card`],[3,`id`],[1,`missing`],[1,`value`],[1,`source`]],template:function(e,t){e&1&&(z(0,`p`,0),K(1,` Read from the results and events the app already received. The panel calls nothing in the app. `),B(),z(2,`div`,1),N(3,Z4,7,3,`article`,2,K4),B()),e&2&&(O(3),P(t.cards()))},styles:[`[_nghost-%COMP%] { +}`]})},Y4=(e,t)=>t.plugin,X4=(e,t)=>t.label;function Z4(e,t){if(e&1&&(z(0,`span`,5),K(1),B(),K(2,` `),z(3,`span`,6),K(4,`from `),z(5,`code`),K(6),B(),K(7),B()),e&2){let e=W().$implicit,t=W(2);O(),q(e.value),O(5),q(e.from),O(),J(`, `,t.ago(e.at,t.now()))}}function Q4(e,t){e&1&&(z(0,`span`,4),K(1,`Not reported yet`),B())}function $4(e,t){if(e&1&&(z(0,`div`)(1,`dt`),K(2),B(),z(3,`dd`),j(4,Z4,8,3)(5,Q4,2,0,`span`,4),B()()),e&2){let e=t.$implicit;O(2),q(e.label),O(2),M(e.value===null?5:4)}}function e3(e,t){if(e&1&&(z(0,`article`,2)(1,`h3`,3)(2,`code`),K(3),B()(),z(4,`dl`),N(5,$4,6,2,`div`,null,X4),B()()),e&2){let e=t.$implicit;A(`aria-labelledby`,`cap-state-`+e.plugin),O(),Pg(`id`,`cap-state-`+e.plugin),O(2),q(e.plugin),O(2),P(e.fields)}}function t3(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function n3(e,t=e=>e){return n=>{let r=t3(n)?n[e]:void 0;return typeof r==`string`||typeof r==`number`||typeof r==`boolean`?t(String(r)):null}}function r3(e,t,n){return[...e.map(e=>({method:e,read:n})),...t.map(e=>({event:e,read:n}))]}var i3=[{plugin:`Foldable`,fields:[{label:`Fold state`,sources:r3([`getFoldState`],[`foldStateChange`],n3(`state`))},{label:`Posture`,sources:r3([`getFoldState`],[`foldStateChange`],n3(`posture`))},{label:`Hinge orientation`,sources:r3([`getFoldState`],[`foldStateChange`],n3(`hingeOrientation`))},{label:`Hinge angle`,sources:r3([`getHingeAngle`],[`hingeAngleChange`],n3(`angle`,e=>`${e}°`))},{label:`Active display`,sources:r3([`getFoldState`],[`foldStateChange`],n3(`activeDisplay`))},{label:`Size class`,sources:r3([`getSizeClass`],[`sizeClassChange`],e=>{let t=n3(`widthClass`)(e),n=n3(`heightClass`)(e);return!t&&!n?null:[t&&`width ${t}`,n&&`height ${n}`].filter(Boolean).join(`, `)})}]}];function a3(e,t,n){let r=null,i=(e,t,i)=>{if(r&&r.at>=i)return;let a=n.read(e);a!==null&&(r={value:a,from:t,at:i})};if(`method`in n)for(let r of e.calls)r.plugin===t&&r.method===n.method&&r.status===`ok`&&i(r.result,`${n.method}()`,r.startedAt+(r.durationMs??0));else for(let r of e.listeners)r.plugin===t&&r.event===n.event&&r.lastEventAt!==void 0&&r.last!==void 0&&i(r.last,n.event,r.lastEventAt);return r}function o3(e,t=i3){let n=new Set(e.info.plugins.map(e=>e.name));return t.filter(e=>n.has(e.plugin)).map(t=>({plugin:t.plugin,fields:t.fields.map(n=>{let r=null;for(let i of n.sources){let n=a3(e,t.plugin,i);n&&(!r||n.at>r.at)&&(r=n)}let i=r;return{label:n.label,value:i?.value??null,from:i?.from??null,at:i?.at??null}})}))}var s3=class e{cards=$.required();now=$.required();ago=w4;static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-capacitor-state`]],inputs:{cards:[1,`cards`],now:[1,`now`]},decls:5,vars:0,consts:[[1,`lead`],[1,`cards`],[1,`card`],[3,`id`],[1,`missing`],[1,`value`],[1,`source`]],template:function(e,t){e&1&&(z(0,`p`,0),K(1,` Read from the results and events the app already received. The panel calls nothing in the app. `),B(),z(2,`div`,1),N(3,e3,7,3,`article`,2,Y4),B()),e&2&&(O(3),P(t.cards()))},styles:[`[_nghost-%COMP%] { display: block; } @@ -17258,7 +17258,7 @@ dd[_ngcontent-%COMP%] { .missing[_ngcontent-%COMP%] { font-style: italic; -}`]})},a3=(e,t)=>t.filter,o3=(e,t)=>t.id,s3=(e,t)=>t.name;function c3(e,t){e&1&&(I(0,`p`,1),K(1,`Loading Capacitor data…`),L())}function l3(e,t){if(e&1){let e=V();I(0,`div`,2)(1,`p`),K(2,`Can't read the Capacitor data from the devtools server.`),L(),I(3,`button`,3),H(`click`,function(){return w(e),T(W().retry())}),K(4,`Retry`),L()()}}function u3(e,t){if(e&1){let e=V();I(0,`button`,27),H(`click`,function(){let t=w(e).$implicit;return T(W(4).pickFilter(t.filter))}),I(1,`span`,24),K(2),L(),K(3,` `),I(4,`span`,25),K(5),L()()}if(e&2){let e=t.$implicit,n=W(4);A(`data-filter`,e.filter)(`aria-pressed`,n.callFilter()===e.filter),O(2),q(e.label),O(3),q(e.count)}}function d3(e,t){if(e&1&&N(0,u3,6,4,`button`,26,a3),e&2){let e=W();P(W(2).callStats(e))}}function f3(e,t){if(e&1&&(I(0,`span`,23)(1,`span`,24),K(2,`Platform`),L(),K(3,` `),I(4,`span`,25)(5,`code`),K(6),L(),K(7),L()(),j(8,d3,2,0),I(9,`span`,23)(10,`span`,24),K(11,`CapacitorHttp`),L(),K(12,` `),I(13,`span`,25),K(14),L()(),I(15,`span`,23)(16,`span`,24),K(17,`Plugin hints`),L(),K(18,` `),I(19,`span`,25),K(20),L()()),e&2){let e=t;O(6),q(e.platform),O(),J(` `,e.native?`native`:`web`),O(),M(e.logsCalls?8:-1),O(6),q(e.capacitorHttp),O(6),q(e.hints)}}function p3(e,t){if(e&1){let e=V();I(0,`div`,10)(1,`span`,28),K(2,`Page`),L(),I(3,`app-select`,29),H(`valueChange`,function(t){return w(e),T(W(2).selectedPageId.set(t))}),L()()}if(e&2){let e=W(),t=W();O(3),F(`options`,t.pageOptions())(`value`,e.pageId)}}function m3(e,t){if(e&1&&(I(0,`section`,12)(1,`h2`,30),K(2,`Plugin state`),L(),R(3,`app-capacitor-state`,31),L()),e&2){let e=W(2);O(3),F(`cards`,e.stateCards())(`now`,e.now())}}function h3(e,t){if(e&1&&(I(0,`p`,15),K(1,` Plugin calls aren't shown on this page. Native calls are logged on iOS and Android, where plugins go through the native bridge. To log calls a web implementation answers, load `),I(2,`code`),K(3,`@pangular-inspector/devtools/capacitor-hook`),L(),K(4,` before `),I(5,`code`),K(6,`@capacitor/core`),L(),K(7,`. `),I(8,`a`,32),K(9,`How to log web calls`),I(10,`span`,6),K(11,` (opens in a new tab)`),L()()()),e&2){let e=W(2);O(8),F(`href`,e.guideUrl,ku)}}function g3(e,t){if(e&1&&(I(0,`p`,15),K(1,` Only native calls are logged. Calls a web implementation answers are left out. `),I(2,`a`,32),K(3,`How to log them too`),I(4,`span`,6),K(5,` (opens in a new tab)`),L()()()),e&2){let e=W(3);O(2),F(`href`,e.guideUrl,ku)}}function _3(e,t){e&1&&(I(0,`p`,18),K(1,`No plugin calls yet. Use the app and they show up here.`),L())}function v3(e,t){if(e&1){let e=V();I(0,`div`,18)(1,`p`),K(2,`No call matches the filters.`),L(),I(3,`p`,43),K(4),L(),I(5,`button`,3),H(`click`,function(){w(e),W();let t=Qg(7);return W(2).clearFilters(),T(t.focus())}),K(6,` Clear filters `),L()()}if(e&2){let e=W(2),t=W();O(4),z_(` `,e.calls.length,` `,e.calls.length===1?`call is`:`calls are`,` hidden by `,t.hiddenBy(),`. `)}}function y3(e,t){e&1&&(E(),R(0,`path`,50))}function b3(e,t){e&1&&(E(),R(0,`circle`,55)(1,`path`,56))}function x3(e,t){e&1&&(E(),R(0,`circle`,55)(1,`path`,57))}function S3(e,t){e&1&&(E(),R(0,`circle`,55)(1,`path`,58))}function C3(e,t){e&1&&(I(0,`span`,51),K(1,`stream`),L())}function w3(e,t){if(e&1){let e=V();I(0,`li`)(1,`button`,46),H(`focus`,function(){let t=w(e).$implicit;return T(W(4).focusedCallId.set(t.id))})(`click`,function(){let t=w(e).$implicit;return T(W(4).select(t.id))}),I(2,`code`,47),K(3),L(),I(4,`span`,48),E(),I(5,`svg`,49),j(6,y3,1,0,`:svg:path`,50)(7,b3,2,0)(8,x3,2,0)(9,S3,2,0),L(),K(10),L(),j(11,C3,2,0,`span`,51),bs(),I(12,`span`,52)(13,`span`,53),R(14,`span`),L(),K(15),L(),I(16,`span`,51),K(17),L(),I(18,`time`,54),K(19),L()()()}if(e&2){let e,n=t.$implicit,r=W(4);O(),G(`selected`,r.selected()?.id===n.id),A(`aria-pressed`,r.selected()?.id===n.id)(`tabindex`,r.tabStop()===n.id?0:-1),O(2),Y(``,n.plugin,`.`,n.method,`()`),O(),A(`data-tone`,r.tone(n)),O(2),M((e=r.tone(n))===`ok`?6:e===`danger`?7:e===`warn`?8:9),O(4),J(` `,r.statusLabel(n),` `),O(),M(n.kind===`callback`?11:-1),O(3),y_(`width`,r.barWidth(n),`%`),O(),J(` `,r.durationText(n),` `),O(2),q(n.via),O(2),q(r.time(n.startedAt))}}function T3(e,t){if(e&1){let e=V();I(0,`app-capacitor-call-detail`,59),H(`announce`,function(t){return w(e),T(W(4).announce(t))}),L()}if(e&2){let e=W(4);F(`call`,t)(`now`,e.now())}}function E3(e,t){if(e&1){let e=V();I(0,`div`,42)(1,`ol`,44),H(`keydown`,function(t){return w(e),T(W(3).onListKey(t))}),N(2,w3,20,15,`li`,null,o3),L(),j(4,T3,1,2,`app-capacitor-call-detail`,45),L()}if(e&2){let e,t=W(3);O(2),P(t.shownCalls()),O(2),M((e=t.selected())?4:-1,e)}}function D3(e,t){if(e&1){let e=V();j(0,g3,6,1,`p`,15),I(1,`div`,33)(2,`div`,34),E(),I(3,`svg`,35),R(4,`circle`,36)(5,`path`,37),L(),bs(),I(6,`input`,38,0),H(`input`,function(t){return w(e),T(W(2).setSearch(t.target.value))})(`keydown.escape`,function(){return w(e),T(W(2).setSearch(``))}),L()(),I(8,`app-select`,39),H(`valueChange`,function(t){return w(e),T(W(2).setFilter(t))}),L(),I(9,`span`,40),K(10),L()(),R(11,`app-limit-note`,41),j(12,_3,2,0,`p`,18)(13,v3,7,3,`div`,18)(14,E3,5,1,`div`,42)}if(e&2){let e=W(),t=W();M(e.info.webCalls?-1:0),O(6),F(`value`,t.filter()),O(2),F(`options`,t.filterOptions)(`value`,t.callFilter()),O(2),Y(``,t.shownCalls().length,` of `,e.calls.length,` calls`),O(),F(`dropped`,e.dropped)(`max`,t.maxCalls()),O(),M(e.calls.length?t.shownCalls().length?14:13:12)}}function O3(e,t){e&1&&(I(0,`p`,18),K(1,`No plugins are registered or installed.`),L())}function k3(e,t){if(e&1&&(I(0,`code`),K(1),L()),e&2){let e=W();O(),q(e.command)}}function A3(e,t){if(e&1){let e=V();I(0,`button`,65),H(`click`,function(){w(e);let t=W();return T(W(4).copyCommand(t.command))}),K(1,` Copy `),L()}e&2&&A(`aria-label`,`Copy `+W().command)}function j3(e,t){if(e&1&&(I(0,`span`,63),K(1),j(2,k3,2,1,`code`),K(3),L(),j(4,A3,2,1,`button`,64)),e&2){let e=t;O(),q(e.before),O(),M(e.command?2:-1),O(),q(e.after),O(),M(e.command?4:-1)}}function M3(e,t){if(e&1&&(I(0,`tr`)(1,`th`,61)(2,`code`),K(3),L()(),I(4,`td`),K(5),L(),I(6,`td`),K(7),L(),I(8,`td`),K(9),L(),I(10,`td`,62),j(11,j3,5,4),L()()),e&2){let e,n=t.$implicit,r=W(2),i=W();O(3),q(n.name),O(2),q(n.available?`Yes`:`No`),O(2),q(i.yesNo(n.registered)),O(2),q(n.native?`Yes`:`No`),O(2),M((e=i.pluginHint(n,r.info.platform))?11:-1,e)}}function N3(e,t){if(e&1&&(I(0,`div`,19)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,60),K(5,`Plugin`),L(),I(6,`th`,60),K(7,`Available`),L(),I(8,`th`,60),K(9,`Imported`),L(),I(10,`th`,60),K(11,`Native`),L(),I(12,`th`,60),K(13,`Note`),L()()(),I(14,`tbody`),N(15,M3,12,5,`tr`,null,s3),L()()()),e&2){let e=W();O(15),P(e.info.plugins)}}function P3(e,t){e&1&&(I(0,`p`,18),K(1,`No plugin listeners. They show up when the app calls addListener.`),L())}function F3(e,t){if(e&1&&(I(0,`code`,68),K(1),L()),e&2){let e=W(2).$implicit,t=W(3);O(),q(t.preview(e.last))}}function I3(e,t){e&1&&(I(0,`span`,68),K(1,`No data`),L())}function L3(e,t){if(e&1&&(j(0,F3,2,1,`code`,68)(1,I3,2,0,`span`,68),I(2,`span`,43),K(3),L()),e&2){let e=W().$implicit,t=W(3);M(+(e.last===void 0)),O(3),J(`at `,t.time(e.lastEventAt))}}function R3(e,t){e&1&&K(0,` None yet `)}function z3(e,t){if(e&1&&(I(0,`span`,67),E(),I(1,`svg`,49),R(2,`path`,69)(3,`path`,70),L(),K(4),L()),e&2){let e=W().$implicit,t=W(3);O(4),J(` `,t.leakCount(e),` active listeners: possible leak `)}}function B3(e,t){if(e&1&&(I(0,`tr`)(1,`th`,61)(2,`code`),K(3),L()(),I(4,`td`)(5,`code`),K(6),L()(),I(7,`td`),K(8),L(),I(9,`td`,66),j(10,L3,4,2)(11,R3,1,0),L(),I(12,`td`),K(13),j(14,z3,5,1,`span`,67),L()()),e&2){let e=t.$implicit,n=W(3);O(3),q(e.plugin),O(3),q(e.event),O(2),q(e.events),O(2),M(e.lastEventAt?10:11),O(3),J(` `,e.removed?`Removed`:`Active`,` `),O(),M(!e.removed&&n.leakCount(e)>1?14:-1)}}function V3(e,t){if(e&1&&(I(0,`div`,22)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,60),K(5,`Plugin`),L(),I(6,`th`,60),K(7,`Event`),L(),I(8,`th`,60),K(9,`Events`),L(),I(10,`th`,60),K(11,`Last event`),L(),I(12,`th`,60),K(13,`State`),L()()(),I(14,`tbody`),N(15,B3,15,6,`tr`,null,o3),L()()()),e&2){let e=W();O(15),P(e.listeners)}}function H3(e,t){if(e&1&&(I(0,`p`,4),K(1,` Plugin calls, plugins and listeners of a Capacitor app, as its WebView reports them. Values are masked like other live data. `),L(),I(2,`div`,5),j(3,f3,21,5),I(4,`span`,6),K(5),L()(),I(6,`section`,7)(7,`div`,8)(8,`h2`,9),K(9,`Environment`),L(),j(10,p3,4,2,`div`,10),L(),I(11,`dl`)(12,`div`)(13,`dt`),K(14,`Platform`),L(),I(15,`dd`)(16,`code`),K(17),L(),K(18),L()(),I(19,`div`)(20,`dt`),K(21,`Server URL`),L(),I(22,`dd`)(23,`code`),K(24),L()()(),I(25,`div`)(26,`dt`),K(27,`CapacitorHttp`),L(),I(28,`dd`),K(29),L()(),I(30,`div`)(31,`dt`),K(32,`Calls logged`),L(),I(33,`dd`),K(34),L()(),I(35,`div`,11)(36,`dt`),K(37,`User agent`),L(),I(38,`dd`)(39,`code`),K(40),L()()()()(),j(41,m3,4,2,`section`,12),I(42,`section`,13)(43,`h2`,14),K(44,`Plugin calls`),L(),j(45,h3,12,1,`p`,15)(46,D3,15,9),L(),I(47,`section`,16)(48,`h2`,17),K(49,`Plugins`),L(),j(50,O3,2,0,`p`,18)(51,N3,17,0,`div`,19),L(),I(52,`section`,20)(53,`h2`,21),K(54,`Listeners`),L(),j(55,P3,2,0,`p`,18)(56,V3,17,0,`div`,22),L()),e&2){let e,n=t,r=W();O(3),M((e=r.summary())?3:-1,e),O(2),q(r.message()),O(5),M(r.pageOptions().length>1?10:-1),O(7),q(n.info.platform),O(),J(` (`,n.info.native?`native`:`web`,`) `),O(6),q(n.info.env.serverUrl||`none`),O(5),J(` `,n.info.env.capacitorHttp===null?`Unknown`:n.info.env.capacitorHttp?`On`:`Off`,` `),O(5),q(r.loggedLabel()),O(6),q(n.info.env.userAgent||`unknown`),O(),M(r.stateCards().length?41:-1),O(4),M(!n.info.bridge&&!n.info.webCalls?45:46),O(5),M(n.info.plugins.length?51:50),O(5),M(n.listeners.length?56:55)}}function U3(e,t){e&1&&(I(0,`p`,1),K(1,` No Capacitor app reports to this server. Start the overlay in the app, then use it. `),L())}var W3=`https://pangular-inspector.dev/inspectors/capacitor/#web-calls`,G3=2e3,K3={all:`All calls`,failed:`Failed`,slow:`Slow (500 ms or more)`,pending:`Pending`},q3=class e{rpc=$(null);destroyRef=C(As);host=C(Vl);injector=C(Os);seen=new Map;hostPageId=XT();unsubscribe;time=vO;preview=k4;pluginHint=S4;guideUrl=W3;yesNo=d4;filterOptions=Object.keys(K3).map(e=>({value:e,label:K3[e]}));pages=D([]);loaded=D(!1);failed=D(!1);selectedPageId=Q({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:p4(e,this.hostPageId)});selectedCallId=D(null);focusedCallId=D(null);filter=D(``);callFilter=D(`all`);now=D(Date.now());message=D(``);page=X(()=>{let e=this.selectedPageId();return this.pages().find(t=>t.pageId===e)??null});pageOptions=X(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.info.platform})));maxCalls=X(()=>_E(this.rpc()).limits.capacitorCalls);loggedLabel=X(()=>{let e=this.page()?.info;return e?e.bridge&&e.webCalls?`Native and web`:e.bridge?`Native only`:e.webCalls?`Web only`:`None on this platform`:``});shownCalls=X(()=>{let e=this.page();if(!e)return[];let t=this.filter().trim().toLowerCase(),n=this.callFilter(),r=n===`slow`?this.now():0;return[...e.calls].filter(e=>y4(e,n,r)).filter(e=>!t||`${e.plugin}.${e.method}`.toLowerCase().includes(t)).sort((e,t)=>t.startedAt-e.startedAt)});selected=X(()=>this.shownCalls().find(e=>e.id===this.selectedCallId())??null);tabStop=X(()=>{let e=this.shownCalls();for(let t of[this.focusedCallId(),this.selectedCallId()])if(t!==null&&e.some(e=>e.id===t))return t;return e[0]?.id??null});slowest=X(()=>{let e=this.now();return Math.max(1,...this.shownCalls().map(t=>v4(t,e)))});hiddenBy=X(()=>{let e=[],t=this.filter().trim();return t&&e.push(`the search “${t}”`),this.callFilter()!==`all`&&e.push(`the ${K3[this.callFilter()]} filter`),e.join(` and `)});stateCards=X(()=>{let e=this.page();return e?r3(e):[]});leaks=X(()=>w4(this.page()?.listeners??[]));liveSummary=X(()=>{let e=this.page();return e?C4(e,this.now()):null});summary=D(null);summaryShownAt=0;summaryTimer;messageFlip=!1;constructor(){_c(()=>{let e=this.rpc();e&&this.load(e)}),_c(()=>{let e=this.liveSummary();Z(()=>this.queueSummary(e))});let e=setInterval(()=>this.now.set(Date.now()),1e3);this.destroyRef.onDestroy(()=>{clearInterval(e),clearTimeout(this.summaryTimer),this.unsubscribe?.()})}retry(){let e=this.rpc();e&&this.load(e)}callStats(e){return[{filter:`all`,label:`Calls`,count:e.calls},{filter:`failed`,label:`Failed`,count:e.failed},{filter:`slow`,label:`Slow, 500 ms+`,count:e.slow},{filter:`pending`,label:`Pending`,count:e.pending}]}select(e){this.selectedCallId.set(e),ud(()=>{globalThis.matchMedia?.(`(max-width: 880px)`).matches&&this.host.nativeElement.querySelector(`#cap-detail`)?.scrollIntoView?.({block:`nearest`})},{injector:this.injector})}onListKey(e){if(![`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key))return;let t=Array.from(this.host.nativeElement.querySelectorAll(`[data-cap-call]`));if(!t.length)return;let n=t.indexOf(document.activeElement),r=n;r=e.key===`ArrowDown`?Math.min(n+1,t.length-1):e.key===`ArrowUp`?Math.max(n-1,0):e.key===`Home`?0:t.length-1,e.preventDefault(),t[r]?.focus()}setSearch(e){e!==this.filter()&&(this.filter.set(e),this.announceCount())}setFilter(e){e!==this.callFilter()&&(this.callFilter.set(e),this.announceCount())}pickFilter(e){this.setFilter(this.callFilter()===e?`all`:e)}clearFilters(){this.filter.set(``),this.callFilter.set(`all`),this.announceCount()}announce(e){this.messageFlip=!this.messageFlip,this.message.set(this.messageFlip?`${e} `:e)}async copyCommand(e){try{await navigator.clipboard.writeText(e),this.announce(`Copied ${e}.`)}catch{this.announce(`The clipboard is not available here.`)}}leakCount(e){return this.leaks().get(`${e.plugin} ${e.event}`)??0}tone(e){return e.status===`pending`?`accent`:e.status===`ok`?`ok`:_4(e)?`warn`:`danger`}statusLabel(e){return e.status===`pending`?`Pending`:e.status===`ok`?`OK`:_4(e)?`Not implemented`:`Error`}durationText(e){return e.status===`pending`?`waiting ${b4(v4(e,this.now()))}`:e.durationMs===void 0?``:`${Math.round(e.durationMs)} ms`}barWidth(e){return Math.min(100,v4(e,this.now())/this.slowest()*100)}announceCount(){let e=this.page();e&&this.announce(`${this.shownCalls().length} of ${e.calls.length} calls shown`)}queueSummary(e){let t=this.summary();if(JSON.stringify(e)===JSON.stringify(t))return;clearTimeout(this.summaryTimer),this.summaryTimer=void 0;let n=this.summaryShownAt+G3-Date.now();if(!t||!e||e.pageId!==t.pageId||n<=0){this.summary.set(e),this.summaryShownAt=Date.now();return}this.summaryTimer=setTimeout(()=>{this.summaryTimer=void 0,this.summary.set(this.liveSummary()),this.summaryShownAt=Date.now()},n)}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`capacitor`);if(this.destroyRef.destroyed)return;let n=e=>this.pages.set(f4(g4(e),this.seen));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-capacitor-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`intro`],[`role`,`status`,`aria-label`,`Capacitor summary`,`aria-atomic`,`false`,1,`strip`],[1,`sr-only`],[`aria-labelledby`,`cap-env-title`,1,`env`],[1,`env-head`],[`id`,`cap-env-title`],[1,`page-picker`],[1,`wide`],[`aria-labelledby`,`cap-state-title`],[`aria-labelledby`,`cap-calls-title`],[`id`,`cap-calls-title`],[1,`notice`],[`aria-labelledby`,`cap-plugins-title`],[`id`,`cap-plugins-title`],[1,`empty`],[`tabindex`,`0`,`role`,`group`,`aria-label`,`Plugins table`,1,`table-wrap`],[`aria-labelledby`,`cap-listeners-title`],[`id`,`cap-listeners-title`],[`tabindex`,`0`,`role`,`group`,`aria-label`,`Listeners table`,1,`table-wrap`],[`aria-atomic`,`true`,1,`stat`],[1,`stat-label`],[1,`stat-value`],[`type`,`button`,`aria-atomic`,`true`,1,`stat`],[`type`,`button`,`aria-atomic`,`true`,1,`stat`,3,`click`],[`id`,`cap-page-label`,1,`label-key`],[`labelledBy`,`cap-page-label`,3,`valueChange`,`options`,`value`],[`id`,`cap-state-title`],[3,`cards`,`now`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`toolbar`],[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 calls by plugin or method`,`placeholder`,`Filter by plugin or method`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Show calls`,1,`show`,3,`valueChange`,`options`,`value`],[1,`count`],[`what`,`plugin calls`,`limit`,`capacitorCalls`,3,`dropped`,`max`],[1,`split`],[1,`muted`],[`aria-label`,`Plugin calls, newest first`,1,`calls`,3,`keydown`],[3,`call`,`now`],[`type`,`button`,`data-cap-call`,``,1,`call`,3,`focus`,`click`],[1,`name`],[1,`chip`,`status`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M20 6 9 17l-5-5`],[1,`chip`,`via`],[1,`duration`],[`aria-hidden`,`true`,1,`bar`],[1,`when`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`m15 9-6 6M9 9l6 6`],[`d`,`M5.6 5.6l12.8 12.8`],[`d`,`M12 7v5l3 2`],[3,`announce`,`call`,`now`],[`scope`,`col`],[`scope`,`row`],[1,`note`],[1,`hint`],[`type`,`button`,1,`copy`],[`type`,`button`,1,`copy`,3,`click`],[1,`last`],[`data-tone`,`warn`,1,`chip`,`leak`],[1,`payload`],[`d`,`M12 3 2 21h20z`],[`d`,`M12 10v4M12 17.5v.01`]],template:function(e,t){if(e&1&&j(0,c3,2,0,`p`,1)(1,l3,5,0,`div`,2)(2,H3,57,13)(3,U3,2,0,`p`,1),e&2){let e;M(t.loaded()?t.failed()?1:(e=t.page())?2:3:0,e)}},dependencies:[wO,JD,G4,i3],styles:[`[_nghost-%COMP%] { +}`]})},c3=(e,t)=>t.filter,l3=(e,t)=>t.id,u3=(e,t)=>t.name;function d3(e,t){e&1&&(I(0,`p`,1),K(1,`Loading Capacitor data…`),L())}function f3(e,t){if(e&1){let e=V();I(0,`div`,2)(1,`p`),K(2,`Can't read the Capacitor data from the devtools server.`),L(),I(3,`button`,3),H(`click`,function(){return w(e),T(W().retry())}),K(4,`Retry`),L()()}}function p3(e,t){if(e&1){let e=V();I(0,`button`,27),H(`click`,function(){let t=w(e).$implicit;return T(W(4).pickFilter(t.filter))}),I(1,`span`,24),K(2),L(),K(3,` `),I(4,`span`,25),K(5),L()()}if(e&2){let e=t.$implicit,n=W(4);A(`data-filter`,e.filter)(`aria-pressed`,n.callFilter()===e.filter),O(2),q(e.label),O(3),q(e.count)}}function m3(e,t){if(e&1&&N(0,p3,6,4,`button`,26,c3),e&2){let e=W();P(W(2).callStats(e))}}function h3(e,t){if(e&1&&(I(0,`span`,23)(1,`span`,24),K(2,`Platform`),L(),K(3,` `),I(4,`span`,25)(5,`code`),K(6),L(),K(7),L()(),j(8,m3,2,0),I(9,`span`,23)(10,`span`,24),K(11,`CapacitorHttp`),L(),K(12,` `),I(13,`span`,25),K(14),L()(),I(15,`span`,23)(16,`span`,24),K(17,`Plugin hints`),L(),K(18,` `),I(19,`span`,25),K(20),L()()),e&2){let e=t;O(6),q(e.platform),O(),J(` `,e.native?`native`:`web`),O(),M(e.logsCalls?8:-1),O(6),q(e.capacitorHttp),O(6),q(e.hints)}}function g3(e,t){if(e&1){let e=V();I(0,`div`,10)(1,`span`,28),K(2,`Page`),L(),I(3,`app-select`,29),H(`valueChange`,function(t){return w(e),T(W(2).selectedPageId.set(t))}),L()()}if(e&2){let e=W(),t=W();O(3),F(`options`,t.pageOptions())(`value`,e.pageId)}}function _3(e,t){if(e&1&&(I(0,`section`,12)(1,`h2`,30),K(2,`Plugin state`),L(),R(3,`app-capacitor-state`,31),L()),e&2){let e=W(2);O(3),F(`cards`,e.stateCards())(`now`,e.now())}}function v3(e,t){if(e&1&&(I(0,`p`,15),K(1,` Plugin calls aren't shown on this page. Native calls are logged on iOS and Android, where plugins go through the native bridge. To log calls a web implementation answers, load `),I(2,`code`),K(3,`@pangular-inspector/devtools/capacitor-hook`),L(),K(4,` before `),I(5,`code`),K(6,`@capacitor/core`),L(),K(7,`. `),I(8,`a`,32),K(9,`How to log web calls`),I(10,`span`,6),K(11,` (opens in a new tab)`),L()()()),e&2){let e=W(2);O(8),F(`href`,e.guideUrl,ku)}}function y3(e,t){if(e&1&&(I(0,`p`,15),K(1,` Only native calls are logged. Calls a web implementation answers are left out. `),I(2,`a`,32),K(3,`How to log them too`),I(4,`span`,6),K(5,` (opens in a new tab)`),L()()()),e&2){let e=W(3);O(2),F(`href`,e.guideUrl,ku)}}function b3(e,t){e&1&&(I(0,`p`,18),K(1,`No plugin calls yet. Use the app and they show up here.`),L())}function x3(e,t){if(e&1){let e=V();I(0,`div`,18)(1,`p`),K(2,`No call matches the filters.`),L(),I(3,`p`,43),K(4),L(),I(5,`button`,3),H(`click`,function(){w(e),W();let t=Qg(7);return W(2).clearFilters(),T(t.focus())}),K(6,` Clear filters `),L()()}if(e&2){let e=W(2),t=W();O(4),z_(` `,e.calls.length,` `,e.calls.length===1?`call is`:`calls are`,` hidden by `,t.hiddenBy(),`. `)}}function S3(e,t){e&1&&(E(),R(0,`path`,50))}function C3(e,t){e&1&&(E(),R(0,`circle`,55)(1,`path`,56))}function w3(e,t){e&1&&(E(),R(0,`circle`,55)(1,`path`,57))}function T3(e,t){e&1&&(E(),R(0,`circle`,55)(1,`path`,58))}function E3(e,t){e&1&&(I(0,`span`,51),K(1,`stream`),L())}function D3(e,t){if(e&1){let e=V();I(0,`li`)(1,`button`,46),H(`focus`,function(){let t=w(e).$implicit;return T(W(4).focusedCallId.set(t.id))})(`click`,function(){let t=w(e).$implicit;return T(W(4).select(t.id))}),I(2,`code`,47),K(3),L(),I(4,`span`,48),E(),I(5,`svg`,49),j(6,S3,1,0,`:svg:path`,50)(7,C3,2,0)(8,w3,2,0)(9,T3,2,0),L(),K(10),L(),j(11,E3,2,0,`span`,51),bs(),I(12,`span`,52)(13,`span`,53),R(14,`span`),L(),K(15),L(),I(16,`span`,51),K(17),L(),I(18,`time`,54),K(19),L()()()}if(e&2){let e,n=t.$implicit,r=W(4);O(),G(`selected`,r.selected()?.id===n.id),A(`aria-pressed`,r.selected()?.id===n.id)(`tabindex`,r.tabStop()===n.id?0:-1),O(2),Y(``,n.plugin,`.`,n.method,`()`),O(),A(`data-tone`,r.tone(n)),O(2),M((e=r.tone(n))===`ok`?6:e===`danger`?7:e===`warn`?8:9),O(4),J(` `,r.statusLabel(n),` `),O(),M(n.kind===`callback`?11:-1),O(3),y_(`width`,r.barWidth(n),`%`),O(),J(` `,r.durationText(n),` `),O(2),q(n.via),O(2),q(r.time(n.startedAt))}}function O3(e,t){if(e&1){let e=V();I(0,`app-capacitor-call-detail`,59),H(`announce`,function(t){return w(e),T(W(4).announce(t))}),L()}if(e&2){let e=W(4);F(`call`,t)(`now`,e.now())}}function k3(e,t){if(e&1){let e=V();I(0,`div`,42)(1,`ol`,44),H(`keydown`,function(t){return w(e),T(W(3).onListKey(t))}),N(2,D3,20,15,`li`,null,l3),L(),j(4,O3,1,2,`app-capacitor-call-detail`,45),L()}if(e&2){let e,t=W(3);O(2),P(t.shownCalls()),O(2),M((e=t.selected())?4:-1,e)}}function A3(e,t){if(e&1){let e=V();j(0,y3,6,1,`p`,15),I(1,`div`,33)(2,`div`,34),E(),I(3,`svg`,35),R(4,`circle`,36)(5,`path`,37),L(),bs(),I(6,`input`,38,0),H(`input`,function(t){return w(e),T(W(2).setSearch(t.target.value))})(`keydown.escape`,function(){return w(e),T(W(2).setSearch(``))}),L()(),I(8,`app-select`,39),H(`valueChange`,function(t){return w(e),T(W(2).setFilter(t))}),L(),I(9,`span`,40),K(10),L()(),R(11,`app-limit-note`,41),j(12,b3,2,0,`p`,18)(13,x3,7,3,`div`,18)(14,k3,5,1,`div`,42)}if(e&2){let e=W(),t=W();M(e.info.webCalls?-1:0),O(6),F(`value`,t.filter()),O(2),F(`options`,t.filterOptions)(`value`,t.callFilter()),O(2),Y(``,t.shownCalls().length,` of `,e.calls.length,` calls`),O(),F(`dropped`,e.dropped)(`max`,t.maxCalls()),O(),M(e.calls.length?t.shownCalls().length?14:13:12)}}function j3(e,t){e&1&&(I(0,`p`,18),K(1,`No plugins are registered or installed.`),L())}function M3(e,t){if(e&1&&(I(0,`code`),K(1),L()),e&2){let e=W();O(),q(e.command)}}function N3(e,t){if(e&1){let e=V();I(0,`button`,65),H(`click`,function(){w(e);let t=W();return T(W(4).copyCommand(t.command))}),K(1,` Copy `),L()}e&2&&A(`aria-label`,`Copy `+W().command)}function P3(e,t){if(e&1&&(I(0,`span`,63),K(1),j(2,M3,2,1,`code`),K(3),L(),j(4,N3,2,1,`button`,64)),e&2){let e=t;O(),q(e.before),O(),M(e.command?2:-1),O(),q(e.after),O(),M(e.command?4:-1)}}function F3(e,t){if(e&1&&(I(0,`tr`)(1,`th`,61)(2,`code`),K(3),L()(),I(4,`td`),K(5),L(),I(6,`td`),K(7),L(),I(8,`td`),K(9),L(),I(10,`td`,62),j(11,P3,5,4),L()()),e&2){let e,n=t.$implicit,r=W(2),i=W();O(3),q(n.name),O(2),q(n.available?`Yes`:`No`),O(2),q(i.yesNo(n.registered)),O(2),q(n.native?`Yes`:`No`),O(2),M((e=i.pluginHint(n,r.info.platform))?11:-1,e)}}function I3(e,t){if(e&1&&(I(0,`div`,19)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,60),K(5,`Plugin`),L(),I(6,`th`,60),K(7,`Available`),L(),I(8,`th`,60),K(9,`Imported`),L(),I(10,`th`,60),K(11,`Native`),L(),I(12,`th`,60),K(13,`Note`),L()()(),I(14,`tbody`),N(15,F3,12,5,`tr`,null,u3),L()()()),e&2){let e=W();O(15),P(e.info.plugins)}}function L3(e,t){e&1&&(I(0,`p`,18),K(1,`No plugin listeners. They show up when the app calls addListener.`),L())}function R3(e,t){if(e&1&&(I(0,`code`,68),K(1),L()),e&2){let e=W(2).$implicit,t=W(3);O(),q(t.preview(e.last))}}function z3(e,t){e&1&&(I(0,`span`,68),K(1,`No data`),L())}function B3(e,t){if(e&1&&(j(0,R3,2,1,`code`,68)(1,z3,2,0,`span`,68),I(2,`span`,43),K(3),L()),e&2){let e=W().$implicit,t=W(3);M(+(e.last===void 0)),O(3),J(`at `,t.time(e.lastEventAt))}}function V3(e,t){e&1&&K(0,` None yet `)}function H3(e,t){if(e&1&&(I(0,`span`,67),E(),I(1,`svg`,49),R(2,`path`,69)(3,`path`,70),L(),K(4),L()),e&2){let e=W().$implicit,t=W(3);O(4),J(` `,t.leakCount(e),` active listeners: possible leak `)}}function U3(e,t){if(e&1&&(I(0,`tr`)(1,`th`,61)(2,`code`),K(3),L()(),I(4,`td`)(5,`code`),K(6),L()(),I(7,`td`),K(8),L(),I(9,`td`,66),j(10,B3,4,2)(11,V3,1,0),L(),I(12,`td`),K(13),j(14,H3,5,1,`span`,67),L()()),e&2){let e=t.$implicit,n=W(3);O(3),q(e.plugin),O(3),q(e.event),O(2),q(e.events),O(2),M(e.lastEventAt?10:11),O(3),J(` `,e.removed?`Removed`:`Active`,` `),O(),M(!e.removed&&n.leakCount(e)>1?14:-1)}}function W3(e,t){if(e&1&&(I(0,`div`,22)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,60),K(5,`Plugin`),L(),I(6,`th`,60),K(7,`Event`),L(),I(8,`th`,60),K(9,`Events`),L(),I(10,`th`,60),K(11,`Last event`),L(),I(12,`th`,60),K(13,`State`),L()()(),I(14,`tbody`),N(15,U3,15,6,`tr`,null,l3),L()()()),e&2){let e=W();O(15),P(e.listeners)}}function G3(e,t){if(e&1&&(I(0,`p`,4),K(1,` Plugin calls, plugins and listeners of a Capacitor app, as its WebView reports them. Values are masked like other live data. `),L(),I(2,`div`,5),j(3,h3,21,5),I(4,`span`,6),K(5),L()(),I(6,`section`,7)(7,`div`,8)(8,`h2`,9),K(9,`Environment`),L(),j(10,g3,4,2,`div`,10),L(),I(11,`dl`)(12,`div`)(13,`dt`),K(14,`Platform`),L(),I(15,`dd`)(16,`code`),K(17),L(),K(18),L()(),I(19,`div`)(20,`dt`),K(21,`Server URL`),L(),I(22,`dd`)(23,`code`),K(24),L()()(),I(25,`div`)(26,`dt`),K(27,`CapacitorHttp`),L(),I(28,`dd`),K(29),L()(),I(30,`div`)(31,`dt`),K(32,`Calls logged`),L(),I(33,`dd`),K(34),L()(),I(35,`div`,11)(36,`dt`),K(37,`User agent`),L(),I(38,`dd`)(39,`code`),K(40),L()()()()(),j(41,_3,4,2,`section`,12),I(42,`section`,13)(43,`h2`,14),K(44,`Plugin calls`),L(),j(45,v3,12,1,`p`,15)(46,A3,15,9),L(),I(47,`section`,16)(48,`h2`,17),K(49,`Plugins`),L(),j(50,j3,2,0,`p`,18)(51,I3,17,0,`div`,19),L(),I(52,`section`,20)(53,`h2`,21),K(54,`Listeners`),L(),j(55,L3,2,0,`p`,18)(56,W3,17,0,`div`,22),L()),e&2){let e,n=t,r=W();O(3),M((e=r.summary())?3:-1,e),O(2),q(r.message()),O(5),M(r.pageOptions().length>1?10:-1),O(7),q(n.info.platform),O(),J(` (`,n.info.native?`native`:`web`,`) `),O(6),q(n.info.env.serverUrl||`none`),O(5),J(` `,n.info.env.capacitorHttp===null?`Unknown`:n.info.env.capacitorHttp?`On`:`Off`,` `),O(5),q(r.loggedLabel()),O(6),q(n.info.env.userAgent||`unknown`),O(),M(r.stateCards().length?41:-1),O(4),M(!n.info.bridge&&!n.info.webCalls?45:46),O(5),M(n.info.plugins.length?51:50),O(5),M(n.listeners.length?56:55)}}function K3(e,t){e&1&&(I(0,`p`,1),K(1,` No Capacitor app reports to this server. Start the overlay in the app, then use it. `),L())}var q3=`https://pangular-inspector.dev/inspectors/capacitor/#web-calls`,J3=2e3,Y3={all:`All calls`,failed:`Failed`,slow:`Slow (500 ms or more)`,pending:`Pending`},X3=class e{rpc=$(null);destroyRef=C(As);host=C(Vl);injector=C(Os);seen=new Map;hostPageId=XT();unsubscribe;time=vO;preview=M4;pluginHint=T4;guideUrl=q3;yesNo=m4;filterOptions=Object.keys(Y3).map(e=>({value:e,label:Y3[e]}));pages=D([]);loaded=D(!1);failed=D(!1);selectedPageId=Q({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:g4(e,this.hostPageId)});selectedCallId=D(null);focusedCallId=D(null);filter=D(``);callFilter=D(`all`);now=D(Date.now());message=D(``);page=X(()=>{let e=this.selectedPageId();return this.pages().find(t=>t.pageId===e)??null});pageOptions=X(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.info.platform})));maxCalls=X(()=>_E(this.rpc()).limits.capacitorCalls);loggedLabel=X(()=>{let e=this.page()?.info;return e?e.bridge&&e.webCalls?`Native and web`:e.bridge?`Native only`:e.webCalls?`Web only`:`None on this platform`:``});shownCalls=X(()=>{let e=this.page();if(!e)return[];let t=this.filter().trim().toLowerCase(),n=this.callFilter(),r=n===`slow`?this.now():0;return[...e.calls].filter(e=>S4(e,n,r)).filter(e=>!t||`${e.plugin}.${e.method}`.toLowerCase().includes(t)).sort((e,t)=>t.startedAt-e.startedAt)});selected=X(()=>this.shownCalls().find(e=>e.id===this.selectedCallId())??null);tabStop=X(()=>{let e=this.shownCalls();for(let t of[this.focusedCallId(),this.selectedCallId()])if(t!==null&&e.some(e=>e.id===t))return t;return e[0]?.id??null});slowest=X(()=>{let e=this.now();return Math.max(1,...this.shownCalls().map(t=>x4(t,e)))});hiddenBy=X(()=>{let e=[],t=this.filter().trim();return t&&e.push(`the search “${t}”`),this.callFilter()!==`all`&&e.push(`the ${Y3[this.callFilter()]} filter`),e.join(` and `)});stateCards=X(()=>{let e=this.page();return e?o3(e):[]});leaks=X(()=>D4(this.page()?.listeners??[]));liveSummary=X(()=>{let e=this.page();return e?E4(e,this.now()):null});summary=D(null);summaryShownAt=0;summaryTimer;messageFlip=!1;constructor(){_c(()=>{let e=this.rpc();e&&this.load(e)}),_c(()=>{let e=this.liveSummary();Z(()=>this.queueSummary(e))});let e=setInterval(()=>this.now.set(Date.now()),1e3);this.destroyRef.onDestroy(()=>{clearInterval(e),clearTimeout(this.summaryTimer),this.unsubscribe?.()})}retry(){let e=this.rpc();e&&this.load(e)}callStats(e){return[{filter:`all`,label:`Calls`,count:e.calls},{filter:`failed`,label:`Failed`,count:e.failed},{filter:`slow`,label:`Slow, 500 ms+`,count:e.slow},{filter:`pending`,label:`Pending`,count:e.pending}]}select(e){this.selectedCallId.set(e),ud(()=>{globalThis.matchMedia?.(`(max-width: 880px)`).matches&&this.host.nativeElement.querySelector(`#cap-detail`)?.scrollIntoView?.({block:`nearest`})},{injector:this.injector})}onListKey(e){if(![`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key))return;let t=Array.from(this.host.nativeElement.querySelectorAll(`[data-cap-call]`));if(!t.length)return;let n=t.indexOf(document.activeElement),r=n;r=e.key===`ArrowDown`?Math.min(n+1,t.length-1):e.key===`ArrowUp`?Math.max(n-1,0):e.key===`Home`?0:t.length-1,e.preventDefault(),t[r]?.focus()}setSearch(e){e!==this.filter()&&(this.filter.set(e),this.announceCount())}setFilter(e){e!==this.callFilter()&&(this.callFilter.set(e),this.announceCount())}pickFilter(e){this.setFilter(this.callFilter()===e?`all`:e)}clearFilters(){this.filter.set(``),this.callFilter.set(`all`),this.announceCount()}announce(e){this.messageFlip=!this.messageFlip,this.message.set(this.messageFlip?`${e} `:e)}async copyCommand(e){try{await navigator.clipboard.writeText(e),this.announce(`Copied ${e}.`)}catch{this.announce(`The clipboard is not available here.`)}}leakCount(e){return this.leaks().get(`${e.plugin} ${e.event}`)??0}tone(e){return e.status===`pending`?`accent`:e.status===`ok`?`ok`:b4(e)?`warn`:`danger`}statusLabel(e){return e.status===`pending`?`Pending`:e.status===`ok`?`OK`:b4(e)?`Not implemented`:`Error`}durationText(e){return e.status===`pending`?`waiting ${C4(x4(e,this.now()))}`:e.durationMs===void 0?``:`${Math.round(e.durationMs)} ms`}barWidth(e){return Math.min(100,x4(e,this.now())/this.slowest()*100)}announceCount(){let e=this.page();e&&this.announce(`${this.shownCalls().length} of ${e.calls.length} calls shown`)}queueSummary(e){let t=this.summary();if(JSON.stringify(e)===JSON.stringify(t))return;clearTimeout(this.summaryTimer),this.summaryTimer=void 0;let n=this.summaryShownAt+J3-Date.now();if(!t||!e||e.pageId!==t.pageId||n<=0){this.summary.set(e),this.summaryShownAt=Date.now();return}this.summaryTimer=setTimeout(()=>{this.summaryTimer=void 0,this.summary.set(this.liveSummary()),this.summaryShownAt=Date.now()},n)}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`capacitor`);if(this.destroyRef.destroyed)return;let n=e=>this.pages.set(h4(y4(e),this.seen));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-capacitor-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`intro`],[`role`,`status`,`aria-label`,`Capacitor summary`,`aria-atomic`,`false`,1,`strip`],[1,`sr-only`],[`aria-labelledby`,`cap-env-title`,1,`env`],[1,`env-head`],[`id`,`cap-env-title`],[1,`page-picker`],[1,`wide`],[`aria-labelledby`,`cap-state-title`],[`aria-labelledby`,`cap-calls-title`],[`id`,`cap-calls-title`],[1,`notice`],[`aria-labelledby`,`cap-plugins-title`],[`id`,`cap-plugins-title`],[1,`empty`],[`tabindex`,`0`,`role`,`group`,`aria-label`,`Plugins table`,1,`table-wrap`],[`aria-labelledby`,`cap-listeners-title`],[`id`,`cap-listeners-title`],[`tabindex`,`0`,`role`,`group`,`aria-label`,`Listeners table`,1,`table-wrap`],[`aria-atomic`,`true`,1,`stat`],[1,`stat-label`],[1,`stat-value`],[`type`,`button`,`aria-atomic`,`true`,1,`stat`],[`type`,`button`,`aria-atomic`,`true`,1,`stat`,3,`click`],[`id`,`cap-page-label`,1,`label-key`],[`labelledBy`,`cap-page-label`,3,`valueChange`,`options`,`value`],[`id`,`cap-state-title`],[3,`cards`,`now`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`toolbar`],[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 calls by plugin or method`,`placeholder`,`Filter by plugin or method`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Show calls`,1,`show`,3,`valueChange`,`options`,`value`],[1,`count`],[`what`,`plugin calls`,`limit`,`capacitorCalls`,3,`dropped`,`max`],[1,`split`],[1,`muted`],[`aria-label`,`Plugin calls, newest first`,1,`calls`,3,`keydown`],[3,`call`,`now`],[`type`,`button`,`data-cap-call`,``,1,`call`,3,`focus`,`click`],[1,`name`],[1,`chip`,`status`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M20 6 9 17l-5-5`],[1,`chip`,`via`],[1,`duration`],[`aria-hidden`,`true`,1,`bar`],[1,`when`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`m15 9-6 6M9 9l6 6`],[`d`,`M5.6 5.6l12.8 12.8`],[`d`,`M12 7v5l3 2`],[3,`announce`,`call`,`now`],[`scope`,`col`],[`scope`,`row`],[1,`note`],[1,`hint`],[`type`,`button`,1,`copy`],[`type`,`button`,1,`copy`,3,`click`],[1,`last`],[`data-tone`,`warn`,1,`chip`,`leak`],[1,`payload`],[`d`,`M12 3 2 21h20z`],[`d`,`M12 10v4M12 17.5v.01`]],template:function(e,t){if(e&1&&j(0,d3,2,0,`p`,1)(1,f3,5,0,`div`,2)(2,G3,57,13)(3,K3,2,0,`p`,1),e&2){let e;M(t.loaded()?t.failed()?1:(e=t.page())?2:3:0,e)}},dependencies:[wO,JD,J4,s3],styles:[`[_nghost-%COMP%] { display: block; font-size: 13px; } @@ -17741,7 +17741,7 @@ td.last[_ngcontent-%COMP%] { .empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .state[_ngcontent-%COMP%] p[_ngcontent-%COMP%] { margin: 0 0 8px; -}`]})};function J3(e,t,n=600){let r=D(``),i=!0,a;return _c(()=>{if(e(),i){i=!1;return}clearTimeout(a),a=setTimeout(()=>{let e=Z(t);r.update(t=>t===e?`${e} `:e)},n)}),C(As).onDestroy(()=>clearTimeout(a)),r.asReadonly()}var Y3=[`log`,`info`,`warn`,`error`,`debug`];function X3(e){return e.split("`").map((e,t)=>({code:t%2==1,text:e})).filter(e=>e.text)}var Z3={handler:`ErrorHandler`,window:`Uncaught`,promise:`Unhandled rejection`};function Q3(e){return!!e&&typeof e==`object`}function $3(e){let t=Q3(e)?e.pages:void 0;return Q3(t)?Object.values(t).filter(e=>Q3(e)&&typeof e.pageId==`string`).map(e=>({pageId:e.pageId,url:typeof e.url==`string`?e.url:``,title:typeof e.title==`string`?e.title:``,reportedAt:typeof e.reportedAt==`number`?e.reportedAt:0,handler:e.handler===`wrapped`?`wrapped`:`none`,errors:Q3(e.errors)?Object.values(e.errors):[],console:Q3(e.console)?Object.values(e.console).sort((e,t)=>e.id-t.id):[],dropped:Q3(e.dropped)?{errors:Number(e.dropped.errors)||0,console:Number(e.dropped.console)||0}:{errors:0,console:0}})).sort((e,t)=>t.reportedAt-e.reportedAt):[]}function e6(e,t){return t&&e.some(e=>e.pageId===t)?t:e.length>1?`all`:e[0]?.pageId??`all`}function t6(e,t){return e.filter(e=>t===`all`||e.pageId===t).flatMap(e=>e.errors.map(t=>({...t,pageId:e.pageId}))).sort((e,t)=>t.lastAt-e.lastAt)}function n6(e,t){return e.filter(e=>t===`all`||e.pageId===t).flatMap(e=>e.console.map(t=>({...t,pageId:e.pageId}))).sort((e,t)=>t.at-e.at||t.id-e.id)}function r6(e,t){return t?.startsWith(`https://angular.dev/errors/`)?{code:e,href:t}:{code:e}}var i6=(e,t)=>t.signal+t.at,a6=(e,t)=>t.id+e;function o6(e,t){if(e&1&&(z(0,`code`),K(1),B()),e&2){let e=W();O(),q(e.binding)}}function s6(e,t){e&1&&(z(0,`span`,2),K(1,`A text interpolation (Angular doesn't name it)`),B())}function c6(e,t){if(e&1&&(z(0,`span`,2),K(1,` in `),B(),z(2,`code`),K(3),B()),e&2){let e=W();O(3),q(e.template)}}function l6(e,t){if(e&1&&(z(0,`code`),K(1),B(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;O(),q(e),O(),J(``,n===r-1?``:`, `,` `)}}function u6(e,t){if(e&1&&(z(0,`dt`),K(1,`Held by`),B(),z(2,`dd`),N(3,l6,3,2,null,null,_g),B()),e&2){let e=W();O(3),P(e.members)}}function d6(e,t){e&1&&(z(0,`p`,4),K(1,` Values are hidden: the binding or a field that holds them has a secret-looking name. `),B())}function f6(e,t){e&1&&(z(0,`p`,4),K(1,` Angular says this view was created after its parent was checked, so a change detection hook such as `),z(2,`code`),K(3,`ngAfterViewInit`),B(),K(4,` created it. `),B())}function p6(e,t){if(e&1&&(z(0,`li`)(1,`code`),K(2),B()()),e&2){let e=t.$implicit;O(2),q(e)}}function m6(e,t){if(e&1&&(z(0,`ol`,6),N(1,p6,3,1,`li`,null,gg),B()),e&2){let e=W().$implicit;O(),P(e.stack)}}function h6(e,t){e&1&&(z(0,`span`,2),K(1,` (turn on write stacks in the Signals tab and reproduce to see the code)`),B())}function g6(e,t){if(e&1&&(z(0,`li`),K(1,` Signal `),z(2,`code`),K(3),B(),K(4),j(5,m6,3,0,`ol`,6)(6,h6,2,0,`span`,2),B()),e&2){let e=t.$implicit,n=W(4);O(3),q(e.signal),O(),J(` at `,n.time(e.at),` `),O(),M(e.stack?.length?5:6)}}function _6(e,t){if(e&1&&(z(0,`h4`,0),K(1,`Written by`),B(),z(2,`ul`,5),N(3,g6,7,3,`li`,null,i6),B()),e&2){let e=W();O(3),P(e.writes)}}function v6(e,t){e&1&&(z(0,`p`,4),K(1,` No named signal was written with this value just before the check. Look for code that sets a field the template reads during change detection, such as `),z(2,`code`),K(3,`ngAfterViewInit`),B(),K(4,`, a getter that returns a new value each time, or a child that changes its parent. `),B())}function y6(e,t){e&1&&(z(0,`p`,4),K(1,` Where it was written is unknown: the page doesn't report signal writes (the Signals inspector is off, or Angular is older than 17). `),B())}function b6(e,t){if(e&1&&(z(0,`h3`,0),K(1,`What changed`),B(),z(2,`dl`,1)(3,`dt`),K(4,`Binding`),B(),z(5,`dd`),j(6,o6,2,1,`code`)(7,s6,2,0,`span`,2),j(8,c6,4,1),B(),z(9,`dt`),K(10,`Previous`),B(),z(11,`dd`)(12,`code`,3),K(13),B()(),z(14,`dt`),K(15,`Current`),B(),z(16,`dd`)(17,`code`,3),K(18),B()(),j(19,u6,5,0),B(),j(20,d6,2,0,`p`,4),j(21,f6,5,0,`p`,4),j(22,_6,5,0)(23,v6,5,0,`p`,4)(24,y6,2,0,`p`,4)),e&2){let e=t;O(6),M(e.binding?6:7),O(2),M(e.template?8:-1),O(5),q(e.previous),O(5),q(e.current),O(),M(e.members?.length?19:-1),O(),M(e.masked?20:-1),O(),M(e.creation?21:-1),O(),M(e.writes?.length?22:e.writesKnown?23:24)}}function x6(e,t){if(e&1&&j(0,b6,25,8),e&2){let e;M((e=W().changed())?0:-1,e)}}function S6(e,t){if(e&1&&(z(0,`p`,7),K(1),B()),e&2){let e=W();O(),q(e.summary)}}function C6(e,t){if(e&1&&(z(0,`span`,14),K(1),B()),e&2){let e=W().$implicit;O(),q(e.op===`expected`?`Server only:`:`Client only:`)}}function w6(e,t){if(e&1&&(z(0,`li`)(1,`span`,13),K(2),B(),j(3,C6,2,1,`span`,14),z(4,`code`),K(5),B()()),e&2){let e=t.$implicit,n=W(4);A(`data-op`,e.op),O(2),q(n.signOf(e.op)),O(),M(e.op===`same`?-1:3),O(2),q(e.text)}}function T6(e,t){if(e&1&&(z(0,`p`,8)(1,`span`,9),K(2,`−`),B(),K(3,` server HTML Angular expected `),z(4,`span`,10),K(5,`+`),B(),K(6,` client DOM it found `),B(),z(7,`div`,11)(8,`ol`,12),N(9,w6,6,4,`li`,null,gg),B()()),e&2){let e=W();O(9),P(e.diff)}}function E6(e,t){e&1&&(z(0,`p`,4),K(1,`Angular described neither side of the mismatch.`),B())}function D6(e,t){e&1&&(z(0,`p`,4),K(1,` Angular thinks a browser extension or third-party script changed the DOM before hydration. Try a clean browser profile, or add `),z(2,`code`),K(3,`ngSkipHydration`),B(),K(4,` to the host. `),B())}function O6(e,t){if(e&1&&(z(0,`h3`,0),K(1,`Server vs client DOM`),B(),j(2,S6,2,1,`p`,7),j(3,T6,11,0)(4,E6,2,0,`p`,4),j(5,D6,5,0,`p`,4)),e&2){let e=t;O(2),M(e.summary?2:-1),O(),M(e.diff?.length?3:4),O(2),M(e.external?5:-1)}}function k6(e,t){if(e&1&&j(0,O6,6,3),e&2){let e;M((e=W().mismatch())?0:-1,e)}}function A6(e,t){if(e&1&&(z(0,`code`),K(1),B(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;O(),q(e),O(),J(``,n===r-1?``:` → `,` `)}}function j6(e,t){if(e&1&&(z(0,`dt`),K(1,`Path`),B(),z(2,`dd`),N(3,A6,3,2,null,null,gg),B()),e&2){let e=W();O(3),P(e.path)}}function M6(e,t){if(e&1&&(z(0,`dt`),K(1,`Source`),B(),z(2,`dd`)(3,`code`),K(4),B()()),e&2){let e=W();O(4),q(e.source)}}function N6(e,t){if(e&1){let e=V();z(0,`button`,18),U(`click`,function(){w(e);let t=W();return T(W(2).explainLookup(t.token))}),K(1),B()}if(e&2){let e=W(3);A(`aria-disabled`,e.loading()||null),O(),J(` `,e.lookup()?`Explain lookup again`:`Explain lookup`,` `)}}function P6(e,t){e&1&&(z(0,`p`,4),K(1,` The component that asked for it wasn't found on the page, so the lookup can't be walked from here. `),B())}function F6(e,t){e&1&&(z(0,`p`,4),K(1,`Walking the lookup…`),B())}function I6(e,t){if(e&1&&(z(0,`code`),K(1),B()),e&2){let e=W().$implicit;O(),q(e.text)}}function L6(e,t){if(e&1&&(z(0,`span`),K(1),B()),e&2){let e=W().$implicit;O(),q(e.text)}}function R6(e,t){if(e&1&&j(0,I6,2,1,`code`)(1,L6,2,1,`span`),e&2){let e=t.$implicit;M(+!e.code)}}function z6(e,t){if(e&1&&(z(0,`p`,17),N(1,R6,2,1,null,null,gg),B()),e&2){let e=W(3);O(),P(e.segments(t))}}function B6(e,t){if(e&1&&(z(0,`code`),K(1),B()),e&2){let e=W().$implicit;O(),q(e.text)}}function V6(e,t){if(e&1&&(z(0,`span`),K(1),B()),e&2){let e=W().$implicit;O(),q(e.text)}}function H6(e,t){if(e&1&&j(0,B6,2,1,`code`)(1,V6,2,1,`span`),e&2){let e=t.$implicit;M(+!e.code)}}function U6(e,t){if(e&1&&(z(0,`p`,7),N(1,H6,2,1,null,null,gg),B()),e&2){let e=W(3);O(),P(e.segments(t.summary))}}function W6(e,t){if(e&1&&(z(0,`code`,2),K(1),B()),e&2){let e=W().$implicit;O(),q(e.component)}}function G6(e,t){if(e&1&&(z(0,`code`),K(1),B()),e&2){let e=W().$implicit;O(),q(e.text)}}function K6(e,t){if(e&1&&(z(0,`span`),K(1),B()),e&2){let e=W().$implicit;O(),q(e.text)}}function q6(e,t){if(e&1&&j(0,G6,2,1,`code`)(1,K6,2,1,`span`),e&2){let e=t.$implicit;M(+!e.code)}}function J6(e,t){if(e&1&&(z(0,`li`)(1,`span`,20)(2,`code`),K(3),B(),j(4,W6,2,1,`code`,2),B(),z(5,`span`,21),K(6),B(),z(7,`span`,22),N(8,q6,2,1,null,null,gg),B()()),e&2){let e=t.$implicit,n=W(4);O(3),q(e.name),O(),M(e.component?4:-1),O(),A(`data-tone`,n.stepTone[e.status]),O(),q(n.stepLabel[e.status]),O(2),P(n.segments(e.reason))}}function Y6(e,t){e&1&&K(0,` This Angular version has no resolution path, so the path follows the rendered tree. `)}function X6(e,t){if(e&1&&(z(0,`ol`,19),N(1,J6,10,4,`li`,null,a6),B(),z(3,`p`,4),K(4,` Read from the injector tree the page reported, assuming no `),z(5,`code`),K(6,`self`),B(),K(7,`, `),z(8,`code`),K(9,`skipSelf`),B(),K(10,`, `),z(11,`code`),K(12,`host`),B(),K(13,` or `),z(14,`code`),K(15,`optional`),B(),K(16,`. Agents can pass those to `),z(17,`code`),K(18,`explain-injection`),B(),K(19,`. `),j(20,Y6,1,0),B()),e&2){let e=t;O(),P(e.steps),O(19),M(e.approximate?20:-1)}}function Z6(e,t){if(e&1&&(z(0,`h3`,0),K(1,`Missing provider`),B(),z(2,`dl`,1)(3,`dt`),K(4,`Token`),B(),z(5,`dd`)(6,`code`),K(7),B()(),j(8,j6,5,0),j(9,M6,5,1),B(),j(10,N6,2,2,`button`,15)(11,P6,2,0,`p`,4),z(12,`div`,16),j(13,F6,2,0,`p`,4)(14,z6,3,0,`p`,17)(15,U6,3,0,`p`,7),B(),j(16,X6,21,1)),e&2){let e,n,r=t,i=W(2);O(7),q(r.token),O(),M(r.path?.length?8:-1),O(),M(r.source?9:-1),O(),M(i.canExplain()&&i.owner()?10:i.owner()?-1:11),O(3),M(i.loading()?13:(e=i.lookupError())?14:(e=i.lookup())?15:-1,e),O(3),M((n=!i.loading()&&!i.lookupError()&&i.lookup())?16:-1,n)}}function Q6(e,t){if(e&1&&j(0,Z6,17,6),e&2){let e;M((e=W().missing())?0:-1,e)}}var $6={provides:`Provides it`,missing:`Not provided`,hidden:`Hidden`,skipped:`Skipped`,"not-asked":`Not asked`,unknown:`Unknown`},e8={provides:`ok`,missing:`plain`,hidden:`warn`,skipped:`plain`,"not-asked":`plain`,unknown:`warn`},t8=class e{explain=$.required();owner=$(void 0);pageId=$(``);rpc=$(null);canExplain=$(!1);time=vO;segments=X3;stepLabel=$6;stepTone=e8;changed=X(()=>{let e=this.explain();return e.kind===`expression-changed`?e:null});mismatch=X(()=>{let e=this.explain();return e.kind===`hydration-mismatch`?e:null});missing=X(()=>{let e=this.explain();return e.kind===`missing-provider`?e:null});loading=D(!1);lookup=D(null);lookupError=D(null);signOf(e){return e===`expected`?`−`:e===`actual`?`+`:` `}async explainLookup(e){let t=this.rpc(),n=this.owner();if(t&&n&&!this.loading()){this.loading.set(!0),this.lookupError.set(null);try{let r=await t.scope(`pangular`).rpc.call(`explain-injection`,{selector:n.id,token:e,pageId:this.pageId()});!r||`error`in r?(this.lookup.set(null),this.lookupError.set(r?.error??`The server didn't answer.`)):this.lookup.set(r)}catch{this.lookup.set(null),this.lookupError.set(`Can't reach the devtools server. Try again.`)}finally{this.loading.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-error-explain`]],inputs:{explain:[1,`explain`],owner:[1,`owner`],pageId:[1,`pageId`],rpc:[1,`rpc`],canExplain:[1,`canExplain`]},decls:3,vars:1,consts:[[1,`label`],[1,`facts`],[1,`muted`],[1,`value`],[1,`note`],[1,`writes`],[`aria-label`,`App frames that wrote it`,1,`frames`],[1,`summary`],[1,`legend`],[`aria-hidden`,`true`,1,`sign`,`expected`],[`aria-hidden`,`true`,1,`sign`,`actual`],[`tabindex`,`0`,`role`,`region`,`aria-label`,`Server vs client DOM diff`,1,`diff-wrap`],[1,`diff`],[`aria-hidden`,`true`,1,`sign`],[1,`sr-only`],[`type`,`button`,1,`small`],[`aria-live`,`polite`],[`role`,`alert`,1,`note`],[`type`,`button`,1,`small`,3,`click`],[`aria-label`,`Injectors Angular asks, in order`,1,`steps`],[1,`step-name`],[1,`chip`],[1,`reason`]],template:function(e,t){if(e&1&&j(0,x6,1,1)(1,k6,1,1)(2,Q6,1,1),e&2){let e;M((e=t.explain().kind)===`expression-changed`?0:e===`hydration-mismatch`?1:e===`missing-provider`?2:-1)}},styles:[`[_nghost-%COMP%] { +}`]})};function Z3(e,t,n=600){let r=D(``),i=!0,a;return _c(()=>{if(e(),i){i=!1;return}clearTimeout(a),a=setTimeout(()=>{let e=Z(t);r.update(t=>t===e?`${e} `:e)},n)}),C(As).onDestroy(()=>clearTimeout(a)),r.asReadonly()}var Q3=[`log`,`info`,`warn`,`error`,`debug`];function $3(e){return e.split("`").map((e,t)=>({code:t%2==1,text:e})).filter(e=>e.text)}var e6={handler:`ErrorHandler`,window:`Uncaught`,promise:`Unhandled rejection`};function t6(e){return!!e&&typeof e==`object`}function n6(e){let t=t6(e)?e.pages:void 0;return t6(t)?Object.values(t).filter(e=>t6(e)&&typeof e.pageId==`string`).map(e=>({pageId:e.pageId,url:typeof e.url==`string`?e.url:``,title:typeof e.title==`string`?e.title:``,reportedAt:typeof e.reportedAt==`number`?e.reportedAt:0,handler:e.handler===`wrapped`?`wrapped`:`none`,errors:t6(e.errors)?Object.values(e.errors):[],console:t6(e.console)?Object.values(e.console).sort((e,t)=>e.id-t.id):[],dropped:t6(e.dropped)?{errors:Number(e.dropped.errors)||0,console:Number(e.dropped.console)||0}:{errors:0,console:0}})).sort((e,t)=>t.reportedAt-e.reportedAt):[]}function r6(e,t){return t&&e.some(e=>e.pageId===t)?t:e.length>1?`all`:e[0]?.pageId??`all`}function i6(e,t){return e.filter(e=>t===`all`||e.pageId===t).flatMap(e=>e.errors.map(t=>({...t,pageId:e.pageId}))).sort((e,t)=>t.lastAt-e.lastAt)}function a6(e,t){return e.filter(e=>t===`all`||e.pageId===t).flatMap(e=>e.console.map(t=>({...t,pageId:e.pageId}))).sort((e,t)=>t.at-e.at||t.id-e.id)}function o6(e,t){return t?.startsWith(`https://angular.dev/errors/`)?{code:e,href:t}:{code:e}}var s6=(e,t)=>t.signal+t.at,c6=(e,t)=>t.id+e;function l6(e,t){if(e&1&&(z(0,`code`),K(1),B()),e&2){let e=W();O(),q(e.binding)}}function u6(e,t){e&1&&(z(0,`span`,2),K(1,`A text interpolation (Angular doesn't name it)`),B())}function d6(e,t){if(e&1&&(z(0,`span`,2),K(1,` in `),B(),z(2,`code`),K(3),B()),e&2){let e=W();O(3),q(e.template)}}function f6(e,t){if(e&1&&(z(0,`code`),K(1),B(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;O(),q(e),O(),J(``,n===r-1?``:`, `,` `)}}function p6(e,t){if(e&1&&(z(0,`dt`),K(1,`Held by`),B(),z(2,`dd`),N(3,f6,3,2,null,null,_g),B()),e&2){let e=W();O(3),P(e.members)}}function m6(e,t){e&1&&(z(0,`p`,4),K(1,` Values are hidden: the binding or a field that holds them has a secret-looking name. `),B())}function h6(e,t){e&1&&(z(0,`p`,4),K(1,` Angular says this view was created after its parent was checked, so a change detection hook such as `),z(2,`code`),K(3,`ngAfterViewInit`),B(),K(4,` created it. `),B())}function g6(e,t){if(e&1&&(z(0,`li`)(1,`code`),K(2),B()()),e&2){let e=t.$implicit;O(2),q(e)}}function _6(e,t){if(e&1&&(z(0,`ol`,6),N(1,g6,3,1,`li`,null,gg),B()),e&2){let e=W().$implicit;O(),P(e.stack)}}function v6(e,t){e&1&&(z(0,`span`,2),K(1,` (turn on write stacks in the Signals tab and reproduce to see the code)`),B())}function y6(e,t){if(e&1&&(z(0,`li`),K(1,` Signal `),z(2,`code`),K(3),B(),K(4),j(5,_6,3,0,`ol`,6)(6,v6,2,0,`span`,2),B()),e&2){let e=t.$implicit,n=W(4);O(3),q(e.signal),O(),J(` at `,n.time(e.at),` `),O(),M(e.stack?.length?5:6)}}function b6(e,t){if(e&1&&(z(0,`h4`,0),K(1,`Written by`),B(),z(2,`ul`,5),N(3,y6,7,3,`li`,null,s6),B()),e&2){let e=W();O(3),P(e.writes)}}function x6(e,t){e&1&&(z(0,`p`,4),K(1,` No named signal was written with this value just before the check. Look for code that sets a field the template reads during change detection, such as `),z(2,`code`),K(3,`ngAfterViewInit`),B(),K(4,`, a getter that returns a new value each time, or a child that changes its parent. `),B())}function S6(e,t){e&1&&(z(0,`p`,4),K(1,` Where it was written is unknown: the page doesn't report signal writes (the Signals inspector is off, or Angular is older than 17). `),B())}function C6(e,t){if(e&1&&(z(0,`h3`,0),K(1,`What changed`),B(),z(2,`dl`,1)(3,`dt`),K(4,`Binding`),B(),z(5,`dd`),j(6,l6,2,1,`code`)(7,u6,2,0,`span`,2),j(8,d6,4,1),B(),z(9,`dt`),K(10,`Previous`),B(),z(11,`dd`)(12,`code`,3),K(13),B()(),z(14,`dt`),K(15,`Current`),B(),z(16,`dd`)(17,`code`,3),K(18),B()(),j(19,p6,5,0),B(),j(20,m6,2,0,`p`,4),j(21,h6,5,0,`p`,4),j(22,b6,5,0)(23,x6,5,0,`p`,4)(24,S6,2,0,`p`,4)),e&2){let e=t;O(6),M(e.binding?6:7),O(2),M(e.template?8:-1),O(5),q(e.previous),O(5),q(e.current),O(),M(e.members?.length?19:-1),O(),M(e.masked?20:-1),O(),M(e.creation?21:-1),O(),M(e.writes?.length?22:e.writesKnown?23:24)}}function w6(e,t){if(e&1&&j(0,C6,25,8),e&2){let e;M((e=W().changed())?0:-1,e)}}function T6(e,t){if(e&1&&(z(0,`p`,7),K(1),B()),e&2){let e=W();O(),q(e.summary)}}function E6(e,t){if(e&1&&(z(0,`span`,14),K(1),B()),e&2){let e=W().$implicit;O(),q(e.op===`expected`?`Server only:`:`Client only:`)}}function D6(e,t){if(e&1&&(z(0,`li`)(1,`span`,13),K(2),B(),j(3,E6,2,1,`span`,14),z(4,`code`),K(5),B()()),e&2){let e=t.$implicit,n=W(4);A(`data-op`,e.op),O(2),q(n.signOf(e.op)),O(),M(e.op===`same`?-1:3),O(2),q(e.text)}}function O6(e,t){if(e&1&&(z(0,`p`,8)(1,`span`,9),K(2,`−`),B(),K(3,` server HTML Angular expected `),z(4,`span`,10),K(5,`+`),B(),K(6,` client DOM it found `),B(),z(7,`div`,11)(8,`ol`,12),N(9,D6,6,4,`li`,null,gg),B()()),e&2){let e=W();O(9),P(e.diff)}}function k6(e,t){e&1&&(z(0,`p`,4),K(1,`Angular described neither side of the mismatch.`),B())}function A6(e,t){e&1&&(z(0,`p`,4),K(1,` Angular thinks a browser extension or third-party script changed the DOM before hydration. Try a clean browser profile, or add `),z(2,`code`),K(3,`ngSkipHydration`),B(),K(4,` to the host. `),B())}function j6(e,t){if(e&1&&(z(0,`h3`,0),K(1,`Server vs client DOM`),B(),j(2,T6,2,1,`p`,7),j(3,O6,11,0)(4,k6,2,0,`p`,4),j(5,A6,5,0,`p`,4)),e&2){let e=t;O(2),M(e.summary?2:-1),O(),M(e.diff?.length?3:4),O(2),M(e.external?5:-1)}}function M6(e,t){if(e&1&&j(0,j6,6,3),e&2){let e;M((e=W().mismatch())?0:-1,e)}}function N6(e,t){if(e&1&&(z(0,`code`),K(1),B(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;O(),q(e),O(),J(``,n===r-1?``:` → `,` `)}}function P6(e,t){if(e&1&&(z(0,`dt`),K(1,`Path`),B(),z(2,`dd`),N(3,N6,3,2,null,null,gg),B()),e&2){let e=W();O(3),P(e.path)}}function F6(e,t){if(e&1&&(z(0,`dt`),K(1,`Source`),B(),z(2,`dd`)(3,`code`),K(4),B()()),e&2){let e=W();O(4),q(e.source)}}function I6(e,t){if(e&1){let e=V();z(0,`button`,18),U(`click`,function(){w(e);let t=W();return T(W(2).explainLookup(t.token))}),K(1),B()}if(e&2){let e=W(3);A(`aria-disabled`,e.loading()||null),O(),J(` `,e.lookup()?`Explain lookup again`:`Explain lookup`,` `)}}function L6(e,t){e&1&&(z(0,`p`,4),K(1,` The component that asked for it wasn't found on the page, so the lookup can't be walked from here. `),B())}function R6(e,t){e&1&&(z(0,`p`,4),K(1,`Walking the lookup…`),B())}function z6(e,t){if(e&1&&(z(0,`code`),K(1),B()),e&2){let e=W().$implicit;O(),q(e.text)}}function B6(e,t){if(e&1&&(z(0,`span`),K(1),B()),e&2){let e=W().$implicit;O(),q(e.text)}}function V6(e,t){if(e&1&&j(0,z6,2,1,`code`)(1,B6,2,1,`span`),e&2){let e=t.$implicit;M(+!e.code)}}function H6(e,t){if(e&1&&(z(0,`p`,17),N(1,V6,2,1,null,null,gg),B()),e&2){let e=W(3);O(),P(e.segments(t))}}function U6(e,t){if(e&1&&(z(0,`code`),K(1),B()),e&2){let e=W().$implicit;O(),q(e.text)}}function W6(e,t){if(e&1&&(z(0,`span`),K(1),B()),e&2){let e=W().$implicit;O(),q(e.text)}}function G6(e,t){if(e&1&&j(0,U6,2,1,`code`)(1,W6,2,1,`span`),e&2){let e=t.$implicit;M(+!e.code)}}function K6(e,t){if(e&1&&(z(0,`p`,7),N(1,G6,2,1,null,null,gg),B()),e&2){let e=W(3);O(),P(e.segments(t.summary))}}function q6(e,t){if(e&1&&(z(0,`code`,2),K(1),B()),e&2){let e=W().$implicit;O(),q(e.component)}}function J6(e,t){if(e&1&&(z(0,`code`),K(1),B()),e&2){let e=W().$implicit;O(),q(e.text)}}function Y6(e,t){if(e&1&&(z(0,`span`),K(1),B()),e&2){let e=W().$implicit;O(),q(e.text)}}function X6(e,t){if(e&1&&j(0,J6,2,1,`code`)(1,Y6,2,1,`span`),e&2){let e=t.$implicit;M(+!e.code)}}function Z6(e,t){if(e&1&&(z(0,`li`)(1,`span`,20)(2,`code`),K(3),B(),j(4,q6,2,1,`code`,2),B(),z(5,`span`,21),K(6),B(),z(7,`span`,22),N(8,X6,2,1,null,null,gg),B()()),e&2){let e=t.$implicit,n=W(4);O(3),q(e.name),O(),M(e.component?4:-1),O(),A(`data-tone`,n.stepTone[e.status]),O(),q(n.stepLabel[e.status]),O(2),P(n.segments(e.reason))}}function Q6(e,t){e&1&&K(0,` This Angular version has no resolution path, so the path follows the rendered tree. `)}function $6(e,t){if(e&1&&(z(0,`ol`,19),N(1,Z6,10,4,`li`,null,c6),B(),z(3,`p`,4),K(4,` Read from the injector tree the page reported, assuming no `),z(5,`code`),K(6,`self`),B(),K(7,`, `),z(8,`code`),K(9,`skipSelf`),B(),K(10,`, `),z(11,`code`),K(12,`host`),B(),K(13,` or `),z(14,`code`),K(15,`optional`),B(),K(16,`. Agents can pass those to `),z(17,`code`),K(18,`explain-injection`),B(),K(19,`. `),j(20,Q6,1,0),B()),e&2){let e=t;O(),P(e.steps),O(19),M(e.approximate?20:-1)}}function e8(e,t){if(e&1&&(z(0,`h3`,0),K(1,`Missing provider`),B(),z(2,`dl`,1)(3,`dt`),K(4,`Token`),B(),z(5,`dd`)(6,`code`),K(7),B()(),j(8,P6,5,0),j(9,F6,5,1),B(),j(10,I6,2,2,`button`,15)(11,L6,2,0,`p`,4),z(12,`div`,16),j(13,R6,2,0,`p`,4)(14,H6,3,0,`p`,17)(15,K6,3,0,`p`,7),B(),j(16,$6,21,1)),e&2){let e,n,r=t,i=W(2);O(7),q(r.token),O(),M(r.path?.length?8:-1),O(),M(r.source?9:-1),O(),M(i.canExplain()&&i.owner()?10:i.owner()?-1:11),O(3),M(i.loading()?13:(e=i.lookupError())?14:(e=i.lookup())?15:-1,e),O(3),M((n=!i.loading()&&!i.lookupError()&&i.lookup())?16:-1,n)}}function t8(e,t){if(e&1&&j(0,e8,17,6),e&2){let e;M((e=W().missing())?0:-1,e)}}var n8={provides:`Provides it`,missing:`Not provided`,hidden:`Hidden`,skipped:`Skipped`,"not-asked":`Not asked`,unknown:`Unknown`},r8={provides:`ok`,missing:`plain`,hidden:`warn`,skipped:`plain`,"not-asked":`plain`,unknown:`warn`},i8=class e{explain=$.required();owner=$(void 0);pageId=$(``);rpc=$(null);canExplain=$(!1);time=vO;segments=$3;stepLabel=n8;stepTone=r8;changed=X(()=>{let e=this.explain();return e.kind===`expression-changed`?e:null});mismatch=X(()=>{let e=this.explain();return e.kind===`hydration-mismatch`?e:null});missing=X(()=>{let e=this.explain();return e.kind===`missing-provider`?e:null});loading=D(!1);lookup=D(null);lookupError=D(null);signOf(e){return e===`expected`?`−`:e===`actual`?`+`:` `}async explainLookup(e){let t=this.rpc(),n=this.owner();if(t&&n&&!this.loading()){this.loading.set(!0),this.lookupError.set(null);try{let r=await t.scope(`pangular`).rpc.call(`explain-injection`,{selector:n.id,token:e,pageId:this.pageId()});!r||`error`in r?(this.lookup.set(null),this.lookupError.set(r?.error??`The server didn't answer.`)):this.lookup.set(r)}catch{this.lookup.set(null),this.lookupError.set(`Can't reach the devtools server. Try again.`)}finally{this.loading.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-error-explain`]],inputs:{explain:[1,`explain`],owner:[1,`owner`],pageId:[1,`pageId`],rpc:[1,`rpc`],canExplain:[1,`canExplain`]},decls:3,vars:1,consts:[[1,`label`],[1,`facts`],[1,`muted`],[1,`value`],[1,`note`],[1,`writes`],[`aria-label`,`App frames that wrote it`,1,`frames`],[1,`summary`],[1,`legend`],[`aria-hidden`,`true`,1,`sign`,`expected`],[`aria-hidden`,`true`,1,`sign`,`actual`],[`tabindex`,`0`,`role`,`region`,`aria-label`,`Server vs client DOM diff`,1,`diff-wrap`],[1,`diff`],[`aria-hidden`,`true`,1,`sign`],[1,`sr-only`],[`type`,`button`,1,`small`],[`aria-live`,`polite`],[`role`,`alert`,1,`note`],[`type`,`button`,1,`small`,3,`click`],[`aria-label`,`Injectors Angular asks, in order`,1,`steps`],[1,`step-name`],[1,`chip`],[1,`reason`]],template:function(e,t){if(e&1&&j(0,w6,1,1)(1,M6,1,1)(2,t8,1,1),e&2){let e;M((e=t.explain().kind)===`expression-changed`?0:e===`hydration-mismatch`?1:e===`missing-provider`?2:-1)}},styles:[`[_nghost-%COMP%] { display: grid; gap: 6px; min-width: 0; @@ -17946,7 +17946,7 @@ dd[_ngcontent-%COMP%] { border-color: var(--%NS%border); background: var(--%NS%surface-2); color: var(--%NS%text-2); -}`]})},n8=(e,t)=>t.pageId+t.id;function r8(e,t){e&1&&(I(0,`p`,1),K(1,`Loading errors…`),L())}function i8(e,t){if(e&1){let e=V();I(0,`div`,2)(1,`p`),K(2,`Can't read the errors from the devtools server.`),L(),I(3,`button`,3),H(`click`,function(){return w(e),T(W().retry())}),K(4,`Retry`),L()()}}function a8(e,t){e&1&&(I(0,`div`,1)(1,`p`),K(2,`No page reports errors yet.`),L(),I(3,`p`,4),K(4,` Open the app with the overlay loaded. Errors and console calls show up here as they happen. `),L()())}function o8(e,t){if(e&1){let e=V();I(0,`app-select`,21),H(`valueChange`,function(t){return w(e),T(W(2).level.set(t))}),L()}if(e&2){let e=W(2);F(`options`,e.levelOptions)(`value`,e.level())}}function s8(e,t){if(e&1){let e=V();I(0,`app-select`,22),H(`valueChange`,function(t){w(e);let n=W(2);return T(n.pageId.set(t??n.allPages))}),L()}if(e&2){let e=W(2);F(`options`,e.pageOptions())(`value`,e.pageId())}}function c8(e,t){e&1&&(I(0,`p`,24),K(1,` Angular's ErrorHandler isn't wrapped on this page yet, so errors Angular catches show up only when the default handler logs them. `),L())}function l8(e,t){if(e&1&&(I(0,`p`,24),K(1),L()),e&2){let e=W(3);O(),Y(` `,e.droppedErrors(),` older error `,e.droppedErrors()===1?`group was`:`groups were`,` dropped. Each page keeps its last 100. `)}}function u8(e,t){e&1&&(I(0,`p`,25),K(1,` No errors since the page loaded. Errors show up here as the app hits them. `),L())}function d8(e,t){if(e&1){let e=V();I(0,`div`,25)(1,`p`),K(2),L(),I(3,`button`,3),H(`click`,function(){w(e),W(2);let t=Qg(17);return W().filter.set(``),T(t.focus())}),K(4,` Clear filters `),L()()}if(e&2){let e=W(3);O(2),J(`No error matches “`,e.filter(),`”.`)}}function f8(e,t){if(e&1&&(I(0,`a`,34),K(1),I(2,`span`,36),K(3,` reference (opens in a new tab)`),L()()),e&2){let e=W();F(`href`,t,ku),O(),q(e)}}function p8(e,t){if(e&1&&(I(0,`span`,35),K(1),L()),e&2){let e=W();O(),q(e)}}function m8(e,t){if(e&1&&j(0,f8,4,2,`a`,34)(1,p8,2,1,`span`,35),e&2){let e,n=W().$implicit;M((e=W(4).codeLink(t,n.docUrl).href)?0:1,e)}}function h8(e,t){if(e&1&&(I(0,`span`,32),K(1),L()),e&2){let e=t.$implicit,n=W(5);O(),q(n.sourceLabels[e])}}function g8(e,t){if(e&1&&(I(0,`span`,4),K(1),L()),e&2){let e=W().$implicit,t=W(4);O(),q(t.pageLabel(e.pageId))}}function _8(e,t){if(e&1){let e=V();I(0,`button`,38),H(`click`,function(){w(e);let t=W(),n=W().$implicit;return T(W(4).showComponent.emit({id:t.id,pageId:n.pageId}))}),K(1,` Show component `),I(2,`code`),K(3),L()()}if(e&2){let e=W();O(3),q(e.name)}}function v8(e,t){if(e&1&&(I(0,`span`,4),K(1,`In `),I(2,`code`),K(3),L()()),e&2){let e=W();O(3),q(e.name)}}function y8(e,t){e&1&&j(0,_8,4,1,`button`,37)(1,v8,4,1,`span`,4),e&2&&M(+!W(5).canShowComponent())}function b8(e,t){if(e&1&&R(0,`app-error-explain`,33),e&2){let e=W().$implicit,n=W(4);F(`explain`,t)(`owner`,e.owner)(`pageId`,e.pageId)(`rpc`,n.rpc())(`canExplain`,n.canExplainInjection())}}function x8(e,t){if(e&1&&(I(0,`details`)(1,`summary`),K(2,`Stack`),L(),I(3,`pre`,39),K(4),L()()),e&2){let e=W().$implicit;O(4),q(e.stack)}}function S8(e,t){if(e&1&&(I(0,`li`,27)(1,`div`,28)(2,`span`,29),K(3),L(),I(4,`code`,30),K(5),L()(),I(6,`div`,31),j(7,m8,2,1),N(8,h8,2,1,`span`,32,_g),I(10,`span`,4),K(11),L(),j(12,g8,2,1,`span`,4),j(13,y8,2,1),L(),j(14,b8,1,5,`app-error-explain`,33),j(15,x8,5,1,`details`),L()),e&2){let e,n,r,i=t.$implicit,a=W(4);O(2),A(`aria-label`,a.timesLabel(i.count)),O(),J(` `,i.count,`× `),O(2),q(i.message),O(2),M((e=i.code)?7:-1,e),O(),P(i.sources),O(3),J(`Last at `,a.time(i.lastAt)),O(),M(a.showPage()?12:-1),O(),M((n=i.owner)?13:-1,n),O(),M((r=i.explain)?14:-1,r),O(),M(i.stack?15:-1)}}function C8(e,t){if(e&1&&(I(0,`ol`,26),N(1,S8,16,9,`li`,27,n8),L()),e&2){let e=W(3);O(),P(e.shownErrors())}}function w8(e,t){if(e&1&&(I(0,`section`,19)(1,`h2`,23),K(2,`Errors`),L(),j(3,c8,2,0,`p`,24),j(4,l8,2,2,`p`,24),j(5,u8,2,0,`p`,25)(6,d8,5,1,`div`,25)(7,C8,3,0,`ol`,26),L()),e&2){let e=W(2);O(3),M(e.unwrapped()?3:-1),O(),M(e.droppedErrors()?4:-1),O(),M(e.errors().length?e.shownErrors().length?7:6:5)}}function T8(e,t){if(e&1&&(I(0,`p`,24),K(1),L()),e&2){let e=W(3);O(),Y(` `,e.droppedConsole(),` older `,e.droppedConsole()===1?`call was`:`calls were`,` dropped. Each page keeps its last 200. `)}}function E8(e,t){e&1&&(I(0,`p`,25),K(1,` No console calls since the overlay connected. They show up here as the app logs. `),L())}function D8(e,t){if(e&1){let e=V();I(0,`div`,25)(1,`p`),K(2,`No console call matches the filters.`),L(),I(3,`button`,3),H(`click`,function(){w(e),W(2);let t=Qg(17);return W().clearFilters(),T(t.focus())}),K(4,` Clear filters `),L()()}}function O8(e,t){if(e&1&&(I(0,`span`,29),K(1),L()),e&2){let e=W().$implicit;A(`aria-label`,W(4).timesLabel(e.count)),O(),J(``,e.count,`×`)}}function k8(e,t){if(e&1&&(I(0,`a`,34),K(1),I(2,`span`,36),K(3,` reference (opens in a new tab)`),L()()),e&2){let e=W();F(`href`,t,ku),O(),q(e)}}function A8(e,t){if(e&1&&(I(0,`span`,46),K(1),L()),e&2){let e=W();O(),q(e)}}function j8(e,t){if(e&1&&j(0,k8,4,2,`a`,34)(1,A8,2,1,`span`,46),e&2){let e,n=W().$implicit;M((e=W(4).codeLink(t,n.docUrl).href)?0:1,e)}}function M8(e,t){if(e&1&&(I(0,`li`,42)(1,`span`,43),K(2),L(),I(3,`code`,44),K(4),L(),j(5,O8,2,2,`span`,29),j(6,j8,2,1),I(7,`time`,45),K(8),L()()),e&2){let e,n=t.$implicit,r=W(4);O(),A(`data-tone`,r.levelTone[n.level]),O(),q(n.level),O(2),q(n.text),O(),M(n.count>1?5:-1),O(),M((e=n.code)?6:-1,e),O(2),q(r.time(n.at))}}function N8(e,t){if(e&1&&(I(0,`ol`,41),N(1,M8,9,6,`li`,42,n8),L()),e&2){let e=W(3);O(),P(e.shownEntries())}}function P8(e,t){if(e&1&&(I(0,`section`,20)(1,`h2`,40),K(2,`Console`),L(),j(3,T8,2,2,`p`,24),j(4,E8,2,0,`p`,25)(5,D8,5,0,`div`,25)(6,N8,3,0,`ol`,41),L()),e&2){let e=W(2);O(3),M(e.droppedConsole()?3:-1),O(),M(e.entries().length?e.shownEntries().length?6:5:4)}}function F8(e,t){if(e&1){let e=V();I(0,`p`,5),K(1,` Errors from Angular's ErrorHandler, uncaught errors and unhandled promise rejections on the live page, grouped by message, and the page's console calls. Messages and values are masked like other live data. `),L(),I(2,`div`,6)(3,`div`,7)(4,`button`,8),H(`click`,function(){return w(e),T(W().view.set(`errors`))}),K(5,` Errors `),I(6,`span`,9),K(7),L()(),I(8,`button`,8),H(`click`,function(){return w(e),T(W().view.set(`console`))}),K(9,` Console `),I(10,`span`,9),K(11),L()()(),I(12,`div`,10),E(),I(13,`svg`,11),R(14,`circle`,12)(15,`path`,13),L(),bs(),I(16,`input`,14,0),H(`input`,function(t){return w(e),T(W().filter.set(t.target.value))})(`keydown.escape`,function(){return w(e),T(W().filter.set(``))}),L()(),j(18,o8,1,2,`app-select`,15),j(19,s8,1,2,`app-select`,16),I(20,`span`,17),K(21),L(),I(22,`p`,18),K(23),L()(),j(24,w8,8,3,`section`,19)(25,P8,7,2,`section`,20)}if(e&2){let e=W();O(4),A(`aria-pressed`,e.view()===`errors`),O(3),q(e.errors().length),O(),A(`aria-pressed`,e.view()===`console`),O(3),q(e.entries().length),O(5),F(`placeholder`,e.view()===`errors`?`Filter by message or code`:`Filter by text`)(`value`,e.filter()),A(`aria-label`,e.view()===`errors`?`Filter errors`:`Filter console calls`),O(2),M(e.view()===`console`?18:-1),O(),M(e.pageOptions().length>2?19:-1),O(2),q(e.countText()),O(2),q(e.countStatus()),O(),M(e.view()===`errors`?24:25)}}var I8={error:`danger`,warn:`warn`,info:`accent`,log:`plain`,debug:`plain`},L8=class e{rpc=$(null);canShowComponent=$(!0);canExplainInjection=$(!1);showComponent=bv();destroyRef=C(As);hostPageId=XT();unsubscribe;time=vO;codeLink=r6;sourceLabels=Z3;levelTone=I8;allPages=`all`;levelOptions=[{value:`all`,label:`All levels`},...Y3.map(e=>({value:e,label:e}))];pages=D([]);loaded=D(!1);failed=D(!1);view=D(`errors`);filter=D(``);level=D(`all`);pageId=Q({source:()=>this.pages(),computation:(e,t)=>t?.value&&(t.value===`all`||e.some(e=>e.pageId===t.value))?t.value:e6(e,this.hostPageId)});pageOptions=X(()=>[{value:`all`,label:`All pages`},...this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.url}))]);showPage=X(()=>this.pageId()===`all`&&this.pages().length>1);picked=X(()=>this.pages().filter(e=>this.pageId()===`all`||e.pageId===this.pageId()));unwrapped=X(()=>this.picked().some(e=>e.handler!==`wrapped`));droppedErrors=X(()=>this.picked().reduce((e,t)=>e+t.dropped.errors,0));droppedConsole=X(()=>this.picked().reduce((e,t)=>e+t.dropped.console,0));errors=X(()=>t6(this.pages(),this.pageId()));entries=X(()=>n6(this.pages(),this.pageId()));shownErrors=X(()=>{let e=this.filter().trim().toLowerCase();return e?this.errors().filter(t=>t.message.toLowerCase().includes(e)||(t.code??``).toLowerCase().includes(e)||(t.owner?.name??``).toLowerCase().includes(e)):this.errors()});shownEntries=X(()=>{let e=this.filter().trim().toLowerCase(),t=this.level();return this.entries().filter(n=>(t===`all`||n.level===t)&&(!e||n.text.toLowerCase().includes(e)))});countText=X(()=>{let[e,t,n]=this.view()===`errors`?[this.shownErrors().length,this.errors().length,`error`]:[this.shownEntries().length,this.entries().length,`call`];return`${e} of ${t} ${t===1?n:`${n}s`}`});countStatus=J3(()=>[this.view(),this.filter(),this.level(),this.pageId()],()=>this.countText());constructor(){_c(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}retry(){let e=this.rpc();e&&this.load(e)}clearFilters(){this.filter.set(``),this.level.set(`all`)}timesLabel(e){return e===1?`Once`:`${e} times`}pageLabel(e){let t=this.pages().find(t=>t.pageId===e);return t?.title||t?.url||e}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`errors`);if(this.destroyRef.destroyed)return;let n=e=>this.pages.set($3(e));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-errors-inspector`]],inputs:{rpc:[1,`rpc`],canShowComponent:[1,`canShowComponent`],canExplainInjection:[1,`canExplainInjection`]},outputs:{showComponent:`showComponent`},decls:4,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`],[1,`intro`],[1,`toolbar`],[`role`,`group`,`aria-label`,`Show`,1,`views`],[`type`,`button`,1,`view`,3,`click`],[1,`badge`],[1,`search`],[`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`,3,`input`,`keydown.escape`,`placeholder`,`value`],[`ariaLabel`,`Console level`,1,`level-select`,3,`options`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`options`,`value`],[1,`count`],[`role`,`status`,1,`sr-only`],[`aria-labelledby`,`errors-title`],[`aria-labelledby`,`console-title`],[`ariaLabel`,`Console level`,1,`level-select`,3,`valueChange`,`options`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`valueChange`,`options`,`value`],[`id`,`errors-title`,1,`sr-only`],[1,`notice`],[1,`empty`],[`aria-label`,`Errors, most recent first`,1,`errors`],[1,`error`],[1,`head`],[1,`times`],[1,`message`],[1,`meta`],[1,`chip`,`source`],[3,`explain`,`owner`,`pageId`,`rpc`,`canExplain`],[`target`,`_blank`,`rel`,`noopener noreferrer`,1,`chip`,`code`,3,`href`],[`title`,`No page in Angular's error reference`,1,`chip`,`code`,`plain`],[1,`sr-only`],[`type`,`button`,1,`link`],[`type`,`button`,1,`link`,3,`click`],[`tabindex`,`0`,`aria-label`,`Stack trace`],[`id`,`console-title`,1,`sr-only`],[`aria-label`,`Console calls, newest first`,1,`console`],[1,`entry`],[1,`chip`,`level`],[1,`text`],[1,`when`],[1,`chip`,`code`,`plain`]],template:function(e,t){e&1&&j(0,r8,2,0,`p`,1)(1,i8,5,0,`div`,2)(2,a8,5,0,`div`,1)(3,F8,26,12),e&2&&M(t.loaded()?t.failed()?1:t.pages().length?3:2:0)},dependencies:[JD,t8],styles:[`[_nghost-%COMP%] { +}`]})},a8=(e,t)=>t.pageId+t.id;function o8(e,t){e&1&&(I(0,`p`,1),K(1,`Loading errors…`),L())}function s8(e,t){if(e&1){let e=V();I(0,`div`,2)(1,`p`),K(2,`Can't read the errors from the devtools server.`),L(),I(3,`button`,3),H(`click`,function(){return w(e),T(W().retry())}),K(4,`Retry`),L()()}}function c8(e,t){e&1&&(I(0,`div`,1)(1,`p`),K(2,`No page reports errors yet.`),L(),I(3,`p`,4),K(4,` Open the app with the overlay loaded. Errors and console calls show up here as they happen. `),L()())}function l8(e,t){if(e&1){let e=V();I(0,`app-select`,21),H(`valueChange`,function(t){return w(e),T(W(2).level.set(t))}),L()}if(e&2){let e=W(2);F(`options`,e.levelOptions)(`value`,e.level())}}function u8(e,t){if(e&1){let e=V();I(0,`app-select`,22),H(`valueChange`,function(t){w(e);let n=W(2);return T(n.pageId.set(t??n.allPages))}),L()}if(e&2){let e=W(2);F(`options`,e.pageOptions())(`value`,e.pageId())}}function d8(e,t){e&1&&(I(0,`p`,24),K(1,` Angular's ErrorHandler isn't wrapped on this page yet, so errors Angular catches show up only when the default handler logs them. `),L())}function f8(e,t){if(e&1&&(I(0,`p`,24),K(1),L()),e&2){let e=W(3);O(),Y(` `,e.droppedErrors(),` older error `,e.droppedErrors()===1?`group was`:`groups were`,` dropped. Each page keeps its last 100. `)}}function p8(e,t){e&1&&(I(0,`p`,25),K(1,` No errors since the page loaded. Errors show up here as the app hits them. `),L())}function m8(e,t){if(e&1){let e=V();I(0,`div`,25)(1,`p`),K(2),L(),I(3,`button`,3),H(`click`,function(){w(e),W(2);let t=Qg(17);return W().filter.set(``),T(t.focus())}),K(4,` Clear filters `),L()()}if(e&2){let e=W(3);O(2),J(`No error matches “`,e.filter(),`”.`)}}function h8(e,t){if(e&1&&(I(0,`a`,34),K(1),I(2,`span`,36),K(3,` reference (opens in a new tab)`),L()()),e&2){let e=W();F(`href`,t,ku),O(),q(e)}}function g8(e,t){if(e&1&&(I(0,`span`,35),K(1),L()),e&2){let e=W();O(),q(e)}}function _8(e,t){if(e&1&&j(0,h8,4,2,`a`,34)(1,g8,2,1,`span`,35),e&2){let e,n=W().$implicit;M((e=W(4).codeLink(t,n.docUrl).href)?0:1,e)}}function v8(e,t){if(e&1&&(I(0,`span`,32),K(1),L()),e&2){let e=t.$implicit,n=W(5);O(),q(n.sourceLabels[e])}}function y8(e,t){if(e&1&&(I(0,`span`,4),K(1),L()),e&2){let e=W().$implicit,t=W(4);O(),q(t.pageLabel(e.pageId))}}function b8(e,t){if(e&1){let e=V();I(0,`button`,38),H(`click`,function(){w(e);let t=W(),n=W().$implicit;return T(W(4).showComponent.emit({id:t.id,pageId:n.pageId}))}),K(1,` Show component `),I(2,`code`),K(3),L()()}if(e&2){let e=W();O(3),q(e.name)}}function x8(e,t){if(e&1&&(I(0,`span`,4),K(1,`In `),I(2,`code`),K(3),L()()),e&2){let e=W();O(3),q(e.name)}}function S8(e,t){e&1&&j(0,b8,4,1,`button`,37)(1,x8,4,1,`span`,4),e&2&&M(+!W(5).canShowComponent())}function C8(e,t){if(e&1&&R(0,`app-error-explain`,33),e&2){let e=W().$implicit,n=W(4);F(`explain`,t)(`owner`,e.owner)(`pageId`,e.pageId)(`rpc`,n.rpc())(`canExplain`,n.canExplainInjection())}}function w8(e,t){if(e&1&&(I(0,`details`)(1,`summary`),K(2,`Stack`),L(),I(3,`pre`,39),K(4),L()()),e&2){let e=W().$implicit;O(4),q(e.stack)}}function T8(e,t){if(e&1&&(I(0,`li`,27)(1,`div`,28)(2,`span`,29),K(3),L(),I(4,`code`,30),K(5),L()(),I(6,`div`,31),j(7,_8,2,1),N(8,v8,2,1,`span`,32,_g),I(10,`span`,4),K(11),L(),j(12,y8,2,1,`span`,4),j(13,S8,2,1),L(),j(14,C8,1,5,`app-error-explain`,33),j(15,w8,5,1,`details`),L()),e&2){let e,n,r,i=t.$implicit,a=W(4);O(2),A(`aria-label`,a.timesLabel(i.count)),O(),J(` `,i.count,`× `),O(2),q(i.message),O(2),M((e=i.code)?7:-1,e),O(),P(i.sources),O(3),J(`Last at `,a.time(i.lastAt)),O(),M(a.showPage()?12:-1),O(),M((n=i.owner)?13:-1,n),O(),M((r=i.explain)?14:-1,r),O(),M(i.stack?15:-1)}}function E8(e,t){if(e&1&&(I(0,`ol`,26),N(1,T8,16,9,`li`,27,a8),L()),e&2){let e=W(3);O(),P(e.shownErrors())}}function D8(e,t){if(e&1&&(I(0,`section`,19)(1,`h2`,23),K(2,`Errors`),L(),j(3,d8,2,0,`p`,24),j(4,f8,2,2,`p`,24),j(5,p8,2,0,`p`,25)(6,m8,5,1,`div`,25)(7,E8,3,0,`ol`,26),L()),e&2){let e=W(2);O(3),M(e.unwrapped()?3:-1),O(),M(e.droppedErrors()?4:-1),O(),M(e.errors().length?e.shownErrors().length?7:6:5)}}function O8(e,t){if(e&1&&(I(0,`p`,24),K(1),L()),e&2){let e=W(3);O(),Y(` `,e.droppedConsole(),` older `,e.droppedConsole()===1?`call was`:`calls were`,` dropped. Each page keeps its last 200. `)}}function k8(e,t){e&1&&(I(0,`p`,25),K(1,` No console calls since the overlay connected. They show up here as the app logs. `),L())}function A8(e,t){if(e&1){let e=V();I(0,`div`,25)(1,`p`),K(2,`No console call matches the filters.`),L(),I(3,`button`,3),H(`click`,function(){w(e),W(2);let t=Qg(17);return W().clearFilters(),T(t.focus())}),K(4,` Clear filters `),L()()}}function j8(e,t){if(e&1&&(I(0,`span`,29),K(1),L()),e&2){let e=W().$implicit;A(`aria-label`,W(4).timesLabel(e.count)),O(),J(``,e.count,`×`)}}function M8(e,t){if(e&1&&(I(0,`a`,34),K(1),I(2,`span`,36),K(3,` reference (opens in a new tab)`),L()()),e&2){let e=W();F(`href`,t,ku),O(),q(e)}}function N8(e,t){if(e&1&&(I(0,`span`,46),K(1),L()),e&2){let e=W();O(),q(e)}}function P8(e,t){if(e&1&&j(0,M8,4,2,`a`,34)(1,N8,2,1,`span`,46),e&2){let e,n=W().$implicit;M((e=W(4).codeLink(t,n.docUrl).href)?0:1,e)}}function F8(e,t){if(e&1&&(I(0,`li`,42)(1,`span`,43),K(2),L(),I(3,`code`,44),K(4),L(),j(5,j8,2,2,`span`,29),j(6,P8,2,1),I(7,`time`,45),K(8),L()()),e&2){let e,n=t.$implicit,r=W(4);O(),A(`data-tone`,r.levelTone[n.level]),O(),q(n.level),O(2),q(n.text),O(),M(n.count>1?5:-1),O(),M((e=n.code)?6:-1,e),O(2),q(r.time(n.at))}}function I8(e,t){if(e&1&&(I(0,`ol`,41),N(1,F8,9,6,`li`,42,a8),L()),e&2){let e=W(3);O(),P(e.shownEntries())}}function L8(e,t){if(e&1&&(I(0,`section`,20)(1,`h2`,40),K(2,`Console`),L(),j(3,O8,2,2,`p`,24),j(4,k8,2,0,`p`,25)(5,A8,5,0,`div`,25)(6,I8,3,0,`ol`,41),L()),e&2){let e=W(2);O(3),M(e.droppedConsole()?3:-1),O(),M(e.entries().length?e.shownEntries().length?6:5:4)}}function R8(e,t){if(e&1){let e=V();I(0,`p`,5),K(1,` Errors from Angular's ErrorHandler, uncaught errors and unhandled promise rejections on the live page, grouped by message, and the page's console calls. Messages and values are masked like other live data. `),L(),I(2,`div`,6)(3,`div`,7)(4,`button`,8),H(`click`,function(){return w(e),T(W().view.set(`errors`))}),K(5,` Errors `),I(6,`span`,9),K(7),L()(),I(8,`button`,8),H(`click`,function(){return w(e),T(W().view.set(`console`))}),K(9,` Console `),I(10,`span`,9),K(11),L()()(),I(12,`div`,10),E(),I(13,`svg`,11),R(14,`circle`,12)(15,`path`,13),L(),bs(),I(16,`input`,14,0),H(`input`,function(t){return w(e),T(W().filter.set(t.target.value))})(`keydown.escape`,function(){return w(e),T(W().filter.set(``))}),L()(),j(18,l8,1,2,`app-select`,15),j(19,u8,1,2,`app-select`,16),I(20,`span`,17),K(21),L(),I(22,`p`,18),K(23),L()(),j(24,D8,8,3,`section`,19)(25,L8,7,2,`section`,20)}if(e&2){let e=W();O(4),A(`aria-pressed`,e.view()===`errors`),O(3),q(e.errors().length),O(),A(`aria-pressed`,e.view()===`console`),O(3),q(e.entries().length),O(5),F(`placeholder`,e.view()===`errors`?`Filter by message or code`:`Filter by text`)(`value`,e.filter()),A(`aria-label`,e.view()===`errors`?`Filter errors`:`Filter console calls`),O(2),M(e.view()===`console`?18:-1),O(),M(e.pageOptions().length>2?19:-1),O(2),q(e.countText()),O(2),q(e.countStatus()),O(),M(e.view()===`errors`?24:25)}}var z8={error:`danger`,warn:`warn`,info:`accent`,log:`plain`,debug:`plain`},B8=class e{rpc=$(null);canShowComponent=$(!0);canExplainInjection=$(!1);showComponent=bv();destroyRef=C(As);hostPageId=XT();unsubscribe;time=vO;codeLink=o6;sourceLabels=e6;levelTone=z8;allPages=`all`;levelOptions=[{value:`all`,label:`All levels`},...Q3.map(e=>({value:e,label:e}))];pages=D([]);loaded=D(!1);failed=D(!1);view=D(`errors`);filter=D(``);level=D(`all`);pageId=Q({source:()=>this.pages(),computation:(e,t)=>t?.value&&(t.value===`all`||e.some(e=>e.pageId===t.value))?t.value:r6(e,this.hostPageId)});pageOptions=X(()=>[{value:`all`,label:`All pages`},...this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.url}))]);showPage=X(()=>this.pageId()===`all`&&this.pages().length>1);picked=X(()=>this.pages().filter(e=>this.pageId()===`all`||e.pageId===this.pageId()));unwrapped=X(()=>this.picked().some(e=>e.handler!==`wrapped`));droppedErrors=X(()=>this.picked().reduce((e,t)=>e+t.dropped.errors,0));droppedConsole=X(()=>this.picked().reduce((e,t)=>e+t.dropped.console,0));errors=X(()=>i6(this.pages(),this.pageId()));entries=X(()=>a6(this.pages(),this.pageId()));shownErrors=X(()=>{let e=this.filter().trim().toLowerCase();return e?this.errors().filter(t=>t.message.toLowerCase().includes(e)||(t.code??``).toLowerCase().includes(e)||(t.owner?.name??``).toLowerCase().includes(e)):this.errors()});shownEntries=X(()=>{let e=this.filter().trim().toLowerCase(),t=this.level();return this.entries().filter(n=>(t===`all`||n.level===t)&&(!e||n.text.toLowerCase().includes(e)))});countText=X(()=>{let[e,t,n]=this.view()===`errors`?[this.shownErrors().length,this.errors().length,`error`]:[this.shownEntries().length,this.entries().length,`call`];return`${e} of ${t} ${t===1?n:`${n}s`}`});countStatus=Z3(()=>[this.view(),this.filter(),this.level(),this.pageId()],()=>this.countText());constructor(){_c(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}retry(){let e=this.rpc();e&&this.load(e)}clearFilters(){this.filter.set(``),this.level.set(`all`)}timesLabel(e){return e===1?`Once`:`${e} times`}pageLabel(e){let t=this.pages().find(t=>t.pageId===e);return t?.title||t?.url||e}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`errors`);if(this.destroyRef.destroyed)return;let n=e=>this.pages.set(n6(e));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-errors-inspector`]],inputs:{rpc:[1,`rpc`],canShowComponent:[1,`canShowComponent`],canExplainInjection:[1,`canExplainInjection`]},outputs:{showComponent:`showComponent`},decls:4,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`],[1,`intro`],[1,`toolbar`],[`role`,`group`,`aria-label`,`Show`,1,`views`],[`type`,`button`,1,`view`,3,`click`],[1,`badge`],[1,`search`],[`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`,3,`input`,`keydown.escape`,`placeholder`,`value`],[`ariaLabel`,`Console level`,1,`level-select`,3,`options`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`options`,`value`],[1,`count`],[`role`,`status`,1,`sr-only`],[`aria-labelledby`,`errors-title`],[`aria-labelledby`,`console-title`],[`ariaLabel`,`Console level`,1,`level-select`,3,`valueChange`,`options`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`valueChange`,`options`,`value`],[`id`,`errors-title`,1,`sr-only`],[1,`notice`],[1,`empty`],[`aria-label`,`Errors, most recent first`,1,`errors`],[1,`error`],[1,`head`],[1,`times`],[1,`message`],[1,`meta`],[1,`chip`,`source`],[3,`explain`,`owner`,`pageId`,`rpc`,`canExplain`],[`target`,`_blank`,`rel`,`noopener noreferrer`,1,`chip`,`code`,3,`href`],[`title`,`No page in Angular's error reference`,1,`chip`,`code`,`plain`],[1,`sr-only`],[`type`,`button`,1,`link`],[`type`,`button`,1,`link`,3,`click`],[`tabindex`,`0`,`aria-label`,`Stack trace`],[`id`,`console-title`,1,`sr-only`],[`aria-label`,`Console calls, newest first`,1,`console`],[1,`entry`],[1,`chip`,`level`],[1,`text`],[1,`when`],[1,`chip`,`code`,`plain`]],template:function(e,t){e&1&&j(0,o8,2,0,`p`,1)(1,s8,5,0,`div`,2)(2,c8,5,0,`div`,1)(3,R8,26,12),e&2&&M(t.loaded()?t.failed()?1:t.pages().length?3:2:0)},dependencies:[JD,i8],styles:[`[_nghost-%COMP%] { display: block; font-size: 13px; } @@ -18279,7 +18279,7 @@ pre[_ngcontent-%COMP%]:focus-visible { .empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .state[_ngcontent-%COMP%] p[_ngcontent-%COMP%] { margin: 0 0 8px; -}`]})},R8=e=>({$implicit:e,depth:0}),z8=(e,t)=>({$implicit:e,depth:t}),B8=(e,t)=>t.key;function V8(e,t){if(e&1&&(I(0,`div`,6)(1,`dt`),K(2),L(),I(3,`dd`),K(4),L()()),e&2){let e=t.$implicit;A(`data-tone`,e.tone??null),O(2),q(e.label),O(2),q(e.value)}}function H8(e,t){if(e&1&&(I(0,`dl`,3),N(1,V8,5,3,`div`,6,gg),L()),e&2){W();let e=J_(0);O(),P(e.items)}}function U8(e,t){if(e&1&&(I(0,`p`,4),K(1),L()),e&2){W();let e=J_(0);O(),q(e.text)}}function W8(e,t){if(e&1&&(I(0,`p`,7),K(1),L()),e&2){W(2);let e=J_(0);O(),q(e.empty??`No rows.`)}}function G8(e,t){e&1&&(I(0,`p`,7),K(1,`No row matches the filter.`),L())}function K8(e,t){if(e&1&&(I(0,`th`,9),K(1),L()),e&2){let e=t.$implicit;O(),q(e.label)}}function q8(e,t){if(e&1&&(I(0,`span`,10),K(1),L()),e&2){W();let e=J_(0),n=W(4);A(`data-tone`,t),O(),q(n.cellText(e))}}function J8(e,t){if(e&1&&K(0),e&2){W();let e=J_(0);J(` `,W(4).cellText(e),` `)}}function Y8(e,t){if(e&1&&(K_(0),I(1,`td`),j(2,q8,2,2,`span`,10)(3,J8,1,1),L()),e&2){let e,n=t.$implicit,r=W().$implicit,i=W(3),a=q_(r[n.key]);O(2),M((e=i.toneOf(a))?2:3,e)}}function X8(e,t){if(e&1&&(I(0,`tr`),N(1,Y8,4,2,`td`,null,B8),L()),e&2){W(3);let e=J_(0);O(),P(e.columns)}}function Z8(e,t){if(e&1&&(I(0,`div`,8)(1,`table`)(2,`thead`)(3,`tr`),N(4,K8,2,1,`th`,9,B8),L()(),I(6,`tbody`),N(7,X8,3,0,`tr`,null,gg),L()()()),e&2){let e=W(2),t=J_(0);A(`aria-labelledby`,e.headingId()),O(4),P(t.columns),O(3),P(e.rows())}}function Q8(e,t){if(e&1&&j(0,W8,2,1,`p`,7)(1,G8,2,0,`p`,7)(2,Z8,9,1,`div`,8),e&2){let e=W();M(J_(0).rows.length?e.rows().length?2:1:0)}}function $8(e,t){if(e&1&&(I(0,`p`,7),K(1),L()),e&2){W(2);let e=J_(0);O(),q(e.empty??`Nothing listed.`)}}function e5(e,t){e&1&&(I(0,`p`,7),K(1,`No item matches the filter.`),L())}function t5(e,t){if(e&1&&(I(0,`span`,10),K(1),L()),e&2){let e=t;A(`data-tone`,e.tone??`neutral`),O(),q(e.label)}}function n5(e,t){if(e&1&&(I(0,`span`,13),K(1),L()),e&2){let e=W().$implicit;O(),q(e.detail)}}function r5(e,t){if(e&1&&(I(0,`li`)(1,`span`,12),K(2),L(),j(3,t5,2,2,`span`,10),j(4,n5,2,1,`span`,13),L()),e&2){let e,n=t.$implicit;O(2),q(n.label),O(),M((e=n.badge)?3:-1,e),O(),M(n.detail?4:-1)}}function i5(e,t){if(e&1&&(I(0,`ul`,11),N(1,r5,5,3,`li`,null,gg),L()),e&2){let e=W(2);O(),P(e.items())}}function a5(e,t){if(e&1&&j(0,$8,2,1,`p`,7)(1,e5,2,0,`p`,7)(2,i5,3,0,`ul`,11),e&2){let e=W();M(J_(0).items.length?e.items().length?2:1:0)}}function o5(e,t){if(e&1&&Mg(0,5),e&2){W();let e=Qg(10),t=J_(0);F(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,iv(2,R8,t.value))}}function s5(e,t){if(e&1&&(I(0,`code`,14),K(1),L()),e&2){let e=W().$implicit,t=W();O(),q(t.leafText(e))}}function c5(e,t){if(e&1&&(I(0,`details`,17)(1,`summary`)(2,`span`,18),K(3),L(),I(4,`span`,19),K(5),L()(),Mg(6,5),L()),e&2){let e=W().$implicit,t=W(2).depth,n=J_(0);W();let r=Qg(10);F(`open`,t===0&&n.length<=8),O(3),q(e.key),O(2),q(e.summary),O(),F(`ngTemplateOutlet`,r)(`ngTemplateOutletContext`,av(5,z8,e.value,t+1))}}function l5(e,t){if(e&1&&(I(0,`span`,18),K(1),L(),I(2,`code`,14),K(3),L()),e&2){let e=W().$implicit;O(),q(e.key),O(2),q(e.summary)}}function u5(e,t){if(e&1&&(I(0,`li`),j(1,c5,7,8,`details`,17)(2,l5,4,2),L()),e&2){let e=t.$implicit,n=W(2).depth,r=W();O(),M(e.nested&&ne.columns.some(e=>m5(p5(t[e.key]),n))).length,total:e.rows.length}:e.kind===`list`?{shown:e.items.filter(e=>m5(`${e.label} ${e.detail??``} ${e.badge?.label??``}`,n)).length,total:e.items.length}:{shown:0,total:0}}var g5=8,_5=200;function Lne(e){return!e||typeof e!=`object`?[]:(Array.isArray(e)?e.map((e,t)=>[String(t),e]):Object.entries(e)).slice(0,_5).map(([e,t])=>{let n=!!t&&typeof t==`object`;return{key:e,value:t,nested:n,summary:Array.isArray(t)?`Array(${t.length})`:n?`{${Object.keys(t).length}}`:t===null?`null`:typeof t==`string`?JSON.stringify(t):String(t)}})}var Rne=class e{section=$.required();filter=$(``);index=$(0);maxDepth=g5;cellText=p5;entriesOf=Lne;headingId=X(()=>`plugin-section-${this.index()}`);text=X(()=>this.filter().trim().toLowerCase());rows=X(()=>{let e=this.section();if(e.kind!==`table`)return[];let t=this.text();return e.rows.filter(n=>e.columns.some(e=>m5(p5(n[e.key]),t)))});items=X(()=>{let e=this.section();if(e.kind!==`list`)return[];let t=this.text();return e.items.filter(e=>m5(`${e.label} ${e.detail??``} ${e.badge?.label??``}`,t))});toneOf(e){return e&&typeof e==`object`&&e.tone?e.tone:null}leafText(e){return e==null?String(e):Array.isArray(e)?`[]`:typeof e==`object`?`{}`:typeof e==`string`?JSON.stringify(e):String(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-plugin-section`]],inputs:{section:[1,`section`],filter:[1,`filter`],index:[1,`index`]},decls:11,vars:5,consts:[[`tree`,``],[1,`section`],[1,`title`,3,`id`],[1,`stats`],[1,`text`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[1,`stat`],[1,`empty`],[`tabindex`,`0`,`role`,`region`,1,`table-wrap`],[`scope`,`col`],[1,`chip`],[1,`list`],[1,`label`],[1,`detail`],[1,`leaf`],[1,`tree`,3,`root`],[1,`tree`],[3,`open`],[1,`key`],[1,`summary`]],template:function(e,t){if(e&1&&(K_(0),I(1,`section`,1)(2,`h3`,2),K(3),L(),j(4,H8,3,0,`dl`,3)(5,U8,2,1,`p`,4)(6,Q8,3,1)(7,a5,3,1)(8,o5,1,4,`ng-container`,5),L(),Jh(9,f5,3,2,`ng-template`,null,0,pv)),e&2){let e,n=q_(t.section());O(),A(`aria-labelledby`,t.headingId()),O(),F(`id`,t.headingId()),O(),q(n.title),O(),M((e=n.kind)===`stats`?4:e===`text`?5:e===`table`?6:e===`list`?7:e===`tree`?8:-1)}},dependencies:[py],styles:[`[_nghost-%COMP%] { +}`]})},V8=e=>({$implicit:e,depth:0}),H8=(e,t)=>({$implicit:e,depth:t}),U8=(e,t)=>t.key;function W8(e,t){if(e&1&&(I(0,`div`,6)(1,`dt`),K(2),L(),I(3,`dd`),K(4),L()()),e&2){let e=t.$implicit;A(`data-tone`,e.tone??null),O(2),q(e.label),O(2),q(e.value)}}function G8(e,t){if(e&1&&(I(0,`dl`,3),N(1,W8,5,3,`div`,6,gg),L()),e&2){W();let e=J_(0);O(),P(e.items)}}function K8(e,t){if(e&1&&(I(0,`p`,4),K(1),L()),e&2){W();let e=J_(0);O(),q(e.text)}}function q8(e,t){if(e&1&&(I(0,`p`,7),K(1),L()),e&2){W(2);let e=J_(0);O(),q(e.empty??`No rows.`)}}function J8(e,t){e&1&&(I(0,`p`,7),K(1,`No row matches the filter.`),L())}function Y8(e,t){if(e&1&&(I(0,`th`,9),K(1),L()),e&2){let e=t.$implicit;O(),q(e.label)}}function X8(e,t){if(e&1&&(I(0,`span`,10),K(1),L()),e&2){W();let e=J_(0),n=W(4);A(`data-tone`,t),O(),q(n.cellText(e))}}function Z8(e,t){if(e&1&&K(0),e&2){W();let e=J_(0);J(` `,W(4).cellText(e),` `)}}function Q8(e,t){if(e&1&&(K_(0),I(1,`td`),j(2,X8,2,2,`span`,10)(3,Z8,1,1),L()),e&2){let e,n=t.$implicit,r=W().$implicit,i=W(3),a=q_(r[n.key]);O(2),M((e=i.toneOf(a))?2:3,e)}}function $8(e,t){if(e&1&&(I(0,`tr`),N(1,Q8,4,2,`td`,null,U8),L()),e&2){W(3);let e=J_(0);O(),P(e.columns)}}function e5(e,t){if(e&1&&(I(0,`div`,8)(1,`table`)(2,`thead`)(3,`tr`),N(4,Y8,2,1,`th`,9,U8),L()(),I(6,`tbody`),N(7,$8,3,0,`tr`,null,gg),L()()()),e&2){let e=W(2),t=J_(0);A(`aria-labelledby`,e.headingId()),O(4),P(t.columns),O(3),P(e.rows())}}function t5(e,t){if(e&1&&j(0,q8,2,1,`p`,7)(1,J8,2,0,`p`,7)(2,e5,9,1,`div`,8),e&2){let e=W();M(J_(0).rows.length?e.rows().length?2:1:0)}}function n5(e,t){if(e&1&&(I(0,`p`,7),K(1),L()),e&2){W(2);let e=J_(0);O(),q(e.empty??`Nothing listed.`)}}function r5(e,t){e&1&&(I(0,`p`,7),K(1,`No item matches the filter.`),L())}function i5(e,t){if(e&1&&(I(0,`span`,10),K(1),L()),e&2){let e=t;A(`data-tone`,e.tone??`neutral`),O(),q(e.label)}}function a5(e,t){if(e&1&&(I(0,`span`,13),K(1),L()),e&2){let e=W().$implicit;O(),q(e.detail)}}function o5(e,t){if(e&1&&(I(0,`li`)(1,`span`,12),K(2),L(),j(3,i5,2,2,`span`,10),j(4,a5,2,1,`span`,13),L()),e&2){let e,n=t.$implicit;O(2),q(n.label),O(),M((e=n.badge)?3:-1,e),O(),M(n.detail?4:-1)}}function s5(e,t){if(e&1&&(I(0,`ul`,11),N(1,o5,5,3,`li`,null,gg),L()),e&2){let e=W(2);O(),P(e.items())}}function c5(e,t){if(e&1&&j(0,n5,2,1,`p`,7)(1,r5,2,0,`p`,7)(2,s5,3,0,`ul`,11),e&2){let e=W();M(J_(0).items.length?e.items().length?2:1:0)}}function l5(e,t){if(e&1&&Mg(0,5),e&2){W();let e=Qg(10),t=J_(0);F(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,iv(2,V8,t.value))}}function u5(e,t){if(e&1&&(I(0,`code`,14),K(1),L()),e&2){let e=W().$implicit,t=W();O(),q(t.leafText(e))}}function d5(e,t){if(e&1&&(I(0,`details`,17)(1,`summary`)(2,`span`,18),K(3),L(),I(4,`span`,19),K(5),L()(),Mg(6,5),L()),e&2){let e=W().$implicit,t=W(2).depth,n=J_(0);W();let r=Qg(10);F(`open`,t===0&&n.length<=8),O(3),q(e.key),O(2),q(e.summary),O(),F(`ngTemplateOutlet`,r)(`ngTemplateOutletContext`,av(5,H8,e.value,t+1))}}function f5(e,t){if(e&1&&(I(0,`span`,18),K(1),L(),I(2,`code`,14),K(3),L()),e&2){let e=W().$implicit;O(),q(e.key),O(2),q(e.summary)}}function p5(e,t){if(e&1&&(I(0,`li`),j(1,d5,7,8,`details`,17)(2,f5,4,2),L()),e&2){let e=t.$implicit,n=W(2).depth,r=W();O(),M(e.nested&&ne.columns.some(e=>_5(g5(t[e.key]),n))).length,total:e.rows.length}:e.kind===`list`?{shown:e.items.filter(e=>_5(`${e.label} ${e.detail??``} ${e.badge?.label??``}`,n)).length,total:e.items.length}:{shown:0,total:0}}var Rne=8,zne=200;function Bne(e){return!e||typeof e!=`object`?[]:(Array.isArray(e)?e.map((e,t)=>[String(t),e]):Object.entries(e)).slice(0,zne).map(([e,t])=>{let n=!!t&&typeof t==`object`;return{key:e,value:t,nested:n,summary:Array.isArray(t)?`Array(${t.length})`:n?`{${Object.keys(t).length}}`:t===null?`null`:typeof t==`string`?JSON.stringify(t):String(t)}})}var Vne=class e{section=$.required();filter=$(``);index=$(0);maxDepth=Rne;cellText=g5;entriesOf=Bne;headingId=X(()=>`plugin-section-${this.index()}`);text=X(()=>this.filter().trim().toLowerCase());rows=X(()=>{let e=this.section();if(e.kind!==`table`)return[];let t=this.text();return e.rows.filter(n=>e.columns.some(e=>_5(g5(n[e.key]),t)))});items=X(()=>{let e=this.section();if(e.kind!==`list`)return[];let t=this.text();return e.items.filter(e=>_5(`${e.label} ${e.detail??``} ${e.badge?.label??``}`,t))});toneOf(e){return e&&typeof e==`object`&&e.tone?e.tone:null}leafText(e){return e==null?String(e):Array.isArray(e)?`[]`:typeof e==`object`?`{}`:typeof e==`string`?JSON.stringify(e):String(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-plugin-section`]],inputs:{section:[1,`section`],filter:[1,`filter`],index:[1,`index`]},decls:11,vars:5,consts:[[`tree`,``],[1,`section`],[1,`title`,3,`id`],[1,`stats`],[1,`text`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[1,`stat`],[1,`empty`],[`tabindex`,`0`,`role`,`region`,1,`table-wrap`],[`scope`,`col`],[1,`chip`],[1,`list`],[1,`label`],[1,`detail`],[1,`leaf`],[1,`tree`,3,`root`],[1,`tree`],[3,`open`],[1,`key`],[1,`summary`]],template:function(e,t){if(e&1&&(K_(0),I(1,`section`,1)(2,`h3`,2),K(3),L(),j(4,G8,3,0,`dl`,3)(5,K8,2,1,`p`,4)(6,t5,3,1)(7,c5,3,1)(8,l5,1,4,`ng-container`,5),L(),Jh(9,h5,3,2,`ng-template`,null,0,pv)),e&2){let e,n=q_(t.section());O(),A(`aria-labelledby`,t.headingId()),O(),F(`id`,t.headingId()),O(),q(n.title),O(),M((e=n.kind)===`stats`?4:e===`text`?5:e===`table`?6:e===`list`?7:e===`tree`?8:-1)}},dependencies:[py],styles:[`[_nghost-%COMP%] { display: block; } @@ -18507,7 +18507,7 @@ summary[_ngcontent-%COMP%]:focus-visible { color: var(--%NS%text); font-family: var(--%NS%font-mono); font-size: 12px; -}`]})},zne=()=>[],Bne=(e,t)=>t.name,Vne=(e,t)=>t.id;function Hne(e,t){e&1&&(I(0,`p`,1),K(1,`Loading plugins…`),L())}function Une(e,t){if(e&1){let e=V();I(0,`div`,2)(1,`p`),K(2,`Can't read the plugins from the devtools server.`),L(),I(3,`button`,3),H(`click`,function(){return w(e),T(W().retry())}),K(4,`Retry`),L()()}}function Wne(e,t){e&1&&(I(0,`div`,1)(1,`p`),K(2,`No plugin reports yet.`),L(),I(3,`p`,4),K(4,` A library adds a tab here with `),I(5,`code`),K(6,`registerPangularPlugin()`),L(),K(7,` from `),I(8,`code`),K(9,`@pangular-inspector/devtools/plugin`),L(),K(10,`. Its view shows up once the app runs with the overlay loaded. `),L()())}function Gne(e,t){if(e&1){let e=V();I(0,`button`,19),H(`click`,function(){let t=w(e).$implicit;return T(W(2).pluginId.set(t))}),K(1),L()}if(e&2){let e=t.$implicit,n=W(2);A(`aria-pressed`,n.pluginId()===e),O(),J(` `,n.titleOf(e),` `)}}function Kne(e,t){if(e&1){let e=V();I(0,`app-select`,20),H(`valueChange`,function(t){return w(e),T(W(2).pageId.set(t||null))}),L()}if(e&2){let e=W(2);F(`options`,e.pageOptions())(`value`,e.pageId()??``)}}function qne(e,t){if(e&1&&(I(0,`span`,23),K(1),L()),e&2){let e=W();O(),q(e.version)}}function Jne(e,t){if(e&1&&(I(0,`span`,24),K(1),L()),e&2){let e=t.$implicit;A(`data-tone`,e.tone??`plain`),O(),q(e.label)}}function Yne(e,t){e&1&&(I(0,`p`,25),K(1),L()),e&2&&(O(),q(t))}function Xne(e,t){if(e&1&&(I(0,`p`,4),K(1),L()),e&2){let e=W();O(),q(e.description)}}function Zne(e,t){if(e&1&&(I(0,`p`,26),K(1),L()),e&2){let e=W();O(),q(e.error)}}function Qne(e,t){if(e&1&&(I(0,`p`,4),K(1,` Actions of this plugin are turned off in the devtools config (`),I(2,`code`),K(3,`actions.plugins`),L(),K(4,` or `),I(5,`code`),K(6),L(),K(7,`). `),L()),e&2){let e=W(2);O(6),J(`plugins.`,e.id,`.actions`)}}function $ne(e,t){if(e&1){let e=V();I(0,`p`,31),K(1),L(),I(2,`button`,32),H(`click`,function(){let t=w(e);return T(W(4).run(t.name))}),K(3),L(),I(4,`button`,3),H(`click`,function(){return w(e),T(W(4).confirming.set(null))}),K(5,`Cancel`),L()}if(e&2){let e=t;O(),q(e.confirm),O(2),J(` `,e.label,` `)}}function ere(e,t){if(e&1){let e=V();I(0,`button`,3),H(`click`,function(){let t=w(e).$implicit;return T(W(5).ask(t))}),K(1),L()}if(e&2){let e=t.$implicit;A(`aria-disabled`,W(5).running()||null),O(),J(` `,e.label,` `)}}function tre(e,t){e&1&&N(0,ere,2,2,`button`,33,Bne),e&2&&P(W(4).actions())}function nre(e,t){if(e&1&&(I(0,`div`,27),j(1,Qne,8,1,`p`,4)(2,$ne,6,2)(3,tre,2,0),L()),e&2){let e,t=W(3);O(),M(t.actionsAllowed()?(e=t.confirming())?2:3:1,e)}}function rre(e,t){e&1&&(I(0,`p`,29),K(1,` The plugin has not reported a view yet. It reports while this panel is open. `),L())}function ire(e,t){e&1&&(I(0,`p`,29),K(1,`The plugin reported no sections.`),L())}function are(e,t){if(e&1){let e=V();I(0,`div`,29)(1,`p`),K(2),L(),I(3,`button`,3),H(`click`,function(){w(e),W(2);let t=Qg(11);return W().filter.set(``),T(t.focus())}),K(4,` Clear filters `),L()()}if(e&2){let e=W(3);O(2),J(`No row or item matches “`,e.filter().trim(),`”.`)}}function ore(e,t){if(e&1&&R(0,`app-plugin-section`,34),e&2){let e=t.$implicit,n=t.$index,r=W(4);F(`section`,e)(`filter`,r.filter())(`index`,n)}}function sre(e,t){if(e&1&&(I(0,`div`,30),N(1,ore,1,3,`app-plugin-section`,34,gg),L()),e&2){let e=W();O(),P(e.view.sections)}}function cre(e,t){if(e&1&&(I(0,`section`,16)(1,`div`,21)(2,`h2`,22),K(3),L(),j(4,qne,2,1,`span`,23),I(5,`span`,24),K(6),L(),N(7,Jne,2,2,`span`,24,gg),L(),j(9,Yne,2,1,`p`,25),j(10,Xne,2,1,`p`,4),j(11,Zne,2,1,`p`,26),j(12,nre,4,1,`div`,27),I(13,`p`,28),K(14),L(),j(15,rre,2,0,`p`,29)(16,ire,2,0,`p`,29)(17,are,5,1,`div`,29)(18,sre,3,0,`div`,30),L()),e&2){let e,n=t,r=W(2);O(3),q(n.title),O(),M(n.version?4:-1),O(),A(`data-tone`,r.statusTone[n.status]),O(),q(r.statusLabel[n.status]),O(),P(n.view?.badges??rv(10,zne)),O(2),M((e=n.view?.summary)?9:-1,e),O(),M(n.description?10:-1),O(),M(n.error?11:-1),O(),M(r.actions().length?12:-1),O(2),q(r.result()),O(),M(n.view?n.view.sections.length?r.filter().trim()&&!r.filterMatches()?17:18:16:15)}}function lre(e,t){if(e&1&&(I(0,`p`,17),K(1),L()),e&2){let e=W(2);O(),J(` No page reports the `,e.titleOf(e.pluginId()??``),` plugin. Open the app with the plugin registered and the overlay loaded. `)}}function ure(e,t){e&1&&(I(0,`span`,4),K(1,`Hidden from agents by the config`),L())}function dre(e,t){if(e&1&&(I(0,`li`)(1,`code`),K(2),L(),I(3,`span`,24),K(4),L(),j(5,ure,2,0,`span`,4),I(6,`p`,4),K(7),L()()),e&2){let e=t.$implicit;O(2),q(e.id),O(),A(`data-tone`,e.safety===`read`?`plain`:`warn`),O(),q(e.safety),O(),M(e.registered?-1:5),O(2),q(e.description)}}function fre(e,t){e&1&&(I(0,`li`,4),K(1,`This plugin has no agent tools.`),L())}function pre(e,t){e&1&&(I(0,`section`,18)(1,`h2`,35),K(2,`Agent tools`),L(),I(3,`ul`),N(4,dre,8,5,`li`,null,Vne,!1,fre,2,0,`li`,4),L()()),e&2&&(O(4),P(t.tools))}function mre(e,t){if(e&1){let e=V();I(0,`p`,5),K(1,` Views that libraries report from the live page through the plugin API. The values come from each plugin's code on the page and are masked like other live data. `),L(),I(2,`div`,6)(3,`div`,7),N(4,Gne,2,2,`button`,8,_g),L(),I(6,`div`,9),E(),I(7,`svg`,10),R(8,`circle`,11)(9,`path`,12),L(),bs(),I(10,`input`,13,0),H(`input`,function(t){return w(e),T(W().filter.set(t.target.value))})(`keydown.escape`,function(){return w(e),T(W().filter.set(``))}),L()(),j(12,Kne,1,2,`app-select`,14),I(13,`span`,15),K(14),L()(),j(15,cre,19,11,`section`,16)(16,lre,2,1,`p`,17),j(17,pre,7,1,`section`,18)}if(e&2){let e,t,n=W();O(4),P(n.pluginIds()),O(6),F(`value`,n.filter()),O(2),M(n.pageOptions().length>1?12:-1),O(2),q(n.countText()),O(),M((e=n.entry())?15:16,e),O(2),M((t=n.server())?17:-1,t)}}function v5(e){let t=e??{};return{pages:(t.pages&&typeof t.pages==`object`?Object.values(t.pages).filter(e=>e&&typeof e.pageId==`string`&&Array.isArray(e.plugins)):[]).sort((e,t)=>t.reportedAt-e.reportedAt),server:Array.isArray(t.server)?t.server:[]}}function hre(e){let t=v5(e);return t.server.length>0||t.pages.some(e=>e.plugins.length>0)}var gre={running:`Running`,error:`Failed`,unsupported:`Needs a newer Pangular`},_re={running:`ok`,error:`danger`,unsupported:`warn`},vre=class e{rpc=$(null);destroyRef=C(As);hostPageId=XT();unsubscribe;statusLabel=gre;statusTone=_re;state=D({pages:[],server:[]});loaded=D(!1);failed=D(!1);filter=D(``);running=D(!1);pluginIds=X(()=>{let e=new Set;for(let t of this.state().pages)for(let n of t.plugins)e.add(n.id);for(let t of this.state().server)e.add(t.id);return[...e].sort((e,t)=>this.titleOf(e).localeCompare(this.titleOf(t)))});pluginId=Q({source:()=>this.pluginIds(),computation:(e,t)=>t?.value&&e.includes(t.value)?t.value:e[0]??null});pages=X(()=>this.state().pages.filter(e=>e.plugins.some(e=>e.id===this.pluginId())));pageId=Q({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:e.find(e=>e.pageId===this.hostPageId)?.pageId??e[0]?.pageId??null});target=X(()=>`${this.pluginId()}\n${this.pageId()}`);result=Q({source:this.target,computation:()=>``});confirming=Q({source:this.target,computation:()=>null});pageOptions=X(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.url})));entry=X(()=>this.pages().find(e=>e.pageId===this.pageId())?.plugins.find(e=>e.id===this.pluginId())??null);server=X(()=>this.state().server.find(e=>e.id===this.pluginId())??null);actions=X(()=>{let e=this.entry();return(e?.view?.actions??[]).filter(t=>e.actions.includes(t.name))});actionsAllowed=X(()=>{let e=this.pluginId();return!!e&&$w(e,_E(this.rpc())).actions});counts=X(()=>(this.entry()?.view?.sections??[]).reduce((e,t)=>{let{shown:n,total:r}=h5(t,this.filter());return{shown:e.shown+n,total:e.total+r}},{shown:0,total:0}));filterMatches=X(()=>this.counts().shown>0);countText=X(()=>{let{shown:e,total:t}=this.counts();return t?`${e} of ${t} rows and items`:``});constructor(){_c(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}titleOf(e){for(let t of this.state().pages){let n=t.plugins.find(t=>t.id===e);if(n)return n.title||e}return this.state().server.find(t=>t.id===e)?.title||e}retry(){let e=this.rpc();e&&this.load(e)}ask(e){if(!this.running()){if(e.confirm){this.confirming.set({name:e.name,label:e.label,confirm:e.confirm});return}this.run(e.name)}}async run(e){let t=this.rpc(),n=this.pluginId(),r=this.pageId();if(this.confirming.set(null),t&&n&&r&&!this.running()&&this.actions().some(t=>t.name===e)){this.running.set(!0),this.result.set(``);try{let i=await t.scope(`pangular`).rpc.call(`request-plugin-action`,{pageId:r,pluginId:n,action:e});this.result.set(i?.ok?`Done.`:i?.error??`The action failed.`)}catch{this.result.set(`The devtools server did not answer. Check that it's still running.`)}finally{this.running.set(!1)}}}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`plugins`);if(this.destroyRef.destroyed)return;let n=e=>this.state.set(v5(e));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-plugins-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`],[1,`intro`],[1,`toolbar`],[`role`,`group`,`aria-label`,`Plugin`,1,`plugins`],[`type`,`button`,1,`view`],[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 rows and items`,`placeholder`,`Filter rows and items`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`options`,`value`],[`role`,`status`,1,`count`],[`aria-labelledby`,`plugin-title`,1,`plugin`],[1,`notice`],[`aria-labelledby`,`plugin-tools-title`,1,`tools`],[`type`,`button`,1,`view`,3,`click`],[`ariaLabel`,`Page`,1,`page-select`,3,`valueChange`,`options`,`value`],[1,`head`],[`id`,`plugin-title`],[1,`chip`,`plain`],[1,`chip`],[1,`summary`],[`role`,`alert`,1,`notice`],[`role`,`group`,`aria-label`,`Plugin actions`,1,`actions`],[`role`,`status`,1,`result`],[1,`empty`],[1,`sections`],[1,`confirm`],[`type`,`button`,1,`small`,`primary`,3,`click`],[`type`,`button`,1,`small`],[3,`section`,`filter`,`index`],[`id`,`plugin-tools-title`,1,`label`]],template:function(e,t){e&1&&j(0,Hne,2,0,`p`,1)(1,Une,5,0,`div`,2)(2,Wne,11,0,`div`,1)(3,mre,18,5),e&2&&M(t.loaded()?t.failed()?1:t.pluginIds().length?3:2:0)},dependencies:[JD,Rne],styles:[`[_nghost-%COMP%] { +}`]})},Hne=()=>[],Une=(e,t)=>t.name,Wne=(e,t)=>t.id;function Gne(e,t){e&1&&(I(0,`p`,1),K(1,`Loading plugins…`),L())}function Kne(e,t){if(e&1){let e=V();I(0,`div`,2)(1,`p`),K(2,`Can't read the plugins from the devtools server.`),L(),I(3,`button`,3),H(`click`,function(){return w(e),T(W().retry())}),K(4,`Retry`),L()()}}function qne(e,t){e&1&&(I(0,`div`,1)(1,`p`),K(2,`No plugin reports yet.`),L(),I(3,`p`,4),K(4,` A library adds a tab here with `),I(5,`code`),K(6,`registerPangularPlugin()`),L(),K(7,` from `),I(8,`code`),K(9,`@pangular-inspector/devtools/plugin`),L(),K(10,`. Its view shows up once the app runs with the overlay loaded. `),L()())}function Jne(e,t){if(e&1){let e=V();I(0,`button`,19),H(`click`,function(){let t=w(e).$implicit;return T(W(2).pluginId.set(t))}),K(1),L()}if(e&2){let e=t.$implicit,n=W(2);A(`aria-pressed`,n.pluginId()===e),O(),J(` `,n.titleOf(e),` `)}}function Yne(e,t){if(e&1){let e=V();I(0,`app-select`,20),H(`valueChange`,function(t){return w(e),T(W(2).pageId.set(t||null))}),L()}if(e&2){let e=W(2);F(`options`,e.pageOptions())(`value`,e.pageId()??``)}}function Xne(e,t){if(e&1&&(I(0,`span`,23),K(1),L()),e&2){let e=W();O(),q(e.version)}}function Zne(e,t){if(e&1&&(I(0,`span`,24),K(1),L()),e&2){let e=t.$implicit;A(`data-tone`,e.tone??`plain`),O(),q(e.label)}}function Qne(e,t){e&1&&(I(0,`p`,25),K(1),L()),e&2&&(O(),q(t))}function $ne(e,t){if(e&1&&(I(0,`p`,4),K(1),L()),e&2){let e=W();O(),q(e.description)}}function ere(e,t){if(e&1&&(I(0,`p`,26),K(1),L()),e&2){let e=W();O(),q(e.error)}}function tre(e,t){if(e&1&&(I(0,`p`,4),K(1,` Actions of this plugin are turned off in the devtools config (`),I(2,`code`),K(3,`actions.plugins`),L(),K(4,` or `),I(5,`code`),K(6),L(),K(7,`). `),L()),e&2){let e=W(2);O(6),J(`plugins.`,e.id,`.actions`)}}function nre(e,t){if(e&1){let e=V();I(0,`p`,31),K(1),L(),I(2,`button`,32),H(`click`,function(){let t=w(e);return T(W(4).run(t.name))}),K(3),L(),I(4,`button`,3),H(`click`,function(){return w(e),T(W(4).confirming.set(null))}),K(5,`Cancel`),L()}if(e&2){let e=t;O(),q(e.confirm),O(2),J(` `,e.label,` `)}}function rre(e,t){if(e&1){let e=V();I(0,`button`,3),H(`click`,function(){let t=w(e).$implicit;return T(W(5).ask(t))}),K(1),L()}if(e&2){let e=t.$implicit;A(`aria-disabled`,W(5).running()||null),O(),J(` `,e.label,` `)}}function ire(e,t){e&1&&N(0,rre,2,2,`button`,33,Une),e&2&&P(W(4).actions())}function are(e,t){if(e&1&&(I(0,`div`,27),j(1,tre,8,1,`p`,4)(2,nre,6,2)(3,ire,2,0),L()),e&2){let e,t=W(3);O(),M(t.actionsAllowed()?(e=t.confirming())?2:3:1,e)}}function ore(e,t){e&1&&(I(0,`p`,29),K(1,` The plugin has not reported a view yet. It reports while this panel is open. `),L())}function sre(e,t){e&1&&(I(0,`p`,29),K(1,`The plugin reported no sections.`),L())}function cre(e,t){if(e&1){let e=V();I(0,`div`,29)(1,`p`),K(2),L(),I(3,`button`,3),H(`click`,function(){w(e),W(2);let t=Qg(11);return W().filter.set(``),T(t.focus())}),K(4,` Clear filters `),L()()}if(e&2){let e=W(3);O(2),J(`No row or item matches “`,e.filter().trim(),`”.`)}}function lre(e,t){if(e&1&&R(0,`app-plugin-section`,34),e&2){let e=t.$implicit,n=t.$index,r=W(4);F(`section`,e)(`filter`,r.filter())(`index`,n)}}function ure(e,t){if(e&1&&(I(0,`div`,30),N(1,lre,1,3,`app-plugin-section`,34,gg),L()),e&2){let e=W();O(),P(e.view.sections)}}function dre(e,t){if(e&1&&(I(0,`section`,16)(1,`div`,21)(2,`h2`,22),K(3),L(),j(4,Xne,2,1,`span`,23),I(5,`span`,24),K(6),L(),N(7,Zne,2,2,`span`,24,gg),L(),j(9,Qne,2,1,`p`,25),j(10,$ne,2,1,`p`,4),j(11,ere,2,1,`p`,26),j(12,are,4,1,`div`,27),I(13,`p`,28),K(14),L(),j(15,ore,2,0,`p`,29)(16,sre,2,0,`p`,29)(17,cre,5,1,`div`,29)(18,ure,3,0,`div`,30),L()),e&2){let e,n=t,r=W(2);O(3),q(n.title),O(),M(n.version?4:-1),O(),A(`data-tone`,r.statusTone[n.status]),O(),q(r.statusLabel[n.status]),O(),P(n.view?.badges??rv(10,Hne)),O(2),M((e=n.view?.summary)?9:-1,e),O(),M(n.description?10:-1),O(),M(n.error?11:-1),O(),M(r.actions().length?12:-1),O(2),q(r.result()),O(),M(n.view?n.view.sections.length?r.filter().trim()&&!r.filterMatches()?17:18:16:15)}}function fre(e,t){if(e&1&&(I(0,`p`,17),K(1),L()),e&2){let e=W(2);O(),J(` No page reports the `,e.titleOf(e.pluginId()??``),` plugin. Open the app with the plugin registered and the overlay loaded. `)}}function pre(e,t){e&1&&(I(0,`span`,4),K(1,`Hidden from agents by the config`),L())}function mre(e,t){if(e&1&&(I(0,`li`)(1,`code`),K(2),L(),I(3,`span`,24),K(4),L(),j(5,pre,2,0,`span`,4),I(6,`p`,4),K(7),L()()),e&2){let e=t.$implicit;O(2),q(e.id),O(),A(`data-tone`,e.safety===`read`?`plain`:`warn`),O(),q(e.safety),O(),M(e.registered?-1:5),O(2),q(e.description)}}function hre(e,t){e&1&&(I(0,`li`,4),K(1,`This plugin has no agent tools.`),L())}function gre(e,t){e&1&&(I(0,`section`,18)(1,`h2`,35),K(2,`Agent tools`),L(),I(3,`ul`),N(4,mre,8,5,`li`,null,Wne,!1,hre,2,0,`li`,4),L()()),e&2&&(O(4),P(t.tools))}function _re(e,t){if(e&1){let e=V();I(0,`p`,5),K(1,` Views that libraries report from the live page through the plugin API. The values come from each plugin's code on the page and are masked like other live data. `),L(),I(2,`div`,6)(3,`div`,7),N(4,Jne,2,2,`button`,8,_g),L(),I(6,`div`,9),E(),I(7,`svg`,10),R(8,`circle`,11)(9,`path`,12),L(),bs(),I(10,`input`,13,0),H(`input`,function(t){return w(e),T(W().filter.set(t.target.value))})(`keydown.escape`,function(){return w(e),T(W().filter.set(``))}),L()(),j(12,Yne,1,2,`app-select`,14),I(13,`span`,15),K(14),L()(),j(15,dre,19,11,`section`,16)(16,fre,2,1,`p`,17),j(17,gre,7,1,`section`,18)}if(e&2){let e,t,n=W();O(4),P(n.pluginIds()),O(6),F(`value`,n.filter()),O(2),M(n.pageOptions().length>1?12:-1),O(2),q(n.countText()),O(),M((e=n.entry())?15:16,e),O(2),M((t=n.server())?17:-1,t)}}function v5(e){let t=e??{};return{pages:(t.pages&&typeof t.pages==`object`?Object.values(t.pages).filter(e=>e&&typeof e.pageId==`string`&&Array.isArray(e.plugins)):[]).sort((e,t)=>t.reportedAt-e.reportedAt),server:Array.isArray(t.server)?t.server:[]}}function vre(e){let t=v5(e);return t.server.length>0||t.pages.some(e=>e.plugins.length>0)}var yre={running:`Running`,error:`Failed`,unsupported:`Needs a newer Pangular`},bre={running:`ok`,error:`danger`,unsupported:`warn`},xre=class e{rpc=$(null);destroyRef=C(As);hostPageId=XT();unsubscribe;statusLabel=yre;statusTone=bre;state=D({pages:[],server:[]});loaded=D(!1);failed=D(!1);filter=D(``);running=D(!1);pluginIds=X(()=>{let e=new Set;for(let t of this.state().pages)for(let n of t.plugins)e.add(n.id);for(let t of this.state().server)e.add(t.id);return[...e].sort((e,t)=>this.titleOf(e).localeCompare(this.titleOf(t)))});pluginId=Q({source:()=>this.pluginIds(),computation:(e,t)=>t?.value&&e.includes(t.value)?t.value:e[0]??null});pages=X(()=>this.state().pages.filter(e=>e.plugins.some(e=>e.id===this.pluginId())));pageId=Q({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:e.find(e=>e.pageId===this.hostPageId)?.pageId??e[0]?.pageId??null});target=X(()=>`${this.pluginId()}\n${this.pageId()}`);result=Q({source:this.target,computation:()=>``});confirming=Q({source:this.target,computation:()=>null});pageOptions=X(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.url})));entry=X(()=>this.pages().find(e=>e.pageId===this.pageId())?.plugins.find(e=>e.id===this.pluginId())??null);server=X(()=>this.state().server.find(e=>e.id===this.pluginId())??null);actions=X(()=>{let e=this.entry();return(e?.view?.actions??[]).filter(t=>e.actions.includes(t.name))});actionsAllowed=X(()=>{let e=this.pluginId();return!!e&&$w(e,_E(this.rpc())).actions});counts=X(()=>(this.entry()?.view?.sections??[]).reduce((e,t)=>{let{shown:n,total:r}=Lne(t,this.filter());return{shown:e.shown+n,total:e.total+r}},{shown:0,total:0}));filterMatches=X(()=>this.counts().shown>0);countText=X(()=>{let{shown:e,total:t}=this.counts();return t?`${e} of ${t} rows and items`:``});constructor(){_c(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}titleOf(e){for(let t of this.state().pages){let n=t.plugins.find(t=>t.id===e);if(n)return n.title||e}return this.state().server.find(t=>t.id===e)?.title||e}retry(){let e=this.rpc();e&&this.load(e)}ask(e){if(!this.running()){if(e.confirm){this.confirming.set({name:e.name,label:e.label,confirm:e.confirm});return}this.run(e.name)}}async run(e){let t=this.rpc(),n=this.pluginId(),r=this.pageId();if(this.confirming.set(null),t&&n&&r&&!this.running()&&this.actions().some(t=>t.name===e)){this.running.set(!0),this.result.set(``);try{let i=await t.scope(`pangular`).rpc.call(`request-plugin-action`,{pageId:r,pluginId:n,action:e});this.result.set(i?.ok?`Done.`:i?.error??`The action failed.`)}catch{this.result.set(`The devtools server did not answer. Check that it's still running.`)}finally{this.running.set(!1)}}}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`plugins`);if(this.destroyRef.destroyed)return;let n=e=>this.state.set(v5(e));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-plugins-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`],[1,`intro`],[1,`toolbar`],[`role`,`group`,`aria-label`,`Plugin`,1,`plugins`],[`type`,`button`,1,`view`],[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 rows and items`,`placeholder`,`Filter rows and items`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`options`,`value`],[`role`,`status`,1,`count`],[`aria-labelledby`,`plugin-title`,1,`plugin`],[1,`notice`],[`aria-labelledby`,`plugin-tools-title`,1,`tools`],[`type`,`button`,1,`view`,3,`click`],[`ariaLabel`,`Page`,1,`page-select`,3,`valueChange`,`options`,`value`],[1,`head`],[`id`,`plugin-title`],[1,`chip`,`plain`],[1,`chip`],[1,`summary`],[`role`,`alert`,1,`notice`],[`role`,`group`,`aria-label`,`Plugin actions`,1,`actions`],[`role`,`status`,1,`result`],[1,`empty`],[1,`sections`],[1,`confirm`],[`type`,`button`,1,`small`,`primary`,3,`click`],[`type`,`button`,1,`small`],[3,`section`,`filter`,`index`],[`id`,`plugin-tools-title`,1,`label`]],template:function(e,t){e&1&&j(0,Gne,2,0,`p`,1)(1,Kne,5,0,`div`,2)(2,qne,11,0,`div`,1)(3,_re,18,5),e&2&&M(t.loaded()?t.failed()?1:t.pluginIds().length?3:2:0)},dependencies:[JD,Vne],styles:[`[_nghost-%COMP%] { display: block; font-size: 13px; } @@ -18810,7 +18810,7 @@ h2[_ngcontent-%COMP%] { .tools[_ngcontent-%COMP%] li[_ngcontent-%COMP%] p[_ngcontent-%COMP%] { flex-basis: 100%; -}`]})},yre=[`accessibility`,`errors`,`hydration`,`change-detection`,`leaks`,`router`,`forms`,`http`,`pipes`],y5={accessibility:`Accessibility`,"change-detection":`Change detection`,leaks:`Leaks`,errors:`Errors`,router:`Router`,forms:`Forms`,hydration:`Hydration`,http:`HTTP`,pipes:`Pipes`},b5=[{key:`cdCycles`,label:`Change detection cycles`},{key:`cdMeanMs`,label:`Mean cycle time`,unit:`ms`},{key:`cdMaxMs`,label:`Slowest cycle`,unit:`ms`},{key:`wastedChecks`,label:`Wasted checks`},{key:`wastedPercent`,label:`Wasted checks`,unit:`%`},{key:`retained`,label:`Retained components`},{key:`openSubscriptions`,label:`Open subscriptions after destroy`},{key:`errorGroups`,label:`Error groups`},{key:`errors`,label:`Error occurrences`},{key:`axeViolations`,label:`axe rules broken`},{key:`axeNodes`,label:`axe elements`},{key:`httpFailures`,label:`Failed HTTP calls`},{key:`findingsError`,label:`Errors found`},{key:`findingsWarning`,label:`Warnings found`},{key:`findingsInfo`,label:`Info found`}];function bre(e){let t=Object.entries(e.args??{}).filter(([e])=>e!==`page`).map(([e,t])=>`${e}: ${JSON.stringify(t)}`).join(`, `);return`${e.tool.replace(/^pangular:/,``)}${t?` { ${t} }`:``}`}function xre(e){let t=e??{};return{pages:Array.isArray(t.pages)?t.pages.filter(e=>typeof e?.pageId==`string`):[],report:t.report&&Array.isArray(t.report.findings)&&Array.isArray(t.report.sources)?t.report:null,session:t.session??{before:null,after:null,diff:null},axe:t.axe??null}}var Sre=(e,t)=>t.label,x5=(e,t)=>t.key;function Cre(e,t){if(e&1&&(z(0,`p`,0),K(1),B()),e&2){let e=t.$implicit;O(),q(e)}}function wre(e,t){if(e&1&&(z(0,`tr`)(1,`th`,12),K(2),B(),z(3,`td`),K(4),B(),z(5,`td`),K(6),B(),z(7,`td`)(8,`span`,13),K(9),B()()()),e&2){let e=t.$implicit;O(2),q(e.label),O(2),q(e.before),O(2),q(e.after),O(2),A(`data-tone`,e.tone),O(),q(e.change)}}function Tre(e,t){if(e&1&&(z(0,`li`)(1,`span`,14),K(2),B(),K(3),B()),e&2){let e=t.$implicit,n=W(2);O(2),q(n.areaLabel[e.area]),O(),J(` `,n.label(e),` `)}}function Ere(e,t){if(e&1&&(z(0,`ul`),N(1,Tre,4,2,`li`,null,x5),B()),e&2){let e=W();O(),P(e.diff().resolved)}}function Dre(e,t){e&1&&(z(0,`p`,7),K(1,`None.`),B())}function Ore(e,t){if(e&1&&(z(0,`li`)(1,`span`,14),K(2),B(),K(3),B()),e&2){let e=t.$implicit,n=W(2);O(2),q(n.areaLabel[e.area]),O(),J(` `,n.label(e),` `)}}function kre(e,t){if(e&1&&(z(0,`ul`),N(1,Ore,4,2,`li`,null,x5),B()),e&2){let e=W();O(),P(e.diff().added)}}function Are(e,t){e&1&&(z(0,`p`,7),K(1,`None.`),B())}function jre(e,t){if(e&1&&(z(0,`li`)(1,`span`,14),K(2),B(),K(3),B()),e&2){let e=t.$implicit,n=W(2);O(2),q(n.areaLabel[e.area]),O(),z_(` `,n.label(e),`: `,e.countBefore,`× → `,e.count??1,`× `)}}function Mre(e,t){if(e&1&&(z(0,`ul`),N(1,jre,4,4,`li`,null,x5),B()),e&2){let e=W();O(),P(e.changed())}}function Nre(e,t){if(e&1&&(z(0,`p`,7),K(1),B()),e&2){let e=W();O(),J(``,e.diff().remaining.length,` still there with the same count.`)}}var Pre=class e{diff=$.required();areaLabel=y5;changed=X(()=>this.diff().remaining.filter(e=>e.countBefore!==void 0&&e.countBefore!==e.count));rows=X(()=>{let e=new Map(this.diff().metrics.map(e=>[e.metric,e]));return b5.filter(t=>e.has(t.key)).map(t=>{let n=e.get(t.key),r=t.unit?` ${t.unit}`:``,i=e=>e===void 0?`Not measured`:`${e}${r}`,a=n.delta;return{label:t.unit===`%`?`${t.label} (%)`:t.label,before:i(n.before),after:i(n.after),change:a===void 0?`Not compared`:a===0?`Same`:`${a>0?`+`:`−`}${Math.abs(a)}${r}, ${a<0?`better`:`worse`}`,tone:a===void 0||a===0?`plain`:a<0?`ok`:`danger`}})});label(e){return`${e.rule}${e.subject?` in ${e.subject}`:``}`}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-audit-diff`]],inputs:{diff:[1,`diff`]},decls:35,vars:6,consts:[[1,`notice`],[`tabindex`,`0`,`role`,`region`,`aria-label`,`Numbers before and after`,1,`table-wrap`],[1,`sr-only`],[`scope`,`col`],[1,`lists`],[`aria-labelledby`,`audit-resolved`],[`id`,`audit-resolved`],[1,`muted`],[`aria-labelledby`,`audit-added`],[`id`,`audit-added`],[`aria-labelledby`,`audit-changed`],[`id`,`audit-changed`],[`scope`,`row`],[1,`chip`],[1,`area`]],template:function(e,t){e&1&&(N(0,Cre,2,1,`p`,0,_g),z(2,`div`,1)(3,`table`)(4,`caption`,2),K(5,` Numbers before and after. Lower is better for each. `),B(),z(6,`thead`)(7,`tr`)(8,`th`,3),K(9,`Number`),B(),z(10,`th`,3),K(11,`Before`),B(),z(12,`th`,3),K(13,`After`),B(),z(14,`th`,3),K(15,`Change`),B()()(),z(16,`tbody`),N(17,wre,10,5,`tr`,null,Sre),B()()(),z(19,`div`,4)(20,`section`,5)(21,`h3`,6),K(22),B(),j(23,Ere,3,0,`ul`)(24,Dre,2,0,`p`,7),B(),z(25,`section`,8)(26,`h3`,9),K(27),B(),j(28,kre,3,0,`ul`)(29,Are,2,0,`p`,7),B(),z(30,`section`,10)(31,`h3`,11),K(32),B(),j(33,Mre,3,0,`ul`)(34,Nre,2,1,`p`,7),B()()),e&2&&(P(t.diff().notes),O(17),P(t.rows()),O(5),J(`Resolved (`,t.diff().resolved.length,`)`),O(),M(t.diff().resolved.length?23:24),O(4),J(`New (`,t.diff().added.length,`)`),O(),M(t.diff().added.length?28:29),O(4),J(`Changed count (`,t.changed().length,`)`),O(),M(t.changed().length?33:34))},styles:[`[_nghost-%COMP%] { +}`]})},Sre=[`accessibility`,`errors`,`hydration`,`change-detection`,`leaks`,`router`,`forms`,`http`,`pipes`],y5={accessibility:`Accessibility`,"change-detection":`Change detection`,leaks:`Leaks`,errors:`Errors`,router:`Router`,forms:`Forms`,hydration:`Hydration`,http:`HTTP`,pipes:`Pipes`},b5=[{key:`cdCycles`,label:`Change detection cycles`},{key:`cdMeanMs`,label:`Mean cycle time`,unit:`ms`},{key:`cdMaxMs`,label:`Slowest cycle`,unit:`ms`},{key:`wastedChecks`,label:`Wasted checks`},{key:`wastedPercent`,label:`Wasted checks`,unit:`%`},{key:`retained`,label:`Retained components`},{key:`openSubscriptions`,label:`Open subscriptions after destroy`},{key:`errorGroups`,label:`Error groups`},{key:`errors`,label:`Error occurrences`},{key:`axeViolations`,label:`axe rules broken`},{key:`axeNodes`,label:`axe elements`},{key:`httpFailures`,label:`Failed HTTP calls`},{key:`findingsError`,label:`Errors found`},{key:`findingsWarning`,label:`Warnings found`},{key:`findingsInfo`,label:`Info found`}];function Cre(e){let t=Object.entries(e.args??{}).filter(([e])=>e!==`page`).map(([e,t])=>`${e}: ${JSON.stringify(t)}`).join(`, `);return`${e.tool.replace(/^pangular:/,``)}${t?` { ${t} }`:``}`}function wre(e){let t=e??{};return{pages:Array.isArray(t.pages)?t.pages.filter(e=>typeof e?.pageId==`string`):[],report:t.report&&Array.isArray(t.report.findings)&&Array.isArray(t.report.sources)?t.report:null,session:t.session??{before:null,after:null,diff:null},axe:t.axe??null}}var Tre=(e,t)=>t.label,x5=(e,t)=>t.key;function Ere(e,t){if(e&1&&(z(0,`p`,0),K(1),B()),e&2){let e=t.$implicit;O(),q(e)}}function Dre(e,t){if(e&1&&(z(0,`tr`)(1,`th`,12),K(2),B(),z(3,`td`),K(4),B(),z(5,`td`),K(6),B(),z(7,`td`)(8,`span`,13),K(9),B()()()),e&2){let e=t.$implicit;O(2),q(e.label),O(2),q(e.before),O(2),q(e.after),O(2),A(`data-tone`,e.tone),O(),q(e.change)}}function Ore(e,t){if(e&1&&(z(0,`li`)(1,`span`,14),K(2),B(),K(3),B()),e&2){let e=t.$implicit,n=W(2);O(2),q(n.areaLabel[e.area]),O(),J(` `,n.label(e),` `)}}function kre(e,t){if(e&1&&(z(0,`ul`),N(1,Ore,4,2,`li`,null,x5),B()),e&2){let e=W();O(),P(e.diff().resolved)}}function Are(e,t){e&1&&(z(0,`p`,7),K(1,`None.`),B())}function jre(e,t){if(e&1&&(z(0,`li`)(1,`span`,14),K(2),B(),K(3),B()),e&2){let e=t.$implicit,n=W(2);O(2),q(n.areaLabel[e.area]),O(),J(` `,n.label(e),` `)}}function Mre(e,t){if(e&1&&(z(0,`ul`),N(1,jre,4,2,`li`,null,x5),B()),e&2){let e=W();O(),P(e.diff().added)}}function Nre(e,t){e&1&&(z(0,`p`,7),K(1,`None.`),B())}function Pre(e,t){if(e&1&&(z(0,`li`)(1,`span`,14),K(2),B(),K(3),B()),e&2){let e=t.$implicit,n=W(2);O(2),q(n.areaLabel[e.area]),O(),z_(` `,n.label(e),`: `,e.countBefore,`× → `,e.count??1,`× `)}}function Fre(e,t){if(e&1&&(z(0,`ul`),N(1,Pre,4,4,`li`,null,x5),B()),e&2){let e=W();O(),P(e.changed())}}function Ire(e,t){if(e&1&&(z(0,`p`,7),K(1),B()),e&2){let e=W();O(),J(``,e.diff().remaining.length,` still there with the same count.`)}}var Lre=class e{diff=$.required();areaLabel=y5;changed=X(()=>this.diff().remaining.filter(e=>e.countBefore!==void 0&&e.countBefore!==e.count));rows=X(()=>{let e=new Map(this.diff().metrics.map(e=>[e.metric,e]));return b5.filter(t=>e.has(t.key)).map(t=>{let n=e.get(t.key),r=t.unit?` ${t.unit}`:``,i=e=>e===void 0?`Not measured`:`${e}${r}`,a=n.delta;return{label:t.unit===`%`?`${t.label} (%)`:t.label,before:i(n.before),after:i(n.after),change:a===void 0?`Not compared`:a===0?`Same`:`${a>0?`+`:`−`}${Math.abs(a)}${r}, ${a<0?`better`:`worse`}`,tone:a===void 0||a===0?`plain`:a<0?`ok`:`danger`}})});label(e){return`${e.rule}${e.subject?` in ${e.subject}`:``}`}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-audit-diff`]],inputs:{diff:[1,`diff`]},decls:35,vars:6,consts:[[1,`notice`],[`tabindex`,`0`,`role`,`region`,`aria-label`,`Numbers before and after`,1,`table-wrap`],[1,`sr-only`],[`scope`,`col`],[1,`lists`],[`aria-labelledby`,`audit-resolved`],[`id`,`audit-resolved`],[1,`muted`],[`aria-labelledby`,`audit-added`],[`id`,`audit-added`],[`aria-labelledby`,`audit-changed`],[`id`,`audit-changed`],[`scope`,`row`],[1,`chip`],[1,`area`]],template:function(e,t){e&1&&(N(0,Ere,2,1,`p`,0,_g),z(2,`div`,1)(3,`table`)(4,`caption`,2),K(5,` Numbers before and after. Lower is better for each. `),B(),z(6,`thead`)(7,`tr`)(8,`th`,3),K(9,`Number`),B(),z(10,`th`,3),K(11,`Before`),B(),z(12,`th`,3),K(13,`After`),B(),z(14,`th`,3),K(15,`Change`),B()()(),z(16,`tbody`),N(17,Dre,10,5,`tr`,null,Tre),B()()(),z(19,`div`,4)(20,`section`,5)(21,`h3`,6),K(22),B(),j(23,kre,3,0,`ul`)(24,Are,2,0,`p`,7),B(),z(25,`section`,8)(26,`h3`,9),K(27),B(),j(28,Mre,3,0,`ul`)(29,Nre,2,0,`p`,7),B(),z(30,`section`,10)(31,`h3`,11),K(32),B(),j(33,Fre,3,0,`ul`)(34,Ire,2,1,`p`,7),B()()),e&2&&(P(t.diff().notes),O(17),P(t.rows()),O(5),J(`Resolved (`,t.diff().resolved.length,`)`),O(),M(t.diff().resolved.length?23:24),O(4),J(`New (`,t.diff().added.length,`)`),O(),M(t.diff().added.length?28:29),O(4),J(`Changed count (`,t.changed().length,`)`),O(),M(t.changed().length?33:34))},styles:[`[_nghost-%COMP%] { display: grid; gap: 12px; } @@ -18931,7 +18931,7 @@ ul[_ngcontent-%COMP%] { margin: 0; color: var(--%NS%text-2); font-size: 12px; -}`]})},Fre=(e,t)=>t.label,Ire=(e,t)=>t.key,Lre=(e,t)=>t.area;function Rre(e,t){e&1&&(I(0,`div`,1)(1,`p`),K(2,`The audit reads a live page, and a static report has none.`),L(),I(3,`p`,3),K(4,`Open the panel from the server that runs the app to audit it.`),L()())}function zre(e,t){e&1&&(I(0,`p`,1),K(1,`Loading the audit…`),L())}function Bre(e,t){if(e&1){let e=V();I(0,`div`,2)(1,`p`),K(2,`Can't read the audit from the devtools server.`),L(),I(3,`button`,4),H(`click`,function(){return w(e),T(W().refresh())}),K(4,`Retry`),L()()}}function Vre(e,t){e&1&&(I(0,`div`,1)(1,`p`),K(2,`No page reports live data yet.`),L(),I(3,`p`,3),K(4,` Open the app with the overlay loaded. The audit reads what the other inspectors collect from it. `),L()())}function Hre(e,t){if(e&1){let e=V();I(0,`app-select`,34),H(`valueChange`,function(t){return w(e),T(W(2).pickPage(t))}),L()}if(e&2){let e=W(2);F(`options`,e.pageOptions())(`value`,e.pageId())}}function Ure(e,t){e&1&&(I(0,`p`,19),K(1),L()),e&2&&(O(),q(t))}function Wre(e,t){if(e&1){let e=V();I(0,`button`,17),H(`click`,function(){return w(e),T(W(2).mark(`clear`))}),K(1,` Clear `),L()}e&2&&F(`disabled`,W(2).busy())}function Gre(e,t){e&1&&(I(0,`p`,19),K(1),L()),e&2&&(O(),q(t))}function Kre(e,t){e&1&&R(0,`app-audit-diff`,25),e&2&&F(`diff`,t)}function qre(e,t){e&1&&(I(0,`p`,28),K(1,` No finding on this page. Run axe, or record change detection, to check more. `),L())}function Jre(e,t){if(e&1){let e=V();I(0,`div`,28)(1,`p`),K(2,`No finding matches the filters.`),L(),I(3,`button`,4),H(`click`,function(){w(e),W();let t=Qg(11);return W().clearFilters(),T(t.focus())}),K(4,` Clear filters `),L()()}}function Yre(e,t){if(e&1&&(I(0,`code`,40),K(1),L()),e&2){let e=W().$implicit;O(),q(e.subject)}}function Xre(e,t){if(e&1&&(I(0,`span`,41),K(1),L()),e&2){let e=W().$implicit;A(`aria-label`,e.count+` times`),O(),J(``,e.count,`×`)}}function Zre(e,t){if(e&1){let e=V();I(0,`button`,45),H(`focus`,function(){w(e);let t=W(2).$implicit;return T(W(3).highlight(t))})(`blur`,function(){return w(e),T(W(5).highlight(null))})(`click`,function(){w(e);let t=W(2).$implicit,n=W(3);return T(n.showComponent.emit({id:t.elementId,pageId:n.pageId()}))}),K(1,` Show component `),L()}}function Qre(e,t){if(e&1){let e=V();I(0,`button`,45),H(`focus`,function(){w(e);let t=W(2).$implicit;return T(W(3).highlight(t))})(`blur`,function(){return w(e),T(W(5).highlight(null))})(`click`,function(){w(e);let t=W(2).$implicit;return T(W(3).highlight(t,!0))}),K(1,` Show in page `),L()}}function $re(e,t){if(e&1&&j(0,Zre,2,0,`button`,44)(1,Qre,2,0,`button`,44),e&2){let e=W().$implicit;M(+!W(3).isComponentArea(e.area))}}function eie(e,t){if(e&1){let e=V();I(0,`li`,36),H(`mouseenter`,function(){let t=w(e).$implicit;return T(W(3).highlight(t))})(`mouseleave`,function(){return w(e),T(W(3).highlight(null))}),I(1,`div`,37)(2,`span`,38),K(3),L(),I(4,`span`,39),K(5),L(),j(6,Yre,2,1,`code`,40),j(7,Xre,2,2,`span`,41),L(),I(8,`p`,42),K(9),L(),I(10,`div`,43)(11,`span`,3),K(12,`Rule `),I(13,`code`),K(14),L()(),I(15,`span`,3),K(16,`Agent tool `),I(17,`code`),K(18),L()(),j(19,$re,2,1),L()()}if(e&2){let e=t.$implicit,n=W(3);O(2),A(`data-tone`,n.tone[e.severity]),O(),q(e.severity),O(2),q(n.areaLabel[e.area]),O(),M(e.subject?6:-1),O(),M((e.count??1)>1?7:-1),O(2),q(e.why),O(5),q(e.rule),O(4),q(n.toolCall(e)),O(),M(e.elementId&&n.canShowComponent()?19:-1)}}function tie(e,t){if(e&1&&(I(0,`ol`,29),N(1,eie,20,9,`li`,35,Ire),L()),e&2){let e=W(2);O(),P(e.shown())}}function nie(e,t){if(e&1&&(I(0,`div`)(1,`dt`),K(2),L(),I(3,`dd`),K(4),L()()),e&2){let e=t.$implicit;O(2),q(e.label),O(2),q(e.value)}}function rie(e,t){if(e&1&&(I(0,`li`)(1,`strong`),K(2),L(),K(3),L()),e&2){let e=t.$implicit,n=W(3);O(2),q(n.areaLabel[e.area]),O(),J(` `,e.state===`off`?`Its inspector is turned off.`:e.note??`Nothing to read yet.`,` `)}}function iie(e,t){if(e&1&&(I(0,`section`,33)(1,`h2`,46),K(2,`Not checked`),L(),I(3,`ul`,47),N(4,rie,4,2,`li`,null,Lre),L()()),e&2){let e=W(2);O(4),P(e.coverage())}}function aie(e,t){if(e&1){let e=V();I(0,`p`,5),K(1,` One ranked list of what the inspectors found on the live page, with an axe pass over the app when you run one. Take a baseline before a change and an after audit to compare them. Agents get the same list from the `),I(2,`code`),K(3,`audit`),L(),K(4,` tool. `),L(),I(5,`div`,6)(6,`div`,7),E(),I(7,`svg`,8),R(8,`circle`,9)(9,`path`,10),L(),bs(),I(10,`input`,11,0),H(`input`,function(t){return w(e),T(W().filter.set(t.target.value))})(`keydown.escape`,function(){return w(e),T(W().filter.set(``))}),L()(),I(12,`app-select`,12),H(`valueChange`,function(t){return w(e),T(W().area.set(t??`all`))}),L(),I(13,`app-select`,13),H(`valueChange`,function(t){return w(e),T(W().severity.set(t??`all`))}),L(),j(14,Hre,1,2,`app-select`,14),I(15,`span`,15),K(16),L(),I(17,`p`,16),K(18),L(),I(19,`button`,17),H(`click`,function(){return w(e),T(W().runAxe())}),K(20),L(),I(21,`button`,17),H(`click`,function(){return w(e),T(W().refresh())}),K(22,`Refresh`),L()(),I(23,`p`,18),K(24),L(),j(25,Ure,2,1,`p`,19),I(26,`section`,20)(27,`div`,21)(28,`h2`,22),K(29,`Before and after`),L(),I(30,`div`,23)(31,`button`,17),H(`click`,function(){return w(e),T(W().mark(`before`))}),K(32,` Take baseline `),L(),I(33,`button`,17),H(`click`,function(){return w(e),T(W().mark(`after`))}),K(34,` Take after audit `),L(),j(35,Wre,2,1,`button`,24),L()(),I(36,`p`,3),K(37),L(),j(38,Gre,2,1,`p`,19),j(39,Kre,1,1,`app-audit-diff`,25),L(),I(40,`section`,26)(41,`h2`,27),K(42,`Findings`),L(),j(43,qre,2,0,`p`,28)(44,Jre,5,0,`div`,28)(45,tie,3,0,`ol`,29),L(),I(46,`section`,30)(47,`h2`,31),K(48,`Key numbers`),L(),I(49,`dl`,32),N(50,nie,5,2,`div`,null,Fre),L()(),j(52,iie,6,0,`section`,33)}if(e&2){let e,t,n,r=W();O(10),F(`value`,r.filter()),O(2),F(`options`,r.areaOptions())(`value`,r.area()),O(),F(`options`,r.severityOptions)(`value`,r.severity()),O(),M(r.pageOptions().length>1?14:-1),O(2),q(r.countText()),O(2),q(r.countStatus()),O(),F(`disabled`,r.axeRunning()),O(),J(` `,r.axeRunning()?`Running axe…`:`Run axe`,` `),O(),F(`disabled`,r.busy()),O(3),q(r.axeStatus()),O(),M((e=r.axeError())?25:-1,e),O(6),F(`disabled`,r.busy()),O(2),F(`disabled`,r.busy()||!r.before()),O(2),M(r.before()?35:-1),O(2),q(r.sessionText()),O(),M((t=r.sessionError())?38:-1,t),O(),M((n=r.diff())?39:-1,n),O(4),M(r.findings().length?r.shown().length?45:44:43),O(7),P(r.numbers()),O(2),M(r.coverage().length?52:-1)}}var oie={error:`danger`,warning:`warn`,info:`accent`},S5={error:0,warning:1,info:2},sie=[`errors`,`hydration`],cie=class e{rpc=$(null);canShowComponent=$(!0);showComponent=bv();destroyRef=C(As);hostPageId=XT();unsubscribe;seq=0;highlighted=!1;queued;time=vO;toolCall=bre;areaLabel=y5;tone=oie;severityOptions=[{value:`all`,label:`All severities`},{value:`error`,label:`Errors`},{value:`warning`,label:`Warnings and errors`}];data=D(null);loaded=D(!1);failed=D(!1);busy=D(!1);axeRunning=D(!1);axeError=D(null);sessionError=D(null);filter=D(``);area=D(`all`);severity=D(`all`);pageId=Q({source:()=>this.data(),computation:(e,t)=>t?.value&&e?.pages.some(e=>e.pageId===t.value)?t.value:e?.report?.pageId??this.hostPageId??``});staticReport=X(()=>rE(this.rpc()));report=X(()=>this.data()?.report??null);findings=X(()=>this.report()?.findings??[]);before=X(()=>this.data()?.session?.before??null);after=X(()=>this.data()?.session?.after??null);diff=X(()=>this.data()?.session?.diff??null);pageOptions=X(()=>(this.data()?.pages??[]).map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,...e.url&&e.url!==(e.title||e.url)?{hint:e.url}:{}})));areaOptions=X(()=>[{value:`all`,label:`All areas`},...yre.map(e=>({value:e,label:y5[e],hint:String(this.findings().filter(t=>t.area===e).length)}))]);shown=X(()=>{let e=this.filter().trim().toLowerCase(),t=this.area(),n=this.severity()===`all`?2:S5[this.severity()];return this.findings().filter(r=>(t===`all`||r.area===t)&&S5[r.severity]<=n&&(!e||`${r.subject??``} ${r.rule} ${r.why}`.toLowerCase().includes(e)))});countText=X(()=>{let e=this.findings().length;return`${this.shown().length} of ${e} ${e===1?`finding`:`findings`}`});countStatus=J3(()=>[this.filter(),this.area(),this.severity(),this.pageId()],()=>this.countText());numbers=X(()=>{let e=this.report()?.metrics??{};return b5.filter(t=>e[t.key]!==void 0).map(t=>({label:t.unit===`%`?`${t.label} (%)`:t.label,value:`${e[t.key]}${t.unit===`ms`?` ms`:``}`}))});coverage=X(()=>(this.report()?.sources??[]).filter(e=>e.state!==`ok`));axeStatus=X(()=>{if(this.axeRunning())return`Running axe on the page…`;let e=this.data()?.axe;return e?`Last axe pass at ${vO(e.at)}: ${e.violations.length} ${e.violations.length===1?`rule`:`rules`} broken.`:`No axe pass on this page yet. Run axe to check accessibility.`});sessionText=X(()=>{let e=this.before(),t=this.after();if(!e)return`Take a baseline, make your change, then take an after audit. Run axe and record change detection the same way both times, so the numbers compare.`;let n=`Baseline at ${vO(e.at)} with ${e.findings.length} findings.`;return t?`${n} After audit at ${vO(t.at)} with ${t.findings.length} findings.`:`${n} Make your change, then take an after audit.`});constructor(){_c(()=>{let e=this.rpc();e&&!rE(e)&&Z(()=>void this.subscribe(e))}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),clearTimeout(this.queued),this.highlight(null)})}isComponentArea(e){return sie.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 tE(e,`get-audit`,{pageId:this.pageId()||void 0});if(t!==this.seq||this.destroyRef.destroyed)return;let r=xre(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 tE(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 tE(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,tE(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=k({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`],[1,`count`],[`role`,`status`,1,`sr-only`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`role`,`status`,1,`axe-status`],[`role`,`alert`,1,`notice`,`error`],[`aria-labelledby`,`audit-session-title`,1,`session`],[1,`session-head`],[`id`,`audit-session-title`],[1,`actions`],[`type`,`button`,1,`small`,3,`disabled`],[3,`diff`],[`aria-labelledby`,`audit-findings-title`],[`id`,`audit-findings-title`,1,`section-title`],[1,`empty`],[`aria-label`,`Findings, most severe first`,1,`findings`],[`aria-labelledby`,`audit-numbers-title`],[`id`,`audit-numbers-title`,1,`section-title`],[1,`numbers`],[`aria-labelledby`,`audit-coverage-title`],[`ariaLabel`,`Page`,1,`filter-select`,3,`valueChange`,`options`,`value`],[1,`finding`],[1,`finding`,3,`mouseenter`,`mouseleave`],[1,`head`],[1,`chip`],[1,`chip`,`plain`],[1,`subject`],[1,`times`],[1,`why`],[1,`meta`],[`type`,`button`,1,`link`],[`type`,`button`,1,`link`,3,`focus`,`blur`,`click`],[`id`,`audit-coverage-title`,1,`section-title`],[1,`coverage`]],template:function(e,t){e&1&&j(0,Rre,5,0,`div`,1)(1,zre,2,0,`p`,1)(2,Bre,5,0,`div`,2)(3,Vre,5,0,`div`,1)(4,aie,53,21),e&2&&M(t.staticReport()?0:t.loaded()?t.failed()?2:t.report()?4:3:1)},dependencies:[JD,Pre],styles:[`[_nghost-%COMP%] { +}`]})},Rre=(e,t)=>t.label,zre=(e,t)=>t.key,Bre=(e,t)=>t.area;function Vre(e,t){e&1&&(I(0,`div`,1)(1,`p`),K(2,`The audit reads a live page, and a static report has none.`),L(),I(3,`p`,3),K(4,`Open the panel from the server that runs the app to audit it.`),L()())}function Hre(e,t){e&1&&(I(0,`p`,1),K(1,`Loading the audit…`),L())}function Ure(e,t){if(e&1){let e=V();I(0,`div`,2)(1,`p`),K(2,`Can't read the audit from the devtools server.`),L(),I(3,`button`,4),H(`click`,function(){return w(e),T(W().refresh())}),K(4,`Retry`),L()()}}function Wre(e,t){e&1&&(I(0,`div`,1)(1,`p`),K(2,`No page reports live data yet.`),L(),I(3,`p`,3),K(4,` Open the app with the overlay loaded. The audit reads what the other inspectors collect from it. `),L()())}function Gre(e,t){if(e&1){let e=V();I(0,`app-select`,34),H(`valueChange`,function(t){return w(e),T(W(2).pickPage(t))}),L()}if(e&2){let e=W(2);F(`options`,e.pageOptions())(`value`,e.pageId())}}function Kre(e,t){e&1&&(I(0,`p`,19),K(1),L()),e&2&&(O(),q(t))}function qre(e,t){if(e&1){let e=V();I(0,`button`,17),H(`click`,function(){return w(e),T(W(2).mark(`clear`))}),K(1,` Clear `),L()}e&2&&F(`disabled`,W(2).busy())}function Jre(e,t){e&1&&(I(0,`p`,19),K(1),L()),e&2&&(O(),q(t))}function Yre(e,t){e&1&&R(0,`app-audit-diff`,25),e&2&&F(`diff`,t)}function Xre(e,t){e&1&&(I(0,`p`,28),K(1,` No finding on this page. Run axe, or record change detection, to check more. `),L())}function Zre(e,t){if(e&1){let e=V();I(0,`div`,28)(1,`p`),K(2,`No finding matches the filters.`),L(),I(3,`button`,4),H(`click`,function(){w(e),W();let t=Qg(11);return W().clearFilters(),T(t.focus())}),K(4,` Clear filters `),L()()}}function Qre(e,t){if(e&1&&(I(0,`code`,40),K(1),L()),e&2){let e=W().$implicit;O(),q(e.subject)}}function $re(e,t){if(e&1&&(I(0,`span`,41),K(1),L()),e&2){let e=W().$implicit;A(`aria-label`,e.count+` times`),O(),J(``,e.count,`×`)}}function eie(e,t){if(e&1){let e=V();I(0,`button`,45),H(`focus`,function(){w(e);let t=W(2).$implicit;return T(W(3).highlight(t))})(`blur`,function(){return w(e),T(W(5).highlight(null))})(`click`,function(){w(e);let t=W(2).$implicit,n=W(3);return T(n.showComponent.emit({id:t.elementId,pageId:n.pageId()}))}),K(1,` Show component `),L()}}function tie(e,t){if(e&1){let e=V();I(0,`button`,45),H(`focus`,function(){w(e);let t=W(2).$implicit;return T(W(3).highlight(t))})(`blur`,function(){return w(e),T(W(5).highlight(null))})(`click`,function(){w(e);let t=W(2).$implicit;return T(W(3).highlight(t,!0))}),K(1,` Show in page `),L()}}function nie(e,t){if(e&1&&j(0,eie,2,0,`button`,44)(1,tie,2,0,`button`,44),e&2){let e=W().$implicit;M(+!W(3).isComponentArea(e.area))}}function rie(e,t){if(e&1){let e=V();I(0,`li`,36),H(`mouseenter`,function(){let t=w(e).$implicit;return T(W(3).highlight(t))})(`mouseleave`,function(){return w(e),T(W(3).highlight(null))}),I(1,`div`,37)(2,`span`,38),K(3),L(),I(4,`span`,39),K(5),L(),j(6,Qre,2,1,`code`,40),j(7,$re,2,2,`span`,41),L(),I(8,`p`,42),K(9),L(),I(10,`div`,43)(11,`span`,3),K(12,`Rule `),I(13,`code`),K(14),L()(),I(15,`span`,3),K(16,`Agent tool `),I(17,`code`),K(18),L()(),j(19,nie,2,1),L()()}if(e&2){let e=t.$implicit,n=W(3);O(2),A(`data-tone`,n.tone[e.severity]),O(),q(e.severity),O(2),q(n.areaLabel[e.area]),O(),M(e.subject?6:-1),O(),M((e.count??1)>1?7:-1),O(2),q(e.why),O(5),q(e.rule),O(4),q(n.toolCall(e)),O(),M(e.elementId&&n.canShowComponent()?19:-1)}}function iie(e,t){if(e&1&&(I(0,`ol`,29),N(1,rie,20,9,`li`,35,zre),L()),e&2){let e=W(2);O(),P(e.shown())}}function aie(e,t){if(e&1&&(I(0,`div`)(1,`dt`),K(2),L(),I(3,`dd`),K(4),L()()),e&2){let e=t.$implicit;O(2),q(e.label),O(2),q(e.value)}}function oie(e,t){if(e&1&&(I(0,`li`)(1,`strong`),K(2),L(),K(3),L()),e&2){let e=t.$implicit,n=W(3);O(2),q(n.areaLabel[e.area]),O(),J(` `,e.state===`off`?`Its inspector is turned off.`:e.note??`Nothing to read yet.`,` `)}}function sie(e,t){if(e&1&&(I(0,`section`,33)(1,`h2`,46),K(2,`Not checked`),L(),I(3,`ul`,47),N(4,oie,4,2,`li`,null,Bre),L()()),e&2){let e=W(2);O(4),P(e.coverage())}}function cie(e,t){if(e&1){let e=V();I(0,`p`,5),K(1,` One ranked list of what the inspectors found on the live page, with an axe pass over the app when you run one. Take a baseline before a change and an after audit to compare them. Agents get the same list from the `),I(2,`code`),K(3,`audit`),L(),K(4,` tool. `),L(),I(5,`div`,6)(6,`div`,7),E(),I(7,`svg`,8),R(8,`circle`,9)(9,`path`,10),L(),bs(),I(10,`input`,11,0),H(`input`,function(t){return w(e),T(W().filter.set(t.target.value))})(`keydown.escape`,function(){return w(e),T(W().filter.set(``))}),L()(),I(12,`app-select`,12),H(`valueChange`,function(t){return w(e),T(W().area.set(t??`all`))}),L(),I(13,`app-select`,13),H(`valueChange`,function(t){return w(e),T(W().severity.set(t??`all`))}),L(),j(14,Gre,1,2,`app-select`,14),I(15,`span`,15),K(16),L(),I(17,`p`,16),K(18),L(),I(19,`button`,17),H(`click`,function(){return w(e),T(W().runAxe())}),K(20),L(),I(21,`button`,17),H(`click`,function(){return w(e),T(W().refresh())}),K(22,`Refresh`),L()(),I(23,`p`,18),K(24),L(),j(25,Kre,2,1,`p`,19),I(26,`section`,20)(27,`div`,21)(28,`h2`,22),K(29,`Before and after`),L(),I(30,`div`,23)(31,`button`,17),H(`click`,function(){return w(e),T(W().mark(`before`))}),K(32,` Take baseline `),L(),I(33,`button`,17),H(`click`,function(){return w(e),T(W().mark(`after`))}),K(34,` Take after audit `),L(),j(35,qre,2,1,`button`,24),L()(),I(36,`p`,3),K(37),L(),j(38,Jre,2,1,`p`,19),j(39,Yre,1,1,`app-audit-diff`,25),L(),I(40,`section`,26)(41,`h2`,27),K(42,`Findings`),L(),j(43,Xre,2,0,`p`,28)(44,Zre,5,0,`div`,28)(45,iie,3,0,`ol`,29),L(),I(46,`section`,30)(47,`h2`,31),K(48,`Key numbers`),L(),I(49,`dl`,32),N(50,aie,5,2,`div`,null,Rre),L()(),j(52,sie,6,0,`section`,33)}if(e&2){let e,t,n,r=W();O(10),F(`value`,r.filter()),O(2),F(`options`,r.areaOptions())(`value`,r.area()),O(),F(`options`,r.severityOptions)(`value`,r.severity()),O(),M(r.pageOptions().length>1?14:-1),O(2),q(r.countText()),O(2),q(r.countStatus()),O(),F(`disabled`,r.axeRunning()),O(),J(` `,r.axeRunning()?`Running axe…`:`Run axe`,` `),O(),F(`disabled`,r.busy()),O(3),q(r.axeStatus()),O(),M((e=r.axeError())?25:-1,e),O(6),F(`disabled`,r.busy()),O(2),F(`disabled`,r.busy()||!r.before()),O(2),M(r.before()?35:-1),O(2),q(r.sessionText()),O(),M((t=r.sessionError())?38:-1,t),O(),M((n=r.diff())?39:-1,n),O(4),M(r.findings().length?r.shown().length?45:44:43),O(7),P(r.numbers()),O(2),M(r.coverage().length?52:-1)}}var lie={error:`danger`,warning:`warn`,info:`accent`},S5={error:0,warning:1,info:2},uie=[`errors`,`hydration`],die=class e{rpc=$(null);canShowComponent=$(!0);showComponent=bv();destroyRef=C(As);hostPageId=XT();unsubscribe;seq=0;highlighted=!1;queued;time=vO;toolCall=Cre;areaLabel=y5;tone=lie;severityOptions=[{value:`all`,label:`All severities`},{value:`error`,label:`Errors`},{value:`warning`,label:`Warnings and errors`}];data=D(null);loaded=D(!1);failed=D(!1);busy=D(!1);axeRunning=D(!1);axeError=D(null);sessionError=D(null);filter=D(``);area=D(`all`);severity=D(`all`);pageId=Q({source:()=>this.data(),computation:(e,t)=>t?.value&&e?.pages.some(e=>e.pageId===t.value)?t.value:e?.report?.pageId??this.hostPageId??``});staticReport=X(()=>rE(this.rpc()));report=X(()=>this.data()?.report??null);findings=X(()=>this.report()?.findings??[]);before=X(()=>this.data()?.session?.before??null);after=X(()=>this.data()?.session?.after??null);diff=X(()=>this.data()?.session?.diff??null);pageOptions=X(()=>(this.data()?.pages??[]).map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,...e.url&&e.url!==(e.title||e.url)?{hint:e.url}:{}})));areaOptions=X(()=>[{value:`all`,label:`All areas`},...Sre.map(e=>({value:e,label:y5[e],hint:String(this.findings().filter(t=>t.area===e).length)}))]);shown=X(()=>{let e=this.filter().trim().toLowerCase(),t=this.area(),n=this.severity()===`all`?2:S5[this.severity()];return this.findings().filter(r=>(t===`all`||r.area===t)&&S5[r.severity]<=n&&(!e||`${r.subject??``} ${r.rule} ${r.why}`.toLowerCase().includes(e)))});countText=X(()=>{let e=this.findings().length;return`${this.shown().length} of ${e} ${e===1?`finding`:`findings`}`});countStatus=Z3(()=>[this.filter(),this.area(),this.severity(),this.pageId()],()=>this.countText());numbers=X(()=>{let e=this.report()?.metrics??{};return b5.filter(t=>e[t.key]!==void 0).map(t=>({label:t.unit===`%`?`${t.label} (%)`:t.label,value:`${e[t.key]}${t.unit===`ms`?` ms`:``}`}))});coverage=X(()=>(this.report()?.sources??[]).filter(e=>e.state!==`ok`));axeStatus=X(()=>{if(this.axeRunning())return`Running axe on the page…`;let e=this.data()?.axe;return e?`Last axe pass at ${vO(e.at)}: ${e.violations.length} ${e.violations.length===1?`rule`:`rules`} broken.`:`No axe pass on this page yet. Run axe to check accessibility.`});sessionText=X(()=>{let e=this.before(),t=this.after();if(!e)return`Take a baseline, make your change, then take an after audit. Run axe and record change detection the same way both times, so the numbers compare.`;let n=`Baseline at ${vO(e.at)} with ${e.findings.length} findings.`;return t?`${n} After audit at ${vO(t.at)} with ${t.findings.length} findings.`:`${n} Make your change, then take an after audit.`});constructor(){_c(()=>{let e=this.rpc();e&&!rE(e)&&Z(()=>void this.subscribe(e))}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),clearTimeout(this.queued),this.highlight(null)})}isComponentArea(e){return uie.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 tE(e,`get-audit`,{pageId:this.pageId()||void 0});if(t!==this.seq||this.destroyRef.destroyed)return;let r=wre(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 tE(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 tE(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,tE(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=k({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`],[1,`count`],[`role`,`status`,1,`sr-only`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`role`,`status`,1,`axe-status`],[`role`,`alert`,1,`notice`,`error`],[`aria-labelledby`,`audit-session-title`,1,`session`],[1,`session-head`],[`id`,`audit-session-title`],[1,`actions`],[`type`,`button`,1,`small`,3,`disabled`],[3,`diff`],[`aria-labelledby`,`audit-findings-title`],[`id`,`audit-findings-title`,1,`section-title`],[1,`empty`],[`aria-label`,`Findings, most severe first`,1,`findings`],[`aria-labelledby`,`audit-numbers-title`],[`id`,`audit-numbers-title`,1,`section-title`],[1,`numbers`],[`aria-labelledby`,`audit-coverage-title`],[`ariaLabel`,`Page`,1,`filter-select`,3,`valueChange`,`options`,`value`],[1,`finding`],[1,`finding`,3,`mouseenter`,`mouseleave`],[1,`head`],[1,`chip`],[1,`chip`,`plain`],[1,`subject`],[1,`times`],[1,`why`],[1,`meta`],[`type`,`button`,1,`link`],[`type`,`button`,1,`link`,3,`focus`,`blur`,`click`],[`id`,`audit-coverage-title`,1,`section-title`],[1,`coverage`]],template:function(e,t){e&1&&j(0,Vre,5,0,`div`,1)(1,Hre,2,0,`p`,1)(2,Ure,5,0,`div`,2)(3,Wre,5,0,`div`,1)(4,cie,53,21),e&2&&M(t.staticReport()?0:t.loaded()?t.failed()?2:t.report()?4:3:1)},dependencies:[JD,Lre],styles:[`[_nghost-%COMP%] { display: block; font-size: 13px; } @@ -19256,7 +19256,7 @@ h2[_ngcontent-%COMP%] { .empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .state[_ngcontent-%COMP%] p[_ngcontent-%COMP%] { margin: 0 0 8px; -}`]})},C5=[{id:`router`,label:`Router`,tab:`routes`,tabLabel:`Routes`,inspector:`router`,state:`router`},{id:`http`,label:`HTTP`,tab:`network`,tabLabel:`SSR & HTTP`,inspector:`http`,state:`http`},{id:`ngrx`,label:`NgRx`,tab:`store`,tabLabel:`Store`,inspector:`ngrx`,state:`ngrx-store`},{id:`cd`,label:`Change detection`,tab:`components`,tabLabel:`Components`,inspector:`components`,state:`change-detection`},{id:`forms`,label:`Forms`,tab:`forms`,tabLabel:`Forms`,inspector:`forms`,state:`forms`},{id:`signals`,label:`Signals`,tab:`signals`,tabLabel:`Signals`,inspector:`signals`,state:`signal-graph`}],w5=Object.fromEntries(C5.map(e=>[e.id,e]));function lie(e){return C5.filter(t=>e.inspectors[t.inspector])}function T5(e){return Array.isArray(e)?e:[]}function E5(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function D5(e){let t=E5(e).pages;return Array.isArray(t)?t:Object.values(E5(t))}function O5(e){return typeof e==`number`&&Number.isFinite(e)}function uie(e){try{let t=new URL(e,`http://x`);return e.startsWith(`/`)||t.host===`x`?`${t.pathname}${t.search}`:e.replace(/^[a-z]+:\/\/[^/]+/i,``)||e}catch{return e}}function k5(e){return e<10?`${Math.round(e*10)/10} ms`:`${Math.round(e)} ms`}function die(e){let t;try{t=typeof e==`string`?JSON.stringify(e):JSON.stringify(e)??``}catch{t=String(e)}return t.length>80?`${t.slice(0,79)}…`:t}function fie(e){let t=[];for(let n of D5(e)){let e=typeof n?.pageId==`string`?n.pageId:``;for(let r of T5(n?.navigations)){if(!O5(r?.startedAt)||r.probe||r.beforeConnect)continue;let n=O5(r.endedAt)?Math.max(0,r.endedAt-r.startedAt):void 0,i=r.finalUrl&&r.finalUrl!==r.url?` to ${r.finalUrl}`:``;t.push({key:`router:${e}:${r.id}`,layer:`router`,pageId:e,at:r.startedAt,...n===void 0?{}:{ms:n},title:`Navigation to ${r.url}`,detail:[`${r.outcome}${i}`,r.trigger,n===void 0?``:k5(n)].filter(Boolean).join(` · `),...r.outcome===`failed`?{tone:`danger`}:r.outcome===`cancelled`||r.outcome===`redirected`?{tone:`warn`}:{},link:{tab:`routes`,...e?{page:e}:{}}})}}return t}function pie(e){let t=e.status??0;if(e.error||t>=500||t===0&&!e.cancelled)return`danger`;if(t>=400||e.faulted||e.cancelled)return`warn`}function A5(e,t){if(!O5(e?.at))return null;let n=e.side===`server`?`SSR`:`client`,r=e.status?String(e.status):e.cancelled?`cancelled`:`no response`,i=O5(e.durationMs)?e.durationMs:void 0,a=pie(e);return{key:`http:${e.side===`server`?`server`:t}:${e.id??e.at}`,layer:`http`,pageId:t,at:e.at,...i===void 0?{}:{ms:i},title:`${e.method??`GET`} ${uie(e.url??``)}`,detail:[r,n,i===void 0?``:k5(i),e.cacheHit?`from cache`:``,e.mocked?`mocked`:e.faulted?`fault rule`:``].filter(Boolean).join(` · `),...a?{tone:a}:{},link:{tab:`network`,...t?{page:t}:{}}}}function mie(e){let t=[],n=D5(e);for(let e of n){let n=typeof e?.pageId==`string`?e.pageId:``;for(let r of T5(e?.calls)){let e=A5(r,n);e&&t.push(e)}}for(let r of T5(E5(e).serverCalls)){let e=r?.pageUrl?n.find(e=>e?.initialUrl&&e.initialUrl===r.pageUrl):void 0,i=A5({...r,side:`server`},e?.pageId??``);i&&t.push(i)}return t}function hie(e){let t=[];for(let n of D5(e)){let e=typeof n?.pageId==`string`?n.pageId:``;for(let r of T5(n?.log)){if(!O5(r?.timestamp))continue;let n=T5(r.diff).length+(r.diffTruncated??0),i=O5(r.durationMs)?r.durationMs:void 0;t.push({key:`ngrx:${e}:${r.seq}`,layer:`ngrx`,pageId:e,at:r.timestamp,...i===void 0?{}:{ms:i},title:r.source===`event`?r.eventType??r.type:r.type,detail:[r.storeId,r.source===`event`?`event`:n?`${n} ${n===1?`change`:`changes`}`:`no change`,i===void 0?``:k5(i)].filter(Boolean).join(` · `),link:{tab:`store`,...e?{page:e}:{}}})}}return t}var gie=16;function _ie(e){let t=[];for(let n of D5(e)){let e=typeof n?.pageId==`string`?n.pageId:``;for(let r of T5(n?.cycles)){if(!O5(r?.at))continue;let n=O5(r.ms)?r.ms:0;t.push({key:`cd:${e}:${r.id}`,layer:`cd`,pageId:e,at:r.at,ms:n,title:`Change detection cycle ${r.id}`,detail:[k5(n),`${r.checks} ${r.checks===1?`check`:`checks`}`,r.trigger?`after ${r.trigger}`:``].filter(Boolean).join(` · `),...n>gie?{tone:`warn`}:{},link:{tab:`components`,...e?{page:e}:{}}})}}return t}function vie(e){return T5(E5(e).events).flatMap((e,t)=>{if(!O5(e?.timestamp)||typeof e.formId!=`string`)return[];let n=oE(e.formId),r=[e.detail,e.origin,e.outcome].filter(Boolean).join(` · `);return[{key:`forms:${e.formId}:${e.seq??`i${t}`}`,layer:`forms`,pageId:n,at:e.timestamp,...O5(e.ms)?{ms:e.ms}:{},title:`${e.type} ${e.path||`form`}`,detail:r,...e.type===`submit`&&e.outcome===`invalid`?{tone:`warn`}:{},link:{tab:`forms`,id:e.formId,...n?{page:n}:{}}}]})}var yie={write:`set`,sample:`sampled`};function bie(e){let t=[],n=E5(E5(e).pages),r=Object.keys(n).length?Object.entries(n):[[``,E5(e).graph]];for(let[e,n]of r){let r=E5(n),i=typeof r.pageId==`string`?r.pageId:String(e),a=new Map(T5(r.nodes).map(e=>[e?.id,e?.label||e?.kind||`signal`]));for(let[e,n]of Object.entries(E5(r.history)))for(let r of T5(n)){if(!O5(r?.at)||r.source===`initial`)continue;let n=a.get(e)??e;t.push({key:`signals:${i}:${e}:${r.epoch??r.at}`,layer:`signals`,pageId:i,at:r.at,title:`${n} ${yie[r.source??``]??`changed`}`,detail:die(r.value),link:{tab:`signals`,...i?{page:i}:{}}})}}return t}var xie={router:fie,http:mie,ngrx:hie,cd:_ie,forms:vie,signals:bie};function Sie(e){let t=[];for(let n of C5){let r=e[n.id];r!=null&&t.push(...xie[n.id](r))}let n=new Map(C5.map((e,t)=>[e.id,t]));t.sort((e,t)=>e.at-t.at||n.get(e.layer)-n.get(t.layer)||(e.keyt.key)));let r=new Set;for(let e of t){let t=e.key;for(let n=2;r.has(t);n++)t=`${e.key}#${n}`;e.key=t,r.add(t)}return t}function Cie(e,t){let n=new Map,r=(e,t)=>{typeof e==`string`&&e&&(typeof t==`string`&&t&&!n.get(e)?n.set(e,t):n.has(e)||n.set(e,``))};for(let t of D5(e.http))r(t?.pageId,t?.title||t?.url);for(let t of D5(e.router))r(t?.pageId,t?.snapshot?.url);for(let t of D5(e.ngrx))r(t?.pageId,t?.title||t?.url);for(let e of t)r(e.pageId,``);return[...n].map(([e,t])=>({pageId:e,label:t||e}))}function wie(e,t){let n=t.query.trim().toLowerCase();return e.filter(e=>t.layers.has(e.layer)&&(t.pageId===`all`||e.pageId===t.pageId)&&(!n||e.title.toLowerCase().includes(n)||e.detail.toLowerCase().includes(n)))}function j5(e,t){return t?e.filter(e=>e.at>=t.start&&e.at<=t.end):e}function Tie(e){if(!e.length)return null;let t=1/0,n=-1/0;for(let r of e)t=Math.min(t,r.at),n=Math.max(n,r.at+(r.ms??0));return n-t<20?{start:t-10,end:t+10}:{start:t,end:n}}function Eie(e,t,n){let r=Math.max(20,(e.end-e.start)*t);if(r>=n.end-n.start)return null;let i=(e.start+e.end)/2;return M5({start:i-r/2,end:i+r/2},n)}function Die(e,t,n){let r=(e.end-e.start)*t;return M5({start:e.start+r,end:e.end+r},n)}function M5(e,t){let n=e.end-e.start;return e.startt.end?{start:t.end-n,end:t.end}:e}function Oie(e,t,n){let[r,i]=tMath.min(1,Math.max(0,e)),o=e.end-e.start,s=e.start+a(r)*o,c=e.start+a(i)*o;return c-s<20?null:{start:s,end:c}}function kie(e,t,n){let r=Math.max(1,t.end-t.start),i=new Map;for(let a of e){if(a.att.end)continue;let e=Math.min(n-1,Math.floor((a.at-t.start)/r*n)),o=`${a.layer}:${e}`,s=i.get(o);s||(s={layer:a.layer,slot:e,count:0},i.set(o,s)),s.count++,(a.tone===`danger`||a.tone===`warn`&&s.tone!==`danger`)&&(s.tone=a.tone)}return[...i.values()]}function Aie(e,t,n){let r=null;for(let i of e)i.layer===t&&(!r||Math.abs(i.at-n)C5.some(t=>t.id===e)):[]}catch{return[]}}function P5(e){try{localStorage.setItem(N5,JSON.stringify(e))}catch{}}function F5(e){let t=new Date(e),n=(e,t=2)=>String(e).padStart(t,`0`);return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}.${n(t.getMilliseconds(),3)}`}function I5(e){if(e<1e3)return`${Math.round(e)} ms`;if(e<6e4)return`${Math.round(e/100)/10} s`;let t=Math.floor(e/6e4),n=Math.round(e%6e4/1e3);return n?`${t} min ${n} s`:`${t} min`}var Mie=[`tracks`],L5=(e,t)=>t.id,Nie=(e,t)=>t.layer+t.slot,Pie=(e,t)=>t.key;function Fie(e,t){e&1&&(I(0,`p`,3),K(1,`Loading the timeline…`),L())}function Iie(e,t){if(e&1){let e=V();I(0,`div`,4)(1,`p`),K(2,`Can't read the timeline from the devtools server.`),L(),I(3,`button`,5),H(`click`,function(){return w(e),T(W().retry())}),K(4,`Retry`),L()()}}function Lie(e,t){if(e&1){let e=V();I(0,`app-select`,20),H(`valueChange`,function(t){w(e);let n=W(2);return T(n.pageId.set(t??n.allPages))}),L()}if(e&2){let e=W(2);F(`options`,e.pageOptions())(`value`,e.pageId())}}function Rie(e,t){if(e&1){let e=V();I(0,`button`,21),H(`click`,function(){let t=w(e).$implicit;return T(W(2).toggleLayer(t.id))}),R(1,`span`,22),K(2),I(3,`span`,23),K(4),L()()}if(e&2){let e=t.$implicit,n=W(2);A(`aria-pressed`,!n.hidden().includes(e.id)),O(2),J(` `,e.label,` `),O(2),q(n.layerCounts()[e.id])}}function zie(e,t){e&1&&(I(0,`div`,3)(1,`p`),K(2,`Nothing on the timeline yet.`),L(),I(3,`p`,24),K(4,` Use the app with the overlay loaded. Navigations, HTTP calls, NgRx actions and form events show up as they happen. Record change detection on the Components tab, and pick a component on the Signals tab to follow its signals. `),L()())}function Bie(e,t){if(e&1){let e=V();I(0,`div`,3)(1,`p`),K(2),L(),I(3,`button`,5),H(`click`,function(){w(e),W();let t=Qg(6);return W().clearFilters(),T(t.focus())}),K(4,` Clear filters `),L()()}if(e&2){let e=W(2);O(2),J(`No event matches the filters`,e.range()?` in this range`:``,`.`)}}function Vie(e,t){if(e&1&&(I(0,`li`),K(1),L()),e&2){let e=t.$implicit;O(),q(e.label)}}function Hie(e,t){if(e&1&&(E(),R(0,`line`,32)),e&2){let e=t.$index,n=W(3);A(`x2`,n.chartWidth)(`y1`,e*n.laneHeight+n.laneHeight/2)(`y2`,e*n.laneHeight+n.laneHeight/2)}}function Uie(e,t){if(e&1&&(E(),R(0,`rect`,33)),e&2){let e=t.$implicit,n=W(3);A(`data-tone`,e.tone??null)(`x`,e.slot*n.slotWidth)(`y`,n.laneIndex()[e.layer]*n.laneHeight+4)(`width`,n.slotWidth-1)(`height`,n.laneHeight-8)(`opacity`,n.binOpacity(e.count))}}function Wie(e,t){if(e&1&&(E(),R(0,`rect`,34)),e&2){let e=t,n=W(3);A(`x`,e.x-2)(`y`,e.y+1)(`width`,n.slotWidth+3)(`height`,n.laneHeight-2)}}function Gie(e,t){if(e&1&&R(0,`div`,45),e&2){let e=t;y_(`left`,e.left,`%`)(`width`,e.width,`%`)}}function Kie(e,t){if(e&1&&(I(0,`p`,41),K(1),L()),e&2){let e=W(3);O(),Y(` Showing the newest `,e.listed().length,` of `,e.shown().length,` events. Zoom in or filter to see older ones. `)}}function qie(e,t){if(e&1&&(I(0,`span`,50),K(1),L()),e&2){let e=W().$implicit;O(),q(e.detail)}}function Jie(e,t){if(e&1&&(I(0,`span`,51),K(1),L()),e&2){let e=W().$implicit,t=W(3);O(),q(t.pageLabel(e.pageId))}}function Yie(e,t){if(e&1){let e=V();I(0,`li`)(1,`button`,46),H(`click`,function(){let t=w(e).$implicit;return T(W(3).select(t))})(`dblclick`,function(){let t=w(e).$implicit;return T(W(3).openEvent(t))}),I(2,`time`,47),K(3),L(),I(4,`span`,48),K(5),L(),I(6,`span`,49),K(7),L(),j(8,qie,2,1,`span`,50),j(9,Jie,2,1,`span`,51),L()()}if(e&2){let e=t.$implicit,n=W(3);O(),G(`selected`,e.key===n.selectedKey()),A(`aria-current`,e.key===n.selectedKey()?`true`:null)(`data-key`,e.key),O(2),q(n.clock(e.at)),O(),A(`data-tone`,e.tone??null),O(),q(n.layerLabel(e.layer)),O(2),q(e.title),O(),M(e.detail?8:-1),O(),M(n.showPage()?9:-1)}}function Xie(e,t){if(e&1&&(I(0,`dt`),K(1,`Took`),L(),I(2,`dd`),K(3),L()),e&2){let e=W(),t=W(3);O(3),q(t.span(e.ms))}}function Zie(e,t){if(e&1&&(I(0,`dt`),K(1,`Detail`),L(),I(2,`dd`,54),K(3),L()),e&2){let e=W();O(3),q(e.detail)}}function Qie(e,t){if(e&1){let e=V();I(0,`p`,52),K(1),L(),I(2,`dl`)(3,`dt`),K(4,`Layer`),L(),I(5,`dd`),K(6),L(),I(7,`dt`),K(8,`Time`),L(),I(9,`dd`),K(10),L(),j(11,Xie,4,1),j(12,Zie,4,1),I(13,`dt`),K(14,`Page`),L(),I(15,`dd`),K(16),L()(),I(17,`button`,53),H(`click`,function(){let t=w(e);return T(W(3).openEvent(t))}),K(18),L()}if(e&2){let e=t,n=W(3);O(),q(e.title),O(5),q(n.layerLabel(e.layer)),O(4),q(n.clock(e.at)),O(),M(e.ms===void 0?-1:11),O(),M(e.detail?12:-1),O(4),q(e.pageId?n.pageLabel(e.pageId):`Server, no page`),O(2),J(` Open in `,n.tabLabel(e.layer),` `)}}function $ie(e,t){e&1&&(I(0,`p`,24),K(1,` Select an event in the list or on the chart to see it here. Double click a row to open it in its own tab. `),L())}function eae(e,t){if(e&1){let e=V();I(0,`section`,25)(1,`div`,26)(2,`h2`,27),K(3,`Time axis`),L(),I(4,`span`,24),K(5),L()(),I(6,`div`,28)(7,`ul`,29),N(8,Vie,2,1,`li`,null,L5),L(),I(10,`div`,30,1),H(`pointerdown`,function(t){return w(e),T(W(2).onPointerDown(t))})(`pointermove`,function(t){return w(e),T(W(2).onPointerMove(t))})(`pointerup`,function(t){return w(e),T(W(2).onPointerUp(t))})(`pointercancel`,function(){return w(e),T(W(2).brush.set(null))}),E(),I(12,`svg`,31),N(13,Hie,1,3,`:svg:line`,32,L5),N(15,Uie,1,6,`:svg:rect`,33,Nie),j(17,Wie,1,4,`:svg:rect`,34),L(),j(18,Gie,1,4,`div`,35),L()(),bs(),I(19,`div`,36)(20,`span`),K(21),L(),I(22,`span`),K(23),L()(),I(24,`p`,37),K(25,` Drag across the chart to look at a range, and click a mark to select the nearest event. The list below holds the same events. `),L()(),I(26,`div`,38)(27,`section`,39)(28,`h2`,40),K(29,`Events`),L(),j(30,Kie,2,2,`p`,41),I(31,`ol`,42),N(32,Yie,10,10,`li`,null,Pie),L()(),I(34,`aside`,43)(35,`h2`,44),K(36,`Selected event`),L(),j(37,Qie,19,7)(38,$ie,2,0,`p`,24),L()()}if(e&2){let e,t,n,r=W(2);O(5),q(r.viewText()),O(3),P(r.lanes()),O(2),y_(`height`,r.lanes().length*r.laneHeight,`px`),A(`aria-label`,r.chartLabel()),O(2),A(`viewBox`,`0 0 `+r.chartWidth+` `+r.lanes().length*r.laneHeight),O(),P(r.lanes()),O(2),P(r.bins()),O(2),M((e=r.selectedMark())?17:-1,e),O(),M((t=r.brushBox())?18:-1,t),O(3),q(r.clock(r.view().start)),O(2),q(r.clock(r.view().end)),O(7),M(r.shown().length>r.listed().length?30:-1),O(2),P(r.listed()),O(5),M((n=r.selected())?37:38,n)}}function tae(e,t){if(e&1){let e=V();I(0,`div`,6)(1,`div`,7),E(),I(2,`svg`,8),R(3,`circle`,9)(4,`path`,10),L(),bs(),I(5,`input`,11,0),H(`input`,function(t){return w(e),T(W().query.set(t.target.value))})(`keydown.escape`,function(){return w(e),T(W().query.set(``))}),L()(),j(7,Lie,1,2,`app-select`,12),I(8,`span`,13),K(9),L(),I(10,`p`,14),K(11),L()(),I(12,`div`,15)(13,`div`,16),N(14,Rie,5,3,`button`,17,L5),L(),I(16,`div`,18)(17,`button`,19),H(`click`,function(){return w(e),T(W().zoom(.5))}),K(18,` Zoom in `),L(),I(19,`button`,19),H(`click`,function(){return w(e),T(W().zoom(2))}),K(20,` Zoom out `),L(),I(21,`button`,19),H(`click`,function(){return w(e),T(W().pan(-1))}),K(22,` Earlier `),L(),I(23,`button`,19),H(`click`,function(){return w(e),T(W().pan(1))}),K(24,` Later `),L(),I(25,`button`,19),H(`click`,function(){return w(e),T(W().range.set(null))}),K(26,` Show all `),L()()(),j(27,zie,5,0,`div`,3)(28,Bie,5,1,`div`,3)(29,eae,39,11)}if(e&2){let e=W();O(5),F(`value`,e.query()),O(2),M(e.pageOptions().length>2?7:-1),O(2),q(e.countText()),O(2),q(e.countStatus()),O(3),P(e.layers()),O(3),F(`disabled`,!e.canZoomIn()),O(2),F(`disabled`,!e.range()),O(2),F(`disabled`,!e.canPan(-1)),O(2),F(`disabled`,!e.canPan(1)),O(2),F(`disabled`,!e.range()),O(2),M(e.events().length?e.shown().length?29:28:27)}}var R5=240,z5=1e3,nae=4,rae=class e{rpc=$(null);open=bv();destroyRef=C(As);tracks=Dv(`tracks`);host=C(Vl);hostPageId=XT();cleanups=[];loads=0;allPages=`all`;clock=F5;span=I5;laneHeight=24;chartWidth=z5;slotWidth=z5/R5;loading=D(!0);failed=D(!1);sources=D({});query=D(``);hidden=D(jie());range=D(null);selectedKey=D(null);brush=D(null);layers=X(()=>lie(_E(this.rpc())));events=X(()=>{let e=new Set(this.layers().map(e=>e.id));return Sie(this.sources()).filter(t=>e.has(t.layer))});pages=X(()=>Cie(this.sources(),this.events()));pageId=Q({source:()=>this.pages().map(e=>e.pageId),computation:(e,t)=>t&&(t.value===`all`||e.includes(t.value))?t.value:this.hostPageId&&e.includes(this.hostPageId)?this.hostPageId:`all`});pageOptions=X(()=>[{value:`all`,label:`All pages`},...this.pages().map(e=>({value:e.pageId,label:e.label,...e.label===e.pageId?{}:{hint:e.pageId}}))]);showPage=X(()=>this.pageId()===`all`&&this.pages().length>1);matching=X(()=>wie(this.events(),{layers:new Set(C5.map(e=>e.id)),pageId:this.pageId(),query:this.query()}));layerCounts=X(()=>{let e=Object.fromEntries(C5.map(e=>[e.id,0]));for(let t of j5(this.matching(),this.range()))e[t.layer]++;return e});visible=X(()=>{let e=new Set(this.hidden());return this.matching().filter(t=>!e.has(t.layer))});lanes=X(()=>{let e=new Set(this.hidden());return this.layers().filter(t=>!e.has(t.id))});laneIndex=X(()=>Object.fromEntries(this.lanes().map((e,t)=>[e.id,t])));bounds=X(()=>Tie(this.visible()));view=X(()=>this.range()??this.bounds());shown=X(()=>j5(this.visible(),this.range()));listed=X(()=>this.shown().slice(-200).reverse());bins=X(()=>{let e=this.view();return e?kie(this.shown(),e,R5):[]});maxBin=X(()=>this.bins().reduce((e,t)=>Math.max(e,t.count),1));selected=X(()=>this.events().find(e=>e.key===this.selectedKey())??null);selectedMark=X(()=>{let e=this.selected(),t=this.view(),n=e?this.laneIndex()[e.layer]:void 0;if(!e||!t||n===void 0||e.att.end)return null;let r=Math.max(1,t.end-t.start);return{x:Math.min(239,Math.floor((e.at-t.start)/r*R5))*this.slotWidth,y:n*this.laneHeight}});brushBox=X(()=>{let e=this.brush();if(!e)return null;let t=Math.min(e.from,e.to),n=Math.max(e.from,e.to);return{left:t*100,width:(n-t)*100}});countText=X(()=>{let e=this.events().length;return`${this.shown().length} of ${e} ${e===1?`event`:`events`}`});countStatus=J3(()=>[this.query(),this.hidden(),this.pageId(),this.range()],()=>this.countText());viewText=X(()=>{let e=this.view();if(!e)return``;let t=I5(e.end-e.start);return this.range()?`Range of ${t}`:`All ${t}`});chartLabel=X(()=>{let e=this.view();if(!e)return`Timeline`;let t=this.layerCounts(),n=this.lanes().map(e=>`${e.label} ${t[e.id]}`);return`Timeline from ${F5(e.start)} to ${F5(e.end)}: ${n.join(`, `)}. The Events list holds the same events.`});canZoomIn=X(()=>{let e=this.view();return!!e&&e.end-e.start>40});constructor(){_c(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.stop())}layerLabel(e){return w5[e].label}tabLabel(e){return w5[e].tabLabel}pageLabel(e){return e?this.pages().find(t=>t.pageId===e)?.label??e:`Server`}binOpacity(e){return Math.round((.55+.45*Math.min(1,Math.log2(e+1)/Math.log2(this.maxBin()+1)))*100)/100}toggleLayer(e){let t=this.hidden().includes(e)?this.hidden().filter(t=>t!==e):[...this.hidden(),e];this.hidden.set(t),P5(t)}clearFilters(){this.query.set(``),this.range.set(null),this.hidden.set([]),P5([]),this.pageId.set(`all`)}zoom(e){let t=this.view(),n=this.bounds();t&&n&&this.range.set(Eie(t,e,n))}canPan(e){let t=this.range(),n=this.bounds();return!t||!n?!1:e<0?t.start>n.start:t.end{this.host.nativeElement.querySelector(`button.row[data-key="${CSS.escape(o.key)}"]`)?.scrollIntoView?.({block:`nearest`})}))}retry(){let e=this.rpc();e&&this.load(e)}stop(){for(let e of this.cleanups.splice(0))e()}async load(e){this.stop();let t=++this.loads;this.loading.set(!0),this.failed.set(!1);let n=e.scope(`pangular`).rpc,r=await Promise.allSettled(C5.map(async e=>{let r=await n.sharedState(e.state);if(this.destroyRef.destroyed||t!==this.loads)return;let i=t=>this.sources.update(n=>({...n,[e.id]:t}));i(r.value()),this.cleanups.push(r.on(`updated`,i))}));this.destroyRef.destroyed||t!==this.loads||(this.failed.set(r.every(e=>e.status===`rejected`)),this.loading.set(!1))}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-timeline`]],viewQuery:function(e,t){e&1&&Xg(t.tracks,Mie,5),e&2&&Zg()},inputs:{rpc:[1,`rpc`]},outputs:{open:`open`},decls:5,vars:1,consts:[[`search`,``],[`tracks`,``],[1,`intro`],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`toolbar`],[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 events`,`placeholder`,`Filter by name, URL or detail`,`autocomplete`,`off`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`options`,`value`],[1,`count`],[`role`,`status`,1,`sr-only`],[1,`controls`],[`role`,`group`,`aria-label`,`Layers`,1,`layers`],[`type`,`button`,1,`layer`],[`role`,`group`,`aria-label`,`Time range`,1,`zoom`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`ariaLabel`,`Page`,1,`page-select`,3,`valueChange`,`options`,`value`],[`type`,`button`,1,`layer`,3,`click`],[`aria-hidden`,`true`,1,`check`],[1,`badge`],[1,`muted`],[`aria-labelledby`,`timeline-chart-heading`,1,`chart-card`],[1,`chart-head`],[`id`,`timeline-chart-heading`],[1,`chart`],[`aria-hidden`,`true`,1,`lane-labels`],[`role`,`img`,1,`tracks`,3,`pointerdown`,`pointermove`,`pointerup`,`pointercancel`],[`preserveAspectRatio`,`none`,`aria-hidden`,`true`],[`x1`,`0`,1,`lane-line`],[1,`mark`],[1,`selected-mark`],[1,`brush`,3,`left`,`width`],[`aria-hidden`,`true`,1,`axis`],[1,`hint`],[1,`split`],[`aria-labelledby`,`timeline-events-heading`,1,`events`],[`id`,`timeline-events-heading`],[1,`note`],[`appRovingList`,`button.row`,`aria-label`,`Events, newest first`,1,`rows`],[`aria-labelledby`,`timeline-detail-heading`,1,`detail-panel`],[`id`,`timeline-detail-heading`],[1,`brush`],[`type`,`button`,1,`row`,3,`click`,`dblclick`],[1,`when`],[1,`chip`],[1,`title`],[1,`detail`],[1,`page`],[1,`detail-title`],[`type`,`button`,1,`primary`,3,`click`],[1,`mono`]],template:function(e,t){e&1&&(I(0,`p`,2),K(1,` Navigations, HTTP calls, NgRx actions, change detection cycles, form events and signal changes from the live page on one time axis. Turn layers on and off, drag across the chart to look at a range, and open an event in its own tab. `),L(),j(2,Fie,2,0,`p`,3)(3,Iie,5,0,`div`,4)(4,tae,30,10)),e&2&&(O(2),M(t.loading()?2:t.failed()?3:4))},dependencies:[JD,Iz],styles:[`[_nghost-%COMP%] { +}`]})},C5=[{id:`router`,label:`Router`,tab:`routes`,tabLabel:`Routes`,inspector:`router`,state:`router`},{id:`http`,label:`HTTP`,tab:`network`,tabLabel:`SSR & HTTP`,inspector:`http`,state:`http`},{id:`ngrx`,label:`NgRx`,tab:`store`,tabLabel:`Store`,inspector:`ngrx`,state:`ngrx-store`},{id:`cd`,label:`Change detection`,tab:`components`,tabLabel:`Components`,inspector:`components`,state:`change-detection`},{id:`forms`,label:`Forms`,tab:`forms`,tabLabel:`Forms`,inspector:`forms`,state:`forms`},{id:`signals`,label:`Signals`,tab:`signals`,tabLabel:`Signals`,inspector:`signals`,state:`signal-graph`}],w5=Object.fromEntries(C5.map(e=>[e.id,e]));function fie(e){return C5.filter(t=>e.inspectors[t.inspector])}function T5(e){return Array.isArray(e)?e:[]}function E5(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function D5(e){let t=E5(e).pages;return Array.isArray(t)?t:Object.values(E5(t))}function O5(e){return typeof e==`number`&&Number.isFinite(e)}function pie(e){try{let t=new URL(e,`http://x`);return e.startsWith(`/`)||t.host===`x`?`${t.pathname}${t.search}`:e.replace(/^[a-z]+:\/\/[^/]+/i,``)||e}catch{return e}}function k5(e){return e<10?`${Math.round(e*10)/10} ms`:`${Math.round(e)} ms`}function mie(e){let t;try{t=typeof e==`string`?JSON.stringify(e):JSON.stringify(e)??``}catch{t=String(e)}return t.length>80?`${t.slice(0,79)}…`:t}function hie(e){let t=[];for(let n of D5(e)){let e=typeof n?.pageId==`string`?n.pageId:``;for(let r of T5(n?.navigations)){if(!O5(r?.startedAt)||r.probe||r.beforeConnect)continue;let n=O5(r.endedAt)?Math.max(0,r.endedAt-r.startedAt):void 0,i=r.finalUrl&&r.finalUrl!==r.url?` to ${r.finalUrl}`:``;t.push({key:`router:${e}:${r.id}`,layer:`router`,pageId:e,at:r.startedAt,...n===void 0?{}:{ms:n},title:`Navigation to ${r.url}`,detail:[`${r.outcome}${i}`,r.trigger,n===void 0?``:k5(n)].filter(Boolean).join(` · `),...r.outcome===`failed`?{tone:`danger`}:r.outcome===`cancelled`||r.outcome===`redirected`?{tone:`warn`}:{},link:{tab:`routes`,...e?{page:e}:{}}})}}return t}function gie(e){let t=e.status??0;if(e.error||t>=500||t===0&&!e.cancelled)return`danger`;if(t>=400||e.faulted||e.cancelled)return`warn`}function A5(e,t){if(!O5(e?.at))return null;let n=e.side===`server`?`SSR`:`client`,r=e.status?String(e.status):e.cancelled?`cancelled`:`no response`,i=O5(e.durationMs)?e.durationMs:void 0,a=gie(e);return{key:`http:${e.side===`server`?`server`:t}:${e.id??e.at}`,layer:`http`,pageId:t,at:e.at,...i===void 0?{}:{ms:i},title:`${e.method??`GET`} ${pie(e.url??``)}`,detail:[r,n,i===void 0?``:k5(i),e.cacheHit?`from cache`:``,e.mocked?`mocked`:e.faulted?`fault rule`:``].filter(Boolean).join(` · `),...a?{tone:a}:{},link:{tab:`network`,...t?{page:t}:{}}}}function _ie(e){let t=[],n=D5(e);for(let e of n){let n=typeof e?.pageId==`string`?e.pageId:``;for(let r of T5(e?.calls)){let e=A5(r,n);e&&t.push(e)}}for(let r of T5(E5(e).serverCalls)){let e=r?.pageUrl?n.find(e=>e?.initialUrl&&e.initialUrl===r.pageUrl):void 0,i=A5({...r,side:`server`},e?.pageId??``);i&&t.push(i)}return t}function vie(e){let t=[];for(let n of D5(e)){let e=typeof n?.pageId==`string`?n.pageId:``;for(let r of T5(n?.log)){if(!O5(r?.timestamp))continue;let n=T5(r.diff).length+(r.diffTruncated??0),i=O5(r.durationMs)?r.durationMs:void 0;t.push({key:`ngrx:${e}:${r.seq}`,layer:`ngrx`,pageId:e,at:r.timestamp,...i===void 0?{}:{ms:i},title:r.source===`event`?r.eventType??r.type:r.type,detail:[r.storeId,r.source===`event`?`event`:n?`${n} ${n===1?`change`:`changes`}`:`no change`,i===void 0?``:k5(i)].filter(Boolean).join(` · `),link:{tab:`store`,...e?{page:e}:{}}})}}return t}var yie=16;function bie(e){let t=[];for(let n of D5(e)){let e=typeof n?.pageId==`string`?n.pageId:``;for(let r of T5(n?.cycles)){if(!O5(r?.at))continue;let n=O5(r.ms)?r.ms:0;t.push({key:`cd:${e}:${r.id}`,layer:`cd`,pageId:e,at:r.at,ms:n,title:`Change detection cycle ${r.id}`,detail:[k5(n),`${r.checks} ${r.checks===1?`check`:`checks`}`,r.trigger?`after ${r.trigger}`:``].filter(Boolean).join(` · `),...n>yie?{tone:`warn`}:{},link:{tab:`components`,...e?{page:e}:{}}})}}return t}function xie(e){return T5(E5(e).events).flatMap((e,t)=>{if(!O5(e?.timestamp)||typeof e.formId!=`string`)return[];let n=oE(e.formId),r=[e.detail,e.origin,e.outcome].filter(Boolean).join(` · `);return[{key:`forms:${e.formId}:${e.seq??`i${t}`}`,layer:`forms`,pageId:n,at:e.timestamp,...O5(e.ms)?{ms:e.ms}:{},title:`${e.type} ${e.path||`form`}`,detail:r,...e.type===`submit`&&e.outcome===`invalid`?{tone:`warn`}:{},link:{tab:`forms`,id:e.formId,...n?{page:n}:{}}}]})}var Sie={write:`set`,sample:`sampled`};function Cie(e){let t=[],n=E5(E5(e).pages),r=Object.keys(n).length?Object.entries(n):[[``,E5(e).graph]];for(let[e,n]of r){let r=E5(n),i=typeof r.pageId==`string`?r.pageId:String(e),a=new Map(T5(r.nodes).map(e=>[e?.id,e?.label||e?.kind||`signal`]));for(let[e,n]of Object.entries(E5(r.history)))for(let r of T5(n)){if(!O5(r?.at)||r.source===`initial`)continue;let n=a.get(e)??e;t.push({key:`signals:${i}:${e}:${r.epoch??r.at}`,layer:`signals`,pageId:i,at:r.at,title:`${n} ${Sie[r.source??``]??`changed`}`,detail:mie(r.value),link:{tab:`signals`,...i?{page:i}:{}}})}}return t}var wie={router:hie,http:_ie,ngrx:vie,cd:bie,forms:xie,signals:Cie};function Tie(e){let t=[];for(let n of C5){let r=e[n.id];r!=null&&t.push(...wie[n.id](r))}let n=new Map(C5.map((e,t)=>[e.id,t]));t.sort((e,t)=>e.at-t.at||n.get(e.layer)-n.get(t.layer)||(e.keyt.key)));let r=new Set;for(let e of t){let t=e.key;for(let n=2;r.has(t);n++)t=`${e.key}#${n}`;e.key=t,r.add(t)}return t}function Eie(e,t){let n=new Map,r=(e,t)=>{typeof e==`string`&&e&&(typeof t==`string`&&t&&!n.get(e)?n.set(e,t):n.has(e)||n.set(e,``))};for(let t of D5(e.http))r(t?.pageId,t?.title||t?.url);for(let t of D5(e.router))r(t?.pageId,t?.snapshot?.url);for(let t of D5(e.ngrx))r(t?.pageId,t?.title||t?.url);for(let e of t)r(e.pageId,``);return[...n].map(([e,t])=>({pageId:e,label:t||e}))}function Die(e,t){let n=t.query.trim().toLowerCase();return e.filter(e=>t.layers.has(e.layer)&&(t.pageId===`all`||e.pageId===t.pageId)&&(!n||e.title.toLowerCase().includes(n)||e.detail.toLowerCase().includes(n)))}function j5(e,t){return t?e.filter(e=>e.at>=t.start&&e.at<=t.end):e}function Oie(e){if(!e.length)return null;let t=1/0,n=-1/0;for(let r of e)t=Math.min(t,r.at),n=Math.max(n,r.at+(r.ms??0));return n-t<20?{start:t-10,end:t+10}:{start:t,end:n}}function kie(e,t,n){let r=Math.max(20,(e.end-e.start)*t);if(r>=n.end-n.start)return null;let i=(e.start+e.end)/2;return M5({start:i-r/2,end:i+r/2},n)}function Aie(e,t,n){let r=(e.end-e.start)*t;return M5({start:e.start+r,end:e.end+r},n)}function M5(e,t){let n=e.end-e.start;return e.startt.end?{start:t.end-n,end:t.end}:e}function jie(e,t,n){let[r,i]=tMath.min(1,Math.max(0,e)),o=e.end-e.start,s=e.start+a(r)*o,c=e.start+a(i)*o;return c-s<20?null:{start:s,end:c}}function Mie(e,t,n){let r=Math.max(1,t.end-t.start),i=new Map;for(let a of e){if(a.att.end)continue;let e=Math.min(n-1,Math.floor((a.at-t.start)/r*n)),o=`${a.layer}:${e}`,s=i.get(o);s||(s={layer:a.layer,slot:e,count:0},i.set(o,s)),s.count++,(a.tone===`danger`||a.tone===`warn`&&s.tone!==`danger`)&&(s.tone=a.tone)}return[...i.values()]}function Nie(e,t,n){let r=null;for(let i of e)i.layer===t&&(!r||Math.abs(i.at-n)C5.some(t=>t.id===e)):[]}catch{return[]}}function P5(e){try{localStorage.setItem(N5,JSON.stringify(e))}catch{}}function F5(e){let t=new Date(e),n=(e,t=2)=>String(e).padStart(t,`0`);return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}.${n(t.getMilliseconds(),3)}`}function I5(e){if(e<1e3)return`${Math.round(e)} ms`;if(e<6e4)return`${Math.round(e/100)/10} s`;let t=Math.floor(e/6e4),n=Math.round(e%6e4/1e3);return n?`${t} min ${n} s`:`${t} min`}var Fie=[`tracks`],L5=(e,t)=>t.id,Iie=(e,t)=>t.layer+t.slot,Lie=(e,t)=>t.key;function Rie(e,t){e&1&&(I(0,`p`,3),K(1,`Loading the timeline…`),L())}function zie(e,t){if(e&1){let e=V();I(0,`div`,4)(1,`p`),K(2,`Can't read the timeline from the devtools server.`),L(),I(3,`button`,5),H(`click`,function(){return w(e),T(W().retry())}),K(4,`Retry`),L()()}}function Bie(e,t){if(e&1){let e=V();I(0,`app-select`,20),H(`valueChange`,function(t){w(e);let n=W(2);return T(n.pageId.set(t??n.allPages))}),L()}if(e&2){let e=W(2);F(`options`,e.pageOptions())(`value`,e.pageId())}}function Vie(e,t){if(e&1){let e=V();I(0,`button`,21),H(`click`,function(){let t=w(e).$implicit;return T(W(2).toggleLayer(t.id))}),R(1,`span`,22),K(2),I(3,`span`,23),K(4),L()()}if(e&2){let e=t.$implicit,n=W(2);A(`aria-pressed`,!n.hidden().includes(e.id)),O(2),J(` `,e.label,` `),O(2),q(n.layerCounts()[e.id])}}function Hie(e,t){e&1&&(I(0,`div`,3)(1,`p`),K(2,`Nothing on the timeline yet.`),L(),I(3,`p`,24),K(4,` Use the app with the overlay loaded. Navigations, HTTP calls, NgRx actions and form events show up as they happen. Record change detection on the Components tab, and pick a component on the Signals tab to follow its signals. `),L()())}function Uie(e,t){if(e&1){let e=V();I(0,`div`,3)(1,`p`),K(2),L(),I(3,`button`,5),H(`click`,function(){w(e),W();let t=Qg(6);return W().clearFilters(),T(t.focus())}),K(4,` Clear filters `),L()()}if(e&2){let e=W(2);O(2),J(`No event matches the filters`,e.range()?` in this range`:``,`.`)}}function Wie(e,t){if(e&1&&(I(0,`li`),K(1),L()),e&2){let e=t.$implicit;O(),q(e.label)}}function Gie(e,t){if(e&1&&(E(),R(0,`line`,32)),e&2){let e=t.$index,n=W(3);A(`x2`,n.chartWidth)(`y1`,e*n.laneHeight+n.laneHeight/2)(`y2`,e*n.laneHeight+n.laneHeight/2)}}function Kie(e,t){if(e&1&&(E(),R(0,`rect`,33)),e&2){let e=t.$implicit,n=W(3);A(`data-tone`,e.tone??null)(`x`,e.slot*n.slotWidth)(`y`,n.laneIndex()[e.layer]*n.laneHeight+4)(`width`,n.slotWidth-1)(`height`,n.laneHeight-8)(`opacity`,n.binOpacity(e.count))}}function qie(e,t){if(e&1&&(E(),R(0,`rect`,34)),e&2){let e=t,n=W(3);A(`x`,e.x-2)(`y`,e.y+1)(`width`,n.slotWidth+3)(`height`,n.laneHeight-2)}}function Jie(e,t){if(e&1&&R(0,`div`,45),e&2){let e=t;y_(`left`,e.left,`%`)(`width`,e.width,`%`)}}function Yie(e,t){if(e&1&&(I(0,`p`,41),K(1),L()),e&2){let e=W(3);O(),Y(` Showing the newest `,e.listed().length,` of `,e.shown().length,` events. Zoom in or filter to see older ones. `)}}function Xie(e,t){if(e&1&&(I(0,`span`,50),K(1),L()),e&2){let e=W().$implicit;O(),q(e.detail)}}function Zie(e,t){if(e&1&&(I(0,`span`,51),K(1),L()),e&2){let e=W().$implicit,t=W(3);O(),q(t.pageLabel(e.pageId))}}function Qie(e,t){if(e&1){let e=V();I(0,`li`)(1,`button`,46),H(`click`,function(){let t=w(e).$implicit;return T(W(3).select(t))})(`dblclick`,function(){let t=w(e).$implicit;return T(W(3).openEvent(t))}),I(2,`time`,47),K(3),L(),I(4,`span`,48),K(5),L(),I(6,`span`,49),K(7),L(),j(8,Xie,2,1,`span`,50),j(9,Zie,2,1,`span`,51),L()()}if(e&2){let e=t.$implicit,n=W(3);O(),G(`selected`,e.key===n.selectedKey()),A(`aria-current`,e.key===n.selectedKey()?`true`:null)(`data-key`,e.key),O(2),q(n.clock(e.at)),O(),A(`data-tone`,e.tone??null),O(),q(n.layerLabel(e.layer)),O(2),q(e.title),O(),M(e.detail?8:-1),O(),M(n.showPage()?9:-1)}}function $ie(e,t){if(e&1&&(I(0,`dt`),K(1,`Took`),L(),I(2,`dd`),K(3),L()),e&2){let e=W(),t=W(3);O(3),q(t.span(e.ms))}}function eae(e,t){if(e&1&&(I(0,`dt`),K(1,`Detail`),L(),I(2,`dd`,54),K(3),L()),e&2){let e=W();O(3),q(e.detail)}}function tae(e,t){if(e&1){let e=V();I(0,`p`,52),K(1),L(),I(2,`dl`)(3,`dt`),K(4,`Layer`),L(),I(5,`dd`),K(6),L(),I(7,`dt`),K(8,`Time`),L(),I(9,`dd`),K(10),L(),j(11,$ie,4,1),j(12,eae,4,1),I(13,`dt`),K(14,`Page`),L(),I(15,`dd`),K(16),L()(),I(17,`button`,53),H(`click`,function(){let t=w(e);return T(W(3).openEvent(t))}),K(18),L()}if(e&2){let e=t,n=W(3);O(),q(e.title),O(5),q(n.layerLabel(e.layer)),O(4),q(n.clock(e.at)),O(),M(e.ms===void 0?-1:11),O(),M(e.detail?12:-1),O(4),q(e.pageId?n.pageLabel(e.pageId):`Server, no page`),O(2),J(` Open in `,n.tabLabel(e.layer),` `)}}function nae(e,t){e&1&&(I(0,`p`,24),K(1,` Select an event in the list or on the chart to see it here. Double click a row to open it in its own tab. `),L())}function rae(e,t){if(e&1){let e=V();I(0,`section`,25)(1,`div`,26)(2,`h2`,27),K(3,`Time axis`),L(),I(4,`span`,24),K(5),L()(),I(6,`div`,28)(7,`ul`,29),N(8,Wie,2,1,`li`,null,L5),L(),I(10,`div`,30,1),H(`pointerdown`,function(t){return w(e),T(W(2).onPointerDown(t))})(`pointermove`,function(t){return w(e),T(W(2).onPointerMove(t))})(`pointerup`,function(t){return w(e),T(W(2).onPointerUp(t))})(`pointercancel`,function(){return w(e),T(W(2).brush.set(null))}),E(),I(12,`svg`,31),N(13,Gie,1,3,`:svg:line`,32,L5),N(15,Kie,1,6,`:svg:rect`,33,Iie),j(17,qie,1,4,`:svg:rect`,34),L(),j(18,Jie,1,4,`div`,35),L()(),bs(),I(19,`div`,36)(20,`span`),K(21),L(),I(22,`span`),K(23),L()(),I(24,`p`,37),K(25,` Drag across the chart to look at a range, and click a mark to select the nearest event. The list below holds the same events. `),L()(),I(26,`div`,38)(27,`section`,39)(28,`h2`,40),K(29,`Events`),L(),j(30,Yie,2,2,`p`,41),I(31,`ol`,42),N(32,Qie,10,10,`li`,null,Lie),L()(),I(34,`aside`,43)(35,`h2`,44),K(36,`Selected event`),L(),j(37,tae,19,7)(38,nae,2,0,`p`,24),L()()}if(e&2){let e,t,n,r=W(2);O(5),q(r.viewText()),O(3),P(r.lanes()),O(2),y_(`height`,r.lanes().length*r.laneHeight,`px`),A(`aria-label`,r.chartLabel()),O(2),A(`viewBox`,`0 0 `+r.chartWidth+` `+r.lanes().length*r.laneHeight),O(),P(r.lanes()),O(2),P(r.bins()),O(2),M((e=r.selectedMark())?17:-1,e),O(),M((t=r.brushBox())?18:-1,t),O(3),q(r.clock(r.view().start)),O(2),q(r.clock(r.view().end)),O(7),M(r.shown().length>r.listed().length?30:-1),O(2),P(r.listed()),O(5),M((n=r.selected())?37:38,n)}}function iae(e,t){if(e&1){let e=V();I(0,`div`,6)(1,`div`,7),E(),I(2,`svg`,8),R(3,`circle`,9)(4,`path`,10),L(),bs(),I(5,`input`,11,0),H(`input`,function(t){return w(e),T(W().query.set(t.target.value))})(`keydown.escape`,function(){return w(e),T(W().query.set(``))}),L()(),j(7,Bie,1,2,`app-select`,12),I(8,`span`,13),K(9),L(),I(10,`p`,14),K(11),L()(),I(12,`div`,15)(13,`div`,16),N(14,Vie,5,3,`button`,17,L5),L(),I(16,`div`,18)(17,`button`,19),H(`click`,function(){return w(e),T(W().zoom(.5))}),K(18,` Zoom in `),L(),I(19,`button`,19),H(`click`,function(){return w(e),T(W().zoom(2))}),K(20,` Zoom out `),L(),I(21,`button`,19),H(`click`,function(){return w(e),T(W().pan(-1))}),K(22,` Earlier `),L(),I(23,`button`,19),H(`click`,function(){return w(e),T(W().pan(1))}),K(24,` Later `),L(),I(25,`button`,19),H(`click`,function(){return w(e),T(W().range.set(null))}),K(26,` Show all `),L()()(),j(27,Hie,5,0,`div`,3)(28,Uie,5,1,`div`,3)(29,rae,39,11)}if(e&2){let e=W();O(5),F(`value`,e.query()),O(2),M(e.pageOptions().length>2?7:-1),O(2),q(e.countText()),O(2),q(e.countStatus()),O(3),P(e.layers()),O(3),F(`disabled`,!e.canZoomIn()),O(2),F(`disabled`,!e.range()),O(2),F(`disabled`,!e.canPan(-1)),O(2),F(`disabled`,!e.canPan(1)),O(2),F(`disabled`,!e.range()),O(2),M(e.events().length?e.shown().length?29:28:27)}}var R5=240,z5=1e3,aae=4,oae=class e{rpc=$(null);open=bv();destroyRef=C(As);tracks=Dv(`tracks`);host=C(Vl);hostPageId=XT();cleanups=[];loads=0;allPages=`all`;clock=F5;span=I5;laneHeight=24;chartWidth=z5;slotWidth=z5/R5;loading=D(!0);failed=D(!1);sources=D({});query=D(``);hidden=D(Pie());range=D(null);selectedKey=D(null);brush=D(null);layers=X(()=>fie(_E(this.rpc())));events=X(()=>{let e=new Set(this.layers().map(e=>e.id));return Tie(this.sources()).filter(t=>e.has(t.layer))});pages=X(()=>Eie(this.sources(),this.events()));pageId=Q({source:()=>this.pages().map(e=>e.pageId),computation:(e,t)=>t&&(t.value===`all`||e.includes(t.value))?t.value:this.hostPageId&&e.includes(this.hostPageId)?this.hostPageId:`all`});pageOptions=X(()=>[{value:`all`,label:`All pages`},...this.pages().map(e=>({value:e.pageId,label:e.label,...e.label===e.pageId?{}:{hint:e.pageId}}))]);showPage=X(()=>this.pageId()===`all`&&this.pages().length>1);matching=X(()=>Die(this.events(),{layers:new Set(C5.map(e=>e.id)),pageId:this.pageId(),query:this.query()}));layerCounts=X(()=>{let e=Object.fromEntries(C5.map(e=>[e.id,0]));for(let t of j5(this.matching(),this.range()))e[t.layer]++;return e});visible=X(()=>{let e=new Set(this.hidden());return this.matching().filter(t=>!e.has(t.layer))});lanes=X(()=>{let e=new Set(this.hidden());return this.layers().filter(t=>!e.has(t.id))});laneIndex=X(()=>Object.fromEntries(this.lanes().map((e,t)=>[e.id,t])));bounds=X(()=>Oie(this.visible()));view=X(()=>this.range()??this.bounds());shown=X(()=>j5(this.visible(),this.range()));listed=X(()=>this.shown().slice(-200).reverse());bins=X(()=>{let e=this.view();return e?Mie(this.shown(),e,R5):[]});maxBin=X(()=>this.bins().reduce((e,t)=>Math.max(e,t.count),1));selected=X(()=>this.events().find(e=>e.key===this.selectedKey())??null);selectedMark=X(()=>{let e=this.selected(),t=this.view(),n=e?this.laneIndex()[e.layer]:void 0;if(!e||!t||n===void 0||e.att.end)return null;let r=Math.max(1,t.end-t.start);return{x:Math.min(239,Math.floor((e.at-t.start)/r*R5))*this.slotWidth,y:n*this.laneHeight}});brushBox=X(()=>{let e=this.brush();if(!e)return null;let t=Math.min(e.from,e.to),n=Math.max(e.from,e.to);return{left:t*100,width:(n-t)*100}});countText=X(()=>{let e=this.events().length;return`${this.shown().length} of ${e} ${e===1?`event`:`events`}`});countStatus=Z3(()=>[this.query(),this.hidden(),this.pageId(),this.range()],()=>this.countText());viewText=X(()=>{let e=this.view();if(!e)return``;let t=I5(e.end-e.start);return this.range()?`Range of ${t}`:`All ${t}`});chartLabel=X(()=>{let e=this.view();if(!e)return`Timeline`;let t=this.layerCounts(),n=this.lanes().map(e=>`${e.label} ${t[e.id]}`);return`Timeline from ${F5(e.start)} to ${F5(e.end)}: ${n.join(`, `)}. The Events list holds the same events.`});canZoomIn=X(()=>{let e=this.view();return!!e&&e.end-e.start>40});constructor(){_c(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.stop())}layerLabel(e){return w5[e].label}tabLabel(e){return w5[e].tabLabel}pageLabel(e){return e?this.pages().find(t=>t.pageId===e)?.label??e:`Server`}binOpacity(e){return Math.round((.55+.45*Math.min(1,Math.log2(e+1)/Math.log2(this.maxBin()+1)))*100)/100}toggleLayer(e){let t=this.hidden().includes(e)?this.hidden().filter(t=>t!==e):[...this.hidden(),e];this.hidden.set(t),P5(t)}clearFilters(){this.query.set(``),this.range.set(null),this.hidden.set([]),P5([]),this.pageId.set(`all`)}zoom(e){let t=this.view(),n=this.bounds();t&&n&&this.range.set(kie(t,e,n))}canPan(e){let t=this.range(),n=this.bounds();return!t||!n?!1:e<0?t.start>n.start:t.end{this.host.nativeElement.querySelector(`button.row[data-key="${CSS.escape(o.key)}"]`)?.scrollIntoView?.({block:`nearest`})}))}retry(){let e=this.rpc();e&&this.load(e)}stop(){for(let e of this.cleanups.splice(0))e()}async load(e){this.stop();let t=++this.loads;this.loading.set(!0),this.failed.set(!1);let n=e.scope(`pangular`).rpc,r=await Promise.allSettled(C5.map(async e=>{let r=await n.sharedState(e.state);if(this.destroyRef.destroyed||t!==this.loads)return;let i=t=>this.sources.update(n=>({...n,[e.id]:t}));i(r.value()),this.cleanups.push(r.on(`updated`,i))}));this.destroyRef.destroyed||t!==this.loads||(this.failed.set(r.every(e=>e.status===`rejected`)),this.loading.set(!1))}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-timeline`]],viewQuery:function(e,t){e&1&&Xg(t.tracks,Fie,5),e&2&&Zg()},inputs:{rpc:[1,`rpc`]},outputs:{open:`open`},decls:5,vars:1,consts:[[`search`,``],[`tracks`,``],[1,`intro`],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`toolbar`],[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 events`,`placeholder`,`Filter by name, URL or detail`,`autocomplete`,`off`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`options`,`value`],[1,`count`],[`role`,`status`,1,`sr-only`],[1,`controls`],[`role`,`group`,`aria-label`,`Layers`,1,`layers`],[`type`,`button`,1,`layer`],[`role`,`group`,`aria-label`,`Time range`,1,`zoom`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`ariaLabel`,`Page`,1,`page-select`,3,`valueChange`,`options`,`value`],[`type`,`button`,1,`layer`,3,`click`],[`aria-hidden`,`true`,1,`check`],[1,`badge`],[1,`muted`],[`aria-labelledby`,`timeline-chart-heading`,1,`chart-card`],[1,`chart-head`],[`id`,`timeline-chart-heading`],[1,`chart`],[`aria-hidden`,`true`,1,`lane-labels`],[`role`,`img`,1,`tracks`,3,`pointerdown`,`pointermove`,`pointerup`,`pointercancel`],[`preserveAspectRatio`,`none`,`aria-hidden`,`true`],[`x1`,`0`,1,`lane-line`],[1,`mark`],[1,`selected-mark`],[1,`brush`,3,`left`,`width`],[`aria-hidden`,`true`,1,`axis`],[1,`hint`],[1,`split`],[`aria-labelledby`,`timeline-events-heading`,1,`events`],[`id`,`timeline-events-heading`],[1,`note`],[`appRovingList`,`button.row`,`aria-label`,`Events, newest first`,1,`rows`],[`aria-labelledby`,`timeline-detail-heading`,1,`detail-panel`],[`id`,`timeline-detail-heading`],[1,`brush`],[`type`,`button`,1,`row`,3,`click`,`dblclick`],[1,`when`],[1,`chip`],[1,`title`],[1,`detail`],[1,`page`],[1,`detail-title`],[`type`,`button`,1,`primary`,3,`click`],[1,`mono`]],template:function(e,t){e&1&&(I(0,`p`,2),K(1,` Navigations, HTTP calls, NgRx actions, change detection cycles, form events and signal changes from the live page on one time axis. Turn layers on and off, drag across the chart to look at a range, and open an event in its own tab. `),L(),j(2,Rie,2,0,`p`,3)(3,zie,5,0,`div`,4)(4,iae,30,10)),e&2&&(O(2),M(t.loading()?2:t.failed()?3:4))},dependencies:[JD,Iz],styles:[`[_nghost-%COMP%] { display: block; font-size: 13px; } @@ -19723,7 +19723,7 @@ dd[_ngcontent-%COMP%] { .layer[_ngcontent-%COMP%] { transition: none; } -}`]})};function iae(e){let t=e===`light`?`#ffffff`:`#0b0b0e`,n=e===`light`?`#92400e`:`#f5a524`;return` +}`]})};function sae(e){let t=e===`light`?`#ffffff`:`#0b0b0e`,n=e===`light`?`#92400e`:`#f5a524`;return` .devframes-dock-entry button { transition: background-color 0.2s, transform 0.3s; } @@ -19814,7 +19814,7 @@ dd[_ngcontent-%COMP%] { transition: none; } } -`}var B5=new Map;function V5(e,t=`dark`,n=50){let r=e?.querySelector(`devframes-dock-standalone`)?.shadowRoot;if(r){if(e){let t=B5.get(e);t!==void 0&&(clearTimeout(t),B5.delete(e))}let n=r.querySelector(`style[data-pangular]`);n||(n=e.createElement(`style`),n.dataset.pangular=``,r.append(n)),n.textContent=iae(t);return}if(n>0&&e){let r=B5.get(e);r!==void 0&&clearTimeout(r);let i=setTimeout(()=>{B5.delete(e),V5(e,t,n-1)},100);B5.set(e,i)}}var H5=`pangular-pref`,U5={order:[],hidden:[],pinned:[]};function W5(e){try{return localStorage.getItem(`${H5}:${e}`)}catch{return null}}function G5(e,t){try{t===null?localStorage.removeItem(`${H5}:${e}`):localStorage.setItem(`${H5}:${e}`,t)}catch{}}function aae(){let e=W5(`theme`);return e===`light`||e===`dark`?e:`system`}function oae(e){G5(`theme`,e===`system`?null:e)}function K5(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`&&e.length>0&&e.length<=40);return[...new Set(t)].slice(0,50)}function sae(){let e=W5(`tabs`);if(!e)return U5;try{let t=JSON.parse(e);if(!t||typeof t!=`object`||Array.isArray(t))return U5;let n=t;return{order:K5(n.order),hidden:K5(n.hidden),pinned:K5(n.pinned)}}catch{return U5}}function cae(e){G5(`tabs`,!e.order.length&&!e.hidden.length&&!e.pinned.length?null:JSON.stringify(e))}function lae(){return W5(`passive`)===`true`}function uae(e){G5(`passive`,e?`true`:null)}function q5(e,t){let n=n=>{let r=t.order.indexOf(n);return r<0?t.order.length+e.indexOf(n):r},r=[...e].sort((e,t)=>n(e)-n(t));return[...r.filter(e=>t.pinned.includes(e)),...r.filter(e=>!t.pinned.includes(e))]}function dae(e,t,n){let r=new Map(e.map(e=>[e.id,e]));return q5(e.map(e=>e.id),t).filter(e=>e===n||t.pinned.includes(e)||!t.hidden.includes(e)).map(e=>r.get(e))}function J5(e,t,n,r){let i=q5(e,t),a=i.indexOf(n),o=a+r;if(a<0||o<0||o>=i.length)return t;let s=t.pinned.includes(n);if(t.pinned.includes(i[o])!==s)return t;let c=[...i];return[c[a],c[o]]=[c[o],c[a]],{...t,order:c}}function fae(e,t,n){let r=e.hidden.filter(e=>e!==t);return{...e,hidden:n?[...r,t]:r,pinned:n?e.pinned.filter(e=>e!==t):e.pinned}}function pae(e,t,n,r){let i=t.pinned.filter(e=>e!==n);return{order:q5(e,t),pinned:r?[...i,n]:i,hidden:r?t.hidden.filter(e=>e!==n):t.hidden}}function Y5(){try{let e=navigator;return/mac|iphone|ipad|ipod/i.test(e.userAgentData?.platform??e.platform??``)}catch{return!1}}function mae(e=window){try{for(let t=e;t!==t.parent;t=t.parent){let e=t.frameElement?.getRootNode();if(e&&`host`in e&&e.host?.id===`pangular-popup-root`)return!0}}catch{}return!1}var hae=`pangular-inspector-`;function X5(e=window){try{let t=e.top??e;return t.name.startsWith(hae)&&t.opener&&t.opener!==t?t.opener:null}catch{return null}}function gae(e=window){let t=X5(e);if(!t)return!1;let n;try{n=t.location.origin}catch{try{n=new URL(e.document.referrer).origin}catch{n=void 0}}if(!n||n===`null`)return!1;try{return t.postMessage({type:`pangular:popup-return`},n),!0}catch{return!1}}var _ae=class e{current=D(`dark`);preference=D(aae());source=`dark`;sourceAttr=!1;constructor(){let e=C(As),t=yae(),n=document.documentElement.dataset.theme,r=n===`light`||n===`dark`;if(n===`light`||n===`dark`)this.fromSource(n,!0);else if(t)r=!0,this.fromSource(Z5(t),!0);else{let t=vae();if(t){this.fromSource(t.matches?`light`:`dark`,!1);let n=e=>{r||this.fromSource(e.matches?`light`:`dark`,!1)};t.addEventListener(`change`,n),e.onDestroy(()=>t.removeEventListener(`change`,n))}else this.resolve()}let i;try{i=new BroadcastChannel(`pangular:theme`)}catch{}_c(()=>{let e=this.current();try{i?.postMessage(e)}catch{}for(let{win:t,origin:n}of Q5())try{t.postMessage({type:`pangular:theme-change`,theme:e},n)}catch{}});let a=e=>{if(e.source!==window.parent)return;let t=e.data;t?.type===`pangular:theme-change`&&(r=!0,this.fromSource(t.theme===`dark`?`dark`:`light`,!0))};window.addEventListener(`message`,a);let o;t&&(o=new MutationObserver(()=>this.fromSource(Z5(t),!0)),o.observe(t,{attributes:!0,attributeFilter:[`class`]})),e.onDestroy(()=>{window.removeEventListener(`message`,a),o?.disconnect(),i?.close()})}setPreference(e){this.preference.set(e),oae(e),this.resolve()}fromSource(e,t){this.source=e,this.sourceAttr=t,this.resolve()}resolve(){let e=this.preference(),t=e===`system`?this.source:e;this.current.set(t);let n=document.documentElement;e!==`system`||this.sourceAttr?n.dataset.theme=t:delete n.dataset.theme}static ɵfac=function(t){return new(t||e)};static ɵprov=Rl({token:e,factory:e.ɵfac})};function vae(){try{return window.matchMedia?.(`(prefers-color-scheme: light)`)??null}catch{return null}}function Z5(e){return e.classList.contains(`dark`)?`dark`:`light`}function yae(){try{return window.frameElement?.closest(`.devframes-color-root`)??null}catch{return null}}function Q5(e=window){let t=[],n;try{n=e.location.ancestorOrigins}catch{}let r=e;try{for(let i=0;r!==r.parent;i++){r=r.parent;let a=bae(e,r,i,n);a&&t.push({win:r,origin:a})}}catch{}return t}function bae(e,t,n,r){let i=e=>e&&e!==`null`?e:void 0,a=i(r?.item(n));if(a)return a;try{let e=i(t.location.origin);if(e)return e}catch{}if(!(n>0))try{return i(new URL(e.document.referrer).origin)}catch{return}}var xae=`__DEVFRAME_HUB_CLIENT_CONTEXT__`;function $5(){try{return window.parent===window?void 0:window.parent[xae]}catch{return}}function e7(e,t,n=50){let r=$5();if(!r){if(n<=0||window.parent===window)return()=>{};let r=()=>{},i=setTimeout(()=>r=e7(e,t,n-1),100);return()=>{clearTimeout(i),r()}}let i=e.map(e=>r.docks.getStateById(Kw(e))?.events.on(`entry:activated`,()=>t(e))??(()=>{})),a=r.docks.selectedId,o=e.find(e=>Kw(e)===a);return o&&t(o),()=>i.forEach(e=>e())}function t7(){return!!$5()}async function n7(e){let t=$5();if(!t)return!1;try{return await t.docks.switchEntry(Kw(e))}catch{return!1}}function Sae(){let e=$5()?.commands?.openPalette;if(typeof e!=`function`)return!1;try{return e(),!0}catch{return!1}}function Cae(e,t){let n=new URL(e);return n.searchParams.delete(`view`),n.hash=t?`tab=${t}`:``,n.pathname+n.search+n.hash}function wae(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}var r7=`pangular-tab`;function i7(e,t,n){let r=new URLSearchParams(e.replace(/^#/,``)).get(`tab`)||t;return n.find(e=>e===r)}function a7(e){try{return sessionStorage.getItem(`${r7}:${e}`)}catch{return null}}function Tae(e,t){try{sessionStorage.setItem(`${r7}:${e}`,t)}catch{}}function Eae(e,t){try{return new URL(e,t.href).origin===t.origin}catch{return!1}}function Dae(e,t){if(t.protocol!==`chrome-extension:`)return!1;try{let{protocol:t}=new URL(e);return t===`http:`||t===`https:`}catch{return!1}}function Oae(e=location){let t=new URLSearchParams(e.search).get(`baseURL`);if(t&&(Eae(t,e)||Dae(t,e)))return t;if(!(e.pathname.includes(`__pangular`)||e.pathname.includes(`__devframes/`)))return[`/__pangular/`,`./`]}var o7=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`,kae=`pangular-auth-token:`,Aae=`devframe-auth`,jae={token:void 0,remember:()=>{}};function Mae(e,t=location){if(typeof e!=`string`)return null;try{let n=new URL(e,t.href).origin;return n===t.origin||n===`null`?null:n}catch{return null}}function Nae(e,t=location,n=Fae(),r=globalThis){let i=Mae(e,t);if(!i||(Pae(r),!n))return jae;let a=kae+i;try{n.removeItem(o7)}catch{}delete globalThis[o7];let o;try{o=n.getItem(a)||void 0}catch{o=void 0}return{get token(){return o},remember(e){try{if(n.removeItem(o7),!e||e===o)return;o=e,n.setItem(a,e)}catch{}}}}var s7=new WeakSet;function Pae(e=globalThis){let t=e.BroadcastChannel;if(typeof t==`function`&&!s7.has(t)){let n=class extends t{constructor(e){if(String(e)===Aae)throw Error(`The devframe-auth channel is off in a panel on another origin.`);super(e)}};s7.add(n),e.BroadcastChannel=n}let n=e.Storage?.prototype;if(n&&!s7.has(n)){s7.add(n);let{getItem:e,setItem:t}=n;n.getItem=function(t){return String(t)===o7?null:e.call(this,t)},n.setItem=function(e,n){String(e)!==o7&&t.call(this,e,n)}}}function Fae(){try{return typeof localStorage>`u`?null:localStorage}catch{return null}}var c7=(()=>{class e{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,t){this._renderer=e,this._elementRef=t}setProperty(e,t){this._renderer.setProperty(this._elementRef.nativeElement,e,t)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty(`disabled`,e)}static ɵfac=function(t){return new(t||e)(am(wp),am(Vl))};static ɵdir=Oh({type:e})}return e})(),Iae=(()=>{class e extends c7{static ɵfac=(()=>{let t;return function(n){return(t||=Pl(e))(n||e)}})();static ɵdir=Oh({type:e,features:[Rh]})}return e})(),l7=new Fi(``),Lae={provide:l7,useExisting:Ti(()=>u7),multi:!0};function Rae(){let e=Iv()?Iv().getUserAgent():``;return/android (\d+)/.test(e.toLowerCase())}var zae=new Fi(``),u7=(()=>{class e extends c7{_compositionMode;_composing=!1;constructor(e,t,n){super(e,t),this._compositionMode=n,this._compositionMode??=!Rae()}writeValue(e){let t=e??``;this.setProperty(`value`,t)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static ɵfac=function(t){return new(t||e)(am(wp),am(Vl),am(zae,8))};static ɵdir=Oh({type:e,selectors:[[`input`,`formControlName`,``,3,`type`,`checkbox`,3,`ngNoCva`,``],[`textarea`,`formControlName`,``,3,`ngNoCva`,``],[`input`,`formControl`,``,3,`type`,`checkbox`,3,`ngNoCva`,``],[`textarea`,`formControl`,``,3,`ngNoCva`,``],[`input`,`ngModel`,``,3,`type`,`checkbox`,3,`ngNoCva`,``],[`textarea`,`ngModel`,``,3,`ngNoCva`,``],[``,`ngDefaultControl`,``]],hostBindings:function(e,t){e&1&&H(`input`,function(e){return t._handleInput(e.target.value)})(`blur`,function(){return t.onTouched()})(`compositionstart`,function(){return t._compositionStart()})(`compositionend`,function(e){return t._compositionEnd(e.target.value)})},standalone:!1,features:[nv([Lae]),Rh]})}return e})();function d7(e){return e==null||f7(e)===0}function f7(e){return e==null?null:Array.isArray(e)||typeof e==`string`?e.length:e instanceof Set?e.size:null}var p7=new Fi(``),Bae=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,m7=class{static min(e){return Vae(e)}static max(e){return Hae(e)}static required(e){return h7(e)}static requiredTrue(e){return Uae(e)}static email(e){return Wae(e)}static minLength(e){return Gae(e)}static maxLength(e){return Kae(e)}static pattern(e){return qae(e)}static nullValidator(e){return g7()}static compose(e){return S7(e)}static composeAsync(e){return w7(e)}};function Vae(e){return t=>{if(t.value==null||e==null)return null;let n=parseFloat(t.value);return!isNaN(n)&&n{if(t.value==null||e==null)return null;let n=parseFloat(t.value);return!isNaN(n)&&n>e?{max:{max:e,actual:t.value}}:null}}function h7(e){return d7(e.value)?{required:!0}:null}function Uae(e){return e.value===!0?null:{required:!0}}function Wae(e){return d7(e.value)||Bae.test(e.value)?null:{email:!0}}function Gae(e){return t=>{let n=t.value?.length??f7(t.value);return n===null||n===0?null:n{let n=t.value?.length??f7(t.value);return n!==null&&n>e?{maxlength:{requiredLength:e,actualLength:n}}:null}}function qae(e){if(!e)return g7;let t,n;return typeof e==`string`?(n=``,e.charAt(0)!==`^`&&(n+=`^`),n+=e,e.charAt(e.length-1)!==`$`&&(n+=`$`),t=new RegExp(n)):(n=e.toString(),t=e),e=>{if(d7(e.value))return null;let r=e.value;return t.test(r)?null:{pattern:{requiredPattern:n,actualValue:r}}}}function g7(e){return null}function _7(e){return e!=null}function v7(e){return yh(e)?See(e):e}function y7(e){let t={};return e.forEach(e=>{t=e==null?t:{...t,...e}}),Object.keys(t).length===0?null:t}function b7(e,t){return t.map(t=>t(e))}function Jae(e){return!e.validate}function x7(e){return e.map(e=>Jae(e)?e:t=>e.validate(t))}function S7(e){if(!e)return null;let t=e.filter(_7);return t.length==0?null:function(e){return y7(b7(e,t))}}function C7(e){return e==null?null:S7(x7(e))}function w7(e){if(!e)return null;let t=e.filter(_7);return t.length==0?null:function(e){return Nee(b7(e,t).map(v7)).pipe(hi(y7))}}function T7(e){return e==null?null:w7(x7(e))}function E7(e){return e?Array.isArray(e)?e:[e]:[]}function D7(e,t){return Array.isArray(e)?e.includes(t):e===t}function O7(e,t){let n=E7(t);return E7(e).forEach(e=>{D7(n,e)||n.push(e)}),n}function k7(e,t){return E7(t).filter(t=>!D7(e,t))}var Yae=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=C7(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=T7(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control?.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},A7=`VALID`,j7=`INVALID`,M7=`PENDING`,N7=`DISABLED`,P7=class{},F7=class extends P7{value;source;constructor(e,t){super(),this.value=e,this.source=t}},I7=class extends P7{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},L7=class extends P7{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},R7=class extends P7{status;source;constructor(e,t){super(),this.status=e,this.source=t}},z7=class extends P7{source;constructor(e){super(),this.source=e}};function Xae(e){return Array.isArray(e)?C7(e):e||null}function Zae(e){return Array.isArray(e)?T7(e):e||null}function Qae(e){return e!=null&&!Array.isArray(e)&&typeof e==`object`}var $ae=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_hasRequired=D(!1);_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e,this._updateHasRequiredValidator()}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return Z(this.statusReactive)}set status(e){Z(()=>this.statusReactive.set(e))}_status=X(()=>this.statusReactive());statusReactive=D(void 0);get valid(){return this.status===A7}get invalid(){return this.status===j7}get pending(){return this.status===M7}get disabled(){return this.status===N7}get enabled(){return this.status!==N7}errors;get pristine(){return Z(this.pristineReactive)}set pristine(e){Z(()=>this.pristineReactive.set(e))}_pristine=X(()=>this.pristineReactive());pristineReactive=D(!0);get dirty(){return!this.pristine}get touched(){return Z(this.touchedReactive)}set touched(e){Z(()=>this.touchedReactive.set(e))}_touched=X(()=>this.touchedReactive());touchedReactive=D(!1);get untouched(){return!this.touched}_events=new Jr;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:`change`}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(O7(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(O7(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(k7(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(k7(e,this._rawAsyncValidators))}hasValidator(e){return D7(this._rawValidators,e)}hasAsyncValidator(e){return D7(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsTouched({...e,sourceControl:n}),t&&e.emitEvent!==!1&&this._events.next(new L7(!0,n))}markAllAsDirty(e={}){this.markAsDirty({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(e))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=e.sourceControl??this;this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),e.onlySelf||this._parent?._updateTouched(e,n),t&&e.emitEvent!==!1&&this._events.next(new L7(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty({...e,sourceControl:n}),t&&e.emitEvent!==!1&&this._events.next(new I7(!1,n))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=e.sourceControl??this;this._forEachChild(t=>{t.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),e.onlySelf||this._parent?._updatePristine(e,n),t&&e.emitEvent!==!1&&this._events.next(new I7(!0,n))}markAsPending(e={}){this.status=M7;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new R7(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending({...e,sourceControl:t})}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=N7,this.errors=null,this._forEachChild(t=>{t.disable({...e,onlySelf:!0})}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new F7(this.value,n)),this._events.next(new R7(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...e,skipPristineCheck:t},this),this._onDisabledChange.forEach(e=>e(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=A7,this._forEachChild(t=>{t.enable({...e,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors({...e,skipPristineCheck:t},this),this._onDisabledChange.forEach(e=>e(!1))}_updateAncestors(e,t){e.onlySelf||(this._parent?.updateValueAndValidity(e),e.skipPristineCheck||this._parent?._updatePristine({},t),this._parent?._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let t=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===A7||this.status===M7)&&this._runAsyncValidator(t,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new F7(this.value,t)),this._events.next(new R7(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity({...e,sourceControl:t})}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?N7:A7}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=M7,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let n=v7(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(n=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(n,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(e){let t=e;return t==null||(Array.isArray(t)||(t=t.split(`.`)),t.length===0)?null:t.reduce((e,t)=>e&&e._find(t),this)}getError(e,t){let n=t?this.get(t):this;return n?.errors?n.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,t,n){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||n)&&this._events.next(new R7(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new Fs,this.statusChanges=new Fs}_calculateStatus(){return this._allControlsDisabled()?N7:this.errors?j7:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(M7)?M7:this._anyControlsHaveStatus(j7)?j7:A7}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,t){let n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,e.onlySelf||this._parent?._updatePristine(e,t),r&&this._events.next(new I7(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new L7(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Qae(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=Xae(this._rawValidators),this._updateHasRequiredValidator()}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=Zae(this._rawAsyncValidators)}_updateHasRequiredValidator(){Z(()=>this._hasRequired.set(this.hasValidator(m7.required)))}};function B7(e){return e.tagName===`INPUT`||e.tagName===`SELECT`||e.tagName===`TEXTAREA`}function eoe(e){if(e.tagName!==`INPUT`)return!1;let t=e.type;return t===`number`||t===`range`||t===`date`||t===`month`}function toe(e){return e.tagName===`INPUT`||e.tagName===`TEXTAREA`}function V7(e,t,n,r){switch(n){case`name`:e.setAttribute(t,n,r);break;case`disabled`:case`readonly`:case`required`:r?e.setAttribute(t,n,``):e.removeAttribute(t,n);break;case`max`:case`min`:case`minLength`:case`maxLength`:r===void 0?e.removeAttribute(t,n):e.setAttribute(t,n,r.toString())}}var noe=class{kind;context;control;message;constructor({kind:e,context:t,control:n}){this.kind=e,this.context=t,this.control=n}},roe=(()=>{class e{_validator=g7;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let t=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(t),this._validator=this._enabled?this.createValidator(t):g7,this._onChange?.()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static ɵfac=function(t){return new(t||e)};static ɵdir=Oh({type:e,features:[Nc]})}return e})(),ioe={provide:p7,useExisting:Ti(()=>H7),multi:!0},H7=(()=>{class e extends roe{required;inputName=`required`;normalizeInput=jv;createValidator=e=>h7;enabled(e){return e}static ɵfac=(()=>{let t;return function(n){return(t||=Pl(e))(n||e)}})();static ɵdir=Oh({type:e,selectors:[[``,`required`,``,`formControlName`,``,3,`type`,`checkbox`],[``,`required`,``,`formControl`,``,3,`type`,`checkbox`],[``,`required`,``,`ngModel`,``,3,`type`,`checkbox`]],hostVars:1,hostBindings:function(e,t){e&2&&A(`required`,t._enabled?``:null)},inputs:{required:`required`},standalone:!1,features:[nv([ioe]),Rh]})}return e})(),aoe=new Fi(``);function ooe(e){return Object.getPrototypeOf(e.constructor)===Iae}function U7(e,t){if(!t)return null;let n,r,i;return t.forEach(e=>{e.constructor===u7?n=e:ooe(e)?r=e:i=e}),i||r||n||null}var soe=class extends Yae{_parent=null;name=null;valueAccessor=null;isCustomControlBased=!1;userOnReset;resetSubscription;set onReset(e){this.userOnReset=e,this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.control&&(this.resetSubscription=this.control.events.subscribe(e=>{e instanceof z7&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription?.add(this.resetSubscription))}isNativeFormElement=!1;rawValueAccessors;_selectedValueAccessor=null;get selectedValueAccessor(){return this._selectedValueAccessor??=U7(this,this.rawValueAccessors)}parseErrorsValidator=null;renderer;injector;requiredValidatorViaDi;subscription;customControlBindings=null;constructor(e,t,n){super(),this.injector=e,this.renderer=t,this.rawValueAccessors=n,this.injector?.get(As)?.onDestroy(()=>{this.removeParseErrorsValidator(this.control),this.subscription?.unsubscribe()})}setupCustomControl(){this.subscription?.unsubscribe();let e=this.injector?.get(rne);if(!this.control||!e)return;let t=e.markForCheck.bind(e);this.subscription=new fr,this.subscription.add(this.control.valueChanges.subscribe(t)),this.subscription.add(this.control.statusChanges.subscribe(t)),this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.userOnReset&&(this.resetSubscription=this.control.events.subscribe(e=>{e instanceof z7&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription.add(this.resetSubscription)),this.parseErrorsValidator&&this.control.addValidators(this.parseErrorsValidator)}ngControlCreate(e){!e.nativeElement.hasAttribute?.(`ngNoCva`)&&(this.rawValueAccessors&&this.rawValueAccessors.length>0||this.valueAccessor!==null)||!e.customControl||(this.isCustomControlBased=!0,e.listenToCustomControlModel(e=>{this.control?.markAsDirty(),this.control?.setValue(e,{emitModelToViewChange:!1}),this.viewToModelUpdate(e)}),e.listenToCustomControlOutput(`touch`,()=>{this.control?.markAsTouched()}),this.customControlBindings={},this.isNativeFormElement=B7(e.nativeElement),this.requiredValidatorViaDi=this._rawValidators.find(e=>e instanceof H7))}ngControlUpdate(e,t){if(!this.isCustomControlBased)return;let n=this.control,r=this.customControlBindings;Object.is(r.value,n.value)||(r.value=n.value,e.setCustomControlModelInput(n.value)),this.bindControlProperty(e,r,`touched`,n.touched),this.bindControlProperty(e,r,`dirty`,n.dirty),this.bindControlProperty(e,r,`valid`,n.valid),this.bindControlProperty(e,r,`invalid`,n.invalid),this.bindControlProperty(e,r,`pending`,n.pending),this.bindControlProperty(e,r,`disabled`,n.disabled),this.shouldBindRequired&&this.bindControlProperty(e,r,`required`,this.isRequired);let i=n.errors;if(r.errors!==i){r.errors=i;let t=this._convertErrors(i);e.setInputOnDirectives(`errors`,t)}}get isRequired(){return(this.requiredValidatorViaDi?._enabled||this.control?._hasRequired())??!1}get shouldBindRequired(){return!0}bindControlProperty(e,t,n,r){if(t[n]===r)return;t[n]=r;let i=e.setInputOnDirectives(n,r);this.isNativeFormElement&&!i&&(n===`disabled`||n===`required`)&&this.renderer&&V7(this.renderer,e.nativeElement,n,r)}_convertErrors(e){if(e===null)return[];let t=this.control;return Object.entries(e).map(([e,n])=>new noe({context:n,kind:e,control:t}))}setParseErrorSource(e){if(e===void 0)return;let t=null,n=X(()=>{let t=e();return t.length===0?null:t.reduce((e,t)=>(e[t.kind]=t,e),{})});this.parseErrorsValidator=(()=>t).bind(this),_c(()=>{t=n(),this.control?.updateValueAndValidity({emitEvent:!1})},{injector:this.injector})}removeParseErrorsValidator(e){this.parseErrorsValidator&&(e?.removeValidators(this.parseErrorsValidator),e?.updateValueAndValidity({emitEvent:!1}))}},coe=Symbol(`FIELD_TREE`),W7=0;function loe(){return W7}function G7(e,t){return(...n)=>{try{return W7=t,e(...n)}finally{W7=0}}}function uoe(e){return!e}function K7(e){return e}function q7(e){return Array.isArray(e)}function J7(e){return(typeof e==`object`||typeof e==`function`)&&e!=null}var Y7=Symbol(),X7=Symbol(),Z7=class{predicates;fns=[];constructor(e){this.predicates=e}push(e){this.fns.push(e9(this.predicates,e))}mergeIn(e){let t=this.predicates?e.fns.map(e=>e9(this.predicates,e)):e.fns;this.fns.push(...t)}hasRules(){return this.fns.length>0}},Q7=class extends Z7{get defaultValue(){return!1}compute(e){return this.fns.some(t=>{let n=t(e);return n&&n!==X7})}},$7=class e extends Z7{ignore;static ignoreNull(t){return new e(t,e=>e===null)}constructor(e,t){super(e),this.ignore=t}get defaultValue(){return[]}compute(e){return this.fns.reduce((t,n)=>{let r=n(e);return r===void 0||r===X7?t:q7(r)?[...t,...this.ignore?r.filter(e=>!this.ignore(e)):r]:this.ignore&&this.ignore(r)?t:[...t,r]},[])}},doe=class extends $7{constructor(e){super(e,void 0)}},foe=class extends Z7{key;get defaultValue(){return this.key.reducer.getInitial()}constructor(e,t){super(e),this.key=t}compute(e){if(this.fns.length===0)return this.key.reducer.getInitial();let t=this.key.reducer.getInitial();for(let n=0;n{for(let t of e){let e=n.stateOf(t.path),r=Z(e.structure.pathKeys).length-t.depth;for(let t=0;t0}hasMetadata(e){return this.metadata.has(e)}hasMetadataKeys(){return this.metadata.size>0}getMetadataKeys(){return this.metadata.keys()}getMetadata(e){return this.metadata.has(e)||this.metadata.set(e,new foe(this.predicates,e)),this.metadata.get(e)}mergeIn(e){this.hidden.mergeIn(e.hidden),this.disabledReasons.mergeIn(e.disabledReasons),this.readonly.mergeIn(e.readonly),this.syncErrors.mergeIn(e.syncErrors),this.syncTreeErrors.mergeIn(e.syncTreeErrors),this.asyncErrors.mergeIn(e.asyncErrors);for(let t of e.getMetadataKeys()){let n=e.metadata.get(t);this.getMetadata(t).mergeIn(n)}}},n9=class{depth;constructor(e){this.depth=e}build(){return new a9(this,[],0)}},r9=class e extends n9{constructor(e){super(e)}current;all=[];addHiddenRule(e){this.getCurrent().addHiddenRule(e)}addDisabledReasonRule(e){this.getCurrent().addDisabledReasonRule(e)}addReadonlyRule(e){this.getCurrent().addReadonlyRule(e)}addSyncErrorRule(e){this.getCurrent().addSyncErrorRule(e)}addSyncTreeErrorRule(e){this.getCurrent().addSyncTreeErrorRule(e)}addAsyncErrorRule(e){this.getCurrent().addAsyncErrorRule(e)}addMetadataRule(e,t){this.getCurrent().addMetadataRule(e,t)}getChild(e){if(e===Y7){let e=this.getCurrent().children;e.size>+!!e.has(Y7)&&(this.current=void 0)}return this.getCurrent().getChild(e)}hasLogic(e){return this===e||this.all.some(({builder:t})=>t.hasLogic(e))}hasRules(){return this.all.length>0}anyChildHasLogic(){return this.all.some(({builder:e})=>e.anyChildHasLogic())}mergeIn(e,t){t?this.all.push({builder:e,predicate:{fn:G7(t.fn,this.depth),path:t.path}}):this.all.push({builder:e}),this.current=void 0}getCurrent(){return this.current===void 0&&(this.current=new i9(this.depth),this.all.push({builder:this.current})),this.current}static newRoot(){return new e(0)}},i9=class extends n9{logic=new t9([]);children=new Map;constructor(e){super(e)}addHiddenRule(e){this.logic.hidden.push(G7(e,this.depth))}addDisabledReasonRule(e){this.logic.disabledReasons.push(G7(e,this.depth))}addReadonlyRule(e){this.logic.readonly.push(G7(e,this.depth))}addSyncErrorRule(e){this.logic.syncErrors.push(G7(e,this.depth))}addSyncTreeErrorRule(e){this.logic.syncTreeErrors.push(G7(e,this.depth))}addAsyncErrorRule(e){this.logic.asyncErrors.push(G7(e,this.depth))}addMetadataRule(e,t){this.logic.getMetadata(e).push(G7(t,this.depth))}getChild(e){return this.children.has(e)||this.children.set(e,new r9(this.depth+1)),this.children.get(e)}hasLogic(e){return this===e}hasRules(){return this.logic.hasAnyLogic()||this.children.size>0}anyChildHasLogic(){for(let e of this.children.values())if(e.hasRules())return!0;return!1}},a9=class e{builder;predicates;depth;logic;constructor(e,t,n){this.builder=e,this.predicates=t,this.depth=n,this.logic=e?moe(e,t,n):new t9([])}getChild(t){let n=this.builder?o9(this.builder,t):[];if(n.length===0)return new e(void 0,[],this.depth+1);if(n.length===1){let{builder:t,predicates:r}=n[0];return new e(t,[...this.predicates,...r.map(e=>s9(e,this.depth))],this.depth+1)}return new poe(n.map(({builder:t,predicates:n})=>new e(t,[...this.predicates,...n.map(e=>s9(e,this.depth))],this.depth+1)))}hasLogic(e){return this.builder?this.builder.hasLogic(e):!1}hasRules(){return this.builder?this.builder.hasRules():!1}anyChildHasLogic(){return this.builder?this.builder.anyChildHasLogic():!1}},poe=class e{all;logic;constructor(e){this.all=e,this.logic=new t9([]);for(let t of e)this.logic.mergeIn(t.logic)}getChild(t){return new e(this.all.flatMap(e=>e.getChild(t)))}hasLogic(e){return this.all.some(t=>t.hasLogic(e))}hasRules(){return this.all.some(e=>e.hasRules())}anyChildHasLogic(){return this.all.some(e=>e.anyChildHasLogic())}};function o9(e,t){if(e instanceof r9)return e.all.flatMap(({builder:e,predicate:n})=>{let r=o9(e,t);return n?r.map(({builder:e,predicates:t})=>({builder:e,predicates:[...t,n]})):r});if(e instanceof i9)return[...t!==Y7&&e.children.has(Y7)?[{builder:e.getChild(Y7),predicates:[]}]:[],...e.children.has(t)?[{builder:e.getChild(t),predicates:[]}]:[]];throw new _i(1909,!1)}function moe(e,t,n){let r=new t9(t);if(e instanceof r9){let i=e.all.map(({builder:e,predicate:r})=>new a9(e,r?[...t,s9(r,n)]:t,n));for(let e of i)r.mergeIn(e.logic)}else if(e instanceof i9)r.mergeIn(e.logic);else throw new _i(1909,!1);return r}function s9(e,t){return{...e,depth:t}}var c9=Symbol(`PATH`),l9=class e{keys;parent;keyInParent;root;children=new Map;fieldPathProxy=new Proxy(this,hoe);logicBuilder;constructor(e,t,n,r){this.keys=e,this.parent=n,this.keyInParent=r,this.root=t??this,n||(this.logicBuilder=r9.newRoot())}get builder(){return this.logicBuilder?this.logicBuilder:this.parent.builder.getChild(this.keyInParent)}getChild(t){return this.children.has(t)||this.children.set(t,new e([...this.keys,t],this.root,this,t)),this.children.get(t)}mergeIn(e,t){let n=e.compile();this.builder.mergeIn(n.builder,t)}static unwrapFieldPath(e){return e[c9]}static newRoot(){return new e([],void 0,void 0,void 0)}},hoe={get(e,t){return t===c9?e:e.getChild(t).fieldPathProxy}},u9=void 0,d9=new Map,f9=class e{schemaFn;constructor(e){this.schemaFn=e}compile(){if(d9.has(this))return d9.get(this);let e=l9.newRoot();d9.set(this,e);let t=u9;try{u9=e,this.schemaFn(e.fieldPathProxy)}finally{u9=t}return e}static create(t){return t instanceof e?t:new e(t)}static rootCompile(t){try{return d9.clear(),t===void 0?l9.newRoot():t instanceof e?t.compile():new e(t).compile()}finally{d9.clear()}}};function goe(e){return e instanceof f9||typeof e==`function`}function p9(e){if(u9!==l9.unwrapFieldPath(e).root)throw new _i(1908,!1)}function m9(e,t,n){return p9(e),l9.unwrapFieldPath(e).builder.addMetadataRule(t,n),t}var h9={list(){return{reduce:(e,t)=>t===void 0?e:[...e,t],getInitial:()=>[]}},min(){return{reduce:(e,t)=>e===void 0||t===void 0?e??t:tvoid 0}},max(){return{reduce:(e,t)=>e===void 0||t===void 0?e??t:t>e?t:e,getInitial:()=>void 0}},or(){return{reduce:(e,t)=>e||t,getInitial:()=>!1}},and(){return{reduce:(e,t)=>e&&t,getInitial:()=>!0}},override:_oe};function _oe(e){return{reduce:(e,t)=>t,getInitial:()=>e?.()}}var g9=Symbol(`IS_ASYNC_VALIDATION_RESOURCE`),voe=class{reducer;create;brand;[g9];constructor(e,t){this.reducer=e,this.create=t}};function _9(e){return new voe(e??h9.override())}function v9(){return _9()}var y9=_9(h9.or()),yoe=v9(),boe=v9(),xoe=_9(h9.max()),Soe=_9(h9.min()),Coe=_9(h9.list());function b9(e,t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n0?`invalid`:e.pending()?`unknown`:`valid`}var Toe=class{node;constructor(e){this.node=e}rawSyncTreeErrors=X(()=>this.shouldSkipValidation()?[]:[...this.node.logicNode.logic.syncTreeErrors.compute(this.node.context),...this.node.structure.parent?.validationState.rawSyncTreeErrors()??[]],{equal:b9});syncErrors=X(()=>this.shouldSkipValidation()?[]:[...this.node.logicNode.logic.syncErrors.compute(this.node.context),...this.syncTreeErrors(),...Eoe(this.node.submitState.submissionErrors())],{equal:b9});syncValid=X(()=>this.shouldSkipValidation()?!0:this.node.structure.reduceChildren(this.syncErrors().length===0,(e,t)=>t&&e.validationState.syncValid(),uoe));syncTreeErrors=X(()=>this.rawSyncTreeErrors().filter(e=>e.fieldTree===this.node.fieldTree),{equal:b9});rawAsyncErrors=X(()=>this.shouldSkipValidation()?[]:[...this.node.logicNode.logic.asyncErrors.compute(this.node.context),...this.node.structure.parent?.validationState.rawAsyncErrors()??[]],{equal:b9});asyncErrors=X(()=>this.shouldSkipValidation()?[]:this.rawAsyncErrors().filter(e=>e===`pending`||e.fieldTree===this.node.fieldTree),{equal:b9});parseErrors=X(()=>this.node.formFieldBindings().flatMap(e=>e.parseErrors()),{equal:b9});errors=X(()=>[...this.parseErrors(),...this.syncErrors(),...this.asyncErrors().filter(e=>e!==`pending`)],{equal:b9});errorSummary=X(()=>{let e=this.node.structure.reduceChildren(this.errors(),(e,t)=>[...t,...e.errorSummary()]);return Z(()=>e.sort(Doe)),e},{equal:b9});pending=X(()=>this.node.structure.reduceChildren(this.asyncErrors().includes(`pending`),(e,t)=>t||e.validationState.pending()));status=X(()=>{if(this.shouldSkipValidation())return`valid`;let e=woe(this);return this.node.structure.reduceChildren(e,(e,t)=>t===`invalid`||e.validationState.status()===`invalid`?`invalid`:t===`unknown`||e.validationState.status()===`unknown`?`unknown`:`valid`,e=>e===`invalid`)});valid=X(()=>this.status()===`valid`);invalid=X(()=>this.status()===`invalid`);shouldSkipValidation=X(()=>this.node.hidden()||this.node.disabled()||this.node.readonly()||this.node.structure.isOrphaned())};function Eoe(e){return e===void 0?[]:q7(e)?e:[e]}function x9(e,t){if(q7(e))for(let n of e)n.fieldTree??=t;else e&&(e.fieldTree??=t);return e}function S9(e){return e.formField?e.formField.element:e.fieldTree().formFieldBindings().reduce((e,t)=>!e||!t.element?e??t.element:e.compareDocumentPosition(t.element)&Node.DOCUMENT_POSITION_PRECEDING?t.element:e,void 0)}function Doe(e,t){let n=S9(e),r=S9(t);return n===r?0:n===void 0||r===void 0?n===void 0?1:-1:n.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_PRECEDING?1:-1}var C9=_9(),Ooe=class{node;cache=new WeakMap;constructor(e){this.node=e,this.fieldTreeOf=this.fieldTreeOf.bind(this),this.stateOf=this.stateOf.bind(this)}resolve(e){if(!this.cache.has(e)){let t=X(()=>{let t=l9.unwrapFieldPath(e),n=this.node,r=loe();for(;r>0||!n.structure.logic.hasLogic(t.root.builder);)if(r--,n=n.structure.parent,n===void 0)throw new _i(1900,!1);for(let e of t.keys)if(n=n.structure.getChild(e),n===void 0)throw new _i(1901,!1);return n.fieldTree});this.cache.set(e,t)}return this.cache.get(e)()}get fieldTree(){return this.node.fieldProxy}get state(){return this.node}get value(){return this.node.structure.value}get key(){return this.node.structure.keyInParent}get pathKeys(){return this.node.structure.pathKeys}index=X(()=>{let e=this.key();if(!q7(Z(this.node.structure.parent.value)))throw new _i(1906,!1);return Number(e)});fieldTreeOf(e){return this.resolve(e)}stateOf(e){return this.resolve(e)()}valueOf=e=>{let t=this.resolve(e)().value();if(t instanceof $ae)throw new _i(1907,!1);return t}},koe=class{node;metadata=new Map;constructor(e){this.node=e}runMetadataCreateLifecycle(){if(!this.node.logicNode.logic.hasMetadataKeys())return;let e=$te();e&&vv(!1);try{Z(()=>so(this.node.structure.injector,()=>{for(let e of this.node.logicNode.logic.getMetadataKeys())if(e.create){let t=this.node.logicNode.logic.getMetadata(e),n=e.create(this.node,X(()=>t.compute(this.node.context)));this.metadata.set(e,n)}}))}finally{e&&vv(!0)}}get(e){if(this.has(e)&&!this.metadata.has(e)){if(e.create)throw new _i(1912,!1);let t=this.node.logicNode.logic.getMetadata(e);this.metadata.set(e,X(()=>t.compute(this.node.context)))}return this.metadata.get(e)}has(e){return this.node.logicNode.logic.hasMetadata(e)}},Aoe={get(e,t,n){if(t===coe)return!0;let r=e(),i=r.structure.getChild(t);if(i!==void 0)return i.fieldTree;let a=Z(r.value);if(q7(a)){if(t===`length`)return r.value().length;if(t===Symbol.iterator)return()=>(r.value(),Array.prototype[Symbol.iterator].apply(r.fieldTree))}if(J7(a)&&t===Symbol.iterator)return function*(){for(let e in n)yield[e,n[e]]}},getOwnPropertyDescriptor(e,t){let n=Z(e().value),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&!r.configurable&&(r.configurable=!0),r},ownKeys(e){let t=Z(e().value);return typeof t==`object`&&t?Reflect.ownKeys(t):[]}};function joe(e,t){let n=X(()=>e()[t()]);return n[tn]=e[tn],n.set=r=>{Object.is(Z(n),r)||e.update(e=>Moe(e,r,t()))},n.update=e=>{n.set(e(Z(n)))},n.asReadonly=()=>n,n}function Moe(e,t,n){if(q7(e)){let r=[...e];return r[n]=t,r}return{...e,[n]:t}}var w9=Symbol(``),T9=X(()=>!1),E9=class{logic;node;createChildNode;identitySymbol=Symbol();_injector=void 0;_anyChildHasLogic;get injector(){return this._injector??=Os.create({providers:[],parent:this.fieldManager.injector}),this._injector}constructor(e,t,n){this.logic=e,this.node=t,this.createChildNode=n}children(){this.ensureChildrenMap();let e=this.childrenMap();return e===void 0?[]:Array.from(e.byPropertyKey.values()).map(e=>Z(e.reader))}materializedChildren(){let e=this.childrenMap();return e===void 0?[]:Array.from(e.byPropertyKey.values()).map(e=>e.node)}_areChildrenMaterialized(){return Z(this.childrenMap)!==void 0}ensureChildrenMap(){this._areChildrenMaterialized()||Z(()=>{this.childrenMap.update(e=>this.computeChildrenMap(this.value(),e,!0))})}getChild(e){this.ensureChildrenMap();let t=e.toString(),n=Z(this.childrenMap)?.byPropertyKey.get(t)?.reader;return n||=this.createReader(t),n()}reduceChildren(e,t,n){let r=this.childrenMap();if(!r)return e;let i=e;for(let e of r.byPropertyKey.values()){if(n?.(i))break;i=t(Z(e.reader),i)}return i}destroy(){this.injector.destroy()}createKeyOrOrphanSignals(e,t,n){if(e===`root`)return{keyInParent:D9,isOrphaned:T9};let r=this.parent,i=n,a=X(()=>{if(r.structure.isOrphaned())return w9;let e=r.structure.childrenMap();if(!e)return w9;let n=e.byPropertyKey.get(i);if(n&&n.node===this.node)return i;if(t===void 0)return w9;for(let[t,n]of e.byPropertyKey)if(n.node===this.node)return i=t;return w9}),o=X(()=>a()===w9);return{keyInParent:X(()=>{let e=a();if(e===w9)throw t===void 0?new _i(-1902,!1):new _i(1904,!1);return e}),isOrphaned:o}}createChildrenMap(){return Q({source:this.value,computation:(e,t)=>this.computeChildrenMap(e,t?.value,!1)})}computeChildrenMap(e,t,n){if(!J7(e)||!n&&t===void 0&&!(this._anyChildHasLogic??=this.logic.anyChildHasLogic()))return;t??={byPropertyKey:new Map};let r,i=q7(e);t!==void 0&&(r=i?Ioe(t,e,this.identitySymbol):Loe(t,e));for(let n of Object.keys(e)){let a,o=e[n];if(o===void 0){t.byPropertyKey.has(n)&&(r??={...t},r.byPropertyKey.delete(n));continue}i&&J7(o)&&!q7(o)&&(a=o[this.identitySymbol]??=Symbol(``));let s;a&&(t.byTrackingKey?.has(a)||(r??={...t},r.byTrackingKey??=new Map,r.byTrackingKey.set(a,this.createChildNode(n,a,i))),s=(r??t).byTrackingKey.get(a));let c=t.byPropertyKey.get(n);c===void 0?(r??={...t},r.byPropertyKey.set(n,{reader:this.createReader(n),node:s??this.createChildNode(n,a,i)})):s&&s!==c.node&&(r??={...t},c.node=s)}return r??t}createReader(e){return X(()=>this.childrenMap()?.byPropertyKey.get(e)?.node)}},Noe=class extends E9{fieldManager;value;get parent(){}get root(){return this.node}get pathKeys(){return Foe}get keyInParent(){return D9}isOrphaned=T9;childrenMap;constructor(e,t,n,r,i){super(t,e,i),this.fieldManager=n,this.value=r,this.childrenMap=this.createChildrenMap()}},Poe=class extends E9{logic;parent;root;pathKeys;keyInParent;value;childrenMap;isOrphaned;get fieldManager(){return this.root.structure.fieldManager}constructor(e,t,n,r,i,a){super(t,e,a),this.logic=t,this.parent=n,this.root=this.parent.structure.root;let o=this.createKeyOrOrphanSignals(`child`,r,i);this.isOrphaned=o.isOrphaned,this.keyInParent=o.keyInParent,this.pathKeys=X(()=>[...n.structure.pathKeys(),this.keyInParent()]),this.value=joe(this.parent.structure.value,this.keyInParent),this.childrenMap=this.createChildrenMap(),this.fieldManager.structures.add(this)}},Foe=X(()=>[]),D9=X(()=>{throw new _i(1905,!1)});function Ioe(e,t,n){let r,i=new Set(e.byPropertyKey.keys()),a=e.byTrackingKey&&new Set(e.byTrackingKey.keys());for(let e=0;e0){r??={...e};for(let e of i)r.byPropertyKey.delete(e)}if(a&&a.size>0){r??={...e};for(let e of a)r.byTrackingKey.delete(e)}return r}function Loe(e,t){let n;for(let r of e.byPropertyKey.keys())Object.hasOwn(t,r)||(n??={...e},n.byPropertyKey.delete(r));return n}var Roe=class{node;selfSubmitting=D(!1);submissionErrors;constructor(e){this.node=e,this.submissionErrors=Q({source:this.node.structure.value,computation:()=>[]})}submitting=X(()=>this.selfSubmitting()||(this.node.structure.parent?.submitting()??!1))},O9=class{structure;validationState;metadataState;nodeState;submitState;fieldAdapter;controlValue;_context=void 0;get context(){return this._context??=new Ooe(this)}fieldProxy=new Proxy(()=>this,Aoe);pathNode;constructor(e){this.pathNode=e.pathNode,this.fieldAdapter=e.fieldAdapter,this.structure=this.fieldAdapter.createStructure(this,e),this.validationState=this.fieldAdapter.createValidationState(this,e),this.nodeState=this.fieldAdapter.createNodeState(this,e),this.metadataState=new koe(this),this.submitState=new Roe(this),this.controlValue=this.controlValueSignal(),this.metadataState.runMetadataCreateLifecycle()}focusBoundControl(e){this.getBindingForFocus()?.focus(e)}getBindingForFocus(){return this.formFieldBindings().filter(e=>e.focus!==void 0).reduce(k9,void 0)||this.structure.children().map(e=>e.getBindingForFocus()).reduce(k9,void 0)}pendingSync=Q({source:()=>this.value(),computation:(e,t)=>{t?.value?.abort()}});get fieldTree(){return this.fieldProxy}get logicNode(){return this.structure.logic}get value(){return this.structure.value}get keyInParent(){return this.structure.keyInParent}get errors(){return this.validationState.errors}get parseErrors(){return this.validationState.parseErrors}get errorSummary(){return this.validationState.errorSummary}get pending(){return this.validationState.pending}get valid(){return this.validationState.valid}get invalid(){return this.validationState.invalid}get dirty(){return this.nodeState.dirty}get touched(){return this.nodeState.touched}get disabled(){return this.nodeState.disabled}get disabledReasons(){return this.nodeState.disabledReasons}get hidden(){return this.nodeState.hidden}get readonly(){return this.nodeState.readonly}get formFieldBindings(){return this.nodeState.formFieldBindings}get submitting(){return this.submitState.submitting}get name(){return this.nodeState.name}get max(){let e=this.metadata(boe)?.();return e?this.metadata(e):void 0}get maxLength(){return this.metadata(Soe)}get min(){let e=this.metadata(yoe)?.();return e?this.metadata(e):void 0}get minLength(){return this.metadata(xoe)}get pattern(){return this.metadata(Coe)??zoe}get required(){return this.metadata(y9)??Boe}metadata(e){return this.metadataState.get(e)}getError(e){return this.errors().find(t=>t.kind===e)}hasMetadata(e){return this.metadataState.has(e)}markAsTouched(e){this.structure.isOrphaned()||Z(()=>{this.markAsTouchedInternal(e),this.flushSync()})}markAsTouchedInternal(e){if(!this.structure.isOrphaned()&&!this.validationState.shouldSkipValidation()&&(this.nodeState.markAsTouched(),!e?.skipDescendants))for(let e of this.structure.children())e.markAsTouchedInternal()}markAsDirty(){this.nodeState.markAsDirty()}markAsPristine(){this.nodeState.markAsPristine()}markAsUntouched(){this.nodeState.markAsUntouched()}reset(e){Z(()=>this._reset(e))}_reset(e){this.pendingSync()?.abort(),e!==void 0&&this.value.set(e),this.controlValue.rawSet(this.value()),this.nodeState.markAsUntouched(),this.nodeState.markAsPristine();for(let e of this.formFieldBindings())e.reset();for(let e of this.structure.materializedChildren())e._reset()}reloadValidation(){Z(()=>this._reloadValidation())}_reloadValidation(){let e=this.logicNode.logic.getMetadataKeys();for(let t of e)t[g9]&&this.metadata(t).reload?.();for(let e of this.structure.children())e._reloadValidation()}controlValueSignal(){let e=Q(this.value);e.rawSet=e.set,e.set=t=>{e.rawSet(t),this.markAsDirty(),this.debounceSync()};let t=e.update;return e.update=e=>{t(e),this.markAsDirty(),this.debounceSync()},e}sync(){this.value.set(this.controlValue())}flushSync(){let e=this.pendingSync();e&&!e.signal.aborted&&(e.abort(),this.sync())}async debounceSync(){let e=Z(()=>(this.pendingSync()?.abort(),this.nodeState.debouncer()));if(e){let t=new AbortController,n=e(t.signal);if(n&&(this.pendingSync.set(t),await n,t.signal.aborted))return}this.structure.isOrphaned()||this.sync()}static newRoot(e,t,n,r){return r.newRoot(e,t,n,r)}createStructure(e){return e.kind===`root`?new Noe(this,e.logic,e.fieldManager,e.value,this.newChild.bind(this)):new Poe(this,e.logic,e.parent,e.identityInParent,e.initialKeyInParent,this.newChild.bind(this))}newChild(e,t,n){let r,i;return n?(r=this.pathNode.getChild(Y7),i=this.structure.logic.getChild(Y7)):(r=this.pathNode.getChild(e),i=this.structure.logic.getChild(e)),this.fieldAdapter.newChild({kind:`child`,parent:this,pathNode:r,logic:i,initialKeyInParent:e,identityInParent:t,fieldAdapter:this.fieldAdapter})}},zoe=X(()=>[]),Boe=X(()=>!1);function k9(e,t){return e?t&&e.element.compareDocumentPosition(t.element)&Node.DOCUMENT_POSITION_PRECEDING?t:e:t}var Voe=class{node;selfTouched=D(!1);selfDirty=D(!1);markAsTouched(){this.selfTouched.set(!0)}markAsDirty(){this.selfDirty.set(!0)}markAsPristine(){this.selfDirty.set(!1)}markAsUntouched(){this.selfTouched.set(!1)}formFieldBindings=D([]);constructor(e){this.node=e}dirty=X(()=>{let e=this.selfDirty()&&!this.isNonInteractive();return this.node.structure.reduceChildren(e,(e,t)=>t||e.nodeState.dirty(),K7)});touched=X(()=>{let e=this.selfTouched()&&!this.isNonInteractive();return this.node.structure.reduceChildren(e,(e,t)=>t||e.nodeState.touched(),K7)});disabledReasons=X(()=>[...this.node.structure.parent?.nodeState.disabledReasons()??[],...this.node.logicNode.logic.disabledReasons.compute(this.node.context)],{equal:b9});disabled=X(()=>!!this.disabledReasons().length);readonly=X(()=>(this.node.structure.parent?.nodeState.readonly()||this.node.logicNode.logic.readonly.compute(this.node.context))??!1);hidden=X(()=>(this.node.structure.parent?.nodeState.hidden()||this.node.logicNode.logic.hidden.compute(this.node.context))??!1);name=X(()=>{let e=this.node.structure.parent;return e?`${e.name()}.${this.node.structure.keyInParent()}`:this.node.structure.fieldManager.rootName});debouncer=X(()=>{if(this.node.logicNode.logic.hasMetadata(C9)){let e=this.node.logicNode.logic.getMetadata(C9).compute(this.node.context);if(e)return t=>e(this.node.context,t)}return this.node.structure.parent?.nodeState.debouncer?.()});isNonInteractive=X(()=>this.hidden()||this.disabled()||this.readonly())},Hoe=class{newRoot(e,t,n,r){return new O9({kind:`root`,fieldManager:e,value:t,pathNode:n,logic:n.builder.build(),fieldAdapter:r})}newChild(e){return new O9(e)}createNodeState(e){return new Voe(e)}createValidationState(e){return new Toe(e)}createStructure(e,t){return e.createStructure(t)}},Uoe=class{injector;rootName;submitOptions;constructor(e,t,n){this.injector=e,this.rootName=t??`${this.injector.get(ic)}.form${Woe++}`,this.submitOptions=n}structures=new Set;createFieldManagementEffect(e){_c(()=>{let t=new Set;this.markStructuresLive(e,t);for(let e of this.structures)t.has(e)||(this.structures.delete(e),Z(()=>e.destroy()))},{injector:this.injector})}markStructuresLive(e,t){t.add(e);for(let n of e.children())this.markStructuresLive(n.structure,t)}},Woe=0,Goe=new Fi(``);function Koe(e){let t,n,r;return e.length===3?[t,n,r]=e:e.length===2?goe(e[1])?[t,n]=e:[t,r]=e:[t]=e,[t,n,r]}function qoe(...e){let[t,n,r]=Koe(e),i=r?.injector??C(Os),a=so(i,()=>f9.rootCompile(n)),o=new Uoe(i,r?.name,r?.submission),s=r?.adapter??new Hoe,c=O9.newRoot(o,t,a,s);o.createFieldManagementEffect(c.structure);let{experimentalWebMcpTool:l}=r??{};if(l){let e=so(i,()=>C(Goe,{optional:!0}));e&&so(i,()=>e(c.fieldTree,{name:l.name,description:l.description}))}return c.fieldTree}async function Joe(e,t){let n=Z(e);if(Z(n.submitState.submitting))return!1;let r=t===void 0?n.structure.root.fieldProxy:e,i={root:n.structure.root.fieldProxy,submitted:e};t=typeof t==`function`?{action:t}:t??n.structure.fieldManager.submitOptions;let a=t?.action;if(!a)throw new _i(1915,!1);n.markAsTouched();let o=t?.onInvalid,s=Yoe(n,t?.ignoreValidators);try{if(s){n.submitState.selfSubmitting.set(!0);let e=await Z(()=>a?.(r,i));return e&&Xoe(n,e),!e||q7(e)&&e.length===0}return Z(()=>o?.(r,i)),!1}finally{n.submitState.selfSubmitting.set(!1)}}function Yoe(e,t){switch(t){case`all`:return!0;case`none`:return Z(e.valid);default:return!Z(e.invalid)}}function Xoe(e,t){q7(t)||(t=[t]);let n=new Map;for(let r of t){let t=x9(r,e.fieldTree),i=t.fieldTree(),a=n.get(i);a||(a=[],n.set(i,a)),a.push(t)}for(let[e,t]of n)e.submitState.submissionErrors.set(t)}var A9=class{kind=`compat`;control;fieldTree;context;message;constructor({context:e,kind:t,control:n}){this.context=e,this.kind=t,this.control=n}};function Zoe(e){if(e.length===0)return null;let t={};for(let n of e)t[n.kind]=n instanceof A9?n.context:n;return t}function Qoe(e,t){return e===null?[]:Object.entries(e).map(([e,n])=>new A9({context:n,kind:e,control:t}))}var $oe=new Fi(``);function j9(e,t){return e instanceof Function?e(t):e}function ese(e){return typeof e==`number`?isNaN(e):e===``||e===!1||e==null}function M9(e){return e===void 0?[]:Array.isArray(e)?e:[e]}function tse(e,t){p9(e),l9.unwrapFieldPath(e).builder.addSyncErrorRule(e=>x9(t(e),e.fieldTree))}function nse(e){return new rse(e)}var N9=class{__brand=void 0;kind=``;fieldTree;message;constructor(e){e&&Object.assign(this,e)}},rse=class extends N9{kind=`required`},P9=class extends N9{kind=`parse`};function ise(e,t){let n=m9(e,_9(),e=>!t?.when||t.when(e));m9(e,y9,({state:e})=>e.metadata(n)()),tse(e,e=>{if(e.state.metadata(n)()&&ese(e.value()))return t?.error?j9(t.error,e):nse({message:j9(t?.message,e)})})}function ase(e,t,n){let r=Q({source:e,computation:()=>[],equal:b9});return{errors:r.asReadonly(),setRawValue:e=>{let i=n(e);r.set(M9(i.error)),i.value!==void 0&&t(i.value),r.set(M9(i.error))},reset:()=>{r.set([])}}}var ose=class{field;constructor(e){this.field=e}control=this;get value(){return this.field().controlValue()}get valid(){return this.field().valid()}get invalid(){return this.field().invalid()}get pending(){return this.field().pending()}get disabled(){return this.field().disabled()}get enabled(){return!this.field().disabled()}get errors(){return Zoe(this.field().errors())}get pristine(){return!this.field().dirty()}get dirty(){return this.field().dirty()}get touched(){return this.field().touched()}get untouched(){return!this.field().touched()}get status(){if(this.field().disabled())return`DISABLED`;if(this.field().valid())return`VALID`;if(this.field().invalid())return`INVALID`;if(this.field().pending())return`PENDING`;throw new _i(1910,!1)}valueAccessor=null;hasValidator(e){return e===m7.required&&this.field().required()}updateValueAndValidity(){}},F9={disabled:`disabled`,disabledReasons:`disabledReasons`,dirty:`dirty`,errors:`errors`,hidden:`hidden`,invalid:`invalid`,max:`max`,maxLength:`maxLength`,min:`min`,minLength:`minLength`,name:`name`,pattern:`pattern`,pending:`pending`,readonly:`readonly`,required:`required`,touched:`touched`},sse=(()=>{let e={};for(let t of Object.keys(F9))e[F9[t]]=t;return e})();function I9(e,t){return e[sse[t]]?.()}var L9=Object.values(F9);function R9(){return{}}function z9(e,t,n){return e[t]!==n&&(e[t]=n,!0)}function cse(e,t,n){let r;if(H9(e)&&n.isBadInput(e))return{error:new P9};switch(e.type){case`checkbox`:return{value:e.checked};case`number`:case`range`:case`datetime-local`:if(r=Z(t),typeof r==`number`||r===null)return{value:e.value===``?null:e.valueAsNumber};break;case`date`:case`month`:case`time`:case`week`:if(r=Z(t),r===null||r instanceof Date)return{value:e.valueAsDate};if(typeof r==`number`)return{value:e.valueAsNumber}}if(e.tagName===`INPUT`&&e.type===`text`&&(r??=Z(t),typeof r==`number`||r===null)){if(e.value===``)return{value:null};let t=Number(e.value);return Number.isNaN(t)?{error:new P9}:{value:t}}return{value:e.value}}function B9(e,t){switch(e.type){case`checkbox`:e.checked=t;return;case`radio`:e.checked=t===e.value;return;case`number`:case`range`:case`datetime-local`:if(typeof t==`number`){V9(e,t);return}if(t===null){e.value=``;return}break;case`date`:case`month`:case`time`:case`week`:if(t===null||t instanceof Date){e.valueAsDate=t;return}if(typeof t==`number`){V9(e,t);return}}if(e.tagName===`INPUT`&&e.type===`text`){if(typeof t==`number`){e.value=isNaN(t)?``:String(t);return}if(t===null){e.value=``;return}}e.value=t}function V9(e,t){isNaN(t)?e.value=``:e.valueAsNumber=t}function H9(e){return e.tagName===`INPUT`}function lse(e){return e.type===`date`||e.type===`datetime-local`||e.type===`month`||e.type===`time`||e.type===`week`}function use(e,t){let n=e.getUTCFullYear(),r=String(e.getUTCMonth()+1).padStart(2,`0`);return t===`month`?`${n}-${r}`:`${n}-${r}-${String(e.getUTCDate()).padStart(2,`0`)}`}function U9(e,t,n){return t instanceof Date&&(e===`min`||e===`max`)&&(n===`date`||n===`month`)?use(t,n):t}function dse(e,t){e.listenToCustomControlModel(e=>t.state().controlValue.set(e)),e.listenToCustomControlOutput(`touch`,()=>t.state().markAsTouched()),t.registerAsBinding(e.customControl);let n=R9();return()=>{let r=t.state(),i=r.controlValue();z9(n,`controlValue`,i)&&e.setCustomControlModelInput(i);for(let i of L9){let a;if(a=i===`errors`?t.errors():I9(r,i),z9(n,i,a)&&(e.setInputOnDirectives(i,a),t.elementAcceptsNativeProperty(i)&&!e.customControlHasInput(i))){let e=U9(i,a,t.nativeFormElement.type);V7(t.renderer,t.nativeFormElement,i,e)}}}}function fse(e){return typeof e==`object`&&!!e}function pse(e,t){let n=R9();t.controlValueAccessor.registerOnChange(e=>{n.controlValue=e,t.state().controlValue.set(e)}),t.controlValueAccessor.registerOnTouched(()=>t.state().markAsTouched());let r=t.injector.get(p7,null,{optional:!0,self:!0});if(r){let e;for(let t of r)fse(t)&&t.registerOnValidatorChange&&(e??=D(0),t.registerOnValidatorChange(()=>{e.update(e=>e+1)}));let n=r.map(e=>typeof e==`function`?e:e.validate.bind(e)),i=m7.compose(n),a=X(()=>(e?.(),Qoe(i?i(t.interopNgControl.control):null,t.interopNgControl.control)));t.parseErrorsSource.set(a)}return t.registerAsBinding({reset:()=>{let e=t.state().value();n.controlValue=e,Z(()=>t.controlValueAccessor.writeValue(e))}}),()=>{let r=t.state(),i=r.controlValue();z9(n,`controlValue`,i)&&Z(()=>t.controlValueAccessor.writeValue(i));for(let i of L9){let a=I9(r,i);if(z9(n,i,a)){let n=e.setInputOnDirectives(i,a,i===`name`?mse:void 0);i===`disabled`&&t.controlValueAccessor.setDisabledState?Z(()=>t.controlValueAccessor.setDisabledState(a)):!n&&t.elementAcceptsNativeProperty(i)&&V7(t.renderer,t.nativeFormElement,i,a)}}}}function mse(e){return e==null}function hse(e,t,n){if(typeof MutationObserver!=`function`)return;let r=new MutationObserver(e=>{e.some(e=>gse(e))&&t()});r.observe(e,{attributes:!0,attributeFilter:[`value`],characterData:!0,childList:!0,subtree:!0}),n.onDestroy(()=>r.disconnect())}function gse(e){if(e.type===`childList`||e.type===`characterData`){if(e.target instanceof Comment)return!1;for(let t of e.addedNodes)if(!(t instanceof Comment))return!0;for(let t of e.removedNodes)if(!(t instanceof Comment))return!0;return!1}return e.type===`attributes`&&e.target instanceof HTMLOptionElement}function _se(e,t,n,r){let i=!1,a=t.nativeFormElement,o=ase(()=>t.state().value(),e=>t.state().controlValue.set(e),e=>cse(a,t.state().value,r));n.set(o.errors),t.onReset=()=>{o.reset();let e=t.state().value();s.controlValue=e,B9(a,e)},e.listenToDom(`input`,()=>o.setRawValue(void 0)),e.listenToDom(`blur`,()=>t.state().markAsTouched()),H9(a)&&lse(a)&&r.watchValidity(t.destroyRef,a,()=>o.setRawValue(void 0)),t.registerAsBinding(),a.tagName===`SELECT`&&hse(a,()=>{i&&(a.value=t.state().controlValue())},t.destroyRef);let s=R9();return()=>{let n=t.state();for(let r of L9){let i=I9(n,r);if(z9(s,r,i)&&(e.setInputOnDirectives(r,i),t.elementAcceptsNativeProperty(r))){let e=U9(r,i,a.type);V7(t.renderer,a,r,e)}}let r=n.controlValue(),o=z9(s,`controlValue`,r),c=a.type===`radio`&&z9(s,`radioValue`,a.value);(o||c)&&B9(a,r),i=!0}}var W9=(()=>{class e{static ɵfac=function(t){return new(t||e)};static ɵprov=Oi({token:e,factory:e=>vse.ɵfac(e),providedIn:`root`})}return e})(),vse=(()=>{class e extends W9{document=C(ks);cspNonce=C(cc,{optional:!0});injectedStyles=new WeakMap;watchValidity(e,t,n){let r=t.getRootNode();this.injectedStyles.has(r)||this.injectedStyles.set(r,this.createTransitionStyle(r));let i=e=>{let t=e;(t.animationName===`ng-valid`||t.animationName===`ng-invalid`)&&n()};t.addEventListener(`animationstart`,i),e.onDestroy(()=>{t.removeEventListener(`animationstart`,i)})}isBadInput(e){return e.validity?.badInput??!1}createTransitionStyle(e){let t=this.document.createElement(`style`);return this.cspNonce&&(t.nonce=this.cspNonce),t.textContent=` +`}var B5=new Map;function V5(e,t=`dark`,n=50){let r=e?.querySelector(`devframes-dock-standalone`)?.shadowRoot;if(r){if(e){let t=B5.get(e);t!==void 0&&(clearTimeout(t),B5.delete(e))}let n=r.querySelector(`style[data-pangular]`);n||(n=e.createElement(`style`),n.dataset.pangular=``,r.append(n)),n.textContent=sae(t);return}if(n>0&&e){let r=B5.get(e);r!==void 0&&clearTimeout(r);let i=setTimeout(()=>{B5.delete(e),V5(e,t,n-1)},100);B5.set(e,i)}}var H5=`pangular-pref`,U5={order:[],hidden:[],pinned:[]};function W5(e){try{return localStorage.getItem(`${H5}:${e}`)}catch{return null}}function G5(e,t){try{t===null?localStorage.removeItem(`${H5}:${e}`):localStorage.setItem(`${H5}:${e}`,t)}catch{}}function cae(){let e=W5(`theme`);return e===`light`||e===`dark`?e:`system`}function lae(e){G5(`theme`,e===`system`?null:e)}function K5(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`&&e.length>0&&e.length<=40);return[...new Set(t)].slice(0,50)}function uae(){let e=W5(`tabs`);if(!e)return U5;try{let t=JSON.parse(e);if(!t||typeof t!=`object`||Array.isArray(t))return U5;let n=t;return{order:K5(n.order),hidden:K5(n.hidden),pinned:K5(n.pinned)}}catch{return U5}}function dae(e){G5(`tabs`,!e.order.length&&!e.hidden.length&&!e.pinned.length?null:JSON.stringify(e))}function fae(){return W5(`passive`)===`true`}function pae(e){G5(`passive`,e?`true`:null)}function q5(e,t){let n=n=>{let r=t.order.indexOf(n);return r<0?t.order.length+e.indexOf(n):r},r=[...e].sort((e,t)=>n(e)-n(t));return[...r.filter(e=>t.pinned.includes(e)),...r.filter(e=>!t.pinned.includes(e))]}function mae(e,t,n){let r=new Map(e.map(e=>[e.id,e]));return q5(e.map(e=>e.id),t).filter(e=>e===n||t.pinned.includes(e)||!t.hidden.includes(e)).map(e=>r.get(e))}function J5(e,t,n,r){let i=q5(e,t),a=i.indexOf(n),o=a+r;if(a<0||o<0||o>=i.length)return t;let s=t.pinned.includes(n);if(t.pinned.includes(i[o])!==s)return t;let c=[...i];return[c[a],c[o]]=[c[o],c[a]],{...t,order:c}}function hae(e,t,n){let r=e.hidden.filter(e=>e!==t);return{...e,hidden:n?[...r,t]:r,pinned:n?e.pinned.filter(e=>e!==t):e.pinned}}function gae(e,t,n,r){let i=t.pinned.filter(e=>e!==n);return{order:q5(e,t),pinned:r?[...i,n]:i,hidden:r?t.hidden.filter(e=>e!==n):t.hidden}}function Y5(){try{let e=navigator;return/mac|iphone|ipad|ipod/i.test(e.userAgentData?.platform??e.platform??``)}catch{return!1}}function _ae(e=window){try{for(let t=e;t!==t.parent;t=t.parent){let e=t.frameElement?.getRootNode();if(e&&`host`in e&&e.host?.id===`pangular-popup-root`)return!0}}catch{}return!1}var vae=`pangular-inspector-`;function X5(e=window){try{let t=e.top??e;return t.name.startsWith(vae)&&t.opener&&t.opener!==t?t.opener:null}catch{return null}}function yae(e=window){let t=X5(e);if(!t)return!1;let n;try{n=t.location.origin}catch{try{n=new URL(e.document.referrer).origin}catch{n=void 0}}if(!n||n===`null`)return!1;try{return t.postMessage({type:`pangular:popup-return`},n),!0}catch{return!1}}var bae=class e{current=D(`dark`);preference=D(cae());source=`dark`;sourceAttr=!1;constructor(){let e=C(As),t=Sae(),n=document.documentElement.dataset.theme,r=n===`light`||n===`dark`;if(n===`light`||n===`dark`)this.fromSource(n,!0);else if(t)r=!0,this.fromSource(Z5(t),!0);else{let t=xae();if(t){this.fromSource(t.matches?`light`:`dark`,!1);let n=e=>{r||this.fromSource(e.matches?`light`:`dark`,!1)};t.addEventListener(`change`,n),e.onDestroy(()=>t.removeEventListener(`change`,n))}else this.resolve()}let i;try{i=new BroadcastChannel(`pangular:theme`)}catch{}_c(()=>{let e=this.current();try{i?.postMessage(e)}catch{}for(let{win:t,origin:n}of Q5())try{t.postMessage({type:`pangular:theme-change`,theme:e},n)}catch{}});let a=e=>{if(e.source!==window.parent)return;let t=e.data;t?.type===`pangular:theme-change`&&(r=!0,this.fromSource(t.theme===`dark`?`dark`:`light`,!0))};window.addEventListener(`message`,a);let o;t&&(o=new MutationObserver(()=>this.fromSource(Z5(t),!0)),o.observe(t,{attributes:!0,attributeFilter:[`class`]})),e.onDestroy(()=>{window.removeEventListener(`message`,a),o?.disconnect(),i?.close()})}setPreference(e){this.preference.set(e),lae(e),this.resolve()}fromSource(e,t){this.source=e,this.sourceAttr=t,this.resolve()}resolve(){let e=this.preference(),t=e===`system`?this.source:e;this.current.set(t);let n=document.documentElement;e!==`system`||this.sourceAttr?n.dataset.theme=t:delete n.dataset.theme}static ɵfac=function(t){return new(t||e)};static ɵprov=Rl({token:e,factory:e.ɵfac})};function xae(){try{return window.matchMedia?.(`(prefers-color-scheme: light)`)??null}catch{return null}}function Z5(e){return e.classList.contains(`dark`)?`dark`:`light`}function Sae(){try{return window.frameElement?.closest(`.devframes-color-root`)??null}catch{return null}}function Q5(e=window){let t=[],n;try{n=e.location.ancestorOrigins}catch{}let r=e;try{for(let i=0;r!==r.parent;i++){r=r.parent;let a=Cae(e,r,i,n);a&&t.push({win:r,origin:a})}}catch{}return t}function Cae(e,t,n,r){let i=e=>e&&e!==`null`?e:void 0,a=i(r?.item(n));if(a)return a;try{let e=i(t.location.origin);if(e)return e}catch{}if(!(n>0))try{return i(new URL(e.document.referrer).origin)}catch{return}}var wae=`__DEVFRAME_HUB_CLIENT_CONTEXT__`;function $5(){try{return window.parent===window?void 0:window.parent[wae]}catch{return}}function e7(e,t,n=50){let r=$5();if(!r){if(n<=0||window.parent===window)return()=>{};let r=()=>{},i=setTimeout(()=>r=e7(e,t,n-1),100);return()=>{clearTimeout(i),r()}}let i=e.map(e=>r.docks.getStateById(Kw(e))?.events.on(`entry:activated`,()=>t(e))??(()=>{})),a=r.docks.selectedId,o=e.find(e=>Kw(e)===a);return o&&t(o),()=>i.forEach(e=>e())}function t7(){return!!$5()}async function n7(e){let t=$5();if(!t)return!1;try{return await t.docks.switchEntry(Kw(e))}catch{return!1}}function Tae(){let e=$5()?.commands?.openPalette;if(typeof e!=`function`)return!1;try{return e(),!0}catch{return!1}}function Eae(e,t){let n=new URL(e);return n.searchParams.delete(`view`),n.hash=t?`tab=${t}`:``,n.pathname+n.search+n.hash}function Dae(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}var r7=`pangular-tab`;function i7(e,t,n){let r=new URLSearchParams(e.replace(/^#/,``)).get(`tab`)||t;return n.find(e=>e===r)}function a7(e){try{return sessionStorage.getItem(`${r7}:${e}`)}catch{return null}}function Oae(e,t){try{sessionStorage.setItem(`${r7}:${e}`,t)}catch{}}function kae(e,t){try{return new URL(e,t.href).origin===t.origin}catch{return!1}}function Aae(e,t){if(t.protocol!==`chrome-extension:`)return!1;try{let{protocol:t}=new URL(e);return t===`http:`||t===`https:`}catch{return!1}}function jae(e=location){let t=new URLSearchParams(e.search).get(`baseURL`);if(t&&(kae(t,e)||Aae(t,e)))return t;if(!(e.pathname.includes(`__pangular`)||e.pathname.includes(`__devframes/`)))return[`/__pangular/`,`./`]}var o7=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`,Mae=`pangular-auth-token:`,Nae=`devframe-auth`,Pae={token:void 0,remember:()=>{}};function Fae(e,t=location){if(typeof e!=`string`)return null;try{let n=new URL(e,t.href).origin;return n===t.origin||n===`null`?null:n}catch{return null}}function Iae(e,t=location,n=Rae(),r=globalThis){let i=Fae(e,t);if(!i||(Lae(r),!n))return Pae;let a=Mae+i;try{n.removeItem(o7)}catch{}delete globalThis[o7];let o;try{o=n.getItem(a)||void 0}catch{o=void 0}return{get token(){return o},remember(e){try{if(n.removeItem(o7),!e||e===o)return;o=e,n.setItem(a,e)}catch{}}}}var s7=new WeakSet;function Lae(e=globalThis){let t=e.BroadcastChannel;if(typeof t==`function`&&!s7.has(t)){let n=class extends t{constructor(e){if(String(e)===Nae)throw Error(`The devframe-auth channel is off in a panel on another origin.`);super(e)}};s7.add(n),e.BroadcastChannel=n}let n=e.Storage?.prototype;if(n&&!s7.has(n)){s7.add(n);let{getItem:e,setItem:t}=n;n.getItem=function(t){return String(t)===o7?null:e.call(this,t)},n.setItem=function(e,n){String(e)!==o7&&t.call(this,e,n)}}}function Rae(){try{return typeof localStorage>`u`?null:localStorage}catch{return null}}var c7=(()=>{class e{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,t){this._renderer=e,this._elementRef=t}setProperty(e,t){this._renderer.setProperty(this._elementRef.nativeElement,e,t)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty(`disabled`,e)}static ɵfac=function(t){return new(t||e)(am(wp),am(Vl))};static ɵdir=Oh({type:e})}return e})(),zae=(()=>{class e extends c7{static ɵfac=(()=>{let t;return function(n){return(t||=Pl(e))(n||e)}})();static ɵdir=Oh({type:e,features:[Rh]})}return e})(),l7=new Fi(``),Bae={provide:l7,useExisting:Ti(()=>u7),multi:!0};function Vae(){let e=Iv()?Iv().getUserAgent():``;return/android (\d+)/.test(e.toLowerCase())}var Hae=new Fi(``),u7=(()=>{class e extends c7{_compositionMode;_composing=!1;constructor(e,t,n){super(e,t),this._compositionMode=n,this._compositionMode??=!Vae()}writeValue(e){let t=e??``;this.setProperty(`value`,t)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static ɵfac=function(t){return new(t||e)(am(wp),am(Vl),am(Hae,8))};static ɵdir=Oh({type:e,selectors:[[`input`,`formControlName`,``,3,`type`,`checkbox`,3,`ngNoCva`,``],[`textarea`,`formControlName`,``,3,`ngNoCva`,``],[`input`,`formControl`,``,3,`type`,`checkbox`,3,`ngNoCva`,``],[`textarea`,`formControl`,``,3,`ngNoCva`,``],[`input`,`ngModel`,``,3,`type`,`checkbox`,3,`ngNoCva`,``],[`textarea`,`ngModel`,``,3,`ngNoCva`,``],[``,`ngDefaultControl`,``]],hostBindings:function(e,t){e&1&&H(`input`,function(e){return t._handleInput(e.target.value)})(`blur`,function(){return t.onTouched()})(`compositionstart`,function(){return t._compositionStart()})(`compositionend`,function(e){return t._compositionEnd(e.target.value)})},standalone:!1,features:[nv([Bae]),Rh]})}return e})();function d7(e){return e==null||f7(e)===0}function f7(e){return e==null?null:Array.isArray(e)||typeof e==`string`?e.length:e instanceof Set?e.size:null}var p7=new Fi(``),Uae=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,m7=class{static min(e){return Wae(e)}static max(e){return Gae(e)}static required(e){return h7(e)}static requiredTrue(e){return Kae(e)}static email(e){return qae(e)}static minLength(e){return Jae(e)}static maxLength(e){return Yae(e)}static pattern(e){return Xae(e)}static nullValidator(e){return g7()}static compose(e){return S7(e)}static composeAsync(e){return w7(e)}};function Wae(e){return t=>{if(t.value==null||e==null)return null;let n=parseFloat(t.value);return!isNaN(n)&&n{if(t.value==null||e==null)return null;let n=parseFloat(t.value);return!isNaN(n)&&n>e?{max:{max:e,actual:t.value}}:null}}function h7(e){return d7(e.value)?{required:!0}:null}function Kae(e){return e.value===!0?null:{required:!0}}function qae(e){return d7(e.value)||Uae.test(e.value)?null:{email:!0}}function Jae(e){return t=>{let n=t.value?.length??f7(t.value);return n===null||n===0?null:n{let n=t.value?.length??f7(t.value);return n!==null&&n>e?{maxlength:{requiredLength:e,actualLength:n}}:null}}function Xae(e){if(!e)return g7;let t,n;return typeof e==`string`?(n=``,e.charAt(0)!==`^`&&(n+=`^`),n+=e,e.charAt(e.length-1)!==`$`&&(n+=`$`),t=new RegExp(n)):(n=e.toString(),t=e),e=>{if(d7(e.value))return null;let r=e.value;return t.test(r)?null:{pattern:{requiredPattern:n,actualValue:r}}}}function g7(e){return null}function _7(e){return e!=null}function v7(e){return yh(e)?See(e):e}function y7(e){let t={};return e.forEach(e=>{t=e==null?t:{...t,...e}}),Object.keys(t).length===0?null:t}function b7(e,t){return t.map(t=>t(e))}function Zae(e){return!e.validate}function x7(e){return e.map(e=>Zae(e)?e:t=>e.validate(t))}function S7(e){if(!e)return null;let t=e.filter(_7);return t.length==0?null:function(e){return y7(b7(e,t))}}function C7(e){return e==null?null:S7(x7(e))}function w7(e){if(!e)return null;let t=e.filter(_7);return t.length==0?null:function(e){return Nee(b7(e,t).map(v7)).pipe(hi(y7))}}function T7(e){return e==null?null:w7(x7(e))}function E7(e){return e?Array.isArray(e)?e:[e]:[]}function D7(e,t){return Array.isArray(e)?e.includes(t):e===t}function O7(e,t){let n=E7(t);return E7(e).forEach(e=>{D7(n,e)||n.push(e)}),n}function k7(e,t){return E7(t).filter(t=>!D7(e,t))}var Qae=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=C7(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=T7(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control?.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},A7=`VALID`,j7=`INVALID`,M7=`PENDING`,N7=`DISABLED`,P7=class{},F7=class extends P7{value;source;constructor(e,t){super(),this.value=e,this.source=t}},I7=class extends P7{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},L7=class extends P7{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},R7=class extends P7{status;source;constructor(e,t){super(),this.status=e,this.source=t}},z7=class extends P7{source;constructor(e){super(),this.source=e}};function B7(e){return Array.isArray(e)?C7(e):e||null}function $ae(e){return Array.isArray(e)?T7(e):e||null}function eoe(e){return e!=null&&!Array.isArray(e)&&typeof e==`object`}var toe=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_hasRequired=D(!1);_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e,this._updateHasRequiredValidator()}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return Z(this.statusReactive)}set status(e){Z(()=>this.statusReactive.set(e))}_status=X(()=>this.statusReactive());statusReactive=D(void 0);get valid(){return this.status===A7}get invalid(){return this.status===j7}get pending(){return this.status===M7}get disabled(){return this.status===N7}get enabled(){return this.status!==N7}errors;get pristine(){return Z(this.pristineReactive)}set pristine(e){Z(()=>this.pristineReactive.set(e))}_pristine=X(()=>this.pristineReactive());pristineReactive=D(!0);get dirty(){return!this.pristine}get touched(){return Z(this.touchedReactive)}set touched(e){Z(()=>this.touchedReactive.set(e))}_touched=X(()=>this.touchedReactive());touchedReactive=D(!1);get untouched(){return!this.touched}_events=new Jr;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:`change`}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(O7(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(O7(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(k7(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(k7(e,this._rawAsyncValidators))}hasValidator(e){return D7(this._rawValidators,e)}hasAsyncValidator(e){return D7(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsTouched({...e,sourceControl:n}),t&&e.emitEvent!==!1&&this._events.next(new L7(!0,n))}markAllAsDirty(e={}){this.markAsDirty({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(e))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=e.sourceControl??this;this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),e.onlySelf||this._parent?._updateTouched(e,n),t&&e.emitEvent!==!1&&this._events.next(new L7(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty({...e,sourceControl:n}),t&&e.emitEvent!==!1&&this._events.next(new I7(!1,n))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=e.sourceControl??this;this._forEachChild(t=>{t.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),e.onlySelf||this._parent?._updatePristine(e,n),t&&e.emitEvent!==!1&&this._events.next(new I7(!0,n))}markAsPending(e={}){this.status=M7;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new R7(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending({...e,sourceControl:t})}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=N7,this.errors=null,this._forEachChild(t=>{t.disable({...e,onlySelf:!0})}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new F7(this.value,n)),this._events.next(new R7(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...e,skipPristineCheck:t},this),this._onDisabledChange.forEach(e=>e(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=A7,this._forEachChild(t=>{t.enable({...e,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors({...e,skipPristineCheck:t},this),this._onDisabledChange.forEach(e=>e(!1))}_updateAncestors(e,t){e.onlySelf||(this._parent?.updateValueAndValidity(e),e.skipPristineCheck||this._parent?._updatePristine({},t),this._parent?._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let t=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===A7||this.status===M7)&&this._runAsyncValidator(t,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new F7(this.value,t)),this._events.next(new R7(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity({...e,sourceControl:t})}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?N7:A7}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=M7,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let n=v7(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(n=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(n,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(e){let t=e;return t==null||(Array.isArray(t)||(t=t.split(`.`)),t.length===0)?null:t.reduce((e,t)=>e&&e._find(t),this)}getError(e,t){let n=t?this.get(t):this;return n?.errors?n.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,t,n){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||n)&&this._events.next(new R7(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new Fs,this.statusChanges=new Fs}_calculateStatus(){return this._allControlsDisabled()?N7:this.errors?j7:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(M7)?M7:this._anyControlsHaveStatus(j7)?j7:A7}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,t){let n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,e.onlySelf||this._parent?._updatePristine(e,t),r&&this._events.next(new I7(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new L7(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){eoe(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=B7(this._rawValidators),this._updateHasRequiredValidator()}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=$ae(this._rawAsyncValidators)}_updateHasRequiredValidator(){Z(()=>this._hasRequired.set(this.hasValidator(m7.required)))}};function V7(e){return e.tagName===`INPUT`||e.tagName===`SELECT`||e.tagName===`TEXTAREA`}function noe(e){if(e.tagName!==`INPUT`)return!1;let t=e.type;return t===`number`||t===`range`||t===`date`||t===`month`}function roe(e){return e.tagName===`INPUT`||e.tagName===`TEXTAREA`}function H7(e,t,n,r){switch(n){case`name`:e.setAttribute(t,n,r);break;case`disabled`:case`readonly`:case`required`:r?e.setAttribute(t,n,``):e.removeAttribute(t,n);break;case`max`:case`min`:case`minLength`:case`maxLength`:r===void 0?e.removeAttribute(t,n):e.setAttribute(t,n,r.toString())}}var ioe=class{kind;context;control;message;constructor({kind:e,context:t,control:n}){this.kind=e,this.context=t,this.control=n}},aoe=(()=>{class e{_validator=g7;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let t=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(t),this._validator=this._enabled?this.createValidator(t):g7,this._onChange?.()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static ɵfac=function(t){return new(t||e)};static ɵdir=Oh({type:e,features:[Nc]})}return e})(),ooe={provide:p7,useExisting:Ti(()=>U7),multi:!0},U7=(()=>{class e extends aoe{required;inputName=`required`;normalizeInput=jv;createValidator=e=>h7;enabled(e){return e}static ɵfac=(()=>{let t;return function(n){return(t||=Pl(e))(n||e)}})();static ɵdir=Oh({type:e,selectors:[[``,`required`,``,`formControlName`,``,3,`type`,`checkbox`],[``,`required`,``,`formControl`,``,3,`type`,`checkbox`],[``,`required`,``,`ngModel`,``,3,`type`,`checkbox`]],hostVars:1,hostBindings:function(e,t){e&2&&A(`required`,t._enabled?``:null)},inputs:{required:`required`},standalone:!1,features:[nv([ooe]),Rh]})}return e})(),soe=new Fi(``);function coe(e){return Object.getPrototypeOf(e.constructor)===zae}function W7(e,t){if(!t)return null;let n,r,i;return t.forEach(e=>{e.constructor===u7?n=e:coe(e)?r=e:i=e}),i||r||n||null}var loe=class extends Qae{_parent=null;name=null;valueAccessor=null;isCustomControlBased=!1;userOnReset;resetSubscription;set onReset(e){this.userOnReset=e,this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.control&&(this.resetSubscription=this.control.events.subscribe(e=>{e instanceof z7&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription?.add(this.resetSubscription))}isNativeFormElement=!1;rawValueAccessors;_selectedValueAccessor=null;get selectedValueAccessor(){return this._selectedValueAccessor??=W7(this,this.rawValueAccessors)}parseErrorsValidator=null;renderer;injector;requiredValidatorViaDi;subscription;customControlBindings=null;constructor(e,t,n){super(),this.injector=e,this.renderer=t,this.rawValueAccessors=n,this.injector?.get(As)?.onDestroy(()=>{this.removeParseErrorsValidator(this.control),this.subscription?.unsubscribe()})}setupCustomControl(){this.subscription?.unsubscribe();let e=this.injector?.get(rne);if(!this.control||!e)return;let t=e.markForCheck.bind(e);this.subscription=new fr,this.subscription.add(this.control.valueChanges.subscribe(t)),this.subscription.add(this.control.statusChanges.subscribe(t)),this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.userOnReset&&(this.resetSubscription=this.control.events.subscribe(e=>{e instanceof z7&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription.add(this.resetSubscription)),this.parseErrorsValidator&&this.control.addValidators(this.parseErrorsValidator)}ngControlCreate(e){!e.nativeElement.hasAttribute?.(`ngNoCva`)&&(this.rawValueAccessors&&this.rawValueAccessors.length>0||this.valueAccessor!==null)||!e.customControl||(this.isCustomControlBased=!0,e.listenToCustomControlModel(e=>{this.control?.markAsDirty(),this.control?.setValue(e,{emitModelToViewChange:!1}),this.viewToModelUpdate(e)}),e.listenToCustomControlOutput(`touch`,()=>{this.control?.markAsTouched()}),this.customControlBindings={},this.isNativeFormElement=V7(e.nativeElement),this.requiredValidatorViaDi=this._rawValidators.find(e=>e instanceof U7))}ngControlUpdate(e,t){if(!this.isCustomControlBased)return;let n=this.control,r=this.customControlBindings;Object.is(r.value,n.value)||(r.value=n.value,e.setCustomControlModelInput(n.value)),this.bindControlProperty(e,r,`touched`,n.touched),this.bindControlProperty(e,r,`dirty`,n.dirty),this.bindControlProperty(e,r,`valid`,n.valid),this.bindControlProperty(e,r,`invalid`,n.invalid),this.bindControlProperty(e,r,`pending`,n.pending),this.bindControlProperty(e,r,`disabled`,n.disabled),this.shouldBindRequired&&this.bindControlProperty(e,r,`required`,this.isRequired);let i=n.errors;if(r.errors!==i){r.errors=i;let t=this._convertErrors(i);e.setInputOnDirectives(`errors`,t)}}get isRequired(){return(this.requiredValidatorViaDi?._enabled||this.control?._hasRequired())??!1}get shouldBindRequired(){return!0}bindControlProperty(e,t,n,r){if(t[n]===r)return;t[n]=r;let i=e.setInputOnDirectives(n,r);this.isNativeFormElement&&!i&&(n===`disabled`||n===`required`)&&this.renderer&&H7(this.renderer,e.nativeElement,n,r)}_convertErrors(e){if(e===null)return[];let t=this.control;return Object.entries(e).map(([e,n])=>new ioe({context:n,kind:e,control:t}))}setParseErrorSource(e){if(e===void 0)return;let t=null,n=X(()=>{let t=e();return t.length===0?null:t.reduce((e,t)=>(e[t.kind]=t,e),{})});this.parseErrorsValidator=(()=>t).bind(this),_c(()=>{t=n(),this.control?.updateValueAndValidity({emitEvent:!1})},{injector:this.injector})}removeParseErrorsValidator(e){this.parseErrorsValidator&&(e?.removeValidators(this.parseErrorsValidator),e?.updateValueAndValidity({emitEvent:!1}))}},uoe=Symbol(`FIELD_TREE`),G7=0;function doe(){return G7}function K7(e,t){return(...n)=>{try{return G7=t,e(...n)}finally{G7=0}}}function foe(e){return!e}function q7(e){return e}function J7(e){return Array.isArray(e)}function Y7(e){return(typeof e==`object`||typeof e==`function`)&&e!=null}var X7=Symbol(),Z7=Symbol(),Q7=class{predicates;fns=[];constructor(e){this.predicates=e}push(e){this.fns.push(t9(this.predicates,e))}mergeIn(e){let t=this.predicates?e.fns.map(e=>t9(this.predicates,e)):e.fns;this.fns.push(...t)}hasRules(){return this.fns.length>0}},$7=class extends Q7{get defaultValue(){return!1}compute(e){return this.fns.some(t=>{let n=t(e);return n&&n!==Z7})}},e9=class e extends Q7{ignore;static ignoreNull(t){return new e(t,e=>e===null)}constructor(e,t){super(e),this.ignore=t}get defaultValue(){return[]}compute(e){return this.fns.reduce((t,n)=>{let r=n(e);return r===void 0||r===Z7?t:J7(r)?[...t,...this.ignore?r.filter(e=>!this.ignore(e)):r]:this.ignore&&this.ignore(r)?t:[...t,r]},[])}},poe=class extends e9{constructor(e){super(e,void 0)}},moe=class extends Q7{key;get defaultValue(){return this.key.reducer.getInitial()}constructor(e,t){super(e),this.key=t}compute(e){if(this.fns.length===0)return this.key.reducer.getInitial();let t=this.key.reducer.getInitial();for(let n=0;n{for(let t of e){let e=n.stateOf(t.path),r=Z(e.structure.pathKeys).length-t.depth;for(let t=0;t0}hasMetadata(e){return this.metadata.has(e)}hasMetadataKeys(){return this.metadata.size>0}getMetadataKeys(){return this.metadata.keys()}getMetadata(e){return this.metadata.has(e)||this.metadata.set(e,new moe(this.predicates,e)),this.metadata.get(e)}mergeIn(e){this.hidden.mergeIn(e.hidden),this.disabledReasons.mergeIn(e.disabledReasons),this.readonly.mergeIn(e.readonly),this.syncErrors.mergeIn(e.syncErrors),this.syncTreeErrors.mergeIn(e.syncTreeErrors),this.asyncErrors.mergeIn(e.asyncErrors);for(let t of e.getMetadataKeys()){let n=e.metadata.get(t);this.getMetadata(t).mergeIn(n)}}},r9=class{depth;constructor(e){this.depth=e}build(){return new o9(this,[],0)}},i9=class e extends r9{constructor(e){super(e)}current;all=[];addHiddenRule(e){this.getCurrent().addHiddenRule(e)}addDisabledReasonRule(e){this.getCurrent().addDisabledReasonRule(e)}addReadonlyRule(e){this.getCurrent().addReadonlyRule(e)}addSyncErrorRule(e){this.getCurrent().addSyncErrorRule(e)}addSyncTreeErrorRule(e){this.getCurrent().addSyncTreeErrorRule(e)}addAsyncErrorRule(e){this.getCurrent().addAsyncErrorRule(e)}addMetadataRule(e,t){this.getCurrent().addMetadataRule(e,t)}getChild(e){if(e===X7){let e=this.getCurrent().children;e.size>+!!e.has(X7)&&(this.current=void 0)}return this.getCurrent().getChild(e)}hasLogic(e){return this===e||this.all.some(({builder:t})=>t.hasLogic(e))}hasRules(){return this.all.length>0}anyChildHasLogic(){return this.all.some(({builder:e})=>e.anyChildHasLogic())}mergeIn(e,t){t?this.all.push({builder:e,predicate:{fn:K7(t.fn,this.depth),path:t.path}}):this.all.push({builder:e}),this.current=void 0}getCurrent(){return this.current===void 0&&(this.current=new a9(this.depth),this.all.push({builder:this.current})),this.current}static newRoot(){return new e(0)}},a9=class extends r9{logic=new n9([]);children=new Map;constructor(e){super(e)}addHiddenRule(e){this.logic.hidden.push(K7(e,this.depth))}addDisabledReasonRule(e){this.logic.disabledReasons.push(K7(e,this.depth))}addReadonlyRule(e){this.logic.readonly.push(K7(e,this.depth))}addSyncErrorRule(e){this.logic.syncErrors.push(K7(e,this.depth))}addSyncTreeErrorRule(e){this.logic.syncTreeErrors.push(K7(e,this.depth))}addAsyncErrorRule(e){this.logic.asyncErrors.push(K7(e,this.depth))}addMetadataRule(e,t){this.logic.getMetadata(e).push(K7(t,this.depth))}getChild(e){return this.children.has(e)||this.children.set(e,new i9(this.depth+1)),this.children.get(e)}hasLogic(e){return this===e}hasRules(){return this.logic.hasAnyLogic()||this.children.size>0}anyChildHasLogic(){for(let e of this.children.values())if(e.hasRules())return!0;return!1}},o9=class e{builder;predicates;depth;logic;constructor(e,t,n){this.builder=e,this.predicates=t,this.depth=n,this.logic=e?goe(e,t,n):new n9([])}getChild(t){let n=this.builder?s9(this.builder,t):[];if(n.length===0)return new e(void 0,[],this.depth+1);if(n.length===1){let{builder:t,predicates:r}=n[0];return new e(t,[...this.predicates,...r.map(e=>c9(e,this.depth))],this.depth+1)}return new hoe(n.map(({builder:t,predicates:n})=>new e(t,[...this.predicates,...n.map(e=>c9(e,this.depth))],this.depth+1)))}hasLogic(e){return this.builder?this.builder.hasLogic(e):!1}hasRules(){return this.builder?this.builder.hasRules():!1}anyChildHasLogic(){return this.builder?this.builder.anyChildHasLogic():!1}},hoe=class e{all;logic;constructor(e){this.all=e,this.logic=new n9([]);for(let t of e)this.logic.mergeIn(t.logic)}getChild(t){return new e(this.all.flatMap(e=>e.getChild(t)))}hasLogic(e){return this.all.some(t=>t.hasLogic(e))}hasRules(){return this.all.some(e=>e.hasRules())}anyChildHasLogic(){return this.all.some(e=>e.anyChildHasLogic())}};function s9(e,t){if(e instanceof i9)return e.all.flatMap(({builder:e,predicate:n})=>{let r=s9(e,t);return n?r.map(({builder:e,predicates:t})=>({builder:e,predicates:[...t,n]})):r});if(e instanceof a9)return[...t!==X7&&e.children.has(X7)?[{builder:e.getChild(X7),predicates:[]}]:[],...e.children.has(t)?[{builder:e.getChild(t),predicates:[]}]:[]];throw new _i(1909,!1)}function goe(e,t,n){let r=new n9(t);if(e instanceof i9){let i=e.all.map(({builder:e,predicate:r})=>new o9(e,r?[...t,c9(r,n)]:t,n));for(let e of i)r.mergeIn(e.logic)}else if(e instanceof a9)r.mergeIn(e.logic);else throw new _i(1909,!1);return r}function c9(e,t){return{...e,depth:t}}var l9=Symbol(`PATH`),u9=class e{keys;parent;keyInParent;root;children=new Map;fieldPathProxy=new Proxy(this,_oe);logicBuilder;constructor(e,t,n,r){this.keys=e,this.parent=n,this.keyInParent=r,this.root=t??this,n||(this.logicBuilder=i9.newRoot())}get builder(){return this.logicBuilder?this.logicBuilder:this.parent.builder.getChild(this.keyInParent)}getChild(t){return this.children.has(t)||this.children.set(t,new e([...this.keys,t],this.root,this,t)),this.children.get(t)}mergeIn(e,t){let n=e.compile();this.builder.mergeIn(n.builder,t)}static unwrapFieldPath(e){return e[l9]}static newRoot(){return new e([],void 0,void 0,void 0)}},_oe={get(e,t){return t===l9?e:e.getChild(t).fieldPathProxy}},d9=void 0,f9=new Map,p9=class e{schemaFn;constructor(e){this.schemaFn=e}compile(){if(f9.has(this))return f9.get(this);let e=u9.newRoot();f9.set(this,e);let t=d9;try{d9=e,this.schemaFn(e.fieldPathProxy)}finally{d9=t}return e}static create(t){return t instanceof e?t:new e(t)}static rootCompile(t){try{return f9.clear(),t===void 0?u9.newRoot():t instanceof e?t.compile():new e(t).compile()}finally{f9.clear()}}};function voe(e){return e instanceof p9||typeof e==`function`}function m9(e){if(d9!==u9.unwrapFieldPath(e).root)throw new _i(1908,!1)}function h9(e,t,n){return m9(e),u9.unwrapFieldPath(e).builder.addMetadataRule(t,n),t}var g9={list(){return{reduce:(e,t)=>t===void 0?e:[...e,t],getInitial:()=>[]}},min(){return{reduce:(e,t)=>e===void 0||t===void 0?e??t:tvoid 0}},max(){return{reduce:(e,t)=>e===void 0||t===void 0?e??t:t>e?t:e,getInitial:()=>void 0}},or(){return{reduce:(e,t)=>e||t,getInitial:()=>!1}},and(){return{reduce:(e,t)=>e&&t,getInitial:()=>!0}},override:yoe};function yoe(e){return{reduce:(e,t)=>t,getInitial:()=>e?.()}}var _9=Symbol(`IS_ASYNC_VALIDATION_RESOURCE`),boe=class{reducer;create;brand;[_9];constructor(e,t){this.reducer=e,this.create=t}};function v9(e){return new boe(e??g9.override())}function y9(){return v9()}var b9=v9(g9.or()),xoe=y9(),Soe=y9(),Coe=v9(g9.max()),woe=v9(g9.min()),Toe=v9(g9.list());function x9(e,t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n0?`invalid`:e.pending()?`unknown`:`valid`}var Doe=class{node;constructor(e){this.node=e}rawSyncTreeErrors=X(()=>this.shouldSkipValidation()?[]:[...this.node.logicNode.logic.syncTreeErrors.compute(this.node.context),...this.node.structure.parent?.validationState.rawSyncTreeErrors()??[]],{equal:x9});syncErrors=X(()=>this.shouldSkipValidation()?[]:[...this.node.logicNode.logic.syncErrors.compute(this.node.context),...this.syncTreeErrors(),...Ooe(this.node.submitState.submissionErrors())],{equal:x9});syncValid=X(()=>this.shouldSkipValidation()?!0:this.node.structure.reduceChildren(this.syncErrors().length===0,(e,t)=>t&&e.validationState.syncValid(),foe));syncTreeErrors=X(()=>this.rawSyncTreeErrors().filter(e=>e.fieldTree===this.node.fieldTree),{equal:x9});rawAsyncErrors=X(()=>this.shouldSkipValidation()?[]:[...this.node.logicNode.logic.asyncErrors.compute(this.node.context),...this.node.structure.parent?.validationState.rawAsyncErrors()??[]],{equal:x9});asyncErrors=X(()=>this.shouldSkipValidation()?[]:this.rawAsyncErrors().filter(e=>e===`pending`||e.fieldTree===this.node.fieldTree),{equal:x9});parseErrors=X(()=>this.node.formFieldBindings().flatMap(e=>e.parseErrors()),{equal:x9});errors=X(()=>[...this.parseErrors(),...this.syncErrors(),...this.asyncErrors().filter(e=>e!==`pending`)],{equal:x9});errorSummary=X(()=>{let e=this.node.structure.reduceChildren(this.errors(),(e,t)=>[...t,...e.errorSummary()]);return Z(()=>e.sort(koe)),e},{equal:x9});pending=X(()=>this.node.structure.reduceChildren(this.asyncErrors().includes(`pending`),(e,t)=>t||e.validationState.pending()));status=X(()=>{if(this.shouldSkipValidation())return`valid`;let e=Eoe(this);return this.node.structure.reduceChildren(e,(e,t)=>t===`invalid`||e.validationState.status()===`invalid`?`invalid`:t===`unknown`||e.validationState.status()===`unknown`?`unknown`:`valid`,e=>e===`invalid`)});valid=X(()=>this.status()===`valid`);invalid=X(()=>this.status()===`invalid`);shouldSkipValidation=X(()=>this.node.hidden()||this.node.disabled()||this.node.readonly()||this.node.structure.isOrphaned())};function Ooe(e){return e===void 0?[]:J7(e)?e:[e]}function S9(e,t){if(J7(e))for(let n of e)n.fieldTree??=t;else e&&(e.fieldTree??=t);return e}function C9(e){return e.formField?e.formField.element:e.fieldTree().formFieldBindings().reduce((e,t)=>!e||!t.element?e??t.element:e.compareDocumentPosition(t.element)&Node.DOCUMENT_POSITION_PRECEDING?t.element:e,void 0)}function koe(e,t){let n=C9(e),r=C9(t);return n===r?0:n===void 0||r===void 0?n===void 0?1:-1:n.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_PRECEDING?1:-1}var w9=v9(),Aoe=class{node;cache=new WeakMap;constructor(e){this.node=e,this.fieldTreeOf=this.fieldTreeOf.bind(this),this.stateOf=this.stateOf.bind(this)}resolve(e){if(!this.cache.has(e)){let t=X(()=>{let t=u9.unwrapFieldPath(e),n=this.node,r=doe();for(;r>0||!n.structure.logic.hasLogic(t.root.builder);)if(r--,n=n.structure.parent,n===void 0)throw new _i(1900,!1);for(let e of t.keys)if(n=n.structure.getChild(e),n===void 0)throw new _i(1901,!1);return n.fieldTree});this.cache.set(e,t)}return this.cache.get(e)()}get fieldTree(){return this.node.fieldProxy}get state(){return this.node}get value(){return this.node.structure.value}get key(){return this.node.structure.keyInParent}get pathKeys(){return this.node.structure.pathKeys}index=X(()=>{let e=this.key();if(!J7(Z(this.node.structure.parent.value)))throw new _i(1906,!1);return Number(e)});fieldTreeOf(e){return this.resolve(e)}stateOf(e){return this.resolve(e)()}valueOf=e=>{let t=this.resolve(e)().value();if(t instanceof toe)throw new _i(1907,!1);return t}},joe=class{node;metadata=new Map;constructor(e){this.node=e}runMetadataCreateLifecycle(){if(!this.node.logicNode.logic.hasMetadataKeys())return;let e=$te();e&&vv(!1);try{Z(()=>so(this.node.structure.injector,()=>{for(let e of this.node.logicNode.logic.getMetadataKeys())if(e.create){let t=this.node.logicNode.logic.getMetadata(e),n=e.create(this.node,X(()=>t.compute(this.node.context)));this.metadata.set(e,n)}}))}finally{e&&vv(!0)}}get(e){if(this.has(e)&&!this.metadata.has(e)){if(e.create)throw new _i(1912,!1);let t=this.node.logicNode.logic.getMetadata(e);this.metadata.set(e,X(()=>t.compute(this.node.context)))}return this.metadata.get(e)}has(e){return this.node.logicNode.logic.hasMetadata(e)}},Moe={get(e,t,n){if(t===uoe)return!0;let r=e(),i=r.structure.getChild(t);if(i!==void 0)return i.fieldTree;let a=Z(r.value);if(J7(a)){if(t===`length`)return r.value().length;if(t===Symbol.iterator)return()=>(r.value(),Array.prototype[Symbol.iterator].apply(r.fieldTree))}if(Y7(a)&&t===Symbol.iterator)return function*(){for(let e in n)yield[e,n[e]]}},getOwnPropertyDescriptor(e,t){let n=Z(e().value),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&!r.configurable&&(r.configurable=!0),r},ownKeys(e){let t=Z(e().value);return typeof t==`object`&&t?Reflect.ownKeys(t):[]}};function Noe(e,t){let n=X(()=>e()[t()]);return n[tn]=e[tn],n.set=r=>{Object.is(Z(n),r)||e.update(e=>Poe(e,r,t()))},n.update=e=>{n.set(e(Z(n)))},n.asReadonly=()=>n,n}function Poe(e,t,n){if(J7(e)){let r=[...e];return r[n]=t,r}return{...e,[n]:t}}var T9=Symbol(``),E9=X(()=>!1),D9=class{logic;node;createChildNode;identitySymbol=Symbol();_injector=void 0;_anyChildHasLogic;get injector(){return this._injector??=Os.create({providers:[],parent:this.fieldManager.injector}),this._injector}constructor(e,t,n){this.logic=e,this.node=t,this.createChildNode=n}children(){this.ensureChildrenMap();let e=this.childrenMap();return e===void 0?[]:Array.from(e.byPropertyKey.values()).map(e=>Z(e.reader))}materializedChildren(){let e=this.childrenMap();return e===void 0?[]:Array.from(e.byPropertyKey.values()).map(e=>e.node)}_areChildrenMaterialized(){return Z(this.childrenMap)!==void 0}ensureChildrenMap(){this._areChildrenMaterialized()||Z(()=>{this.childrenMap.update(e=>this.computeChildrenMap(this.value(),e,!0))})}getChild(e){this.ensureChildrenMap();let t=e.toString(),n=Z(this.childrenMap)?.byPropertyKey.get(t)?.reader;return n||=this.createReader(t),n()}reduceChildren(e,t,n){let r=this.childrenMap();if(!r)return e;let i=e;for(let e of r.byPropertyKey.values()){if(n?.(i))break;i=t(Z(e.reader),i)}return i}destroy(){this.injector.destroy()}createKeyOrOrphanSignals(e,t,n){if(e===`root`)return{keyInParent:O9,isOrphaned:E9};let r=this.parent,i=n,a=X(()=>{if(r.structure.isOrphaned())return T9;let e=r.structure.childrenMap();if(!e)return T9;let n=e.byPropertyKey.get(i);if(n&&n.node===this.node)return i;if(t===void 0)return T9;for(let[t,n]of e.byPropertyKey)if(n.node===this.node)return i=t;return T9}),o=X(()=>a()===T9);return{keyInParent:X(()=>{let e=a();if(e===T9)throw t===void 0?new _i(-1902,!1):new _i(1904,!1);return e}),isOrphaned:o}}createChildrenMap(){return Q({source:this.value,computation:(e,t)=>this.computeChildrenMap(e,t?.value,!1)})}computeChildrenMap(e,t,n){if(!Y7(e)||!n&&t===void 0&&!(this._anyChildHasLogic??=this.logic.anyChildHasLogic()))return;t??={byPropertyKey:new Map};let r,i=J7(e);t!==void 0&&(r=i?Roe(t,e,this.identitySymbol):zoe(t,e));for(let n of Object.keys(e)){let a,o=e[n];if(o===void 0){t.byPropertyKey.has(n)&&(r??={...t},r.byPropertyKey.delete(n));continue}i&&Y7(o)&&!J7(o)&&(a=o[this.identitySymbol]??=Symbol(``));let s;a&&(t.byTrackingKey?.has(a)||(r??={...t},r.byTrackingKey??=new Map,r.byTrackingKey.set(a,this.createChildNode(n,a,i))),s=(r??t).byTrackingKey.get(a));let c=t.byPropertyKey.get(n);c===void 0?(r??={...t},r.byPropertyKey.set(n,{reader:this.createReader(n),node:s??this.createChildNode(n,a,i)})):s&&s!==c.node&&(r??={...t},c.node=s)}return r??t}createReader(e){return X(()=>this.childrenMap()?.byPropertyKey.get(e)?.node)}},Foe=class extends D9{fieldManager;value;get parent(){}get root(){return this.node}get pathKeys(){return Loe}get keyInParent(){return O9}isOrphaned=E9;childrenMap;constructor(e,t,n,r,i){super(t,e,i),this.fieldManager=n,this.value=r,this.childrenMap=this.createChildrenMap()}},Ioe=class extends D9{logic;parent;root;pathKeys;keyInParent;value;childrenMap;isOrphaned;get fieldManager(){return this.root.structure.fieldManager}constructor(e,t,n,r,i,a){super(t,e,a),this.logic=t,this.parent=n,this.root=this.parent.structure.root;let o=this.createKeyOrOrphanSignals(`child`,r,i);this.isOrphaned=o.isOrphaned,this.keyInParent=o.keyInParent,this.pathKeys=X(()=>[...n.structure.pathKeys(),this.keyInParent()]),this.value=Noe(this.parent.structure.value,this.keyInParent),this.childrenMap=this.createChildrenMap(),this.fieldManager.structures.add(this)}},Loe=X(()=>[]),O9=X(()=>{throw new _i(1905,!1)});function Roe(e,t,n){let r,i=new Set(e.byPropertyKey.keys()),a=e.byTrackingKey&&new Set(e.byTrackingKey.keys());for(let e=0;e0){r??={...e};for(let e of i)r.byPropertyKey.delete(e)}if(a&&a.size>0){r??={...e};for(let e of a)r.byTrackingKey.delete(e)}return r}function zoe(e,t){let n;for(let r of e.byPropertyKey.keys())Object.hasOwn(t,r)||(n??={...e},n.byPropertyKey.delete(r));return n}var Boe=class{node;selfSubmitting=D(!1);submissionErrors;constructor(e){this.node=e,this.submissionErrors=Q({source:this.node.structure.value,computation:()=>[]})}submitting=X(()=>this.selfSubmitting()||(this.node.structure.parent?.submitting()??!1))},k9=class{structure;validationState;metadataState;nodeState;submitState;fieldAdapter;controlValue;_context=void 0;get context(){return this._context??=new Aoe(this)}fieldProxy=new Proxy(()=>this,Moe);pathNode;constructor(e){this.pathNode=e.pathNode,this.fieldAdapter=e.fieldAdapter,this.structure=this.fieldAdapter.createStructure(this,e),this.validationState=this.fieldAdapter.createValidationState(this,e),this.nodeState=this.fieldAdapter.createNodeState(this,e),this.metadataState=new joe(this),this.submitState=new Boe(this),this.controlValue=this.controlValueSignal(),this.metadataState.runMetadataCreateLifecycle()}focusBoundControl(e){this.getBindingForFocus()?.focus(e)}getBindingForFocus(){return this.formFieldBindings().filter(e=>e.focus!==void 0).reduce(A9,void 0)||this.structure.children().map(e=>e.getBindingForFocus()).reduce(A9,void 0)}pendingSync=Q({source:()=>this.value(),computation:(e,t)=>{t?.value?.abort()}});get fieldTree(){return this.fieldProxy}get logicNode(){return this.structure.logic}get value(){return this.structure.value}get keyInParent(){return this.structure.keyInParent}get errors(){return this.validationState.errors}get parseErrors(){return this.validationState.parseErrors}get errorSummary(){return this.validationState.errorSummary}get pending(){return this.validationState.pending}get valid(){return this.validationState.valid}get invalid(){return this.validationState.invalid}get dirty(){return this.nodeState.dirty}get touched(){return this.nodeState.touched}get disabled(){return this.nodeState.disabled}get disabledReasons(){return this.nodeState.disabledReasons}get hidden(){return this.nodeState.hidden}get readonly(){return this.nodeState.readonly}get formFieldBindings(){return this.nodeState.formFieldBindings}get submitting(){return this.submitState.submitting}get name(){return this.nodeState.name}get max(){let e=this.metadata(Soe)?.();return e?this.metadata(e):void 0}get maxLength(){return this.metadata(woe)}get min(){let e=this.metadata(xoe)?.();return e?this.metadata(e):void 0}get minLength(){return this.metadata(Coe)}get pattern(){return this.metadata(Toe)??Voe}get required(){return this.metadata(b9)??Hoe}metadata(e){return this.metadataState.get(e)}getError(e){return this.errors().find(t=>t.kind===e)}hasMetadata(e){return this.metadataState.has(e)}markAsTouched(e){this.structure.isOrphaned()||Z(()=>{this.markAsTouchedInternal(e),this.flushSync()})}markAsTouchedInternal(e){if(!this.structure.isOrphaned()&&!this.validationState.shouldSkipValidation()&&(this.nodeState.markAsTouched(),!e?.skipDescendants))for(let e of this.structure.children())e.markAsTouchedInternal()}markAsDirty(){this.nodeState.markAsDirty()}markAsPristine(){this.nodeState.markAsPristine()}markAsUntouched(){this.nodeState.markAsUntouched()}reset(e){Z(()=>this._reset(e))}_reset(e){this.pendingSync()?.abort(),e!==void 0&&this.value.set(e),this.controlValue.rawSet(this.value()),this.nodeState.markAsUntouched(),this.nodeState.markAsPristine();for(let e of this.formFieldBindings())e.reset();for(let e of this.structure.materializedChildren())e._reset()}reloadValidation(){Z(()=>this._reloadValidation())}_reloadValidation(){let e=this.logicNode.logic.getMetadataKeys();for(let t of e)t[_9]&&this.metadata(t).reload?.();for(let e of this.structure.children())e._reloadValidation()}controlValueSignal(){let e=Q(this.value);e.rawSet=e.set,e.set=t=>{e.rawSet(t),this.markAsDirty(),this.debounceSync()};let t=e.update;return e.update=e=>{t(e),this.markAsDirty(),this.debounceSync()},e}sync(){this.value.set(this.controlValue())}flushSync(){let e=this.pendingSync();e&&!e.signal.aborted&&(e.abort(),this.sync())}async debounceSync(){let e=Z(()=>(this.pendingSync()?.abort(),this.nodeState.debouncer()));if(e){let t=new AbortController,n=e(t.signal);if(n&&(this.pendingSync.set(t),await n,t.signal.aborted))return}this.structure.isOrphaned()||this.sync()}static newRoot(e,t,n,r){return r.newRoot(e,t,n,r)}createStructure(e){return e.kind===`root`?new Foe(this,e.logic,e.fieldManager,e.value,this.newChild.bind(this)):new Ioe(this,e.logic,e.parent,e.identityInParent,e.initialKeyInParent,this.newChild.bind(this))}newChild(e,t,n){let r,i;return n?(r=this.pathNode.getChild(X7),i=this.structure.logic.getChild(X7)):(r=this.pathNode.getChild(e),i=this.structure.logic.getChild(e)),this.fieldAdapter.newChild({kind:`child`,parent:this,pathNode:r,logic:i,initialKeyInParent:e,identityInParent:t,fieldAdapter:this.fieldAdapter})}},Voe=X(()=>[]),Hoe=X(()=>!1);function A9(e,t){return e?t&&e.element.compareDocumentPosition(t.element)&Node.DOCUMENT_POSITION_PRECEDING?t:e:t}var Uoe=class{node;selfTouched=D(!1);selfDirty=D(!1);markAsTouched(){this.selfTouched.set(!0)}markAsDirty(){this.selfDirty.set(!0)}markAsPristine(){this.selfDirty.set(!1)}markAsUntouched(){this.selfTouched.set(!1)}formFieldBindings=D([]);constructor(e){this.node=e}dirty=X(()=>{let e=this.selfDirty()&&!this.isNonInteractive();return this.node.structure.reduceChildren(e,(e,t)=>t||e.nodeState.dirty(),q7)});touched=X(()=>{let e=this.selfTouched()&&!this.isNonInteractive();return this.node.structure.reduceChildren(e,(e,t)=>t||e.nodeState.touched(),q7)});disabledReasons=X(()=>[...this.node.structure.parent?.nodeState.disabledReasons()??[],...this.node.logicNode.logic.disabledReasons.compute(this.node.context)],{equal:x9});disabled=X(()=>!!this.disabledReasons().length);readonly=X(()=>(this.node.structure.parent?.nodeState.readonly()||this.node.logicNode.logic.readonly.compute(this.node.context))??!1);hidden=X(()=>(this.node.structure.parent?.nodeState.hidden()||this.node.logicNode.logic.hidden.compute(this.node.context))??!1);name=X(()=>{let e=this.node.structure.parent;return e?`${e.name()}.${this.node.structure.keyInParent()}`:this.node.structure.fieldManager.rootName});debouncer=X(()=>{if(this.node.logicNode.logic.hasMetadata(w9)){let e=this.node.logicNode.logic.getMetadata(w9).compute(this.node.context);if(e)return t=>e(this.node.context,t)}return this.node.structure.parent?.nodeState.debouncer?.()});isNonInteractive=X(()=>this.hidden()||this.disabled()||this.readonly())},Woe=class{newRoot(e,t,n,r){return new k9({kind:`root`,fieldManager:e,value:t,pathNode:n,logic:n.builder.build(),fieldAdapter:r})}newChild(e){return new k9(e)}createNodeState(e){return new Uoe(e)}createValidationState(e){return new Doe(e)}createStructure(e,t){return e.createStructure(t)}},Goe=class{injector;rootName;submitOptions;constructor(e,t,n){this.injector=e,this.rootName=t??`${this.injector.get(ic)}.form${Koe++}`,this.submitOptions=n}structures=new Set;createFieldManagementEffect(e){_c(()=>{let t=new Set;this.markStructuresLive(e,t);for(let e of this.structures)t.has(e)||(this.structures.delete(e),Z(()=>e.destroy()))},{injector:this.injector})}markStructuresLive(e,t){t.add(e);for(let n of e.children())this.markStructuresLive(n.structure,t)}},Koe=0,qoe=new Fi(``);function Joe(e){let t,n,r;return e.length===3?[t,n,r]=e:e.length===2?voe(e[1])?[t,n]=e:[t,r]=e:[t]=e,[t,n,r]}function Yoe(...e){let[t,n,r]=Joe(e),i=r?.injector??C(Os),a=so(i,()=>p9.rootCompile(n)),o=new Goe(i,r?.name,r?.submission),s=r?.adapter??new Woe,c=k9.newRoot(o,t,a,s);o.createFieldManagementEffect(c.structure);let{experimentalWebMcpTool:l}=r??{};if(l){let e=so(i,()=>C(qoe,{optional:!0}));e&&so(i,()=>e(c.fieldTree,{name:l.name,description:l.description}))}return c.fieldTree}async function Xoe(e,t){let n=Z(e);if(Z(n.submitState.submitting))return!1;let r=t===void 0?n.structure.root.fieldProxy:e,i={root:n.structure.root.fieldProxy,submitted:e};t=typeof t==`function`?{action:t}:t??n.structure.fieldManager.submitOptions;let a=t?.action;if(!a)throw new _i(1915,!1);n.markAsTouched();let o=t?.onInvalid,s=Zoe(n,t?.ignoreValidators);try{if(s){n.submitState.selfSubmitting.set(!0);let e=await Z(()=>a?.(r,i));return e&&Qoe(n,e),!e||J7(e)&&e.length===0}return Z(()=>o?.(r,i)),!1}finally{n.submitState.selfSubmitting.set(!1)}}function Zoe(e,t){switch(t){case`all`:return!0;case`none`:return Z(e.valid);default:return!Z(e.invalid)}}function Qoe(e,t){J7(t)||(t=[t]);let n=new Map;for(let r of t){let t=S9(r,e.fieldTree),i=t.fieldTree(),a=n.get(i);a||(a=[],n.set(i,a)),a.push(t)}for(let[e,t]of n)e.submitState.submissionErrors.set(t)}var j9=class{kind=`compat`;control;fieldTree;context;message;constructor({context:e,kind:t,control:n}){this.context=e,this.kind=t,this.control=n}};function $oe(e){if(e.length===0)return null;let t={};for(let n of e)t[n.kind]=n instanceof j9?n.context:n;return t}function ese(e,t){return e===null?[]:Object.entries(e).map(([e,n])=>new j9({context:n,kind:e,control:t}))}var tse=new Fi(``);function M9(e,t){return e instanceof Function?e(t):e}function nse(e){return typeof e==`number`?isNaN(e):e===``||e===!1||e==null}function N9(e){return e===void 0?[]:Array.isArray(e)?e:[e]}function rse(e,t){m9(e),u9.unwrapFieldPath(e).builder.addSyncErrorRule(e=>S9(t(e),e.fieldTree))}function ise(e){return new ase(e)}var P9=class{__brand=void 0;kind=``;fieldTree;message;constructor(e){e&&Object.assign(this,e)}},ase=class extends P9{kind=`required`},F9=class extends P9{kind=`parse`};function ose(e,t){let n=h9(e,v9(),e=>!t?.when||t.when(e));h9(e,b9,({state:e})=>e.metadata(n)()),rse(e,e=>{if(e.state.metadata(n)()&&nse(e.value()))return t?.error?M9(t.error,e):ise({message:M9(t?.message,e)})})}function sse(e,t,n){let r=Q({source:e,computation:()=>[],equal:x9});return{errors:r.asReadonly(),setRawValue:e=>{let i=n(e);r.set(N9(i.error)),i.value!==void 0&&t(i.value),r.set(N9(i.error))},reset:()=>{r.set([])}}}var cse=class{field;constructor(e){this.field=e}control=this;get value(){return this.field().controlValue()}get valid(){return this.field().valid()}get invalid(){return this.field().invalid()}get pending(){return this.field().pending()}get disabled(){return this.field().disabled()}get enabled(){return!this.field().disabled()}get errors(){return $oe(this.field().errors())}get pristine(){return!this.field().dirty()}get dirty(){return this.field().dirty()}get touched(){return this.field().touched()}get untouched(){return!this.field().touched()}get status(){if(this.field().disabled())return`DISABLED`;if(this.field().valid())return`VALID`;if(this.field().invalid())return`INVALID`;if(this.field().pending())return`PENDING`;throw new _i(1910,!1)}valueAccessor=null;hasValidator(e){return e===m7.required&&this.field().required()}updateValueAndValidity(){}},I9={disabled:`disabled`,disabledReasons:`disabledReasons`,dirty:`dirty`,errors:`errors`,hidden:`hidden`,invalid:`invalid`,max:`max`,maxLength:`maxLength`,min:`min`,minLength:`minLength`,name:`name`,pattern:`pattern`,pending:`pending`,readonly:`readonly`,required:`required`,touched:`touched`},lse=(()=>{let e={};for(let t of Object.keys(I9))e[I9[t]]=t;return e})();function L9(e,t){return e[lse[t]]?.()}var R9=Object.values(I9);function z9(){return{}}function B9(e,t,n){return e[t]!==n&&(e[t]=n,!0)}function use(e,t,n){let r;if(U9(e)&&n.isBadInput(e))return{error:new F9};switch(e.type){case`checkbox`:return{value:e.checked};case`number`:case`range`:case`datetime-local`:if(r=Z(t),typeof r==`number`||r===null)return{value:e.value===``?null:e.valueAsNumber};break;case`date`:case`month`:case`time`:case`week`:if(r=Z(t),r===null||r instanceof Date)return{value:e.valueAsDate};if(typeof r==`number`)return{value:e.valueAsNumber}}if(e.tagName===`INPUT`&&e.type===`text`&&(r??=Z(t),typeof r==`number`||r===null)){if(e.value===``)return{value:null};let t=Number(e.value);return Number.isNaN(t)?{error:new F9}:{value:t}}return{value:e.value}}function V9(e,t){switch(e.type){case`checkbox`:e.checked=t;return;case`radio`:e.checked=t===e.value;return;case`number`:case`range`:case`datetime-local`:if(typeof t==`number`){H9(e,t);return}if(t===null){e.value=``;return}break;case`date`:case`month`:case`time`:case`week`:if(t===null||t instanceof Date){e.valueAsDate=t;return}if(typeof t==`number`){H9(e,t);return}}if(e.tagName===`INPUT`&&e.type===`text`){if(typeof t==`number`){e.value=isNaN(t)?``:String(t);return}if(t===null){e.value=``;return}}e.value=t}function H9(e,t){isNaN(t)?e.value=``:e.valueAsNumber=t}function U9(e){return e.tagName===`INPUT`}function dse(e){return e.type===`date`||e.type===`datetime-local`||e.type===`month`||e.type===`time`||e.type===`week`}function fse(e,t){let n=e.getUTCFullYear(),r=String(e.getUTCMonth()+1).padStart(2,`0`);return t===`month`?`${n}-${r}`:`${n}-${r}-${String(e.getUTCDate()).padStart(2,`0`)}`}function W9(e,t,n){return t instanceof Date&&(e===`min`||e===`max`)&&(n===`date`||n===`month`)?fse(t,n):t}function pse(e,t){e.listenToCustomControlModel(e=>t.state().controlValue.set(e)),e.listenToCustomControlOutput(`touch`,()=>t.state().markAsTouched()),t.registerAsBinding(e.customControl);let n=z9();return()=>{let r=t.state(),i=r.controlValue();B9(n,`controlValue`,i)&&e.setCustomControlModelInput(i);for(let i of R9){let a;if(a=i===`errors`?t.errors():L9(r,i),B9(n,i,a)&&(e.setInputOnDirectives(i,a),t.elementAcceptsNativeProperty(i)&&!e.customControlHasInput(i))){let e=W9(i,a,t.nativeFormElement.type);H7(t.renderer,t.nativeFormElement,i,e)}}}}function mse(e){return typeof e==`object`&&!!e}function hse(e,t){let n=z9();t.controlValueAccessor.registerOnChange(e=>{n.controlValue=e,t.state().controlValue.set(e)}),t.controlValueAccessor.registerOnTouched(()=>t.state().markAsTouched());let r=t.injector.get(p7,null,{optional:!0,self:!0});if(r){let e;for(let t of r)mse(t)&&t.registerOnValidatorChange&&(e??=D(0),t.registerOnValidatorChange(()=>{e.update(e=>e+1)}));let n=r.map(e=>typeof e==`function`?e:e.validate.bind(e)),i=m7.compose(n),a=X(()=>(e?.(),ese(i?i(t.interopNgControl.control):null,t.interopNgControl.control)));t.parseErrorsSource.set(a)}return t.registerAsBinding({reset:()=>{let e=t.state().value();n.controlValue=e,Z(()=>t.controlValueAccessor.writeValue(e))}}),()=>{let r=t.state(),i=r.controlValue();B9(n,`controlValue`,i)&&Z(()=>t.controlValueAccessor.writeValue(i));for(let i of R9){let a=L9(r,i);if(B9(n,i,a)){let n=e.setInputOnDirectives(i,a,i===`name`?gse:void 0);i===`disabled`&&t.controlValueAccessor.setDisabledState?Z(()=>t.controlValueAccessor.setDisabledState(a)):!n&&t.elementAcceptsNativeProperty(i)&&H7(t.renderer,t.nativeFormElement,i,a)}}}}function gse(e){return e==null}function _se(e,t,n){if(typeof MutationObserver!=`function`)return;let r=new MutationObserver(e=>{e.some(e=>vse(e))&&t()});r.observe(e,{attributes:!0,attributeFilter:[`value`],characterData:!0,childList:!0,subtree:!0}),n.onDestroy(()=>r.disconnect())}function vse(e){if(e.type===`childList`||e.type===`characterData`){if(e.target instanceof Comment)return!1;for(let t of e.addedNodes)if(!(t instanceof Comment))return!0;for(let t of e.removedNodes)if(!(t instanceof Comment))return!0;return!1}return e.type===`attributes`&&e.target instanceof HTMLOptionElement}function yse(e,t,n,r){let i=!1,a=t.nativeFormElement,o=sse(()=>t.state().value(),e=>t.state().controlValue.set(e),e=>use(a,t.state().value,r));n.set(o.errors),t.onReset=()=>{o.reset();let e=t.state().value();s.controlValue=e,V9(a,e)},e.listenToDom(`input`,()=>o.setRawValue(void 0)),e.listenToDom(`blur`,()=>t.state().markAsTouched()),U9(a)&&dse(a)&&r.watchValidity(t.destroyRef,a,()=>o.setRawValue(void 0)),t.registerAsBinding(),a.tagName===`SELECT`&&_se(a,()=>{i&&(a.value=t.state().controlValue())},t.destroyRef);let s=z9();return()=>{let n=t.state();for(let r of R9){let i=L9(n,r);if(B9(s,r,i)&&(e.setInputOnDirectives(r,i),t.elementAcceptsNativeProperty(r))){let e=W9(r,i,a.type);H7(t.renderer,a,r,e)}}let r=n.controlValue(),o=B9(s,`controlValue`,r),c=a.type===`radio`&&B9(s,`radioValue`,a.value);(o||c)&&V9(a,r),i=!0}}var G9=(()=>{class e{static ɵfac=function(t){return new(t||e)};static ɵprov=Oi({token:e,factory:e=>bse.ɵfac(e),providedIn:`root`})}return e})(),bse=(()=>{class e extends G9{document=C(ks);cspNonce=C(cc,{optional:!0});injectedStyles=new WeakMap;watchValidity(e,t,n){let r=t.getRootNode();this.injectedStyles.has(r)||this.injectedStyles.set(r,this.createTransitionStyle(r));let i=e=>{let t=e;(t.animationName===`ng-valid`||t.animationName===`ng-invalid`)&&n()};t.addEventListener(`animationstart`,i),e.onDestroy(()=>{t.removeEventListener(`animationstart`,i)})}isBadInput(e){return e.validity?.badInput??!1}createTransitionStyle(e){let t=this.document.createElement(`style`);return this.cspNonce&&(t.nonce=this.cspNonce),t.textContent=` @keyframes ng-valid {} @keyframes ng-invalid {} input:valid, textarea:valid { @@ -19823,7 +19823,7 @@ dd[_ngcontent-%COMP%] { input:invalid, textarea:invalid { animation: ng-invalid 0.001s; } - `,e.nodeType===9?e.head?.appendChild(t):e.appendChild(t),t}ngOnDestroy(){this.injectedStyles.get(this.document)?.remove()}static ɵfac=(()=>{let t;return function(n){return(t||=Pl(e))(n||e)}})();static ɵprov=Oi({token:e,factory:e.ɵfac})}return e})(),yse=Symbol(),G9=new Fi(``),bse=(()=>{class e{field=$.required({alias:`formField`});state=X(()=>this.field()());renderer=C(wp);destroyRef=C(As);injector=C(Os);element=C(Vl).nativeElement;elementIsNativeFormElement=B7(this.element);elementAcceptsTextualValues=toe(this.element);_elementAcceptsMinMax;nativeFormElement=this.elementIsNativeFormElement?this.element:void 0;focuser=e=>this.element.focus(e);controlValueAccessors=C(l7,{optional:!0,self:!0});config=C($oe,{optional:!0});validityMonitor=C(W9);parseErrorsSource=D(void 0);_interopNgControl;get interopNgControl(){return this._interopNgControl??=new ose(this.state)}parseErrors=X(()=>this.parseErrorsSource()?.().map(e=>({...e,fieldTree:Z(this.state).fieldTree,formField:this}))??[],{equal:b9});errors=X(()=>this.state().errors().filter(e=>!e.formField||e.formField===this),{equal:b9});isFieldBinding=!1;resetter=()=>{};parseErrorsResetCallback;setParseErrors(e){this.parseErrorsSource.set(e)}set onReset(e){this.parseErrorsResetCallback=e}get onReset(){return this.parseErrorsResetCallback}get controlValueAccessor(){return!this.controlValueAccessors||this.controlValueAccessors.length===0?this.interopNgControl?.valueAccessor??void 0:U7(this.interopNgControl,this.controlValueAccessors)??void 0}installClassBindingEffect(){let e=Object.entries(this.config?.classes??{}).map(([e,t])=>[e,X(()=>t(this))]);if(e.length===0)return;let t=R9();Pv({write:()=>{for(let[n,r]of e){let e=r();z9(t,n,e)&&(e?this.renderer.addClass(this.element,n):this.renderer.removeClass(this.element,n))}}},{injector:this.injector})}focus(e){this.focuser(e)}reset(){this.resetter(),this.parseErrorsResetCallback?.(this.state().value())}registerAsBinding(e){if(this.isFieldBinding)throw new _i(1913,!1);this.isFieldBinding=!0,this.installClassBindingEffect(),e?.focus&&(this.focuser=t=>e.focus(t)),e?.reset&&(this.resetter=()=>e.reset()),_c(e=>{let t=this.state();t.nodeState.formFieldBindings.update(e=>[...e,this]),e(()=>{t.nodeState.formFieldBindings.update(e=>e.filter(e=>e!==this))})},{injector:this.injector})}[yse];ɵngControlCreate(e){if(!e.hasPassThrough){if(this.controlValueAccessor)this.ɵngControlUpdate=pse(e,this);else if(e.customControl)this.ɵngControlUpdate=dse(e,this);else if(this.elementIsNativeFormElement)this.ɵngControlUpdate=_se(e,this,this.parseErrorsSource,this.validityMonitor);else throw new _i(1914,!1)}}ɵngControlUpdate;elementAcceptsNativeProperty(e){if(!this.elementIsNativeFormElement)return!1;switch(e){case`min`:case`max`:return this._elementAcceptsMinMax??=eoe(this.element);case`minLength`:case`maxLength`:return this.elementAcceptsTextualValues;case`disabled`:case`required`:case`readonly`:case`name`:return!0;default:return!1}}static ɵfac=function(t){return new(t||e)};static ɵdir=Oh({type:e,selectors:[[``,`formField`,``]],inputs:{field:[1,`formField`,`field`]},exportAs:[`formField`],features:[nv([{provide:G9,useExisting:e},{provide:soe,useFactory:()=>C(e).interopNgControl},{provide:aoe,useFactory:()=>C(G9,{self:!0})}]),Ih(`formField`)]})}return e})(),xse=(()=>{class e{fieldTree=$.required({alias:`formRoot`});onSubmit(e){e.preventDefault(),Z(()=>{let e=this.fieldTree();e().structure.fieldManager.submitOptions&&Joe(e)})}static ɵfac=function(t){return new(t||e)};static ɵdir=Oh({type:e,selectors:[[`form`,`formRoot`,``]],hostAttrs:[`novalidate`,``],hostBindings:function(e,t){e&1&&H(`submit`,function(e){return t.onSubmit(e)})},inputs:{fieldTree:[1,`formRoot`,`fieldTree`]}})}return e})(),Sse=[`codeInput`],Cse=`https://pangular-inspector.dev/security/#one-time-code`,wse=class e{client=$.required();docsUrl=Cse;busy=D(!1);error=D(``);notice=D(``);model=D({code:``});codeForm=qoe(this.model,e=>ise(e.code),{submission:{action:async()=>{await this.send()},onInvalid:()=>this.fail(`Enter the code from the terminal.`)}});codeInput=Dv(`codeInput`);constructor(){_c(()=>{let e=this.client();Z(()=>void e.requestAuthCode().catch(()=>{}))}),ud(()=>this.codeInput()?.nativeElement.focus())}async send(){let e=this.model().code.replace(/\s+/g,``);if(!/^\d{6}$/.test(e)){this.fail(`Enter the 6-digit code from the terminal.`);return}this.busy.set(!0),this.notice.set(``);try{await this.client().requestTrustWithCode(e)?this.error.set(``):this.fail(`That code didn't match. Check the terminal and try again.`)}catch{this.fail(`Can't reach the devtools server. Check that the dev server is running.`)}finally{this.busy.set(!1)}}async newCode(){this.busy.set(!0);try{await this.client().requestAuthCode({reissue:!0}),this.error.set(``),this.model.set({code:``}),this.notice.set(`A new code was printed in the terminal.`)}catch{this.notice.set(`Couldn't ask for a new code. Try again.`)}finally{this.busy.set(!1),this.codeInput()?.nativeElement.focus()}}fail(e){this.error.update(t=>t===e?`${e} `:e),this.codeInput()?.nativeElement.focus()}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-auth-code`]],viewQuery:function(e,t){e&1&&Xg(t.codeInput,Sse,5),e&2&&Zg()},inputs:{client:[1,`client`]},decls:24,vars:10,consts:[[`codeInput`,``],[`aria-labelledby`,`auth-code-title`,1,`pairing`],[`id`,`auth-code-title`],[3,`formRoot`],[`for`,`auth-code-input`],[1,`row`],[`id`,`auth-code-input`,`autocomplete`,`one-time-code`,`inputmode`,`numeric`,`spellcheck`,`false`,3,`formField`],[`type`,`submit`,1,`primary`,3,`disabled`],[`id`,`auth-code-error`,`role`,`alert`,1,`error`],[1,`more`],[`type`,`button`,3,`click`,`disabled`],[`role`,`status`,1,`notice`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`sr-only`]],template:function(e,t){e&1&&(I(0,`section`,1)(1,`h2`,2),K(2,`Enter the one-time code`),L(),I(3,`p`),K(4,` The devtools server asks for a one-time code before it shares data from your app. Find the 6-digit code in the terminal that runs the dev server. `),L(),I(5,`form`,3)(6,`label`,4),K(7,`One-time code`),L(),I(8,`div`,5),R(9,`input`,6,0),Wp(),I(11,`button`,7),K(12),L()()(),I(13,`p`,8),K(14),L(),I(15,`div`,9)(16,`button`,10),H(`click`,function(){return t.newCode()}),K(17,`Print a new code`),L(),I(18,`p`,11),K(19),L()(),I(20,`a`,12),K(21,`About the one-time code`),I(22,`span`,13),K(23,` (opens in a new tab)`),L()()()),e&2&&(O(5),F(`formRoot`,t.codeForm),O(4),F(`formField`,t.codeForm.code),A(`aria-invalid`,t.error()?!0:null)(`aria-describedby`,t.error()?`auth-code-error`:null),Kp(),O(2),F(`disabled`,t.busy()),O(),J(` `,t.busy()?`Checking…`:`Connect`,` `),O(2),q(t.error()),O(2),F(`disabled`,t.busy()),O(3),q(t.notice()),O(),F(`href`,t.docsUrl,ku))},dependencies:[bse,xse],styles:[`[_nghost-%COMP%] { + `,e.nodeType===9?e.head?.appendChild(t):e.appendChild(t),t}ngOnDestroy(){this.injectedStyles.get(this.document)?.remove()}static ɵfac=(()=>{let t;return function(n){return(t||=Pl(e))(n||e)}})();static ɵprov=Oi({token:e,factory:e.ɵfac})}return e})(),xse=Symbol(),K9=new Fi(``),Sse=(()=>{class e{field=$.required({alias:`formField`});state=X(()=>this.field()());renderer=C(wp);destroyRef=C(As);injector=C(Os);element=C(Vl).nativeElement;elementIsNativeFormElement=V7(this.element);elementAcceptsTextualValues=roe(this.element);_elementAcceptsMinMax;nativeFormElement=this.elementIsNativeFormElement?this.element:void 0;focuser=e=>this.element.focus(e);controlValueAccessors=C(l7,{optional:!0,self:!0});config=C(tse,{optional:!0});validityMonitor=C(G9);parseErrorsSource=D(void 0);_interopNgControl;get interopNgControl(){return this._interopNgControl??=new cse(this.state)}parseErrors=X(()=>this.parseErrorsSource()?.().map(e=>({...e,fieldTree:Z(this.state).fieldTree,formField:this}))??[],{equal:x9});errors=X(()=>this.state().errors().filter(e=>!e.formField||e.formField===this),{equal:x9});isFieldBinding=!1;resetter=()=>{};parseErrorsResetCallback;setParseErrors(e){this.parseErrorsSource.set(e)}set onReset(e){this.parseErrorsResetCallback=e}get onReset(){return this.parseErrorsResetCallback}get controlValueAccessor(){return!this.controlValueAccessors||this.controlValueAccessors.length===0?this.interopNgControl?.valueAccessor??void 0:W7(this.interopNgControl,this.controlValueAccessors)??void 0}installClassBindingEffect(){let e=Object.entries(this.config?.classes??{}).map(([e,t])=>[e,X(()=>t(this))]);if(e.length===0)return;let t=z9();Pv({write:()=>{for(let[n,r]of e){let e=r();B9(t,n,e)&&(e?this.renderer.addClass(this.element,n):this.renderer.removeClass(this.element,n))}}},{injector:this.injector})}focus(e){this.focuser(e)}reset(){this.resetter(),this.parseErrorsResetCallback?.(this.state().value())}registerAsBinding(e){if(this.isFieldBinding)throw new _i(1913,!1);this.isFieldBinding=!0,this.installClassBindingEffect(),e?.focus&&(this.focuser=t=>e.focus(t)),e?.reset&&(this.resetter=()=>e.reset()),_c(e=>{let t=this.state();t.nodeState.formFieldBindings.update(e=>[...e,this]),e(()=>{t.nodeState.formFieldBindings.update(e=>e.filter(e=>e!==this))})},{injector:this.injector})}[xse];ɵngControlCreate(e){if(!e.hasPassThrough){if(this.controlValueAccessor)this.ɵngControlUpdate=hse(e,this);else if(e.customControl)this.ɵngControlUpdate=pse(e,this);else if(this.elementIsNativeFormElement)this.ɵngControlUpdate=yse(e,this,this.parseErrorsSource,this.validityMonitor);else throw new _i(1914,!1)}}ɵngControlUpdate;elementAcceptsNativeProperty(e){if(!this.elementIsNativeFormElement)return!1;switch(e){case`min`:case`max`:return this._elementAcceptsMinMax??=noe(this.element);case`minLength`:case`maxLength`:return this.elementAcceptsTextualValues;case`disabled`:case`required`:case`readonly`:case`name`:return!0;default:return!1}}static ɵfac=function(t){return new(t||e)};static ɵdir=Oh({type:e,selectors:[[``,`formField`,``]],inputs:{field:[1,`formField`,`field`]},exportAs:[`formField`],features:[nv([{provide:K9,useExisting:e},{provide:loe,useFactory:()=>C(e).interopNgControl},{provide:soe,useFactory:()=>C(K9,{self:!0})}]),Ih(`formField`)]})}return e})(),Cse=(()=>{class e{fieldTree=$.required({alias:`formRoot`});onSubmit(e){e.preventDefault(),Z(()=>{let e=this.fieldTree();e().structure.fieldManager.submitOptions&&Xoe(e)})}static ɵfac=function(t){return new(t||e)};static ɵdir=Oh({type:e,selectors:[[`form`,`formRoot`,``]],hostAttrs:[`novalidate`,``],hostBindings:function(e,t){e&1&&H(`submit`,function(e){return t.onSubmit(e)})},inputs:{fieldTree:[1,`formRoot`,`fieldTree`]}})}return e})(),wse=[`codeInput`],Tse=`https://pangular-inspector.dev/security/#one-time-code`,Ese=class e{client=$.required();docsUrl=Tse;busy=D(!1);error=D(``);notice=D(``);model=D({code:``});codeForm=Yoe(this.model,e=>ose(e.code),{submission:{action:async()=>{await this.send()},onInvalid:()=>this.fail(`Enter the code from the terminal.`)}});codeInput=Dv(`codeInput`);constructor(){_c(()=>{let e=this.client();Z(()=>void e.requestAuthCode().catch(()=>{}))}),ud(()=>this.codeInput()?.nativeElement.focus())}async send(){let e=this.model().code.replace(/\s+/g,``);if(!/^\d{6}$/.test(e)){this.fail(`Enter the 6-digit code from the terminal.`);return}this.busy.set(!0),this.notice.set(``);try{await this.client().requestTrustWithCode(e)?this.error.set(``):this.fail(`That code didn't match. Check the terminal and try again.`)}catch{this.fail(`Can't reach the devtools server. Check that the dev server is running.`)}finally{this.busy.set(!1)}}async newCode(){this.busy.set(!0);try{await this.client().requestAuthCode({reissue:!0}),this.error.set(``),this.model.set({code:``}),this.notice.set(`A new code was printed in the terminal.`)}catch{this.notice.set(`Couldn't ask for a new code. Try again.`)}finally{this.busy.set(!1),this.codeInput()?.nativeElement.focus()}}fail(e){this.error.update(t=>t===e?`${e} `:e),this.codeInput()?.nativeElement.focus()}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-auth-code`]],viewQuery:function(e,t){e&1&&Xg(t.codeInput,wse,5),e&2&&Zg()},inputs:{client:[1,`client`]},decls:24,vars:10,consts:[[`codeInput`,``],[`aria-labelledby`,`auth-code-title`,1,`pairing`],[`id`,`auth-code-title`],[3,`formRoot`],[`for`,`auth-code-input`],[1,`row`],[`id`,`auth-code-input`,`autocomplete`,`one-time-code`,`inputmode`,`numeric`,`spellcheck`,`false`,3,`formField`],[`type`,`submit`,1,`primary`,3,`disabled`],[`id`,`auth-code-error`,`role`,`alert`,1,`error`],[1,`more`],[`type`,`button`,3,`click`,`disabled`],[`role`,`status`,1,`notice`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`sr-only`]],template:function(e,t){e&1&&(I(0,`section`,1)(1,`h2`,2),K(2,`Enter the one-time code`),L(),I(3,`p`),K(4,` The devtools server asks for a one-time code before it shares data from your app. Find the 6-digit code in the terminal that runs the dev server. `),L(),I(5,`form`,3)(6,`label`,4),K(7,`One-time code`),L(),I(8,`div`,5),R(9,`input`,6,0),Wp(),I(11,`button`,7),K(12),L()()(),I(13,`p`,8),K(14),L(),I(15,`div`,9)(16,`button`,10),H(`click`,function(){return t.newCode()}),K(17,`Print a new code`),L(),I(18,`p`,11),K(19),L()(),I(20,`a`,12),K(21,`About the one-time code`),I(22,`span`,13),K(23,` (opens in a new tab)`),L()()()),e&2&&(O(5),F(`formRoot`,t.codeForm),O(4),F(`formField`,t.codeForm.code),A(`aria-invalid`,t.error()?!0:null)(`aria-describedby`,t.error()?`auth-code-error`:null),Kp(),O(2),F(`disabled`,t.busy()),O(),J(` `,t.busy()?`Checking…`:`Connect`,` `),O(2),q(t.error()),O(2),F(`disabled`,t.busy()),O(3),q(t.notice()),O(),F(`href`,t.docsUrl,ku))},dependencies:[Sse,Cse],styles:[`[_nghost-%COMP%] { display: block; } @@ -19949,7 +19949,7 @@ a[_ngcontent-%COMP%] { a[_ngcontent-%COMP%]:focus-visible { outline: 2px solid var(--%NS%accent); outline-offset: 2px; -}`]})},Tse={dark:{ngrx:{accent:`#d770e8`,text:`#f0abfc`},analog:{accent:`#ff5470`,text:`#fda4af`},"angular-native":{accent:`#ff4d6d`,text:`#fda4af`},nativescript:{accent:`#8196ff`,text:`#a5b4fc`},capacitor:{accent:`#53b9ff`,text:`#7dd3fc`}},light:{ngrx:{accent:`#a21caf`,text:`#701a75`},analog:{accent:`#be123c`,text:`#881337`},"angular-native":{accent:`#be123c`,text:`#881337`},nativescript:{accent:`#3448c5`,text:`#3730a3`},capacitor:{accent:`#0369a1`,text:`#0c4a6e`}}};function Ese(e,t){let n=Tse[t];return e&&n[e]||null}var Dse=[`toggle`];function Ose(e,t){e&1&&K(0,` Waiting for the devtools server. `)}function kse(e,t){e&1&&K(0,` Loading the current setting. `)}function Ase(e,t){e&1&&K(0,` This is a saved report, so there is no page to change. The switch works with a running dev server. `)}function jse(e,t){e&1&&(K(0,` This devtools server can't change it from the panel. Set `),z(1,`code`),K(2),B(),K(3,` in the devtools config. `)),e&2&&(O(2),Y(`agent: `,`{`,` browserTools: true `,`}`))}function Mse(e,t){e&1&&j(0,Ase,1,0)(1,jse,4,2),e&2&&M(+!W().staticReport())}function Nse(e,t){e&1&&K(0,` The devtools server didn't answer. `)}function Pse(e,t){if(e&1&&(K(0,` Applies right away to every page connected to this dev server, with no reload. It lasts until the server restarts, then `),z(1,`code`),K(2,`agent.browserTools`),B(),K(3)),e&2){let e=W();O(3),J(` in the devtools config decides again (`,e.configLabel(),`). `)}}function Fse(e,t){if(e&1){let e=V();z(0,`div`,8)(1,`span`),K(2),B(),z(3,`button`,10),U(`click`,function(){return w(e),T(W().retry())}),K(4,`Retry`),B()()}e&2&&(O(2),q(t))}function K9(e){if(!e||typeof e!=`object`)return null;let{enabled:t,config:n}=e;return typeof t==`boolean`?{enabled:t,config:n===!0}:null}var Ise=class e{rpc=$(null);state=D(null);status=D(`connecting`);saving=D(!1);error=D(``);announcement=D(``);staticReport=X(()=>rE(this.rpc()));enabled=X(()=>this.state()?.enabled??!1);canChange=X(()=>this.status()===`ready`&&!this.staticReport());configLabel=X(()=>this.state()?.config?`on in this project`:`off in this project`);toggle=Dv(`toggle`);destroyRef=C(As);unsubscribe=null;attached=null;pending=null;constructor(){_c(()=>{let e=this.rpc();e&&e!==this.attached&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async set(e){let t=this.rpc();if(!t||!this.canChange()||this.saving()){this.syncBox();return}this.saving.set(!0),this.error.set(``);try{let n=K9(await tE(t,`set-browser-tools`,{enabled:e}));if(!n)throw Error(`no answer`);this.pending=null,this.state.set(n),this.say(n.enabled?`Browser agent tools on. Connected pages register them.`:`Browser agent tools off. Connected pages unregister them.`)}catch{this.pending=e,this.error.set(`Couldn't turn the browser agent tools ${e?`on`:`off`}. Check that the dev server is running.`)}finally{this.saving.set(!1),this.syncBox()}}retry(){let e=this.rpc();if(e){if(this.status()===`ready`&&this.pending!==null){this.set(this.pending);return}this.error.set(``),this.load(e)}}async load(e){this.attached=e,this.pending=null,this.status.set(`loading`),this.error.set(``),this.unsubscribe?.(),this.unsubscribe=null;try{let t=await e.scope(`pangular`).rpc.sharedState(`browser-tools`);if(this.destroyRef.destroyed||this.attached!==e)return;let n=t=>{let n=K9(t);this.state.set(n),this.status.set(n&&!rE(e)?`ready`:`unsupported`)};n(t.value()),this.unsubscribe=t.on(`updated`,n)}catch{if(this.attached!==e)return;this.status.set(`failed`),this.error.set(`Couldn't read the browser agent tools setting.`)}}syncBox(){let e=this.toggle()?.nativeElement;e&&(e.checked=this.enabled())}say(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-browser-tools-setting`]],viewQuery:function(e,t){e&1&&Xg(t.toggle,Dse,5),e&2&&Zg()},inputs:{rpc:[1,`rpc`]},decls:20,vars:7,consts:[[`toggle`,``],[`id`,`settings-browser-agents`],[`id`,`settings-browser-agents-hint`,1,`hint`],[1,`switch-row`],[`type`,`checkbox`,`role`,`switch`,`aria-describedby`,`settings-browser-agents-hint settings-browser-agents-status`,1,`switch`,3,`change`,`checked`,`disabled`],[1,`switch-label`],[`aria-hidden`,`true`,1,`state`],[`id`,`settings-browser-agents-status`,1,`hint`],[`role`,`alert`,1,`error`],[`role`,`status`,1,`sr-only`],[`type`,`button`,1,`action`,3,`click`]],template:function(e,t){if(e&1&&(z(0,`h2`,1),K(1,`Browser agents`),B(),z(2,`p`,2),K(3,` Registers the read-only agent tools on your app's page, so an agent that drives the browser finds them through WebMCP or Chrome DevTools for agents. Any script on the page can call them, so leave this off if the page loads scripts you don't trust. `),B(),z(4,`label`,3)(5,`input`,4,0),U(`change`,function(e){return t.set(e.target.checked)}),B(),z(7,`span`,5),K(8,`Browser agent tools`),B(),z(9,`span`,6),K(10),B()(),z(11,`p`,7),j(12,Ose,1,0)(13,kse,1,0)(14,Mse,2,1)(15,Nse,1,0)(16,Pse,4,1),B(),j(17,Fse,5,1,`div`,8),z(18,`p`,9),K(19),B()),e&2){let e,n;O(5),Pg(`checked`,t.enabled())(`disabled`,!t.canChange()),A(`aria-busy`,t.saving()?`true`:null),O(5),q(t.enabled()?`On`:`Off`),O(2),M((e=t.status())===`connecting`?12:e===`loading`?13:e===`unsupported`?14:e===`failed`?15:16),O(5),M((n=t.error())?17:-1,n),O(2),q(t.announcement())}},styles:[`[_nghost-%COMP%] { +}`]})},Dse={dark:{ngrx:{accent:`#d770e8`,text:`#f0abfc`},analog:{accent:`#ff5470`,text:`#fda4af`},"angular-native":{accent:`#ff4d6d`,text:`#fda4af`},nativescript:{accent:`#8196ff`,text:`#a5b4fc`},capacitor:{accent:`#53b9ff`,text:`#7dd3fc`}},light:{ngrx:{accent:`#a21caf`,text:`#701a75`},analog:{accent:`#be123c`,text:`#881337`},"angular-native":{accent:`#be123c`,text:`#881337`},nativescript:{accent:`#3448c5`,text:`#3730a3`},capacitor:{accent:`#0369a1`,text:`#0c4a6e`}}};function Ose(e,t){let n=Dse[t];return e&&n[e]||null}var kse=[`toggle`];function Ase(e,t){e&1&&K(0,` Waiting for the devtools server. `)}function jse(e,t){e&1&&K(0,` Loading the current setting. `)}function Mse(e,t){e&1&&K(0,` This is a saved report, so there is no page to change. The switch works with a running dev server. `)}function Nse(e,t){e&1&&(K(0,` This devtools server can't change it from the panel. Set `),z(1,`code`),K(2),B(),K(3,` in the devtools config. `)),e&2&&(O(2),Y(`agent: `,`{`,` browserTools: true `,`}`))}function Pse(e,t){e&1&&j(0,Mse,1,0)(1,Nse,4,2),e&2&&M(+!W().staticReport())}function Fse(e,t){e&1&&K(0,` The devtools server didn't answer. `)}function Ise(e,t){if(e&1&&(K(0,` Applies right away to every page connected to this dev server, with no reload. It lasts until the server restarts, then `),z(1,`code`),K(2,`agent.browserTools`),B(),K(3)),e&2){let e=W();O(3),J(` in the devtools config decides again (`,e.configLabel(),`). `)}}function Lse(e,t){if(e&1){let e=V();z(0,`div`,8)(1,`span`),K(2),B(),z(3,`button`,10),U(`click`,function(){return w(e),T(W().retry())}),K(4,`Retry`),B()()}e&2&&(O(2),q(t))}function q9(e){if(!e||typeof e!=`object`)return null;let{enabled:t,config:n}=e;return typeof t==`boolean`?{enabled:t,config:n===!0}:null}var Rse=class e{rpc=$(null);state=D(null);status=D(`connecting`);saving=D(!1);error=D(``);announcement=D(``);staticReport=X(()=>rE(this.rpc()));enabled=X(()=>this.state()?.enabled??!1);canChange=X(()=>this.status()===`ready`&&!this.staticReport());configLabel=X(()=>this.state()?.config?`on in this project`:`off in this project`);toggle=Dv(`toggle`);destroyRef=C(As);unsubscribe=null;attached=null;pending=null;constructor(){_c(()=>{let e=this.rpc();e&&e!==this.attached&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async set(e){let t=this.rpc();if(!t||!this.canChange()||this.saving()){this.syncBox();return}this.saving.set(!0),this.error.set(``);try{let n=q9(await tE(t,`set-browser-tools`,{enabled:e}));if(!n)throw Error(`no answer`);this.pending=null,this.state.set(n),this.say(n.enabled?`Browser agent tools on. Connected pages register them.`:`Browser agent tools off. Connected pages unregister them.`)}catch{this.pending=e,this.error.set(`Couldn't turn the browser agent tools ${e?`on`:`off`}. Check that the dev server is running.`)}finally{this.saving.set(!1),this.syncBox()}}retry(){let e=this.rpc();if(e){if(this.status()===`ready`&&this.pending!==null){this.set(this.pending);return}this.error.set(``),this.load(e)}}async load(e){this.attached=e,this.pending=null,this.status.set(`loading`),this.error.set(``),this.unsubscribe?.(),this.unsubscribe=null;try{let t=await e.scope(`pangular`).rpc.sharedState(`browser-tools`);if(this.destroyRef.destroyed||this.attached!==e)return;let n=t=>{let n=q9(t);this.state.set(n),this.status.set(n&&!rE(e)?`ready`:`unsupported`)};n(t.value()),this.unsubscribe=t.on(`updated`,n)}catch{if(this.attached!==e)return;this.status.set(`failed`),this.error.set(`Couldn't read the browser agent tools setting.`)}}syncBox(){let e=this.toggle()?.nativeElement;e&&(e.checked=this.enabled())}say(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-browser-tools-setting`]],viewQuery:function(e,t){e&1&&Xg(t.toggle,kse,5),e&2&&Zg()},inputs:{rpc:[1,`rpc`]},decls:20,vars:7,consts:[[`toggle`,``],[`id`,`settings-browser-agents`],[`id`,`settings-browser-agents-hint`,1,`hint`],[1,`switch-row`],[`type`,`checkbox`,`role`,`switch`,`aria-describedby`,`settings-browser-agents-hint settings-browser-agents-status`,1,`switch`,3,`change`,`checked`,`disabled`],[1,`switch-label`],[`aria-hidden`,`true`,1,`state`],[`id`,`settings-browser-agents-status`,1,`hint`],[`role`,`alert`,1,`error`],[`role`,`status`,1,`sr-only`],[`type`,`button`,1,`action`,3,`click`]],template:function(e,t){if(e&1&&(z(0,`h2`,1),K(1,`Browser agents`),B(),z(2,`p`,2),K(3,` Registers the read-only agent tools on your app's page, so an agent that drives the browser finds them through WebMCP or Chrome DevTools for agents. Any script on the page can call them, so leave this off if the page loads scripts you don't trust. `),B(),z(4,`label`,3)(5,`input`,4,0),U(`change`,function(e){return t.set(e.target.checked)}),B(),z(7,`span`,5),K(8,`Browser agent tools`),B(),z(9,`span`,6),K(10),B()(),z(11,`p`,7),j(12,Ase,1,0)(13,jse,1,0)(14,Pse,2,1)(15,Fse,1,0)(16,Ise,4,1),B(),j(17,Lse,5,1,`div`,8),z(18,`p`,9),K(19),B()),e&2){let e,n;O(5),Pg(`checked`,t.enabled())(`disabled`,!t.canChange()),A(`aria-busy`,t.saving()?`true`:null),O(5),q(t.enabled()?`On`:`Off`),O(2),M((e=t.status())===`connecting`?12:e===`loading`?13:e===`unsupported`?14:e===`failed`?15:16),O(5),M((n=t.error())?17:-1,n),O(2),q(t.announcement())}},styles:[`[_nghost-%COMP%] { display: block; } @@ -20073,7 +20073,7 @@ code[_ngcontent-%COMP%] { .action[_ngcontent-%COMP%]:focus-visible { outline: 2px solid var(--%NS%accent); outline-offset: 2px; -}`]})},Lse=(e,t)=>t.value,Rse=(e,t)=>t.id;function zse(e,t){if(e&1){let e=V();I(0,`label`,25)(1,`input`,26),H(`change`,function(){let t=w(e).$implicit;return T(W().theme.set(t.value))}),L(),I(2,`span`,27),K(3),L(),I(4,`span`,28),K(5),L()()}if(e&2){let e=t.$implicit,n=W();G(`checked`,n.theme()===e.value),O(),F(`value`,e.value)(`checked`,n.theme()===e.value),O(2),q(e.label),O(2),q(e.hint)}}function Bse(e,t){e&1&&(I(0,`span`,32),K(1,`Pinned`),L())}function Vse(e,t){if(e&1){let e=V();I(0,`li`,29),H(`keydown`,function(t){let n=w(e).$implicit;return T(W().onRowKey(t,n.id))}),R(1,`app-tab-icon`,30),I(2,`span`,31),K(3),j(4,Bse,2,0,`span`,32),L(),I(5,`button`,33),H(`click`,function(){let t=w(e).$implicit;return T(W().togglePinned(t.id))}),K(6,` Pin `),L(),I(7,`label`,34)(8,`input`,35),H(`change`,function(t){let n=w(e).$implicit;return T(W().setShown(n.id,t.target.checked))}),L(),I(9,`span`),K(10,`Shown`),L()(),I(11,`span`,36)(12,`button`,37),H(`click`,function(){let t=w(e).$implicit;return T(W().move(t.id,-1))}),E(),I(13,`svg`,38),R(14,`path`,39),L()(),bs(),I(15,`button`,40),H(`click`,function(){let t=w(e).$implicit;return T(W().move(t.id,1))}),E(),I(16,`svg`,38),R(17,`path`,41),L()()()()}if(e&2){let e=t.$implicit,n=W();G(`hidden-tab`,n.isHidden(e.id)),A(`data-tab`,e.id),O(),F(`name`,e.id),O(2),J(` `,e.label,` `),O(),M(n.isPinned(e.id)?4:-1),O(),A(`aria-pressed`,n.isPinned(e.id))(`aria-label`,`Pin `+e.label),O(3),F(`checked`,!n.isHidden(e.id)),A(`aria-label`,e.label+` shown in the tab bar`),O(4),F(`disabled`,!n.canMove(e.id,-1)),A(`aria-label`,`Move `+e.label+` up`),O(3),F(`disabled`,!n.canMove(e.id,1)),A(`aria-label`,`Move `+e.label+` down`)}}function Hse(e,t){e&1&&(K(0,` Press `),I(1,`kbd`),K(2),L(),K(3,` on your app's page to open or close the panel. The button shows while the panel is open. The popup on the page saves this setting. `)),e&2&&(O(2),q(t))}function Use(e,t){e&1&&(K(0,` The popup shortcut is turned off in the devtools config (`),I(1,`code`),K(2,`popup.hotkey`),L(),K(3,`), so the button always shows. `))}function Wse(e,t){e&1&&(I(0,`kbd`),K(1),L()),e&2&&(O(),q(t))}function Gse(e,t){e&1&&K(0,` Off `)}var Kse=[{value:`system`,label:`System`,hint:`Follows the hub, or your system without it`},{value:`light`,label:`Light`,hint:`Always light`},{value:`dark`,label:`Dark`,hint:`Always dark`}],qse=class e{tabs=$([]);layout=Tv(U5);theme=Tv(`system`);passive=Tv(!1);hotkey=$(!1);paletteShortcut=$(`Ctrl+K`);rpc=$(null);themes=Kse;announcement=D(``);host=C(Vl);injector=C(Os);ids=X(()=>this.tabs().map(e=>e.id));orderedTabs=X(()=>{let e=new Map(this.tabs().map(e=>[e.id,e]));return q5(this.ids(),this.layout()).map(t=>e.get(t))});isDefaultLayout=X(()=>{let{order:e,hidden:t,pinned:n}=this.layout(),r=q5(this.ids(),this.layout());return!t.length&&!n.length&&(!e.length||r.every((e,t)=>e===this.ids()[t]))});isPinned(e){return this.layout().pinned.includes(e)}isHidden(e){return this.layout().hidden.includes(e)&&!this.isPinned(e)}canMove(e,t){return J5(this.ids(),this.layout(),e,t)!==this.layout()}move(e,t){let n=J5(this.ids(),this.layout(),e,t);if(n===this.layout())return;this.layout.set(n);let r=q5(this.ids(),n),i=this.label(e);this.say(`${i} moved to position ${r.indexOf(e)+1} of ${r.length}.`),ud(()=>{let n=[...this.host.nativeElement.querySelectorAll(`.tab-row`)].find(t=>t.dataset.tab===e),r=n?.querySelector(`[data-move="${t<0?`up`:`down`}"]`),i=n?.querySelector(`[data-move="${t<0?`down`:`up`}"]`);(r&&!r.disabled?r:i)?.focus()},{injector:this.injector})}onRowKey(e,t){!e.altKey||e.key!==`ArrowUp`&&e.key!==`ArrowDown`||(e.preventDefault(),this.move(t,e.key===`ArrowUp`?-1:1))}togglePinned(e){let t=!this.isPinned(e);this.layout.set(pae(this.ids(),this.layout(),e,t)),this.say(t?`${this.label(e)} pinned.`:`${this.label(e)} unpinned.`)}setShown(e,t){this.layout.set(fae(this.layout(),e,!t)),this.say(t?`${this.label(e)} shown.`:`${this.label(e)} hidden.`)}resetTabs(){this.layout.set(U5),this.say(`Tabs reset to the default order.`)}label(e){return this.tabs().find(t=>t.id===e)?.label??e}say(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-settings`]],inputs:{tabs:[1,`tabs`],layout:[1,`layout`],theme:[1,`theme`],passive:[1,`passive`],hotkey:[1,`hotkey`],paletteShortcut:[1,`paletteShortcut`],rpc:[1,`rpc`]},outputs:{layout:`layoutChange`,theme:`themeChange`,passive:`passiveChange`},decls:67,vars:8,consts:[[1,`intro`],[`aria-labelledby`,`settings-theme`,1,`card`],[`id`,`settings-theme`],[`role`,`radiogroup`,`aria-labelledby`,`settings-theme`,1,`themes`],[1,`theme`,3,`checked`],[`aria-labelledby`,`settings-tabs`,1,`card`],[1,`card-head`],[`id`,`settings-tabs`],[`type`,`button`,1,`action`,3,`click`,`disabled`],[`id`,`settings-tabs-hint`,1,`hint`],[`aria-labelledby`,`settings-tabs`,`aria-describedby`,`settings-tabs-hint`,1,`tab-list`],[1,`tab-row`,3,`hidden-tab`],[`aria-labelledby`,`settings-popup`,1,`card`],[`id`,`settings-popup`],[1,`check`,`wide`],[`type`,`checkbox`,`aria-describedby`,`settings-passive-hint`,3,`change`,`checked`,`disabled`],[`id`,`settings-passive-hint`,1,`hint`],[`aria-labelledby`,`settings-browser-agents`,1,`card`],[3,`rpc`],[`aria-labelledby`,`settings-keys`,1,`card`],[`id`,`settings-keys`],[1,`keys`],[1,`sr-only`],[`scope`,`col`],[`role`,`status`,1,`sr-only`],[1,`theme`],[`type`,`radio`,`name`,`settings-theme`,3,`change`,`value`,`checked`],[1,`theme-label`],[1,`hint`],[1,`tab-row`,3,`keydown`],[3,`name`],[1,`tab-label`],[1,`tag`],[`type`,`button`,1,`action`,`small`,3,`click`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[1,`moves`],[`type`,`button`,`data-move`,`up`,1,`icon`,3,`click`,`disabled`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`m6 15 6-6 6 6`],[`type`,`button`,`data-move`,`down`,1,`icon`,3,`click`,`disabled`],[`d`,`m6 9 6 6 6-6`]],template:function(e,t){if(e&1&&(I(0,`p`,0),K(1,` Settings for this panel in this browser. They are saved in the browser's local storage, so every panel on this address uses them. Browser agents is the exception: the dev server keeps it for every page and panel. `),L(),I(2,`section`,1)(3,`h2`,2),K(4,`Theme`),L(),I(5,`div`,3),N(6,zse,6,6,`label`,4,Lse),L()(),I(8,`section`,5)(9,`div`,6)(10,`h2`,7),K(11,`Tabs`),L(),I(12,`button`,8),H(`click`,function(){return t.resetTabs()}),K(13,` Reset tabs `),L()(),I(14,`p`,9),K(15,` Pinned tabs come first in the tab bar. Hidden tabs stay reachable from the command palette and from links. Use the arrow buttons, or `),I(16,`kbd`),K(17,`Alt`),L(),K(18,` with `),I(19,`kbd`),K(20,`↑`),L(),K(21,` and `),I(22,`kbd`),K(23,`↓`),L(),K(24,` on a row, to change the order. `),L(),I(25,`ol`,10),N(26,Vse,18,14,`li`,11,Rse),L()(),I(28,`section`,12)(29,`h2`,13),K(30,`Popup on the page`),L(),I(31,`label`,14)(32,`input`,15),H(`change`,function(e){return t.passive.set(e.target.checked)}),L(),I(33,`span`),K(34,`Passive mode: hide the floating button until the shortcut is pressed`),L()(),I(35,`p`,16),j(36,Hse,4,1)(37,Use,4,0),L()(),I(38,`section`,17),R(39,`app-browser-tools-setting`,18),L(),I(40,`section`,19)(41,`h2`,20),K(42,`Keyboard shortcuts`),L(),I(43,`table`,21)(44,`caption`,22),K(45,` Keyboard shortcuts `),L(),I(46,`thead`)(47,`tr`)(48,`th`,23),K(49,`Shortcut`),L(),I(50,`th`,23),K(51,`Action`),L()()(),I(52,`tbody`)(53,`tr`)(54,`td`)(55,`kbd`),K(56),L()(),I(57,`td`),K(58,`Open the command palette in the panel`),L()(),I(59,`tr`)(60,`td`),j(61,Wse,2,1,`kbd`)(62,Gse,1,0),L(),I(63,`td`),K(64,`Open or close the popup on your app's page`),L()()()()(),I(65,`p`,24),K(66),L()),e&2){let e,n;O(6),P(t.themes),O(6),F(`disabled`,t.isDefaultLayout()),O(14),P(t.orderedTabs()),O(6),F(`checked`,t.passive())(`disabled`,t.hotkey()===!1),O(4),M((e=t.hotkey())?36:37,e),O(3),F(`rpc`,t.rpc()),O(17),q(t.paletteShortcut()),O(5),M((n=t.hotkey())?61:62,n),O(5),q(t.announcement())}},dependencies:[Ise,HE],styles:[`[_nghost-%COMP%] { +}`]})},zse=(e,t)=>t.value,Bse=(e,t)=>t.id;function Vse(e,t){if(e&1){let e=V();I(0,`label`,25)(1,`input`,26),H(`change`,function(){let t=w(e).$implicit;return T(W().theme.set(t.value))}),L(),I(2,`span`,27),K(3),L(),I(4,`span`,28),K(5),L()()}if(e&2){let e=t.$implicit,n=W();G(`checked`,n.theme()===e.value),O(),F(`value`,e.value)(`checked`,n.theme()===e.value),O(2),q(e.label),O(2),q(e.hint)}}function Hse(e,t){e&1&&(I(0,`span`,32),K(1,`Pinned`),L())}function Use(e,t){if(e&1){let e=V();I(0,`li`,29),H(`keydown`,function(t){let n=w(e).$implicit;return T(W().onRowKey(t,n.id))}),R(1,`app-tab-icon`,30),I(2,`span`,31),K(3),j(4,Hse,2,0,`span`,32),L(),I(5,`button`,33),H(`click`,function(){let t=w(e).$implicit;return T(W().togglePinned(t.id))}),K(6,` Pin `),L(),I(7,`label`,34)(8,`input`,35),H(`change`,function(t){let n=w(e).$implicit;return T(W().setShown(n.id,t.target.checked))}),L(),I(9,`span`),K(10,`Shown`),L()(),I(11,`span`,36)(12,`button`,37),H(`click`,function(){let t=w(e).$implicit;return T(W().move(t.id,-1))}),E(),I(13,`svg`,38),R(14,`path`,39),L()(),bs(),I(15,`button`,40),H(`click`,function(){let t=w(e).$implicit;return T(W().move(t.id,1))}),E(),I(16,`svg`,38),R(17,`path`,41),L()()()()}if(e&2){let e=t.$implicit,n=W();G(`hidden-tab`,n.isHidden(e.id)),A(`data-tab`,e.id),O(),F(`name`,e.id),O(2),J(` `,e.label,` `),O(),M(n.isPinned(e.id)?4:-1),O(),A(`aria-pressed`,n.isPinned(e.id))(`aria-label`,`Pin `+e.label),O(3),F(`checked`,!n.isHidden(e.id)),A(`aria-label`,e.label+` shown in the tab bar`),O(4),F(`disabled`,!n.canMove(e.id,-1)),A(`aria-label`,`Move `+e.label+` up`),O(3),F(`disabled`,!n.canMove(e.id,1)),A(`aria-label`,`Move `+e.label+` down`)}}function Wse(e,t){e&1&&(K(0,` Press `),I(1,`kbd`),K(2),L(),K(3,` on your app's page to open or close the panel. The button shows while the panel is open. The popup on the page saves this setting. `)),e&2&&(O(2),q(t))}function Gse(e,t){e&1&&(K(0,` The popup shortcut is turned off in the devtools config (`),I(1,`code`),K(2,`popup.hotkey`),L(),K(3,`), so the button always shows. `))}function Kse(e,t){e&1&&(I(0,`kbd`),K(1),L()),e&2&&(O(),q(t))}function qse(e,t){e&1&&K(0,` Off `)}var Jse=[{value:`system`,label:`System`,hint:`Follows the hub, or your system without it`},{value:`light`,label:`Light`,hint:`Always light`},{value:`dark`,label:`Dark`,hint:`Always dark`}],Yse=class e{tabs=$([]);layout=Tv(U5);theme=Tv(`system`);passive=Tv(!1);hotkey=$(!1);paletteShortcut=$(`Ctrl+K`);rpc=$(null);themes=Jse;announcement=D(``);host=C(Vl);injector=C(Os);ids=X(()=>this.tabs().map(e=>e.id));orderedTabs=X(()=>{let e=new Map(this.tabs().map(e=>[e.id,e]));return q5(this.ids(),this.layout()).map(t=>e.get(t))});isDefaultLayout=X(()=>{let{order:e,hidden:t,pinned:n}=this.layout(),r=q5(this.ids(),this.layout());return!t.length&&!n.length&&(!e.length||r.every((e,t)=>e===this.ids()[t]))});isPinned(e){return this.layout().pinned.includes(e)}isHidden(e){return this.layout().hidden.includes(e)&&!this.isPinned(e)}canMove(e,t){return J5(this.ids(),this.layout(),e,t)!==this.layout()}move(e,t){let n=J5(this.ids(),this.layout(),e,t);if(n===this.layout())return;this.layout.set(n);let r=q5(this.ids(),n),i=this.label(e);this.say(`${i} moved to position ${r.indexOf(e)+1} of ${r.length}.`),ud(()=>{let n=[...this.host.nativeElement.querySelectorAll(`.tab-row`)].find(t=>t.dataset.tab===e),r=n?.querySelector(`[data-move="${t<0?`up`:`down`}"]`),i=n?.querySelector(`[data-move="${t<0?`down`:`up`}"]`);(r&&!r.disabled?r:i)?.focus()},{injector:this.injector})}onRowKey(e,t){!e.altKey||e.key!==`ArrowUp`&&e.key!==`ArrowDown`||(e.preventDefault(),this.move(t,e.key===`ArrowUp`?-1:1))}togglePinned(e){let t=!this.isPinned(e);this.layout.set(gae(this.ids(),this.layout(),e,t)),this.say(t?`${this.label(e)} pinned.`:`${this.label(e)} unpinned.`)}setShown(e,t){this.layout.set(hae(this.layout(),e,!t)),this.say(t?`${this.label(e)} shown.`:`${this.label(e)} hidden.`)}resetTabs(){this.layout.set(U5),this.say(`Tabs reset to the default order.`)}label(e){return this.tabs().find(t=>t.id===e)?.label??e}say(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-settings`]],inputs:{tabs:[1,`tabs`],layout:[1,`layout`],theme:[1,`theme`],passive:[1,`passive`],hotkey:[1,`hotkey`],paletteShortcut:[1,`paletteShortcut`],rpc:[1,`rpc`]},outputs:{layout:`layoutChange`,theme:`themeChange`,passive:`passiveChange`},decls:67,vars:8,consts:[[1,`intro`],[`aria-labelledby`,`settings-theme`,1,`card`],[`id`,`settings-theme`],[`role`,`radiogroup`,`aria-labelledby`,`settings-theme`,1,`themes`],[1,`theme`,3,`checked`],[`aria-labelledby`,`settings-tabs`,1,`card`],[1,`card-head`],[`id`,`settings-tabs`],[`type`,`button`,1,`action`,3,`click`,`disabled`],[`id`,`settings-tabs-hint`,1,`hint`],[`aria-labelledby`,`settings-tabs`,`aria-describedby`,`settings-tabs-hint`,1,`tab-list`],[1,`tab-row`,3,`hidden-tab`],[`aria-labelledby`,`settings-popup`,1,`card`],[`id`,`settings-popup`],[1,`check`,`wide`],[`type`,`checkbox`,`aria-describedby`,`settings-passive-hint`,3,`change`,`checked`,`disabled`],[`id`,`settings-passive-hint`,1,`hint`],[`aria-labelledby`,`settings-browser-agents`,1,`card`],[3,`rpc`],[`aria-labelledby`,`settings-keys`,1,`card`],[`id`,`settings-keys`],[1,`keys`],[1,`sr-only`],[`scope`,`col`],[`role`,`status`,1,`sr-only`],[1,`theme`],[`type`,`radio`,`name`,`settings-theme`,3,`change`,`value`,`checked`],[1,`theme-label`],[1,`hint`],[1,`tab-row`,3,`keydown`],[3,`name`],[1,`tab-label`],[1,`tag`],[`type`,`button`,1,`action`,`small`,3,`click`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[1,`moves`],[`type`,`button`,`data-move`,`up`,1,`icon`,3,`click`,`disabled`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`m6 15 6-6 6 6`],[`type`,`button`,`data-move`,`down`,1,`icon`,3,`click`,`disabled`],[`d`,`m6 9 6 6 6-6`]],template:function(e,t){if(e&1&&(I(0,`p`,0),K(1,` Settings for this panel in this browser. They are saved in the browser's local storage, so every panel on this address uses them. Browser agents is the exception: the dev server keeps it for every page and panel. `),L(),I(2,`section`,1)(3,`h2`,2),K(4,`Theme`),L(),I(5,`div`,3),N(6,Vse,6,6,`label`,4,zse),L()(),I(8,`section`,5)(9,`div`,6)(10,`h2`,7),K(11,`Tabs`),L(),I(12,`button`,8),H(`click`,function(){return t.resetTabs()}),K(13,` Reset tabs `),L()(),I(14,`p`,9),K(15,` Pinned tabs come first in the tab bar. Hidden tabs stay reachable from the command palette and from links. Use the arrow buttons, or `),I(16,`kbd`),K(17,`Alt`),L(),K(18,` with `),I(19,`kbd`),K(20,`↑`),L(),K(21,` and `),I(22,`kbd`),K(23,`↓`),L(),K(24,` on a row, to change the order. `),L(),I(25,`ol`,10),N(26,Use,18,14,`li`,11,Bse),L()(),I(28,`section`,12)(29,`h2`,13),K(30,`Popup on the page`),L(),I(31,`label`,14)(32,`input`,15),H(`change`,function(e){return t.passive.set(e.target.checked)}),L(),I(33,`span`),K(34,`Passive mode: hide the floating button until the shortcut is pressed`),L()(),I(35,`p`,16),j(36,Wse,4,1)(37,Gse,4,0),L()(),I(38,`section`,17),R(39,`app-browser-tools-setting`,18),L(),I(40,`section`,19)(41,`h2`,20),K(42,`Keyboard shortcuts`),L(),I(43,`table`,21)(44,`caption`,22),K(45,` Keyboard shortcuts `),L(),I(46,`thead`)(47,`tr`)(48,`th`,23),K(49,`Shortcut`),L(),I(50,`th`,23),K(51,`Action`),L()()(),I(52,`tbody`)(53,`tr`)(54,`td`)(55,`kbd`),K(56),L()(),I(57,`td`),K(58,`Open the command palette in the panel`),L()(),I(59,`tr`)(60,`td`),j(61,Kse,2,1,`kbd`)(62,qse,1,0),L(),I(63,`td`),K(64,`Open or close the popup on your app's page`),L()()()()(),I(65,`p`,24),K(66),L()),e&2){let e,n;O(6),P(t.themes),O(6),F(`disabled`,t.isDefaultLayout()),O(14),P(t.orderedTabs()),O(6),F(`checked`,t.passive())(`disabled`,t.hotkey()===!1),O(4),M((e=t.hotkey())?36:37,e),O(3),F(`rpc`,t.rpc()),O(17),q(t.paletteShortcut()),O(5),M((n=t.hotkey())?61:62,n),O(5),q(t.announcement())}},dependencies:[Rse,HE],styles:[`[_nghost-%COMP%] { display: block; max-width: 760px; } @@ -20333,7 +20333,7 @@ code[_ngcontent-%COMP%] { padding: 8px; border-top: 1px solid var(--%NS%border); color: var(--%NS%text); -}`]})};function q9(e,t){let n=e.toLowerCase(),r=t.toLowerCase().replace(/\s+/g,``);if(!r)return 0;let i=0,a=0,o=-2;for(let e of r){let t=n.indexOf(e,a);if(t<0)return-1;let r=t===0||/[\s:&/-]/.test(n[t-1]);i+=1,t===o+1&&(i+=3),r&&(i+=4),o=t,a=t+1}return i-n.length/100}function Jse(e,t){let n=t.trim();return n?e.map((e,t)=>{let r=q9(e.title,n),i=q9(`${e.group} ${e.keywords??``}`,n);return{command:e,index:t,score:Math.max(r>=0?r+10:-1,i)}}).filter(e=>e.score>=0).sort((e,t)=>t.score-e.score||e.index-t.index).map(e=>e.command):[...e]}var Yse=[`input`],Xse=(e,t)=>t.id;function Zse(e,t){if(e&1&&(z(0,`kbd`),K(1),B()),e&2){let e=W().$implicit;O(),q(e.shortcut)}}function Qse(e,t){if(e&1){let e=V();z(0,`li`,14),U(`pointermove`,function(){let t=w(e).$index;return T(W(2).active.set(t))})(`click`,function(){let t=w(e).$implicit;return T(W(2).run(t))}),z(1,`span`,15),K(2),B(),j(3,Zse,2,1,`kbd`),z(4,`span`,16),K(5),B()()}if(e&2){let e=t.$implicit,n=t.$index,r=W(2);G(`active`,n===r.active()),A(`id`,r.uid+`-opt-`+n)(`aria-selected`,n===r.active()),O(2),q(e.title),O(),M(e.shortcut?3:-1),O(2),q(e.group)}}function $se(e,t){if(e&1&&(z(0,`p`,11),K(1),B()),e&2){let e=W(2);O(),J(`No commands match “`,e.query().trim(),`”.`)}}function ece(e,t){if(e&1){let e=V();z(0,`div`,1),U(`pointerdown`,function(){return w(e),T(W().close())}),B(),z(1,`div`,2),U(`keydown`,function(t){return w(e),T(W().onKey(t))}),z(2,`h2`,3),K(3,`Command palette`),B(),z(4,`div`,4),E(),z(5,`svg`,5),Og(6,`circle`,6)(7,`path`,7),B(),bs(),z(8,`input`,8,0),U(`input`,function(t){return w(e),T(W().query.set(t.target.value))}),B()(),z(10,`ul`,9),U(`pointerdown`,function(e){return e.preventDefault()}),N(11,Qse,6,7,`li`,10,Xse),B(),j(13,$se,2,1,`p`,11),z(14,`p`,12)(15,`kbd`),K(16,`↑`),B(),z(17,`kbd`),K(18,`↓`),B(),K(19,` to move, `),z(20,`kbd`),K(21,`Enter`),B(),K(22,` to run, `),z(23,`kbd`),K(24,`Esc`),B(),K(25,` to close `),B(),z(26,`p`,13),K(27),B()()}if(e&2){let e=W();O(),A(`aria-labelledby`,e.uid+`-title`),O(),A(`id`,e.uid+`-title`),O(6),Pg(`value`,e.query()),A(`aria-controls`,e.uid+`-list`)(`aria-activedescendant`,e.activeId())(`aria-describedby`,e.uid+`-help`),O(2),Pg(`hidden`,!e.results().length),A(`id`,e.uid+`-list`),O(),P(e.results()),O(2),M(e.results().length?-1:13),O(),A(`id`,e.uid+`-help`),O(13),q(e.status())}}var tce=0,nce=class e{commands=$([]);open=Tv(!1);picked=bv();uid=`cp${tce++}`;query=D(``);results=X(()=>Jse(this.commands(),this.query()));active=Q(()=>this.results().length?0:-1);activeId=X(()=>this.active()>=0?`${this.uid}-opt-${this.active()}`:null);status=X(()=>{let e=this.results().length;return e?`${e} ${e===1?`command`:`commands`}.`:`No commands match.`});input=Dv(`input`);injector=C(Os);returnFocus=null;constructor(){_c(()=>{this.open()&&Z(()=>{let e=document.activeElement;this.returnFocus=e instanceof HTMLElement&&e!==document.body?e:null,this.query.set(``),ud(()=>this.input()?.nativeElement.focus(),{injector:this.injector})})})}close(e){if(!this.open())return;this.open.set(!1);let t=this.returnFocus;this.returnFocus=null,ud(()=>{t?.isConnected&&t.focus(),e?.()},{injector:this.injector})}run(e){this.close(()=>this.picked.emit(e.id))}onKey(e){let t=this.results().length;switch(e.key){case`ArrowDown`:case`ArrowUp`:{if(e.preventDefault(),!t)return;let n=e.key===`ArrowDown`?1:-1;this.active.set((this.active()+n+t)%t),this.reveal();return}case`PageDown`:case`PageUp`:if(e.preventDefault(),!t)return;this.active.set(e.key===`PageDown`?t-1:0),this.reveal();return;case`Enter`:{e.preventDefault();let t=this.results()[this.active()];t&&this.run(t);return}case`Escape`:e.preventDefault(),e.stopPropagation(),this.close();return;case`Tab`:e.preventDefault();return}}reveal(){ud(()=>{let e=this.activeId();e&&document.getElementById(e)?.scrollIntoView?.({block:`nearest`})},{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-command-palette`]],viewQuery:function(e,t){e&1&&Xg(t.input,Yse,5),e&2&&Zg()},inputs:{commands:[1,`commands`],open:[1,`open`]},outputs:{open:`openChange`,picked:`picked`},decls:1,vars:1,consts:[[`input`,``],[`aria-hidden`,`true`,1,`backdrop`,3,`pointerdown`],[`role`,`dialog`,`aria-modal`,`true`,1,`palette`,3,`keydown`],[1,`sr-only`],[1,`field`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`text`,`role`,`combobox`,`aria-autocomplete`,`list`,`aria-expanded`,`true`,`autocomplete`,`off`,`spellcheck`,`false`,`placeholder`,`Type a command or a tab…`,`aria-label`,`Command`,3,`input`,`value`],[`role`,`listbox`,`aria-label`,`Commands`,1,`list`,3,`pointerdown`,`hidden`],[`role`,`option`,3,`active`],[1,`empty`],[1,`help`],[`role`,`status`,1,`sr-only`],[`role`,`option`,3,`pointermove`,`click`],[1,`title`],[1,`group`]],template:function(e,t){e&1&&j(0,ece,28,11),e&2&&M(t.open()?0:-1)},styles:[`.backdrop[_ngcontent-%COMP%] { +}`]})};function J9(e,t){let n=e.toLowerCase(),r=t.toLowerCase().replace(/\s+/g,``);if(!r)return 0;let i=0,a=0,o=-2;for(let e of r){let t=n.indexOf(e,a);if(t<0)return-1;let r=t===0||/[\s:&/-]/.test(n[t-1]);i+=1,t===o+1&&(i+=3),r&&(i+=4),o=t,a=t+1}return i-n.length/100}function Xse(e,t){let n=t.trim();return n?e.map((e,t)=>{let r=J9(e.title,n),i=J9(`${e.group} ${e.keywords??``}`,n);return{command:e,index:t,score:Math.max(r>=0?r+10:-1,i)}}).filter(e=>e.score>=0).sort((e,t)=>t.score-e.score||e.index-t.index).map(e=>e.command):[...e]}var Zse=[`input`],Qse=(e,t)=>t.id;function $se(e,t){if(e&1&&(z(0,`kbd`),K(1),B()),e&2){let e=W().$implicit;O(),q(e.shortcut)}}function ece(e,t){if(e&1){let e=V();z(0,`li`,14),U(`pointermove`,function(){let t=w(e).$index;return T(W(2).active.set(t))})(`click`,function(){let t=w(e).$implicit;return T(W(2).run(t))}),z(1,`span`,15),K(2),B(),j(3,$se,2,1,`kbd`),z(4,`span`,16),K(5),B()()}if(e&2){let e=t.$implicit,n=t.$index,r=W(2);G(`active`,n===r.active()),A(`id`,r.uid+`-opt-`+n)(`aria-selected`,n===r.active()),O(2),q(e.title),O(),M(e.shortcut?3:-1),O(2),q(e.group)}}function tce(e,t){if(e&1&&(z(0,`p`,11),K(1),B()),e&2){let e=W(2);O(),J(`No commands match “`,e.query().trim(),`”.`)}}function nce(e,t){if(e&1){let e=V();z(0,`div`,1),U(`pointerdown`,function(){return w(e),T(W().close())}),B(),z(1,`div`,2),U(`keydown`,function(t){return w(e),T(W().onKey(t))}),z(2,`h2`,3),K(3,`Command palette`),B(),z(4,`div`,4),E(),z(5,`svg`,5),Og(6,`circle`,6)(7,`path`,7),B(),bs(),z(8,`input`,8,0),U(`input`,function(t){return w(e),T(W().query.set(t.target.value))}),B()(),z(10,`ul`,9),U(`pointerdown`,function(e){return e.preventDefault()}),N(11,ece,6,7,`li`,10,Qse),B(),j(13,tce,2,1,`p`,11),z(14,`p`,12)(15,`kbd`),K(16,`↑`),B(),z(17,`kbd`),K(18,`↓`),B(),K(19,` to move, `),z(20,`kbd`),K(21,`Enter`),B(),K(22,` to run, `),z(23,`kbd`),K(24,`Esc`),B(),K(25,` to close `),B(),z(26,`p`,13),K(27),B()()}if(e&2){let e=W();O(),A(`aria-labelledby`,e.uid+`-title`),O(),A(`id`,e.uid+`-title`),O(6),Pg(`value`,e.query()),A(`aria-controls`,e.uid+`-list`)(`aria-activedescendant`,e.activeId())(`aria-describedby`,e.uid+`-help`),O(2),Pg(`hidden`,!e.results().length),A(`id`,e.uid+`-list`),O(),P(e.results()),O(2),M(e.results().length?-1:13),O(),A(`id`,e.uid+`-help`),O(13),q(e.status())}}var rce=0,ice=class e{commands=$([]);open=Tv(!1);picked=bv();uid=`cp${rce++}`;query=D(``);results=X(()=>Xse(this.commands(),this.query()));active=Q(()=>this.results().length?0:-1);activeId=X(()=>this.active()>=0?`${this.uid}-opt-${this.active()}`:null);status=X(()=>{let e=this.results().length;return e?`${e} ${e===1?`command`:`commands`}.`:`No commands match.`});input=Dv(`input`);injector=C(Os);returnFocus=null;constructor(){_c(()=>{this.open()&&Z(()=>{let e=document.activeElement;this.returnFocus=e instanceof HTMLElement&&e!==document.body?e:null,this.query.set(``),ud(()=>this.input()?.nativeElement.focus(),{injector:this.injector})})})}close(e){if(!this.open())return;this.open.set(!1);let t=this.returnFocus;this.returnFocus=null,ud(()=>{t?.isConnected&&t.focus(),e?.()},{injector:this.injector})}run(e){this.close(()=>this.picked.emit(e.id))}onKey(e){let t=this.results().length;switch(e.key){case`ArrowDown`:case`ArrowUp`:{if(e.preventDefault(),!t)return;let n=e.key===`ArrowDown`?1:-1;this.active.set((this.active()+n+t)%t),this.reveal();return}case`PageDown`:case`PageUp`:if(e.preventDefault(),!t)return;this.active.set(e.key===`PageDown`?t-1:0),this.reveal();return;case`Enter`:{e.preventDefault();let t=this.results()[this.active()];t&&this.run(t);return}case`Escape`:e.preventDefault(),e.stopPropagation(),this.close();return;case`Tab`:e.preventDefault();return}}reveal(){ud(()=>{let e=this.activeId();e&&document.getElementById(e)?.scrollIntoView?.({block:`nearest`})},{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-command-palette`]],viewQuery:function(e,t){e&1&&Xg(t.input,Zse,5),e&2&&Zg()},inputs:{commands:[1,`commands`],open:[1,`open`]},outputs:{open:`openChange`,picked:`picked`},decls:1,vars:1,consts:[[`input`,``],[`aria-hidden`,`true`,1,`backdrop`,3,`pointerdown`],[`role`,`dialog`,`aria-modal`,`true`,1,`palette`,3,`keydown`],[1,`sr-only`],[1,`field`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`text`,`role`,`combobox`,`aria-autocomplete`,`list`,`aria-expanded`,`true`,`autocomplete`,`off`,`spellcheck`,`false`,`placeholder`,`Type a command or a tab…`,`aria-label`,`Command`,3,`input`,`value`],[`role`,`listbox`,`aria-label`,`Commands`,1,`list`,3,`pointerdown`,`hidden`],[`role`,`option`,3,`active`],[1,`empty`],[1,`help`],[`role`,`status`,1,`sr-only`],[`role`,`option`,3,`pointermove`,`click`],[1,`title`],[1,`group`]],template:function(e,t){e&1&&j(0,nce,28,11),e&2&&M(t.open()?0:-1)},styles:[`.backdrop[_ngcontent-%COMP%] { position: fixed; inset: 0; z-index: 100; @@ -20474,7 +20474,7 @@ kbd[_ngcontent-%COMP%] { .help[_ngcontent-%COMP%] { display: none; } -}`]})},rce=[`nav`],ice=[`main`],ace=e=>[e],oce=(e,t)=>t.id;function sce(e,t){e&1&&(E(),I(0,`svg`,4),R(1,`path`,32),L())}function cce(e,t){e&1&&(E(),I(0,`svg`,4),R(1,`path`,33)(2,`path`,34)(3,`path`,35)(4,`path`,36)(5,`path`,37)(6,`path`,38),L())}function lce(e,t){e&1&&(E(),I(0,`svg`,5)(1,`defs`)(2,`linearGradient`,39),R(3,`stop`,40)(4,`stop`,41),L()(),R(5,`path`,42),I(6,`g`,43),R(7,`path`,44)(8,`path`,45)(9,`path`,46)(10,`path`,47),L()())}function uce(e,t){e&1&&(E(),I(0,`svg`,6),R(1,`path`,48)(2,`path`,49)(3,`path`,50)(4,`path`,51),L())}function dce(e,t){e&1&&(E(),I(0,`svg`,7),R(1,`path`,52),L())}function fce(e,t){e&1&&(E(),I(0,`svg`,8)(1,`defs`)(2,`linearGradient`,53),R(3,`stop`,54)(4,`stop`,55)(5,`stop`,56)(6,`stop`,57)(7,`stop`,58)(8,`stop`,59),L()(),R(9,`path`,60),L())}function pce(e,t){e&1&&(E(),I(0,`svg`,9),R(1,`rect`,61),I(2,`g`,62)(3,`defs`)(4,`mask`,63),R(5,`rect`,64),I(6,`g`,65),R(7,`path`,66)(8,`path`,67),L()(),I(9,`clipPath`,68),R(10,`rect`,69),L()(),I(11,`g`,70),R(12,`ellipse`,71),L(),I(13,`g`,72),R(14,`path`,73)(15,`path`,74),L(),I(16,`g`,70),R(17,`ellipse`,75)(18,`ellipse`,76),I(19,`g`,77),R(20,`line`,78)(21,`circle`,79)(22,`line`,80)(23,`circle`,81),L()()()())}function mce(e,t){if(e&1){let e=V();I(0,`button`,83),H(`click`,function(){let t=w(e).$implicit;return T(W(2).switchTab(t.id))}),R(1,`app-tab-icon`,84),I(2,`span`),K(3),L()()}if(e&2){let e=t.$implicit,n=W(2);G(`active`,n.tab()===e.id),A(`aria-current`,n.tab()===e.id?`page`:null)(`tabindex`,n.rovingTab()===e.id?0:-1),O(),F(`name`,e.id),O(2),q(e.label)}}function J9(e,t){if(e&1&&(I(0,`div`,12),N(1,mce,4,6,`button`,82,oce),L()),e&2){let e=W();O(),P(e.tabs())}}function hce(e,t){if(e&1){let e=V();I(0,`a`,85),H(`click`,function(t){let n=w(e);return T(W().openFullPanel(t,n.tab))}),E(),I(1,`svg`,86),R(2,`rect`,87)(3,`rect`,88)(4,`rect`,89)(5,`rect`,90),L(),K(6,` Open full panel `),L()}e&2&&F(`href`,t.href,ku)}function gce(e,t){if(e&1){let e=V();I(0,`app-settings`,91),H(`layoutChange`,function(t){return w(e),T(W().setTabLayout(t))})(`themeChange`,function(t){return w(e),T(W().setTheme(t))})(`passiveChange`,function(t){return w(e),T(W().setPassive(t))}),L()}if(e&2){let e=W();F(`tabs`,e.settingsTabs())(`layout`,e.tabLayout())(`theme`,e.themePreference())(`passive`,e.passive())(`hotkey`,e.popupHotkey())(`paletteShortcut`,e.paletteShortcut)(`rpc`,e.rpc())}}function _ce(e,t){e&1&&R(0,`app-auth-code`,26),e&2&&F(`client`,t)}function vce(e,t){if(e&1){let e=V();I(0,`div`,27)(1,`p`),K(2,` Can't reach the devtools server. Check that the dev server is running. The panel keeps trying to connect. `),L(),I(3,`button`,83),H(`click`,function(){return w(e),T(W().retryConnection())}),K(4,`Retry now`),L()()}}function yce(e,t){e&1&&(I(0,`p`,28),K(1,`Connecting to the devtools server…`),L())}function bce(e,t){e&1&&R(0,`app-coming-soon`,29),e&2&&F(`info`,t)}function xce(e,t){e&1&&(I(0,`p`,28),K(1,`Looking for an Angular Native app…`),L())}function Sce(e,t){e&1&&(K(0,` To turn it on, set `),I(1,`code`),K(2),L(),K(3,` in the devtools options. `)),e&2&&(O(2),q(t))}function Cce(e,t){if(e&1&&(I(0,`p`,30),K(1,` This inspector is turned off in the devtools config (`),I(2,`code`),K(3,`inspectors`),L(),K(4,`). `),j(5,Sce,4,1),I(6,`a`,92),K(7,`About inspectors`),I(8,`span`,93),K(9,` (opens in a new tab)`),L()()()),e&2){let e,t=W();O(5),M((e=t.turnOnSnippet())?5:-1,e),O(),F(`href`,t.inspectorsDocsUrl,ku)}}function wce(e,t){if(e&1){let e=V();I(0,`app-dashboard`,100),H(`navigate`,function(t){return w(e),T(W(3).switchTab(t))}),L()}e&2&&F(`rpc`,W(3).rpc())}function Tce(e,t){if(e&1){let e=V();I(0,`app-timeline`,101),H(`open`,function(t){return w(e),T(W(3).openLink(t))}),L()}e&2&&F(`rpc`,W(3).rpc())}function Ece(e,t){if(e&1){let e=V();I(0,`app-audit-inspector`,102),H(`showComponent`,function(t){return w(e),T(W(3).showComponent(t))}),L()}if(e&2){let e=W(3);F(`rpc`,e.rpc())(`canShowComponent`,e.config().inspectors.components)}}function Dce(e,t){if(e&1){let e=V();I(0,`app-component-tree`,103),H(`focusHandled`,function(){return w(e),T(W(3).componentFocus.set(null))})(`commandHandled`,function(){return w(e),T(W(3).componentCommand.set(null))})(`showForm`,function(t){return w(e),T(W(3).showForm(t))})(`showInjector`,function(t){return w(e),T(W(3).showInjector(t))}),L()}if(e&2){let e=W(3);F(`rpc`,e.rpc())(`focus`,e.componentFocus())(`command`,e.componentCommand())(`canShowInjector`,e.config().inspectors.injectors)}}function Oce(e,t){if(e&1){let e=V();I(0,`app-route-inspector`,104),H(`showComponent`,function(t){return w(e),T(W(3).showComponent(t))}),L()}e&2&&F(`rpc`,W(3).rpc())}function kce(e,t){e&1&&R(0,`app-signal-inspector`,94),e&2&&F(`rpc`,W(3).rpc())}function Ace(e,t){if(e&1){let e=V();I(0,`app-di-inspector`,105),H(`focusHandled`,function(){return w(e),T(W(3).injectorFocus.set(null))})(`showComponent`,function(t){return w(e),T(W(3).showComponent(t))}),L()}if(e&2){let e=W(3);F(`rpc`,e.rpc())(`focus`,e.injectorFocus())(`canShowComponent`,e.config().inspectors.components)}}function jce(e,t){e&1&&R(0,`app-store-inspector`,94),e&2&&F(`rpc`,W(3).rpc())}function Mce(e,t){e&1&&R(0,`app-query-inspector`,94),e&2&&F(`rpc`,W(3).rpc())}function Nce(e,t){e&1&&R(0,`app-network-inspector`,94),e&2&&F(`rpc`,W(3).rpc())}function Pce(e,t){if(e&1){let e=V();I(0,`app-forms-inspector`,106),H(`focusHandled`,function(){return w(e),T(W(3).formFocus.set(null))}),L()}if(e&2){let e=W(3);F(`rpc`,e.rpc())(`focus`,e.formFocus())}}function Fce(e,t){e&1&&R(0,`app-pipes-inspector`,94),e&2&&F(`rpc`,W(3).rpc())}function Ice(e,t){e&1&&R(0,`app-analog-inspector`,94),e&2&&F(`rpc`,W(3).rpc())}function Lce(e,t){e&1&&R(0,`app-capacitor-inspector`,94),e&2&&F(`rpc`,W(3).rpc())}function Rce(e,t){e&1&&R(0,`app-plugins-inspector`,94),e&2&&F(`rpc`,W(3).rpc())}function zce(e,t){if(e&1){let e=V();I(0,`app-errors-inspector`,107),H(`showComponent`,function(t){return w(e),T(W(3).showComponent(t))}),L()}if(e&2){let e=W(3);F(`rpc`,e.rpc())(`canShowComponent`,e.config().inspectors.components)(`canExplainInjection`,e.config().inspectors.injectors)}}function Bce(e,t){if(e&1&&j(0,wce,1,1,`app-dashboard`,94)(1,Tce,1,1,`app-timeline`,94)(2,Ece,1,2,`app-audit-inspector`,95)(3,Dce,1,4,`app-component-tree`,96)(4,Oce,1,1,`app-route-inspector`,94)(5,kce,1,1,`app-signal-inspector`,94)(6,Ace,1,3,`app-di-inspector`,97)(7,jce,1,1,`app-store-inspector`,94)(8,Mce,1,1,`app-query-inspector`,94)(9,Nce,1,1,`app-network-inspector`,94)(10,Pce,1,2,`app-forms-inspector`,98)(11,Fce,1,1,`app-pipes-inspector`,94)(12,Ice,1,1,`app-analog-inspector`,94)(13,Lce,1,1,`app-capacitor-inspector`,94)(14,Rce,1,1,`app-plugins-inspector`,94)(15,zce,1,3,`app-errors-inspector`,99),e&2){let e;M((e=W(2).tab())===`dashboard`?0:e===`timeline`?1:e===`audit`?2:e===`components`?3:e===`routes`?4:e===`signals`?5:e===`injectors`?6:e===`store`?7:e===`queries`?8:e===`network`?9:e===`forms`?10:e===`pipes`?11:e===`analog`?12:e===`capacitor`?13:e===`plugins`?14:e===`errors`?15:-1)}}function Vce(e,t){e&1&&N(0,Bce,16,1,null,null,_g),e&2&&P(iv(0,ace,W().scopeKey()))}var Y9=`all`,Hce=[Y9,...Gw],Uce={angular:`Angular`,ngrx:`NgRx Store`,analog:`Analog`,"angular-native":`Angular Native`,nativescript:`NativeScript`,capacitor:`Capacitor`},X9={ngrx:`store`,analog:`analog`,capacitor:`capacitor`},Z9={store:`ngrx`,analog:`analog`,capacitor:`capacitor`},Q9={"angular-native":[`components`,`signals`,`injectors`,`store`,`queries`,`pipes`,`errors`]},Wce={id:`nativescript`,name:`NativeScript`,badge:`Available`,heading:`Inspect NativeScript apps`,summary:`A NativeScript Angular app reports from the simulator or device to this server, and its components, signals, injectors and NgRx stores show up in the Angular dock.`,color:`#3c5afd`,plansTitle:`Set up an app`,plans:[`Install @pangular-inspector/devtools and @valor/nativescript-websockets`,`Call initNativeScriptOverlay() in main.ts, before the app bootstraps`,`Run npx pangular dev --no-auth in the app, then open the Angular dock`],link:{label:`NativeScript setup guide`,href:`https://pangular-inspector.dev/guides/nativescript/`}},Gce={id:`capacitor`,name:`Capacitor`,badge:`Available`,heading:`Inspect Capacitor apps`,summary:`An Ionic or Capacitor app runs the browser overlay in its WebView and reports to this server, so it shows up in the Angular dock like a browser tab.`,color:`#119eff`,plansTitle:`Set up an app`,plans:[`With live reload on localhost, load @pangular-inspector/devtools/overlay as in a browser`,`In a bundled build, call initOverlay() from @pangular-inspector/devtools/overlay-manual with this server’s address and connectionMeta`,`Run the app, then come back here for its plugin calls, or open the Angular dock`],link:{label:`Capacitor setup guide`,href:`https://pangular-inspector.dev/guides/capacitor/`}},Kce={id:`analog`,name:`Analog`,badge:`Not in this app`,heading:`This app doesn’t use Analog`,summary:`In an Analog app this dock shows your file routes, server load() and API calls, render modes and route lint.`,color:`#dd0330`,plans:[`Which page, layout and .server.ts files render a URL`,`Every load(), server function and API call with timing`,`SSR, prerendered or client only, per page`],link:{label:`Get started with Analog`,href:`https://analogjs.org/docs/getting-started`}},qce={id:`angular-native`,name:`Angular Native`,badge:`Not connected`,heading:`No Angular Native app is connected`,summary:`Start the overlay in your Angular Native app and run this server with --no-auth. The tabs fill as soon as the app reports.`,color:`#e11d48`,plans:[`The component tree, with the view outlined on the device`,`Signals and injectors of the running app`,`Live @ngrx/signals and @ngrx/store state`],link:{label:`Set up Angular Native`,href:`https://pangular-inspector.dev/guides/angular-native/`}},$9=[1e3,2e3,5e3,1e4];function Jce(){let e=new URLSearchParams(location.search).get(`view`);return Gw.find(t=>t===e)??null}rb(class e{analog=D(!1);allTabs=oT.map(({id:e,label:t})=>({id:e,label:t}));view=D(Jce());viewAccent=X(()=>Ese(this.view(),this.themeService.current()));title=X(()=>{let e=this.view();return e?Uce[e]:`Pangular Inspector`});mainLabel=X(()=>this.tab()===`settings`?`Settings`:this.availableTabs().find(e=>e.id===this.tab())?.label??this.title());analogKnown=D(!1);capacitorReporting=D(!1);pluginsReporting=D(!1);capacitorKnown=D(!1);nativePageId=D(null);nativeKnown=D(!1);scopeKey=X(()=>this.view()===`angular-native`?this.nativePageId()??``:``);comingSoon=X(()=>{let e=this.view();if(e===`analog`)return this.analogKnown()&&!this.analog()?Kce:void 0;if(e===`nativescript`)return Wce;if(e===`capacitor`)return this.config().inspectors.capacitor&&this.capacitorKnown()&&!this.capacitorReporting()?Gce:void 0;if(e===`angular-native`)return this.nativeKnown()&&!this.nativePageId()?qce:void 0});config=X(()=>_E(this.rpc()));tabEnabled=wE;inspectorsDocsUrl=CE;turnOnSnippet=X(()=>{let e=SE(this.tab());return e?`inspectors: {${e}: true}`:null});availableTabs=X(()=>{if(this.comingSoon())return[];let e=this.view(),t=e?X9[e]:void 0,n=this.allTabs.filter(e=>wE(e.id,this.config()));if(t)return n.filter(e=>e.id===t);let r=e?Q9[e]:void 0;return r?n.filter(e=>r.includes(e.id)):n.filter(t=>(t.id!==`analog`||this.analog())&&(t.id!==`capacitor`||this.capacitorReporting())&&(t.id!==`plugins`||this.pluginsReporting())&&!(e===`angular`&&Z9[t.id]))});tabLayout=D(sae());tabs=X(()=>{let e=this.tab(),t=dae(this.availableTabs(),this.tabLayout(),e);return this.rpc()?t:t.filter(t=>t.id===`dashboard`||t.id===e)});settingsTabs=X(()=>this.availableTabs());rovingTab=X(()=>{let e=this.tabs(),t=this.tab();return e.some(e=>e.id===t)?t:e[0]?.id});onNavKey(e){let t=this.nav()?.nativeElement;if(!t||e.altKey||e.ctrlKey||e.metaKey)return;let n=[...t.querySelectorAll(`button`)],r=n.indexOf(document.activeElement);if(r<0)return;let i=n.length-1,a={ArrowRight:r===i?0:r+1,ArrowLeft:r===0?i:r-1,Home:0,End:i},o=Object.hasOwn(a,e.key)?a[e.key]:-1;o<0||(e.preventDefault(),n[o].focus())}fullPanelLink=X(()=>{let e=this.view();if(!e||location.protocol===`chrome-extension:`)return null;let t=this.comingSoon()?`dashboard`:X9[e]??this.tab();return{tab:t,href:Cae(location.href,t)}});tab=Q(()=>{let e=this.view();return e&&(X9[e]??Q9[e]?.[0])||`dashboard`});rpc=D(null);openedDock=D(null);connected=D(!1);connectionFailed=D(!1);pairing=D(null);connectedNote=D(``);hiddenPages=D([]);pageId=XT();backgroundNote=X(()=>{let e=this.hiddenPages();return this.pageId?e.includes(this.pageId)?`Page in background, showing the last data.`:``:e.length?e.length===1?`A page is in the background, showing its last data.`:`${e.length} pages are in the background, showing their last data.`:``});stopVisibility=()=>{};stopNative=()=>{};stopCapacitor=()=>{};stopPlugins=()=>{};stopFollowing=()=>{};stopHighlights=()=>{};nav=Dv(`nav`);main=Dv(`main`);injector=C(Os);themeService=C(_ae);navObserver;navFade=D({start:!1,end:!1});constructor(){C(Nj).use(this.rpc),ud(()=>{let e=this.nav()?.nativeElement;e&&typeof ResizeObserver<`u`&&(this.navObserver=new ResizeObserver(()=>this.measureNav()),this.navObserver.observe(e))}),Pv(()=>{this.tab(),this.tabs(),Z(()=>{this.revealActiveTab(),this.measureNav()})}),_c(()=>{let e=this.openedDock(),t=this.rpc();e&&t&&Z(()=>void nE(t,`hub-dock-seen`,Kw(e.dock)))}),_c(()=>{let e=this.themeService.current();Z(()=>{try{window.parent!==window&&V5(window.parent.document,e)}catch{}})})}measureNav(){let e=this.nav()?.nativeElement;if(!e)return;let t=e.scrollWidth-e.clientWidth,n=e.scrollLeft>1,r=t>1&&e.scrollLeftn?e.scrollLeft=Math.max(0,n):e.scrollLeft{this.openedDock.set({dock:e}),e===Y9?this.showFullPanel():this.showView(e)});let e=i7(location.hash,a7(this.tabScope()),[...this.availableTabs().map(e=>e.id),`settings`]);e?(this.tab.set(e),this.restoreLinkItem()):!this.view()&&i7(location.hash,a7(this.tabScope()),[`capacitor`])===`capacitor`?this.restoreCapacitor=!0:!this.view()&&i7(location.hash,a7(this.tabScope()),[`analog`])===`analog`&&(this.restoreAnalog=!0),this.stopHighlights=iE(()=>this.rpc()),this.connect()}connecting=!1;pendingClient=null;retries=0;retryTimer;connect(){if(this.connecting||this.pendingClient||this.rpc()||this.pairing())return;this.connecting=!0,clearTimeout(this.retryTimer);let e=Oae();this.dropped&&aE();let t=Nae(e);Uw({...e?{baseURL:e}:{},...t.token?{authToken:t.token}:{},cacheOptions:eE(),simpleAuth:!1}).then(e=>{if(this.connecting=!1,this.destroyed){e.close?.();return}this.pendingClient=e;let n=n=>{if(e===this.pendingClient||e===this.rpc()||e===this.pairing()){if(this.pendingClient===e&&n!==`connecting`&&(this.pendingClient=null),n===`connected`){let n=this.pairing()===e;this.pairing.set(null),setTimeout(()=>t.remember(e.connection?.authToken)),this.ready(e),this.connected.set(this.rpc()===e),n&&(this.connectedNote.update(e=>e===`Connected.`?`Connected.\xA0`:`Connected.`),this.focusCurrentTab())}else n===`unauthorized`?(this.connected.set(!1),this.rpc()===e&&this.rpc.set(null),this.pairing.set(e)):(n===`disconnected`||n===`error`)&&(this.connected.set(!1),this.rpc()===e&&this.rpc.set(null),this.pairing()===e&&this.pairing.set(null),e.close?.(),this.retryLater())}};e.events.on(`connection:status`,n),e.status!==`connecting`&&n(e.status)},()=>{this.connecting=!1,!this.destroyed&&(this.analogKnown.set(!0),this.nativeKnown.set(!0),this.retryLater())})}ready(e){this.rpc()===e||this.destroyed||(this.retries=0,this.connectionFailed.set(!1),this.refocusOnConnect&&this.focusCurrentTab(),this.refocusOnConnect=!1,this.rpc.set(e),this.listenForServer(e),this.watchVisibility(e),this.watchAngularNative(e),this.watchCapacitor(e),this.watchPlugins(e),e.scope(`pangular`).rpc.call(`analog-project`).then(e=>{let t=!!e?.analog;this.analog.set(t),this.analogKnown.set(!0),t&&this.restoreAnalog&&wE(`analog`,this.config())&&this.tab.set(`analog`),this.restoreAnalog=!1,!t&&this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)},()=>{this.analogKnown.set(!0),this.restoreAnalog=!1,this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)}))}dropped=!1;retryLater(){if(this.destroyed)return;this.dropped=!0,this.connectionFailed.set(!0);let e=$9[Math.min(this.retries++,$9.length-1)];clearTimeout(this.retryTimer),this.retryTimer=setTimeout(()=>this.connect(),e)}retryConnection(){this.retries=0,this.refocusOnConnect=!0,this.connect()}refocusOnConnect=!1;destroyed=!1;ngOnDestroy(){this.destroyed=!0,clearTimeout(this.retryTimer),this.stopNative(),this.stopCapacitor(),this.stopPlugins(),this.stopFollowing(),this.stopVisibility(),this.stopHighlights(),this.navObserver?.disconnect()}showView(e){if(e===this.view())return;YT(e===`angular-native`?this.nativePageId():null),this.view.set(e);let t=new URL(location.href);t.searchParams.set(`view`,e),t.hash=``,history.replaceState(history.state,``,t)}showFullPanel(e){if(!this.view())return;YT(null),this.view.set(null);let t=new URL(location.href);t.searchParams.delete(`view`),t.hash=e?`tab=${e}`:``,history.replaceState(history.state,``,t);let n=e??a7(this.tabScope()),r=this.availableTabs().map(e=>e.id),i=i7(t.hash,n,r);i?this.setTab(i):n===`capacitor`&&(this.restoreCapacitor=!0)}openFullPanel(e,t){wae(e)&&t7()&&(e.preventDefault(),this.showFullPanel(t),this.focusCurrentTab(),n7(Y9))}paletteOpen=D(!1);paletteShortcut=Y5()?`⌘K`:`Ctrl+K`;themePreference=X(()=>this.themeService.preference());passive=D(lae());popupHotkey=X(()=>{let e=this.config().popup.hotkey;return e!==!1&&aT(e,Y5())});popup=mae();poppedOut=!!X5();tabBeforeSettings=null;componentCommand=Q({source:this.tab,computation:()=>null});paletteCommands=X(()=>{let e=new Set(this.availableTabs().map(e=>e.id)),t=e.has(`components`)&&!!this.rpc();return mT(this.config()).filter(n=>n.id.startsWith(`tab:`)?e.has(n.id.slice(4)):n.id===`popout:return`?this.poppedOut:n.popupOnly?this.popup:n.id===`pick-component`||n.id.startsWith(`cd-`)?t:!0)});onGlobalKey(e){if(e.defaultPrevented)return;let t=Y5(),n=this.config().popup.hotkey;if(this.popup&&n&&!e.repeat&&iT(e,n,t)){e.preventDefault(),this.postToPopup({type:`pangular:popup-close`});return}!(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)||e.altKey||e.shiftKey||e.key.toLowerCase()!==`k`||e.repeat||(e.preventDefault(),!this.paletteOpen()&&this.openPalette())}openPalette(){t7()&&Sae()||this.paletteOpen.set(!0)}runCommand(e){if(e.startsWith(`tab:`)){let t=e.slice(4);this.availableTabs().some(e=>e.id===t)&&this.switchTab(t);return}if(e.startsWith(`theme:`)){let t=e.slice(6);(t===`system`||t===`light`||t===`dark`)&&this.setTheme(t);return}if(e===`dock:reset-size`){this.postToPopup({type:`pangular:popup-dock-size`});return}if(e.startsWith(`dock:`)){this.postToPopup({type:`pangular:popup-dock`,mode:e.slice(5)});return}if(e===`popout`){this.postToPopup({type:`pangular:popup-popout`});return}if(e===`popout:return`){gae();return}let t={"pick-component":`pick`,"cd-record-start":`cd-start`,"cd-record-stop":`cd-stop`,"cd-clear":`cd-clear`};e===`settings`?this.tab()!==`settings`&&this.toggleSettings():t[e]&&this.availableTabs().some(e=>e.id===`components`)&&(this.tab()!==`components`&&this.switchTab(`components`),this.componentCommand.set({kind:t[e]}))}toggleSettings(){if(this.tab()===`settings`){let e=this.tabBeforeSettings,t=this.availableTabs().map(e=>e.id);this.switchTab(e&&t.includes(e)?e:t[0]??`dashboard`);return}this.tabBeforeSettings=this.tab(),this.switchTab(`settings`)}setTabLayout(e){this.tabLayout.set(e),cae(e)}setTheme(e){this.themeService.setPreference(e)}setPassive(e){this.passive.set(e),uae(e),this.postToPopup({type:`pangular:popup-passive`,passive:e})}postToPopup(e){for(let{win:t,origin:n}of Q5())try{t.postMessage(e,n)}catch{}}openLink(e){let t=e.tab;if(!this.availableTabs().some(e=>e.id===t))return!1;if(this.tab()!==t&&this.switchTab(t),e.id&&Object.hasOwn(lT,t)){let n=e.page;t===`components`?this.componentFocus.set({id:e.id,pageId:n}):t===`injectors`?this.injectorFocus.set({componentId:e.id,pageId:n}):t===`forms`&&this.formFocus.set({id:e.id})}return history.replaceState(history.state,``,dT(e)),!0}followHash(){let e=fT(location.hash);if(e){if(e.tab===`settings`){this.tab()!==`settings`&&this.toggleSettings();return}this.openLink(e)}}listenForServer(e){let t=e.scope(`pangular`).rpc,n=()=>typeof document>`u`||document.visibilityState!==`hidden`;try{t.register({name:`panel-command`,type:`event`,jsonSerializable:!0,handler:e=>{let t=e?.command;typeof t==`string`&&n()&&this.runCommand(t)}}),t.register({name:`open-in-panel`,type:`event`,jsonSerializable:!0,handler:e=>{let t=e;n()&&typeof t?.tab==`string`&&this.openLink({tab:t.tab,...typeof t.id==`string`?{id:t.id}:{},...typeof t.page==`string`?{page:t.page}:{}})}})}catch{}}restoreLinkItem(){let e=fT(location.hash);if(!e?.id||e.tab!==this.tab())return;let t=e.tab;t===`components`?this.componentFocus.set({id:e.id,pageId:e.page}):t===`injectors`?this.injectorFocus.set({componentId:e.id,pageId:e.page}):t===`forms`&&this.formFocus.set({id:e.id})}formFocus=D(null);componentFocus=Q({source:this.tab,computation:()=>null});showForm(e){this.formFocus.set({id:e}),this.switchTab(`forms`)}injectorFocus=Q({source:this.tab,computation:()=>null});showInjector(e){this.config().inspectors.injectors&&(this.switchTab(`injectors`),this.injectorFocus.set(e))}showComponent(e){this.config().inspectors.components&&(this.switchTab(`components`),this.componentFocus.set(e))}inspectFromPanel({source:e,origin:t,data:n}){if(e!==window.parent||t!==location.origin)return;let r=n;r?.type===`pangular:inspect-component`&&typeof r.id==`string`&&this.tab()===`components`&&this.config().inspectors.components&&this.componentFocus.set({id:r.id})}switchTab(e){let t=Z9[e];if(this.view()===`angular`&&t){this.activateDock(t,e);return}this.setTab(e),history.replaceState(history.state,``,`#tab=${e}`)}restoreAnalog=!1;restoreCapacitor=!1;setTab(e){this.restoreAnalog=!1,this.restoreCapacitor=!1,this.keepFocus(),this.tab.set(e),Tae(this.tabScope(),e)}tabScope(){return this.view()??`panel`}async watchAngularNative(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`component-tree`),n=e=>{let t=e?.pages,n=RD(t,this.nativePageId());this.view()===`angular-native`&&YT(n),this.nativePageId.set(n),this.nativeKnown.set(!0)};n(t.value()),this.stopNative(),this.stopNative=t.on(`updated`,n)}catch{this.nativeKnown.set(!0)}}async watchPlugins(e){let t=!this.view()&&i7(location.hash,a7(this.tabScope()),[`plugins`])===`plugins`;try{let n=await e.scope(`pangular`).rpc.sharedState(`plugins`),r=e=>{if(e===void 0)return;let n=hre(e);this.pluginsReporting.set(n),n&&t&&wE(`plugins`,this.config())&&this.tab.set(`plugins`),n&&(t=!1),!n&&this.tab()===`plugins`&&!this.view()&&this.tab.set(`dashboard`)};r(n.value()),this.stopPlugins(),this.stopPlugins=n.on(`updated`,r)}catch{this.pluginsReporting.set(!1)}}async watchCapacitor(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`capacitor`),n=e=>{if(e===void 0)return;let t=g4(e).length>0;this.capacitorReporting.set(t),this.capacitorKnown.set(!0),t&&this.restoreCapacitor&&wE(`capacitor`,this.config())&&(this.restoreCapacitor=!1,this.tab.set(`capacitor`)),!t&&this.tab()===`capacitor`&&!this.view()&&this.tab.set(`dashboard`)};n(t.value()),this.stopCapacitor(),this.stopCapacitor=t.on(`updated`,n)}catch{this.capacitorReporting.set(!1),this.capacitorKnown.set(!0)}}async watchVisibility(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`page-visibility`),n=e=>{let t=e?.hidden;this.hiddenPages.set(Array.isArray(t)?t.filter(e=>typeof e==`string`):[])};n(t.value()),this.stopVisibility(),this.stopVisibility=t.on(`updated`,n)}catch{}}keepFocus(){let e=document.activeElement,t=this.main()?.nativeElement;(!e||e===document.body||t?.contains(e))&&this.focusCurrentTab()}focusCurrentTab(){ud(()=>{let e=document.activeElement;e&&e!==document.body||(this.nav()?.nativeElement.querySelector(`button.active`)??this.main()?.nativeElement)?.focus()},{injector:this.injector})}async activateDock(e,t){if(await n7(e))return;if(window.parent===window){this.keepFocus(),this.showView(e);return}let n=this.rpc();if(!n?.call){this.setTab(t);return}try{await n.call(`hub:docks:activate`,{dockId:Kw(e)}),this.keepFocus(),this.showView(e)}catch{this.setTab(t)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-root`]],viewQuery:function(e,t){e&1&&Xg(t.nav,rce,5)(t.main,ice,5),e&2&&Zg(2)},hostVars:4,hostBindings:function(e,t){e&1&&H(`message`,function(e){return t.inspectFromPanel(e)},Au)(`hashchange`,function(){return t.followHash()},Au)(`keydown`,function(e){return t.onGlobalKey(e)},ju),e&2&&y_(`--%NS%accent`,t.viewAccent()?.accent??null)(`--%NS%accent-text`,t.viewAccent()?.text??null)},decls:41,vars:30,consts:[[`nav`,``],[`main`,``],[1,`brand`],[1,`mark`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 256 256`,`aria-hidden`,`true`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 32 32`,`aria-hidden`,`true`],[`width`,`24`,`height`,`17`,`viewBox`,`0 0 256 182`,`aria-hidden`,`true`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 24 24`,`fill`,`currentColor`,`aria-hidden`,`true`],[`width`,`20`,`height`,`22`,`viewBox`,`0 0 223 236`,`aria-hidden`,`true`],[`width`,`30`,`height`,`30`,`viewBox`,`0 0 500 500`,`aria-hidden`,`true`],[1,`title`],[`aria-label`,`Inspectors`,3,`scroll`,`keydown`],[`role`,`toolbar`,`aria-label`,`Inspectors`,`aria-orientation`,`horizontal`,1,`tab-bar`],[1,`full-panel`,3,`href`],[1,`shell-actions`],[`type`,`button`,`aria-haspopup`,`dialog`,1,`shell-btn`,3,`click`],[`width`,`16`,`height`,`16`,`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z`],[`type`,`button`,`aria-label`,`Settings`,`title`,`Settings`,1,`shell-btn`,3,`click`],[`name`,`settings`],[`role`,`status`,1,`status`],[`aria-hidden`,`true`,1,`dot`],[`tabindex`,`0`],[`role`,`status`,1,`background-note`],[`role`,`status`,1,`sr-only`],[3,`tabs`,`layout`,`theme`,`passive`,`hotkey`,`paletteShortcut`,`rpc`],[3,`client`],[`role`,`alert`,1,`connection-error`],[`role`,`status`,1,`turned-off`],[3,`info`],[1,`turned-off`],[3,`openChange`,`picked`,`commands`,`open`],[`fill`,`#3c5afd`,`d`,`M237.248 18.752q18.061 18.06 18.748 45.247V192c-.457 18.12-6.707 33.207-18.748 45.247c-12.04 12.04-27.127 18.291-45.251 18.752H63.999q-27.187-.69-45.247-18.752C6.712 225.208.46 210.121 0 192.001V64q.69-27.187 18.752-45.247Q36.812.692 63.999 0h127.998c18.124.46 33.211 6.711 45.251 18.752m-17.655 103q-6.033-6.003-6.28-15.066V64q-.192-9.063-6.221-15.091c-4.02-4.023-9.054-6.093-15.095-6.22h-21.312v106.626L85.315 42.687H63.999c-6.042.128-11.072 2.198-15.091 6.221c-4.023 4.02-6.093 9.05-6.22 15.09v42.688q-.249 9.063-6.281 15.066q-6.03 5.996-15.091 6.246q9.062.255 15.09 6.25c4.024 4.002 6.115 9.024 6.281 15.066V192c.128 6.037 2.198 11.072 6.221 15.091q6.03 6.03 15.09 6.22h21.317V106.687l85.37 106.627h21.312c6.041-.128 11.076-2.202 15.095-6.221s6.093-9.054 6.22-15.09v-42.688q.249-9.063 6.281-15.066q6.03-5.995 15.091-6.25q-9.062-.25-15.09-6.246`],[`fill`,`#53b9ff`,`d`,`M39.863 54.115L.311 93.716l60.995 61.179L0 216.385l39.428 39.619l61.43-61.507l61.097 61.068l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m140.517 154.896l-39.658 39.601l61.097 61.069l39.552-39.602z`],[`fill-opacity`,`.2`,`d`,`m140.517 154.896l-39.658 39.601l15.267 15.182z`],[`fill`,`#53b9ff`,`d`,`M194.57 100.985L256 39.478L216.431 0l-61.412 61.384L93.917.311L54.365 39.913L216.01 201.761l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m115.36 100.987l39.659-39.602L93.917.313L54.365 39.914z`],[`fill-opacity`,`.2`,`d`,`m115.359 100.985l39.659-39.601l-15.271-15.186z`],[`id`,`an-mark-grad`,`x1`,`0`,`y1`,`0`,`x2`,`1`,`y2`,`1`],[`offset`,`0`,`stop-color`,`#f0224f`],[`offset`,`1`,`stop-color`,`#c4002d`],[`d`,`M16 0C27.2 0 32 4.8 32 16S27.2 32 16 32 0 27.2 0 16 4.8 0 16 0Z`,`fill`,`url(#an-mark-grad)`],[`transform`,`translate(6.4 6.4) scale(0.8)`,`fill`,`#fff`],[`d`,`M14.8486 0L23.138 16.8551L23.9996 3.99892L14.8486 0Z`],[`d`,`M16.9875 17.7114H7.01272L5.73926 20.627L12.0001 24L18.261 20.627L16.9875 17.7114Z`],[`d`,`M8.72168 13.9298H15.2812L11.9997 6.39575L8.72168 13.9298Z`],[`d`,`M9.15103 0L0 3.99892L0.861556 16.8551L9.15103 0Z`],[`fill`,`#c30f2e`,`d`,`M152.228.001L48.455 181.046H256L152.228 0z`],[`fill`,`#dd0330`,`d`,`M88.314 26.967L0 181.52h176.628L88.315 26.967z`],[`fill`,`#fff`,`d`,`M18.167 135.294h220.236v-2.419H18.167z`],[`fill`,`#fff`,`d`,`M204.38 170.667c-.861 0-1.67-.358-2.348-1.034c-4.045-4.063-4.221-20.586-4.026-45.33c.11-13.521.257-32.043-1.9-33.504c-2.104.873-2.315 16.172-2.451 26.301c-.162 11.785-.327 23.98-2.242 30.189c-.57 1.84-1.306 3.525-2.786 3.39c-2.086-.185-2.76-3.48-4.317-16.478c-.647-5.4-1.317-10.98-2.101-13.14a11 11 0 0 0-.269-.66c-.835 1.889-1.8 7.079-2.47 10.682c-.927 4.976-1.803 9.676-2.9 11.726c-.847 1.575-2.19 3.63-4.067 3.231c-2.558-.537-3.323-5.693-3.552-8.719c0-25.455-3.33-28.417-3.997-28.753l-.107.081l-.162-.036c-2.377 1.038-2.506 9.294-2.627 17.276c-.096 5.856-.198 12.492-1.053 18.701c-1.108 8.05-2.448 9.603-4.115 9.507c-3.838-.262-3.95-13.482-3.95-14.987c0-.472.012-1.028.027-1.642c.074-3.076.205-8.8-1.687-10.604c-.25-.239-.603-.515-.879-.437c-1.347.339-2.745 4.714-3.209 6.153c-.147.457-.265.833-.364 1.09c-.078.214-.177.515-.294.88c-1.02 3.095-2.18 6.183-4.16 6.944c-.732.284-1.498.222-2.216-.183c-.953-.541-1.73-1.646-2.455-3.482c-.397-1.016-.735-2.046-1.082-3.081c-.419-1.263-.85-2.569-1.384-3.808c-.419-.965-1.464-1.4-2.796-1.164c-2.768.494-3.232 3.29-3.622 7.5c-.07.733-.137 1.452-.228 2.128c-.011.198-.501 6.38-.814 8.344c-.865 5.39-2.002 7.512-3.89 7.358c-4.66-.398-6.798-20.836-6.684-29.47c.088-6.592-1.104-9-1.818-9.382c-.074-.034-.189-.096-.46.095c-.843.571-1.594 2.348-1.363 4.215c2.566 20.32.674 43.592-3.96 48.833c-1.46 1.649-3.448 1.627-4.832.236c-4.049-4.064-4.218-20.586-4.026-45.33c.11-13.521.254-32.043-1.9-33.504c-2.105.873-2.311 16.172-2.45 26.301c-.163 11.785-.329 23.98-2.246 30.189c-.57 1.84-1.307 3.525-2.782 3.39c-2.091-.186-2.761-3.48-4.321-16.478c-.649-5.4-1.319-10.98-2.101-13.14c-.1-.273-.189-.49-.27-.66c-.832 1.889-1.796 7.079-2.466 10.682c-.927 4.976-1.803 9.676-2.904 11.726c-.846 1.575-2.19 3.63-4.063 3.231c-2.558-.537-3.324-5.693-3.552-8.719c-.003-25.455-3.33-28.417-3.997-28.753l-.106.081l-.166-.036c-2.374 1.038-2.503 9.293-2.629 17.276c-.091 5.856-.194 12.492-1.048 18.701c-1.107 8.05-2.437 9.618-4.111 9.507c-3.846-.262-3.958-13.482-3.958-14.987c0-.472.016-1.028.03-1.642c.074-3.076.207-8.8-1.685-10.604c-.25-.239-.603-.515-.88-.438c-1.347.34-2.75 4.715-3.206 6.155a47 47 0 0 1-.364 1.09q-.16.432-.298.875c-1.02 3.096-2.18 6.187-4.155 6.95c-.736.282-1.506.22-2.22-.185c-.953-.541-1.734-1.646-2.454-3.482c-.398-1.016-.74-2.046-1.083-3.081c-.42-1.263-.854-2.569-1.387-3.808c-.416-.965-1.465-1.4-2.797-1.164c-3.188.567-3.943 4.52-4.55 9.238l-.106.839l-2.411-.32l.114-.824c.527-4.137 1.328-10.39 6.53-11.31c2.446-.435 4.585.581 5.446 2.583c.578 1.34 1.031 2.695 1.466 4.008c.324.99.654 1.98 1.037 2.959c.674 1.708 1.197 2.15 1.392 2.257c1.218-.38 2.462-4.167 2.873-5.414c.13-.402.24-.732.328-.968c.085-.233.195-.571.328-.98c1.097-3.43 2.474-7.144 4.918-7.762c.747-.191 1.903-.166 3.157 1.035c2.665 2.544 2.525 8.48 2.433 12.41c-.014.59-.028 1.126-.028 1.583c0 6.272.93 10.655 1.64 12.16c.367-.77.998-2.63 1.598-7.007c.831-6.066.938-12.624 1.027-18.41c.161-10.24.275-17.663 3.982-19.408c.552-.339 1.469-.522 2.436-.033c3.586 1.803 5.326 11.885 5.326 30.817c.225 2.926 1.013 6.006 1.66 6.448c.004-.066.53-.39 1.394-2.01c.925-1.718 1.845-6.665 2.655-11.026c1.792-9.614 2.606-12.989 4.726-13.166c1.615-.158 2.362 1.896 2.676 2.76c.883 2.422 1.537 7.888 2.23 13.678c.54 4.49 1.31 10.902 2.094 13.497c.084-.228.18-.5.283-.836c1.815-5.878 1.98-17.887 2.14-29.507c.22-16.14.503-26.139 3.448-28.226a2.44 2.44 0 0 1 2.233-.316c3.448 1.144 3.714 11.254 3.519 35.8c-.14 17.799-.313 39.952 3.323 43.603c.317.32.542.32.622.32c.17 0 .413-.161.67-.452c3.681-4.162 6.01-26.022 3.372-46.927c-.328-2.602.677-5.337 2.392-6.514c.946-.652 2.036-.736 2.978-.232c2.145 1.14 3.187 5.024 3.102 11.546c-.15 11.387 2.584 24.714 4.37 26.842c.282-.471.842-1.763 1.379-5.145c.301-1.87.799-8.153.806-8.216c.09-.71.155-1.398.217-2.097c.369-3.924.82-8.804 5.613-9.654c2.444-.435 4.583.577 5.448 2.583c.577 1.34 1.027 2.695 1.46 4.008c.332.99.664 1.98 1.046 2.959c.67 1.708 1.197 2.15 1.387 2.257c1.218-.38 2.467-4.167 2.875-5.41c.132-.402.243-.737.328-.973c.088-.228.195-.57.324-.979c1.1-3.43 2.477-7.144 4.924-7.762c.74-.191 1.9-.166 3.154 1.035c2.665 2.543 2.526 8.48 2.437 12.41q-.029.792-.033 1.583c0 6.272.931 10.655 1.641 12.16c.365-.77.994-2.63 1.601-7.007c.832-6.066.931-12.624 1.027-18.41c.159-10.24.273-17.663 3.98-19.408c.55-.339 1.467-.522 2.44-.033c3.58 1.803 5.325 11.884 5.325 30.817c.224 2.926 1.012 6.006 1.656 6.448c.008-.066.526-.39 1.399-2.01c.923-1.718 1.84-6.665 2.653-11.026c1.786-9.614 2.602-12.989 4.722-13.166c1.62-.158 2.367 1.896 2.68 2.76c.88 2.422 1.535 7.888 2.233 13.678c.534 4.49 1.304 10.902 2.092 13.497c.08-.228.176-.5.28-.836c1.813-5.878 1.976-17.887 2.138-29.507c.216-16.14.504-26.139 3.448-28.226a2.45 2.45 0 0 1 2.234-.316c3.452 1.144 3.718 11.254 3.52 35.8c-.141 17.799-.314 39.952 3.319 43.603c.324.32.544.32.63.32c.165 0 .408-.161.662-.452c3.687-4.162 6.014-26.022 3.375-46.927c-.342-2.723.43-5.47 1.84-6.526c.71-.537 1.575-.647 2.37-.313c2.054.877 3.445 4.63 4.255 11.484c.339 2.87.641 5.974.931 9.036c.641 6.683 1.509 15.69 2.684 17.67c.36-.46 1.096-1.704 2.19-5.038l2.307.753c-1.696 5.157-3.026 7.1-4.755 6.902c-2.69-.299-3.468-5.734-4.84-20.055c-.29-3.048-.59-6.132-.928-8.989c-1.03-8.74-2.782-9.532-2.801-9.54c-.342.174-1.137 1.992-.842 4.31c2.558 20.32.673 43.597-3.964 48.834c-.747.842-1.587 1.27-2.485 1.27`],[`d`,`M12.024.017V0L12 .008L11.976 0v.017L.812 3.892l1.605 14.875l9.559 5.207V24l.024-.013l.024.013v-.026l9.559-5.207l1.605-14.875zm6.868 14.244q-1.64 3.948-6.031 4.166c-2.829 0-4.661-1.7-4.66-1.7q-1.745-1.359-2.398-3.417c-.695-.76-.702-.841-.774-1.145c-.072-.303.045-.388.249-.685q.204-.298.098-.85q-.26-.36-.3-1.128q0-.37.496-.783q.495-.413.607-.632q.083-.119.065-1.031q-.006-.897.995-.975c1-.08 1.565-.832 1.879-1.174c.21-.228.52-.339.91-.341c.551-.026 1.052.185 1.484.62c1.075-.055 2.176.235 3.292.863q2.379 1.414 2.596 3.055q-.257 2.158-5.788-.113q-2.895.819-2.846 3.552q0 2.508 2.422 3.643c-.787-.772-1.122-1.422-1.01-1.959q2.456 2.906 5.588 2.173c-.92.032-1.65-.264-2.198-.893q2.116-.05 3.998-1.972c-.724.576-1.482.794-2.284.657q3.26-2.563 2.307-5.98l-.002-.006a3.02 3.02 0 0 1 .788 2.03q.023 1.175-.795 2.477q.613-.478 1.413-2.047c.23 2.117-.625 3.724-2.574 4.825q.934-.085 2.473-1.23m-5.567-6.63a.319.319 0 1 1 .638 0a.319.319 0 0 1-.638 0`],[`id`,`ng-grad`,`x1`,`49`,`x2`,`226`,`y1`,`214`,`y2`,`130`,`gradientUnits`,`userSpaceOnUse`],[`stop-color`,`#E40035`],[`offset`,`.24`,`stop-color`,`#F60A48`],[`offset`,`.352`,`stop-color`,`#F20755`],[`offset`,`.494`,`stop-color`,`#DC087D`],[`offset`,`.745`,`stop-color`,`#9717E7`],[`offset`,`1`,`stop-color`,`#6C00F5`],[`fill`,`url(#ng-grad)`,`d`,`m222.077 39.192-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z`],[`width`,`500`,`height`,`500`,`rx`,`112`,`fill`,`#1c1a17`],[`transform`,`translate(250 252) scale(1.38) translate(-120 -129)`],[`id`,`pi-mark-mask`],[`x`,`-60`,`y`,`-60`,`width`,`360`,`height`,`380`,`fill`,`#fff`],[`fill`,`none`,`stroke`,`#000`,`stroke-width`,`30`,`stroke-linejoin`,`miter`],[`d`,`M88 66 V196`],[`d`,`M88 66 H143 L170 98 L143 130 H88 Z`],[`id`,`pi-mark-clip`],[`x`,`-40`,`y`,`129`,`width`,`320`,`height`,`200`],[`transform`,`rotate(-10 120 129)`],[`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#78350f`,`stroke-width`,`10`],[`mask`,`url(#pi-mark-mask)`],[`fill`,`#fbbf24`,`d`,`M120 5 L2 46 L22 198 L120 253 Z`],[`fill`,`#f59e0b`,`d`,`M120 5 L238 46 L218 198 L120 253 Z`],[`clip-path`,`url(#pi-mark-clip)`,`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#1c1a17`,`stroke-width`,`22`],[`clip-path`,`url(#pi-mark-clip)`,`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#fde68a`,`stroke-width`,`10`],[`transform`,`translate(230.9 146.0) rotate(10) scale(1.5) translate(-4 -4)`],[`x1`,`9`,`y1`,`9`,`x2`,`21`,`y2`,`21`,`stroke`,`#1c1a17`,`stroke-width`,`14`,`stroke-linecap`,`round`],[`r`,`16`,`fill`,`#1c1a17`],[`x1`,`9`,`y1`,`9`,`x2`,`21`,`y2`,`21`,`stroke`,`#fde68a`,`stroke-width`,`7`,`stroke-linecap`,`round`],[`r`,`12`,`fill`,`#1c1a17`,`stroke`,`#fde68a`,`stroke-width`,`5`],[`type`,`button`,3,`active`],[`type`,`button`,3,`click`],[3,`name`],[1,`full-panel`,3,`click`,`href`],[`width`,`14`,`height`,`14`,`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`3`,`y`,`14`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`14`,`y`,`14`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[3,`layoutChange`,`themeChange`,`passiveChange`,`tabs`,`layout`,`theme`,`passive`,`hotkey`,`paletteShortcut`,`rpc`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`sr-only`],[3,`rpc`],[3,`rpc`,`canShowComponent`],[3,`rpc`,`focus`,`command`,`canShowInjector`],[3,`rpc`,`focus`,`canShowComponent`],[3,`rpc`,`focus`],[3,`rpc`,`canShowComponent`,`canExplainInjection`],[3,`navigate`,`rpc`],[3,`open`,`rpc`],[3,`showComponent`,`rpc`,`canShowComponent`],[3,`focusHandled`,`commandHandled`,`showForm`,`showInjector`,`rpc`,`focus`,`command`,`canShowInjector`],[3,`showComponent`,`rpc`],[3,`focusHandled`,`showComponent`,`rpc`,`focus`,`canShowComponent`],[3,`focusHandled`,`rpc`,`focus`],[3,`showComponent`,`rpc`,`canShowComponent`,`canExplainInjection`]],template:function(e,t){if(e&1){let e=V();I(0,`header`)(1,`h1`,2)(2,`span`,3),j(3,sce,2,0,`:svg:svg`,4)(4,cce,7,0,`:svg:svg`,4)(5,lce,11,0,`:svg:svg`,5)(6,uce,5,0,`:svg:svg`,6)(7,dce,2,0,`:svg:svg`,7)(8,fce,10,0,`:svg:svg`,8)(9,pce,24,0,`:svg:svg`,9),L(),I(10,`span`,10),K(11),L()(),I(12,`nav`,11,0),H(`scroll`,function(){return t.measureNav()})(`keydown`,function(e){return t.onNavKey(e)}),j(14,J9,3,0,`div`,12),L(),j(15,hce,7,1,`a`,13),I(16,`span`,14)(17,`button`,15),H(`click`,function(){return t.openPalette()}),E(),I(18,`svg`,16),R(19,`path`,17),L()(),bs(),I(20,`button`,18),H(`click`,function(){return t.toggleSettings()}),R(21,`app-tab-icon`,19),L()(),I(22,`span`,20)(23,`span`,21),R(24,`span`),L(),K(25),L()(),I(26,`main`,22,1)(28,`p`,23),K(29),L(),I(30,`p`,24),K(31),L(),j(32,gce,1,7,`app-settings`,25)(33,_ce,1,1,`app-auth-code`,26)(34,vce,5,0,`div`,27)(35,yce,2,0,`p`,28)(36,bce,1,1,`app-coming-soon`,29)(37,xce,2,0,`p`,28)(38,Cce,10,2,`p`,30)(39,Vce,2,2),L(),I(40,`app-command-palette`,31),W_(`openChange`,function(n){return w(e),U_(t.paletteOpen,n)||(t.paletteOpen=n),T(n)}),H(`picked`,function(e){return t.runCommand(e)}),L()}if(e&2){let e,n;O(2),G(`ng-mark`,t.view()===`angular`)(`pi-mark`,!t.view()),O(),M(t.view()===`nativescript`?3:t.view()===`capacitor`?4:t.view()===`angular-native`?5:t.view()===`analog`?6:t.view()===`ngrx`?7:t.view()===`angular`?8:9),O(7),G(`ng-text`,t.view()===`angular`),O(),q(t.title()),O(),G(`fade-start`,t.navFade().start)(`fade-end`,t.navFade().end),O(2),M(t.availableTabs().length>1?14:-1),O(),M((e=t.fullPanelLink())?15:-1,e),O(2),A(`aria-label`,`Command palette (`+t.paletteShortcut+`)`)(`title`,`Command palette (`+t.paletteShortcut+`)`),O(3),G(`active`,t.tab()===`settings`),A(`aria-pressed`,t.tab()===`settings`),O(2),G(`connected`,t.connected())(`failed`,t.connectionFailed()),O(3),J(` `,t.connected()?`Live`:t.connectionFailed()?`Disconnected`:t.pairing()?`Code needed`:`Connecting…`,` `),O(),A(`aria-label`,t.mainLabel()),O(3),q(t.backgroundNote()),O(2),q(t.connectedNote()),O(),M(t.tab()===`settings`?32:(n=t.pairing())?33:t.connectionFailed()?34:t.rpc()?(n=t.comingSoon())?36:t.view()===`angular-native`&&!t.nativePageId()?37:t.tabEnabled(t.tab(),t.config())?39:38:35,n),O(8),F(`commands`,t.paletteCommands()),H_(`open`,t.paletteOpen)}},dependencies:[SD,$F,Nz,GV,rW,Tq,vJ,GX,fQ,P1,n4,q3,L8,vre,cie,rae,l4,HE,qse,nce,wse],styles:[`[_nghost-%COMP%] { +}`]})},ace=[`nav`],oce=[`main`],sce=e=>[e],cce=(e,t)=>t.id;function lce(e,t){e&1&&(E(),I(0,`svg`,4),R(1,`path`,32),L())}function uce(e,t){e&1&&(E(),I(0,`svg`,4),R(1,`path`,33)(2,`path`,34)(3,`path`,35)(4,`path`,36)(5,`path`,37)(6,`path`,38),L())}function dce(e,t){e&1&&(E(),I(0,`svg`,5)(1,`defs`)(2,`linearGradient`,39),R(3,`stop`,40)(4,`stop`,41),L()(),R(5,`path`,42),I(6,`g`,43),R(7,`path`,44)(8,`path`,45)(9,`path`,46)(10,`path`,47),L()())}function fce(e,t){e&1&&(E(),I(0,`svg`,6),R(1,`path`,48)(2,`path`,49)(3,`path`,50)(4,`path`,51),L())}function pce(e,t){e&1&&(E(),I(0,`svg`,7),R(1,`path`,52),L())}function mce(e,t){e&1&&(E(),I(0,`svg`,8)(1,`defs`)(2,`linearGradient`,53),R(3,`stop`,54)(4,`stop`,55)(5,`stop`,56)(6,`stop`,57)(7,`stop`,58)(8,`stop`,59),L()(),R(9,`path`,60),L())}function hce(e,t){e&1&&(E(),I(0,`svg`,9),R(1,`rect`,61),I(2,`g`,62)(3,`defs`)(4,`mask`,63),R(5,`rect`,64),I(6,`g`,65),R(7,`path`,66)(8,`path`,67),L()(),I(9,`clipPath`,68),R(10,`rect`,69),L()(),I(11,`g`,70),R(12,`ellipse`,71),L(),I(13,`g`,72),R(14,`path`,73)(15,`path`,74),L(),I(16,`g`,70),R(17,`ellipse`,75)(18,`ellipse`,76),I(19,`g`,77),R(20,`line`,78)(21,`circle`,79)(22,`line`,80)(23,`circle`,81),L()()()())}function gce(e,t){if(e&1){let e=V();I(0,`button`,83),H(`click`,function(){let t=w(e).$implicit;return T(W(2).switchTab(t.id))}),R(1,`app-tab-icon`,84),I(2,`span`),K(3),L()()}if(e&2){let e=t.$implicit,n=W(2);G(`active`,n.tab()===e.id),A(`aria-current`,n.tab()===e.id?`page`:null)(`tabindex`,n.rovingTab()===e.id?0:-1),O(),F(`name`,e.id),O(2),q(e.label)}}function _ce(e,t){if(e&1&&(I(0,`div`,12),N(1,gce,4,6,`button`,82,cce),L()),e&2){let e=W();O(),P(e.tabs())}}function vce(e,t){if(e&1){let e=V();I(0,`a`,85),H(`click`,function(t){let n=w(e);return T(W().openFullPanel(t,n.tab))}),E(),I(1,`svg`,86),R(2,`rect`,87)(3,`rect`,88)(4,`rect`,89)(5,`rect`,90),L(),K(6,` Open full panel `),L()}e&2&&F(`href`,t.href,ku)}function yce(e,t){if(e&1){let e=V();I(0,`app-settings`,91),H(`layoutChange`,function(t){return w(e),T(W().setTabLayout(t))})(`themeChange`,function(t){return w(e),T(W().setTheme(t))})(`passiveChange`,function(t){return w(e),T(W().setPassive(t))}),L()}if(e&2){let e=W();F(`tabs`,e.settingsTabs())(`layout`,e.tabLayout())(`theme`,e.themePreference())(`passive`,e.passive())(`hotkey`,e.popupHotkey())(`paletteShortcut`,e.paletteShortcut)(`rpc`,e.rpc())}}function bce(e,t){e&1&&R(0,`app-auth-code`,26),e&2&&F(`client`,t)}function xce(e,t){if(e&1){let e=V();I(0,`div`,27)(1,`p`),K(2,` Can't reach the devtools server. Check that the dev server is running. The panel keeps trying to connect. `),L(),I(3,`button`,83),H(`click`,function(){return w(e),T(W().retryConnection())}),K(4,`Retry now`),L()()}}function Sce(e,t){e&1&&(I(0,`p`,28),K(1,`Connecting to the devtools server…`),L())}function Cce(e,t){e&1&&R(0,`app-coming-soon`,29),e&2&&F(`info`,t)}function wce(e,t){e&1&&(I(0,`p`,28),K(1,`Looking for an Angular Native app…`),L())}function Tce(e,t){e&1&&(K(0,` To turn it on, set `),I(1,`code`),K(2),L(),K(3,` in the devtools options. `)),e&2&&(O(2),q(t))}function Ece(e,t){if(e&1&&(I(0,`p`,30),K(1,` This inspector is turned off in the devtools config (`),I(2,`code`),K(3,`inspectors`),L(),K(4,`). `),j(5,Tce,4,1),I(6,`a`,92),K(7,`About inspectors`),I(8,`span`,93),K(9,` (opens in a new tab)`),L()()()),e&2){let e,t=W();O(5),M((e=t.turnOnSnippet())?5:-1,e),O(),F(`href`,t.inspectorsDocsUrl,ku)}}function Dce(e,t){if(e&1){let e=V();I(0,`app-dashboard`,100),H(`navigate`,function(t){return w(e),T(W(3).switchTab(t))}),L()}e&2&&F(`rpc`,W(3).rpc())}function Oce(e,t){if(e&1){let e=V();I(0,`app-timeline`,101),H(`open`,function(t){return w(e),T(W(3).openLink(t))}),L()}e&2&&F(`rpc`,W(3).rpc())}function kce(e,t){if(e&1){let e=V();I(0,`app-audit-inspector`,102),H(`showComponent`,function(t){return w(e),T(W(3).showComponent(t))}),L()}if(e&2){let e=W(3);F(`rpc`,e.rpc())(`canShowComponent`,e.config().inspectors.components)}}function Ace(e,t){if(e&1){let e=V();I(0,`app-component-tree`,103),H(`focusHandled`,function(){return w(e),T(W(3).componentFocus.set(null))})(`commandHandled`,function(){return w(e),T(W(3).componentCommand.set(null))})(`showForm`,function(t){return w(e),T(W(3).showForm(t))})(`showInjector`,function(t){return w(e),T(W(3).showInjector(t))}),L()}if(e&2){let e=W(3);F(`rpc`,e.rpc())(`focus`,e.componentFocus())(`command`,e.componentCommand())(`canShowInjector`,e.config().inspectors.injectors)}}function jce(e,t){if(e&1){let e=V();I(0,`app-route-inspector`,104),H(`showComponent`,function(t){return w(e),T(W(3).showComponent(t))}),L()}e&2&&F(`rpc`,W(3).rpc())}function Mce(e,t){e&1&&R(0,`app-signal-inspector`,94),e&2&&F(`rpc`,W(3).rpc())}function Nce(e,t){if(e&1){let e=V();I(0,`app-di-inspector`,105),H(`focusHandled`,function(){return w(e),T(W(3).injectorFocus.set(null))})(`showComponent`,function(t){return w(e),T(W(3).showComponent(t))}),L()}if(e&2){let e=W(3);F(`rpc`,e.rpc())(`focus`,e.injectorFocus())(`canShowComponent`,e.config().inspectors.components)}}function Pce(e,t){e&1&&R(0,`app-store-inspector`,94),e&2&&F(`rpc`,W(3).rpc())}function Fce(e,t){e&1&&R(0,`app-query-inspector`,94),e&2&&F(`rpc`,W(3).rpc())}function Ice(e,t){e&1&&R(0,`app-network-inspector`,94),e&2&&F(`rpc`,W(3).rpc())}function Lce(e,t){if(e&1){let e=V();I(0,`app-forms-inspector`,106),H(`focusHandled`,function(){return w(e),T(W(3).formFocus.set(null))}),L()}if(e&2){let e=W(3);F(`rpc`,e.rpc())(`focus`,e.formFocus())}}function Rce(e,t){e&1&&R(0,`app-pipes-inspector`,94),e&2&&F(`rpc`,W(3).rpc())}function zce(e,t){e&1&&R(0,`app-analog-inspector`,94),e&2&&F(`rpc`,W(3).rpc())}function Bce(e,t){e&1&&R(0,`app-capacitor-inspector`,94),e&2&&F(`rpc`,W(3).rpc())}function Vce(e,t){e&1&&R(0,`app-plugins-inspector`,94),e&2&&F(`rpc`,W(3).rpc())}function Hce(e,t){if(e&1){let e=V();I(0,`app-errors-inspector`,107),H(`showComponent`,function(t){return w(e),T(W(3).showComponent(t))}),L()}if(e&2){let e=W(3);F(`rpc`,e.rpc())(`canShowComponent`,e.config().inspectors.components)(`canExplainInjection`,e.config().inspectors.injectors)}}function Uce(e,t){if(e&1&&j(0,Dce,1,1,`app-dashboard`,94)(1,Oce,1,1,`app-timeline`,94)(2,kce,1,2,`app-audit-inspector`,95)(3,Ace,1,4,`app-component-tree`,96)(4,jce,1,1,`app-route-inspector`,94)(5,Mce,1,1,`app-signal-inspector`,94)(6,Nce,1,3,`app-di-inspector`,97)(7,Pce,1,1,`app-store-inspector`,94)(8,Fce,1,1,`app-query-inspector`,94)(9,Ice,1,1,`app-network-inspector`,94)(10,Lce,1,2,`app-forms-inspector`,98)(11,Rce,1,1,`app-pipes-inspector`,94)(12,zce,1,1,`app-analog-inspector`,94)(13,Bce,1,1,`app-capacitor-inspector`,94)(14,Vce,1,1,`app-plugins-inspector`,94)(15,Hce,1,3,`app-errors-inspector`,99),e&2){let e;M((e=W(2).tab())===`dashboard`?0:e===`timeline`?1:e===`audit`?2:e===`components`?3:e===`routes`?4:e===`signals`?5:e===`injectors`?6:e===`store`?7:e===`queries`?8:e===`network`?9:e===`forms`?10:e===`pipes`?11:e===`analog`?12:e===`capacitor`?13:e===`plugins`?14:e===`errors`?15:-1)}}function Wce(e,t){e&1&&N(0,Uce,16,1,null,null,_g),e&2&&P(iv(0,sce,W().scopeKey()))}var Y9=`all`,Gce=[Y9,...Gw],Kce={angular:`Angular`,ngrx:`NgRx Store`,analog:`Analog`,"angular-native":`Angular Native`,nativescript:`NativeScript`,capacitor:`Capacitor`},X9={ngrx:`store`,analog:`analog`,capacitor:`capacitor`},Z9={store:`ngrx`,analog:`analog`,capacitor:`capacitor`},Q9={"angular-native":[`components`,`signals`,`injectors`,`store`,`queries`,`pipes`,`errors`]},qce={id:`nativescript`,name:`NativeScript`,badge:`Available`,heading:`Inspect NativeScript apps`,summary:`A NativeScript Angular app reports from the simulator or device to this server, and its components, signals, injectors and NgRx stores show up in the Angular dock.`,color:`#3c5afd`,plansTitle:`Set up an app`,plans:[`Install @pangular-inspector/devtools and @valor/nativescript-websockets`,`Call initNativeScriptOverlay() in main.ts, before the app bootstraps`,`Run npx pangular dev --no-auth in the app, then open the Angular dock`],link:{label:`NativeScript setup guide`,href:`https://pangular-inspector.dev/guides/nativescript/`}},Jce={id:`capacitor`,name:`Capacitor`,badge:`Available`,heading:`Inspect Capacitor apps`,summary:`An Ionic or Capacitor app runs the browser overlay in its WebView and reports to this server, so it shows up in the Angular dock like a browser tab.`,color:`#119eff`,plansTitle:`Set up an app`,plans:[`With live reload on localhost, load @pangular-inspector/devtools/overlay as in a browser`,`In a bundled build, call initOverlay() from @pangular-inspector/devtools/overlay-manual with this server’s address and connectionMeta`,`Run the app, then come back here for its plugin calls, or open the Angular dock`],link:{label:`Capacitor setup guide`,href:`https://pangular-inspector.dev/guides/capacitor/`}},Yce={id:`analog`,name:`Analog`,badge:`Not in this app`,heading:`This app doesn’t use Analog`,summary:`In an Analog app this dock shows your file routes, server load() and API calls, render modes and route lint.`,color:`#dd0330`,plans:[`Which page, layout and .server.ts files render a URL`,`Every load(), server function and API call with timing`,`SSR, prerendered or client only, per page`],link:{label:`Get started with Analog`,href:`https://analogjs.org/docs/getting-started`}},Xce={id:`angular-native`,name:`Angular Native`,badge:`Not connected`,heading:`No Angular Native app is connected`,summary:`Start the overlay in your Angular Native app and run this server with --no-auth. The tabs fill as soon as the app reports.`,color:`#e11d48`,plans:[`The component tree, with the view outlined on the device`,`Signals and injectors of the running app`,`Live @ngrx/signals and @ngrx/store state`],link:{label:`Set up Angular Native`,href:`https://pangular-inspector.dev/guides/angular-native/`}},$9=[1e3,2e3,5e3,1e4];function Zce(){let e=new URLSearchParams(location.search).get(`view`);return Gw.find(t=>t===e)??null}rb(class e{analog=D(!1);allTabs=oT.map(({id:e,label:t})=>({id:e,label:t}));view=D(Zce());viewAccent=X(()=>Ose(this.view(),this.themeService.current()));title=X(()=>{let e=this.view();return e?Kce[e]:`Pangular Inspector`});mainLabel=X(()=>this.tab()===`settings`?`Settings`:this.availableTabs().find(e=>e.id===this.tab())?.label??this.title());analogKnown=D(!1);capacitorReporting=D(!1);pluginsReporting=D(!1);capacitorKnown=D(!1);nativePageId=D(null);nativeKnown=D(!1);scopeKey=X(()=>this.view()===`angular-native`?this.nativePageId()??``:``);comingSoon=X(()=>{let e=this.view();if(e===`analog`)return this.analogKnown()&&!this.analog()?Yce:void 0;if(e===`nativescript`)return qce;if(e===`capacitor`)return this.config().inspectors.capacitor&&this.capacitorKnown()&&!this.capacitorReporting()?Jce:void 0;if(e===`angular-native`)return this.nativeKnown()&&!this.nativePageId()?Xce:void 0});config=X(()=>_E(this.rpc()));tabEnabled=wE;inspectorsDocsUrl=CE;turnOnSnippet=X(()=>{let e=SE(this.tab());return e?`inspectors: {${e}: true}`:null});availableTabs=X(()=>{if(this.comingSoon())return[];let e=this.view(),t=e?X9[e]:void 0,n=this.allTabs.filter(e=>wE(e.id,this.config()));if(t)return n.filter(e=>e.id===t);let r=e?Q9[e]:void 0;return r?n.filter(e=>r.includes(e.id)):n.filter(t=>(t.id!==`analog`||this.analog())&&(t.id!==`capacitor`||this.capacitorReporting())&&(t.id!==`plugins`||this.pluginsReporting())&&!(e===`angular`&&Z9[t.id]))});tabLayout=D(uae());tabs=X(()=>{let e=this.tab(),t=mae(this.availableTabs(),this.tabLayout(),e);return this.rpc()?t:t.filter(t=>t.id===`dashboard`||t.id===e)});settingsTabs=X(()=>this.availableTabs());rovingTab=X(()=>{let e=this.tabs(),t=this.tab();return e.some(e=>e.id===t)?t:e[0]?.id});onNavKey(e){let t=this.nav()?.nativeElement;if(!t||e.altKey||e.ctrlKey||e.metaKey)return;let n=[...t.querySelectorAll(`button`)],r=n.indexOf(document.activeElement);if(r<0)return;let i=n.length-1,a={ArrowRight:r===i?0:r+1,ArrowLeft:r===0?i:r-1,Home:0,End:i},o=Object.hasOwn(a,e.key)?a[e.key]:-1;o<0||(e.preventDefault(),n[o].focus())}fullPanelLink=X(()=>{let e=this.view();if(!e||location.protocol===`chrome-extension:`)return null;let t=this.comingSoon()?`dashboard`:X9[e]??this.tab();return{tab:t,href:Eae(location.href,t)}});tab=Q(()=>{let e=this.view();return e&&(X9[e]??Q9[e]?.[0])||`dashboard`});rpc=D(null);openedDock=D(null);connected=D(!1);connectionFailed=D(!1);pairing=D(null);connectedNote=D(``);hiddenPages=D([]);pageId=XT();backgroundNote=X(()=>{let e=this.hiddenPages();return this.pageId?e.includes(this.pageId)?`Page in background, showing the last data.`:``:e.length?e.length===1?`A page is in the background, showing its last data.`:`${e.length} pages are in the background, showing their last data.`:``});stopVisibility=()=>{};stopNative=()=>{};stopCapacitor=()=>{};stopPlugins=()=>{};stopFollowing=()=>{};stopHighlights=()=>{};nav=Dv(`nav`);main=Dv(`main`);injector=C(Os);themeService=C(bae);navObserver;navFade=D({start:!1,end:!1});constructor(){C(Nj).use(this.rpc),ud(()=>{let e=this.nav()?.nativeElement;e&&typeof ResizeObserver<`u`&&(this.navObserver=new ResizeObserver(()=>this.measureNav()),this.navObserver.observe(e))}),Pv(()=>{this.tab(),this.tabs(),Z(()=>{this.revealActiveTab(),this.measureNav()})}),_c(()=>{let e=this.openedDock(),t=this.rpc();e&&t&&Z(()=>void nE(t,`hub-dock-seen`,Kw(e.dock)))}),_c(()=>{let e=this.themeService.current();Z(()=>{try{window.parent!==window&&V5(window.parent.document,e)}catch{}})})}measureNav(){let e=this.nav()?.nativeElement;if(!e)return;let t=e.scrollWidth-e.clientWidth,n=e.scrollLeft>1,r=t>1&&e.scrollLeftn?e.scrollLeft=Math.max(0,n):e.scrollLeft{this.openedDock.set({dock:e}),e===Y9?this.showFullPanel():this.showView(e)});let e=i7(location.hash,a7(this.tabScope()),[...this.availableTabs().map(e=>e.id),`settings`]);e?(this.tab.set(e),this.restoreLinkItem()):!this.view()&&i7(location.hash,a7(this.tabScope()),[`capacitor`])===`capacitor`?this.restoreCapacitor=!0:!this.view()&&i7(location.hash,a7(this.tabScope()),[`analog`])===`analog`&&(this.restoreAnalog=!0),this.stopHighlights=iE(()=>this.rpc()),this.connect()}connecting=!1;pendingClient=null;retries=0;retryTimer;connect(){if(this.connecting||this.pendingClient||this.rpc()||this.pairing())return;this.connecting=!0,clearTimeout(this.retryTimer);let e=jae();this.dropped&&aE();let t=Iae(e);Uw({...e?{baseURL:e}:{},...t.token?{authToken:t.token}:{},cacheOptions:eE(),simpleAuth:!1}).then(e=>{if(this.connecting=!1,this.destroyed){e.close?.();return}this.pendingClient=e;let n=n=>{if(e===this.pendingClient||e===this.rpc()||e===this.pairing()){if(this.pendingClient===e&&n!==`connecting`&&(this.pendingClient=null),n===`connected`){let n=this.pairing()===e;this.pairing.set(null),setTimeout(()=>t.remember(e.connection?.authToken)),this.ready(e),this.connected.set(this.rpc()===e),n&&(this.connectedNote.update(e=>e===`Connected.`?`Connected.\xA0`:`Connected.`),this.focusCurrentTab())}else n===`unauthorized`?(this.connected.set(!1),this.rpc()===e&&this.rpc.set(null),this.pairing.set(e)):(n===`disconnected`||n===`error`)&&(this.connected.set(!1),this.rpc()===e&&this.rpc.set(null),this.pairing()===e&&this.pairing.set(null),e.close?.(),this.retryLater())}};e.events.on(`connection:status`,n),e.status!==`connecting`&&n(e.status)},()=>{this.connecting=!1,!this.destroyed&&(this.analogKnown.set(!0),this.nativeKnown.set(!0),this.retryLater())})}ready(e){this.rpc()===e||this.destroyed||(this.retries=0,this.connectionFailed.set(!1),this.refocusOnConnect&&this.focusCurrentTab(),this.refocusOnConnect=!1,this.rpc.set(e),this.listenForServer(e),this.watchVisibility(e),this.watchAngularNative(e),this.watchCapacitor(e),this.watchPlugins(e),e.scope(`pangular`).rpc.call(`analog-project`).then(e=>{let t=!!e?.analog;this.analog.set(t),this.analogKnown.set(!0),t&&this.restoreAnalog&&wE(`analog`,this.config())&&this.tab.set(`analog`),this.restoreAnalog=!1,!t&&this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)},()=>{this.analogKnown.set(!0),this.restoreAnalog=!1,this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)}))}dropped=!1;retryLater(){if(this.destroyed)return;this.dropped=!0,this.connectionFailed.set(!0);let e=$9[Math.min(this.retries++,$9.length-1)];clearTimeout(this.retryTimer),this.retryTimer=setTimeout(()=>this.connect(),e)}retryConnection(){this.retries=0,this.refocusOnConnect=!0,this.connect()}refocusOnConnect=!1;destroyed=!1;ngOnDestroy(){this.destroyed=!0,clearTimeout(this.retryTimer),this.stopNative(),this.stopCapacitor(),this.stopPlugins(),this.stopFollowing(),this.stopVisibility(),this.stopHighlights(),this.navObserver?.disconnect()}showView(e){if(e===this.view())return;YT(e===`angular-native`?this.nativePageId():null),this.view.set(e);let t=new URL(location.href);t.searchParams.set(`view`,e),t.hash=``,history.replaceState(history.state,``,t)}showFullPanel(e){if(!this.view())return;YT(null),this.view.set(null);let t=new URL(location.href);t.searchParams.delete(`view`),t.hash=e?`tab=${e}`:``,history.replaceState(history.state,``,t);let n=e??a7(this.tabScope()),r=this.availableTabs().map(e=>e.id),i=i7(t.hash,n,r);i?this.setTab(i):n===`capacitor`&&(this.restoreCapacitor=!0)}openFullPanel(e,t){Dae(e)&&t7()&&(e.preventDefault(),this.showFullPanel(t),this.focusCurrentTab(),n7(Y9))}paletteOpen=D(!1);paletteShortcut=Y5()?`⌘K`:`Ctrl+K`;themePreference=X(()=>this.themeService.preference());passive=D(fae());popupHotkey=X(()=>{let e=this.config().popup.hotkey;return e!==!1&&aT(e,Y5())});popup=_ae();poppedOut=!!X5();tabBeforeSettings=null;componentCommand=Q({source:this.tab,computation:()=>null});paletteCommands=X(()=>{let e=new Set(this.availableTabs().map(e=>e.id)),t=e.has(`components`)&&!!this.rpc();return mT(this.config()).filter(n=>n.id.startsWith(`tab:`)?e.has(n.id.slice(4)):n.id===`popout:return`?this.poppedOut:n.popupOnly?this.popup:n.id===`pick-component`||n.id.startsWith(`cd-`)?t:!0)});onGlobalKey(e){if(e.defaultPrevented)return;let t=Y5(),n=this.config().popup.hotkey;if(this.popup&&n&&!e.repeat&&iT(e,n,t)){e.preventDefault(),this.postToPopup({type:`pangular:popup-close`});return}!(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)||e.altKey||e.shiftKey||e.key.toLowerCase()!==`k`||e.repeat||(e.preventDefault(),!this.paletteOpen()&&this.openPalette())}openPalette(){t7()&&Tae()||this.paletteOpen.set(!0)}runCommand(e){if(e.startsWith(`tab:`)){let t=e.slice(4);this.availableTabs().some(e=>e.id===t)&&this.switchTab(t);return}if(e.startsWith(`theme:`)){let t=e.slice(6);(t===`system`||t===`light`||t===`dark`)&&this.setTheme(t);return}if(e===`dock:reset-size`){this.postToPopup({type:`pangular:popup-dock-size`});return}if(e.startsWith(`dock:`)){this.postToPopup({type:`pangular:popup-dock`,mode:e.slice(5)});return}if(e===`popout`){this.postToPopup({type:`pangular:popup-popout`});return}if(e===`popout:return`){yae();return}let t={"pick-component":`pick`,"cd-record-start":`cd-start`,"cd-record-stop":`cd-stop`,"cd-clear":`cd-clear`};e===`settings`?this.tab()!==`settings`&&this.toggleSettings():t[e]&&this.availableTabs().some(e=>e.id===`components`)&&(this.tab()!==`components`&&this.switchTab(`components`),this.componentCommand.set({kind:t[e]}))}toggleSettings(){if(this.tab()===`settings`){let e=this.tabBeforeSettings,t=this.availableTabs().map(e=>e.id);this.switchTab(e&&t.includes(e)?e:t[0]??`dashboard`);return}this.tabBeforeSettings=this.tab(),this.switchTab(`settings`)}setTabLayout(e){this.tabLayout.set(e),dae(e)}setTheme(e){this.themeService.setPreference(e)}setPassive(e){this.passive.set(e),pae(e),this.postToPopup({type:`pangular:popup-passive`,passive:e})}postToPopup(e){for(let{win:t,origin:n}of Q5())try{t.postMessage(e,n)}catch{}}openLink(e){let t=e.tab;if(!this.availableTabs().some(e=>e.id===t))return!1;if(this.tab()!==t&&this.switchTab(t),e.id&&Object.hasOwn(lT,t)){let n=e.page;t===`components`?this.componentFocus.set({id:e.id,pageId:n}):t===`injectors`?this.injectorFocus.set({componentId:e.id,pageId:n}):t===`forms`&&this.formFocus.set({id:e.id})}return history.replaceState(history.state,``,dT(e)),!0}followHash(){let e=fT(location.hash);if(e){if(e.tab===`settings`){this.tab()!==`settings`&&this.toggleSettings();return}this.openLink(e)}}listenForServer(e){let t=e.scope(`pangular`).rpc,n=()=>typeof document>`u`||document.visibilityState!==`hidden`;try{t.register({name:`panel-command`,type:`event`,jsonSerializable:!0,handler:e=>{let t=e?.command;typeof t==`string`&&n()&&this.runCommand(t)}}),t.register({name:`open-in-panel`,type:`event`,jsonSerializable:!0,handler:e=>{let t=e;n()&&typeof t?.tab==`string`&&this.openLink({tab:t.tab,...typeof t.id==`string`?{id:t.id}:{},...typeof t.page==`string`?{page:t.page}:{}})}})}catch{}}restoreLinkItem(){let e=fT(location.hash);if(!e?.id||e.tab!==this.tab())return;let t=e.tab;t===`components`?this.componentFocus.set({id:e.id,pageId:e.page}):t===`injectors`?this.injectorFocus.set({componentId:e.id,pageId:e.page}):t===`forms`&&this.formFocus.set({id:e.id})}formFocus=D(null);componentFocus=Q({source:this.tab,computation:()=>null});showForm(e){this.formFocus.set({id:e}),this.switchTab(`forms`)}injectorFocus=Q({source:this.tab,computation:()=>null});showInjector(e){this.config().inspectors.injectors&&(this.switchTab(`injectors`),this.injectorFocus.set(e))}showComponent(e){this.config().inspectors.components&&(this.switchTab(`components`),this.componentFocus.set(e))}inspectFromPanel({source:e,origin:t,data:n}){if(e!==window.parent||t!==location.origin)return;let r=n;r?.type===`pangular:inspect-component`&&typeof r.id==`string`&&this.tab()===`components`&&this.config().inspectors.components&&this.componentFocus.set({id:r.id})}switchTab(e){let t=Z9[e];if(this.view()===`angular`&&t){this.activateDock(t,e);return}this.setTab(e),history.replaceState(history.state,``,`#tab=${e}`)}restoreAnalog=!1;restoreCapacitor=!1;setTab(e){this.restoreAnalog=!1,this.restoreCapacitor=!1,this.keepFocus(),this.tab.set(e),Oae(this.tabScope(),e)}tabScope(){return this.view()??`panel`}async watchAngularNative(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`component-tree`),n=e=>{let t=e?.pages,n=RD(t,this.nativePageId());this.view()===`angular-native`&&YT(n),this.nativePageId.set(n),this.nativeKnown.set(!0)};n(t.value()),this.stopNative(),this.stopNative=t.on(`updated`,n)}catch{this.nativeKnown.set(!0)}}async watchPlugins(e){let t=!this.view()&&i7(location.hash,a7(this.tabScope()),[`plugins`])===`plugins`;try{let n=await e.scope(`pangular`).rpc.sharedState(`plugins`),r=e=>{if(e===void 0)return;let n=vre(e);this.pluginsReporting.set(n),n&&t&&wE(`plugins`,this.config())&&this.tab.set(`plugins`),n&&(t=!1),!n&&this.tab()===`plugins`&&!this.view()&&this.tab.set(`dashboard`)};r(n.value()),this.stopPlugins(),this.stopPlugins=n.on(`updated`,r)}catch{this.pluginsReporting.set(!1)}}async watchCapacitor(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`capacitor`),n=e=>{if(e===void 0)return;let t=y4(e).length>0;this.capacitorReporting.set(t),this.capacitorKnown.set(!0),t&&this.restoreCapacitor&&wE(`capacitor`,this.config())&&(this.restoreCapacitor=!1,this.tab.set(`capacitor`)),!t&&this.tab()===`capacitor`&&!this.view()&&this.tab.set(`dashboard`)};n(t.value()),this.stopCapacitor(),this.stopCapacitor=t.on(`updated`,n)}catch{this.capacitorReporting.set(!1),this.capacitorKnown.set(!0)}}async watchVisibility(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`page-visibility`),n=e=>{let t=e?.hidden;this.hiddenPages.set(Array.isArray(t)?t.filter(e=>typeof e==`string`):[])};n(t.value()),this.stopVisibility(),this.stopVisibility=t.on(`updated`,n)}catch{}}keepFocus(){let e=document.activeElement,t=this.main()?.nativeElement;(!e||e===document.body||t?.contains(e))&&this.focusCurrentTab()}focusCurrentTab(){ud(()=>{let e=document.activeElement;e&&e!==document.body||(this.nav()?.nativeElement.querySelector(`button.active`)??this.main()?.nativeElement)?.focus()},{injector:this.injector})}async activateDock(e,t){if(await n7(e))return;if(window.parent===window){this.keepFocus(),this.showView(e);return}let n=this.rpc();if(!n?.call){this.setTab(t);return}try{await n.call(`hub:docks:activate`,{dockId:Kw(e)}),this.keepFocus(),this.showView(e)}catch{this.setTab(t)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-root`]],viewQuery:function(e,t){e&1&&Xg(t.nav,ace,5)(t.main,oce,5),e&2&&Zg(2)},hostVars:4,hostBindings:function(e,t){e&1&&H(`message`,function(e){return t.inspectFromPanel(e)},Au)(`hashchange`,function(){return t.followHash()},Au)(`keydown`,function(e){return t.onGlobalKey(e)},ju),e&2&&y_(`--%NS%accent`,t.viewAccent()?.accent??null)(`--%NS%accent-text`,t.viewAccent()?.text??null)},decls:41,vars:30,consts:[[`nav`,``],[`main`,``],[1,`brand`],[1,`mark`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 256 256`,`aria-hidden`,`true`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 32 32`,`aria-hidden`,`true`],[`width`,`24`,`height`,`17`,`viewBox`,`0 0 256 182`,`aria-hidden`,`true`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 24 24`,`fill`,`currentColor`,`aria-hidden`,`true`],[`width`,`20`,`height`,`22`,`viewBox`,`0 0 223 236`,`aria-hidden`,`true`],[`width`,`30`,`height`,`30`,`viewBox`,`0 0 500 500`,`aria-hidden`,`true`],[1,`title`],[`aria-label`,`Inspectors`,3,`scroll`,`keydown`],[`role`,`toolbar`,`aria-label`,`Inspectors`,`aria-orientation`,`horizontal`,1,`tab-bar`],[1,`full-panel`,3,`href`],[1,`shell-actions`],[`type`,`button`,`aria-haspopup`,`dialog`,1,`shell-btn`,3,`click`],[`width`,`16`,`height`,`16`,`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z`],[`type`,`button`,`aria-label`,`Settings`,`title`,`Settings`,1,`shell-btn`,3,`click`],[`name`,`settings`],[`role`,`status`,1,`status`],[`aria-hidden`,`true`,1,`dot`],[`tabindex`,`0`],[`role`,`status`,1,`background-note`],[`role`,`status`,1,`sr-only`],[3,`tabs`,`layout`,`theme`,`passive`,`hotkey`,`paletteShortcut`,`rpc`],[3,`client`],[`role`,`alert`,1,`connection-error`],[`role`,`status`,1,`turned-off`],[3,`info`],[1,`turned-off`],[3,`openChange`,`picked`,`commands`,`open`],[`fill`,`#3c5afd`,`d`,`M237.248 18.752q18.061 18.06 18.748 45.247V192c-.457 18.12-6.707 33.207-18.748 45.247c-12.04 12.04-27.127 18.291-45.251 18.752H63.999q-27.187-.69-45.247-18.752C6.712 225.208.46 210.121 0 192.001V64q.69-27.187 18.752-45.247Q36.812.692 63.999 0h127.998c18.124.46 33.211 6.711 45.251 18.752m-17.655 103q-6.033-6.003-6.28-15.066V64q-.192-9.063-6.221-15.091c-4.02-4.023-9.054-6.093-15.095-6.22h-21.312v106.626L85.315 42.687H63.999c-6.042.128-11.072 2.198-15.091 6.221c-4.023 4.02-6.093 9.05-6.22 15.09v42.688q-.249 9.063-6.281 15.066q-6.03 5.996-15.091 6.246q9.062.255 15.09 6.25c4.024 4.002 6.115 9.024 6.281 15.066V192c.128 6.037 2.198 11.072 6.221 15.091q6.03 6.03 15.09 6.22h21.317V106.687l85.37 106.627h21.312c6.041-.128 11.076-2.202 15.095-6.221s6.093-9.054 6.22-15.09v-42.688q.249-9.063 6.281-15.066q6.03-5.995 15.091-6.25q-9.062-.25-15.09-6.246`],[`fill`,`#53b9ff`,`d`,`M39.863 54.115L.311 93.716l60.995 61.179L0 216.385l39.428 39.619l61.43-61.507l61.097 61.068l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m140.517 154.896l-39.658 39.601l61.097 61.069l39.552-39.602z`],[`fill-opacity`,`.2`,`d`,`m140.517 154.896l-39.658 39.601l15.267 15.182z`],[`fill`,`#53b9ff`,`d`,`M194.57 100.985L256 39.478L216.431 0l-61.412 61.384L93.917.311L54.365 39.913L216.01 201.761l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m115.36 100.987l39.659-39.602L93.917.313L54.365 39.914z`],[`fill-opacity`,`.2`,`d`,`m115.359 100.985l39.659-39.601l-15.271-15.186z`],[`id`,`an-mark-grad`,`x1`,`0`,`y1`,`0`,`x2`,`1`,`y2`,`1`],[`offset`,`0`,`stop-color`,`#f0224f`],[`offset`,`1`,`stop-color`,`#c4002d`],[`d`,`M16 0C27.2 0 32 4.8 32 16S27.2 32 16 32 0 27.2 0 16 4.8 0 16 0Z`,`fill`,`url(#an-mark-grad)`],[`transform`,`translate(6.4 6.4) scale(0.8)`,`fill`,`#fff`],[`d`,`M14.8486 0L23.138 16.8551L23.9996 3.99892L14.8486 0Z`],[`d`,`M16.9875 17.7114H7.01272L5.73926 20.627L12.0001 24L18.261 20.627L16.9875 17.7114Z`],[`d`,`M8.72168 13.9298H15.2812L11.9997 6.39575L8.72168 13.9298Z`],[`d`,`M9.15103 0L0 3.99892L0.861556 16.8551L9.15103 0Z`],[`fill`,`#c30f2e`,`d`,`M152.228.001L48.455 181.046H256L152.228 0z`],[`fill`,`#dd0330`,`d`,`M88.314 26.967L0 181.52h176.628L88.315 26.967z`],[`fill`,`#fff`,`d`,`M18.167 135.294h220.236v-2.419H18.167z`],[`fill`,`#fff`,`d`,`M204.38 170.667c-.861 0-1.67-.358-2.348-1.034c-4.045-4.063-4.221-20.586-4.026-45.33c.11-13.521.257-32.043-1.9-33.504c-2.104.873-2.315 16.172-2.451 26.301c-.162 11.785-.327 23.98-2.242 30.189c-.57 1.84-1.306 3.525-2.786 3.39c-2.086-.185-2.76-3.48-4.317-16.478c-.647-5.4-1.317-10.98-2.101-13.14a11 11 0 0 0-.269-.66c-.835 1.889-1.8 7.079-2.47 10.682c-.927 4.976-1.803 9.676-2.9 11.726c-.847 1.575-2.19 3.63-4.067 3.231c-2.558-.537-3.323-5.693-3.552-8.719c0-25.455-3.33-28.417-3.997-28.753l-.107.081l-.162-.036c-2.377 1.038-2.506 9.294-2.627 17.276c-.096 5.856-.198 12.492-1.053 18.701c-1.108 8.05-2.448 9.603-4.115 9.507c-3.838-.262-3.95-13.482-3.95-14.987c0-.472.012-1.028.027-1.642c.074-3.076.205-8.8-1.687-10.604c-.25-.239-.603-.515-.879-.437c-1.347.339-2.745 4.714-3.209 6.153c-.147.457-.265.833-.364 1.09c-.078.214-.177.515-.294.88c-1.02 3.095-2.18 6.183-4.16 6.944c-.732.284-1.498.222-2.216-.183c-.953-.541-1.73-1.646-2.455-3.482c-.397-1.016-.735-2.046-1.082-3.081c-.419-1.263-.85-2.569-1.384-3.808c-.419-.965-1.464-1.4-2.796-1.164c-2.768.494-3.232 3.29-3.622 7.5c-.07.733-.137 1.452-.228 2.128c-.011.198-.501 6.38-.814 8.344c-.865 5.39-2.002 7.512-3.89 7.358c-4.66-.398-6.798-20.836-6.684-29.47c.088-6.592-1.104-9-1.818-9.382c-.074-.034-.189-.096-.46.095c-.843.571-1.594 2.348-1.363 4.215c2.566 20.32.674 43.592-3.96 48.833c-1.46 1.649-3.448 1.627-4.832.236c-4.049-4.064-4.218-20.586-4.026-45.33c.11-13.521.254-32.043-1.9-33.504c-2.105.873-2.311 16.172-2.45 26.301c-.163 11.785-.329 23.98-2.246 30.189c-.57 1.84-1.307 3.525-2.782 3.39c-2.091-.186-2.761-3.48-4.321-16.478c-.649-5.4-1.319-10.98-2.101-13.14c-.1-.273-.189-.49-.27-.66c-.832 1.889-1.796 7.079-2.466 10.682c-.927 4.976-1.803 9.676-2.904 11.726c-.846 1.575-2.19 3.63-4.063 3.231c-2.558-.537-3.324-5.693-3.552-8.719c-.003-25.455-3.33-28.417-3.997-28.753l-.106.081l-.166-.036c-2.374 1.038-2.503 9.293-2.629 17.276c-.091 5.856-.194 12.492-1.048 18.701c-1.107 8.05-2.437 9.618-4.111 9.507c-3.846-.262-3.958-13.482-3.958-14.987c0-.472.016-1.028.03-1.642c.074-3.076.207-8.8-1.685-10.604c-.25-.239-.603-.515-.88-.438c-1.347.34-2.75 4.715-3.206 6.155a47 47 0 0 1-.364 1.09q-.16.432-.298.875c-1.02 3.096-2.18 6.187-4.155 6.95c-.736.282-1.506.22-2.22-.185c-.953-.541-1.734-1.646-2.454-3.482c-.398-1.016-.74-2.046-1.083-3.081c-.42-1.263-.854-2.569-1.387-3.808c-.416-.965-1.465-1.4-2.797-1.164c-3.188.567-3.943 4.52-4.55 9.238l-.106.839l-2.411-.32l.114-.824c.527-4.137 1.328-10.39 6.53-11.31c2.446-.435 4.585.581 5.446 2.583c.578 1.34 1.031 2.695 1.466 4.008c.324.99.654 1.98 1.037 2.959c.674 1.708 1.197 2.15 1.392 2.257c1.218-.38 2.462-4.167 2.873-5.414c.13-.402.24-.732.328-.968c.085-.233.195-.571.328-.98c1.097-3.43 2.474-7.144 4.918-7.762c.747-.191 1.903-.166 3.157 1.035c2.665 2.544 2.525 8.48 2.433 12.41c-.014.59-.028 1.126-.028 1.583c0 6.272.93 10.655 1.64 12.16c.367-.77.998-2.63 1.598-7.007c.831-6.066.938-12.624 1.027-18.41c.161-10.24.275-17.663 3.982-19.408c.552-.339 1.469-.522 2.436-.033c3.586 1.803 5.326 11.885 5.326 30.817c.225 2.926 1.013 6.006 1.66 6.448c.004-.066.53-.39 1.394-2.01c.925-1.718 1.845-6.665 2.655-11.026c1.792-9.614 2.606-12.989 4.726-13.166c1.615-.158 2.362 1.896 2.676 2.76c.883 2.422 1.537 7.888 2.23 13.678c.54 4.49 1.31 10.902 2.094 13.497c.084-.228.18-.5.283-.836c1.815-5.878 1.98-17.887 2.14-29.507c.22-16.14.503-26.139 3.448-28.226a2.44 2.44 0 0 1 2.233-.316c3.448 1.144 3.714 11.254 3.519 35.8c-.14 17.799-.313 39.952 3.323 43.603c.317.32.542.32.622.32c.17 0 .413-.161.67-.452c3.681-4.162 6.01-26.022 3.372-46.927c-.328-2.602.677-5.337 2.392-6.514c.946-.652 2.036-.736 2.978-.232c2.145 1.14 3.187 5.024 3.102 11.546c-.15 11.387 2.584 24.714 4.37 26.842c.282-.471.842-1.763 1.379-5.145c.301-1.87.799-8.153.806-8.216c.09-.71.155-1.398.217-2.097c.369-3.924.82-8.804 5.613-9.654c2.444-.435 4.583.577 5.448 2.583c.577 1.34 1.027 2.695 1.46 4.008c.332.99.664 1.98 1.046 2.959c.67 1.708 1.197 2.15 1.387 2.257c1.218-.38 2.467-4.167 2.875-5.41c.132-.402.243-.737.328-.973c.088-.228.195-.57.324-.979c1.1-3.43 2.477-7.144 4.924-7.762c.74-.191 1.9-.166 3.154 1.035c2.665 2.543 2.526 8.48 2.437 12.41q-.029.792-.033 1.583c0 6.272.931 10.655 1.641 12.16c.365-.77.994-2.63 1.601-7.007c.832-6.066.931-12.624 1.027-18.41c.159-10.24.273-17.663 3.98-19.408c.55-.339 1.467-.522 2.44-.033c3.58 1.803 5.325 11.884 5.325 30.817c.224 2.926 1.012 6.006 1.656 6.448c.008-.066.526-.39 1.399-2.01c.923-1.718 1.84-6.665 2.653-11.026c1.786-9.614 2.602-12.989 4.722-13.166c1.62-.158 2.367 1.896 2.68 2.76c.88 2.422 1.535 7.888 2.233 13.678c.534 4.49 1.304 10.902 2.092 13.497c.08-.228.176-.5.28-.836c1.813-5.878 1.976-17.887 2.138-29.507c.216-16.14.504-26.139 3.448-28.226a2.45 2.45 0 0 1 2.234-.316c3.452 1.144 3.718 11.254 3.52 35.8c-.141 17.799-.314 39.952 3.319 43.603c.324.32.544.32.63.32c.165 0 .408-.161.662-.452c3.687-4.162 6.014-26.022 3.375-46.927c-.342-2.723.43-5.47 1.84-6.526c.71-.537 1.575-.647 2.37-.313c2.054.877 3.445 4.63 4.255 11.484c.339 2.87.641 5.974.931 9.036c.641 6.683 1.509 15.69 2.684 17.67c.36-.46 1.096-1.704 2.19-5.038l2.307.753c-1.696 5.157-3.026 7.1-4.755 6.902c-2.69-.299-3.468-5.734-4.84-20.055c-.29-3.048-.59-6.132-.928-8.989c-1.03-8.74-2.782-9.532-2.801-9.54c-.342.174-1.137 1.992-.842 4.31c2.558 20.32.673 43.597-3.964 48.834c-.747.842-1.587 1.27-2.485 1.27`],[`d`,`M12.024.017V0L12 .008L11.976 0v.017L.812 3.892l1.605 14.875l9.559 5.207V24l.024-.013l.024.013v-.026l9.559-5.207l1.605-14.875zm6.868 14.244q-1.64 3.948-6.031 4.166c-2.829 0-4.661-1.7-4.66-1.7q-1.745-1.359-2.398-3.417c-.695-.76-.702-.841-.774-1.145c-.072-.303.045-.388.249-.685q.204-.298.098-.85q-.26-.36-.3-1.128q0-.37.496-.783q.495-.413.607-.632q.083-.119.065-1.031q-.006-.897.995-.975c1-.08 1.565-.832 1.879-1.174c.21-.228.52-.339.91-.341c.551-.026 1.052.185 1.484.62c1.075-.055 2.176.235 3.292.863q2.379 1.414 2.596 3.055q-.257 2.158-5.788-.113q-2.895.819-2.846 3.552q0 2.508 2.422 3.643c-.787-.772-1.122-1.422-1.01-1.959q2.456 2.906 5.588 2.173c-.92.032-1.65-.264-2.198-.893q2.116-.05 3.998-1.972c-.724.576-1.482.794-2.284.657q3.26-2.563 2.307-5.98l-.002-.006a3.02 3.02 0 0 1 .788 2.03q.023 1.175-.795 2.477q.613-.478 1.413-2.047c.23 2.117-.625 3.724-2.574 4.825q.934-.085 2.473-1.23m-5.567-6.63a.319.319 0 1 1 .638 0a.319.319 0 0 1-.638 0`],[`id`,`ng-grad`,`x1`,`49`,`x2`,`226`,`y1`,`214`,`y2`,`130`,`gradientUnits`,`userSpaceOnUse`],[`stop-color`,`#E40035`],[`offset`,`.24`,`stop-color`,`#F60A48`],[`offset`,`.352`,`stop-color`,`#F20755`],[`offset`,`.494`,`stop-color`,`#DC087D`],[`offset`,`.745`,`stop-color`,`#9717E7`],[`offset`,`1`,`stop-color`,`#6C00F5`],[`fill`,`url(#ng-grad)`,`d`,`m222.077 39.192-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z`],[`width`,`500`,`height`,`500`,`rx`,`112`,`fill`,`#1c1a17`],[`transform`,`translate(250 252) scale(1.38) translate(-120 -129)`],[`id`,`pi-mark-mask`],[`x`,`-60`,`y`,`-60`,`width`,`360`,`height`,`380`,`fill`,`#fff`],[`fill`,`none`,`stroke`,`#000`,`stroke-width`,`30`,`stroke-linejoin`,`miter`],[`d`,`M88 66 V196`],[`d`,`M88 66 H143 L170 98 L143 130 H88 Z`],[`id`,`pi-mark-clip`],[`x`,`-40`,`y`,`129`,`width`,`320`,`height`,`200`],[`transform`,`rotate(-10 120 129)`],[`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#78350f`,`stroke-width`,`10`],[`mask`,`url(#pi-mark-mask)`],[`fill`,`#fbbf24`,`d`,`M120 5 L2 46 L22 198 L120 253 Z`],[`fill`,`#f59e0b`,`d`,`M120 5 L238 46 L218 198 L120 253 Z`],[`clip-path`,`url(#pi-mark-clip)`,`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#1c1a17`,`stroke-width`,`22`],[`clip-path`,`url(#pi-mark-clip)`,`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#fde68a`,`stroke-width`,`10`],[`transform`,`translate(230.9 146.0) rotate(10) scale(1.5) translate(-4 -4)`],[`x1`,`9`,`y1`,`9`,`x2`,`21`,`y2`,`21`,`stroke`,`#1c1a17`,`stroke-width`,`14`,`stroke-linecap`,`round`],[`r`,`16`,`fill`,`#1c1a17`],[`x1`,`9`,`y1`,`9`,`x2`,`21`,`y2`,`21`,`stroke`,`#fde68a`,`stroke-width`,`7`,`stroke-linecap`,`round`],[`r`,`12`,`fill`,`#1c1a17`,`stroke`,`#fde68a`,`stroke-width`,`5`],[`type`,`button`,3,`active`],[`type`,`button`,3,`click`],[3,`name`],[1,`full-panel`,3,`click`,`href`],[`width`,`14`,`height`,`14`,`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`3`,`y`,`14`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`14`,`y`,`14`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[3,`layoutChange`,`themeChange`,`passiveChange`,`tabs`,`layout`,`theme`,`passive`,`hotkey`,`paletteShortcut`,`rpc`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`sr-only`],[3,`rpc`],[3,`rpc`,`canShowComponent`],[3,`rpc`,`focus`,`command`,`canShowInjector`],[3,`rpc`,`focus`,`canShowComponent`],[3,`rpc`,`focus`],[3,`rpc`,`canShowComponent`,`canExplainInjection`],[3,`navigate`,`rpc`],[3,`open`,`rpc`],[3,`showComponent`,`rpc`,`canShowComponent`],[3,`focusHandled`,`commandHandled`,`showForm`,`showInjector`,`rpc`,`focus`,`command`,`canShowInjector`],[3,`showComponent`,`rpc`],[3,`focusHandled`,`showComponent`,`rpc`,`focus`,`canShowComponent`],[3,`focusHandled`,`rpc`,`focus`],[3,`showComponent`,`rpc`,`canShowComponent`,`canExplainInjection`]],template:function(e,t){if(e&1){let e=V();I(0,`header`)(1,`h1`,2)(2,`span`,3),j(3,lce,2,0,`:svg:svg`,4)(4,uce,7,0,`:svg:svg`,4)(5,dce,11,0,`:svg:svg`,5)(6,fce,5,0,`:svg:svg`,6)(7,pce,2,0,`:svg:svg`,7)(8,mce,10,0,`:svg:svg`,8)(9,hce,24,0,`:svg:svg`,9),L(),I(10,`span`,10),K(11),L()(),I(12,`nav`,11,0),H(`scroll`,function(){return t.measureNav()})(`keydown`,function(e){return t.onNavKey(e)}),j(14,_ce,3,0,`div`,12),L(),j(15,vce,7,1,`a`,13),I(16,`span`,14)(17,`button`,15),H(`click`,function(){return t.openPalette()}),E(),I(18,`svg`,16),R(19,`path`,17),L()(),bs(),I(20,`button`,18),H(`click`,function(){return t.toggleSettings()}),R(21,`app-tab-icon`,19),L()(),I(22,`span`,20)(23,`span`,21),R(24,`span`),L(),K(25),L()(),I(26,`main`,22,1)(28,`p`,23),K(29),L(),I(30,`p`,24),K(31),L(),j(32,yce,1,7,`app-settings`,25)(33,bce,1,1,`app-auth-code`,26)(34,xce,5,0,`div`,27)(35,Sce,2,0,`p`,28)(36,Cce,1,1,`app-coming-soon`,29)(37,wce,2,0,`p`,28)(38,Ece,10,2,`p`,30)(39,Wce,2,2),L(),I(40,`app-command-palette`,31),W_(`openChange`,function(n){return w(e),U_(t.paletteOpen,n)||(t.paletteOpen=n),T(n)}),H(`picked`,function(e){return t.runCommand(e)}),L()}if(e&2){let e,n;O(2),G(`ng-mark`,t.view()===`angular`)(`pi-mark`,!t.view()),O(),M(t.view()===`nativescript`?3:t.view()===`capacitor`?4:t.view()===`angular-native`?5:t.view()===`analog`?6:t.view()===`ngrx`?7:t.view()===`angular`?8:9),O(7),G(`ng-text`,t.view()===`angular`),O(),q(t.title()),O(),G(`fade-start`,t.navFade().start)(`fade-end`,t.navFade().end),O(2),M(t.availableTabs().length>1?14:-1),O(),M((e=t.fullPanelLink())?15:-1,e),O(2),A(`aria-label`,`Command palette (`+t.paletteShortcut+`)`)(`title`,`Command palette (`+t.paletteShortcut+`)`),O(3),G(`active`,t.tab()===`settings`),A(`aria-pressed`,t.tab()===`settings`),O(2),G(`connected`,t.connected())(`failed`,t.connectionFailed()),O(3),J(` `,t.connected()?`Live`:t.connectionFailed()?`Disconnected`:t.pairing()?`Code needed`:`Connecting…`,` `),O(),A(`aria-label`,t.mainLabel()),O(3),q(t.backgroundNote()),O(2),q(t.connectedNote()),O(),M(t.tab()===`settings`?32:(n=t.pairing())?33:t.connectionFailed()?34:t.rpc()?(n=t.comingSoon())?36:t.view()===`angular-native`&&!t.nativePageId()?37:t.tabEnabled(t.tab(),t.config())?39:38:35,n),O(8),F(`commands`,t.paletteCommands()),H_(`open`,t.paletteOpen)}},dependencies:[SD,$F,Nz,GV,rW,Tq,vJ,GX,fQ,L1,a4,X3,B8,xre,die,oae,f4,HE,Yse,ice,Ese],styles:[`[_nghost-%COMP%] { --%NS%accent-soft: color-mix(in srgb, var(--%NS%accent) 12%, transparent); --%NS%accent-line: color-mix(in srgb, var(--%NS%accent) var(--%NS%accent-line-amount), transparent); display: flex; diff --git a/extension/ui/index.html b/extension/ui/index.html index 58ac1b57..f7d72df3 100644 --- a/extension/ui/index.html +++ b/extension/ui/index.html @@ -9,7 +9,7 @@ Pangular Inspector - + diff --git a/packages/devtools/CHANGELOG.md b/packages/devtools/CHANGELOG.md index 2e5dd8d8..f3ffa1c7 100644 --- a/packages/devtools/CHANGELOG.md +++ b/packages/devtools/CHANGELOG.md @@ -202,6 +202,8 @@ What remains: `/config` exports `DEFAULT_POPUP_HOTKEY`, `PANGULAR_ACTIONS`, `PAN - `@pangular-inspector/devtools/devframe` (and the package root) load Devframe from `node_modules` when imported, as the hub entry does, so an Angular 20 server bundle that imports them no longer fails with `Identifier 'createRequire' has already been declared` (#427). - Picking works inside shadow roots and `ShadowDom` components. - Analog server calls link only to the request they ran under (#405). +- Analog server calls no longer mix across tabs. Each call carries the `pageId` of its tab when the dev server can tell (an `x-pangular-page` header that `withPangular()` sends on same-origin requests in dev builds, the page render's id from `Server-Timing`, or a `Referer` only one open tab matches), and leaves with that tab. The **Server** tab shows its own tab's calls, with an **All tabs (including untagged)** switch, and `analog-list-server-calls` takes `page` (#369). +- The Analog source scan is kept until a file changes (the Vite watcher, or `fs.watch` outside Vite) instead of running again every 2 seconds, and an Analog report no longer waits for it: the rescan runs after the push and the open pages are checked again (#369). - The Analog page chain includes pages in named outlets and sibling child routes, not only the first child. The primary chain comes first, and each other page names its outlet in the **Routes** tab and in `analog-inspect-page` (#369). - Signal Forms checkboxes, radios and selects are written in user mode (#360). - Live counts in **Timeline**, **Errors** and **Audit** speak only after a filter change, so they no longer flood screen readers. diff --git a/packages/devtools/src/__tests__/analog-call-header.test.ts b/packages/devtools/src/__tests__/analog-call-header.test.ts new file mode 100644 index 00000000..e16443d3 --- /dev/null +++ b/packages/devtools/src/__tests__/analog-call-header.test.ts @@ -0,0 +1,126 @@ +// @vitest-environment jsdom +import '@angular/compiler'; +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; +import { Injector, PLATFORM_ID, runInInjectionContext } from '@angular/core'; +import { HttpRequest, HttpResponse, type HttpEvent } from '@angular/common/http'; +import { of } from 'rxjs'; +import { pangularHttpInterceptor } from '../http.ts'; +import { httpRegistry } from '../http-rules.ts'; +import { runInAnalogRender } from '../ssr-context.ts'; +import { ANALOG_META_DESCRIPTION, attachAnalog } from '../analog-runtime.ts'; +import { isAnalogReport } from '../rpc/analog-tools.ts'; + +const g = globalThis as { ngDevMode?: unknown }; +let saved: unknown; + +beforeEach(() => { + saved = g.ngDevMode; + g.ngDevMode = true; + httpRegistry().calls = []; +}); + +afterEach(() => { + g.ngDevMode = saved; + delete httpRegistry().pageId; + vi.restoreAllMocks(); +}); + +/** The request the interceptor passes on, for a call made on `platform`. */ +function sent(url: string, platform: 'browser' | 'server' = 'browser'): HttpRequest { + let out!: HttpRequest; + const injector = Injector.create({ providers: [{ provide: PLATFORM_ID, useValue: platform }] }); + runInInjectionContext(injector, () => + pangularHttpInterceptor(new HttpRequest('GET', url), (req) => { + out = req; + return of(new HttpResponse({ status: 200, body: {} }) as HttpEvent); + }), + ).subscribe(); + return out; +} + +describe('the page header on Analog requests', () => { + it('sends the page id on same-origin requests only', () => { + httpRegistry().pageId = 'pg1'; + expect(sent('/api/_analog/pages/products/1').headers.get('x-pangular-page')).toBe('pg1'); + expect(sent(`${location.origin}/api/v1/hello`).headers.get('x-pangular-page')).toBe('pg1'); + // A custom header on another origin would add a CORS preflight. + expect(sent('https://api.example.com/v1').headers.has('x-pangular-page')).toBe(false); + }); + + it('sends nothing before an Analog page reported its id', () => { + expect(sent('/api/_analog/pages/products/1').headers.has('x-pangular-page')).toBe(false); + }); + + it('keeps the recorded request free of the header', () => { + httpRegistry().pageId = 'pg1'; + sent('/api/v1/hello'); + const call = httpRegistry().calls!.at(-1)!; + expect(JSON.stringify(call)).not.toContain('x-pangular-page'); + }); + + it('sends the render id on the /_analog requests of a server render', () => { + const load = runInAnalogRender('r1', () => + sent('http://localhost:5173/api/_analog/pages/products/1', 'server'), + ); + expect(load.headers.get('x-pangular-render')).toBe('r1'); + const other = runInAnalogRender('r1', () => sent('https://api.example.com/v1', 'server')); + expect(other.headers.has('x-pangular-render')).toBe(false); + expect( + sent('http://localhost:5173/api/_analog/fn/x', 'server').headers.has('x-pangular-render'), + ).toBe(false); + }); +}); + +describe('the Analog collector and its render', () => { + const META = Symbol(ANALOG_META_DESCRIPTION); + const router = (config: unknown[]) => ({ + url: '/', + config, + routerState: { snapshot: { root: { routeConfig: null, data: {}, firstChild: null } } }, + }); + + it('reports the render id from Server-Timing and hands its page id to the interceptor', () => { + vi.spyOn(performance, 'getEntriesByType').mockReturnValue([ + { serverTiming: [{ name: 'pangular-analog', description: 'abc123', duration: 0 }] }, + ] as never); + document.body.innerHTML = ''; + const ng = { + getInjector: () => ({}), + ɵgetRouterInstance: () => + router([ + { + path: '', + [META]: { endpoint: '/pages/', endpointKey: '/src/app/pages/index.page.ts' }, + }, + ]), + }; + const reports: Record[] = []; + const call = async (_name: string, report: unknown) => + void reports.push(report as Record); + const detach = attachAnalog({ rpc: { call } } as never, 'pg1', () => ng, 60_000); + try { + expect(reports[0]).toMatchObject({ pageId: 'pg1', renderId: 'abc123' }); + expect(isAnalogReport(reports[0])).toBe(true); + expect(httpRegistry().pageId).toBe('pg1'); + } finally { + detach(); + } + expect(httpRegistry().pageId).toBeUndefined(); + expect(isAnalogReport({ ...reports[0], renderId: '"; drop' })).toBe(false); + }); + + it('leaves the requests of an app that is not Analog alone', () => { + const ng = { getInjector: () => ({}), ɵgetRouterInstance: () => router([{ path: '' }]) }; + const detach = attachAnalog( + { rpc: { call: async () => {} } } as never, + 'pg1', + () => ng, + 60_000, + ); + try { + expect(httpRegistry().pageId).toBeUndefined(); + } finally { + detach(); + } + }); +}); diff --git a/packages/devtools/src/__tests__/analog-call-pages.test.ts b/packages/devtools/src/__tests__/analog-call-pages.test.ts new file mode 100644 index 00000000..5017fe99 --- /dev/null +++ b/packages/devtools/src/__tests__/analog-call-pages.test.ts @@ -0,0 +1,150 @@ +import { EventEmitter } from 'node:events'; +import { afterEach, describe, expect, it } from 'vitest'; +import { + analogMiddleware, + bindRenderCalls, + clearCalls, + dropCalls, + recentCalls, +} from '../analog-server-log.ts'; +import { beginRender, clearRenders, setPagesAtPath } from '../analog-call-pages.ts'; +import { currentAnalogRender, runInSsrRequest } from '../ssr-context.ts'; + +class FakeRes extends EventEmitter { + statusCode = 200; + headers: Record = {}; + getHeader(name: string) { + return this.headers[name.toLowerCase()]; + } + setHeader(name: string, value: string) { + this.headers[name.toLowerCase()] = value; + } + write() { + return true; + } + end(chunk?: unknown) { + void chunk; + this.emit('finish'); + return this; + } +} + +function run( + url: string, + headers: Record = {}, + options: { method?: string; body?: string; inside?: () => void } = {}, +) { + const req = { url, originalUrl: url, method: options.method ?? 'GET', headers } as never; + const res = new FakeRes(); + analogMiddleware('api')(req, res as never, () => options.inside?.()); + res.end(options.body); + return { res, call: recentCalls().at(-1)! }; +} + +const html = { accept: 'text/html', 'user-agent': 'Mozilla/5.0' }; +const browser = { 'user-agent': 'Mozilla/5.0' }; + +afterEach(() => { + clearCalls(); + clearRenders(); + setPagesAtPath(undefined); +}); + +describe('Analog server calls and their tab', () => { + it('tags a call with the page id the app sends in x-pangular-page', () => { + const { call } = run('/api/_analog/pages/products/1', { + ...browser, + 'x-pangular-page': 'pg1', + }); + expect(call.pageId).toBe('pg1'); + }); + + it('ignores a page header that is not a page id', () => { + const { call } = run('/api/_analog/pages/products/1', { + ...browser, + 'x-pangular-page': '', + }); + expect(call.pageId).toBeUndefined(); + }); + + it('gives a page render an id in Server-Timing and ties it, and its own requests, to the page that reports it', () => { + let renderSeen: string | undefined; + const { res, call: page } = run('/products/1', html, { + inside: () => { + // What the app's interceptor reads during the render. + renderSeen = currentAnalogRender(); + }, + }); + expect(page.renderId).toMatch(/^[a-z0-9]+$/); + expect(res.headers['server-timing']).toBe(`pangular-analog;desc="${page.renderId}"`); + expect(renderSeen).toBe(page.renderId); + + const { call: load } = run('/api/_analog/pages/products/1', { + 'user-agent': 'node', + 'x-pangular-render': page.renderId!, + }); + expect(load).toMatchObject({ from: 'ssr', renderId: page.renderId }); + expect(load.pageId).toBeUndefined(); + + expect(bindRenderCalls(page.renderId, 'pg1')).toBe(true); + expect(recentCalls().map((c) => c.pageId)).toEqual(['pg1', 'pg1']); + + // Later calls of that render are tagged as they come in. + const { call: later } = run('/api/_analog/fn/abc', { + 'user-agent': 'node', + 'x-pangular-render': page.renderId!, + }); + expect(later.pageId).toBe('pg1'); + }); + + it('keeps a render on the first page that reports it', () => { + const { call } = run('/products/1', html); + bindRenderCalls(call.renderId, 'pg1'); + expect(bindRenderCalls(call.renderId, 'pg2')).toBe(false); + expect(recentCalls()[0].pageId).toBe('pg1'); + }); + + it('ignores a render id the dev server never gave out', () => { + const { call } = run('/api/_analog/pages/products/1', { + 'user-agent': 'node', + 'x-pangular-render': 'forged1', + }); + expect(call.renderId).toBeUndefined(); + expect(bindRenderCalls('forged1', 'pg1')).toBe(false); + }); + + it('keeps the render id when an SSR tracer runs inside the render', () => { + let seen: string | undefined; + run('/products/1', html, { + inside: () => runInSsrRequest(undefined, () => (seen = currentAnalogRender())), + }); + expect(seen).toBe(recentCalls()[0].renderId); + }); + + it('tags a call by its Referer only when exactly one live page shows that path', () => { + const pages: Record = { '/products/1': ['pg1'], '/': ['pg1', 'pg2'] }; + setPagesAtPath((path) => pages[path] ?? []); + const action = (referer: string) => + run('/api/_analog/pages/products/1', { ...browser, referer }, { method: 'POST' }).call; + expect(action('http://localhost:5173/products/1?tab=2').pageId).toBe('pg1'); + expect(action('http://localhost:5173/').pageId).toBeUndefined(); + expect(action('http://localhost:5173/nowhere').pageId).toBeUndefined(); + // A document request's Referer is the page it came from, often another tab. + expect( + run('/products/2', { ...html, referer: 'http://localhost:5173/products/1' }).call.pageId, + ).toBeUndefined(); + }); + + it('drops the calls of a page that left, and keeps the untagged ones', () => { + run('/api/_analog/pages/a', { ...browser, 'x-pangular-page': 'pg1' }); + run('/api/_analog/pages/b', browser); + dropCalls((call) => call.pageId === 'pg1'); + expect(recentCalls().map((c) => c.route)).toEqual(['/b']); + }); + + it('forgets render ids past the cap, so they tag nothing', () => { + const first = beginRender(); + for (let i = 0; i < 201; i++) beginRender(); + expect(bindRenderCalls(first, 'pg1')).toBe(false); + }); +}); diff --git a/packages/devtools/src/__tests__/analog-page-calls.test.ts b/packages/devtools/src/__tests__/analog-page-calls.test.ts new file mode 100644 index 00000000..07dba5dc --- /dev/null +++ b/packages/devtools/src/__tests__/analog-page-calls.test.ts @@ -0,0 +1,208 @@ +import { writeFileSync } from 'node:fs'; +import { join } from 'node:path'; +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; +import { clearCalls, recordCall, recentCalls, type AnalogCall } from '../analog-server-log.ts'; +import { beginRender, clearRenders } from '../analog-call-pages.ts'; +import { registerAnalog, stopAnalog } from '../rpc/analog-register.ts'; +import { resetScanVersion, viteScanWatcher } from '../rpc/analog-scan-cache.ts'; +import type { AnalogState } from '../rpc/analog-tools.ts'; +import type { AnalogRuntimeReport } from '../analog-runtime.ts'; +import { BASE_FILES, makeProject } from './analog-fixture.ts'; + +const scans = vi.hoisted(() => ({ count: 0 })); +vi.mock('../rpc/analog-scan.ts', async (original) => { + const actual = await original(); + return { + ...actual, + scanAnalog: (cwd: string) => { + scans.count++; + return actual.scanAnalog(cwd); + }, + }; +}); + +type AnyRecord = Record; + +async function boot(cwd: string, ttl = () => 30_000) { + let value: AnalogState; + const handlers = new Map unknown>(); + const tools = new Map Promise<{ markdown: string }>>(); + const my = { + rpc: { + register: (d: AnyRecord) => handlers.set(d['name'], d['handler']), + sharedState: async (_name: string, options: AnyRecord) => { + value = structuredClone(options['initialValue']); + return { + value: () => value, + mutate: (fn: (draft: AnalogState) => void) => fn(value), + }; + }, + }, + }; + const ctx = { + cwd, + agent: { registerTool: (t: AnyRecord) => tools.set(t['id'], t['handler']) }, + }; + await registerAnalog(my, ctx, { ttl }); + return { + state: () => value, + rpc: (name: string, arg?: unknown) => handlers.get(name)!(arg), + tool: async (id: string, args: AnyRecord = {}) => + (await tools.get(`pangular:${id}`)!(args)).markdown, + }; +} + +const report = (pageId: string, extra: Partial = {}): AnalogRuntimeReport => ({ + pageId, + url: '/products/1', + analog: true, + chain: [{ path: '/products/:id', file: '/src/app/pages/products/[id].page.ts' }], + hydrated: 0, + transferState: false, + hydrationErrors: [], + configPaths: ['/'], + ...extra, +}); + +const call = (fields: Partial) => + recordCall({ + at: Date.now(), + kind: 'load', + method: 'GET', + url: '/api/_analog/pages/products/1', + route: '/products/1', + status: 200, + ms: 1, + from: 'browser', + ...fields, + }); + +beforeEach(() => { + clearCalls(); + clearRenders(); + resetScanVersion(); + scans.count = 0; +}); + +afterEach(() => { + stopAnalog(); + resetScanVersion(); + vi.useRealTimers(); +}); + +describe('Analog server calls per tab', () => { + it('ties a render and its calls to the page that reports the render id', async () => { + const { rpc, state } = await boot(makeProject(BASE_FILES)); + const renderId = beginRender(); + call({ kind: 'page', url: '/products/1', from: 'browser', renderId }); + call({ from: 'ssr', renderId }); + rpc('push-analog', report('pg1', { renderId })); + expect(state().calls.map((c) => c.pageId)).toEqual(['pg1', 'pg1']); + }); + + it("lists one tab's calls with `page`, and every call without it", async () => { + const { rpc, tool } = await boot(makeProject(BASE_FILES)); + rpc('push-analog', report('pg1')); + rpc('push-analog', report('pg2')); + call({ url: '/api/_analog/pages/one', pageId: 'pg1' }); + call({ url: '/api/_analog/pages/two', pageId: 'pg2' }); + call({ url: '/api/_analog/pages/untagged' }); + + const one = await tool('analog-list-server-calls', { page: 'pg1' }); + expect(one).toContain('/api/_analog/pages/one'); + expect(one).not.toContain('/two'); + expect(one).not.toContain('/untagged'); + + const all = await tool('analog-list-server-calls'); + expect(all).toContain('/two'); + expect(all).toContain('/untagged'); + expect(all).toContain('page `pg1`'); + + expect(await tool('analog-list-server-calls', { page: 'nope' })).toContain( + 'No page `nope` is reporting Analog data', + ); + }); + + it('says when a tab has no calls of its own yet', async () => { + const { rpc, tool } = await boot(makeProject(BASE_FILES)); + rpc('push-analog', report('pg1')); + call({ url: '/api/_analog/pages/untagged' }); + expect(await tool('analog-list-server-calls', { page: 'pg1' })).toContain( + 'No server call recorded for page `pg1` yet', + ); + }); + + it("drops a page's calls when the page leaves", async () => { + const { rpc, state } = await boot(makeProject(BASE_FILES)); + rpc('push-analog', report('pg1')); + call({ url: '/a', pageId: 'pg1' }); + call({ url: '/b' }); + rpc('forget-analog-page', 'pg1'); + expect(state().calls.map((c) => c.url)).toEqual(['/b']); + }); + + it('expires calls tagged with a page that stopped reporting', async () => { + vi.useFakeTimers(); + const { rpc } = await boot(makeProject(BASE_FILES), () => 30_000); + rpc('push-analog', report('pg1')); + call({ url: '/a', pageId: 'pg1' }); + // Tagged by its header, from a page that never sent an Analog report. + call({ url: '/b', pageId: 'pg9' }); + call({ url: '/c' }); + vi.advanceTimersByTime(35_000); + expect(recentCalls().map((c) => c.url)).toEqual(['/c']); + }); +}); + +describe('the Analog source scan', () => { + it('is not run again on pushes while no file changes', async () => { + vi.useFakeTimers({ toFake: ['Date'] }); + const { rpc } = await boot(makeProject(BASE_FILES)); + rpc('push-analog', report('pg1')); + const after = scans.count; + for (let i = 0; i < 5; i++) { + vi.setSystemTime(Date.now() + 5000); + rpc('push-analog', report('pg1', { hydrated: i })); + } + expect(scans.count).toBe(after); + }); + + it('rescans after the Vite watcher sees a change, without holding up the push', async () => { + const root = makeProject(BASE_FILES); + const onChange = viteScanWatcher(); + const { rpc, tool } = await boot(root); + rpc('push-analog', report('pg1')); + const before = scans.count; + + writeFileSync( + join(root, 'src/app/pages/team.page.ts'), + BASE_FILES['src/app/pages/index.page.ts'], + ); + onChange('add', join(root, 'src/app/pages/team.page.ts')); + rpc('push-analog', report('pg1', { hydrated: 1 })); + // The push took the last scan; the rescan runs on a later tick. + expect(scans.count).toBe(before); + await new Promise((resolve) => setImmediate(resolve)); + expect(scans.count).toBe(before + 1); + expect(await tool('analog-scan-routes')).toContain('team.page.ts'); + expect(scans.count).toBe(before + 1); + }); + + it('rescans after a file changes on disk when no Vite watcher runs', async () => { + const root = makeProject(BASE_FILES); + const { rpc, tool } = await boot(root); + rpc('push-analog', report('pg1')); + expect(await tool('analog-scan-routes')).not.toContain('team.page.ts'); + writeFileSync( + join(root, 'src/app/pages/team.page.ts'), + BASE_FILES['src/app/pages/index.page.ts'], + ); + await vi.waitFor( + async () => expect(await tool('analog-scan-routes')).toContain('team.page.ts'), + { + timeout: 3000, + interval: 50, + }, + ); + }); +}); diff --git a/packages/devtools/src/__tests__/analog-scan-cache.test.ts b/packages/devtools/src/__tests__/analog-scan-cache.test.ts new file mode 100644 index 00000000..156f18c6 --- /dev/null +++ b/packages/devtools/src/__tests__/analog-scan-cache.test.ts @@ -0,0 +1,55 @@ +import { mkdtempSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { afterEach, describe, expect, it } from 'vitest'; +import { createScanCache, resetScanVersion, type WatchFn } from '../rpc/analog-scan-cache.ts'; + +/** A watch function the test drives: each call records its path and change callback. */ +function fakeWatch() { + const watchers: { path: string; onChange: (file: string) => void; closed: boolean }[] = []; + const watch: WatchFn = (path, _options, onChange) => { + const entry = { path, onChange, closed: false }; + watchers.push(entry); + return { close: () => (entry.closed = true) }; + }; + return { watch, watchers }; +} + +describe('createScanCache', () => { + afterEach(resetScanVersion); + + it('tells the listeners when get() runs the rescan', () => { + const root = mkdtempSync(join(tmpdir(), 'scan-cache-')); + const { watch, watchers } = fakeWatch(); + let n = 0; + const cache = createScanCache(() => ({ root, n: ++n }), { watch }); + cache.get(); + const seen: number[] = []; + cache.onRefresh((value) => seen.push(value.n)); + + watchers[0]!.onChange('a.page.ts'); + expect(cache.get().n).toBe(2); + expect(seen).toEqual([2]); + cache.dispose(); + }); + + it('watches again after a watcher error', () => { + const root = mkdtempSync(join(tmpdir(), 'scan-cache-')); + const { watch, watchers } = fakeWatch(); + let n = 0; + const cache = createScanCache(() => ({ root, n: ++n }), { watch }); + cache.get(); + const first = watchers[0]!; + + // nodeWatch reports a watcher `error` event as a change with no file name. + first.onChange(''); + expect(cache.get().n).toBe(2); + expect(first.closed).toBe(true); + expect(watchers.length).toBe(2); + + // The new watcher still marks the scan stale. + watchers[1]!.onChange('a.page.ts'); + expect(cache.get().n).toBe(3); + cache.dispose(); + }); +}); diff --git a/packages/devtools/src/analog-call-pages.ts b/packages/devtools/src/analog-call-pages.ts new file mode 100644 index 00000000..f6c87e76 --- /dev/null +++ b/packages/devtools/src/analog-call-pages.ts @@ -0,0 +1,120 @@ +// Which tab an Analog server call belongs to, decided on the dev server when +// the call is logged. Best source first: +// +// 1. the `x-pangular-page` header the app's dev interceptor sends on its own +// same-origin requests; +// 2. the render id: the Vite plugin gives each page render an id, sends it to +// the browser in Server-Timing and to the render's own `/_analog` requests +// in `x-pangular-render`; the page reports the id, which ties the render +// and its calls to the page; +// 3. the `Referer`, only when exactly one live page shows that path. +// +// Anything else stays untagged. + +import { + ANALOG_PAGE_HEADER, + ANALOG_RENDER_HEADER, + isPageTag, + isRenderId, + newRenderId, +} from './analog-call-tags.ts'; + +const MAX_RENDERS = 200; +/** How long a render id waits for its page to report it. */ +export const RENDER_TTL_MS = 5 * 60_000; + +const renders = new Map(); +let pagesAt: ((path: string) => string[]) | undefined; + +/** Installs how the log finds the live pages that show a path (from the Analog page reports). */ +export function setPagesAtPath(find: ((path: string) => string[]) | undefined): void { + pagesAt = find; +} + +function prune(now: number) { + for (const [id, render] of renders) { + if (renders.size <= MAX_RENDERS && now - render.at <= RENDER_TTL_MS) break; + renders.delete(id); + } +} + +/** A new render id for a page request, kept so the render's own requests can name it. */ +export function beginRender(now = Date.now()): string { + prune(now); + const id = newRenderId(); + renders.set(id, { at: now }); + return id; +} + +/** The page a render was tied to, or undefined. Undefined too for a render id this server never gave out. */ +export function renderPage(id: string): string | undefined { + return renders.get(id)?.pageId; +} + +/** + * Ties a render to the page that reported its id. The first page wins, so a + * second tab can't take over a render it did not load. Returns whether the + * render is now tied to `pageId`. + */ +export function bindRender(id: unknown, pageId: string): boolean { + if (!isRenderId(id)) return false; + const render = renders.get(id); + if (!render) return false; + render.pageId ??= pageId; + return render.pageId === pageId; +} + +/** Forgets the renders of the given pages, so their ids tag nothing more. */ +export function forgetRenders(pageIds: readonly string[]): void { + for (const [id, render] of renders) { + if (render.pageId && pageIds.includes(render.pageId)) renders.delete(id); + } +} + +export function clearRenders(): void { + renders.clear(); +} + +function header(value: string | string[] | undefined): string | undefined { + return Array.isArray(value) ? value[0] : value; +} + +function refererPath(value: string | undefined): string | undefined { + if (!value) return undefined; + try { + return new URL(value).pathname; + } catch { + return undefined; + } +} + +export interface CallTag { + pageId?: string; + renderId?: string; +} + +/** + * The page and render a logged request belongs to. A page request gets a new + * render id (`render`) instead; its page is known once the page reports it. + */ +export function tagRequest( + headers: Record, + kind: string, + render?: string, +): CallTag { + const tag: CallTag = {}; + const page = header(headers[ANALOG_PAGE_HEADER]); + if (isPageTag(page)) tag.pageId = page; + const renderId = render ?? header(headers[ANALOG_RENDER_HEADER]); + if (isRenderId(renderId) && renders.has(renderId)) { + tag.renderId = renderId; + tag.pageId ??= renderPage(renderId); + } + // A document request's Referer is the page it came from, often another tab's. + if (!tag.pageId && !tag.renderId && kind !== 'page') { + const path = refererPath(header(headers['referer'])); + const pages = path ? (pagesAt?.(path) ?? []) : []; + if (pages.length === 1) tag.pageId = pages[0]; + } + return tag; +} diff --git a/packages/devtools/src/analog-call-tags.ts b/packages/devtools/src/analog-call-tags.ts new file mode 100644 index 00000000..5b34c10e --- /dev/null +++ b/packages/devtools/src/analog-call-tags.ts @@ -0,0 +1,60 @@ +// How an Analog server call is tied to the tab that caused it. Shared by the +// app's HttpClient interceptor (browser and server), the Analog collector and +// the dev server's call log, so it imports nothing from Node. + +/** Request header with the page id of the tab that sent a same-origin request (dev builds only). */ +export const ANALOG_PAGE_HEADER = 'x-pangular-page'; + +/** Request header with the render id of the server render that sent an `/_analog` request. */ +export const ANALOG_RENDER_HEADER = 'x-pangular-render'; + +/** Server-Timing metric whose description is the id the Vite plugin gave a page render. */ +export const ANALOG_RENDER_TIMING = 'pangular-analog'; + +const TAG_ID = /^[\w-]{1,49}$/; +const RENDER_ID = /^[a-z0-9]{1,40}$/; + +/** A page id as the overlay mints it, short enough for the server's 50-character limit. */ +export function isPageTag(value: unknown): value is string { + return typeof value === 'string' && TAG_ID.test(value); +} + +export function isRenderId(value: unknown): value is string { + return typeof value === 'string' && RENDER_ID.test(value); +} + +/** A fresh render id for a page request. */ +export function newRenderId(): string { + try { + const uuid = globalThis.crypto?.randomUUID?.(); + if (uuid) return uuid.replace(/-/g, '').slice(0, 20); + } catch { + // no Web Crypto: fall back below. + } + return (Date.now().toString(36) + Math.random().toString(36).slice(2, 12)).slice(0, 20); +} + +/** The render id the dev server sent with this document in Server-Timing, if any. */ +export function readRenderId(): string | undefined { + try { + const [nav] = performance.getEntriesByType('navigation') as PerformanceNavigationTiming[]; + const entry = nav?.serverTiming?.find((t) => t.name === ANALOG_RENDER_TIMING); + return isRenderId(entry?.description) ? entry.description : undefined; + } catch { + return undefined; + } +} + +/** Whether `url` goes to the page's own origin, so a custom header adds no CORS preflight. */ +export function sameOrigin(url: string, base: { href: string; origin: string }): boolean { + try { + return new URL(url, base.href).origin === base.origin; + } catch { + return false; + } +} + +/** Whether a server render's request is one the Analog call log tags: a load(), action or server function. */ +export function isAnalogEndpoint(url: string): boolean { + return url.includes('/_analog/'); +} diff --git a/packages/devtools/src/analog-runtime.ts b/packages/devtools/src/analog-runtime.ts index f96a1fce..ea0a69e8 100644 --- a/packages/devtools/src/analog-runtime.ts +++ b/packages/devtools/src/analog-runtime.ts @@ -1,3 +1,4 @@ +import { readRenderId } from './analog-call-tags.ts'; import { keepaliveDue } from './change-detection.ts'; import { hasStateScript, scanHydration } from './http-hydration.ts'; import { isRedactedKey, redactMessage } from './forms-privacy.ts'; @@ -40,6 +41,8 @@ export interface AnalogRuntimeReport { transferState: boolean; hydrationErrors: string[]; configPaths: string[]; + /** The id the Vite plugin gave the render of this document (Server-Timing), so its server calls join this page. */ + renderId?: string; } const MAX_PREVIEW = 1000; @@ -272,6 +275,7 @@ export function collectAnalog( pageId: string, hydrationErrors: string[], scanner?: HydrationScanner, + renderId?: string, ): AnalogRuntimeReport | null { const router = routerOf(ng); if (!router) return null; @@ -297,6 +301,7 @@ export function collectAnalog( ).map((error) => redactText(error, secrets)), configPaths: paths, }; + if (renderId) report.renderId = renderId; const context = rootEl?.getAttribute('ng-server-context'); if (context) report.serverContext = context; const load = loadSummary(data); @@ -330,10 +335,18 @@ export function attachAnalog( } }; const stopConsole = tapConsole(['error', 'warn'], (_level, args) => record([...args])); + // Read once: the document, and so its render, stays the same for the page's life. + const renderId = readRenderId(); + const registry = httpRegistry(); const push = () => { - const report = read(() => collectAnalog(getNg(), pageId, hydrationErrors, scanner), null); + const report = read( + () => collectAnalog(getNg(), pageId, hydrationErrors, scanner, renderId), + null, + ); if (!report || !report.analog) return; + // On an Analog page, the app's dev interceptor sends this id on same-origin requests. + registry.pageId = pageId; const text = JSON.stringify(report); if (text === last && !keepaliveDue(lastAt, refreshMs)) return; last = text; @@ -374,5 +387,6 @@ export function attachAnalog( clearInterval(interval); subscription?.unsubscribe(); stopConsole(); + if (registry.pageId === pageId) delete registry.pageId; }; } diff --git a/packages/devtools/src/analog-server-log.ts b/packages/devtools/src/analog-server-log.ts index 93f7ca66..d0c65ca5 100644 --- a/packages/devtools/src/analog-server-log.ts +++ b/packages/devtools/src/analog-server-log.ts @@ -1,4 +1,7 @@ import type { IncomingMessage, ServerResponse } from 'node:http'; +import { ANALOG_RENDER_TIMING } from './analog-call-tags.ts'; +import { beginRender, bindRender, tagRequest } from './analog-call-pages.ts'; +import { runInAnalogRender } from './ssr-context.ts'; import { redactCredentials } from './credential-redact.ts'; import { isRedactedKey, redactJwt } from './forms-privacy.ts'; import { redactJsonText } from './json-text-redact.ts'; @@ -54,6 +57,10 @@ export interface AnalogCall { location?: string; seeded?: boolean; preview?: string; + /** The tab the call belongs to, when the dev server could tell (see `analog-call-pages.ts`). */ + pageId?: string; + /** The page render the call belongs to: the render itself, or a request it made. */ + renderId?: string; } const MAX_CALLS = 200; @@ -78,6 +85,11 @@ export function recordCall(call: Omit): AnalogCall { const full = { ...call, id: ++seq }; calls.push(full); if (calls.length > MAX_CALLS) calls.splice(0, calls.length - MAX_CALLS); + notify(); + return full; +} + +function notify() { for (const listener of listeners) { try { listener(recentCalls()); @@ -85,18 +97,37 @@ export function recordCall(call: Omit): AnalogCall { // a broken listener must not break the dev server } } - return full; } export function clearCalls() { calls.length = 0; - for (const listener of listeners) { - try { - listener([]); - } catch { - // a broken listener must not break the dev server - } - } + notify(); +} + +/** + * Tags the calls of a render with the page that reported the render's id, and + * the calls that render makes from now on. Returns whether a call changed. + */ +export function bindRenderCalls(renderId: unknown, pageId: string): boolean { + if (!bindRender(renderId, pageId)) return false; + let changed = false; + calls.forEach((call, i) => { + if (call.renderId !== renderId || call.pageId) return; + // A copy: the shared state may hold (and freeze) the old object. + calls[i] = { ...call, pageId }; + changed = true; + }); + if (changed) notify(); + return changed; +} + +/** Drops the calls `drop` picks, such as those of a page that left or expired. */ +export function dropCalls(drop: (call: AnalogCall) => boolean): void { + const before = calls.length; + const kept = calls.filter((call) => !drop(call)); + if (kept.length === before) return; + calls.splice(0, before, ...kept); + notify(); } export function setDevOrigin(value: string | undefined) { @@ -208,6 +239,9 @@ export function analogMiddleware(apiPrefix = 'api') { const match = classify(url, req.method ?? 'GET', String(req.headers.accept ?? ''), apiPrefix); if (!match) return next(); const start = performance.now(); + const render = match.kind === 'page' ? beginRender() : undefined; + if (render) noteRenderTiming(res, render); + const tag = tagRequest(req.headers, match.kind, render); const chunks: Buffer[] = []; let captured = 0; let bytes = 0; @@ -257,6 +291,7 @@ export function analogMiddleware(apiPrefix = 'api') { ms: Math.round(performance.now() - start), bytes, from: fromOf(req), + ...tag, }; if (match.kind === 'page') { call.render = @@ -272,6 +307,7 @@ export function analogMiddleware(apiPrefix = 'api') { ms: 0, from: 'ssr', seeded: true, + ...tag, }); } } else { @@ -289,10 +325,24 @@ export function analogMiddleware(apiPrefix = 'api') { } recordCall(call); }); - next(); + // The render's own load() and server function requests name it (`withPangular()`). + if (render) runInAnalogRender(render, next); + else next(); }; } +/** Sends the render id to the browser, which reports it with the page, in Server-Timing. */ +function noteRenderTiming(res: ServerResponse, render: string) { + try { + const entry = `${ANALOG_RENDER_TIMING};desc="${render}"`; + const existing = res.getHeader('server-timing'); + const before = Array.isArray(existing) ? existing.join(', ') : existing; + res.setHeader('server-timing', before ? `${before}, ${entry}` : entry); + } catch { + // Headers already sent: the page stays untagged. + } +} + export interface DuplicateLoad { route: string; ssrAt: number; diff --git a/packages/devtools/src/http-analog-tag.ts b/packages/devtools/src/http-analog-tag.ts new file mode 100644 index 00000000..f4995ca5 --- /dev/null +++ b/packages/devtools/src/http-analog-tag.ts @@ -0,0 +1,35 @@ +import type { HttpRequest } from '@angular/common/http'; +import { + ANALOG_PAGE_HEADER, + ANALOG_RENDER_HEADER, + isAnalogEndpoint, + sameOrigin, +} from './analog-call-tags.ts'; +import { httpRegistry, type HttpSide } from './http-rules.ts'; + +/** + * The request as sent on, with the header that ties it to its tab in the + * Analog call log: in the browser, the page id on a same-origin request (a + * custom header there adds no CORS preflight); on the server, the render id on + * the render's own `/_analog` requests. Nothing is added when there is no id, + * and the recorded call keeps the app's own headers. + */ +export function analogTagged( + req: HttpRequest, + side: HttpSide, + render: () => string | undefined, +): HttpRequest { + try { + if (side === 'client') { + const pageId = httpRegistry().pageId; + if (!pageId || req.headers.has(ANALOG_PAGE_HEADER)) return req; + if (typeof location === 'undefined' || !sameOrigin(req.url, location)) return req; + return req.clone({ setHeaders: { [ANALOG_PAGE_HEADER]: pageId } }); + } + if (!isAnalogEndpoint(req.url)) return req; + const renderId = render(); + return renderId ? req.clone({ setHeaders: { [ANALOG_RENDER_HEADER]: renderId } }) : req; + } catch { + return req; + } +} diff --git a/packages/devtools/src/http-rules.ts b/packages/devtools/src/http-rules.ts index 273ef180..46d70a14 100644 --- a/packages/devtools/src/http-rules.ts +++ b/packages/devtools/src/http-rules.ts @@ -55,6 +55,8 @@ export interface HttpCall { } export interface HttpRegistry { + /** Browser only: the page id the Analog collector reports under, sent on same-origin requests. */ + pageId?: string; rules?: HttpRule[]; calls?: HttpCall[]; warnings?: string[]; diff --git a/packages/devtools/src/http.ts b/packages/devtools/src/http.ts index 9acbcad9..851bdd9e 100644 --- a/packages/devtools/src/http.ts +++ b/packages/devtools/src/http.ts @@ -46,7 +46,8 @@ import { noteSsrFetch, ssrRegistry, } from './ssr-registry.ts'; -import { currentSsrRequest } from './ssr-context.ts'; +import { currentAnalogRender, currentSsrRequest } from './ssr-context.ts'; +import { analogTagged } from './http-analog-tag.ts'; import { matchingOverrides } from './ssr-overrides.ts'; import { watchSsrNavigations } from './ssr-navigation.ts'; import { tapConsole } from './console-tap.ts'; @@ -224,7 +225,7 @@ export const pangularHttpInterceptor: HttpInterceptorFn = (req, next) => { }), ); } else { - source = next(req); + source = next(analogTagged(req, side, () => currentAnalogRender(inject(Injector)))); } const cacheable = side === 'client' && !mocked && transferWindowOpen(); const claimable = cacheable && transferCacheEligible(req); diff --git a/packages/devtools/src/rpc/analog-register.ts b/packages/devtools/src/rpc/analog-register.ts index b05b3812..bf6a7769 100644 --- a/packages/devtools/src/rpc/analog-register.ts +++ b/packages/devtools/src/rpc/analog-register.ts @@ -1,6 +1,8 @@ import { DEVTOOLS_HEADER, + bindRenderCalls, clearCalls, + dropCalls, devOrigin, duplicateLoads, onCalls, @@ -12,6 +14,7 @@ import { import { existsSync, readdirSync } from 'node:fs'; import { basename, dirname, join } from 'node:path'; import { redactAnalogReport } from '../analog-redact.ts'; +import { forgetRenders, setPagesAtPath } from '../analog-call-pages.ts'; import type { PayloadSummary } from '../http-payload.ts'; import { explainUrl, @@ -40,13 +43,14 @@ import { type AnalogState, UNTRUSTED, } from './analog-tools.ts'; +import type { AnalogRuntimeReport } from '../analog-runtime.ts'; +import { createScanCache } from './analog-scan-cache.ts'; import type { PageOwners } from './page-owners.ts'; import { fixedTtl, PAGE_TTL_MS, type PageTtl } from './page-ttl.ts'; import { refusal } from './refusal.ts'; type AnyRecord = Record; -const SCAN_CACHE_MS = 2000; const CALL_TIMEOUT_MS = 10_000; const MAX_BODY = 2000; @@ -280,9 +284,15 @@ export async function registerAnalog( const seenAt = new Map(); const dropPages = (ids: string[]) => { if (!ids.length) return; - for (const id of ids) seenAt.delete(id); + for (const id of ids) { + seenAt.delete(id); + reports.delete(id); + } const now = current(); apply({ ...now, pages: now.pages.filter((p) => !ids.includes(p.pageId)) }); + // A page's calls leave with it. + forgetRenders(ids); + dropCalls((call) => !!call.pageId && ids.includes(call.pageId)); }; const expiry = setInterval(() => { const now = Date.now(); @@ -291,25 +301,45 @@ export async function registerAnalog( .pages.map((p) => p.pageId) .filter((id) => now - (seenAt.get(id) ?? 0) > ttl(id)), ); + // Calls tagged with a page that never reported Analog data expire on the same clock. + const live = new Set(current().pages.map((p) => p.pageId)); + dropCalls( + (call) => !!call.pageId && !live.has(call.pageId) && now - call.at > ttl(call.pageId), + ); }, 5000); + setPagesAtPath((path) => + current() + .pages.filter((p) => p.url.split(/[?#]/)[0] === path) + .map((p) => p.pageId), + ); expiry.unref?.(); disposeAnalog = () => { clearInterval(expiry); stopCalls(); + stopRefresh(); + scans.dispose(); + setPagesAtPath(undefined); findServerFn = undefined; reportingPages = undefined; }; reportingPages = () => current().pages.map((p) => ({ pageId: p.pageId, reportedAt: seenAt.get(p.pageId) ?? 0 })); - let cache: { at: number; project: AnalogProject } | null = null; - const project = () => { - if (!cache || Date.now() - cache.at > SCAN_CACHE_MS) { - cache = { at: Date.now(), project: scanAnalog(servedAnalogRoot(ctx.cwd)) }; - } - return cache.project; - }; - findServerFn = (id) => project().serverFns.find((fn) => fn.id === id); + // The scan is kept until a file it reads changes. Queries and tools read it fresh; + // pushes take the last one and the rescan runs on a later tick. + const scans = createScanCache(() => scanAnalog(servedAnalogRoot(ctx.cwd))); + const project = () => scans.get(); + /** Each page's last report before it was checked against the project, to check it again after a rescan. */ + const reports = new Map(); + const stopRefresh = scans.onRefresh((next) => { + const now = current(); + const pages = now.pages.map((p) => { + const report = reports.get(p.pageId); + return report ? resolveAnalogReport(next, report) : p; + }); + apply({ ...now, pages }); + }); + findServerFn = (id) => scans.peek().serverFns.find((fn) => fn.id === id); my.rpc.register({ name: 'push-analog', @@ -319,9 +349,12 @@ export async function registerAnalog( if (!isAnalogReport(report)) return; if (options.owners && !options.owners.write(report.pageId)) return; seenAt.set(report.pageId, Date.now()); - apply( - mergeAnalogReport(current(), resolveAnalogReport(project(), redactAnalogReport(report))), - ); + const redacted = redactAnalogReport(report); + reports.set(report.pageId, redacted); + apply(mergeAnalogReport(current(), resolveAnalogReport(scans.peek(), redacted))); + const kept = new Set(current().pages.map((p) => p.pageId)); + for (const id of reports.keys()) if (!kept.has(id)) reports.delete(id); + if (report.renderId) bindRenderCalls(report.renderId, report.pageId); }, }); my.rpc.register({ @@ -427,16 +460,21 @@ export async function registerAnalog( id: 'pangular:analog-list-server-calls', title: 'List Analog server calls', description: - 'Recent Analog server calls: page renders, load() fetches, form actions, server functions and API routes, with status, time, size, caller and a masked preview. Flags load() fetched twice and server reads repeated in the browser.', + "Recent Analog server calls: page renders, load() fetches, form actions, server functions and API routes, with status, time, size, caller, the tab it came from when known, and a masked preview. Flags load() fetched twice and server reads repeated in the browser. Pass `page` for one tab's calls only.", inputSchema: { type: 'object', properties: { kind: { type: 'string', enum: ['page', 'load', 'action', 'fn', 'api'] }, route: { type: 'string' }, limit: { type: 'number' }, + page: { + type: 'string', + description: + 'Page id (see pangular:list-pages): only the calls the dev server tied to that tab. Leave it out for every call, including those tied to no tab.', + }, }, }, - handler: async (args: { kind?: string; route?: string; limit?: number }) => + handler: async (args: { kind?: string; route?: string; limit?: number; page?: string }) => text(analogServerCallsText(current(), args ?? {}, project().serverFns)), }); ctx.agent.registerTool({ diff --git a/packages/devtools/src/rpc/analog-scan-cache.ts b/packages/devtools/src/rpc/analog-scan-cache.ts new file mode 100644 index 00000000..e8eae18a --- /dev/null +++ b/packages/devtools/src/rpc/analog-scan-cache.ts @@ -0,0 +1,192 @@ +// Keeps the Analog source scan until a file it reads changes, instead of +// rescanning every few seconds. The Vite plugin bumps a shared version from +// its file watcher; elsewhere (the Express hub, the CLI) the cache watches the +// folders the scan reads with `fs.watch`. Where neither works, it falls back +// to rescanning after `fallbackMs`. + +import { existsSync, watch as fsWatch } from 'node:fs'; +import { join } from 'node:path'; + +interface ScanVersion { + /** Bumped by the Vite plugin's watcher on every file change in the project. */ + version: number; + /** Whether a Vite watcher is bumping `version`. */ + watched: boolean; +} + +function scanVersion(): ScanVersion { + const g = globalThis as { __PANGULAR_ANALOG_SCAN__?: ScanVersion }; + return (g.__PANGULAR_ANALOG_SCAN__ ??= { version: 0, watched: false }); +} + +const WATCHED_DIRS = ['src', 'app', 'dist']; + +const SKIP = /[\\/](node_modules|\.git|\.nx|\.angular|\.cache)([\\/]|$)/; + +/** + * For the Vite plugin: marks the scan as watched and returns the listener to + * pass to `server.watcher.on('all', ...)`. + */ +export function viteScanWatcher(): (event: string, file: string) => void { + const shared = scanVersion(); + shared.watched = true; + return (_event, file) => { + if (!SKIP.test(String(file))) shared.version++; + }; +} + +/** For tests and server restarts: forgets the Vite watcher. */ +export function resetScanVersion(): void { + const shared = scanVersion(); + shared.version = 0; + shared.watched = false; +} + +export type WatchFn = ( + path: string, + options: { recursive: boolean }, + onChange: (file: string) => void, +) => { close(): void }; + +const nodeWatch: WatchFn = (path, options, onChange) => { + const watcher = fsWatch(path, { recursive: options.recursive, persistent: false }, (_e, file) => + onChange(String(file ?? '')), + ); + watcher.on('error', () => onChange('')); + return watcher; +}; + +/** The folders under `root` the scan reads, recursively, and `root` itself for config files. */ +export function watchedPaths(root: string): { path: string; recursive: boolean }[] { + const out = [{ path: root, recursive: false }]; + for (const dir of WATCHED_DIRS) { + const path = join(root, dir); + if (existsSync(path)) out.push({ path, recursive: true }); + } + return out; +} + +export interface ScanCache { + /** The scan, fresh: rescans now when a file changed. For queries and agent tools. */ + get(): T; + /** + * The last scan without waiting, for pushes. When a file changed, the + * rescan runs on a later tick and `onRefresh` listeners get the new one. + */ + peek(): T; + onRefresh(listener: (value: T) => void): () => void; + dispose(): void; +} + +export function createScanCache( + scan: () => T, + options: { watch?: WatchFn | false; fallbackMs?: number; now?: () => number } = {}, +): ScanCache { + const watch = options.watch === undefined ? nodeWatch : options.watch; + const fallbackMs = options.fallbackMs ?? 2000; + const now = options.now ?? Date.now; + const listeners = new Set<(value: T) => void>(); + let value: T | undefined; + let at = 0; + let version = -1; + let dirty = true; + let watching: { root: string; closers: { close(): void }[]; ok: boolean } | undefined; + let scheduled = false; + let rewatch = false; + + const unwatch = () => { + for (const closer of watching?.closers ?? []) { + try { + closer.close(); + } catch { + // already closed + } + } + watching = undefined; + }; + + const startWatching = (root: string) => { + if (scanVersion().watched || !watch) return; + if (watching?.root === root && !rewatch) return; + unwatch(); + rewatch = false; + const state = { root, closers: [] as { close(): void }[], ok: true }; + watching = state; + for (const { path, recursive } of watchedPaths(root)) { + try { + state.closers.push( + watch(path, { recursive }, (file) => { + if (SKIP.test(join(path, file))) return; + dirty = true; + // A watcher error (no file name), or a folder the scan reads appeared or went + // away (a build wrote dist): watch anew. + if (!file || (!recursive && WATCHED_DIRS.includes(file))) rewatch = true; + }), + ); + } catch { + state.ok = false; + } + } + }; + + const stale = () => { + if (!value || dirty) return true; + const shared = scanVersion(); + if (shared.watched) return shared.version !== version; + if (watch && watching?.ok) return false; + return now() - at > fallbackMs; + }; + + const rescan = () => { + // Clear first, so a change during the scan marks the new value stale again. + dirty = false; + version = scanVersion().version; + at = now(); + value = scan(); + startWatching(value.root); + return value; + }; + + const notify = (next: T) => { + for (const listener of listeners) { + try { + listener(next); + } catch { + // a broken listener must not break the others + } + } + }; + + const refresh = () => { + scheduled = false; + if (!stale()) return; + notify(rescan()); + }; + + return { + get: () => { + if (!stale()) return value!; + // Whichever call rescans tells the listeners, or the open pages keep the old scan. + const first = !value; + const next = rescan(); + if (!first) notify(next); + return next; + }, + peek: () => { + if (!value) return rescan(); + if (stale() && !scheduled) { + scheduled = true; + setImmediate(refresh); + } + return value; + }, + onRefresh: (listener) => { + listeners.add(listener); + return () => listeners.delete(listener); + }, + dispose: () => { + unwatch(); + listeners.clear(); + }, + }; +} diff --git a/packages/devtools/src/rpc/analog-tools.ts b/packages/devtools/src/rpc/analog-tools.ts index 6bbdd501..b92e5f7d 100644 --- a/packages/devtools/src/rpc/analog-tools.ts +++ b/packages/devtools/src/rpc/analog-tools.ts @@ -1,4 +1,6 @@ import { defaultPage } from './default-page.ts'; +import { callerPage } from './page-scope.ts'; +import { unknownPageText } from './pages.ts'; import { existsSync } from 'node:fs'; import { join } from 'node:path'; import type { @@ -9,6 +11,7 @@ import type { } from '../analog-server-log.ts'; import { duplicateLoads, refetchedServerFns } from '../analog-server-log.ts'; import type { AnalogRuntimeReport } from '../analog-runtime.ts'; +import { isRenderId } from '../analog-call-tags.ts'; import { PARTIAL_HINT } from './analog-config-partial.ts'; import { explainUrl, @@ -82,6 +85,7 @@ export function isAnalogReport(value: unknown): value is AnalogRuntimeReport { (typeof r.loadFrom === 'number' && Number.isInteger(r.loadFrom) && r.loadFrom >= 0)) && typeof r.hydrated === 'number' && typeof r.transferState === 'boolean' && + (r.renderId === undefined || isRenderId(r.renderId)) && isStrings(r.hydrationErrors, 50) && isStrings(r.configPaths, 1000) && (r.load === undefined || @@ -337,21 +341,33 @@ function fnLabel(fns: AnalogServerFn[], id: string): string { export function analogServerCallsText( state: AnalogState, - args: { kind?: string; route?: string; limit?: number }, + args: { kind?: string; route?: string; limit?: number; page?: string }, fns: AnalogServerFn[] = [], ): string { const limit = Math.min(Math.max(args.limit ?? 30, 1), 200); const nameOf = (c: AnalogCall) => c.kind === 'fn' ? (fns.find((f) => f.id === c.route)?.name ?? '') : ''; - const calls = state.calls.filter( + // A page tool answers for its own tab only, whatever `page` says. + const page = callerPage() ?? args.page; + if ( + page && + !state.pages.some((p) => p.pageId === page) && + !state.calls.some((c) => c.pageId === page) + ) { + return unknownPageText(page, state.pages, 'Analog data'); + } + const own = page ? state.calls.filter((c) => c.pageId === page) : state.calls; + const calls = own.filter( (c) => (!args.kind || c.kind === args.kind) && (!args.route || (c.route ?? c.url).includes(args.route) || nameOf(c).includes(args.route)), ); if (!calls.length) { - return state.calls.length - ? 'No server call matches.' - : 'No server calls recorded yet. Calls are logged by the pangular() Vite plugin while the dev server runs.'; + if (own.length) return 'No server call matches.'; + if (page) { + return `No server call recorded for page ${code(page)} yet. Calls the dev server could not tie to a tab are left out${callerPage() ? '' : '; call without `page` to see every call'}.`; + } + return 'No server calls recorded yet. Calls are logged by the pangular() Vite plugin while the dev server runs.'; } const lines = calls.slice(-limit).map((c) => { const time = new Date(c.at).toISOString().slice(11, 23); @@ -364,14 +380,15 @@ export function analogServerCallsText( c.outcome ? ACTION_OUTCOME[c.outcome] : '', c.location ? `to ${code(c.location)}` : '', c.bytes !== undefined ? `${c.bytes} B` : '', + !page && c.pageId ? `page ${code(c.pageId)}` : '', ] .filter(Boolean) .join(', '); const name = nameOf(c) ? ` ${fnLabel(fns, c.route!)}` : ''; return `- ${time} ${c.kind}${name} ${c.method} ${code(c.url)} ${c.status} in ${c.ms}ms (${extra})${c.preview ? `\n ${c.preview.slice(0, 300)}` : ''}`; }); - const dupes = duplicateLoads(state.calls); - const refetches = refetchedServerFns(state.calls); + const dupes = duplicateLoads(own); + const refetches = refetchedServerFns(own); const notes = [ dupes.length ? `Fetched twice (server render, then again in the browser): ${dupes.map((d) => code(d.route)).join(', ')}. TransferState did not serve the server result (see analogjs/analog#2525).` diff --git a/packages/devtools/src/ssr-context.ts b/packages/devtools/src/ssr-context.ts index 51f5cb7c..370c8781 100644 --- a/packages/devtools/src/ssr-context.ts +++ b/packages/devtools/src/ssr-context.ts @@ -13,6 +13,8 @@ import { activeSsrRequest, ssrRegistry } from './ssr-registry.ts'; /** What a tracer knows about the request being handled. No `requestId` means it was not traced. */ export interface SsrRequestContext { readonly requestId?: string; + /** The Analog page render the code runs for, set by the Vite plugin's call log. */ + readonly analogRenderId?: string; } /** The part of Node's `AsyncLocalStorage` used here. */ @@ -46,9 +48,19 @@ function storage(): SsrContextStorage | undefined { } function contextFor(requestId: string | undefined): SsrRequestContext { + // A tracer inside the Vite plugin's Analog call log keeps the render id it set. + const analogRenderId = storage()?.getStore()?.analogRenderId; + if (analogRenderId) return requestId ? { requestId, analogRenderId } : { analogRenderId }; return requestId ? { requestId } : UNTRACED; } +/** Runs `callback`, and everything it starts, as part of the Analog page render `renderId`. */ +export function runInAnalogRender(renderId: string, callback: () => R): R { + const context = storage(); + if (!context) return callback(); + return context.run({ ...context.getStore(), analogRenderId: renderId }, callback); +} + /** Runs `callback`, and everything it starts, as part of the request `requestId` (none: untraced). */ export function runInSsrRequest(requestId: string | undefined, callback: () => R): R { const context = storage(); @@ -77,10 +89,22 @@ const pinned = new WeakMap(); * the request or it was not traced. */ export function currentSsrRequest(app?: object): string | undefined { + return activeSsrRequest(pinnedContext(app)?.requestId); +} + +function pinnedContext(app: object | undefined): SsrRequestContext | undefined { let context = app ? pinned.get(app) : undefined; if (!context) { context = ssrRegistry().context?.getStore(); if (context && app) pinned.set(app, context); } - return activeSsrRequest(context?.requestId); + return context; +} + +/** + * The Analog page render `app` runs for, pinned the same way as + * {@link currentSsrRequest}. The dev server checks the id before it trusts it. + */ +export function currentAnalogRender(app?: object): string | undefined { + return pinnedContext(app)?.analogRenderId; } diff --git a/packages/devtools/src/vite.ts b/packages/devtools/src/vite.ts index 9bc39f16..a2b5fe77 100644 --- a/packages/devtools/src/vite.ts +++ b/packages/devtools/src/vite.ts @@ -6,6 +6,7 @@ import type { WsOriginRegistry } from 'devframe/rpc/transports/ws-server'; import { PANGULAR_HUB_BASE, startPangularHub } from './hub.ts'; import { analogMiddleware, setDevOrigin } from './analog-server-log.ts'; import { analogConfig, setAnalogRoot } from './rpc/analog-scan.ts'; +import { viteScanWatcher } from './rpc/analog-scan-cache.ts'; import { releaseServerState } from './server-state.ts'; import { normalizeAllowedOrigins } from './allowed-origins.ts'; import { @@ -157,6 +158,9 @@ export default function pangularVite(options: PangularViteOptions = {}): Plugin setAnalogRoot(server.config.root); const apiPrefix = options.apiPrefix ?? analogConfig(server.config.root).apiPrefix; server.middlewares.use(analogMiddleware(apiPrefix)); + // The Analog source scan is kept until this watcher sees a change. With + // `server.watch: null` Vite's watcher never fires, so the cache watches by itself. + if (server.config.server?.watch !== null) server.watcher?.on('all', viteScanWatcher()); } const httpServer = server.httpServer; // The plugin runs the gate itself, in front of the whole dev server.